1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[36],{32308:(e,t,n)=>{"use strict";n.r(t),n.d(t,{PineAddon:()=>v,URL_VARIABLE_PLACEHOLDER:()=>y});var r=n(72158),o=n(56523),i=n(7065),a=n(72885),s=n(68986),u=n(55375),c=n(46536);function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function l(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){n(e);return}s.done?t(u):Promise.resolve(u).then(r,o)}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){p(e,t,n[t])})}return e}function h(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}var y="${VARIABLE}",v=function(){var e;function t(e,n){var r;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");p(this,"pineAddonInfo",void 0),p(this,"pineAddonConfig",void 0),p(this,"name",void 0),p(this,"logger",void 0),p(this,"session",void 0),p(this,"sessionItem",void 0),p(this,"driver",void 0),p(this,"interceptedUrlsMap",void 0),p(this,"manifestParseTimeSeconds",void 0),p(this,"currentTime",void 0),p(this,"HEARTBEAT_LAST_REQ_PATHNAME",void 0),p(this,"ADVERTS_HOSTS",void 0),p(this,"THIRD_PARTY_HOSTS",void 0),this.pineAddonInfo=e,this.pineAddonConfig=n,this.name="Pine",this.logger=s.DA.withContext("Pine"),this.interceptedUrlsMap={},this.manifestParseTimeSeconds=null,this.currentTime=0,this.HEARTBEAT_LAST_REQ_PATHNAME="/concurrency/streams",this.ADVERTS_HOSTS=["mt.ssai","mediatailor"],this.THIRD_PARTY_HOSTS=function(e){if(Array.isArray(e))return f(e)}(r=this.ADVERTS_HOSTS)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e){if(e){if("string"==typeof e)return f(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,void 0)}}(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}return e=[{key:"connect",value:function(){var e,t=this;return(e=function(){var e,n,r,i,a,s,u;return function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){var u=[i,s];if(n)throw TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===u[0]||2===u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,function(c){switch(c.label){case 0:if(null==(n=self.pine)||null==(e=n.getSessionId)?void 0:e.call(n))return[2];if(a=(i=t.pineAddonConfig.config).clientId,s=i.trunkHost,!(null==(r=self.pine)?void 0:r.driver))return[3,1];return t.driver=self.pine.driver,[3,3];case 1:return u=s||self.location.hostname,[4,(0,o.pinefy)(a,u)];case 2:t.driver=c.sent(),t.logger.verbose("pinefy",u),c.label=3;case 3:return t.exposeIds(),[2]}})},function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){l(i,r,o,a,s,"next",e)}function s(e){l(i,r,o,a,s,"throw",e)}a(void 0)})})()}},{key:"destroy",value:function(){this.internalDestroy()}},{key:"internalDestroy",value:function(){var e;this.logger.info("Destroying Addon"),null==(e=this.driver)||e.destroy(),this.driver=void 0,this.sessionItem=void 0,this.session=void 0,this.manifestParseTimeSeconds=null,this.currentTime=0}},{key:"modifyPlayout",value:function(e){var t=this;return h(d({},e),{cdns:e.cdns.map(function(e){return h(d({},e),{url:t.driver.getProxyManifestUrl(e.url)})})})}},{key:"init",value:function(e,t){this.sessionItem=e,this.session=t;var n=this.pineAddonInfo,i=n.playerType,a=n.playerVersion,s=n.deviceType,u=n.deviceVersion,c=n.networkConnectionType;if(null==(f=this.driver)||f.onPlayerStateUpdate(o.EPlayerState.LOADING),null==(l=this.driver)||l.onPlayerMetadataUpdate({name:i,version:a}),null==(p=this.driver)||p.onAssetNameUpdate(this.getAssetName(this.sessionItem.key)),c!==r.Xt.Unknown){var f,l,p,d,h,y=this.mapNetworkConnectionType(c);null==(h=this.driver)||h.onNetworkConnectionTypeUpdate(y)}null==(d=this.driver)||d.onDeviceUpdate(s+(u?" - ".concat(u):"")),this.listenToPlayerEvents()}},{key:"getAssetName",value:function(e){var t=(this.sessionItem.reporting||{}).assetMetadata,n="";
1return t&&("title"in t?n=t.title:"channelName"in t&&(n=t.channelName)),e?"".concat(e,"-").concat(n):n}},{key:"pinefyUrl",value:function(e,t,n){var r,o="order=".concat(e.getInterceptedReqCount(n.pathname)),i=!!this.ADVERTS_HOSTS.find(function(e){return t.includes(e)});return"".concat((null==(r=e.driver)?void 0:r.getProxyOtherUrl(t,{dropHostHeader:i}))||t,"&").concat(o)}},{key:"getInterceptedReqCount",value:function(e){return this.interceptedUrlsMap[e]||(this.interceptedUrlsMap[e]={order:0}),this.interceptedUrlsMap[e].order++,this.interceptedUrlsMap[e].order}},{key:"shouldPinefy",value:function(e,t,n){return n.hostname!==(null==e?void 0:e.config.trunkHost)&&!!((null==e?void 0:e.config.proxyThirdPartyUrls)&&t.find(function(e){return n.host.includes(e)}))}},{key:"pinefyXHR",value:function(){var e=self.XMLHttpRequest.prototype.open,t=this;self.XMLHttpRequest.prototype.open=function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=r[0],a=r[1],s=new URL(a);if(!t.shouldPinefy(t.pineAddonConfig,t.THIRD_PARTY_HOSTS,s))return e.apply(this,[i,a,!0]);a.includes(t.HEARTBEAT_LAST_REQ_PATHNAME)&&t.internalDestroy(),s.pathname=t.checkAndApplyDynamicPathRegex(s.pathname);var u=t.pinefyUrl(t,a,s);return e.apply(this,[i,u,!0])}}},{key:"pinefyFetch",value:function(){var e=this,t=fetch;self.fetch=function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=new URL(n);return e.shouldPinefy(e.pineAddonConfig,e.THIRD_PARTY_HOSTS,o)?(o.pathname.includes(e.HEARTBEAT_LAST_REQ_PATHNAME)&&e.internalDestroy(),o.pathname=e.checkAndApplyDynamicPathRegex(o.pathname),t(e.pinefyUrl(e,n,o),d({},r))):t(o,d({},r))}}},{key:"exposeIds",value:function(){var e,t,n=this;self.pine={getClientId:function(){return n.pineAddonConfig.config.clientId},getSessionId:function(){var e,t;return null==(t=n.driver)||null==(e=t.getSessionId)?void 0:e.call(t)}},(null==(t=this.pineAddonConfig)||null==(e=t.config)?void 0:e.proxyThirdPartyUrls)&&(this.pinefyFetch(),this.pinefyXHR())}},{key:"checkAndApplyDynamicPathRegex",value:function(e){return e.replace(/\//g,"\\/").replace(RegExp("\\".concat(y),"g"),"([^/]+)")}},{key:"listenToPlayerEvents",value:function(){var e=this;this.session.onStateChanged(function(t){var n,r=e.mapSessionStateToPlayerState(t);r&&(null==(n=e.driver)||n.onPlayerStateUpdate(r))}),this.session.onPlayoutDataReceived(function(t){var n,r,i,a,s,c,f,l=t.assetMetadata,p=t.cdns,d=t.stream,h=d.protocol,y=d.protection,v=null==(n=p[0])?void 0:n.url;v&&(null==(a=e.driver)||a.onCdnUpdate(v),null==(s=e.driver)||s.onPeriodUpdate(o.EPeriod.CONTENT)),null==(r=e.driver)||r.onAssetNameUpdate(e.getAssetName(null==l?void 0:l.assetId)),null==(i=e.driver)||i.onProtocolUpdate(h),y&&(null==(c=e.driver)||c.onProtectionUpdate(y));var b=u.CoreVideoInternal.config.staticConfig.proposition;b&&(null==(f=e.driver)||f.onPropositionUpdate(b))}),this.session.onPlaybackTimelineUpdated(function(t){var n,r,o,i=t.position,a=t.seekableRange;null==(n=e.driver)||n.onPositionUpdate(i),a&&e.sessionItem&&(0,c.f8)(null==(r=e.sessionItem)?void 0:r.type)&&(null==(o=e.driver)||o.onLiveWindowUpdate({startSec:null==a?void 0:a.start,endSec:null==a?void 0:a.end})),e.currentTime=i}),this.session.onBitrateChanged(function(t){var n,r=t.bitrateKbps;null==(n=e.driver)||n.onVideoVariantUpdate(r)}),this.session.onCdnSwitch(function(t){var n;null==(n=e.driver)||n.onCdnUpdate(t.toCdn.url)}),this.session.onTelemetry(function(t){var n,o=t.playerStats,i=t.devicePerformance,a=t.networkConnectionType,s=o||{},u=s.bufferedInfo,c=s.estimatedBandwidth,f=s.manifestParseTimeSeconds;if(c&&(null==(l=e.driver)||l.onEstimatedBandwidthUpdate(c/1e3)),a&&a!==r.Xt.Unknown){var l,p,d=e.mapNetworkConnectionType(a);null==(p=e.driver)||p.onNetworkConnectionTypeUpdate(d)}e.sendBufferInfo(u),f&&f!==e.manifestParseTimeSeconds&&(e.manifestParseTimeSeconds=f,null==(n=e.driver)||n.onEventUpdate({eventName:"manifestParseTime",value:Math.round(1e3*f)})),e.sendPerformance(i)}),this.session.onAdBreakStarted(function(t){var n;null==(n=e.driver)||n.onPeriodUpdate(o.EPeriod.AD)}),this.session.onAdBreakFinished(function(t){var n;null==(n=e.driver)||n.onPeriodUpdate(o.EPeriod.CONTENT)}),this.session.onError(function(t){var n,r=t.severity,o=t.message;null==(n=e.driver)||n.onPlayerErrorUpdate({message:o,isFatal:r===a.MU.Fatal})}),this.logger.verbose("Listen to player events")}},{key:"sendPerformance",value:function(e){if(e){var t,n,r,o,i;e.memory&&e.memory.usage.length>0&&(null==(n=this.driver)||n.onUsedJSHeapSizeUpdate(e.memory.usage[0].value/1e6)),(null==(t=e.memory)?void 0:t.userAgentSpecificMemory)&&(null==(r=this.driver)||r.onUserAgentSpecificMemoryUpdate(Math.round(e.memory.userAgentSpecificMemory/1e6)
1)),e.cpuUsage&&e.cpuUsage.length>0&&(null==(o=this.driver)||o.onCpuUsageUpdate(Math.round(e.cpuUsage[0].value))),e.fps&&e.fps.length>0&&(null==(i=this.driver)||i.onAnimationFrameRateUpdate(Math.round(e.fps[0].value)))}}},{key:"sendBufferInfo",value:function(e){if((null==e?void 0:e.audio)&&e.video&&e.audio.length>0&&e.video.length>0){var t,n,r=e.audio[0].end-this.currentTime;r<0&&(r=0);var o=e.video[0].end-this.currentTime;o<0&&(o=0),null==(t=this.driver)||t.onVideoBufferUpdate(o),null==(n=this.driver)||n.onAudioBufferUpdate(r)}}},{key:"mapSessionStateToPlayerState",value:function(e){switch(e){case i.Xd.PlayerLoading:case i.Xd.Loading:return o.EPlayerState.LOADING;case i.Xd.Seeking:case i.Xd.Rebuffering:case i.Xd.CsaiTransition:return o.EPlayerState.BUFFERING;case i.Xd.Playing:return o.EPlayerState.PLAYING;case i.Xd.Paused:return o.EPlayerState.PAUSED;case i.Xd.Stopped:case i.Xd.Finished:return o.EPlayerState.ENDED;case i.Xd.Initialized:case i.Xd.Stopping:case i.Xd.WaitingForPin:return null}}},{key:"mapNetworkConnectionType",value:function(e){switch(e){case r.Xt.Bluetooth:return o.ENetworkConnectionType.BLUETOOTH;case r.Xt.Cellular:return o.ENetworkConnectionType.CELLULAR;case r.Xt.Ethernet:return o.ENetworkConnectionType.ETHERNET;case r.Xt.Mixed:return o.ENetworkConnectionType.MIXED;case r.Xt.Wifi:return o.ENetworkConnectionType.WIFI;case r.Xt.None:return o.ENetworkConnectionType.NONE;case r.Xt.Other:case r.Xt.Unknown:return o.ENetworkConnectionType.OTHER}}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}()},56523:(e,t,n)=>{var r=n(65364);!function(){"use strict";var e={161:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){var c=[s,u];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var a=i(n(921)),s=i(n(316)),u=i(n(818));t.default=function(e,t,n,i){var c=null;return e.on("actionTrigger",function(e){return r(void 0,void 0,void 0,function(){var r,u;return o(this,function(o){switch(o.label){case 0:if(!c)return[2];o.label=1;case 1:switch(o.trys.push([1,11,,12]),console.log("Executing action ".concat(e.type)),e.type){case a.default.CREATE:return[3,2];case a.default.LOAD:return[3,4];case a.default.DESTROY:case a.default.PAUSE:case a.default.PLAY:return[3,5];case a.default.SEEK:return[3,6];case a.default.SELECT_AUDIO_TRACK:return[3,7];case a.default.SELECT_IMAGE_TRACK:case a.default.SELECT_TEXT_TRACK:return[3,8];case a.default.SELECT_VIDEO_TRACK:return[3,9]}return[3,10];case 2:return[4,c[e.type](e.config)];case 3:return o.sent(),[3,10];case 4:return r=e.manifestUrl,e.manifestUrl=(0,s.default)(t,n,i,r),c[e.type](e.manifestUrl),[3,10];case 5:return c[e.type](),[3,10];case 6:return c[e.type](e.position),[3,10];case 7:case 8:return c[e.type](e.id),[3,10];case 9:return c[e.type](e.bandwidth),[3,10];case 10:return[3,12];case 11:return u=o.sent(),console.error("Error executing action ".concat(e.type),u),[3,12];case 12:return[2]}})})}),{onPlayerMetadataUpdate:function(t){e.emit("onPlayerMetadataUpdate",(0,u.default)(t))},onPositionUpdate:function(t){e.emit("onPositionUpdate",(0,u.default)(t))},onLiveWindowUpdate:function(t){e.emit("onLiveWindowUpdate",(0,u.default)(t))},onPlayerStateUpdate:function(t){e.emit("onPlayerStateUpdate",(0,u.default)(t))},onPeriodUpdate:function(t){e.emit("onPeriodUpdate",(0,u.default)(t))},onCdnUpdate:function(t){e.emit("onCdnUpdate",(0,u.default)(t))},onVideoAbrVariantUpdate:function(t){e.emit("onVideoAbrVariantUpdate",(0,u.default)(t))},onAudioAbrVariantUpdate:function(t){e.emit("onAudioAbrVariantUpdate",(0,u.default)(t))},onVideoVariantUpdate:function(t){e.emit("onVideoVariantUpdate",(0,u.default)(t))},onAudioVariantUpdate:function(t){e.emit("onAudioVariantUpdate",(0,u.default)(t))},onEstimatedBandwidthUpdate:function(t){e.emit("onEstimatedBandwidthUpdate",(0,u.default)(t))},onVideoBufferUpdate:function(t){e.emit("onVideoBufferUpdate",(0,u.default)(t))},onAudioBufferUpdate:function(t){e.emit("onAudioBufferUpdate",(0,u.default)(t))},onUsedJSHeapSizeUpdate:function(t){e.emit("onUsedJSHeapSizeUpdate",(0,u.default)(t))},onUserAgentSpecificMemoryUpdate:function(t){e.emit("onUserAgentSpecificMemoryUpdate",(0,u.default)(t))},onNetworkConnectionTypeUpdate:function(t){e.emit("onNetworkConnectionTypeUpdate",(0,u.default)(t))},onAnimationFrameRateUpdate:function(t){e.emit("onAnimationFrameRateUpdate",(0,u.default)(t))},onRenderedFrameRateUpdate:function(t){e.emit("onRenderedFrameRateUpdate",(0,u.default)(t))},onEncodedFrameRateUpdate:function(t){e.emit("onEncodedFrameRateUpdate",(0,u.default)(t))},onDroppedFrameRateUpdate:function(t){e.emit("onDroppedFrameRateUpdate",(0,u.default)(t))},onCpuUsageUpdate:function(t){e.emit("onCpuUsageUpdate",(0,u.default)(t))},onEventUpdate:function(t){e.emit("onEventUpdate",(0,u.default)(t))},onAudioTrackUpdate:function(t){e.emit("onAudioTrackUpdate",(0,u.default)(t))},onTextTrackUpdate:function(t){e.emit("onTextTrackUpdate",(0,u.default)(t))},onImageTrackUpdate:function(t){e.emit("onImageTrackUpdate",(0,u.default)(t))},onCueUpdate:function(t){e.emit("onCueUpdate",(0,u.default)(t))},onThumbnailUpdate:function(t){e.emit("onThumbnailUpdate",(0,u.default)(t))},onPlayerErrorUpdate:function(t){e.emit("onPlayerErrorUpdate",(0,u.default)(t))},onPlayerLogUpdate:function(t){e.emit("onPlayerLogUpdate",(0,u.default)(t))},onCustomDataUpdate:function(t){e.emit("onCustomDataUpdate",(0,u.default)(t))},onAssetNameUpdate:function(t){e.emit("onAssetNameUpdate",t)},onDeviceUpdate:function(t){e.emit("onDeviceUpdate",t)},onPropositionUpdate:function(t){e.emit("onPropositionUpdate",t)},onProtocolUpdate:function(t){e.emit("onProtocolUpdate",t)},onProtectionUpdate:function(t){e.emit("onProtectionUpdate",t)},registerPlayerConnector:function(t){c=t,e.emit("onPlayerConnectorRegister")},destroy:function(){e.disconnect()},getProxyManifestUrl:function(e){return(0,s.default)(t,n,i,e)},getProxyOtherUrl:function(e,r){var o=encodeURIComponent(e),a="".concat(t,"/other/?clientId=").concat(n,"&sessionId=").concat(i);return(null==r?void 0:r.dropHostHeader)&&(a+="&dropHostHeader=true"),(null==r?void 0:r.noProxy)&&(a+="&noProxy"),"".concat(a,"&url=").concat(o)},getSessionId:function(){return i}}}},48:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esMo
1dule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.pinefy=t.EPlayerState=t.EPeriod=t.ENetworkConnectionType=t.EAction=void 0;var o=n(921);Object.defineProperty(t,"EAction",{enumerable:!0,get:function(){return r(o).default}});var i=n(817);Object.defineProperty(t,"ENetworkConnectionType",{enumerable:!0,get:function(){return r(i).default}});var a=n(842);Object.defineProperty(t,"EPeriod",{enumerable:!0,get:function(){return r(a).default}});var s=n(317);Object.defineProperty(t,"EPlayerState",{enumerable:!0,get:function(){return r(s).default}});var u=n(657);Object.defineProperty(t,"pinefy",{enumerable:!0,get:function(){return r(u).default}})},657:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(161)),i=r(n(753)),a=r(n(596));t.default=function(e,t,n){var r=(0,a.default)(t),s=(0,i.default)(e,r,n);return new Promise(function(t){s.on("rootsConnected",function(n,i){console.log("Roots connected to ".concat(n,", sessionId ").concat(i)),t((0,o.default)(s,r,e,i))})})}},921:function(e,t){var n,r;Object.defineProperty(t,"__esModule",{value:!0}),(r=n||(n={})).CREATE="create",r.DESTROY="destroy",r.LOAD="load",r.PAUSE="pause",r.PLAY="play",r.SEEK="seek",r.SELECT_AUDIO_TRACK="selectAudioTrack",r.SELECT_IMAGE_TRACK="selectImageTrack",r.SELECT_TEXT_TRACK="selectTextTrack",r.SELECT_VIDEO_TRACK="selectVideoTrack",t.default=n},781:function(e,t){var n,r;Object.defineProperty(t,"__esModule",{value:!0}),(r=n||(n={})).DOCKER="host.docker.internal",r.DEFAULT="local.clients.dev.nowtv.com",r.TRUNK="pine-trunk.corevideoteam.sky.com",r.BRANCH="pine-branch.corevideoteam.sky.com",r.SEED="pine-seed.corevideoteam.sky.com",t.default=n},976:function(e,t){var n,r;Object.defineProperty(t,"__esModule",{value:!0}),(r=n||(n={})).BRANCH="branch",r.ROOTS="roots",r.RUNNER="runner",t.default=n},817:function(e,t){var n,r;Object.defineProperty(t,"__esModule",{value:!0}),(r=n||(n={})).BLUETOOTH="bluetooth",r.CELLULAR="cellular",r.ETHERNET="ethernet",r.MIXED="mixed",r.WIFI="wifi",r.NONE="none",r.OTHER="other",t.default=n},842:function(e,t){var n,r;Object.defineProperty(t,"__esModule",{value:!0}),(r=n||(n={})).CONTENT="CONTENT",r.AD="AD",t.default=n},317:function(e,t){var n,r;Object.defineProperty(t,"__esModule",{value:!0}),(r=n||(n={})).LOADING="LOADING",r.BUFFERING="BUFFERING",r.PLAYING="PLAYING",r.PAUSED="PAUSED",r.ENDED="ENDED",t.default=n},220:function(e,t){var n,r;Object.defineProperty(t,"__esModule",{value:!0}),(r=n||(n={}))[r.TRUNK=5002]="TRUNK",r[r.BRANCH=5003]="BRANCH",r[r.SEED=5004]="SEED",t.default=n},753:function(e,t,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(257),a=o(n(976));t.default=function(e,t,n){return(0,i.io)("".concat(t,"/").concat(a.default.ROOTS),r({secure:!0,query:{clientId:e}},n?{transports:["polling"],withCredentials:!1,upgrade:!1}:{}))}},139:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return new URL(e).pathname.split(".").pop()}},316:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(139));t.default=function(e,t,n,r){var i="".concat(e,"/manifest/pine.").concat((0,o.default)(r),"?clientId=").concat(t,"&sessionId=").concat(n),a=encodeURIComponent(r);return"".concat(i,"&url=").concat(a)}},596:function(e,t,n){var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=o(n(781)),a=o(n(220));t.default=function(e){var t=r.env&&r.env.PINE_DEFAULT_HOST?r.env.PINE_DEFAULT_HOST:i.default.DEFAULT,n=e===i.default.TRUNK?"":":".concat(a.default.TRUNK);return"https://".concat(e||t).concat(n)}}
1,818:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{value:e,epochMs:Date.now()}}},682:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.hasCORS=void 0;var n=!1;try{n="u">typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(e){}t.hasCORS=n},41:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,o=n.length;r<o;r++){var i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}},235:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parse=function(e){if(e.length>8e3)throw"URI too long";var t=e,o=e.indexOf("["),i=e.indexOf("]");-1!=o&&-1!=i&&(e=e.substring(0,o)+e.substring(o,i).replace(/:/g,";")+e.substring(i,e.length));for(var a,s,u,c,f=n.exec(e||""),l={},p=14;p--;)l[r[p]]=f[p]||"";return -1!=o&&-1!=i&&(l.source=t,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),c=(u=l.path).replace(/\/{2,9}/g,"/").split("/"),"/"!=u.slice(0,1)&&0!==u.length||c.splice(0,1),"/"==u.slice(-1)&&c.splice(c.length-1,1),l.pathNames=c,a=l.query,s={},a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,n){t&&(s[t]=n)}),l.queryKey=s,l};var n=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]},556:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultBinaryType=t.globalThisShim=t.nextTick=void 0,t.createCookieJar=function(){},t.nextTick="function"==typeof Promise&&"function"==typeof Promise.resolve?function(e){return Promise.resolve().then(e)}:function(e,t){return t(e,0)},t.globalThisShim="u">typeof self?self:"u">typeof window?window:Function("return this")(),t.defaultBinaryType="arraybuffer"},0:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.WebTransport=t.WebSocket=t.NodeWebSocket=t.XHR=t.NodeXHR=t.Fetch=t.nextTick=t.parse=t.installTimerFunctions=t.transports=t.TransportError=t.Transport=t.protocol=t.SocketWithUpgrade=t.SocketWithoutUpgrade=t.Socket=void 0;var r=n(507);Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return r.Socket}});var o=n(507);Object.defineProperty(t,"SocketWithoutUpgrade",{enumerable:!0,get:function(){return o.SocketWithoutUpgrade}}),Object.defineProperty(t,"SocketWithUpgrade",{enumerable:!0,get:function(){return o.SocketWithUpgrade}}),t.protocol=r.Socket.protocol;var i=n(85);Object.defineProperty(t,"Transport",{enumerable:!0,get:function(){return i.Transport}}),Object.defineProperty(t,"TransportError",{enumerable:!0,get:function(){return i.TransportError}});var a=n(223);Object.defineProperty(t,"transports",{enumerable:!0,get:function(){return a.transports}});var s=n(562);Object.defineProperty(t,"installTimerFunctions",{enumerable:!0,get:function(){return s.installTimerFunctions}});var u=n(235);Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return u.parse}});var c=n(556);Object.defineProperty(t,"nextTick",{enumerable:!0,get:function(){return c.nextTick}});var f=n(669);Object.defineProperty(t,"Fetch",{enumerable:!0,get:function(){return f.Fetch}});var l=n(395);Object.defineProperty(t,"NodeXHR",{enumerable:!0,get:function(){return l.XHR}});var p=n(395);Object.defineProperty(t,"XHR",{enumerable:!0,get:function(){return p.XHR}});var d=n(667);Object.defineProperty(t,"NodeWebSocket",{enumerable:!0,get:function(){return d.WS}});var h=n(667);Object.defineProperty(t,"WebSocket",{enumerable:!0,get:function(){return h.WS}});var y=n(852);Object.defineProperty(t,"WebTransport",{enumerable:!0,get:function(){return y.WT}})},507:function(e,t,n){function r(e,t,n,r){var i=o(p(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function o(){return(o="u">typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!({}).hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(null,arguments)}function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}(r.key),r)}}
1function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t,n){return t=p(t),function(e,t){if(t&&("object"==a(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e,l()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}this&&this.__importDefault,Object.defineProperty(t,"__esModule",{value:!0}),t.Socket=t.SocketWithUpgrade=t.SocketWithoutUpgrade=void 0;var y=n(223),v=n(562),b=n(41),m=n(235),g=n(91),_=n(683),k=n(556),O="function"==typeof addEventListener&&"function"==typeof removeEventListener,P=[];O&&addEventListener("offline",function(){P.forEach(function(e){return e()})},!1);var T=function(e){function t(e,n){var r;if(s(this,t),(r=f(this,t)).binaryType=k.defaultBinaryType,r.writeBuffer=[],r._prevBufferLen=0,r._pingInterval=-1,r._pingTimeout=-1,r._maxPayload=-1,r._pingTimeoutTime=1/0,e&&"object"===a(e)&&(n=e,e=null),e){var o=(0,m.parse)(e);n.hostname=o.host,n.secure="https"===o.protocol||"wss"===o.protocol,n.port=o.port,o.query&&(n.query=o.query)}else n.host&&(n.hostname=(0,m.parse)(n.host).host);return(0,v.installTimerFunctions)(r,n),r.secure=null!=n.secure?n.secure:"u">typeof location&&"https:"===location.protocol,n.hostname&&!n.port&&(n.port=r.secure?"443":"80"),r.hostname=n.hostname||("u">typeof location?location.hostname:"localhost"),r.port=n.port||("u">typeof location&&location.port?location.port:r.secure?"443":"80"),r.transports=[],r._transportsByName={},n.transports.forEach(function(e){var t=e.prototype.name;r.transports.push(t),r._transportsByName[t]=e}),r.opts=i({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),r.opts.path=r.opts.path.replace(/\/$/,"")+(r.opts.addTrailingSlash?"/":""),"string"==typeof r.opts.query&&(r.opts.query=(0,b.decode)(r.opts.query)),O&&(r.opts.closeOnBeforeunload&&(r._beforeunloadEventListener=function(){r.transport&&(r.transport.removeAllListeners(),r.transport.close())},addEventListener("beforeunload",r._beforeunloadEventListener,!1)),"localhost"!==r.hostname&&(r._offlineEventListener=function(){r._onClose("transport close",{description:"network connection lost"})},P.push(r._offlineEventListener))),r.opts.withCredentials&&(r._cookieJar=(0,k.createCookieJar)()),r._open(),r}
1return d(t,e),c(t,[{key:"createTransport",value:function(e){var t=i({},this.opts.query);t.EIO=_.protocol,t.transport=e,this.id&&(t.sid=this.id);var n=i({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}},{key:"_open",value:function(){var e=this;if(0!==this.transports.length){var n=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";var r=this.createTransport(n);r.open(),this.setTransport(r)}else this.setTimeoutFn(function(){e.emitReserved("error","No transports available")},0)}},{key:"setTransport",value:function(e){var t=this;this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",function(e){return t._onClose("transport close",e)})}},{key:"onOpen",value:function(){this.readyState="open",t.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}},{key:"_onPacket",value:function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":var t=Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}},{key:"onHandshake",value:function(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}},{key:"_resetPingTimeout",value:function(){var e=this;this.clearTimeoutFn(this._pingTimeoutTimer);var t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(function(){e._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}},{key:"_onDrain",value:function(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}},{key:"flush",value:function(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){var e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}},{key:"_getWritablePackets",value:function(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;for(var e=1,t=0;t<this.writeBuffer.length;t++){var n=this.writeBuffer[t].data;if(n&&(e+=(0,v.byteLength)(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}},{key:"_hasPingExpired",value:function(){var e=this;if(!this._pingTimeoutTime)return!0;var t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,(0,k.nextTick)(function(){e._onClose("ping timeout")},this.setTimeoutFn)),t}},{key:"write",value:function(e,t,n){return this._sendPacket("message",e,t,n),this}},{key:"send",value:function(e,t,n){return this._sendPacket("message",e,t,n),this}},{key:"_sendPacket",value:function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var o={type:e,data:t,options:n};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),r&&this.once("flush",r),this.flush()}}},{key:"close",value:function(){var e=this,t=function(){e._onClose("forced close"),e.transport.close()},n=function(){e.off("upgrade",n),e.off("upgradeError",n),t()},r=function(){e.once("upgrade",n),e.once("upgradeError",n)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",function(){e.upgrading?r():t()}):this.upgrading?r():t()),this}},{key:"_onError",value:function(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}},{key:"_onClose",value:function(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),O&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){var n=P.indexOf(this._offlineEventListener);-1!==n&&P.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}])}(g.Emitter);t.SocketWithoutUpgrade=T,T.protocol=_.protocol;var E=function(e){function t(){var e;return s(this,t),(e=f(this,t,arguments))._upgrades=[],e}
1return d(t,e),c(t,[{key:"onOpen",value:function(){if(r(t,"onOpen",this,3)([]),"open"===this.readyState&&this.opts.upgrade)for(var e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}},{key:"_probe",value:function(e){var t=this,n=this.createTransport(e),r=!1;T.priorWebsocketSuccess=!1;var o=function(){r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",function(e){if(!r)if("pong"===e.type&&"probe"===e.data){if(t.upgrading=!0,t.emitReserved("upgrading",n),!n)return;T.priorWebsocketSuccess="websocket"===n.name,t.transport.pause(function(){r||"closed"!==t.readyState&&(f(),t.setTransport(n),n.send([{type:"upgrade"}]),t.emitReserved("upgrade",n),n=null,t.upgrading=!1,t.flush())})}else{var o=Error("probe error");o.transport=n.name,t.emitReserved("upgradeError",o)}}))};function i(){r||(r=!0,f(),n.close(),n=null)}var a=function(e){var r=Error("probe error: "+e);r.transport=n.name,i(),t.emitReserved("upgradeError",r)};function s(){a("transport closed")}function u(){a("socket closed")}function c(e){n&&e.name!==n.name&&i()}var f=function(){n.removeListener("open",o),n.removeListener("error",a),n.removeListener("close",s
1),t.off("close",u),t.off("upgrading",c)};n.once("open",o),n.once("error",a),n.once("close",s),this.once("close",u),this.once("upgrading",c),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(function(){r||n.open()},200):n.open()}},{key:"onHandshake",value:function(e){this._upgrades=this._filterUpgrades(e.upgrades),r(t,"onHandshake",this,3)([e])}},{key:"_filterUpgrades",value:function(e){for(var t=[],n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}}])}(T);t.SocketWithUpgrade=E,t.Socket=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s(this,t);var r="object"===a(e)?e:n;return(!r.transports||r.transports&&"string"==typeof r.transports[0])&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(function(e){return y.transports[e]}).filter(function(e){return!!e})),f(this,t,[e,r])}return d(t,e),c(t)}(E)},85:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t,n,r){var o=i(h(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function i(){return(i="u">typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!({}).hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(null,arguments)}function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,function(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}(o.key),o)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function c(e,t,n){return t=h(t),function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e,p()?Reflect.construct(t,n||[],h(e).constructor):t.apply(e,n))}function f(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function l(e){var t="function"==typeof Map?new Map:void 0;return(l=function(e){if(null===e||!function(e){try{return -1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(p())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&d(o,n.prototype),o}(e,arguments,h(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),d(n,e)})(e)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}function d(e,t){return(d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}this&&this.__importDefault,Object.defineProperty(t,"__esModule",{value:!0}),t.Transport=t.TransportError=void 0;var y=n(683),v=n(91),b=n(562),m=n(41),g=function(e){function t(e,n,r){var o;return u(this,t),(o=c(this,t,[e])).description=n,o.context=r,o.type="TransportError",o}return f(t,e),s(t)}(l(Error));t.TransportError=g,t.Transport=function(e){function t(e){var n;return u(this,t),(n=c(this,t)).writable=!1,(0,b.installTimerFunctions)(n,e),n.opts=e,n.query=e.query,n.socket=e.socket,n.supportsBinary=!e.forceBase64,n}return f(t,e),s(t,[{key:"onError",value:function(e,n,r){return o(t,"emitReserved",this,3)(["error",new g(e,n,r)]),this}},{key:"open",value:function(){return this.readyState="opening",this.doOpen(),this}},{key:"close",value:function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}},{key:"send",value:function(e){"open"===this.readyState&&this.write(e)}},{key:"onOpen",value:function(){this.readyState="open",this.writable=!0,o(t,"emitReserved",this,3)(["open"])}},{key:"onData",value:function(e){var t=(0,y.decodePacket)(e,this.socket.b
1inaryType);this.onPacket(t)}},{key:"onPacket",value:function(e){o(t,"emitReserved",this,3)(["packet",e])}},{key:"onClose",value:function(e){this.readyState="closed",o(t,"emitReserved",this,3)(["close",e])}},{key:"pause",value:function(e){}},{key:"createUri",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}},{key:"_hostname",value:function(){var e=this.opts.hostname;return -1===e.indexOf(":")?e:"["+e+"]"}},{key:"_port",value:function(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}},{key:"_query",value:function(e){var t=(0,m.encode)(e);return t.length?"?"+t:""}}])}(v.Emitter)},223:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.transports=void 0;var r=n(395),o=n(667),i=n(852);t.transports={websocket:o.WS,webtransport:i.WT,polling:r.XHR}},669:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(o=function(){return!!e})()}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.Fetch=void 0,t.Fetch=function(e){var t;function n(){var e,t;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),e=n,t=arguments,e=i(e),function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,o()?Reflect.construct(e,t||[],i(this).constructor):e.apply(this,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(n,e),t=[{key:"doPoll",value:function(){var e=this;this._fetch().then(function(t){if(!t.ok)return e.onError("fetch read error",t.status,t);t.text().then(function(t){return e.onData(t)})}).catch(function(t){e.onError("fetch read error",t)})}},{key:"doWrite",value:function(e,t){var n=this;this._fetch(e).then(function(e){if(!e.ok)return n.onError("fetch write error",e.status,e);t()}).catch(function(e){n.onError("fetch write error",e)})}},{key:"_fetch",value:function(e){var t,n=this,r=void 0!==e,o=new Headers(this.opts.extraHeaders);return r&&o.set("content-type","text/plain;charset=UTF-8"),null==(t=this.socket._cookieJar)||t.appendCookies(o),fetch(this.uri(),{method:r?"POST":"GET",body:r?e:null,headers:o,credentials:this.opts.withCredentials?"include":"omit"}).then(function(e){var t;return null==(t=n.socket._cookieJar)||t.parseCookies(e.headers.getSetCookie()),e})}}],function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,function(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}(o.key),o)}}(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(n(772).Polling)},395:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function i(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,function(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}(o.key),o)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t,n){return t=f(t),function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e,c()?Reflect.construct(t,n||[],f(e).constructor):t.apply(e,n))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(c=function(){return!!e})()}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function l(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}
1function p(e,t){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}this&&this.__importDefault,Object.defineProperty(t,"__esModule",{value:!0}),t.XHR=t.Request=t.BaseXHR=void 0;var d=n(772),h=n(91),y=n(562),v=n(556),b=n(682);function m(){}var g=function(e){function t(e){var n;if(i(this,t),n=u(this,t,[e]),"u">typeof location){var r="https:"===location.protocol,o=location.port;o||(o=r?"443":"80"),n.xd="u">typeof location&&e.hostname!==location.hostname||o!==e.port}return n}return l(t,e),s(t,[{key:"doWrite",value:function(e,t){var n=this,r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",function(e,t){n.onError("xhr post error",e,t)})}},{key:"doPoll",value:function(){var e=this,t=this.request();t.on("data",this.onData.bind(this)),t.on("error",function(t,n){e.onError("xhr poll error",t,n)}),this.pollXhr=t}}])}(d.Polling);t.BaseXHR=g;var _=function(e){function t(e,n,r){var o;return i(this,t),(o=u(this,t)).createRequest=e,(0,y.installTimerFunctions)(o,r),o._opts=r,o._method=r.method||"GET",o._uri=n,o._data=void 0!==r.data?r.data:null,o._create(),o}return l(t,e),s(t,[{key:"_create",value:function(){var e,n=this,r=(0,y.pick)(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;var o=this._xhr=this.createRequest(r);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders)for(var i in o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0),this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&o.setRequestHeader(i,this._opts.extraHeaders[i])}catch(e){}if("POST"===this._method)try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{o.setRequestHeader("Accept","*/*")}catch(e){}null==(e=this._opts.cookieJar)||e.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=function(){var e;3===o.readyState&&(null==(e=n._opts.cookieJar)||e.parseCookies(o.getResponseHeader("set-cookie"))),4===o.readyState&&(200===o.status||1223===o.status?n._onLoad():n.setTimeoutFn(function(){n._onError("number"==typeof o.status?o.status:0)},0))},o.send(this._data)}catch(e){return void this.setTimeoutFn(function(){n._onError(e)},0)}"u">typeof document&&(this._index=t.requestsCount++,t.requests[this._index]=this)}},{key:"_onError",value:function(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}},{key:"_cleanup",value:function(e){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=m,e)try{this._xhr.abort()}catch(e){}"u">typeof document&&delete t.requests[this._index],this._xhr=null}}},{key:"_onLoad",value:function(){var e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}},{key:"abort",value:function(){this._cleanup()}}])}(h.Emitter);function k(){for(var e in _.requests)_.requests.hasOwnProperty(e)&&_.requests[e].abort()}t.Request=_,_.requestsCount=0,_.requests={},"u">typeof document&&("function"==typeof attachEvent?attachEvent("onunload",k):"function"==typeof addEventListener&&addEventListener("onpagehide"in v.globalThisShim?"pagehide":"unload",k,!1));var O,P=(O=T({xdomain:!1}))&&null!==O.responseType;function T(e){var t=e.xdomain;try{if("u">typeof XMLHttpRequest&&(!t||b.hasCORS))return new XMLHttpRequest}catch(e){}if(!t)try{return new v.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(e){}}t.XHR=function(e){function t(e){i(this,t),n=u(this,t,[e]);var n,r=e&&e.forceBase64;return n.supportsBinary=P&&!r,n}return l(t,e),s(t,[{key:"request",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o(e,{xd:this.xd},this.opts),new _(T,this.uri(),e)}}])}(g)},772:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(o=function(){return!!e})()}
1function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}this&&this.__importDefault,Object.defineProperty(t,"__esModule",{value:!0}),t.Polling=void 0;var s=n(85),u=n(562),c=n(683);t.Polling=function(e){var t;function n(){var e,t,a;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),(t=n,a=arguments,t=i(t),e=function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,o()?Reflect.construct(t,a||[],i(this).constructor):t.apply(this,a)))._polling=!1,e}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(n,e),t=[{key:"name",get:function(){return"polling"}},{key:"doOpen",value:function(){this._poll()}},{key:"pause",value:function(e){var t=this;this.readyState="pausing";var n=function(){t.readyState="paused",e()};if(this._polling||!this.writable){var r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}},{key:"_poll",value:function(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}},{key:"onData",value:function(e){var t=this;(0,c.decodePayload)(e,this.socket.binaryType).forEach(function(e){if("opening"===t.readyState&&"open"===e.type&&t.onOpen(),"close"===e.type)return t.onClose({description:"transport closed by the server"}),!1;t.onPacket(e)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}},{key:"doClose",value:function(){var e=this,t=function(){e.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}},{key:"write",value:function(e){var t=this;this.writable=!1,(0,c.encodePayload)(e,function(e){t.doWrite(e,function(){t.writable=!0,t.emitReserved("drain")})})}},{key:"uri",value:function(){var e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=(0,u.randomString)()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}],function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,function(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}(o.key),o)}}(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}
1(s.Transport)},667:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,function(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}(o.key),o)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t,n){return t=c(t),function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e,u()?Reflect.construct(t,n||[],c(e).constructor):t.apply(e,n))}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}function l(e,t){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}this&&this.__importDefault,Object.defineProperty(t,"__esModule",{value:!0}),t.WS=t.BaseWS=void 0;var p=n(85),d=n(562),h=n(683),y=n(556),v="u">typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),b=function(e){function t(){return o(this,t),s(this,t,arguments)}return f(t,e),a(t,[{key:"name",get:function(){return"websocket"}},{key:"doOpen",value:function(){var e=this.uri(),t=this.opts.protocols,n=v?{}:(0,d.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}},{key:"addEventListeners",value:function(){var e=this;this.ws.onopen=function(){e.opts.autoUnref&&e.ws._socket.unref(),e.onOpen()},this.ws.onclose=function(t){return e.onClose({description:"websocket connection closed",context:t})},this.ws.onmessage=function(t){return e.onData(t.data)},this.ws.onerror=function(t){return e.onError("websocket error",t)}}},{key:"write",value:function(e){var t=this;this.writable=!1;for(var n=0;n<e.length;n++)!function(){var r=e[n],o=n===e.length-1;(0,h.encodePacket)(r,t.supportsBinary,function(e){try{t.doWrite(r,e)}catch(e){}o&&(0,y.nextTick)(function(){t.writable=!0,t.emitReserved("drain")},t.setTimeoutFn)})}()}},{key:"doClose",value:function(){void 0!==this.ws&&(this.ws.onerror=function(){},this.ws.close(),this.ws=null)}},{key:"uri",value:function(){var e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=(0,d.randomString)()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}])}(p.Transport);t.BaseWS=b;var m=y.globalThisShim.WebSocket||y.globalThisShim.MozWebSocket;t.WS=function(e){function t(){return o(this,t),s(this,t,arguments)}return f(t,e),a(t,[{key:"createSocket",value:function(e,t,n){return v?new m(e,t,n):t?new m(e,t):new m(e)}},{key:"doWrite",value:function(e,t){this.ws.send(t)}}])}(b)},852:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(o=function(){return!!e})()}
1function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}this&&this.__importDefault,Object.defineProperty(t,"__esModule",{value:!0}),t.WT=void 0;var s=n(85),u=n(556),c=n(683);t.WT=function(e){var t;function n(){var e,t;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),e=n,t=arguments,e=i(e),function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,o()?Reflect.construct(e,t||[],i(this).constructor):e.apply(this,t))}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(n,e),t=[{key:"name",get:function(){return"webtransport"}},{key:"doOpen",value:function(){var e=this;try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(function(){e.onClose()}).catch(function(t){e.onError("webtransport error",t)}),this._transport.ready.then(function(){e._transport.createBidirectionalStream().then(function(t){var n=(0,c.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,e.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=(0,c.createPacketEncoderStream)();o.readable.pipeTo(t.writable),e._writer=o.writable.getWriter();var i=function(){r.read().then(function(t){var n=t.done,r=t.value;n||(e.onPacket(r),i())}).catch(function(e){})};i();var a={type:"open"};e.query.sid&&(a.data='{"sid":"'.concat(e.query.sid,'"}')),e._writer.write(a).then(function(){return e.onOpen()})})})}},{key:"write",value:function(e){var t=this;this.writable=!1;for(var n=0;n<e.length;n++)!function(){var r=e[n],o=n===e.length-1;t._writer.write(r).then(function(){o&&(0,u.nextTick)(function(){t.writable=!0,t.emitReserved("drain")},t.setTimeoutFn)})}()}},{key:"doClose",value:function(){var e;null==(e=this._transport)||e.close()}}],function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,function(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}(o.key),o)}}(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}
1(s.Transport)},562:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.pick=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce(function(t,n){return e.hasOwnProperty(n)&&(t[n]=e[n]),t},{})},t.installTimerFunctions=function(e,t){t.useNativeTimers?(e.setTimeoutFn=o.bind(r.globalThisShim),e.clearTimeoutFn=i.bind(r.globalThisShim)):(e.setTimeoutFn=r.globalThisShim.setTimeout.bind(r.globalThisShim),e.clearTimeoutFn=r.globalThisShim.clearTimeout.bind(r.globalThisShim))},t.byteLength=function(e){return"string"==typeof e?function(e){for(var t=0,n=0,r=0,o=e.length;r<o;r++)(t=e.charCodeAt(r))<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(e):Math.ceil((e.byteLength||e.size)*a)},t.randomString=function(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)};var r=n(556),o=r.globalThisShim.setTimeout,i=r.globalThisShim.clearTimeout,a=1.33},609:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ERROR_PACKET=t.PACKET_TYPES_REVERSE=t.PACKET_TYPES=void 0;var n=Object.create(null);t.PACKET_TYPES=n,n.open="0",n.close="1",n.ping="2",n.pong="3",n.message="4",n.upgrade="5",n.noop="6";var r=Object.create(null);t.PACKET_TYPES_REVERSE=r,Object.keys(n).forEach(function(e){r[n[e]]=e}),t.ERROR_PACKET={type:"error",data:"parser error"}},628:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.decode=t.encode=void 0;for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="u"<typeof Uint8Array?[]:new Uint8Array(256),o=0;o<64;o++)r[n.charCodeAt(o)]=o;t.encode=function(e){var t,r=new Uint8Array(e),o=r.length,i="";for(t=0;t<o;t+=3)i+=n[r[t]>>2],i+=n[(3&r[t])<<4|r[t+1]>>4],i+=n[(15&r[t+1])<<2|r[t+2]>>6],i+=n[63&r[t+2]];return o%3==2?i=i.substring(0,i.length-1)+"=":o%3==1&&(i=i.substring(0,i.length-2)+"=="),i},t.decode=function(e){var t,n,o,i,a,s=.75*e.length,u=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var f=new ArrayBuffer(s),l=new Uint8Array(f);for(t=0;t<u;t+=4)n=r[e.charCodeAt(t)],o=r[e.charCodeAt(t+1)],i=r[e.charCodeAt(t+2)],a=r[e.charCodeAt(t+3)],l[c++]=n<<2|o>>4,l[c++]=(15&o)<<4|i>>2,l[c++]=(3&i)<<6|63&a;return f}},152:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.decodePacket=void 0;var r=n(609),o=n(628),i="function"==typeof ArrayBuffer;t.decodePacket=function(e,t){if("string"!=typeof e)return{type:"message",data:s(e,t)};var n=e.charAt(0);return"b"===n?{type:"message",data:a(e.substring(1),t)}:r.PACKET_TYPES_REVERSE[n]?e.length>1?{type:r.PACKET_TYPES_REVERSE[n],data:e.substring(1)}:{type:r.PACKET_TYPES_REVERSE[n]}:r.ERROR_PACKET};var a=function(e,t){return i?s((0,o.decode)(e),t):{base64:!0,data:e}},s=function(e,t){return"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer}},771:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.encodePacket=void 0,t.encodePacketToBinary=function(e,t){return o&&e.data instanceof Blob?e.data.arrayBuffer().then(f).then(t):i&&(e.data instanceof ArrayBuffer||a(e.data))?t(f(e.data)):void s(e,!1,function(e){u||(u=new TextEncoder),t(u.encode(e))})};var r=n(609),o="function"==typeof Blob||"u">typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),i="function"==typeof ArrayBuffer,a=function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},s=function(e,t,n){var s=e.type,u=e.data;return o&&u instanceof Blob?t?n(u):c(u,n):i&&(u instanceof ArrayBuffer||a(u))?t?n(u):c(new Blob([u]),n):n(r.PACKET_TYPES[s]+(u||""))};t.encodePacket=s;var u,c=function(e,t){var n=new FileReader;return n.onload=function(){t("b"+(n.result.split(",")[1]||""))},n.readAsDataURL(e)};function f(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}},683:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.decodePayload=t.decodePacket=t.encodePayload=t.encodePacket=t.protocol=void 0,t.createPacketEncoderStream=function(){return new TransformStream({transform:function(e,t){(0,r.encodePacketToBinary)(e,function(n){var r,o=n.length;if(o<126)new DataView((r=new Uint8Array(1)).buffer).setUint8(0,o);else if(o<65536){var i=new DataView((r=new Uint8Array(3)).buffer);i.setUint8(0,126),i.setUint16(1,o)}else{var a=new DataView((r=new Uint8Array(9)).buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(o))}e.data&&"string"!=typeof e.data&&(r[0]|=128),t.enqueue(r),t.enqueue(n)})}})},t.createPacketDecoderStream=function(e,t){i||(i=new TextDecoder);var n=[],r=0,c=-1,f=!1;return new TransformStream({transform:function(l,p){for(n.push(l);;){if(0===r){if(1>s(n))break;var d=u(n,1);f=!(128&~d[0]),r=(c=127&d[0])<126?3:126===c?1:2}else if(1===r){if(2>s(n))break;var h=u(n,2);
1c=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),r=3}else if(2===r){if(8>s(n))break;var y=u(n,8),v=new DataView(y.buffer,y.byteOffset,y.length),b=v.getUint32(0);if(b>2097151){p.enqueue(a.ERROR_PACKET);break}c=0x100000000*b+v.getUint32(4),r=3}else{if(s(n)<c)break;var m=u(n,c);p.enqueue((0,o.decodePacket)(f?m:i.decode(m),t)),r=0}if(0===c||c>e){p.enqueue(a.ERROR_PACKET);break}}}})};var r=n(771);Object.defineProperty(t,"encodePacket",{enumerable:!0,get:function(){return r.encodePacket}});var o=n(152);Object.defineProperty(t,"decodePacket",{enumerable:!0,get:function(){return o.decodePacket}});var i,a=n(609);function s(e){return e.reduce(function(e,t){return e+t.length},0)}function u(e,t){if(e[0].length===t)return e.shift();for(var n=new Uint8Array(t),r=0,o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}t.encodePayload=function(e,t){var n=e.length,o=Array(n),i=0;e.forEach(function(e,a){(0,r.encodePacket)(e,!1,function(e){o[a]=e,++i===n&&t(o.join("\x1e"))})})},t.decodePayload=function(e,t){for(var n=e.split("\x1e"),r=[],i=0;i<n.length;i++){var a=(0,o.decodePacket)(n[i],t);if(r.push(a),"error"===a.type)break}return r},t.protocol=4},813:function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Object.defineProperty(t,"__esModule",{value:!0}),t.Backoff=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+n:e-n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},257:function(e,t,n){function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}this&&this.__importDefault,Object.defineProperty(t,"__esModule",{value:!0}),t.WebTransport=t.WebSocket=t.NodeWebSocket=t.XHR=t.NodeXHR=t.Fetch=t.Socket=t.Manager=t.protocol=void 0,t.io=c,t.connect=c,t.default=c;var i=n(808),a=n(546);Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return a.Manager}});var s=n(584);Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return s.Socket}});var u={};function c(e,t){"object"===o(e)&&(t=e,e=void 0),t=t||{};var n,r=(0,i.url)(e,t.path||"/socket.io"),s=r.source,c=r.id,f=r.path,l=u[c]&&f in u[c].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||l?n=new a.Manager(s,t):(u[c]||(u[c]=new a.Manager(s,t)),n=u[c]),r.query&&!t.query&&(t.query=r.queryKey),n.socket(r.path,t)}r(c,{Manager:a.Manager,Socket:s.Socket,io:c,connect:c});var f=n(933);Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return f.protocol}});var l=n(0);Object.defineProperty(t,"Fetch",{enumerable:!0,get:function(){return l.Fetch}}),Object.defineProperty(t,"NodeXHR",{enumerable:!0,get:function(){return l.NodeXHR}}),Object.defineProperty(t,"XHR",{enumerable:!0,get:function(){return l.XHR}}),Object.defineProperty(t,"NodeWebSocket",{enumerable:!0,get:function(){return l.NodeWebSocket}}),Object.defineProperty(t,"WebSocket",{enumerable:!0,get:function(){return l.WebSocket}}),Object.defineProperty(t,"WebTransport",{enumerable:!0,get:function(){return l.WebTransport}}),e.exports=c},546:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(o=function(){return!!e})()}
1function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var s=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),u=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return u(t,e),t};this&&this.__importDefault,Object.defineProperty(t,"__esModule",{value:!0}),t.Manager=void 0;var f=n(0),l=n(584),p=c(n(933)),d=n(848),h=n(813);t.Manager=function(e){var t;function n(e,t){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),(a=i(a=n),s=function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,o()?Reflect.construct(a,[],i(this).constructor):a.apply(this,void 0))).nsps={},s.subs=[],e&&"object"===r(e)&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",s.opts=t,(0,f.installTimerFunctions)(s,t),s.reconnection(!1!==t.reconnection),s.reconnectionAttempts(t.reconnectionAttempts||1/0),s.reconnectionDelay(t.reconnectionDelay||1e3),s.reconnectionDelayMax(t.reconnectionDelayMax||5e3),s.randomizationFactor(null!=(u=t.randomizationFactor)?u:.5),s.backoff=new h.Backoff({min:s.reconnectionDelay(),max:s.reconnectionDelayMax(),jitter:s.randomizationFactor()}),s.timeout(null==t.timeout?2e4:t.timeout),s._readyState="closed",s.uri=e;var a,s,u,c=t.parser||p;return s.encoder=new c.Encoder,s.decoder=new c.Decoder,s._autoConnect=!1!==t.autoConnect,s._autoConnect&&s.open(),s}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(n,e),t=[{key:"reconnection",value:function(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}},{key:"reconnectionAttempts",value:function(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}},{key:"reconnectionDelay",value:function(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null==(t=this.backoff)||t.setMin(e),this)}},{key:"randomizationFactor",value:function(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null==(t=this.backoff)||t.setJitter(e),this)}},{key:"reconnectionDelayMax",value:function(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null==(t=this.backoff)||t.setMax(e),this)}},{key:"timeout",value:function(e){return arguments.length?(this._timeout=e,this):this._timeout}},{key:"maybeReconnectOnOpen",value:function(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}},{key:"open",value:function(e){var t=this;if(~this._readyState.indexOf("open"))return this;this.engine=new f.Socket(this.uri,this.opts);var n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;var o=(0,d.on)(n,"open",function(){r.onopen(),e&&e()}),i=function(n){t.cleanup(),t._readyState="closed",t.emitReserved("error",n),e?e(n):t.maybeReconnectOnOpen()},a=(0,d.on)(n,"error",i);if(!1!==this._timeout){var s=this._timeout,u=this.setTimeoutFn(function(){o(),i(Error("timeout")),n.close()},s);this.opts.autoUnref&&u.unref(),this.subs.push(function(){t.clearTimeoutFn(u)})}return this.subs.push(o),this.subs.push(a),this}},{key:"connect",value:function(e){return this.open(e)}},{key:"onopen",value:function(){this.cleanup(),this._readyState="open",this.emitReserved("open");var e=this.engine;this.subs.push((0,d.on)(e,"ping",this.onping.bind(this)),(0,d.on)(e,"data",this.ondata.bind(this)),(0,d.on)(e,"error",this.onerror.bind(this)),(0,d.on)(e,"close",this.onclose.bind(this)),(0,d.on)(this.decoder,"decoded",this.ondecoded.bind(this)))}},{key:"onping",value:function(){this.emitReserved("ping")}},{key:"ondata",value:function(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}},{key:"ondecoded",value:function(e){var t=this;(0,f.nextTick)(function(){t.emitReserved("packet",e)},this.setTimeoutFn)}},{key:"onerror",value:function(e){this.emitReserved("error",e)}},{key:"socket",value:function(e,t){var n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new l.Socket(this,e,t),this.nsps[e]=n),n}},{key:"_destroy",value:function(e){for(var t=0,n=Object.keys(this.nsps);t<n.length;t++){var r=n[t];if(this.nsps[r].active)return}this._close()}},{key:"_packet",value:function(e){for(var t=this.encoder.encode(e),n=0;n<t.length;
1n++)this.engine.write(t[n],e.options)}},{key:"cleanup",value:function(){this.subs.forEach(function(e){return e()}),this.subs.length=0,this.decoder.destroy()}},{key:"_close",value:function(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}},{key:"disconnect",value:function(){return this._close()}},{key:"onclose",value:function(e,t){var n;this.cleanup(),null==(n=this.engine)||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}},{key:"reconnect",value:function(){var e=this;if(this._reconnecting||this.skipReconnect)return this;var t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{var n=this.backoff.duration();this._reconnecting=!0;var r=this.setTimeoutFn(function(){t.skipReconnect||(e.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open(function(n){n?(t._reconnecting=!1,t.reconnect(),e.emitReserved("reconnect_error",n)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){e.clearTimeoutFn(r)})}}},{key:"onreconnect",value:function(){var e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}],function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,function(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}(o.key),o)}}(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(n(91).Emitter)},848:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.on=function(e,t,n){return e.on(t,n),function(){e.off(t,n)}}},584:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){var n="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e){if(e){if("string"==typeof e)return i(e,void 0);var t=({}).toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?i(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(s=function(){return!!e})()}function u(){return(u="u">typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!({}).hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(null,arguments)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}
1this&&this.__importDefault,Object.defineProperty(t,"__esModule",{value:!0}),t.Socket=void 0;var l=n(933),p=n(848),d=n(91),h=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});t.Socket=function(e){var t;function n(e,t,o){var i,u;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,n),(u=c(u=n),i=function(e,t){if(t&&("object"==r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,s()?Reflect.construct(u,[],c(this).constructor):u.apply(this,void 0))).connected=!1,i.recovered=!1,i.receiveBuffer=[],i.sendBuffer=[],i._queue=[],i._queueSeq=0,i.ids=0,i.acks={},i.flags={},i.io=e,i.nsp=t,o&&o.auth&&(i.auth=o.auth),i._opts=a({},o),i.io._autoConnect&&i.open(),i}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(n,e),t=[{key:"disconnected",get:function(){return!this.connected}},{key:"subEvents",value:function(){if(!this.subs){var e=this.io;this.subs=[(0,p.on)(e,"open",this.onopen.bind(this)),(0,p.on)(e,"packet",this.onpacket.bind(this)),(0,p.on)(e,"error",this.onerror.bind(this)),(0,p.on)(e,"close",this.onclose.bind(this))]}}},{key:"active",get:function(){return!!this.subs}},{key:"connect",value:function(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}},{key:"open",value:function(){return this.connect()}},{key:"send",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.unshift("message"),this.emit.apply(this,t),this}},{key:"emit",value:function(e){if(h.hasOwnProperty(e))throw Error('"'+e.toString()+'" is a reserved event name');for(var t,n,r,o=arguments.length,i=Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];if(i.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;var s={type:l.PacketType.EVENT,data:i,options:{}};if(s.options.compress=!1!==this.flags.compress,"function"==typeof i[i.length-1]){var u=this.ids++,c=i.pop();this._registerAckCallback(u,c),s.id=u}var f=null==(n=null==(t=this.io.engine)?void 0:t.transport)?void 0:n.writable,p=this.connected&&!(null==(r=this.io.engine)?void 0:r._hasPingExpired());return this.flags.volatile&&!f||(p?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}},{key:"_registerAckCallback",value:function(e,t){var n,r=this,o=null!=(n=this.flags.timeout)?n:this._opts.ackTimeout;if(void 0!==o){var i=this.io.setTimeoutFn(function(){delete r.acks[e];for(var n=0;n<r.sendBuffer.length;n++)r.sendBuffer[n].id===e&&r.sendBuffer.splice(n,1);t.call(r,Error("operation has timed out"))},o),a=function(){r.io.clearTimeoutFn(i);for(var e=arguments.length,n=Array(e),o=0;o<e;o++)n[o]=arguments[o];t.apply(r,n)};a.withError=!0,this.acks[e]=a}else this.acks[e]=t}},{key:"emitWithAck",value:function(e){for(var t=this,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new Promise(function(n,o){var i=function(e,t){return e?o(e):n(t)};i.withError=!0,r.push(i),t.emit.apply(t,[e].concat(r))})}},{key:"_addToQueue",value:function(e){var t,n=this;"function"==typeof e[e.length-1]&&(t=e.pop());var r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:a({fromQueue:!0},this.flags)};e.push(function(e){if(r===n._queue[0]){if(null!==e)r.tryCount>n._opts.retries&&(n._queue.shift(),t&&t(e));else if(n._queue.shift(),t){for(var o=arguments.length,i=Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];t.apply(void 0,[null].concat(i))}return r.pending=!1,n._drainQueue()}}),this._queue.push(r),this._drainQueue()}},{key:"_drainQueue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.connected&&0!==this._queue.length){var t=this._queue[0];
1t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}}},{key:"packet",value:function(e){e.nsp=this.nsp,this.io._packet(e)}},{key:"onopen",value:function(){var e=this;"function"==typeof this.auth?this.auth(function(t){e._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}},{key:"_sendConnectPacket",value:function(e){this.packet({type:l.PacketType.CONNECT,data:this._pid?a({pid:this._pid,offset:this._lastOffset},e):e})}},{key:"onerror",value:function(e){this.connected||this.emitReserved("connect_error",e)}},{key:"onclose",value:function(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}},{key:"_clearAcks",value:function(){var e=this;Object.keys(this.acks).forEach(function(t){if(!e.sendBuffer.some(function(e){return String(e.id)===t})){var n=e.acks[t];delete e.acks[t],n.withError&&n.call(e,Error("socket has been disconnected"))}})}},{key:"onpacket",value:function(e){if(e.nsp===this.nsp)switch(e.type){case l.PacketType.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case l.PacketType.EVENT:case l.PacketType.BINARY_EVENT:this.onevent(e);break;case l.PacketType.ACK:case l.PacketType.BINARY_ACK:this.onack(e);break;case l.PacketType.DISCONNECT:this.ondisconnect();break;case l.PacketType.CONNECT_ERROR:this.destroy();var t=Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}},{key:"onevent",value:function(e){var t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}},{key:"emitEvent",value:function(e){if(this._anyListeners&&this._anyListeners.length){var t,r=o(this._anyListeners.slice());try{for(r.s();!(t=r.n()).done;
1)t.value.apply(this,e)}catch(e){r.e(e)}finally{r.f()}}u(c(n.prototype),"emit",this).apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}},{key:"ack",value:function(e){var t=this,n=!1;return function(){if(!n){n=!0;for(var r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];t.packet({type:l.PacketType.ACK,id:e,data:o})}}}},{key:"onack",value:function(e){var t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}},{key:"onconnect",value:function(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}},{key:"emitBuffered",value:function(){var e=this;this.receiveBuffer.forEach(function(t){return e.emitEvent(t)}),this.receiveBuffer=[],this.sendBuffer.forEach(function(t){e.notifyOutgoingListeners(t),e.packet(t)}),this.sendBuffer=[]}},{key:"ondisconnect",value:function(){this.destroy(),this.onclose("io server disconnect")}},{key:"destroy",value:function(){this.subs&&(this.subs.forEach(function(e){return e()}),this.subs=void 0),this.io._destroy(this)}},{key:"disconnect",value:function(){return this.connected&&this.packet({type:l.PacketType.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}},{key:"close",value:function(){return this.disconnect()}},{key:"compress",value:function(e){return this.flags.compress=e,this}},{key:"volatile",get:function(){return this.flags.volatile=!0,this}},{key:"timeout",value:function(e){return this.flags.timeout=e,this}},{key:"onAny",value:function(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}},{key:"prependAny",value:function(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}},{key:"offAny",value:function(e){if(!this._anyListeners)return this;if(e){for(var t=this._anyListeners,n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}},{key:"listenersAny",value:function(){return this._anyListeners||[]}},{key:"onAnyOutgoing",value:function(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}},{key:"prependAnyOutgoing",value:function(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}},{key:"offAnyOutgoing",value:function(e){if(!this._anyOutgoingListeners)return this;if(e){for(var t=this._anyOutgoingListeners,n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}},{key:"listenersAnyOutgoing",value:function(){return this._anyOutgoingListeners||[]}},{key:"notifyOutgoingListeners",value:function(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){var t,n=o(this._anyOutgoingListeners.slice());try{for(n.s();!(t=n.n()).done;
1)t.value.apply(this,e.data)}catch(e){n.e(e)}finally{n.f()}}}}],function(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,function(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}(o.key),o)}}(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),n}(d.Emitter)},808:function(e,t,n){this&&this.__importDefault,Object.defineProperty(t,"__esModule",{value:!0}),t.url=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,o=e;n=n||"u">typeof location&&location,null==e&&(e=n.protocol+"//"+n.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==n?n.protocol+"//"+e:"https://"+e),o=(0,r.parse)(e)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";var i=-1!==o.host.indexOf(":")?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+i+":"+o.port+t,o.href=o.protocol+"://"+i+(n&&n.port===o.port?"":":"+o.port),o};var r=n(0)},588:function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.reconstructPacket=t.deconstructPacket=void 0;var o=n(995);t.deconstructPacket=function(e){var t=[],n=e.data;return e.data=function e(t,n){if(!t)return t;if((0,o.isBinary)(t)){var i={_placeholder:!0,num:n.length};return n.push(t),i}if(Array.isArray(t)){for(var a=Array(t.length),s=0;s<t.length;s++)a[s]=e(t[s],n);return a}if("object"===r(t)&&!(t instanceof Date)){var u={};for(var c in t)Object.prototype.hasOwnProperty.call(t,c)&&(u[c]=e(t[c],n));return u}return t}(n,t),e.attachments=t.length,{packet:e,buffers:t}},t.reconstructPacket=function(e,t){return e.data=function e(t,n){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<n.length)return n[t.num];throw Error("illegal attachments")}if(Array.isArray(t))for(var o=0;o<t.length;o++)t[o]=e(t[o],n);else if("object"===r(t))for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(t[i]=e(t[i],n));return t}(e.data,t),delete e.attachments,e}},933:function(e,t,n){function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(r=function(){return!!e})()}function o(e,t,n,r){var o=i(a(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function i(){return(i="u">typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!({}).hasOwnProperty.call(e,t)&&null!==(e=a(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}}).apply(null,arguments)}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,function(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=u(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}(r.key),r)}}function l(e,t,n){return t&&f(e.prototype,t),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}
1Object.defineProperty(t,"__esModule",{value:!0}),t.Decoder=t.Encoder=t.PacketType=t.protocol=void 0;var p,d,h=n(91),y=n(588),v=n(995),b=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];function m(e){return"[object Object]"===Object.prototype.toString.call(e)}t.protocol=5,(p=d=t.PacketType||(t.PacketType={}))[p.CONNECT=0]="CONNECT",p[p.DISCONNECT=1]="DISCONNECT",p[p.EVENT=2]="EVENT",p[p.ACK=3]="ACK",p[p.CONNECT_ERROR=4]="CONNECT_ERROR",p[p.BINARY_EVENT=5]="BINARY_EVENT",p[p.BINARY_ACK=6]="BINARY_ACK",t.Encoder=l(function e(t){c(this,e),this.replacer=t},[{key:"encode",value:function(e){return(e.type===d.EVENT||e.type===d.ACK)&&(0,v.hasBinary)(e)?this.encodeAsBinary({type:e.type===d.EVENT?d.BINARY_EVENT:d.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}},{key:"encodeAsString",value:function(e){var t=""+e.type;return e.type!==d.BINARY_EVENT&&e.type!==d.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}},{key:"encodeAsBinary",value:function(e){var t=(0,y.deconstructPacket)(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}}]),t.Decoder=function(e){function t(e){var n,o,i;return c(this,t),(o=a(o=t),n=function(e,t){if(t&&("object"==u(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,r()?Reflect.construct(o,i||[],a(this).constructor):o.apply(this,i))).reviver=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(t,e),l(t,[{key:"add",value:function(e){var n;if("string"==typeof e){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");var r=(n=this.decodeString(e)).type===d.BINARY_EVENT;r||n.type===d.BINARY_ACK?(n.type=r?d.EVENT:d.ACK,this.reconstructor=new g(n),0===n.attachments&&o(t,"emitReserved",this,3)(["decoded",n])):o(t,"emitReserved",this,3)(["decoded",n])}else{if(!(0,v.isBinary)(e)&&!e.base64)throw Error("Unknown type: "+e);if(!this.reconstructor)throw Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,o(t,"emitReserved",this,3)(["decoded",n]))}}},{key:"decodeString",value:function(e){var n=0,r={type:Number(e.charAt(0))};if(void 0===d[r.type])throw Error("unknown packet type "+r.type);if(r.type===d.BINARY_EVENT||r.type===d.BINARY_ACK){for(var o=n+1;"-"!==e.charAt(++n)&&n!=e.length;);var i=e.substring(o,n);if(i!=Number(i)||"-"!==e.charAt(n))throw Error("Illegal attachments");r.attachments=Number(i)}if("/"===e.charAt(n+1)){for(var a=n+1;++n&&","!==e.charAt(n)&&n!==e.length;);r.nsp=e.substring(a,n)}else r.nsp="/";var s=e.charAt(n+1);if(""!==s&&Number(s)==s){for(var u=n+1;++n;){var c=e.charAt(n);if(null==c||Number(c)!=c){--n;break}if(n===e.length)break}r.id=Number(e.substring(u,n+1))}if(e.charAt(++n)){var f=this.tryParse(e.substr(n));if(!t.isPayloadValid(r.type,f))throw Error("invalid payload");r.data=f}return r}},{key:"tryParse",value:function(e){try{return JSON.parse(e,this.reviver)}catch(e){return!1}}},{key:"destroy",value:function(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}],[{key:"isPayloadValid",value:function(e,t){switch(e){case d.CONNECT:return m(t);case d.DISCONNECT:return void 0===t;case d.CONNECT_ERROR:return"string"==typeof t||m(t);case d.EVENT:case d.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===b.indexOf(t[0]));case d.ACK:case d.BINARY_ACK:return Array.isArray(t)}}}])}(h.Emitter);var g=l(function e(t){c(this,e),this.packet=t,this.buffers=[],this.reconPack=t},[{key:"takeBinaryData",value:function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=(0,y.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}},{key:"finishedReconstruction",value:function(){this.reconPack=null,this.buffers=[]}}])},995:function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
1Object.defineProperty(t,"__esModule",{value:!0}),t.hasBinary=t.isBinary=void 0;var r="function"==typeof ArrayBuffer,o=Object.prototype.toString,i="function"==typeof Blob||"u">typeof Blob&&"[object BlobConstructor]"===o.call(Blob),a="function"==typeof File||"u">typeof File&&"[object FileConstructor]"===o.call(File);function s(e){return r&&(e instanceof ArrayBuffer||("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer))||i&&e instanceof Blob||a&&e instanceof File}t.isBinary=s,t.hasBinary=function e(t,r){if(!t||"object"!==n(t))return!1;if(Array.isArray(t)){for(var o=0,i=t.length;o<i;o++)if(e(t[o]))return!0;return!1}if(s(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1==arguments.length)return e(t.toJSON(),!0);for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)&&e(t[a]))return!0;return!1}},91:function(e,t,n){function r(e){if(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}}n.r(t),n.d(t,{Emitter:function(){return r}}),r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},r.prototype.emitReserved=r.prototype.emit,r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}}},n={};function o(t){var r=n[t];if(void 0!==r)return r.exports;var i=n[t]={exports:{}};return e[t].call(i.exports,i,i.exports,o),i.exports}o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i=o(48);for(var a in i)t[a]=i[a];i.__esModule&&Object.defineProperty(t,"__esModule",{value:!0})}()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.