LocalCDN-Firefox-Chrome-Brave/resources/socket.io/2.4.0/socket.io.min.jsm

1 line
60 KiB
JavaScript
Raw Normal View History

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.io=e():t.io=e()}(this,function(){return o={},n.m=r=[function(t,e,n){function r(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n=i(t),r=n.source,o=n.id,t=n.path,t=c[o]&&t in c[o].nsps,o=e.forceNew||e["force new connection"]||!1===e.multiplex||t?(a("ignoring socket cache for %s",r),s(r,e)):(c[o]||(a("new io instance for %s",r),c[o]=s(r,e)),c[o]);return n.query&&!e.query&&(e.query=n.query),o.socket(n.path,e)}var i=n(1),o=n(7),s=n(12),a=n(3)("socket.io-client");t.exports=e=r;var c=e.managers={};e.protocol=o.protocol,e.connect=r,e.Manager=n(12),e.Socket=n(37)},function(t,e,n){var r=n(2),o=n(3)("socket.io-client:url");t.exports=function(t,e){var n=t;return e=e||"undefined"!=typeof location&&location,null==t&&(t=e.protocol+"//"+e.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?e.protocol+t:e.host+t),/^(https?|wss?):\/\//.test(t)||(o("protocol-less url %s",t),t=void 0!==e?e.protocol+"//"+t:"https://"+t),o("parse %s",t),n=r(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/",t=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host,n.id=n.protocol+"://"+t+":"+n.port,n.href=n.protocol+"://"+t+(e&&e.port===n.port?"":":"+n.port),n}},function(t,e){var c=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,p=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(t){var e=t,n=t.indexOf("["),r=t.indexOf("]");-1!=n&&-1!=r&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));for(var o,i=c.exec(t||""),s={},a=14;a--;)s[p[a]]=i[a]||"";return-1!=n&&-1!=r&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=(r=s.path,e=r.replace(/\/{2,9}/g,"/").split("/"),"/"!=r.substr(0,1)&&0!==r.length||e.splice(0,1),"/"==r.substr(r.length-1,1)&&e.splice(e.length-1,1),e),s.queryKey=(e=s.query,o={},e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,n){e&&(o[e]=n)}),o),s}},function(r,o,i){(function(e){"use strict";function t(){var t;try{t=o.storage.debug}catch(t){}return!t&&void 0!==e&&"env"in e&&(t=e.env.DEBUG),t}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};(o=r.exports=i(5)).log=function(){return"object"===("undefined"==typeof console?"undefined":n(console))&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},o.formatArgs=function(t){var e,n,r=this.useColors;t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+o.humanize(this.diff),r&&(r="color: "+this.color,t.splice(1,0,r,"color: inherit"),t[n=e=0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(e++,"%c"===t&&(n=e))}),t.splice(n,0,r))},o.save=function(t){try{null==t?o.storage.removeItem("debug"):o.storage.debug=t}catch(t){}},o.load=t,o.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/ap