@liascript/exporter 2.6.40--0.17.2 → 2.6.42--0.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/capacitor/index.46046734.js +2 -0
- package/dist/assets/capacitor/index.86d74a0c.js +3 -0
- package/dist/assets/capacitor/index.b5aed5b7.js +1 -0
- package/dist/assets/capacitor/index.dc0d877e.js +1 -0
- package/dist/assets/capacitor/index.html +1 -1
- package/dist/assets/capacitor/{jszip.min.63142cc8.js → jszip.min.4fbcc13f.js} +1 -1
- package/dist/assets/capacitor/trystero-mqtt.min.6d9c6703.js +1 -0
- package/dist/assets/capacitor/trystero-mqtt.min.e0182753.js +1 -0
- package/dist/assets/capacitor/trystero-nostr.min.2980a983.js +1 -0
- package/dist/assets/capacitor/trystero-nostr.min.d5bf7194.js +1 -0
- package/dist/assets/capacitor/trystero-torrent.min.9a850ad2.js +1 -0
- package/dist/assets/capacitor/trystero-torrent.min.efe48994.js +1 -0
- package/dist/assets/indexeddb/index.3f51c360.js +1 -0
- package/dist/assets/indexeddb/index.4d795213.js +1 -0
- package/dist/assets/indexeddb/index.b5aed5b7.js +1 -0
- package/dist/assets/indexeddb/index.dc0d877e.js +1 -0
- package/dist/assets/indexeddb/index.html +1 -1
- package/dist/assets/indexeddb/trystero-mqtt.min.6d9c6703.js +1 -0
- package/dist/assets/indexeddb/trystero-mqtt.min.e0182753.js +1 -0
- package/dist/assets/indexeddb/trystero-nostr.min.2980a983.js +1 -0
- package/dist/assets/indexeddb/trystero-nostr.min.d5bf7194.js +1 -0
- package/dist/assets/indexeddb/trystero-torrent.min.9a850ad2.js +1 -0
- package/dist/assets/indexeddb/trystero-torrent.min.efe48994.js +1 -0
- package/dist/assets/pdf/index.2b68bcde.js +1 -0
- package/dist/assets/pdf/index.84d086a5.js +1 -0
- package/dist/assets/pdf/index.8c99cc66.js +1 -0
- package/dist/assets/pdf/index.990b9637.js +1 -0
- package/dist/assets/pdf/index.html +1 -1
- package/dist/assets/scorm1.2/SCORM1.2.27c5f7f8.js +1 -0
- package/dist/assets/scorm1.2/SCORM1.2.de9d97b1.js +1 -0
- package/dist/assets/scorm1.2/index.597f2c88.js +1 -0
- package/dist/assets/scorm1.2/index.b5aed5b7.js +1 -0
- package/dist/assets/scorm1.2/index.cd4381b9.js +1 -0
- package/dist/assets/scorm1.2/index.dc0d877e.js +1 -0
- package/dist/assets/scorm1.2/index.html +1 -1
- package/dist/assets/scorm1.2/{jszip.min.63142cc8.js → jszip.min.4fbcc13f.js} +1 -1
- package/dist/assets/scorm1.2/trystero-mqtt.min.6d9c6703.js +1 -0
- package/dist/assets/scorm1.2/trystero-mqtt.min.e0182753.js +1 -0
- package/dist/assets/scorm1.2/trystero-nostr.min.2980a983.js +1 -0
- package/dist/assets/scorm1.2/trystero-nostr.min.d5bf7194.js +1 -0
- package/dist/assets/scorm1.2/trystero-torrent.min.9a850ad2.js +1 -0
- package/dist/assets/scorm1.2/trystero-torrent.min.efe48994.js +1 -0
- package/dist/assets/scorm2004/SCORM2004.5ccbe265.js +1 -0
- package/dist/assets/scorm2004/SCORM2004.aa25a014.js +1 -0
- package/dist/assets/scorm2004/index.76d94255.js +1 -0
- package/dist/assets/scorm2004/index.b5aed5b7.js +1 -0
- package/dist/assets/scorm2004/index.c4688f3e.js +1 -0
- package/dist/assets/scorm2004/index.dc0d877e.js +1 -0
- package/dist/assets/scorm2004/index.html +1 -1
- package/dist/assets/scorm2004/trystero-mqtt.min.6d9c6703.js +1 -0
- package/dist/assets/scorm2004/trystero-mqtt.min.e0182753.js +1 -0
- package/dist/assets/scorm2004/trystero-nostr.min.2980a983.js +1 -0
- package/dist/assets/scorm2004/trystero-nostr.min.d5bf7194.js +1 -0
- package/dist/assets/scorm2004/trystero-torrent.min.9a850ad2.js +1 -0
- package/dist/assets/scorm2004/trystero-torrent.min.efe48994.js +1 -0
- package/dist/assets/web/index.3731b339.js +1 -0
- package/dist/assets/web/index.b5aed5b7.js +1 -0
- package/dist/assets/web/index.dc0d877e.js +1 -0
- package/dist/assets/web/index.f2dd64a2.js +1 -0
- package/dist/assets/web/index.html +1 -1
- package/dist/assets/web/trystero-mqtt.min.6d9c6703.js +1 -0
- package/dist/assets/web/trystero-mqtt.min.e0182753.js +1 -0
- package/dist/assets/web/trystero-nostr.min.2980a983.js +1 -0
- package/dist/assets/web/trystero-nostr.min.d5bf7194.js +1 -0
- package/dist/assets/web/trystero-torrent.min.9a850ad2.js +1 -0
- package/dist/assets/web/trystero-torrent.min.efe48994.js +1 -0
- package/dist/assets/xapi/index.a011f589.js +1 -0
- package/dist/assets/xapi/index.b5aed5b7.js +1 -0
- package/dist/assets/xapi/index.dc0d877e.js +1 -0
- package/dist/assets/xapi/index.f463d20d.js +1 -0
- package/dist/assets/xapi/index.html +1 -1
- package/dist/assets/xapi/{jszip.min.63142cc8.js → jszip.min.4fbcc13f.js} +1 -1
- package/dist/assets/xapi/trystero-mqtt.min.6d9c6703.js +1 -0
- package/dist/assets/xapi/trystero-mqtt.min.e0182753.js +1 -0
- package/dist/assets/xapi/trystero-nostr.min.2980a983.js +1 -0
- package/dist/assets/xapi/trystero-nostr.min.d5bf7194.js +1 -0
- package/dist/assets/xapi/trystero-torrent.min.9a850ad2.js +1 -0
- package/dist/assets/xapi/trystero-torrent.min.efe48994.js +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/assets/capacitor/index.1ab7546b.js +0 -3
- package/dist/assets/capacitor/index.5d64fecf.js +0 -1
- package/dist/assets/capacitor/index.9c8d301a.js +0 -1
- package/dist/assets/capacitor/index.b0296e15.js +0 -2
- package/dist/assets/capacitor/trystero-mqtt.min.6e40f6de.js +0 -1
- package/dist/assets/capacitor/trystero-mqtt.min.a2199647.js +0 -1
- package/dist/assets/capacitor/trystero-nostr.min.765a883b.js +0 -1
- package/dist/assets/capacitor/trystero-nostr.min.fe4ac2f4.js +0 -1
- package/dist/assets/capacitor/trystero-torrent.min.d39641f1.js +0 -1
- package/dist/assets/capacitor/trystero-torrent.min.dbd208ec.js +0 -1
- package/dist/assets/indexeddb/index.10a81eac.js +0 -1
- package/dist/assets/indexeddb/index.5d64fecf.js +0 -1
- package/dist/assets/indexeddb/index.7fcdfa74.js +0 -1
- package/dist/assets/indexeddb/index.9c8d301a.js +0 -1
- package/dist/assets/indexeddb/trystero-mqtt.min.6e40f6de.js +0 -1
- package/dist/assets/indexeddb/trystero-mqtt.min.a2199647.js +0 -1
- package/dist/assets/indexeddb/trystero-nostr.min.765a883b.js +0 -1
- package/dist/assets/indexeddb/trystero-nostr.min.fe4ac2f4.js +0 -1
- package/dist/assets/indexeddb/trystero-torrent.min.d39641f1.js +0 -1
- package/dist/assets/indexeddb/trystero-torrent.min.dbd208ec.js +0 -1
- package/dist/assets/pdf/index.4c925f39.js +0 -1
- package/dist/assets/pdf/index.5493b5c3.js +0 -1
- package/dist/assets/pdf/index.54d437aa.js +0 -1
- package/dist/assets/pdf/index.84a3e762.js +0 -1
- package/dist/assets/scorm1.2/SCORM1.2.67efdb83.js +0 -1
- package/dist/assets/scorm1.2/SCORM1.2.6aeaad7b.js +0 -1
- package/dist/assets/scorm1.2/index.5d64fecf.js +0 -1
- package/dist/assets/scorm1.2/index.9c8d301a.js +0 -1
- package/dist/assets/scorm1.2/index.a1d98fe8.js +0 -1
- package/dist/assets/scorm1.2/index.fb6f86f8.js +0 -1
- package/dist/assets/scorm1.2/trystero-mqtt.min.6e40f6de.js +0 -1
- package/dist/assets/scorm1.2/trystero-mqtt.min.a2199647.js +0 -1
- package/dist/assets/scorm1.2/trystero-nostr.min.765a883b.js +0 -1
- package/dist/assets/scorm1.2/trystero-nostr.min.fe4ac2f4.js +0 -1
- package/dist/assets/scorm1.2/trystero-torrent.min.d39641f1.js +0 -1
- package/dist/assets/scorm1.2/trystero-torrent.min.dbd208ec.js +0 -1
- package/dist/assets/scorm2004/SCORM2004.9a05bfd8.js +0 -1
- package/dist/assets/scorm2004/SCORM2004.f751d884.js +0 -1
- package/dist/assets/scorm2004/index.163a95f1.js +0 -1
- package/dist/assets/scorm2004/index.374c449f.js +0 -1
- package/dist/assets/scorm2004/index.5d64fecf.js +0 -1
- package/dist/assets/scorm2004/index.9c8d301a.js +0 -1
- package/dist/assets/scorm2004/trystero-mqtt.min.6e40f6de.js +0 -1
- package/dist/assets/scorm2004/trystero-mqtt.min.a2199647.js +0 -1
- package/dist/assets/scorm2004/trystero-nostr.min.765a883b.js +0 -1
- package/dist/assets/scorm2004/trystero-nostr.min.fe4ac2f4.js +0 -1
- package/dist/assets/scorm2004/trystero-torrent.min.d39641f1.js +0 -1
- package/dist/assets/scorm2004/trystero-torrent.min.dbd208ec.js +0 -1
- package/dist/assets/web/index.5d64fecf.js +0 -1
- package/dist/assets/web/index.9c8d301a.js +0 -1
- package/dist/assets/web/index.c4e6ed4e.js +0 -1
- package/dist/assets/web/index.dae2afac.js +0 -1
- package/dist/assets/web/trystero-mqtt.min.6e40f6de.js +0 -1
- package/dist/assets/web/trystero-mqtt.min.a2199647.js +0 -1
- package/dist/assets/web/trystero-nostr.min.765a883b.js +0 -1
- package/dist/assets/web/trystero-nostr.min.fe4ac2f4.js +0 -1
- package/dist/assets/web/trystero-torrent.min.d39641f1.js +0 -1
- package/dist/assets/web/trystero-torrent.min.dbd208ec.js +0 -1
- package/dist/assets/xapi/index.5d64fecf.js +0 -1
- package/dist/assets/xapi/index.9c8d301a.js +0 -1
- package/dist/assets/xapi/index.e19ea3b2.js +0 -1
- package/dist/assets/xapi/index.f9fadbb3.js +0 -1
- package/dist/assets/xapi/trystero-mqtt.min.6e40f6de.js +0 -1
- package/dist/assets/xapi/trystero-mqtt.min.a2199647.js +0 -1
- package/dist/assets/xapi/trystero-nostr.min.765a883b.js +0 -1
- package/dist/assets/xapi/trystero-nostr.min.fe4ac2f4.js +0 -1
- package/dist/assets/xapi/trystero-torrent.min.d39641f1.js +0 -1
- package/dist/assets/xapi/trystero-torrent.min.dbd208ec.js +0 -1
- /package/dist/assets/{scorm1.2 → capacitor}/jszip.min.19c66d77.js +0 -0
- /package/dist/assets/{capacitor → scorm1.2}/jszip.min.eaecf580.js +0 -0
- /package/dist/assets/{web → scorm2004}/jszip.min.19c66d77.js +0 -0
- /package/dist/assets/{scorm2004 → web}/jszip.min.eaecf580.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{};function t(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}var r=e.parcelRequire55a5;r.register("aB40U",(function(n,i){t(n.exports,"joinRoom",(function(){return ls}));var o,a,s,u,l,c,f,h,d,p,v,g,y=r("f1evb"),b=r("1PH9R"),m=r("3u2tY"),w=r("hnmIs"),_=r("9yQwa"),k=r("9Klpk"),E=r("8qpTe"),S=r("gwSkA"),A=r("7ukXT"),I=r("8TzS1"),T=r("aFAb1"),P=r("kw2NY"),O=r("lxHBR"),R=r("gJ3S3"),C=r("3bWnf"),x=r("eT7f3"),B=r("9WzNc"),M=r("div3d"),j=r("kb0qF"),L=r("bgoEC"),U=r("7j4mF"),N=r("kC9n9"),D=r("1Qswt"),W=r("5ENmm"),F=r("6Wo7Q"),q=r("rJmE6"),H=r("hXL9f"),V=r("fSF4h"),z=r("bWNdT"),K=r("32Euv"),Q=(K=r("32Euv"),Object.defineProperty),G=Object.getOwnPropertyDescriptor,Y=Object.getOwnPropertyNames,J={}.hasOwnProperty,X=function(e,t){return function(){return e&&(t=e(e=0)),t}},$=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},Z=function(e,t){for(var r in t)Q(e,r,{get:t[r],enumerable:!0})},ee=function(e){return function(e,t,r,n){var i=!0,o=!1,a=void 0;if(t&&"object"==typeof t||"function"==typeof t)try{for(var s,u=function(){var r=s.value;!J.call(e,r)&&void 0!==r&&Q(e,r,{get:function(){return t[r]},enumerable:!(n=G(t,r))||n.enumerable})},l=Y(t)[Symbol.iterator]();!(i=(s=l.next()).done);i=!0)u()}catch(e){o=!0,a=e}finally{try{i||null==l.return||l.return()}finally{if(o)throw a}}return e}(Q({},"__esModule",{value:!0}),e)},te=X((function(){})),re={};function ne(e){throw Error("Node.js process "+e+" is not supported by JSPM core outside of Node.js")}function ie(){!we||!_e||(we=!1,_e.length?me=_e.concat(me):ke=-1,me.length&&oe())}function oe(){if(!we){var e=setTimeout(ie,0);we=!0;for(var t=me.length;t;){for(_e=me,me=[];++ke<t;)_e&&_e[ke].run();ke=-1,t=me.length}_e=null,we=!1,clearTimeout(e)}}function ae(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];me.push(new se(e,t)),1===me.length&&!we&&setTimeout(oe,0)}function se(e,t){this.fun=e,this.array=t}function ue(){}function le(){ne("_linkedBinding")}function ce(){ne("dlopen")}function fe(){return[]}function he(){return[]}function de(e,t){if(!e)throw Error(t||"assertion error")}function pe(){return!1}function ve(){return gt.now()/1e3}function ge(e){var t=Math.floor(.001*(Date.now()-gt.now())),r=.001*gt.now(),n=Math.floor(r)+t,i=Math.floor(r%1*1e9);return e&&(n-=e[0],(i-=e[1])<0&&(n--,i+=bt)),[n,i]}function ye(){return Rt}function be(){return[]}Z(re,{_debugEnd:function(){return rt},_debugProcess:function(){return tt},_events:function(){return wt},_eventsCount:function(){return _t},_exiting:function(){return We},_fatalExceptions:function(){return $e},_getActiveHandles:function(){return he},_getActiveRequests:function(){return fe},_kill:function(){return He},_linkedBinding:function(){return le},_maxListeners:function(){return mt},_preload_modules:function(){return pt},_rawDebug:function(){return Ue},_startProfilerIdleNotifier:function(){return nt},_stopProfilerIdleNotifier:function(){return it},_tickCallback:function(){return et},abort:function(){return ut},addListener:function(){return kt},allowedNodeEnvironmentFlags:function(){return Je},arch:function(){return Se},argv:function(){return Te},argv0:function(){return dt},assert:function(){return de},binding:function(){return xe},chdir:function(){return je},config:function(){return Fe},cpuUsage:function(){return Ve},cwd:function(){return Me},debugPort:function(){return ht},default:function(){return Rt},dlopen:function(){return ce},domain:function(){return De},emit:function(){return Tt},emitWarning:function(){return Ce},env:function(){return Ie},execArgv:function(){return Pe},execPath:function(){return ft},exit:function(){return Ge},features:function(){return Xe},hasUncaughtExceptionCaptureCallback:function(){return pe},hrtime:function(){return ge},kill:function(){return Qe},listeners:function(){return be},memoryUsage:function(){return Ke},moduleLoadList:function(){return Ne},nextTick:function(){return ae},off:function(){return St},on:function(){return ye},once:function(){return Et},openStdin:function(){return Ye},pid:function(){return lt},platform:function(){return Ae},ppid:function(){return ct},prependListener:function(){return Pt},prependOnceListener:function(){return Ot},reallyExit:function(){return qe},release:function(){return Le},removeAllListeners:function(){return It},removeListener:function(){return At},resourceUsage:function(){return ze},setSourceMapsEnabled:function(){return vt},setUncaughtExceptionCaptureCallback:function(){return Ze},stderr:function(){return at},stdin:function(){return st},stdout:function(){return ot},title:function(){return Ee},umask:function(){return Be},uptime:function(){return ve},version:function(){return Oe},versions:function(){return Re}});var me,we,_e,ke,Ee,Se,Ae,Ie,Te,Pe,Oe,Re,Ce,xe,Be,Me,je,Le,Ue,Ne,De,We,Fe,qe,He,Ve,ze,Ke,Qe,Ge,Ye,Je,Xe,$e,Ze,et,tt,rt,nt,it,ot,at,st,ut,lt,ct,ft,ht,dt,pt,vt,gt,yt,bt,mt,wt,_t,kt,Et,St,At,It,Tt,Pt,Ot,Rt,Ct=X((function(){te(),zt(),xt(),me=[],we=!1,ke=-1,se.prototype.run=function(){this.fun.apply(null,this.array)},Ee="browser",Se="x64",Ae="browser",Ie={PATH:"/usr/bin",LANG:navigator.language+".UTF-8",PWD:"/",HOME:"/home",TMP:"/tmp"},Te=["/usr/bin/node"],Pe=[],Oe="v16.8.0",Re={},Ce=function(e,t){console.warn((t?t+": ":"")+e)},xe=function(){ne("binding")},Be=function(){return 0},Me=function(){return"/"},je=function(){},Le={name:"node",sourceUrl:"",headersUrl:"",libUrl:""},Ue=ue,Ne=[],De={},We=!1,Fe={},qe=ue,He=ue,ze=Ve=function(){return{}},Ke=Ve,Qe=ue,Ge=ue,Ye=ue,Je={},Xe={inspector:!1,debug:!1,uv:!1,ipv6:!1,tls_alpn:!1,tls_sni:!1,tls_ocsp:!1,tls:!1,cached_builtins:!0},$e=ue,Ze=ue,et=ue,tt=ue,rt=ue,nt=ue,it=ue,ot=void 0,at=void 0,st=void 0,ut=ue,lt=2,ct=1,ft="/bin/usr/node",ht=9229,dt="node",pt=[],vt=ue,void 0===(gt={now:("undefined"==typeof performance?"undefined":(0,q.default)(performance))<"u"?performance.now.bind(performance):void 0,timing:("undefined"==typeof performance?"undefined":(0,q.default)(performance))<"u"?performance.timing:void 0}).now&&(yt=Date.now(),gt.timing&>.timing.navigationStart&&(yt=gt.timing.navigationStart),gt.now=function(){return Date.now()-yt}),bt=1e9,ge.bigint=function(e){var t=ge(e);return("undefined"==typeof BigInt?"undefined":(0,q.default)(BigInt))>"u"?t[0]*bt+t[1]:BigInt(t[0]*bt)+BigInt(t[1])},Rt={version:Oe,versions:Re,arch:Se,platform:Ae,release:Le,_rawDebug:Ue,moduleLoadList:Ne,binding:xe,_linkedBinding:le,_events:wt={},_eventsCount:_t=0,_maxListeners:mt=10,on:ye,addListener:kt=ye,once:Et=ye,off:St=ye,removeListener:At=ye,removeAllListeners:It=ye,emit:Tt=ue,prependListener:Pt=ye,prependOnceListener:Ot=ye,listeners:be,domain:De,_exiting:We,config:Fe,dlopen:ce,uptime:ve,_getActiveRequests:fe,_getActiveHandles:he,reallyExit:qe,_kill:He,cpuUsage:Ve,resourceUsage:ze,memoryUsage:Ke,kill:Qe,exit:Ge,openStdin:Ye,allowedNodeEnvironmentFlags:Je,assert:de,features:Xe,_fatalExceptions:$e,setUncaughtExceptionCaptureCallback:Ze,hasUncaughtExceptionCaptureCallback:pe,emitWarning:Ce,nextTick:ae,_tickCallback:et,_debugProcess:tt,_debugEnd:rt,_startProfilerIdleNotifier:nt,_stopProfilerIdleNotifier:it,stdout:ot,stdin:st,stderr:at,abort:ut,umask:Be,chdir:je,cwd:Me,env:Ie,title:Ee,argv:Te,execArgv:Pe,pid:lt,ppid:ct,execPath:ft,debugPort:ht,hrtime:ge,argv0:dt,_preload_modules:pt,setSourceMapsEnabled:vt}})),xt=X((function(){Ct()})),Bt={};Z(Bt,{Buffer:function(){return Ft},INSPECT_MAX_BYTES:function(){return qt},default:function(){return Wt},kMaxLength:function(){return Ht}});var Mt,jt,Lt,Ut,Nt,Dt,Wt,Ft,qt,Ht,Vt=X((function(){te(),zt(),xt(),Mt={},jt=!1,Lt={},Ut=!1,Nt={},Dt=!1,(Wt=function(){var e=function(e){if(e>Z)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=new Uint8Array(e);return Object.setPrototypeOf(r,t.prototype),r},t=function(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return i(e)}return r(e,t,n)},r=function(r,n,i){if("string"==typeof r)return function(r,n){if(("string"!=typeof n||""===n)&&(n="utf8"),!t.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var i=0|u(r,n),o=e(i),a=o.write(r,n);return a!==i&&(o=o.slice(0,a)),o}(r,n);if(ArrayBuffer.isView(r))return function(e){if(K(e,Uint8Array)){var t=new Uint8Array(e);return a(t.buffer,t.byteOffset,t.byteLength)}return o(e)}(r);if(null==r)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===r?"undefined":(0,q.default)(r)));if(K(r,ArrayBuffer)||r&&K(r.buffer,ArrayBuffer)||("undefined"==typeof SharedArrayBuffer?"undefined":(0,q.default)(SharedArrayBuffer))<"u"&&(K(r,SharedArrayBuffer)||r&&K(r.buffer,SharedArrayBuffer)))return a(r,n,i);if("number"==typeof r)throw new TypeError('The "value" argument must not be of type number. Received type number');var l=r.valueOf&&r.valueOf();if(null!=l&&l!==r)return t.from(l,n,i);var c=function(r){if(t.isBuffer(r)){var n=0|s(r.length),i=e(n);return 0===i.length||r.copy(i,0,0,n),i}return void 0!==r.length?"number"!=typeof r.length||Q(r.length)?e(0):o(r):"Buffer"===r.type&&Array.isArray(r.data)?o(r.data):void 0}(r);if(c)return c;if(("undefined"==typeof Symbol?"undefined":(0,q.default)(Symbol))<"u"&&null!=Symbol.toPrimitive&&"function"==typeof r[Symbol.toPrimitive])return t.from(r[Symbol.toPrimitive]("string"),n,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+(void 0===r?"undefined":(0,q.default)(r)))},n=function(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')},i=function(t){return n(t),e(t<0?0:0|s(t))},o=function(t){for(var r=t.length<0?0:0|s(t.length),n=e(r),i=0;i<r;i+=1)n[i]=255&t[i];return n},a=function(e,r,n){if(r<0||e.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<r+(n||0))throw new RangeError('"length" is outside of buffer bounds');var i;return i=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n),Object.setPrototypeOf(i,t.prototype),i},s=function(e){if(e>=Z)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Z.toString(16)+" bytes");return 0|e},u=function(e,r){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+(void 0===e?"undefined":(0,q.default)(e)));var n=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(o)return i?-1:F(e).length;r=(""+r).toLowerCase(),o=!0}},l=function(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return S(this,t,r);case"utf8":case"utf-8":return w(this,t,r);case"ascii":return _(this,t,r);case"latin1":case"binary":return E(this,t,r);case"base64":return m(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}},c=function(e,t,r){var n=e[t];e[t]=e[r],e[r]=n},f=function(e,r,n,i,o){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Q(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=t.from(r,i)),t.isBuffer(r))return 0===r.length?-1:h(e,r,n,i,o);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,r,n):Uint8Array.prototype.lastIndexOf.call(e,r,n):h(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")},h=function(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=(n+"").toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=r;o<s;o++)if(l(e,o)===l(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(l(e,o+h)!==l(t,h)){f=!1;break}if(f)return o}return-1},d=function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o,a=t.length;for(n>a/2&&(n=a/2),o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(Q(s))return o;e[r+o]=s}return o},p=function(e,t,r,n){return V(F(t,e.length-r),e,r,n)},v=function(e,t,r,n){return V(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)},g=function(e,t,r,n){return V(H(t),e,r,n)},b=function(e,t,r,n){return V(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)},m=function(e,t,r){return 0===t&&r===e.length?J.fromByteArray(e):J.fromByteArray(e.slice(t,r))},w=function(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o=e[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(i+s<=r){var u=void 0,l=void 0,c=void 0,f=void 0;switch(s){case 1:o<128&&(a=o);break;case 2:128==(192&(u=e[i+1]))&&(f=(31&o)<<6|63&u)>127&&(a=f);break;case 3:u=e[i+1],l=e[i+2],128==(192&u)&&128==(192&l)&&(f=(15&o)<<12|(63&u)<<6|63&l)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=e[i+1],l=e[i+2],c=e[i+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(f=(15&o)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return function(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=ee));return r}(n)},_=function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n},E=function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n},S=function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=ne[e[o]];return i},A=function(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i},I=function(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")},T=function(e,r,n,i,o,a){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<a)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")},P=function(e,t,r,n,i){U(t,n,i,e,r,7);var o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;var a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r},O=function(e,t,r,n,i){U(t,n,i,e,r,7);var o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;var a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8},R=function(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")},x=function(e,t,r,n,i){return t=+t,r>>>=0,i||R(e,0,r,4),X.write(e,t,r,n,23,4),r+4},B=function(e,t,r,n,i){return t=+t,r>>>=0,i||R(e,0,r,8),X.write(e,t,r,n,52,8),r+8},M=function(e,t,r){te[e]=function(r){"use strict";(0,j.default)(i,r);var n=(0,z.default)(i);function i(){var r;return(0,k.default)(this,i),r=n.call(this),Object.defineProperty((0,y.default)(r),"message",{value:t.apply((0,y.default)(r),arguments),writable:!0,configurable:!0}),r.name="".concat(r.name," [").concat(e,"]"),r.stack,delete r.name,(0,D.default)(r)}return(0,C.default)(i,[{key:"code",get:function(){return e},set:function(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(e,"]: ").concat(this.message)}}]),i}(r)},L=function(e){for(var t="",r=e.length,n="-"===e[0]?1:0;r>=n+4;r-=3)t="_".concat(e.slice(r-3,r)).concat(t);return"".concat(e.slice(0,r)).concat(t)},U=function(e,t,r,n,i,o){if(e>r||e<t){var a,s="bigint"==(void 0===t?"undefined":(0,q.default)(t))?"n":"";throw a=0===t||t===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(o+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(o+1)-1).concat(s,") and < 2 ** ").concat(8*(o+1)-1).concat(s),new te.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,r){N(t,"offset"),(void 0===e[t]||void 0===e[t+r])&&W(t,e.length-(r+1))}(n,i,o)},N=function(e,t){if("number"!=typeof e)throw new te.ERR_INVALID_ARG_TYPE(t,"number",e)},W=function(e,t,r){throw Math.floor(e)!==e?(N(e,r),new te.ERR_OUT_OF_RANGE("offset","an integer",e)):t<0?new te.ERR_BUFFER_OUT_OF_BOUNDS:new te.ERR_OUT_OF_RANGE("offset",">= 0 and <= "+t,e)},F=function(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o},H=function(e){return J.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(re,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))},V=function(e,t,r,n){var i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i},K=function(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name},Q=function(e){return e!=e},G=function(e){return("undefined"==typeof BigInt?"undefined":(0,q.default)(BigInt))>"u"?Y:e},Y=function(){throw Error("BigInt not supported")};if(Dt)return Nt;Dt=!0;var J=function(){var e=function(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]},t=function(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]},r=function(e,r,n){for(var i,o=[],a=r;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(t(i));return o.join("")};if(jt)return Mt;jt=!0,Mt.byteLength=function(t){var r=e(t),n=r[0],i=r[1];return 3*(n+i)/4-i},Mt.toByteArray=function(t){var r,n,a=e(t),s=a[0],u=a[1],l=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,u)),c=0,f=u>0?s-4:s;for(n=0;n<f;n+=4)r=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],l[c++]=r>>16&255,l[c++]=r>>8&255,l[c++]=255&r;return 2===u&&(r=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,l[c++]=255&r),1===u&&(r=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,l[c++]=r>>8&255,l[c++]=255&r),l},Mt.fromByteArray=function(e){for(var t,i=e.length,o=i%3,a=[],s=16383,u=0,l=i-o;u<l;u+=s)a.push(r(e,u,u+s>l?l:u+s));return 1===o?(t=e[i-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[i-2]<<8)+e[i-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")};for(var n=[],i=[],o=("undefined"==typeof Uint8Array?"undefined":(0,q.default)(Uint8Array))<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;return i[45]=62,i[95]=63,Mt}(),X=(Ut||(Ut=!0,Lt.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,l=u>>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=l}return(d?-1:1)*a*Math.pow(2,o-n)},Lt.write=function(e,t,r,n,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?5.960464477539062e-8:0,d=n?0:o-1,p=n?1:-1,v=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(s=isNaN(t)?1:0,a=c):(t*(u=Math.pow(2,-(a=Math.floor(Math.log(t)/Math.LN2))))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;e[r+d]=255&a,d+=p,a/=256,l-=8);e[r+d-p]|=128*v}),Lt),$="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;Nt.Buffer=t,Nt.SlowBuffer=function(e){return+e!=e&&(e=0),t.alloc(+e)},Nt.INSPECT_MAX_BYTES=50;var Z=2147483647;Nt.kMaxLength=Z,t.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!t.TYPED_ARRAY_SUPPORT&&("undefined"==typeof console?"undefined":(0,q.default)(console))<"u"&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(t.prototype,"parent",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.buffer}}),Object.defineProperty(t.prototype,"offset",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.byteOffset}}),t.poolSize=8192,t.from=function(e,t,n){return r(e,t,n)},Object.setPrototypeOf(t.prototype,Uint8Array.prototype),Object.setPrototypeOf(t,Uint8Array),t.alloc=function(t,r,i){return function(t,r,i){return n(t),t<=0?e(t):void 0!==r?"string"==typeof i?e(t).fill(r,i):e(t).fill(r):e(t)}(t,r,i)},t.allocUnsafe=function(e){return i(e)},t.allocUnsafeSlow=function(e){return i(e)},t.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==t.prototype},t.compare=function(e,r){if(K(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),K(r,Uint8Array)&&(r=t.from(r,r.offset,r.byteLength)),!t.isBuffer(e)||!t.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;for(var n=e.length,i=r.length,o=0,a=Math.min(n,i);o<a;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0},t.isEncoding=function(e){switch((e+"").toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var a=e[n];if(K(a,Uint8Array))o+a.length>i.length?(t.isBuffer(a)||(a=t.from(a)),a.copy(i,o)):Uint8Array.prototype.set.call(i,a,o);else{if(!t.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o)}o+=a.length}return i},t.byteLength=u,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)c(this,t,t+1);return this},t.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)c(this,t,t+3),c(this,t+1,t+2);return this},t.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)c(this,t,t+7),c(this,t+1,t+6),c(this,t+2,t+5),c(this,t+3,t+4);return this},t.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?w(this,0,e):l.apply(this,arguments)},t.prototype.toLocaleString=t.prototype.toString,t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var e="",t=Nt.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},$&&(t.prototype[$]=t.prototype.inspect),t.prototype.compare=function(e,r,n,i,o){if(K(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+(void 0===e?"undefined":(0,q.default)(e)));if(void 0===r&&(r=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>e.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(this===e)return 0;for(var a=(o>>>=0)-(i>>>=0),s=(n>>>=0)-(r>>>=0),u=Math.min(a,s),l=this.slice(i,o),c=e.slice(r,n),f=0;f<u;++f)if(l[f]!==c[f]){a=l[f],s=c[f];break}return a<s?-1:s<a?1:0},t.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},t.prototype.indexOf=function(e,t,r){return f(this,e,t,r,!0)},t.prototype.lastIndexOf=function(e,t,r){return f(this,e,t,r,!1)},t.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return d(this,e,t,r);case"utf8":case"utf-8":return p(this,e,t,r);case"ascii":case"latin1":case"binary":return v(this,e,t,r);case"base64":return g(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:[].slice.call(this._arr||this,0)}};var ee=4096;t.prototype.slice=function(e,r){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<e&&(r=e);var i=this.subarray(e,r);return Object.setPrototypeOf(i,t.prototype),i},t.prototype.readUintLE=t.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},t.prototype.readUintBE=t.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},t.prototype.readUint8=t.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},t.prototype.readUint16LE=t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUint16BE=t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUint32LE=t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUint32BE=t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readBigUInt64LE=G((function(e){N(e>>>=0,"offset");var t=this[e],r=this[e+7];(void 0===t||void 0===r)&&W(e,this.length-8);var n=t+256*this[++e]+65536*this[++e]+this[++e]*Math.pow(2,24),i=this[++e]+256*this[++e]+65536*this[++e]+r*Math.pow(2,24);return BigInt(n)+(BigInt(i)<<BigInt(32))})),t.prototype.readBigUInt64BE=G((function(e){N(e>>>=0,"offset");var t=this[e],r=this[e+7];(void 0===t||void 0===r)&&W(e,this.length-8);var n=t*Math.pow(2,24)+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*Math.pow(2,24)+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),t.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},t.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},t.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readBigInt64LE=G((function(e){N(e>>>=0,"offset");var t=this[e],r=this[e+7];(void 0===t||void 0===r)&&W(e,this.length-8);var n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*Math.pow(2,24))})),t.prototype.readBigInt64BE=G((function(e){N(e>>>=0,"offset");var t=this[e],r=this[e+7];(void 0===t||void 0===r)&&W(e,this.length-8);var n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*Math.pow(2,24)+65536*this[++e]+256*this[++e]+r)})),t.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),X.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),X.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),X.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),X.read(this,e,!1,52,8)},t.prototype.writeUintLE=t.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||T(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},t.prototype.writeUintBE=t.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||T(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},t.prototype.writeUint8=t.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,1,255,0),this[t]=255&e,t+1},t.prototype.writeUint16LE=t.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeUint16BE=t.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeUint32LE=t.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},t.prototype.writeUint32BE=t.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeBigUInt64LE=G((function(e){return P(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),t.prototype.writeBigUInt64BE=G((function(e){return O(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),t.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);T(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},t.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);T(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a|0)-s&255;return t+r},t.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},t.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},t.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeBigInt64LE=G((function(e){return P(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),t.prototype.writeBigInt64BE=G((function(e){return O(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),t.prototype.writeFloatLE=function(e,t,r){return x(this,e,t,!0,r)},t.prototype.writeFloatBE=function(e,t,r){return x(this,e,t,!1,r)},t.prototype.writeDoubleLE=function(e,t,r){return B(this,e,t,!0,r)},t.prototype.writeDoubleBE=function(e,t,r){return B(this,e,t,!1,r)},t.prototype.copy=function(e,r,n,i){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),!i&&0!==i&&(i=this.length),r>=e.length&&(r=e.length),r||(r=0),i>0&&i<n&&(i=n),i===n||0===e.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-r<i-n&&(i=e.length-r+n);var o=i-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(r,n,i):Uint8Array.prototype.set.call(e,this.subarray(n,i),r),o},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){var o=e.charCodeAt(0);("utf8"===i&&o<128||"latin1"===i)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;var a;if(r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=r;a<n;++a)this[a]=e;else{var s=t.isBuffer(e)?e:t.from(e,i),u=s.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-r;++a)this[a+r]=s[a%u]}return this};var te={};M("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"}),RangeError),M("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(void 0===t?"undefined":(0,q.default)(t))}),TypeError),M("ERR_OUT_OF_RANGE",(function(e,t,r){var n='The value of "'.concat(e,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=L(r+""):"bigint"==(void 0===r?"undefined":(0,q.default)(r))&&(i=r+"",(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=L(i)),i+="n"),n+" It must be ".concat(t,". Received ").concat(i)}),RangeError);var re=/[^+/0-9A-Za-z-_]/g,ne=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}();return Nt}()).Buffer,Wt.SlowBuffer,Wt.INSPECT_MAX_BYTES,Wt.kMaxLength,Ft=Wt.Buffer,qt=Wt.INSPECT_MAX_BYTES,Ht=Wt.kMaxLength})),zt=X((function(){Vt()})),Kt=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){"use strict";function e(t){(0,k.default)(this,e),this.aliasToTopic={},this.max=t}return(0,C.default)(e,[{key:"put",value:function(e,t){return!(0===t||t>this.max||(this.aliasToTopic[t]=e,this.length=Object.keys(this.aliasToTopic).length,0))}},{key:"getTopicByAlias",value:function(e){return this.aliasToTopic[e]}},{key:"clear",value:function(){this.aliasToTopic={}}}]),e}()})),Qt=$((function(e,t){var r;te(),zt(),xt(),t.exports={AggregateError:function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(e){var n;if((0,k.default)(this,r),!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+(void 0===e?"undefined":(0,q.default)(e)));for(var i="",o=0;o<e.length;o++)i+=" ".concat(e[o].stack,"\n");return(n=t.call(this,i)).name="AggregateError",n.errors=e,(0,D.default)(n)}return r}((0,V.default)(Error)),ArrayIsArray:function(e){return Array.isArray(e)},ArrayPrototypeIncludes:function(e,t){return e.includes(t)},ArrayPrototypeIndexOf:function(e,t){return e.indexOf(t)},ArrayPrototypeJoin:function(e,t){return e.join(t)},ArrayPrototypeMap:function(e,t){return e.map(t)},ArrayPrototypePop:function(e,t){return e.pop(t)},ArrayPrototypePush:function(e,t){return e.push(t)},ArrayPrototypeSlice:function(e,t,r){return e.slice(t,r)},Error:Error,FunctionPrototypeCall:function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return(r=e).call.apply(r,[t].concat((0,F.default)(i)))},FunctionPrototypeSymbolHasInstance:function(e,t){return Function.prototype[Symbol.hasInstance].call(e,t)},MathFloor:Math.floor,Number:Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:function(e,t){return Object.defineProperties(e,t)},ObjectDefineProperty:function(e,t,r){return Object.defineProperty(e,t,r)},ObjectGetOwnPropertyDescriptor:function(e,t){return Object.getOwnPropertyDescriptor(e,t)},ObjectKeys:function(e){return Object.keys(e)},ObjectSetPrototypeOf:function(e,t){return Object.setPrototypeOf(e,t)},Promise:Promise,PromisePrototypeCatch:function(e,t){return e.catch(t)},PromisePrototypeThen:function(e,t,r){return e.then(t,r)},PromiseReject:function(e){return Promise.reject(e)},PromiseResolve:function(e){return Promise.resolve(e)},ReflectApply:Reflect.apply,RegExpPrototypeTest:function(e,t){return e.test(t)},SafeSet:Set,String:String,StringPrototypeSlice:function(e,t,r){return e.slice(t,r)},StringPrototypeToLowerCase:function(e){return e.toLowerCase()},StringPrototypeToUpperCase:function(e){return e.toUpperCase()},StringPrototypeTrim:function(e){return e.trim()},Symbol:Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol(),SymbolAsyncDispose:Symbol.asyncDispose||Symbol(),TypedArrayPrototypeSet:function(e,t,r){return e.set(t,r)},Boolean:Boolean,Uint8Array:Uint8Array}})),Gt=$((function(e,t){te(),zt(),xt(),t.exports={format:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.replace(/%([sdifj])/g,(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=(0,W.default)(t,2),o=(i[0],i[1]),a=r.shift();return"f"===o?a.toFixed(6):"j"===o?JSON.stringify(a):"s"===o&&"object"==typeof a?((a.constructor!==Object?a.constructor.name:"")+" {}").trim():a.toString()}))},inspect:function(e){switch(void 0===e?"undefined":(0,q.default)(e)){case"string":if(e.includes("'")){if(!e.includes('"'))return'"'.concat(e,'"');if(!e.includes("`")&&!e.includes("${"))return"`".concat(e,"`")}return"'".concat(e,"'");case"number":return isNaN(e)?"NaN":Object.is(e,-0)?e+"":e;case"bigint":return e+"n";case"boolean":case"undefined":return e+"";case"object":return"{}"}}}})),Yt=$((function(e,t){var r=function(e,t){if(!e)throw new p.ERR_INTERNAL_ASSERTION(t)},n=function(e){for(var t="",r=e.length,n="-"===e[0]?1:0;r>=n+4;r-=3)t="_".concat(e.slice(r-3,r)).concat(t);return"".concat(e.slice(0,r)).concat(t)},i=function(e,t,n){n||(n=Error);var i=function(n){"use strict";(0,j.default)(o,n);var i=(0,z.default)(o);function o(){for(var n=arguments.length,a=new Array(n),u=0;u<n;u++)a[u]=arguments[u];return(0,k.default)(this,o),i.call(this,function(e,t,n){if("function"==typeof t)return r(t.length<=n.length,"Code: ".concat(e,"; The provided arguments length (").concat(n.length,") does not match the required ones (").concat(t.length,").")),t.apply(void 0,(0,F.default)(n));var i=(t.match(/%[dfijoOs]/g)||[]).length;return r(i===n.length,"Code: ".concat(e,"; The provided arguments length (").concat(n.length,") does not match the required ones (").concat(i,").")),0===n.length?t:s.apply(void 0,[t].concat((0,F.default)(n)))}(e,t,a))}return(0,C.default)(o,[{key:"toString",value:function(){return"".concat(this.name," [").concat(e,"]: ").concat(this.message)}}]),o}(n);Object.defineProperties(i.prototype,{name:{value:n.name,writable:!0,enumerable:!1,configurable:!0},toString:{value:function(){return"".concat(this.name," [").concat(e,"]: ").concat(this.message)},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[f]=!0,p[e]=i},o=function(e){var t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e};te(),zt(),xt();var a=Gt(),s=a.format,u=a.inspect,l=Qt().AggregateError,c=globalThis.AggregateError||l,f=Symbol(),h=["string","function","number","object","Function","Object","boolean","bigint","symbol"],d=/^([A-Z][a-z0-9]*)+$/,p={};i("ERR_ASSERTION","%s",Error),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){r("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);var i="The ";e.endsWith(" argument")?i+=e+" ":i+='"'.concat(e,'" ').concat(e.includes(".")?"property":"argument"," "),i+="must be ";var o=[],a=[],s=[],l=!0,c=!1,f=void 0;try{for(var p,v=t[Symbol.iterator]();!(l=(p=v.next()).done);l=!0){var g=p.value;r("string"==typeof g,"All expected entries have to be of type string"),h.includes(g)?o.push(g.toLowerCase()):d.test(g)?a.push(g):(r("object"!==g,'The value "object" should be written as "Object"'),s.push(g))}}catch(e){c=!0,f=e}finally{try{l||null==v.return||v.return()}finally{if(c)throw f}}if(a.length>0){var y=o.indexOf("object");-1!==y&&(o.splice(o,y,1),a.push("Object"))}if(o.length>0){switch(o.length){case 1:i+="of type "+o[0];break;case 2:i+="one of type ".concat(o[0]," or ").concat(o[1]);break;default:var b=o.pop();i+="one of type ".concat(o.join(", "),", or ").concat(b)}(a.length>0||s.length>0)&&(i+=" or ")}if(a.length>0){switch(a.length){case 1:i+="an instance of "+a[0];break;case 2:i+="an instance of ".concat(a[0]," or ").concat(a[1]);break;default:var m=a.pop();i+="an instance of ".concat(a.join(", "),", or ").concat(m)}s.length>0&&(i+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(i+="an "),i+=""+s[0];break;case 2:i+="one of ".concat(s[0]," or ").concat(s[1]);break;default:var w=s.pop();i+="one of ".concat(s.join(", "),", or ").concat(w)}if(null==n)i+=". Received "+n;else if("function"==typeof n&&n.name)i+=". Received function "+n.name;else if("object"==typeof n){var _;null!==(_=n.constructor)&&void 0!==_&&_.name?i+=". Received an instance of "+n.constructor.name:i+=". Received "+u(n,{depth:-1})}else{var k=u(n,{colors:!1});k.length>25&&(k=k.slice(0,25)+"..."),i+=". Received type ".concat(void 0===n?"undefined":(0,q.default)(n)," (").concat(k,")")}return i}),TypeError),i("ERR_INVALID_ARG_VALUE",(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid",n=u(t);return n.length>128&&(n=n.slice(0,128)+"..."),"The ".concat(e.includes(".")?"property":"argument"," '").concat(e,"' ").concat(r,". Received ").concat(n)}),TypeError),i("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var n;return"Expected ".concat(e,' to be returned from the "').concat(t,'" function but got ').concat(null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?"instance of "+r.constructor.name:"type "+(void 0===r?"undefined":(0,q.default)(r)),".")}),TypeError),i("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r(t.length>0,"At least one arg needs to be specified");var i,o=t.length;switch(t=(Array.isArray(t)?t:[t]).map((function(e){return'"'.concat(e,'"')})).join(" or "),o){case 1:i+="The ".concat(t[0]," argument");break;case 2:i+="The ".concat(t[0]," and ").concat(t[1]," arguments");break;default:var a=t.pop();i+="The ".concat(t.join(", "),", and ").concat(a," arguments")}return i+" must be specified"}),TypeError),i("ERR_OUT_OF_RANGE",(function(e,t,i){var o;if(r(t,'Missing "range" argument'),Number.isInteger(i)&&Math.abs(i)>Math.pow(2,32))o=n(i+"");else if("bigint"==(void 0===i?"undefined":(0,q.default)(i))){o=i+"";var a=Math.pow(BigInt(2),BigInt(32));(i>a||i<-a)&&(o=n(o)),o+="n"}else o=u(i);return'The value of "'.concat(e,'" is out of range. It must be ').concat(t,". Received ").concat(o)}),RangeError),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),i("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),i("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),i("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),i("ERR_STREAM_WRITE_AFTER_END","write after end",Error),i("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),t.exports={AbortError:function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"The operation was aborted",i=arguments.length>1?arguments[1]:void 0;if((0,k.default)(this,r),void 0!==i&&"object"!=typeof i)throw new p.ERR_INVALID_ARG_TYPE("options","Object",i);return(e=t.call(this,n,i)).code="ABORT_ERR",e.name="AbortError",(0,D.default)(e)}return r}((0,V.default)(Error)),aggregateTwoErrors:o((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;var r=new c([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:o,codes:p}})),Jt=$((function(e,t){te(),zt(),xt();var r=("undefined"==typeof self?"undefined":(0,q.default)(self))<"u"?self:("undefined"==typeof window?"undefined":(0,q.default)(window))<"u"?window:void 0,n=r.AbortController,i=r.AbortSignal;t.exports=n,t.exports.AbortSignal=i,t.exports.default=n}));function Xt(){Xt.init.call(this)}function $t(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+(void 0===e?"undefined":(0,q.default)(e)))}function Zt(e){return void 0===e._maxListeners?Xt.defaultMaxListeners:e._maxListeners}function er(e,t,r,n){var i,o,a;if($t(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=Zt(e))>0&&a.length>i&&!a.warned){a.warned=!0;var s=Error("Possible EventEmitter memory leak detected. "+a.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,console&&console.warn&&console.warn(s)}return e}function tr(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function rr(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=tr.bind(n);return i.listener=r,n.wrapFn=i,i}function nr(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):or(i,i.length)}function ir(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function or(e,t){for(var r=Array(t),n=0;n<t;++n)r[n]=e[n];return r}var ar,sr,ur,lr,cr,fr,hr,dr=X((function(){te(),zt(),xt(),ur="object"==typeof Reflect?Reflect:null,lr=ur&&"function"==typeof ur.apply?ur.apply:function(e,t,r){return function(){}.apply.call(e,t,r)},sr=ur&&"function"==typeof ur.ownKeys?ur.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)},cr=Number.isNaN||function(e){return e!=e},ar=Xt,Xt.EventEmitter=Xt,Xt.prototype._events=void 0,Xt.prototype._eventsCount=0,Xt.prototype._maxListeners=void 0,fr=10,Object.defineProperty(Xt,"defaultMaxListeners",{enumerable:!0,get:function(){return fr},set:function(e){if("number"!=typeof e||e<0||cr(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");fr=e}}),Xt.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Xt.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||cr(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},Xt.prototype.getMaxListeners=function(){return Zt(this)},Xt.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var s=i[e];if(void 0===s)return!1;if("function"==typeof s)lr(s,this,t);else{var u=s.length,l=or(s,u);for(r=0;r<u;++r)lr(l[r],this,t)}return!0},Xt.prototype.addListener=function(e,t){return er(this,e,t,!1)},Xt.prototype.on=Xt.prototype.addListener,Xt.prototype.prependListener=function(e,t){return er(this,e,t,!0)},Xt.prototype.once=function(e,t){return $t(t),this.on(e,rr(this,e,t)),this},Xt.prototype.prependOnceListener=function(e,t){return $t(t),this.prependListener(e,rr(this,e,t)),this},Xt.prototype.removeListener=function(e,t){var r,n,i,o,a;if($t(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},Xt.prototype.off=Xt.prototype.removeListener,Xt.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},Xt.prototype.listeners=function(e){return nr(this,e,!0)},Xt.prototype.rawListeners=function(e){return nr(this,e,!1)},Xt.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):ir.call(e,t)},Xt.prototype.listenerCount=ir,Xt.prototype.eventNames=function(){return this._eventsCount>0?sr(this._events):[]},(hr=ar).EventEmitter,hr.defaultMaxListeners,hr.init,hr.listenerCount,hr.EventEmitter,hr.defaultMaxListeners,hr.init,hr.listenerCount})),pr={};Z(pr,{EventEmitter:function(){return vr},default:function(){return hr},defaultMaxListeners:function(){return gr},init:function(){return yr},listenerCount:function(){return br},on:function(){return mr},once:function(){return wr}});var vr,gr,yr,br,mr,wr,_r=X((function(){var e;te(),zt(),xt(),dr(),dr(),hr.once=function(e,t){return new Promise((function(r,n){var i,o=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];void 0!==i&&e.removeListener("error",i),r(n)};"error"!==t&&(i=function(t){e.removeListener(name,o),n(t)},e.once("error",i)),e.once(t,o)}))},hr.on=function(e,t){var r=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=o.shift();n?n.resolve(createIterResult(t,!1)):i.push(t)},n=function(e){s=!0;var t=o.shift();t?t.reject(e):a=e,u.return()},i=[],o=[],a=null,s=!1,u=(0,x.default)({next:function(){return(0,w.default)((function(){var e,t;return(0,K.__generator)(this,(function(r){return(e=i.shift())?[2,createIterResult(e,!1)]:a?(t=Promise.reject(a),[2,(a=null,t)]):[2,s?createIterResult(void 0,!0):new Promise((function(e,t){return o.push({resolve:e,reject:t})}))]}))}))()},return:function(){return(0,w.default)((function(){var i,a,u,l,c;return(0,K.__generator)(this,(function(f){e.removeListener(t,r),e.removeListener("error",n),s=!0,i=!0,a=!1,u=void 0;try{for(l=o[Symbol.iterator]();!(i=(c=l.next()).done);i=!0)c.value.resolve(createIterResult(void 0,!0))}catch(e){a=!0,u=e}finally{try{i||null==l.return||l.return()}finally{if(a)throw u}}return[2,createIterResult(void 0,!0)]}))}))()},throw:function(i){a=i,e.removeListener(t,r),e.removeListener("error",n)}},Symbol.asyncIterator,(function(){return this}));return e.on(t,r),e.on("error",n),u},vr=(e=hr).EventEmitter,gr=e.defaultMaxListeners,yr=e.init,br=e.listenerCount,mr=e.on,wr=e.once})),kr=$((function(e,t){te(),zt(),xt();var r=(Vt(),ee(Bt)),n=Gt(),i=n.format,o=n.inspect,a=Yt().codes.ERR_INVALID_ARG_TYPE,s=Qt(),u=s.kResistStopPropagation,l=s.AggregateError,c=s.SymbolDispose,f=globalThis.AbortSignal||Jt().AbortSignal,h=globalThis.AbortController||Jt().AbortController,d=Object.getPrototypeOf((0,w.default)((function(){return(0,K.__generator)(this,(function(e){return[2]}))}))).constructor,p=globalThis.Blob||r.Blob,v=(void 0===p?"undefined":(0,q.default)(p))<"u"?function(e){return e instanceof p}:function(){return!1},g=function(e,t){if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new a(t,"AbortSignal",e)};t.exports={AggregateError:l,kEmptyObject:Object.freeze({}),once:function(e){var t=!1;return function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t||(t=!0,e.apply(this,n))}},createDeferredPromise:function(){var e,t;return{promise:new Promise((function(r,n){e=r,t=n})),resolve:e,reject:t}},promisify:function(e){return new Promise((function(t,r){e((function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return e?r(e):t.apply(void 0,(0,F.default)(i))}))}))},debuglog:function(){return function(){}},format:i,inspect:o,types:{isAsyncFunction:function(e){return e instanceof d},isArrayBufferView:function(e){return ArrayBuffer.isView(e)}},isBlob:v,deprecate:function(e){return e},addAbortListener:(_r(),ee(pr)).addAbortListener||function(e,t){if(void 0===e)throw new a("signal","AbortSignal",e);var r;return g(e,"signal"),function(e,t){if("function"!=typeof e)throw new a("listener","Function",e)}(t),e.aborted?queueMicrotask((function(){return t()})):(e.addEventListener("abort",t,(0,x.default)({__proto__:null,once:!0},u,!0)),r=function(){e.removeEventListener("abort",t)}),(0,x.default)({__proto__:null},c,(function(){var e;null===(e=r)||void 0===e||e()}))},AbortSignalAny:f.any||function(e){if(1===e.length)return e[0];var t=new h,r=function(){return t.abort()};return e.forEach((function(e){g(e,"signals"),e.addEventListener("abort",r,{once:!0})})),t.signal.addEventListener("abort",(function(){e.forEach((function(e){return e.removeEventListener("abort",r)}))}),{once:!0}),t.signal}},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})),Er=$((function(e,t){var r=function(e,t){if("string"!=typeof e)throw new A(t,"string",e)},n=function(e,t){if("boolean"!=typeof e)throw new A(t,"boolean",e)},i=function(e,t,r){return null!=e&&g(e,t)?e[t]:r},o=function(e,t){if((void 0===e?"undefined":(0,q.default)(e))>"u"||!y(G,e))throw new I(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')};te(),zt(),xt();var a=Qt(),s=a.ArrayIsArray,u=a.ArrayPrototypeIncludes,l=a.ArrayPrototypeJoin,c=a.ArrayPrototypeMap,f=a.NumberIsInteger,h=a.NumberIsNaN,d=a.NumberMAX_SAFE_INTEGER,p=a.NumberMIN_SAFE_INTEGER,v=a.NumberParseInt,g=a.ObjectPrototypeHasOwnProperty,y=a.RegExpPrototypeExec,b=a.String,m=a.StringPrototypeToUpperCase,w=a.StringPrototypeTrim,_=Yt(),k=_.hideStackFrames,E=_.codes,S=E.ERR_SOCKET_BAD_PORT,A=E.ERR_INVALID_ARG_TYPE,I=E.ERR_INVALID_ARG_VALUE,T=E.ERR_OUT_OF_RANGE,P=E.ERR_UNKNOWN_SIGNAL,O=kr().normalizeEncoding,R=kr().types,C=R.isAsyncFunction,x=R.isArrayBufferView,B={},M=/^[0-7]+$/,j=k((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:p,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d;if("number"!=typeof e)throw new A(t,"number",e);if(!f(e))throw new T(t,"an integer",e);if(e<r||e>n)throw new T(t,">= ".concat(r," && <= ").concat(n),e)})),L=k((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-2147483648,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2147483647;if("number"!=typeof e)throw new A(t,"number",e);if(!f(e))throw new T(t,"an integer",e);if(e<r||e>n)throw new T(t,">= ".concat(r," && <= ").concat(n),e)})),U=k((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("number"!=typeof e)throw new A(t,"number",e);if(!f(e))throw new T(t,"an integer",e);var n=r?1:0,i=4294967295;if(e<n||e>i)throw new T(t,">= ".concat(n," && <= ").concat(i),e)})),N=k((function(e,t,r){if(!u(r,e)){var n="must be one of: "+l(c(r,(function(e){return"string"==typeof e?"'".concat(e,"'"):b(e)})),", ");throw new I(t,e,n)}})),D=k((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=i(r,"allowArray",!1),o=i(r,"allowFunction",!1);if(!i(r,"nullable",!1)&&null===e||!n&&s(e)||"object"!=typeof e&&(!o||"function"!=typeof e))throw new A(t,"Object",e)})),W=k((function(e,t){if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new A(t,"a dictionary",e)})),F=k((function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(!s(e))throw new A(t,"Array",e);if(e.length<r)throw new I(t,e,"must be longer than "+r)})),H=k((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"buffer";if(!x(e))throw new A(t,["Buffer","TypedArray","DataView"],e)})),V=k((function(e,t){if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new A(t,"AbortSignal",e)})),z=k((function(e,t){if("function"!=typeof e)throw new A(t,"Function",e)})),K=k((function(e,t){if("function"!=typeof e||C(e))throw new A(t,"Function",e)})),Q=k((function(e,t){if(void 0!==e)throw new A(t,"undefined",e)})),G=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;t.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if((void 0===e?"undefined":(0,q.default)(e))>"u"&&(e=r),"string"==typeof e){if(null===y(M,e))throw new I(t,e,"must be a 32-bit unsigned integer or an octal string");e=v(e,8)}return U(e,t),e},validateArray:F,validateStringArray:function(e,t){F(e,t);for(var n=0;n<e.length;n++)r(e[n],"".concat(t,"[").concat(n,"]"))},validateBooleanArray:function(e,t){F(e,t);for(var r=0;r<e.length;r++)n(e[r],"".concat(t,"[").concat(r,"]"))},validateAbortSignalArray:function(e,t){F(e,t);for(var r=0;r<e.length;r++){var n=e[r],i="".concat(t,"[").concat(r,"]");if(null==n)throw new A(i,"AbortSignal",n);V(n,i)}},validateBoolean:n,validateBuffer:H,validateDictionary:W,validateEncoding:function(e,t){var r=O(t),n=e.length;if("hex"===r&&n%2!=0)throw new I("encoding",t,"is invalid for data of length "+n)},validateFunction:z,validateInt32:L,validateInteger:j,validateNumber:function(e,t,r,n){if("number"!=typeof e)throw new A(t,"number",e);if(null!=r&&e<r||null!=n&&e>n||(null!=r||null!=n)&&h(e))throw new T(t,"".concat(null!=r?">= "+r:"").concat(null!=r&&null!=n?" && ":"").concat(null!=n?"<= "+n:""),e)},validateObject:D,validateOneOf:N,validatePlainFunction:K,validatePort:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Port",r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===w(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new S(t,e,r);return 0|e},validateSignalName:function(e){if(r(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"signal"),void 0===B[e])throw void 0!==B[m(e)]?new P(e+" (signals must use all capital letters)"):new P(e)},validateString:r,validateUint32:U,validateUndefined:Q,validateUnion:function(e,t,r){if(!u(r,e))throw new A(t,"('".concat(l(r,"|"),"')"),e)},validateAbortSignal:V,validateLinkHeaderValue:function(e){if("string"==typeof e)return o(e,"hints"),e;if(s(e)){var t=e.length,r="";if(0===t)return r;for(var n=0;n<t;n++){var i=e[n];o(i,"hints"),r+=i,n!==t-1&&(r+=", ")}return r}throw new I("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}}})),Sr=$((function(e,t){var r=function(){throw Error("setTimeout has not been defined")},n=function(){throw Error("clearTimeout has not been defined")},i=function(e){if(l===setTimeout)return setTimeout(e,0);if((l===r||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}},o=function(){!p||!h||(p=!1,h.length?d=h.concat(d):v=-1,d.length&&a())},a=function(){if(!p){var e=i(o);p=!0;for(var t=d.length;t;){for(h=d,d=[];++v<t;)h&&h[v].run();v=-1,t=d.length}h=null,p=!1,function(e){if(c===clearTimeout)return clearTimeout(e);if((c===n||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(e);try{c(e)}catch(t){try{return c.call(null,e)}catch(t){return c.call(this,e)}}}(e)}},s=function(e,t){this.fun=e,this.array=t},u=function(){};te(),zt(),xt();var l,c,f=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:r}catch(e){l=r}try{c="function"==typeof clearTimeout?clearTimeout:n}catch(e){c=n}}();var h,d=[],p=!1,v=-1;f.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];d.push(new s(e,t)),1===d.length&&!p&&i(a)},s.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={},f.on=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.prependListener=u,f.prependOnceListener=u,f.listeners=function(){return[]},f.binding=function(){throw Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(){throw Error("process.chdir is not supported")},f.umask=function(){return 0}})),Ar=$((function(e,t){var r=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||r&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(t=e._readableState)||void 0===t?void 0:t.readable)||e._writableState&&!e._readableState)},n=function(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))},i=function(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)},o=function(e){return!(!e||i(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)},a=function(e){return!(!e||i(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)},s=function(e){return!(!e||i(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)},u=function(e){if(!i(e))return null;var t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[m]||null!=n&&n.destroyed)},l=function(e){if(!n(e))return null;if(!0===e.writableEnded)return!0;var t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},c=function(e,t){if(!r(e))return null;var n=e._readableState;return(null==n||!n.errored)&&("boolean"!=typeof(null==n?void 0:n.endEmitted)?null:!!(n.endEmitted||!1===t&&!0===n.ended&&0===n.length))},f=function(e){return e&&null!=e[_]?e[_]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!u(e)&&r(e)&&e.readable&&!c(e)},h=function(e){return e&&null!=e[k]?e[k]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!u(e)&&n(e)&&e.writable&&!l(e)},d=function(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen},p=function(e){return"boolean"==typeof e._sent100&&d(e)};te(),zt(),xt();var v=Qt(),g=v.SymbolAsyncIterator,y=v.SymbolIterator,b=v.SymbolFor,m=b("nodejs.stream.destroyed"),w=b("nodejs.stream.errored"),_=b("nodejs.stream.readable"),k=b("nodejs.stream.writable"),E=b("nodejs.stream.disturbed"),S=b("nodejs.webstream.isClosedPromise"),A=b("nodejs.webstream.controllerErrorFunction");t.exports={isDestroyed:u,kIsDestroyed:m,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[E])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:E,isErrored:function(e){var t,r,n,i,o,a,s,u,l,c;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(o=null!==(a=e[w])&&void 0!==a?a:e.readableErrored)&&void 0!==o?o:e.writableErrored)&&void 0!==i?i:null===(s=e._readableState)||void 0===s?void 0:s.errorEmitted)&&void 0!==n?n:null===(u=e._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(l=e._readableState)||void 0===l?void 0:l.errored)&&void 0!==t?t:null!==(c=e._writableState)&&void 0!==c&&c.errored))},kIsErrored:w,isReadable:f,kIsReadable:_,kIsClosedPromise:S,kControllerErrorFunction:A,kIsWritable:k,isClosed:function(e){if(!i(e))return null;if("boolean"==typeof e.closed)return e.closed;var t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&d(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return i(e)?!!u(e)||!(!1!==(null==t?void 0:t.readable)&&f(e)||!1!==(null==t?void 0:t.writable)&&h(e)):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[g]:!1===t?"function"==typeof e[y]:"function"==typeof e[g]||"function"==typeof e[y])},isReadableNodeStream:r,isReadableStream:o,isReadableEnded:function(e){if(!r(e))return null;if(!0===e.readableEnded)return!0;var t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:c,isReadableErrored:function(e){var t,r;return i(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:i,isWebStream:function(e){return o(e)||a(e)||s(e)},isWritable:h,isWritableNodeStream:n,isWritableStream:a,isWritableEnded:l,isWritableFinished:function(e,t){if(!n(e))return null;if(!0===e.writableFinished)return!0;var r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return i(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:p,willEmitClose:function(e){if(!i(e))return null;var t=e._writableState,r=e._readableState,n=t||r;return!n&&p(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:s}})),Ir=$((function(e,t){var r=function(e,t,r){var o,s;if(2===arguments.length?(r=t,t=f):null==t?t=f:g(t,"options"),v(r,"callback"),p(t.signal,"options.signal"),r=h(r),I(e)||C(e))return function(e,t,r){var o=!1,s=U;if(t.signal)if(s=function(){o=!0,r.call(e,new a(void 0,{cause:t.signal.reason}))},t.signal.aborted)i.nextTick(s);else{var u=(n=n||kr().addAbortListener)(t.signal,s),l=r;r=h((function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];u[_](),l.apply(e,r)}))}var c=function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];o||i.nextTick((function(){return r.apply(e,n)}))};return w(e[L].promise,c,c),U}(e,t,r);if(!M(e))throw new u("stream",["ReadableStream","WritableStream","Stream"],e);var c=null!==(o=t.readable)&&void 0!==o?o:A(e),d=null!==(s=t.writable)&&void 0!==s?s:R(e),y=e._writableState,b=e._readableState,m=function(){e.writable||D()},k=j(e)&&A(e)===c&&R(e)===d,N=x(e,!1),D=function(){N=!0,e.destroyed&&(k=!1),(!k||e.readable&&!c)&&(!c||W)&&r.call(e)},W=T(e,!1),F=function(){W=!0,e.destroyed&&(k=!1),(!k||e.writable&&!d)&&(!d||N)&&r.call(e)},q=function(t){r.call(e,t)},H=E(e),V=function(){H=!0;var t=B(e)||P(e);return t&&"boolean"!=typeof t?r.call(e,t):c&&!W&&A(e,!0)&&!T(e,!1)?r.call(e,new l):!d||N||x(e,!1)?void r.call(e):r.call(e,new l)},z=function(){H=!0;var t=B(e)||P(e);if(t&&"boolean"!=typeof t)return r.call(e,t);r.call(e)},K=function(){e.req.on("finish",D)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?d&&!y&&(e.on("end",m),e.on("close",m)):(e.on("complete",D),k||e.on("abort",V),e.req?K():e.on("request",K)),!k&&"boolean"==typeof e.aborted&&e.on("aborted",V),e.on("end",F),e.on("finish",D),!1!==t.error&&e.on("error",q),e.on("close",V),H?i.nextTick(V):null!=y&&y.errorEmitted||null!=b&&b.errorEmitted?k||i.nextTick(z):(!c&&(!k||S(e))&&(N||!1===O(e))||!d&&(!k||O(e))&&(W||!1===S(e))||b&&e.req&&e.aborted)&&i.nextTick(z);var Q=function(){r=U,e.removeListener("aborted",V),e.removeListener("complete",D),e.removeListener("abort",V),e.removeListener("request",K),e.req&&e.req.removeListener("finish",D),e.removeListener("end",m),e.removeListener("close",m),e.removeListener("finish",D),e.removeListener("end",F),e.removeListener("error",q),e.removeListener("close",V)};if(t.signal&&!H){var G=function(){var n=r;Q(),n.call(e,new a(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)i.nextTick(G);else{var Y=(n=n||kr().addAbortListener)(t.signal,G),J=r;r=h((function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];Y[_](),J.apply(e,r)}))}}return Q};te(),zt(),xt();var n,i=Sr(),o=Yt(),a=o.AbortError,s=o.codes,u=s.ERR_INVALID_ARG_TYPE,l=s.ERR_STREAM_PREMATURE_CLOSE,c=kr(),f=c.kEmptyObject,h=c.once,d=Er(),p=d.validateAbortSignal,v=d.validateFunction,g=d.validateObject,y=d.validateBoolean,b=Qt(),m=b.Promise,w=b.PromisePrototypeThen,_=b.SymbolDispose,k=Ar(),E=k.isClosed,S=k.isReadable,A=k.isReadableNodeStream,I=k.isReadableStream,T=k.isReadableFinished,P=k.isReadableErrored,O=k.isWritable,R=k.isWritableNodeStream,C=k.isWritableStream,x=k.isWritableFinished,B=k.isWritableErrored,M=k.isNodeStream,j=k.willEmitClose,L=k.kIsClosedPromise,U=function(){};t.exports=r,t.exports.finished=function(e,t){var n,i=!1;return null===t&&(t=f),null!==(n=t)&&void 0!==n&&n.cleanup&&(y(t.cleanup,"cleanup"),i=t.cleanup),new m((function(n,o){var a=r(e,t,(function(e){i&&a(),e?o(e):n()}))}))}})),Tr=$((function(e,t){var r=function(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))},n=function(e,t,n){var a=!1;function s(t){if(!a){a=!0;var s=e._readableState,u=e._writableState;r(t,u,s),u&&(u.closed=!0),s&&(s.closed=!0),"function"==typeof n&&n(t),t?d.nextTick(i,e,t):d.nextTick(o,e)}}try{e._destroy(t||null,s)}catch(e){s(e)}},i=function(e,t){a(e,t),o(e)},o=function(e){var t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")},a=function(e,t){var r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))},s=function(e,t,r){var n=e._readableState,i=e._writableState;if(null!=i&&i.destroyed||null!=n&&n.destroyed)return this;null!=n&&n.autoDestroy||null!=i&&i.autoDestroy?e.destroy(t):t&&(t.stack,i&&!i.errored&&(i.errored=t),n&&!n.errored&&(n.errored=t),r?d.nextTick(a,e,t):a(e,t))},u=function(e){var t=!1;function r(r){if(t)s(e,null!=r?r:new g);else{t=!0;var n=e._readableState,i=e._writableState,o=i||n;n&&(n.constructed=!0),i&&(i.constructed=!0),o.destroyed?e.emit(S,r):r?s(e,r,!0):d.nextTick(l,e)}}try{e._construct((function(e){d.nextTick(r,e)}))}catch(e){d.nextTick(r,e)}},l=function(e){e.emit(A)},c=function(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort},f=function(e){e.emit("close")},h=function(e,t){e.emit("error",t),d.nextTick(f,e)};te(),zt(),xt();var d=Sr(),p=Yt(),v=p.aggregateTwoErrors,g=p.codes.ERR_MULTIPLE_CALLBACK,y=p.AbortError,b=Qt().Symbol,m=Ar(),w=m.kIsDestroyed,_=m.isDestroyed,k=m.isFinished,E=m.isServerRequest,S=b("kDestroy"),A=b("kConstruct");t.exports={construct:function(e,t){if("function"==typeof e._construct){var r=e._readableState,n=e._writableState;r&&(r.constructed=!1),n&&(n.constructed=!1),e.once(A,t),!(e.listenerCount(A)>1)&&d.nextTick(u,e)}},destroyer:function(e,t){!e||_(e)||(!t&&!k(e)&&(t=new y),E(e)?(e.socket=null,e.destroy(t)):c(e)?e.abort():c(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?d.nextTick(h,e,t):d.nextTick(f,e),e.destroyed||(e[w]=!0))},destroy:function(e,t){var i=this._readableState,o=this._writableState,a=o||i;return null!=o&&o.destroyed||null!=i&&i.destroyed?("function"==typeof t&&t(),this):(r(e,o,i),o&&(o.destroyed=!0),i&&(i.destroyed=!0),a.constructed?n(this,e,t):this.once(S,(function(r){n(this,v(r,e),t)})),this)},undestroy:function(){var e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:s}})),Pr=$((function(e,t){var r=function(e){s.call(this,e)},n=function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)};te(),zt(),xt();var i=Qt(),o=i.ArrayIsArray,a=i.ObjectSetPrototypeOf,s=(_r(),ee(pr)).EventEmitter;a(r.prototype,s.prototype),a(r,s),r.prototype.pipe=function(e,t){var r=function(t){e.writable&&!1===e.write(t)&&l.pause&&l.pause()},i=function(){l.readable&&l.resume&&l.resume()},o=function(){c||(c=!0,e.end())},a=function(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())},u=function(e){f(),0===s.listenerCount(this,"error")&&this.emit("error",e)},l=this;l.on("data",r),e.on("drain",i),!e._isStdio&&(!t||!1!==t.end)&&(l.on("end",o),l.on("close",a));var c=!1;function f(){l.removeListener("data",r),e.removeListener("drain",i),l.removeListener("end",o),l.removeListener("close",a),l.removeListener("error",u),e.removeListener("error",u),l.removeListener("end",f),l.removeListener("close",f),e.removeListener("close",f)}return n(l,"error",u),n(e,"error",u),l.on("end",f),l.on("close",f),e.on("close",f),e.emit("pipe",l),e},t.exports={Stream:r,prependListener:n}})),Or=$((function(e,t){te(),zt(),xt();var r,n=Qt().SymbolDispose,i=Yt(),o=i.AbortError,a=i.codes,s=Ar(),u=s.isNodeStream,l=s.isWebStream,c=s.kControllerErrorFunction,f=Ir(),h=a.ERR_INVALID_ARG_TYPE;t.exports.addAbortSignal=function(e,r){if(function(e,t){if("object"!=typeof e||!("aborted"in e))throw new h("signal","AbortSignal",e)}(e),!u(r)&&!l(r))throw new h("stream",["ReadableStream","WritableStream","Stream"],r);return t.exports.addAbortSignalNoValidate(e,r)},t.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;var i=u(t)?function(){t.destroy(new o(void 0,{cause:e.reason}))}:function(){t[c](new o(void 0,{cause:e.reason}))};if(e.aborted)i();else{var a=(r=r||kr().addAbortListener)(e,i);f(t,a[n])}return t}})),Rr=$((function(e,t){te(),zt(),xt();var r=Qt(),n=r.StringPrototypeSlice,i=r.SymbolIterator,o=r.TypedArrayPrototypeSet,a=r.Uint8Array,s=(Vt(),ee(Bt)).Buffer,u=kr().inspect;t.exports=function(){"use strict";function e(){(0,k.default)(this,e),this.head=null,this.tail=null,this.length=0}return(0,C.default)(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;null!==(t=t.next);)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t=s.allocUnsafe(e>>>0),r=this.head,n=0;r;)o(t,r.data,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r=this.head.data;if(e<r.length){var n=r.slice(0,e);return this.head.data=r.slice(e),n}return e===r.length?this.shift():t?this._getString(e):this._getBuffer(e)}},{key:"first",value:function(){return this.head.data}},{key:i,value:function(){var e;return(0,K.__generator)(this,(function(t){switch(t.label){case 0:e=this.head,t.label=1;case 1:return e?[4,e.data]:[3,4];case 2:t.sent(),t.label=3;case 3:return e=e.next,[3,1];case 4:return[2]}}))}},{key:"_getString",value:function(e){var t="",r=this.head,i=0;do{var o=r.data;if(!(e>o.length)){e===o.length?(t+=o,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(o,0,e),this.head=r,r.data=n(o,e));break}t+=o,e-=o.length,++i}while(null!==(r=r.next));return this.length-=i,t}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),r=e,n=this.head,i=0;do{var u=n.data;if(!(e>u.length)){e===u.length?(o(t,u,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(o(t,new a(u.buffer,u.byteOffset,e),r-e),this.head=n,n.data=u.slice(e));break}o(t,u,r-e),e-=u.length,++i}while(null!==(n=n.next));return this.length-=i,t}},{key:Symbol.for("nodejs.util.inspect.custom"),value:function(e,t){return u(this,(0,U.default)((0,L.default)({},t),{depth:0,customInspect:!1}))}}]),e}()})),Cr=$((function(e,t){var r=function(e){return e?l:u};te(),zt(),xt();var n=Qt(),i=n.MathFloor,o=n.NumberIsInteger,a=Er().validateInteger,s=Yt().codes.ERR_INVALID_ARG_VALUE,u=16384,l=16;t.exports={getHighWaterMark:function(e,t,n,a){var u=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,a,n);if(null!=u){if(!o(u)||u<0)throw new s(a?"options."+n:"options.highWaterMark",u);return i(u)}return r(e.objectMode)},getDefaultHighWaterMark:r,setDefaultHighWaterMark:function(e,t){a(t,"value",0),e?l=t:u=t}}})),xr=$((function(e,t){var r=function(e,t){for(var r in e)t[r]=e[r]},n=function(e,t,r){return o(e,t,r)};te(),zt(),xt();var i=(Vt(),ee(Bt)),o=i.Buffer;o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?t.exports=i:(r(i,e),e.Buffer=n),n.prototype=Object.create(o.prototype),r(o,n),n.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,r)},n.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=o(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},n.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},n.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i.SlowBuffer(e)}})),Br=$((function(e){var t=function(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(c.isEncoding===f||!f(e)))throw Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=i,this.end=o,t=4;break;case"utf8":this.fillLast=n,t=4;break;case"base64":this.text=a,this.end=s,t=3;break;default:return this.write=u,void(this.end=l)}this.lastNeed=0,this.lastTotal=0,this.lastChar=c.allocUnsafe(t)},r=function(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2},n=function(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))},i=function(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)},o=function(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t},a=function(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))},s=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t},u=function(e){return e.toString(this.encoding)},l=function(e){return e&&e.length?this.write(e):""};te(),zt(),xt();var c=xr().Buffer,f=c.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};e.StringDecoder=t,t.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},t.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},t.prototype.text=function(e,t){var n=function(e,t,n){var i=t.length-1;if(i<n)return 0;var o=r(t[i]);return o>=0?(o>0&&(e.lastNeed=o-1),o):--i<n||-2===o?0:(o=r(t[i]))>=0?(o>0&&(e.lastNeed=o-2),o):--i<n||-2===o?0:(o=r(t[i]))>=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var i=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},t.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}})),Mr=$((function(e,t){te(),zt(),xt();var r=Sr(),n=Qt(),i=n.PromisePrototypeThen,o=n.SymbolAsyncIterator,a=n.SymbolIterator,s=(Vt(),ee(Bt)).Buffer,u=Yt().codes,l=u.ERR_INVALID_ARG_TYPE,c=u.ERR_STREAM_NULL_VALUES;t.exports=function(e,t,n){var u,f;if("string"==typeof t||t instanceof s)return new e((0,U.default)((0,L.default)({objectMode:!0},n),{read:function(){this.push(t),this.push(null)}}));if(t&&t[o])f=!0,u=t[o]();else{if(!t||!t[a])throw new l("iterable",["Iterable"],t);f=!1,u=t[a]()}var h=new e((0,L.default)({objectMode:!0,highWaterMark:1},n)),d=!1;return h._read=function(){d||(d=!0,(0,w.default)((function(){var e,t,r,n,i,o;return(0,K.__generator)(this,(function(a){switch(a.label){case 0:return a.trys.push([0,9,,10]),f?[4,u.next()]:[3,2];case 1:return r=a.sent(),[3,3];case 2:r=u.next(),a.label=3;case 3:return t=(e=r).value,e.done?(h.push(null),[3,8]):[3,4];case 4:return t&&"function"==typeof t.then?[4,t]:[3,6];case 5:return i=a.sent(),[3,7];case 6:i=t,a.label=7;case 7:if(null===(n=i))throw d=!1,new c;if(h.push(n))return[3,11];d=!1,a.label=8;case 8:return[3,10];case 9:return o=a.sent(),h.destroy(o),[3,10];case 10:return[3,12];case 11:return[3,0];case 12:return[2]}}))}))())},h._destroy=function(e,t){i(function(){var e=(0,w.default)((function(e){var t,r,n,i,o;return(0,K.__generator)(this,(function(a){switch(a.label){case 0:return t=null!=e,r="function"==typeof u.throw,t&&r?[4,u.throw(e)]:[3,3];case 1:return n=a.sent(),i=n.value,o=n.done,[4,i];case 2:if(a.sent(),o)return[2];a.label=3;case 3:return"function"!=typeof u.return?[3,6]:[4,u.return()];case 4:return[4,a.sent().value];case 5:a.sent(),a.label=6;case 6:return[2]}}))}));return function(t){return e.apply(this,arguments)}}()(e),(function(){return r.nextTick(t,e)}),(function(n){return r.nextTick(t,n||e)}))},h}})),jr=$((function(e,t){var r=function(e){return{enumerable:!1,get:function(){return!!(this.state&e)},set:function(t){t?this.state|=e:this.state&=~e}}},n=function(e,t,r){"boolean"!=typeof r&&(r=t instanceof Nr()),this.state=we|_e|be|me,e&&e.objectMode&&(this.state|=ye),r&&e&&e.readableObjectMode&&(this.state|=ye),this.highWaterMark=e?X(this,e,"readableHighWaterMark",r):$(!1),this.buffer=new G,this.length=0,this.pipes=[],this.flowing=null,this[fe]=null,e&&!1===e.emitClose&&(this.state&=-2049),e&&!1===e.autoDestroy&&(this.state&=-4097),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new he(e.encoding),this.encoding=e.encoding)},i=function(e,t,r,n){Q("readableAddChunk",t);var i,a=e._readableState;if(!(a.state&ye)&&("string"==typeof t?(r=r||a.defaultEncoding,a.encoding!==r&&(n&&a.encoding?t=q.from(t,r).toString(a.encoding):(t=q.from(t,r),r=""))):t instanceof q?r="":W._isUint8Array(t)?(t=W._uint8ArrayToBuffer(t),r=""):null!=t&&(i=new ie("chunk",["string","Buffer","Uint8Array"],t))),i)ge(e,i);else if(null===t)a.state&=-9,function(e,t){if(Q("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?s(e):(t.needReadable=!1,t.emittedReadable=!0,u(e))}}(e,a);else if(a.state&ye||t&&t.length>0)if(n)if(4&a.state)ge(e,new ue);else{if(a.destroyed||a.errored)return!1;o(e,a,t,!0)}else if(a.ended)ge(e,new se);else{if(a.destroyed||a.errored)return!1;a.state&=-9,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?o(e,a,t,!1):l(e,a)):o(e,a,t,!1)}else n||(a.state&=-9,l(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)},o=function(e,t,r,n){t.flowing&&0===t.length&&!t.sync&&e.listenerCount("data")>0?(65536&t.state?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),!!(64&t.state)&&s(e)),l(e,t)},a=function(e,t){return e<=0||0===t.length&&t.ended?0:t.state&ye?1:I(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0},s=function(e){var t=e._readableState;Q("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(Q("emitReadable",t.flowing),t.emittedReadable=!0,k.nextTick(u,e))},u=function(e){var t=e._readableState;Q("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&!t.errored&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,p(e)},l=function(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,k.nextTick(c,e,t))},c=function(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(Q("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1},f=function(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!1===t[fe]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)},h=function(e){Q("readable nexttick read 0"),e.read(0)},d=function(e,t){Q("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),p(e),t.flowing&&!t.reading&&e.read(0)},p=function(e){var t=e._readableState;for(Q("flow",t.flowing);t.flowing&&null!==e.read(););},v=function(e,t){"function"!=typeof e.read&&(e=ke.wrap(e,{objectMode:!0}));var r=function(){var e=(0,H.default)((function(e,t){var r,n,i,o,a;function s(t){this===e?(r(),r=ve):r=t}return(0,K.__generator)(this,(function(u){switch(u.label){case 0:r=ve,e.on("readable",s),i=z(e,{writable:!1},(function(e){n=e?re(n,e):null,r(),r=ve})),u.label=1;case 1:return u.trys.push([1,7,8,9]),null===(o=e.destroyed?null:e.read())?[3,3]:[4,o];case 2:return u.sent(),[3,5];case 3:if(n)throw n;return null===n?[2]:[4,(0,_.default)(new C(s))];case 4:u.sent(),u.label=5;case 5:return[3,1];case 6:return[3,9];case 7:throw a=u.sent(),n=re(n,a);case 8:return!n&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==n&&!e._readableState.autoDestroy?(e.off("readable",s),i()):Y.destroyer(e,null),[7];case 9:return[2]}}))}));return function(t,r){return e.apply(this,arguments)}}()(e,t);return r.stream=e,r},g=function(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r},y=function(e){var t=e._readableState;Q("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,k.nextTick(b,t,e))},b=function(e,t){if(Q("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)k.nextTick(m,t);else if(e.autoDestroy){var r=t._writableState;(!r||r.autoDestroy&&(r.finished||!1===r.writable))&&t.destroy()}},m=function(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()},w=function(){return void 0===pe&&(pe={}),pe};te(),zt(),xt();var k=Sr(),E=Qt(),S=E.ArrayPrototypeIndexOf,A=E.NumberIsInteger,I=E.NumberIsNaN,T=E.NumberParseInt,P=E.ObjectDefineProperties,O=E.ObjectKeys,R=E.ObjectSetPrototypeOf,C=E.Promise,x=E.SafeSet,B=E.SymbolAsyncDispose,M=E.SymbolAsyncIterator,j=E.Symbol;t.exports=ke,ke.ReadableState=n;var N=(_r(),ee(pr)).EventEmitter,D=Pr(),W=D.Stream,F=D.prependListener,q=(Vt(),ee(Bt)).Buffer,V=Or().addAbortSignal,z=Ir(),Q=kr().debuglog("stream",(function(e){Q=e})),G=Rr(),Y=Tr(),J=Cr(),X=J.getHighWaterMark,$=J.getDefaultHighWaterMark,Z=Yt(),re=Z.aggregateTwoErrors,ne=Z.codes,ie=ne.ERR_INVALID_ARG_TYPE,oe=ne.ERR_METHOD_NOT_IMPLEMENTED,ae=ne.ERR_OUT_OF_RANGE,se=ne.ERR_STREAM_PUSH_AFTER_EOF,ue=ne.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,le=Z.AbortError,ce=Er().validateObject,fe=j("kPaused"),he=Br().StringDecoder,de=Mr();R(ke.prototype,W.prototype),R(ke,W);var pe,ve=function(){},ge=Y.errorOrDestroy,ye=1,be=16,me=32,we=2048,_e=4096;function ke(e){var t=this;if(!(this instanceof ke))return new ke(e);var r=this instanceof Nr();this._readableState=new n(e,this,r),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!r&&V(e.signal,this)),W.call(this,e),Y.construct(this,(function(){t._readableState.needReadable&&l(t,t._readableState)}))}P(n.prototype,{objectMode:r(ye),ended:r(2),endEmitted:r(4),reading:r(8),constructed:r(be),sync:r(me),needReadable:r(64),emittedReadable:r(128),readableListening:r(256),resumeScheduled:r(512),errorEmitted:r(1024),emitClose:r(we),autoDestroy:r(_e),destroyed:r(8192),closed:r(16384),closeEmitted:r(32768),multiAwaitDrain:r(65536),readingMore:r(131072),dataEmitted:r(262144)}),ke.prototype.destroy=Y.destroy,ke.prototype._undestroy=Y.undestroy,ke.prototype._destroy=function(e,t){t(e)},ke.prototype[N.captureRejectionSymbol]=function(e){this.destroy(e)},ke.prototype[B]=function(){var e,t=this;return this.destroyed||(e=this.readableEnded?null:new le,this.destroy(e)),new C((function(r,n){return z(t,(function(t){return t&&t!==e?n(t):r(null)}))}))},ke.prototype.push=function(e,t){return i(this,e,t,!1)},ke.prototype.unshift=function(e,t){return i(this,e,t,!0)},ke.prototype.isPaused=function(){var e=this._readableState;return!0===e[fe]||!1===e.flowing},ke.prototype.setEncoding=function(e){var t=new he(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;var r=this._readableState.buffer,n="",i=!0,o=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var l=s.value;n+=t.write(l)}}catch(e){o=!0,a=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},ke.prototype.read=function(e){Q("read",e),void 0===e?e=NaN:A(e)||(e=T(e,10));var t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new ae("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return Q("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?y(this):s(this),null;if(0===(e=a(e,t))&&t.ended)return 0===t.length&&y(this),null;var n,i=!!(64&t.state);if(Q("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&Q("length less than watermark",i=!0),t.ended||t.reading||t.destroyed||t.errored||!t.constructed)Q("reading, ended or constructing",i=!1);else if(i){Q("do read"),t.state|=8|me,0===t.length&&(t.state|=64);try{this._read(t.highWaterMark)}catch(e){ge(this,e)}t.state&=-33,t.reading||(e=a(r,t))}return null===(n=e>0?g(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&y(this)),null!==n&&!t.errorEmitted&&!t.closeEmitted&&(t.dataEmitted=!0,this.emit("data",n)),n},ke.prototype._read=function(){throw new oe("_read()")},ke.prototype.pipe=function(e,t){var r=function(){Q("onend"),e.end()},n=function(){h||(1===l.pipes.length&&l.pipes[0]===e?(Q("false write response, pause",0),l.awaitDrainWriters=e,l.multiAwaitDrain=!1):l.pipes.length>1&&l.pipes.includes(e)&&(Q("false write response, pause",l.awaitDrainWriters.size),l.awaitDrainWriters.add(e)),u.pause()),f||(f=function(e,t){return function(){var r=e._readableState;r.awaitDrainWriters===t?(Q("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(Q("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),(!r.awaitDrainWriters||0===r.awaitDrainWriters.size)&&e.listenerCount("data")&&e.resume()}}(u,e),e.on("drain",f))},i=function(t){Q("ondata");var r=e.write(t);Q("dest.write",r),!1===r&&n()},o=function(){e.removeListener("finish",a),s()},a=function(){Q("onfinish"),e.removeListener("close",o),s()},s=function(){Q("unpipe"),u.unpipe(e)},u=this,l=this._readableState;1===l.pipes.length&&(l.multiAwaitDrain||(l.multiAwaitDrain=!0,l.awaitDrainWriters=new x(l.awaitDrainWriters?[l.awaitDrainWriters]:[]))),l.pipes.push(e),Q("pipe count=%d opts=%j",l.pipes.length,t);var c=t&&!1===t.end||e===k.stdout||e===k.stderr?s:r;l.endEmitted?k.nextTick(c):u.once("end",c),e.on("unpipe",(function t(n,c){Q("onunpipe"),n===u&&c&&!1===c.hasUnpiped&&(c.hasUnpiped=!0,Q("cleanup"),e.removeListener("close",o),e.removeListener("finish",a),f&&e.removeListener("drain",f),e.removeListener("error",d),e.removeListener("unpipe",t),u.removeListener("end",r),u.removeListener("end",s),u.removeListener("data",i),h=!0,f&&l.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&f())}));var f,h=!1;function d(t){if(Q("onerror",t),s(),e.removeListener("error",d),0===e.listenerCount("error")){var r=e._writableState||e._readableState;r&&!r.errorEmitted?ge(e,t):e.emit("error",t)}}return u.on("data",i),F(e,"error",d),e.once("close",o),e.once("finish",a),e.emit("pipe",u),!0===e.writableNeedDrain?n():l.flowing||(Q("pipe resume"),u.resume()),e},ke.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipes.length)return this;if(!e){var r=t.pipes;t.pipes=[],this.pause();for(var n=0;n<r.length;n++)r[n].emit("unpipe",this,{hasUnpiped:!1});return this}var i=S(t.pipes,e);return-1===i||(t.pipes.splice(i,1),0===t.pipes.length&&this.pause(),e.emit("unpipe",this,{hasUnpiped:!1})),this},ke.prototype.on=function(e,t){var r=W.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,Q("on readable",n.length,n.reading),n.length?s(this):n.reading||k.nextTick(h,this)),r},ke.prototype.addListener=ke.prototype.on,ke.prototype.removeListener=function(e,t){var r=W.prototype.removeListener.call(this,e,t);return"readable"===e&&k.nextTick(f,this),r},ke.prototype.off=ke.prototype.removeListener,ke.prototype.removeAllListeners=function(e){var t=W.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&k.nextTick(f,this),t},ke.prototype.resume=function(){var e=this._readableState;return e.flowing||(Q("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,k.nextTick(d,e,t))}(this,e)),e[fe]=!1,this},ke.prototype.pause=function(){return Q("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(Q("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[fe]=!0,this},ke.prototype.wrap=function(e){var t=this,r=!1;e.on("data",(function(n){!t.push(n)&&e.pause&&(r=!0,e.pause())})),e.on("end",(function(){t.push(null)})),e.on("error",(function(e){ge(t,e)})),e.on("close",(function(){t.destroy()})),e.on("destroy",(function(){t.destroy()})),this._read=function(){r&&e.resume&&(r=!1,e.resume())};for(var n=O(e),i=1;i<n.length;i++){var o=n[i];void 0===this[o]&&"function"==typeof e[o]&&(this[o]=e[o].bind(e))}return this},ke.prototype[M]=function(){return v(this)},ke.prototype.iterator=function(e){return void 0!==e&&ce(e,"options"),v(this,e)},P(ke.prototype,{readable:{__proto__:null,get:function(){var e=this._readableState;return!(!e||!1===e.readable||e.destroyed||e.errorEmitted||e.endEmitted)},set:function(e){this._readableState&&(this._readableState.readable=!!e)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._readableState.readable||!this._readableState.destroyed&&!this._readableState.errored||this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}},readableLength:{__proto__:null,enumerable:!1,get:function(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get:function(){return!!this._readableState&&this._readableState.objectMode}},readableEncoding:{__proto__:null,enumerable:!1,get:function(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get:function(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get:function(){return!!this._readableState&&this._readableState.closed}},destroyed:{__proto__:null,enumerable:!1,get:function(){return!!this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}},readableEnded:{__proto__:null,enumerable:!1,get:function(){return!!this._readableState&&this._readableState.endEmitted}}}),P(n.prototype,{pipesCount:{__proto__:null,get:function(){return this.pipes.length}},paused:{__proto__:null,get:function(){return!1!==this[fe]},set:function(e){this[fe]=!!e}}}),ke._fromList=g,ke.from=function(e,t){return de(ke,e,t)},ke.fromWeb=function(e,t){return w().newStreamReadableFromReadableStream(e,t)},ke.toWeb=function(e,t){return w().newReadableStreamFromStreamReadable(e,t)},ke.wrap=function(e,t){var r,n;return new ke((0,U.default)((0,L.default)({objectMode:null===(r=null!==(n=e.readableObjectMode)&&void 0!==n?n:e.objectMode)||void 0===r||r},t),{destroy:function(t,r){Y.destroyer(e,t),r(t)}})).wrap(e)}})),Lr=$((function(e,t){var r=function(){},n=function(e,t,r){"boolean"!=typeof r&&(r=t instanceof Nr()),this.objectMode=!(!e||!e.objectMode),r&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?M(this,e,"writableHighWaterMark",r):j(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=!(!e||!1!==e.decodeStrings);this.decodeStrings=!n,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=u.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,i(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[Q]=[]},i=function(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0},o=function(e,t,n,i){var o,a=e._writableState;if("function"==typeof n)i=n,n=a.defaultEncoding;else{if(n){if("buffer"!==n&&!R.isEncoding(n))throw new z(n)}else n=a.defaultEncoding;"function"!=typeof i&&(i=r)}if(null===t)throw new H;if(!a.objectMode)if("string"==typeof t)!1!==a.decodeStrings&&(t=R.from(t,n),n="buffer");else if(t instanceof R)n="buffer";else{if(!O._isUint8Array(t))throw new U("chunk",["string","Buffer","Uint8Array"],t);t=O._uint8ArrayToBuffer(t),n="buffer"}return a.ending?o=new V:a.destroyed&&(o=new F("write")),o?(y.nextTick(i,o),K(e,o,!0),o):(a.pendingcb++,function(e,t,n,i,o){var a=t.objectMode?1:n.length;t.length+=a;var s=t.length<t.highWaterMark;return s||(t.needDrain=!0),t.writing||t.corked||t.errored||!t.constructed?(t.buffered.push({chunk:n,encoding:i,callback:o}),t.allBuffers&&"buffer"!==i&&(t.allBuffers=!1),t.allNoop&&o!==r&&(t.allNoop=!1)):(t.writelen=a,t.writecb=o,t.writing=!0,t.sync=!0,e._write(n,i,t.onwrite),t.sync=!1),s&&!t.errored&&!t.destroyed}(e,a,t,n,i))},a=function(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new F("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1},s=function(e,t,r,n){--t.pendingcb,n(r),f(t),K(e,r)},u=function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;"function"==typeof i?(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t?(t.stack,r.errored||(r.errored=t),e._readableState&&!e._readableState.errored&&(e._readableState.errored=t),n?y.nextTick(s,e,r,t,i):s(e,r,t,i)):(r.buffered.length>r.bufferedIndex&&h(e,r),n?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===i?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:i,stream:e,state:r},y.nextTick(l,r.afterWriteTickInfo)):c(e,r,1,i))):K(e,new D)},l=function(e){var t=e.stream,r=e.state,n=e.count,i=e.cb;return r.afterWriteTickInfo=null,c(t,r,n,i)},c=function(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&f(t),p(e,t)},f=function(e){if(!e.writing){for(var t=e.bufferedIndex;t<e.buffered.length;++t){var r,n=e.buffered[t],o=n.chunk,a=n.callback,s=e.objectMode?1:o.length;e.length-=s,a(null!==(r=e.errored)&&void 0!==r?r:new F("write"))}for(var u=e[Q].splice(0),l=0;l<u.length;l++){var c;u[l](null!==(c=e.errored)&&void 0!==c?c:new F("end"))}i(e)}},h=function(e,t){if(!(t.corked||t.bufferProcessing||t.destroyed)&&t.constructed){var n=t.buffered,o=t.bufferedIndex,s=t.objectMode,u=n.length-o;if(u){var l=o;if(t.bufferProcessing=!0,u>1&&e._writev){t.pendingcb-=u-1;var c=t.allNoop?r:function(e){for(var t=l;t<n.length;++t)n[t].callback(e)},f=t.allNoop&&0===l?n:m(n,l);f.allBuffers=t.allBuffers,a(e,t,!0,t.length,f,"",c),i(t)}else{do{var h=n[l],d=h.chunk,p=h.encoding,v=h.callback;n[l++]=null,a(e,t,!1,s?1:d.length,d,p,v)}while(l<n.length&&!t.writing);l===n.length?i(t):l>256?(n.splice(0,l),t.bufferedIndex=0):t.bufferedIndex=l}t.bufferProcessing=!1}}},d=function(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted},p=function(e,t,r){d(t)&&(function(e,t){!t.prefinished&&!t.finalCalled&&("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){var r=!1;function n(n){if(r)K(e,null!=n?n:D());else if(r=!0,t.pendingcb--,n){for(var i=t[Q].splice(0),o=0;o<i.length;o++)i[o](n);K(e,n,t.sync)}else d(t)&&(t.prefinished=!0,e.emit("prefinish"),t.pendingcb++,y.nextTick(v,e,t))}t.sync=!0,t.pendingcb++;try{e._final(n)}catch(e){n(e)}t.sync=!1}(e,t)))}(e,t),0===t.pendingcb&&(r?(t.pendingcb++,y.nextTick((function(e,t){d(t)?v(e,t):t.pendingcb--}),e,t)):d(t)&&(t.pendingcb++,v(e,t))))},v=function(e,t){t.pendingcb--,t.finished=!0;for(var r=t[Q].splice(0),n=0;n<r.length;n++)r[n]();if(e.emit("finish"),t.autoDestroy){var i=e._readableState;(!i||i.autoDestroy&&(i.endEmitted||!1===i.readable))&&e.destroy()}},g=function(){return void 0===Y&&(Y={}),Y};te(),zt(),xt();var y=Sr(),b=Qt(),m=b.ArrayPrototypeSlice,w=b.Error,_=b.FunctionPrototypeSymbolHasInstance,k=b.ObjectDefineProperty,E=b.ObjectDefineProperties,S=b.ObjectSetPrototypeOf,A=b.StringPrototypeToLowerCase,I=b.Symbol,T=b.SymbolHasInstance;t.exports=G,G.WritableState=n;var P=(_r(),ee(pr)).EventEmitter,O=Pr().Stream,R=(Vt(),ee(Bt)).Buffer,C=Tr(),x=Or().addAbortSignal,B=Cr(),M=B.getHighWaterMark,j=B.getDefaultHighWaterMark,L=Yt().codes,U=L.ERR_INVALID_ARG_TYPE,N=L.ERR_METHOD_NOT_IMPLEMENTED,D=L.ERR_MULTIPLE_CALLBACK,W=L.ERR_STREAM_CANNOT_PIPE,F=L.ERR_STREAM_DESTROYED,q=L.ERR_STREAM_ALREADY_FINISHED,H=L.ERR_STREAM_NULL_VALUES,V=L.ERR_STREAM_WRITE_AFTER_END,z=L.ERR_UNKNOWN_ENCODING,K=C.errorOrDestroy;S(G.prototype,O.prototype),S(G,O);var Q=I("kOnFinished");function G(e){var t=this,r=this instanceof Nr();if(!r&&!_(G,this))return new G(e);this._writableState=new n(e,this,r),e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&x(e.signal,this)),O.call(this,e),C.construct(this,(function(){var e=t._writableState;e.writing||h(t,e),p(t,e)}))}n.prototype.getBuffer=function(){return m(this.buffered,this.bufferedIndex)},k(n.prototype,"bufferedRequestCount",{__proto__:null,get:function(){return this.buffered.length-this.bufferedIndex}}),k(G,T,{__proto__:null,value:function(e){return!!_(this,e)||this===G&&e&&e._writableState instanceof n}}),G.prototype.pipe=function(){K(this,new W)},G.prototype.write=function(e,t,r){return!0===o(this,e,t,r)},G.prototype.cork=function(){this._writableState.corked++},G.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||h(this,e))},G.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=A(e)),!R.isEncoding(e))throw new z(e);return this._writableState.defaultEncoding=e,this},G.prototype._write=function(e,t,r){if(!this._writev)throw new N("_write()");this._writev([{chunk:e,encoding:t}],r)},G.prototype._writev=null,G.prototype.end=function(e,t,r){var n,i=this._writableState;if("function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e){var a=o(this,e,t);a instanceof w&&(n=a)}return i.corked&&(i.corked=1,this.uncork()),n||(i.errored||i.ending?i.finished?n=new q("end"):i.destroyed&&(n=new F("end")):(i.ending=!0,p(this,i,!0),i.ended=!0)),"function"==typeof r&&(n||i.finished?y.nextTick(r,n):i[Q].push(r)),this},E(G.prototype,{closed:{__proto__:null,get:function(){return!!this._writableState&&this._writableState.closed}},destroyed:{__proto__:null,get:function(){return!!this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}},writable:{__proto__:null,get:function(){var e=this._writableState;return!(!e||!1===e.writable||e.destroyed||e.errored||e.ending||e.ended)},set:function(e){this._writableState&&(this._writableState.writable=!!e)}},writableFinished:{__proto__:null,get:function(){return!!this._writableState&&this._writableState.finished}},writableObjectMode:{__proto__:null,get:function(){return!!this._writableState&&this._writableState.objectMode}},writableBuffer:{__proto__:null,get:function(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get:function(){return!!this._writableState&&this._writableState.ending}},writableNeedDrain:{__proto__:null,get:function(){var e=this._writableState;return!!e&&!e.destroyed&&!e.ending&&e.needDrain}},writableHighWaterMark:{__proto__:null,get:function(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get:function(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get:function(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get:function(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!(!1===this._writableState.writable||!this._writableState.destroyed&&!this._writableState.errored||this._writableState.finished)}}});var Y,J=C.destroy;G.prototype.destroy=function(e,t){var r=this._writableState;return!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[Q].length)&&y.nextTick(f,r),J.call(this,e,t),this},G.prototype._undestroy=C.undestroy,G.prototype._destroy=function(e,t){t(e)},G.prototype[P.captureRejectionSymbol]=function(e){this.destroy(e)},G.fromWeb=function(e,t){return g().newStreamWritableFromWritableStream(e,t)},G.toWeb=function(e){return g().newWritableStreamFromStreamWritable(e)}})),Ur=$((function(e,t){var r=function(e){var t,r,n,i,o,u=e.readable&&"function"!=typeof e.readable.read?I.wrap(e.readable):e.readable,l=e.writable,c=!!a(u),f=!!s(l);function h(e){var t=i;i=null,t?t(e):e&&o.destroy(e)}return o=new M({readableObjectMode:!(null==u||!u.readableObjectMode),writableObjectMode:!(null==l||!l.writableObjectMode),readable:c,writable:f}),f&&(v(l,(function(e){f=!1,e&&S(u,e),h(e)})),o._write=function(e,r,n){l.write(e,r)?n():t=n},o._final=function(e){l.end(),r=e},l.on("drain",(function(){if(t){var e=t;t=null,e()}})),l.on("finish",(function(){if(r){var e=r;r=null,e()}}))),c&&(v(u,(function(e){c=!1,e&&S(u,e),h(e)})),u.on("readable",(function(){if(n){var e=n;n=null,e()}})),u.on("end",(function(){o.push(null)})),o._read=function(){for(;;){var e=u.read();if(null===e)return void(n=o._read);if(!o.push(e))return}}),o._destroy=function(e,o){!e&&null!==i&&(e=new y),n=null,t=null,r=null,null===i?o(e):(i=o,S(l,e),S(u,e))},o};te(),zt(),xt();var n=Sr(),i=(Vt(),ee(Bt)),o=Ar(),a=o.isReadable,s=o.isWritable,u=o.isIterable,l=o.isNodeStream,c=o.isReadableNodeStream,f=o.isWritableNodeStream,h=o.isDuplexNodeStream,d=o.isReadableStream,p=o.isWritableStream,v=Ir(),g=Yt(),y=g.AbortError,b=g.codes,m=b.ERR_INVALID_ARG_TYPE,E=b.ERR_INVALID_RETURN_VALUE,S=Tr().destroyer,A=Nr(),I=jr(),T=Lr(),P=kr().createDeferredPromise,O=Mr(),R=globalThis.Blob||i.Blob,C=(void 0===R?"undefined":(0,q.default)(R))<"u"?function(e){return e instanceof R}:function(){return!1},x=globalThis.AbortController||Jt().AbortController,B=Qt().FunctionPrototypeCall,M=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(e){var n;return(0,k.default)(this,r),n=t.call(this,e),!1===(null==e?void 0:e.readable)&&(n._readableState.readable=!1,n._readableState.ended=!0,n._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(n._writableState.writable=!1,n._writableState.ending=!0,n._writableState.ended=!0,n._writableState.finished=!0),(0,D.default)(n)}return r}(A);t.exports=function e(t,i){if(h(t))return t;if(c(t))return r({readable:t});if(f(t))return r({writable:t});if(l(t))return r({writable:!1,readable:!1});if(d(t))return r({readable:I.fromWeb(t)});if(p(t))return r({writable:T.fromWeb(t)});if("function"==typeof t){var o=function(e){var t=P(),r=t.promise,i=t.resolve,o=new x,a=o.signal;return{value:e((0,H.default)((function(){var e,t,o,s,u,l;return(0,K.__generator)(this,(function(c){switch(c.label){case 0:return e=r,r=null,[4,(0,_.default)(e)];case 1:if(t=c.sent(),o=t.chunk,s=t.done,u=t.cb,n.nextTick(u),s)return[2];if(a.aborted)throw new y(void 0,{cause:a.reason});return l=P(),r=l.promise,i=l.resolve,[4,o];case 2:c.sent(),c.label=3;case 3:return[3,0];case 4:return[2]}}))}))(),{signal:a}),write:function(e,t,r){var n=i;i=null,n({chunk:e,done:!1,cb:r})},final:function(e){var t=i;i=null,t({done:!0,cb:e})},destroy:function(e,t){o.abort(),t(e)}}}(t),a=o.value,s=o.write,v=o.final,g=o.destroy;if(u(a))return O(M,a,{objectMode:!0,write:s,final:v,destroy:g});var b=null==a?void 0:a.then;if("function"==typeof b){var k,A=B(b,a,(function(e){if(null!=e)throw new E("nully","body",e)}),(function(e){S(k,e)}));return k=new M({objectMode:!0,readable:!1,write:s,final:function(e){v((0,w.default)((function(){var t;return(0,K.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,A];case 1:return r.sent(),n.nextTick(e,null),[3,3];case 2:return t=r.sent(),n.nextTick(e,t),[3,3];case 3:return[2]}}))})))},destroy:g})}throw new E("Iterable, AsyncIterable or AsyncFunction",i,a)}if(C(t))return e(t.arrayBuffer());if(u(t))return O(M,t,{objectMode:!0,writable:!1});if(d(null==t?void 0:t.readable)&&p(null==t?void 0:t.writable))return M.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return r({readable:null!=t&&t.readable?c(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?f(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});var R,j=null==t?void 0:t.then;if("function"==typeof j)return B(j,t,(function(e){null!=e&&R.push(e),R.push(null)}),(function(e){S(R,e)})),R=new M({objectMode:!0,writable:!1,read:function(){}});throw new m(i,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}})),Nr=$((function(e,t){var r=function(){return void 0===u&&(u={}),u};te(),zt(),xt();var n=Qt(),i=n.ObjectDefineProperties,o=n.ObjectGetOwnPropertyDescriptor,a=n.ObjectKeys,s=n.ObjectSetPrototypeOf;t.exports=v;var u,l,c=jr(),f=Lr();s(v.prototype,c.prototype),s(v,c);for(var h=a(f.prototype),d=0;d<h.length;d++){var p=h[d];v.prototype[p]||(v.prototype[p]=f.prototype[p])}function v(e){if(!(this instanceof v))return new v(e);c.call(this,e),f.call(this,e),e?(this.allowHalfOpen=!1!==e.allowHalfOpen,!1===e.readable&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===e.writable&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}i(v.prototype,{writable:(0,L.default)({__proto__:null},o(f.prototype,"writable")),writableHighWaterMark:(0,L.default)({__proto__:null},o(f.prototype,"writableHighWaterMark")),writableObjectMode:(0,L.default)({__proto__:null},o(f.prototype,"writableObjectMode")),writableBuffer:(0,L.default)({__proto__:null},o(f.prototype,"writableBuffer")),writableLength:(0,L.default)({__proto__:null},o(f.prototype,"writableLength")),writableFinished:(0,L.default)({__proto__:null},o(f.prototype,"writableFinished")),writableCorked:(0,L.default)({__proto__:null},o(f.prototype,"writableCorked")),writableEnded:(0,L.default)({__proto__:null},o(f.prototype,"writableEnded")),writableNeedDrain:(0,L.default)({__proto__:null},o(f.prototype,"writableNeedDrain")),destroyed:{__proto__:null,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState&&this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}}),v.fromWeb=function(e,t){return r().newStreamDuplexFromReadableWritablePair(e,t)},v.toWeb=function(e){return r().newReadableWritablePairFromDuplex(e)},v.from=function(e){return l||(l=Ur()),l(e,"body")}})),Dr=$((function(e,t){var r=function(e){var t=this;"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush((function(r,n){r?e?e(r):t.destroy(r):(null!=n&&t.push(n),t.push(null),e&&e())}))},n=function(){this._final!==r&&r.call(this)};te(),zt(),xt();var i=Qt(),o=i.ObjectSetPrototypeOf,a=i.Symbol;t.exports=f;var s=Yt().codes.ERR_METHOD_NOT_IMPLEMENTED,u=Nr(),l=Cr().getHighWaterMark;o(f.prototype,u.prototype),o(f,u);var c=a("kCallback");function f(e){if(!(this instanceof f))return new f(e);var t=e?l(this,e,"readableHighWaterMark",!0):null;0===t&&(e=(0,U.default)((0,L.default)({},e),{highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0})),u.call(this,e),this._readableState.sync=!1,this[c]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",n)}f.prototype._final=r,f.prototype._transform=function(){throw new s("_transform()")},f.prototype._write=function(e,t,r){var n=this,i=this._readableState,o=this._writableState,a=i.length;this._transform(e,t,(function(e,t){e?r(e):(null!=t&&n.push(t),o.ended||a===i.length||i.length<i.highWaterMark?r():n[c]=r)}))},f.prototype._read=function(){if(this[c]){var e=this[c];this[c]=null,e()}}})),Wr=$((function(e,t){te(),zt(),xt();var r=Qt().ObjectSetPrototypeOf;t.exports=i;var n=Dr();function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(i.prototype,n.prototype),r(i,n),i.prototype._transform=function(e,t,r){r(null,e)}})),Fr=$((function(e,t){var r=function(e,t,r){var n=!1;e.on("close",(function(){n=!0}));var i=v(e,{readable:t,writable:r},(function(e){n=!e}));return{destroy:function(t){n||(n=!0,y.destroyer(e,t||new O("pipe")))},cleanup:i}},n=function(e){if(L(e))return e;if(N(e))return(t=(0,H.default)((function(e){return(0,K.__generator)(this,(function(t){switch(t.label){case 0:return s||(s=jr()),[5,(0,K.__values)((0,b.default)((0,m.default)(s.prototype[d].call(e)),_.default))];case 1:return t.sent(),[2]}}))})),function(e){return t.apply(this,arguments)})(e);var t;throw new I("val",["Readable","Iterable","AsyncIterable"],e)},i=function(e,t,i){var s=function(t){var s=e[t],u=t<e.length-1,c=t>0,f=u||!1!==(null==i?void 0:i.end),h=t===e.length-1;if(D(s)){var p=function(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&S(e)};if(f){var v=r(s,u,c),y=v.destroy,b=v.cleanup;_.push(y),U(s)&&h&&g.push(b)}s.on("error",p),U(s)&&h&&g.push((function(){s.removeListener("error",p)}))}if(0===t)if("function"==typeof s){if(w=s({signal:d}),!L(w))throw new T("Iterable, AsyncIterable or Stream","source",w)}else w=L(s)||N(s)||W(s)?s:k.from(s);else if("function"==typeof s){var A;if(w=W(w)?n(null===(A=w)||void 0===A?void 0:A.readable):n(w),w=s(w,{signal:d}),u){if(!L(w,!0))throw new T("AsyncIterable","transform[".concat(t-1,"]"),w)}else{var P;a||(a=Wr());var O=new a({objectMode:!0}),R=null===(P=w)||void 0===P?void 0:P.then;if("function"==typeof R)E++,R.call(w,(function(e){m=e,null!=e&&O.write(e),f&&O.end(),l.nextTick(S)}),(function(e){O.destroy(e),l.nextTick(S,e)}));else if(L(w,!0))E++,Q(w,O,S,{end:f});else{if(!q(w)&&!W(w))throw new T("AsyncIterable or Promise","destination",w);var C=w.readable||w;E++,Q(C,O,S,{end:f})}var x=r(w=O,!1,!0),B=x.destroy,M=x.cleanup;_.push(B),h&&g.push(M)}}else if(D(s)){if(N(w)){E+=2;var j=o(w,s,S,{end:f});U(s)&&h&&g.push(j)}else if(W(w)||q(w)){var H=w.readable||w;E++,Q(H,s,S,{end:f})}else{if(!L(w))throw new I("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],w);E++,Q(w,s,S,{end:f})}w=s}else if(F(s)){if(N(w))E++,Y(n(w),s,S,{end:f});else if(q(w)||L(w))E++,Y(w,s,S,{end:f});else{if(!W(w))throw new I("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],w);E++,Y(w.readable,s,S,{end:f})}w=s}else w=k.from(s)};if(1===e.length&&f(e[0])&&(e=e[0]),e.length<2)throw new P("streams");var c,h=new z,d=h.signal,v=null==i?void 0:i.signal,g=[];function y(){A(new C)}M(v,"options.signal"),u=u||kr().addAbortListener,v&&(c=u(v,y));var b,m,w,_=[],E=0;function S(e){A(e,0==--E)}function A(e,r){var n;if(e&&(!b||"ERR_STREAM_PREMATURE_CLOSE"===b.code)&&(b=e),b||r){for(;_.length;)_.shift()(b);null===(n=c)||void 0===n||n[p](),h.abort(),r&&(b||g.forEach((function(e){return e()})),l.nextTick(t,b,m))}}for(var O=0;O<e.length;O++)s(O);return(null!=d&&d.aborted||null!=v&&v.aborted)&&l.nextTick(y),w},o=function(e,t,r,n){var i=n.end,o=!1;if(t.on("close",(function(){o||r(new R)})),e.pipe(t,{end:!1}),i){var a=function(){o=!0,t.end()};V(e)?l.nextTick(a):e.once("end",a)}else r();return v(e,{readable:!0,writable:!1},(function(t){var n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),v(t,{readable:!1,writable:!0},r)};te(),zt(),xt();var a,s,u,l=Sr(),c=Qt(),f=c.ArrayIsArray,h=c.Promise,d=c.SymbolAsyncIterator,p=c.SymbolDispose,v=Ir(),g=kr().once,y=Tr(),k=Nr(),E=Yt(),S=E.aggregateTwoErrors,A=E.codes,I=A.ERR_INVALID_ARG_TYPE,T=A.ERR_INVALID_RETURN_VALUE,P=A.ERR_MISSING_ARGS,O=A.ERR_STREAM_DESTROYED,R=A.ERR_STREAM_PREMATURE_CLOSE,C=E.AbortError,x=Er(),B=x.validateFunction,M=x.validateAbortSignal,j=Ar(),L=j.isIterable,U=j.isReadable,N=j.isReadableNodeStream,D=j.isNodeStream,W=j.isTransformStream,F=j.isWebStream,q=j.isReadableStream,V=j.isReadableFinished,z=globalThis.AbortController||Jt().AbortController;function Q(e,t,r,n){return G.apply(this,arguments)}function G(){return G=(0,w.default)((function(e,t,r,n){var i,o,a,s,u,l,c,f,d,p,g,y,b,w,_;return(0,K.__generator)(this,(function(k){switch(k.label){case 0:i=n.end,a=null,s=function(e){if(e&&(o=e),a){var t=a;a=null,t()}},u=function(){return new h((function(e,t){o?t(o):a=function(){o?t(o):e()}}))},t.on("drain",s),l=v(t,{readable:!1},s),k.label=1;case 1:return k.trys.push([1,20,21,22]),t.writableNeedDrain?[4,u()]:[3,3];case 2:k.sent(),k.label=3;case 3:c=!1,f=!1,k.label=4;case 4:k.trys.push([4,11,12,17]),p=(0,m.default)(e),k.label=5;case 5:return[4,p.next()];case 6:return(c=!(g=k.sent()).done)?(y=g.value,b=y,t.write(b)?[3,8]:[4,u()]):[3,10];case 7:k.sent(),k.label=8;case 8:k.label=9;case 9:return c=!1,[3,5];case 10:return[3,17];case 11:return w=k.sent(),f=!0,d=w,[3,17];case 12:return k.trys.push([12,,15,16]),c&&null!=p.return?[4,p.return()]:[3,14];case 13:k.sent(),k.label=14;case 14:return[3,16];case 15:if(f)throw d;return[7];case 16:return[7];case 17:return i?(t.end(),[4,u()]):[3,19];case 18:k.sent(),k.label=19;case 19:return r(),[3,22];case 20:return _=k.sent(),r(o!==_?S(o,_):_),[3,22];case 21:return l(),t.off("drain",s),[7];case 22:return[2]}}))})),G.apply(this,arguments)}function Y(e,t,r,n){return J.apply(this,arguments)}function J(){return J=(0,w.default)((function(e,t,r,n){var i,o,a,s,u,l,c,f,h,d,p,v;return(0,K.__generator)(this,(function(g){switch(g.label){case 0:i=n.end,W(t)&&(t=t.writable),o=t.getWriter(),g.label=1;case 1:g.trys.push([1,18,,23]),a=!1,s=!1,g.label=2;case 2:g.trys.push([2,8,9,14]),l=(0,m.default)(e),g.label=3;case 3:return[4,l.next()];case 4:return(a=!(c=g.sent()).done)?(f=c.value,h=f,[4,o.ready]):[3,7];case 5:g.sent(),o.write(h).catch((function(){})),g.label=6;case 6:return a=!1,[3,3];case 7:return[3,14];case 8:return d=g.sent(),s=!0,u=d,[3,14];case 9:return g.trys.push([9,,12,13]),a&&null!=l.return?[4,l.return()]:[3,11];case 10:g.sent(),g.label=11;case 11:return[3,13];case 12:if(s)throw u;return[7];case 13:return[7];case 14:return[4,o.ready];case 15:return g.sent(),i?[4,o.close()]:[3,17];case 16:g.sent(),g.label=17;case 17:return r(),[3,23];case 18:p=g.sent(),g.label=19;case 19:return g.trys.push([19,21,,22]),[4,o.abort(p)];case 20:return g.sent(),r(p),[3,22];case 21:return v=g.sent(),r(v),[3,22];case 22:return[3,23];case 23:return[2]}}))})),J.apply(this,arguments)}t.exports={pipelineImpl:i,pipeline:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return i(t,g(function(e){return B(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(t)))}}})),qr=$((function(e,t){te(),zt(),xt();var r=Fr().pipeline,n=Nr(),i=Tr().destroyer,o=Ar(),a=o.isNodeStream,s=o.isReadable,u=o.isWritable,l=o.isWebStream,c=o.isTransformStream,f=o.isWritableStream,h=o.isReadableStream,d=Yt(),p=d.AbortError,v=d.codes,g=v.ERR_INVALID_ARG_VALUE,y=v.ERR_MISSING_ARGS,b=Ir();t.exports=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];if(0===t.length)throw new y("streams");if(1===t.length)return n.from(t[0]);var d,v,m,_,k,E=(0,F.default)(t);if("function"==typeof t[0]&&(t[0]=n.from(t[0])),"function"==typeof t[t.length-1]){var S=t.length-1;t[S]=n.from(t[S])}for(var A=0;A<t.length;++A)if(a(t[A])||l(t[A])){if(A<t.length-1&&!(s(t[A])||h(t[A])||c(t[A])))throw new g("streams[".concat(A,"]"),E[A],"must be readable");if(A>0&&!(u(t[A])||f(t[A])||c(t[A])))throw new g("streams[".concat(A,"]"),E[A],"must be writable")}var I,T=t[0],P=r(t,(function(e){var t=_;_=null,t?t(e):e?k.destroy(e):!R&&!O&&k.destroy()})),O=!!(u(T)||f(T)||c(T)),R=!!(s(P)||h(P)||c(P));if(k=new n({writableObjectMode:!(null==T||!T.writableObjectMode),readableObjectMode:!(null==P||!P.readableObjectMode),writable:O,readable:R}),O){if(a(T))k._write=function(e,t,r){T.write(e,t)?r():d=r},k._final=function(e){T.end(),v=e},T.on("drain",(function(){if(d){var e=d;d=null,e()}}));else if(l(T)){var C=(c(T)?T.writable:T).getWriter();k._write=(I=(0,w.default)((function(e,t,r){var n;return(0,K.__generator)(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,C.ready];case 1:return t.sent(),C.write(e).catch((function(){})),r(),[3,3];case 2:return n=t.sent(),r(n),[3,3];case 3:return[2]}}))})),function(e,t,r){return I.apply(this,arguments)}),k._final=function(){var e=(0,w.default)((function(e){var t;return(0,K.__generator)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),[4,C.ready];case 1:return r.sent(),C.close().catch((function(){})),v=e,[3,3];case 2:return t=r.sent(),e(t),[3,3];case 3:return[2]}}))}));return function(t){return e.apply(this,arguments)}}()}var x=c(P)?P.readable:P;b(x,(function(){if(v){var e=v;v=null,e()}}))}if(R)if(a(P))P.on("readable",(function(){if(m){var e=m;m=null,e()}})),P.on("end",(function(){k.push(null)})),k._read=function(){for(;;){var e=P.read();if(null===e)return void(m=k._read);if(!k.push(e))return}};else if(l(P)){var B=(c(P)?P.readable:P).getReader();k._read=(0,w.default)((function(){var e,t,r;return(0,K.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,B.read()];case 1:return e=n.sent(),t=e.value,r=e.done,k.push(t)?r?[2,void k.push(null)]:[3,3]:[2];case 2:return n.sent(),[2];case 3:return[3,0];case 4:return[2]}}))}))}return k._destroy=function(e,t){!e&&null!==_&&(e=new p),m=null,d=null,v=null,null===_?t(e):(_=t,a(P)&&i(P,e))},k}})),Hr=$((function(e,t){var r=function(e,t){if("function"!=typeof e)throw new l("fn",["Function","AsyncFunction"],e);null!=t&&g(t,"options"),null!=(null==t?void 0:t.signal)&&p(t.signal,"options.signal");var r=1;null!=(null==t?void 0:t.concurrency)&&(r=L(t.concurrency));var n=r-1;return null!=(null==t?void 0:t.highWaterMark)&&(n=L(t.highWaterMark)),v(r,"options.concurrency",1),v(n,"options.highWaterMark",0),n+=r,(0,H.default)((function(){var i,o,a,s,u,l,c,f,d;function p(){c=!0,v()}function v(){f-=1,g()}function g(){o&&!c&&f<r&&u.length<n&&(o(),o=null)}return(0,K.__generator)(this,(function(y){switch(y.label){case 0:a=kr().AbortSignalAny([null==t?void 0:t.signal].filter(M)),s=this,u=[],l={signal:a},c=!1,f=0,(0,w.default)((function(){var t,d,g,y,b,w,_,k,E,S;return(0,K.__generator)(this,(function(A){switch(A.label){case 0:A.trys.push([0,15,16,17]),t=!1,d=!1,A.label=1;case 1:A.trys.push([1,8,9,14]),y=(0,m.default)(s),A.label=2;case 2:return[4,y.next()];case 3:if(!(t=!(b=A.sent()).done))return[3,7];if(w=b.value,_=w,c)return[2];if(a.aborted)throw new h;try{if((_=e(_,l))===Y)return[3,6];_=V(_)}catch(e){_=q(e)}return f+=1,Q(_,v,p),u.push(_),i&&(i(),i=null),!c&&(u.length>=n||f>=r)?[4,new W((function(e){o=e}))]:[3,5];case 4:A.sent(),A.label=5;case 5:A.label=6;case 6:return t=!1,[3,2];case 7:return[3,14];case 8:return k=A.sent(),d=!0,g=k,[3,14];case 9:return A.trys.push([9,,12,13]),t&&null!=y.return?[4,y.return()]:[3,11];case 10:A.sent(),A.label=11;case 11:return[3,13];case 12:if(d)throw g;return[7];case 13:return[7];case 14:return u.push(J),[3,17];case 15:return E=A.sent(),S=q(E),Q(S,v,p),u.push(S),[3,17];case 16:return c=!0,i&&(i(),i=null),[7];case 17:return[2]}}))}))(),y.label=1;case 1:return y.trys.push([1,,10,11]),u.length>0?[4,(0,_.default)(u[0])]:[3,6];case 2:if((d=y.sent())===J)return[2];if(a.aborted)throw new h;return d!==Y?[4,d]:[3,4];case 3:y.sent(),y.label=4;case 4:u.shift(),g(),y.label=5;case 5:return[3,1];case 6:return[4,(0,_.default)(new W((function(e){i=e})))];case 7:y.sent(),y.label=8;case 8:return[3,1];case 9:return[3,11];case 10:return c=!0,o&&(o(),o=null),[7];case 11:return[2]}}))})).call(this)},n=function(e,t){if("function"!=typeof e)throw new l("fn",["Function","AsyncFunction"],e);return r.call(this,(n=(0,w.default)((function(t,r){return(0,K.__generator)(this,(function(n){switch(n.label){case 0:return[4,e(t,r)];case 1:return[2,n.sent()?t:Y]}}))})),function(e,t){return n.apply(this,arguments)}),t);var n},i=function(e){if(e=U(e),N(e))return 0;if(e<0)throw new f("number",">= 0",e);return e};te(),zt(),xt();var o=globalThis.AbortController||Jt().AbortController,a=Yt(),s=a.codes,u=s.ERR_INVALID_ARG_VALUE,l=s.ERR_INVALID_ARG_TYPE,c=s.ERR_MISSING_ARGS,f=s.ERR_OUT_OF_RANGE,h=a.AbortError,d=Er(),p=d.validateAbortSignal,v=d.validateInteger,g=d.validateObject,y=Qt().Symbol("kWeak"),E=Qt().Symbol("kResistStopPropagation"),S=Ir().finished,A=qr(),I=Or().addAbortSignalNoValidate,T=Ar(),P=T.isWritable,O=T.isNodeStream,R=kr().deprecate,C=Qt(),B=C.ArrayPrototypePush,M=C.Boolean,L=C.MathFloor,U=C.Number,N=C.NumberIsNaN,W=C.Promise,q=C.PromiseReject,V=C.PromiseResolve,Q=C.PromisePrototypeThen,G=C.Symbol,Y=G("kEmpty"),J=G("kEof");function X(e,t){return $.apply(this,arguments)}function $(){return $=(0,w.default)((function(e,t){var r,i,o,a,s,u;return(0,K.__generator)(this,(function(l){switch(l.label){case 0:r=!1,i=!1,l.label=1;case 1:l.trys.push([1,6,7,12]),a=(0,m.default)(n.call(this,e,t)),l.label=2;case 2:return[4,a.next()];case 3:return(r=!(s=l.sent()).done)?(s.value,[2,!0]):[3,5];case 4:return r=!1,[3,2];case 5:return[3,12];case 6:return u=l.sent(),i=!0,o=u,[3,12];case 7:return l.trys.push([7,,10,11]),r&&null!=a.return?[4,a.return()]:[3,9];case 8:l.sent(),l.label=9;case 9:return[3,11];case 10:if(i)throw o;return[7];case 11:return[7];case 12:return[2,!1]}}))})),$.apply(this,arguments)}var Z=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){var e;return(0,k.default)(this,r),(e=t.call(this,"reduce")).message="Reduce of an empty stream requires an initial value",(0,D.default)(e)}return r}(c);t.exports.streamReturningOperators={asIndexedPairs:R((function(e){return null!=e&&g(e,"options"),null!=(null==e?void 0:e.signal)&&p(e.signal,"options.signal"),(0,H.default)((function(){var t,r,n,i,o,a,s,u,l,c;return(0,K.__generator)(this,(function(f){switch(f.label){case 0:t=0,r=!1,n=!1,f.label=1;case 1:f.trys.push([1,7,8,13]),o=(0,m.default)(this),f.label=2;case 2:return[4,(0,_.default)(o.next())];case 3:if(!(r=!(a=f.sent()).done))return[3,6];if(s=a.value,u=s,null!=e&&null!==(l=e.signal)&&void 0!==l&&l.aborted)throw new h({cause:e.signal.reason});return[4,[t++,u]];case 4:f.sent(),f.label=5;case 5:return r=!1,[3,2];case 6:return[3,13];case 7:return c=f.sent(),n=!0,i=c,[3,13];case 8:return f.trys.push([8,,11,12]),r&&null!=o.return?[4,o.return()]:[3,10];case 9:f.sent(),f.label=10;case 10:return[3,12];case 11:if(n)throw i;return[7];case 12:return[7];case 13:return[2]}}))})).call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t){return null!=t&&g(t,"options"),null!=(null==t?void 0:t.signal)&&p(t.signal,"options.signal"),e=i(e),(0,H.default)((function(){var r,n,i,o,a,s,u,l,c,f;return(0,K.__generator)(this,(function(d){switch(d.label){case 0:if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new h;n=!1,i=!1,d.label=1;case 1:d.trys.push([1,8,9,14]),a=(0,m.default)(this),d.label=2;case 2:return[4,(0,_.default)(a.next())];case 3:if(!(n=!(s=d.sent()).done))return[3,7];if(u=s.value,l=u,null!=t&&null!==(c=t.signal)&&void 0!==c&&c.aborted)throw new h;return e--<=0?[4,l]:[3,5];case 4:d.sent(),d.label=5;case 5:d.label=6;case 6:return n=!1,[3,2];case 7:return[3,14];case 8:return f=d.sent(),i=!0,o=f,[3,14];case 9:return d.trys.push([9,,12,13]),n&&null!=a.return?[4,a.return()]:[3,11];case 10:d.sent(),d.label=11;case 11:return[3,13];case 12:if(i)throw o;return[7];case 13:return[7];case 14:return[2]}}))})).call(this)},filter:n,flatMap:function(e,t){var n=r.call(this,e,t);return(0,H.default)((function(){var e,t,r,i,o,a,s,u;return(0,K.__generator)(this,(function(l){switch(l.label){case 0:e=!1,t=!1,l.label=1;case 1:l.trys.push([1,7,8,13]),i=(0,m.default)(n),l.label=2;case 2:return[4,(0,_.default)(i.next())];case 3:return(e=!(o=l.sent()).done)?(a=o.value,s=a,[5,(0,K.__values)((0,b.default)((0,m.default)(s),_.default))]):[3,6];case 4:l.sent(),l.label=5;case 5:return e=!1,[3,2];case 6:return[3,13];case 7:return u=l.sent(),t=!0,r=u,[3,13];case 8:return l.trys.push([8,,11,12]),e&&null!=i.return?[4,i.return()]:[3,10];case 9:l.sent(),l.label=10;case 10:return[3,12];case 11:if(t)throw r;return[7];case 12:return[7];case 13:return[2]}}))}))()},map:r,take:function(e,t){return null!=t&&g(t,"options"),null!=(null==t?void 0:t.signal)&&p(t.signal,"options.signal"),e=i(e),(0,H.default)((function(){var r,n,i,o,a,s,u,l,c,f;return(0,K.__generator)(this,(function(d){switch(d.label){case 0:if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new h;n=!1,i=!1,d.label=1;case 1:d.trys.push([1,8,9,14]),a=(0,m.default)(this),d.label=2;case 2:return[4,(0,_.default)(a.next())];case 3:if(!(n=!(s=d.sent()).done))return[3,7];if(u=s.value,l=u,null!=t&&null!==(c=t.signal)&&void 0!==c&&c.aborted)throw new h;return e-- >0?[4,l]:[3,5];case 4:d.sent(),d.label=5;case 5:if(e<=0)return[2];d.label=6;case 6:return n=!1,[3,2];case 7:return[3,14];case 8:return f=d.sent(),i=!0,o=f,[3,14];case 9:return d.trys.push([9,,12,13]),n&&null!=a.return?[4,a.return()]:[3,11];case 10:d.sent(),d.label=11;case 11:return[3,13];case 12:if(i)throw o;return[7];case 13:return[7];case 14:return[2]}}))})).call(this)},compose:function(e,t){if(null!=t&&g(t,"options"),null!=(null==t?void 0:t.signal)&&p(t.signal,"options.signal"),O(e)&&!P(e))throw new u("stream",e,"must be writable");var r=A(this,e);return null!=t&&t.signal&&I(t.signal,r),r}},t.exports.promiseReturningOperators={every:function(e,t){return(0,w.default)((function(){return(0,K.__generator)(this,(function(r){switch(r.label){case 0:if("function"!=typeof e)throw new l("fn",["Function","AsyncFunction"],e);return[4,X.call(this,(0,w.default)((function(){var t,r,n,i=arguments;return(0,K.__generator)(this,(function(o){switch(o.label){case 0:for(t=i.length,r=new Array(t),n=0;n<t;n++)r[n]=i[n];return[4,e.apply(void 0,(0,F.default)(r))];case 1:return[2,!o.sent()]}}))})),t)];case 1:return[2,!r.sent()]}}))})).apply(this)},forEach:function(e,t){return(0,w.default)((function(){var n,i,o,a,s,u;return(0,K.__generator)(this,(function(c){switch(c.label){case 0:if("function"!=typeof e)throw new l("fn",["Function","AsyncFunction"],e);n=!1,i=!1,c.label=1;case 1:c.trys.push([1,6,7,12]),a=(0,m.default)(r.call(this,(f=(0,w.default)((function(t,r){return(0,K.__generator)(this,(function(n){switch(n.label){case 0:return[4,e(t,r)];case 1:return[2,(n.sent(),Y)]}}))})),function(e,t){return f.apply(this,arguments)}),t)),c.label=2;case 2:return[4,a.next()];case 3:if(!(n=!(s=c.sent()).done))return[3,5];s.value,c.label=4;case 4:return n=!1,[3,2];case 5:return[3,12];case 6:return u=c.sent(),i=!0,o=u,[3,12];case 7:return c.trys.push([7,,10,11]),n&&null!=a.return?[4,a.return()]:[3,9];case 8:c.sent(),c.label=9;case 9:return[3,11];case 10:if(i)throw o;return[7];case 11:return[7];case 12:return[2]}var f}))})).apply(this)},reduce:function(e,t,r){return(0,w.default)((function(){var n,i,a,s,u,c,f,d,v,b,w,_,k,A,I,T,P;return(0,K.__generator)(this,(function(O){switch(O.label){case 0:if("function"!=typeof e)throw new l("reducer",["Function","AsyncFunction"],e);return null!=r&&g(r,"options"),null!=(null==r?void 0:r.signal)&&p(r.signal,"options.signal"),i=arguments.length>1,null!=r&&null!==(n=r.signal)&&void 0!==n&&n.aborted?(a=new h(void 0,{cause:r.signal.reason}),this.once("error",(function(){})),[4,S(this.destroy(a))]):[3,2];case 1:throw O.sent(),a;case 2:s=new o,u=s.signal,null!=r&&r.signal&&(c={once:!0},(0,x.default)(c,y,this),(0,x.default)(c,E,!0),f=c,r.signal.addEventListener("abort",(function(){return s.abort()}),f)),d=!1,O.label=3;case 3:O.trys.push([3,,19,20]),v=!1,b=!1,O.label=4;case 4:O.trys.push([4,12,13,18]),_=(0,m.default)(this),O.label=5;case 5:return[4,_.next()];case 6:if(!(v=!(k=O.sent()).done))return[3,11];if(A=k.value,I=A,d=!0,null!=r&&null!==(T=r.signal)&&void 0!==T&&T.aborted)throw new h;return i?[4,e(t,I,{signal:u})]:[3,8];case 7:return t=O.sent(),[3,9];case 8:t=I,i=!0,O.label=9;case 9:O.label=10;case 10:return v=!1,[3,5];case 11:return[3,18];case 12:return P=O.sent(),b=!0,w=P,[3,18];case 13:return O.trys.push([13,,16,17]),v&&null!=_.return?[4,_.return()]:[3,15];case 14:O.sent(),O.label=15;case 15:return[3,17];case 16:if(b)throw w;return[7];case 17:return[7];case 18:if(!d&&!i)throw new Z;return[3,20];case 19:return s.abort(),[7];case 20:return[2,t]}}))})).apply(this)},toArray:function(e){return(0,w.default)((function(){var t,r,n,i,o,a,s,u,l,c;return(0,K.__generator)(this,(function(f){switch(f.label){case 0:null!=e&&g(e,"options"),null!=(null==e?void 0:e.signal)&&p(e.signal,"options.signal"),t=[],r=!1,n=!1,f.label=1;case 1:f.trys.push([1,6,7,12]),o=(0,m.default)(this),f.label=2;case 2:return[4,o.next()];case 3:if(!(r=!(a=f.sent()).done))return[3,5];if(s=a.value,u=s,null!=e&&null!==(l=e.signal)&&void 0!==l&&l.aborted)throw new h(void 0,{cause:e.signal.reason});B(t,u),f.label=4;case 4:return r=!1,[3,2];case 5:return[3,12];case 6:return c=f.sent(),n=!0,i=c,[3,12];case 7:return f.trys.push([7,,10,11]),r&&null!=o.return?[4,o.return()]:[3,9];case 8:f.sent(),f.label=9;case 9:return[3,11];case 10:if(n)throw i;return[7];case 11:return[7];case 12:return[2,t]}}))})).apply(this)},some:X,find:function(e,t){return(0,w.default)((function(){var r,i,o,a,s,u;return(0,K.__generator)(this,(function(l){switch(l.label){case 0:r=!1,i=!1,l.label=1;case 1:l.trys.push([1,6,7,12]),a=(0,m.default)(n.call(this,e,t)),l.label=2;case 2:return[4,a.next()];case 3:return(r=!(s=l.sent()).done)?[2,s.value]:[3,5];case 4:return r=!1,[3,2];case 5:return[3,12];case 6:return u=l.sent(),i=!0,o=u,[3,12];case 7:return l.trys.push([7,,10,11]),r&&null!=a.return?[4,a.return()]:[3,9];case 8:l.sent(),l.label=9;case 9:return[3,11];case 10:if(i)throw o;return[7];case 11:return[7];case 12:return[2]}}))})).apply(this)}}})),Vr=$((function(e,t){te(),zt(),xt();var r=Qt(),n=r.ArrayPrototypePop,i=r.Promise,o=Ar(),a=o.isIterable,s=o.isNodeStream,u=o.isWebStream,l=Fr().pipelineImpl,c=Ir().finished;zr(),t.exports={finished:c,pipeline:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return new i((function(e,r){var i,o,c=t[t.length-1];if(c&&"object"==typeof c&&!s(c)&&!a(c)&&!u(c)){var f=n(t);i=f.signal,o=f.end}l(t,(function(t,n){t?r(t):e(n)}),{signal:i,end:o})}))}}})),zr=$((function(e,t){te(),zt(),xt();var r=(Vt(),ee(Bt)).Buffer,n=Qt(),i=n.ObjectDefineProperty,o=n.ObjectKeys,a=n.ReflectApply,s=kr().promisify.custom,u=Hr(),l=u.streamReturningOperators,c=u.promiseReturningOperators,f=Yt().codes.ERR_ILLEGAL_CONSTRUCTOR,h=qr(),d=Cr(),p=d.setDefaultHighWaterMark,v=d.getDefaultHighWaterMark,g=Fr().pipeline,y=Tr().destroyer,b=Ir(),m=Vr(),w=Ar(),_=t.exports=Pr().Stream;_.isDestroyed=w.isDestroyed,_.isDisturbed=w.isDisturbed,_.isErrored=w.isErrored,_.isReadable=w.isReadable,_.isWritable=w.isWritable,_.Readable=jr();var k=!0,E=!1,S=void 0;try{for(var A,I=function(){var e=A.value,t=function e(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(this instanceof e?this.constructor:void 0)throw f();return _.Readable.from(a(r,this,n))},r=l[e];i(t,"name",{__proto__:null,value:r.name}),i(t,"length",{__proto__:null,value:r.length}),i(_.Readable.prototype,e,{__proto__:null,value:t,enumerable:!1,configurable:!0,writable:!0})},T=o(l)[Symbol.iterator]();!(k=(A=T.next()).done);k=!0)I()}catch(e){E=!0,S=e}finally{try{k||null==T.return||T.return()}finally{if(E)throw S}}var P=!0,O=!1,R=void 0;try{for(var C,x=function(){var e=C.value,t=function e(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(this instanceof e?this.constructor:void 0)throw f();return a(r,this,n)},r=c[e];i(t,"name",{__proto__:null,value:r.name}),i(t,"length",{__proto__:null,value:r.length}),i(_.Readable.prototype,e,{__proto__:null,value:t,enumerable:!1,configurable:!0,writable:!0})},B=o(c)[Symbol.iterator]();!(P=(C=B.next()).done);P=!0)x()}catch(e){O=!0,R=e}finally{try{P||null==B.return||B.return()}finally{if(O)throw R}}_.Writable=Lr(),_.Duplex=Nr(),_.Transform=Dr(),_.PassThrough=Wr(),_.pipeline=g;var M=Or().addAbortSignal;_.addAbortSignal=M,_.finished=b,_.destroy=y,_.compose=h,_.setDefaultHighWaterMark=p,_.getDefaultHighWaterMark=v,i(_,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:function(){return m}}),i(g,s,{__proto__:null,enumerable:!0,get:function(){return m.pipeline}}),i(b,s,{__proto__:null,enumerable:!0,get:function(){return m.finished}}),_.Stream=_,_._isUint8Array=function(e){return e instanceof Uint8Array},_._uint8ArrayToBuffer=function(e){return r.from(e.buffer,e.byteOffset,e.byteLength)}})),Kr=$((function(e,t){te(),zt(),xt();var r=zr(),n=Vr(),i=r.Readable.destroy;t.exports=r.Readable,t.exports._uint8ArrayToBuffer=r._uint8ArrayToBuffer,t.exports._isUint8Array=r._isUint8Array,t.exports.isDisturbed=r.isDisturbed,t.exports.isErrored=r.isErrored,t.exports.isReadable=r.isReadable,t.exports.Readable=r.Readable,t.exports.Writable=r.Writable,t.exports.Duplex=r.Duplex,t.exports.Transform=r.Transform,t.exports.PassThrough=r.PassThrough,t.exports.addAbortSignal=r.addAbortSignal,t.exports.finished=r.finished,t.exports.destroy=r.destroy,t.exports.destroy=i,t.exports.pipeline=r.pipeline,t.exports.compose=r.compose,Object.defineProperty(r,"promises",{configurable:!0,enumerable:!0,get:function(){return n}}),t.exports.Stream=r.Stream,t.exports.default=t.exports})),Qr=$((function(e,t){te(),zt(),xt(),t.exports="function"==typeof Object.create?function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),Gr=$((function(e,t){te(),zt(),xt();var r=(Vt(),ee(Bt)).Buffer,n=Symbol.for("BufferList");function i(e){if(!(this instanceof i))return new i(e);i._init.call(this,e)}i._init=function(e){Object.defineProperty(this,n,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)},i.prototype._new=function(e){return new i(e)},i.prototype._offset=function(e){if(0===e)return[0,0];for(var t=0,r=0;r<this._bufs.length;r++){var n=t+this._bufs[r].length;if(e<n||r===this._bufs.length-1)return[r,e-t];t=n}},i.prototype._reverseOffset=function(e){for(var t=e[0],r=e[1],n=0;n<t;n++)r+=this._bufs[n].length;return r},i.prototype.get=function(e){if(!(e>this.length||e<0)){var t=this._offset(e);return this._bufs[t[0]][t[1]]}},i.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},i.prototype.copy=function(e,t,n,i){if(("number"!=typeof n||n<0)&&(n=0),("number"!=typeof i||i>this.length)&&(i=this.length),n>=this.length||i<=0)return e||r.alloc(0);var o=!!e,a=this._offset(n),s=i-n,u=s,l=o&&t||0,c=a[1];if(0===n&&i===this.length){if(!o)return 1===this._bufs.length?this._bufs[0]:r.concat(this._bufs,this.length);for(var f=0;f<this._bufs.length;f++)this._bufs[f].copy(e,l),l+=this._bufs[f].length;return e}if(u<=this._bufs[a[0]].length-c)return o?this._bufs[a[0]].copy(e,t,c,c+u):this._bufs[a[0]].slice(c,c+u);o||(e=r.allocUnsafe(s));for(var h=a[0];h<this._bufs.length;h++){var d=this._bufs[h].length-c;if(!(u>d)){this._bufs[h].copy(e,l,c,c+u),l+=d;break}this._bufs[h].copy(e,l,c),l+=d,u-=d,c&&(c=0)}return e.length>l?e.slice(0,l):e},i.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!=typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return this._new();var r=this._offset(e),n=this._offset(t),i=this._bufs.slice(r[0],n[0]+1);return 0===n[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,n[1]),0!==r[1]&&(i[0]=i[0].slice(r[1])),this._new(i)},i.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)},i.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},i.prototype.duplicate=function(){for(var e=this._new(),t=0;t<this._bufs.length;t++)e.append(this._bufs[t]);return e},i.prototype.append=function(e){if(null==e)return this;if(e.buffer)this._appendBuffer(r.from(e.buffer,e.byteOffset,e.byteLength));else if(Array.isArray(e))for(var t=0;t<e.length;t++)this.append(e[t]);else if(this._isBufferList(e))for(var n=0;n<e._bufs.length;n++)this.append(e._bufs[n]);else"number"==typeof e&&(e=e.toString()),this._appendBuffer(r.from(e));return this},i.prototype._appendBuffer=function(e){this._bufs.push(e),this.length+=e.length},i.prototype.indexOf=function(e,t,n){if(void 0===n&&"string"==typeof t&&(n=t,t=void 0),"function"==typeof e||Array.isArray(e))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof e?e=r.from([e]):"string"==typeof e?e=r.from(e,n):this._isBufferList(e)?e=e.slice():Array.isArray(e.buffer)?e=r.from(e.buffer,e.byteOffset,e.byteLength):r.isBuffer(e)||(e=r.from(e)),isNaN(t=Number(t||0))&&(t=0),t<0&&(t=this.length+t),t<0&&(t=0),0===e.length)return t>this.length?this.length:t;for(var i=this._offset(t),o=i[0],a=i[1];o<this._bufs.length;o++){for(var s=this._bufs[o];a<s.length;)if(s.length-a>=e.length){var u=s.indexOf(e,a);if(-1!==u)return this._reverseOffset([o,u]);a=s.length-e.length+1}else{var l=this._reverseOffset([o,a]);if(this._match(l,e))return l;a++}a=0}return-1},i.prototype._match=function(e,t){if(this.length-e<t.length)return!1;for(var r=0;r<t.length;r++)if(this.get(e+r)!==t[r])return!1;return!0},function(){var e={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readBigInt64BE:8,readBigInt64LE:8,readBigUInt64BE:8,readBigUInt64LE:8,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(var t in e)!function(t){i.prototype[t]=null===e[t]?function(e,r){return this.slice(e,e+r)[t](0,r)}:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.slice(r,r+e[t])[t](0)}}(t)}(),i.prototype._isBufferList=function(e){return e instanceof i||i.isBufferList(e)},i.isBufferList=function(e){return null!=e&&e[n]},t.exports=i})),Yr=$((function(e,t){te(),zt(),xt();var r=Kr().Duplex,n=Qr(),i=Gr();function o(e){if(!(this instanceof o))return new o(e);if("function"==typeof e){this._callback=e;var t=function(e){this._callback&&(this._callback(e),this._callback=null)}.bind(this);this.on("pipe",(function(e){e.on("error",t)})),this.on("unpipe",(function(e){e.removeListener("error",t)})),e=null}i._init.call(this,e),r.call(this)}n(o,r),Object.assign(o.prototype,i.prototype),o.prototype._new=function(e){return new o(e)},o.prototype._write=function(e,t,r){this._appendBuffer(e),"function"==typeof r&&r()},o.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)},o.prototype.end=function(e){r.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)},o.prototype._destroy=function(e,t){this._bufs.length=0,this.length=0,t(e)},o.prototype._isBufferList=function(e){return e instanceof o||e instanceof i||o.isBufferList(e)},o.isBufferList=i.isBufferList,t.exports=o,t.exports.BufferListStream=o,t.exports.BufferList=i})),Jr=$((function(e,t){te(),zt(),xt(),t.exports=function e(){"use strict";(0,k.default)(this,e),this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}})),Xr=$((function(e,t){var r=function(e){return[0,1,2].map((function(t){return[0,1].map((function(r){return[0,1].map((function(o){var a=i.alloc(1);return a.writeUInt8(n.codes[e]<<n.CMD_SHIFT|(r?n.DUP_MASK:0)|t<<n.QOS_SHIFT|o,0,!0),a}))}))}))};te(),zt(),xt();var n=t.exports,i=(Vt(),ee(Bt)).Buffer;for(var o in n.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},n.requiredHeaderFlags={1:0,2:0,4:0,5:0,6:2,7:0,8:2,9:0,10:2,11:0,12:0,13:0,14:0,15:0},n.requiredHeaderFlagsErrors={},n.requiredHeaderFlags){var a=n.requiredHeaderFlags[o];n.requiredHeaderFlagsErrors[o]="Invalid header flag bits, must be 0x"+a.toString(16)+" for "+n.types[o]+" packet"}for(var s in n.codes={},n.types){var u=n.types[s];n.codes[u]=s}for(var l in n.CMD_SHIFT=4,n.CMD_MASK=240,n.DUP_MASK=8,n.QOS_MASK=3,n.QOS_SHIFT=1,n.RETAIN_MASK=1,n.VARBYTEINT_MASK=127,n.VARBYTEINT_FIN_MASK=128,n.VARBYTEINT_MAX=268435455,n.SESSIONPRESENT_MASK=1,n.SESSIONPRESENT_HEADER=i.from([n.SESSIONPRESENT_MASK]),n.CONNACK_HEADER=i.from([n.codes.connack<<n.CMD_SHIFT]),n.USERNAME_MASK=128,n.PASSWORD_MASK=64,n.WILL_RETAIN_MASK=32,n.WILL_QOS_MASK=24,n.WILL_QOS_SHIFT=3,n.WILL_FLAG_MASK=4,n.CLEAN_SESSION_MASK=2,n.CONNECT_HEADER=i.from([n.codes.connect<<n.CMD_SHIFT]),n.properties={sessionExpiryInterval:17,willDelayInterval:24,receiveMaximum:33,maximumPacketSize:39,topicAliasMaximum:34,requestResponseInformation:25,requestProblemInformation:23,userProperties:38,authenticationMethod:21,authenticationData:22,payloadFormatIndicator:1,messageExpiryInterval:2,contentType:3,responseTopic:8,correlationData:9,maximumQoS:36,retainAvailable:37,assignedClientIdentifier:18,reasonString:31,wildcardSubscriptionAvailable:40,subscriptionIdentifiersAvailable:41,sharedSubscriptionAvailable:42,serverKeepAlive:19,responseInformation:26,serverReference:28,topicAlias:35,subscriptionIdentifier:11},n.propertiesCodes={},n.properties){var c=n.properties[l];n.propertiesCodes[c]=l}n.propertiesTypes={sessionExpiryInterval:"int32",willDelayInterval:"int32",receiveMaximum:"int16",maximumPacketSize:"int32",topicAliasMaximum:"int16",requestResponseInformation:"byte",requestProblemInformation:"byte",userProperties:"pair",authenticationMethod:"string",authenticationData:"binary",payloadFormatIndicator:"byte",messageExpiryInterval:"int32",contentType:"string",responseTopic:"string",correlationData:"binary",maximumQoS:"int8",retainAvailable:"byte",assignedClientIdentifier:"string",reasonString:"string",wildcardSubscriptionAvailable:"byte",subscriptionIdentifiersAvailable:"byte",sharedSubscriptionAvailable:"byte",serverKeepAlive:"int16",responseInformation:"string",serverReference:"string",topicAlias:"int16",subscriptionIdentifier:"var"},n.PUBLISH_HEADER=r("publish"),n.SUBSCRIBE_HEADER=r("subscribe"),n.SUBSCRIBE_OPTIONS_QOS_MASK=3,n.SUBSCRIBE_OPTIONS_NL_MASK=1,n.SUBSCRIBE_OPTIONS_NL_SHIFT=2,n.SUBSCRIBE_OPTIONS_RAP_MASK=1,n.SUBSCRIBE_OPTIONS_RAP_SHIFT=3,n.SUBSCRIBE_OPTIONS_RH_MASK=3,n.SUBSCRIBE_OPTIONS_RH_SHIFT=4,n.SUBSCRIBE_OPTIONS_RH=[0,16,32],n.SUBSCRIBE_OPTIONS_NL=4,n.SUBSCRIBE_OPTIONS_RAP=8,n.SUBSCRIBE_OPTIONS_QOS=[0,1,2],n.UNSUBSCRIBE_HEADER=r("unsubscribe"),n.ACKS={unsuback:r("unsuback"),puback:r("puback"),pubcomp:r("pubcomp"),pubrel:r("pubrel"),pubrec:r("pubrec")},n.SUBACK_HEADER=i.from([n.codes.suback<<n.CMD_SHIFT]),n.VERSION3=i.from([3]),n.VERSION4=i.from([4]),n.VERSION5=i.from([5]),n.VERSION131=i.from([131]),n.VERSION132=i.from([132]),n.QOS=[0,1,2].map((function(e){return i.from([e])})),n.EMPTY={pingreq:i.from([n.codes.pingreq<<4,0]),pingresp:i.from([n.codes.pingresp<<4,0]),disconnect:i.from([n.codes.disconnect<<4,0])},n.MQTT5_PUBACK_PUBREC_CODES={0:"Success",16:"No matching subscribers",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",144:"Topic Name invalid",145:"Packet identifier in use",151:"Quota exceeded",153:"Payload format invalid"},n.MQTT5_PUBREL_PUBCOMP_CODES={0:"Success",146:"Packet Identifier not found"},n.MQTT5_SUBACK_CODES={0:"Granted QoS 0",1:"Granted QoS 1",2:"Granted QoS 2",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use",151:"Quota exceeded",158:"Shared Subscriptions not supported",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},n.MQTT5_UNSUBACK_CODES={0:"Success",17:"No subscription existed",128:"Unspecified error",131:"Implementation specific error",135:"Not authorized",143:"Topic Filter invalid",145:"Packet Identifier in use"},n.MQTT5_DISCONNECT_CODES={0:"Normal disconnection",4:"Disconnect with Will Message",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",135:"Not authorized",137:"Server busy",139:"Server shutting down",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},n.MQTT5_AUTH_CODES={0:"Success",24:"Continue authentication",25:"Re-authenticate"}})),$r=$((function(e,t){var r=function(e,t,r,n){var i=t>=1.5*r;return Math.round(e/r)+" "+n+(i?"s":"")};te(),zt(),xt();var n=1e3,i=6e4,o=60*i,a=24*o;t.exports=function(e,t){t=t||{};var s=void 0===e?"undefined":(0,q.default)(e);if("string"===s&&e.length>0)return function(e){if(!((e+="").length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"weeks":case"week":case"w":return 6048e5*r;case"days":case"day":case"d":return r*a;case"hours":case"hour":case"hrs":case"hr":case"h":return r*o;case"minutes":case"minute":case"mins":case"min":case"m":return r*i;case"seconds":case"second":case"secs":case"sec":case"s":return r*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(e);if("number"===s&&isFinite(e))return t.long?function(e){var t=Math.abs(e);return t>=a?r(e,t,a,"day"):t>=o?r(e,t,o,"hour"):t>=i?r(e,t,i,"minute"):t>=n?r(e,t,n,"second"):e+" ms"}(e):function(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+"d":t>=o?Math.round(e/o)+"h":t>=i?Math.round(e/i)+"m":t>=n?Math.round(e/n)+"s":e+"ms"}(e);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}})),Zr=$((function(e,t){te(),zt(),xt(),t.exports=function(e){var t=function(e,t){var r=n(this.namespace+((void 0===t?"undefined":(0,q.default)(t))>"u"?":":t)+e);return r.log=this.log,r},r=function(e,t){for(var r=0,n=0,i=-1,o=0;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(i=n,o=r,n++):(r++,n++);else{if(-1===i)return!1;n=i+1,r=++o}for(;n<t.length&&"*"===t[n];)n++;return n===t.length};function n(e){var r,i,o,a=null;function s(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(s.enabled){var o=s,a=Number(new Date),u=a-(r||a);o.diff=u,o.prev=r,o.curr=a,r=a,t[0]=n.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var l=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,(function(e,r){if("%%"===e)return"%";l++;var i=n.formatters[r];if("function"==typeof i){var a=t[l];e=i.call(o,a),t.splice(l,1),l--}return e})),n.formatArgs.call(o,t),(o.log||n.log).apply(o,t)}}return s.namespace=e,s.useColors=n.useColors(),s.color=n.selectColor(e),s.extend=t,s.destroy=n.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==a?a:(i!==n.namespaces&&(i=n.namespaces,o=n.enabled(e)),o)},set:function(e){a=e}}),"function"==typeof n.init&&n.init(s),s}return n.debug=n,n.default=n,n.coerce=function(e){return e instanceof Error?e.stack||e.message:e},n.disable=function(){var e=(0,F.default)(n.names).concat((0,F.default)(n.skips.map((function(e){return"-"+e})))).join(",");return n.enable(""),e},n.enable=function(e){n.save(e),n.namespaces=e,n.names=[],n.skips=[];var t=("string"==typeof e?e:"").trim().replace(" ",",").split(",").filter(Boolean),r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;"-"===u[0]?n.skips.push(u.slice(1)):n.names.push(u)}}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}},n.enabled=function(e){var t=!0,i=!1,o=void 0;try{for(var a,s=n.skips[Symbol.iterator]();!(t=(a=s.next()).done);t=!0){var u=a.value;if(r(e,u))return!1}}catch(e){i=!0,o=e}finally{try{t||null==s.return||s.return()}finally{if(i)throw o}}var l=!0,c=!1,f=void 0;try{for(var h,d=n.names[Symbol.iterator]();!(l=(h=d.next()).done);l=!0){var p=h.value;if(r(e,p))return!0}}catch(e){c=!0,f=e}finally{try{l||null==d.return||d.return()}finally{if(c)throw f}}return!1},n.humanize=$r(),n.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(t){n[t]=e[t]})),n.names=[],n.skips=[],n.formatters={},n.selectColor=function(e){for(var t=0,r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return n.colors[Math.abs(t)%n.colors.length]},n.enable(n.load()),n}})),en=$((function(e,t){var r;te(),zt(),xt(),e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),this.useColors){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var n=0,i=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(i=n))})),e.splice(i,0,r)}},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(e){}},e.load=function(){var t;try{t=e.storage.getItem("debug")}catch(e){}return!t&&(void 0===re?"undefined":(0,q.default)(re))<"u"&&"env"in re&&(t=re.env.DEBUG),t},e.useColors=function(){return!(!(("undefined"==typeof window?"undefined":(0,q.default)(window))<"u"&&window.process)||"renderer"!==window.process.type&&!window.process.__nwjs)||!(("undefined"==typeof navigator?"undefined":(0,q.default)(navigator))<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(("undefined"==typeof document?"undefined":(0,q.default)(document))<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||("undefined"==typeof window?"undefined":(0,q.default)(window))<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||("undefined"==typeof navigator?"undefined":(0,q.default)(navigator))<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||("undefined"==typeof navigator?"undefined":(0,q.default)(navigator))<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));var e},e.storage=function(){try{return localStorage}catch(e){}}(),e.destroy=(r=!1,function(){r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.log=console.debug||console.log||function(){},t.exports=Zr()(e),t.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}})),tn=$((function(e,t){te(),zt(),xt();var r=Yr(),n=(_r(),ee(pr)).EventEmitter,i=Jr(),o=Xr(),a=en()("mqtt-packet:parser");t.exports=function(e){"use strict";(0,j.default)(n,e);var t=(0,z.default)(n);function n(){var e;return(0,k.default)(this,n),(e=t.call(this)).parser=e.constructor.parser,(0,D.default)(e)}return(0,C.default)(n,[{key:"_resetState",value:function(){a("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new i,this.error=null,this._list=r(),this._stateCounter=0}},{key:"parse",value:function(e){for(this.error&&this._resetState(),this._list.append(e),a("parse: current state: %s",this._states[this._stateCounter]);(-1!==this.packet.length||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,a("parse: state complete. _stateCounter is now: %d",this._stateCounter),a("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return a("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}},{key:"_parseHeader",value:function(){var e=this._list.readUInt8(0),t=e>>o.CMD_SHIFT;this.packet.cmd=o.types[t];var r=15&e,n=o.requiredHeaderFlags[t];return null!=n&&r!==n?this._emitError(Error(o.requiredHeaderFlagsErrors[t])):(this.packet.retain=!!(e&o.RETAIN_MASK),this.packet.qos=e>>o.QOS_SHIFT&o.QOS_MASK,this.packet.qos>2?this._emitError(Error("Packet must not have both QoS bits set to 1")):(this.packet.dup=!!(e&o.DUP_MASK),a("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0))}},{key:"_parseLength",value:function(){var e=this._parseVarByteNum(!0);return e&&(this.packet.length=e.value,this._list.consume(e.bytes)),a("_parseLength %d",e.value),!!e}},{key:"_parsePayload",value:function(){a("_parsePayload: payload %O",this._list);var e=!1;if(0===this.packet.length||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(Error("Not supported"))}e=!0}return a("_parsePayload complete result: %s",e),e}},{key:"_parseConnect",value:function(){a("_parseConnect");var e,t,r,n,i={},s=this.packet,u=this._parseString();if(null===u)return this._emitError(Error("Cannot parse protocolId"));if("MQTT"!==u&&"MQIsdp"!==u)return this._emitError(Error("Invalid protocolId"));if(s.protocolId=u,this._pos>=this._list.length)return this._emitError(Error("Packet too short"));if(s.protocolVersion=this._list.readUInt8(this._pos),s.protocolVersion>=128&&(s.bridgeMode=!0,s.protocolVersion=s.protocolVersion-128),3!==s.protocolVersion&&4!==s.protocolVersion&&5!==s.protocolVersion)return this._emitError(Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(Error("Packet too short"));if(1&this._list.readUInt8(this._pos))return this._emitError(Error("Connect flag bit 0 must be 0, but got 1"));i.username=this._list.readUInt8(this._pos)&o.USERNAME_MASK,i.password=this._list.readUInt8(this._pos)&o.PASSWORD_MASK,i.will=this._list.readUInt8(this._pos)&o.WILL_FLAG_MASK;var l=!!(this._list.readUInt8(this._pos)&o.WILL_RETAIN_MASK),c=(this._list.readUInt8(this._pos)&o.WILL_QOS_MASK)>>o.WILL_QOS_SHIFT;if(i.will)s.will={},s.will.retain=l,s.will.qos=c;else{if(l)return this._emitError(Error("Will Retain Flag must be set to zero when Will Flag is set to 0"));if(c)return this._emitError(Error("Will QoS must be set to zero when Will Flag is set to 0"))}if(s.clean=!!(this._list.readUInt8(this._pos)&o.CLEAN_SESSION_MASK),this._pos++,s.keepalive=this._parseNum(),-1===s.keepalive)return this._emitError(Error("Packet too short"));if(5===s.protocolVersion){var f=this._parseProperties();Object.getOwnPropertyNames(f).length&&(s.properties=f)}var h=this._parseString();if(null===h)return this._emitError(Error("Packet too short"));if(s.clientId=h,a("_parseConnect: packet.clientId: %s",s.clientId),i.will){if(5===s.protocolVersion){var d=this._parseProperties();Object.getOwnPropertyNames(d).length&&(s.will.properties=d)}if(null===(e=this._parseString()))return this._emitError(Error("Cannot parse will topic"));if(s.will.topic=e,a("_parseConnect: packet.will.topic: %s",s.will.topic),null===(t=this._parseBuffer()))return this._emitError(Error("Cannot parse will payload"));s.will.payload=t,a("_parseConnect: packet.will.paylaod: %s",s.will.payload)}if(i.username){if(null===(n=this._parseString()))return this._emitError(Error("Cannot parse username"));s.username=n,a("_parseConnect: packet.username: %s",s.username)}if(i.password){if(null===(r=this._parseBuffer()))return this._emitError(Error("Cannot parse password"));s.password=r}return this.settings=s,a("_parseConnect: complete"),s}},{key:"_parseConnack",value:function(){a("_parseConnack");var e=this.packet;if(this._list.length<1)return null;var t=this._list.readUInt8(this._pos++);if(t>1)return this._emitError(Error("Invalid connack flags, bits 7-1 must be set to 0"));if(e.sessionPresent=!!(t&o.SESSIONPRESENT_MASK),5===this.settings.protocolVersion)this._list.length>=2?e.reasonCode=this._list.readUInt8(this._pos++):e.reasonCode=0;else{if(this._list.length<2)return null;e.returnCode=this._list.readUInt8(this._pos++)}if(-1===e.returnCode||-1===e.reasonCode)return this._emitError(Error("Cannot parse return code"));if(5===this.settings.protocolVersion){var r=this._parseProperties();Object.getOwnPropertyNames(r).length&&(e.properties=r)}a("_parseConnack: complete")}},{key:"_parsePublish",value:function(){a("_parsePublish");var e=this.packet;if(e.topic=this._parseString(),null===e.topic)return this._emitError(Error("Cannot parse topic"));if(!(e.qos>0)||this._parseMessageId()){if(5===this.settings.protocolVersion){var t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}e.payload=this._list.slice(this._pos,e.length),a("_parsePublish: payload from buffer list: %o",e.payload)}}},{key:"_parseSubscribe",value:function(){a("_parseSubscribe");var e,t,r,n,i,s,u,l=this.packet;if(l.subscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){var c=this._parseProperties();Object.getOwnPropertyNames(c).length&&(l.properties=c)}if(l.length<=0)return this._emitError(Error("Malformed subscribe, no payload specified"));for(;this._pos<l.length;){if(null===(e=this._parseString()))return this._emitError(Error("Cannot parse topic"));if(this._pos>=l.length)return this._emitError(Error("Malformed Subscribe Payload"));if(t=this._parseByte(),5===this.settings.protocolVersion){if(192&t)return this._emitError(Error("Invalid subscribe topic flag bits, bits 7-6 must be 0"))}else if(252&t)return this._emitError(Error("Invalid subscribe topic flag bits, bits 7-2 must be 0"));if((r=t&o.SUBSCRIBE_OPTIONS_QOS_MASK)>2)return this._emitError(Error("Invalid subscribe QoS, must be <= 2"));if(s=!!(t>>o.SUBSCRIBE_OPTIONS_NL_SHIFT&o.SUBSCRIBE_OPTIONS_NL_MASK),i=!!(t>>o.SUBSCRIBE_OPTIONS_RAP_SHIFT&o.SUBSCRIBE_OPTIONS_RAP_MASK),(n=t>>o.SUBSCRIBE_OPTIONS_RH_SHIFT&o.SUBSCRIBE_OPTIONS_RH_MASK)>2)return this._emitError(Error("Invalid retain handling, must be <= 2"));u={topic:e,qos:r},5===this.settings.protocolVersion?(u.nl=s,u.rap=i,u.rh=n):this.settings.bridgeMode&&(u.rh=0,u.rap=!0,u.nl=!0),a("_parseSubscribe: push subscription `%s` to subscription",u),l.subscriptions.push(u)}}}},{key:"_parseSuback",value:function(){a("_parseSuback");var e=this.packet;if(this.packet.granted=[],this._parseMessageId()){if(5===this.settings.protocolVersion){var t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}if(e.length<=0)return this._emitError(Error("Malformed suback, no payload specified"));for(;this._pos<this.packet.length;){var r=this._list.readUInt8(this._pos++);if(5===this.settings.protocolVersion){if(!o.MQTT5_SUBACK_CODES[r])return this._emitError(Error("Invalid suback code"))}else if(r>2&&128!==r)return this._emitError(Error("Invalid suback QoS, must be 0, 1, 2 or 128"));this.packet.granted.push(r)}}}},{key:"_parseUnsubscribe",value:function(){a("_parseUnsubscribe");var e=this.packet;if(e.unsubscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){var t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}if(e.length<=0)return this._emitError(Error("Malformed unsubscribe, no payload specified"));for(;this._pos<e.length;){var r=this._parseString();if(null===r)return this._emitError(Error("Cannot parse topic"));a("_parseUnsubscribe: push topic `%s` to unsubscriptions",r),e.unsubscriptions.push(r)}}}},{key:"_parseUnsuback",value:function(){a("_parseUnsuback");var e=this.packet;if(!this._parseMessageId())return this._emitError(Error("Cannot parse messageId"));if((3===this.settings.protocolVersion||4===this.settings.protocolVersion)&&2!==e.length)return this._emitError(Error("Malformed unsuback, payload length must be 2"));if(e.length<=0)return this._emitError(Error("Malformed unsuback, no payload specified"));if(5===this.settings.protocolVersion){var t=this._parseProperties();for(Object.getOwnPropertyNames(t).length&&(e.properties=t),e.granted=[];this._pos<this.packet.length;){var r=this._list.readUInt8(this._pos++);if(!o.MQTT5_UNSUBACK_CODES[r])return this._emitError(Error("Invalid unsuback code"));this.packet.granted.push(r)}}}},{key:"_parseConfirmation",value:function(){a("_parseConfirmation: packet.cmd: `%s`",this.packet.cmd);var e=this.packet;if(this._parseMessageId(),5===this.settings.protocolVersion){if(e.length>2){switch(e.reasonCode=this._parseByte(),this.packet.cmd){case"puback":case"pubrec":if(!o.MQTT5_PUBACK_PUBREC_CODES[e.reasonCode])return this._emitError(Error("Invalid "+this.packet.cmd+" reason code"));break;case"pubrel":case"pubcomp":if(!o.MQTT5_PUBREL_PUBCOMP_CODES[e.reasonCode])return this._emitError(Error("Invalid "+this.packet.cmd+" reason code"))}a("_parseConfirmation: packet.reasonCode `%d`",e.reasonCode)}else e.reasonCode=0;if(e.length>3){var t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}}return!0}},{key:"_parseDisconnect",value:function(){var e=this.packet;if(a("_parseDisconnect"),5===this.settings.protocolVersion){this._list.length>0?(e.reasonCode=this._parseByte(),o.MQTT5_DISCONNECT_CODES[e.reasonCode]||this._emitError(Error("Invalid disconnect reason code"))):e.reasonCode=0;var t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(e.properties=t)}return a("_parseDisconnect result: true"),!0}},{key:"_parseAuth",value:function(){a("_parseAuth");var e=this.packet;if(5!==this.settings.protocolVersion)return this._emitError(Error("Not supported auth packet for this version MQTT"));if(e.reasonCode=this._parseByte(),!o.MQTT5_AUTH_CODES[e.reasonCode])return this._emitError(Error("Invalid auth reason code"));var t=this._parseProperties();return Object.getOwnPropertyNames(t).length&&(e.properties=t),a("_parseAuth: result: true"),!0}},{key:"_parseMessageId",value:function(){var e=this.packet;return e.messageId=this._parseNum(),null===e.messageId?(this._emitError(Error("Cannot parse messageId")),!1):(a("_parseMessageId: packet.messageId %d",e.messageId),!0)}},{key:"_parseString",value:function(e){var t=this._parseNum(),r=t+this._pos;if(-1===t||r>this._list.length||r>this.packet.length)return null;var n=this._list.toString("utf8",this._pos,r);return this._pos+=t,a("_parseString: result: %s",n),n}},{key:"_parseStringPair",value:function(){return a("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}},{key:"_parseBuffer",value:function(){var e=this._parseNum(),t=e+this._pos;if(-1===e||t>this._list.length||t>this.packet.length)return null;var r=this._list.slice(this._pos,t);return this._pos+=e,a("_parseBuffer: result: %o",r),r}},{key:"_parseNum",value:function(){if(this._list.length-this._pos<2)return-1;var e=this._list.readUInt16BE(this._pos);return this._pos+=2,a("_parseNum: result: %s",e),e}},{key:"_parse4ByteNum",value:function(){if(this._list.length-this._pos<4)return-1;var e=this._list.readUInt32BE(this._pos);return this._pos+=4,a("_parse4ByteNum: result: %s",e),e}},{key:"_parseVarByteNum",value:function(e){a("_parseVarByteNum");for(var t,r=0,n=1,i=0,s=!1,u=this._pos?this._pos:0;r<4&&u+r<this._list.length;){if(i+=n*((t=this._list.readUInt8(u+r++))&o.VARBYTEINT_MASK),n*=128,!(t&o.VARBYTEINT_FIN_MASK)){s=!0;break}if(this._list.length<=r)break}return!s&&4===r&&this._list.length>=r&&this._emitError(Error("Invalid variable byte integer")),u&&(this._pos+=r),a("_parseVarByteNum: result: %o",s=!!s&&(e?{bytes:r,value:i}:i)),s}},{key:"_parseByte",value:function(){var e;return this._pos<this._list.length&&(e=this._list.readUInt8(this._pos),this._pos++),a("_parseByte: result: %o",e),e}},{key:"_parseByType",value:function(e){switch(a("_parseByType: type: %s",e),e){case"byte":return 0!==this._parseByte();case"int8":return this._parseByte();case"int16":return this._parseNum();case"int32":return this._parse4ByteNum();case"var":return this._parseVarByteNum();case"string":return this._parseString();case"pair":return this._parseStringPair();case"binary":return this._parseBuffer()}}},{key:"_parseProperties",value:function(){a("_parseProperties");for(var e=this._parseVarByteNum(),t=this._pos+e,r={};this._pos<t;){var n=this._parseByte();if(!n)return this._emitError(Error("Cannot parse property code type")),!1;var i=o.propertiesCodes[n];if(!i)return this._emitError(Error("Unknown property")),!1;if("userProperties"!==i)r[i]?(Array.isArray(r[i])||(r[i]=[r[i]]),r[i].push(this._parseByType(o.propertiesTypes[i]))):r[i]=this._parseByType(o.propertiesTypes[i]);else{r[i]||(r[i]=Object.create(null));var s=this._parseByType(o.propertiesTypes[i]);if(r[i][s.name])if(Array.isArray(r[i][s.name]))r[i][s.name].push(s.value);else{var u=r[i][s.name];r[i][s.name]=[u],r[i][s.name].push(s.value)}else r[i][s.name]=s.value}}return r}},{key:"_newPacket",value:function(){return a("_newPacket"),this.packet&&(this._list.consume(this.packet.length),a("_newPacket: parser emit packet: packet.cmd: %s, packet.payload: %s, packet.length: %d",this.packet.cmd,this.packet.payload,this.packet.length),this.emit("packet",this.packet)),a("_newPacket: new packet"),this.packet=new i,this._pos=0,!0}},{key:"_emitError",value:function(e){a("_emitError",e),this.error=e,this.emit("error",e)}}],[{key:"parser",value:function(e){return this instanceof n?(this.settings=e||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):(new n).parser(e)}}]),n}(n)})),rn=$((function(e,t){var r=function(e){var t=n.allocUnsafe(2);return t.writeUInt8(e>>8,0),t.writeUInt8(255&e,1),t};te(),zt(),xt();var n=(Vt(),ee(Bt)).Buffer,i={},o=n.isBuffer(n.from([1,2]).subarray(0,1));t.exports={cache:i,generateCache:function(){for(var e=0;e<65536;e++)i[e]=r(e)},generateNumber:r,genBufVariableByteInt:function(e){var t=0,r=0,i=n.allocUnsafe(4);do{t=e%128|0,(e=e/128|0)>0&&(t|=128),i.writeUInt8(t,r++)}while(e>0&&r<4);return e>0&&(r=0),o?i.subarray(0,r):i.slice(0,r)},generate4ByteBuffer:function(e){var t=n.allocUnsafe(4);return t.writeUInt32BE(e,0),t}}})),nn=$((function(e,t){te(),zt(),xt(),(void 0===re?"undefined":(0,q.default)(re))>"u"||!re.version||0===re.version.indexOf("v0.")||0===re.version.indexOf("v1.")&&0!==re.version.indexOf("v1.8.")?t.exports={nextTick:function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,o,a=arguments.length;switch(a){case 0:case 1:return re.nextTick(e);case 2:return re.nextTick((function(){e.call(null,t)}));case 3:return re.nextTick((function(){e.call(null,t,r)}));case 4:return re.nextTick((function(){e.call(null,t,r,n)}));default:for(i=Array(a-1),o=0;o<i.length;)i[o++]=arguments[o];return re.nextTick((function(){e.apply(null,i)}))}}}:t.exports=re})),on=$((function(e,t){var r=function(e,t,r){switch(k("generate called"),t.cork&&(t.cork(),_(n,t)),O&&(O=!1,A()),k("generate: packet.cmd: %s",e.cmd),e.cmd){case"connect":return function(e,t){var r=e||{},n=r.protocolId||"MQTT",a=r.protocolVersion||4,s=r.will,u=r.clean,f=r.keepalive||0,h=r.clientId||"",d=r.username,b=r.password,m=r.properties;void 0===u&&(u=!0);var w,_,k=0;if("string"!=typeof n&&!y.isBuffer(n))return t.destroy(Error("Invalid protocolId")),!1;if(k+=n.length+2,3!==a&&4!==a&&5!==a)return t.destroy(Error("Invalid protocol version")),!1;if(k+=1,("string"==typeof h||y.isBuffer(h))&&(h||a>=4)&&(h||u))k+=y.byteLength(h)+2;else{if(a<4)return t.destroy(Error("clientId must be supplied before 3.1.1")),!1;if(1*u==0)return t.destroy(Error("clientId must be given if cleanSession set to 0")),!1}if("number"!=typeof f||f<0||f>65535||f%1!=0)return t.destroy(Error("Invalid keepalive")),!1;if(k+=2,k+=1,5===a){if(!(w=c(t,m)))return!1;k+=w.length}if(s){if("object"!=typeof s)return t.destroy(Error("Invalid will")),!1;if(!s.topic||"string"!=typeof s.topic)return t.destroy(Error("Invalid will topic")),!1;if(k+=y.byteLength(s.topic)+2,k+=2,s.payload){if(!(s.payload.length>=0))return t.destroy(Error("Invalid will payload")),!1;"string"==typeof s.payload?k+=y.byteLength(s.payload):k+=s.payload.length}if(_={},5===a){if(!(_=c(t,s.properties)))return!1;k+=_.length}}var E=!1;if(null!=d){if(!v(d))return t.destroy(Error("Invalid username")),!1;E=!0,k+=y.byteLength(d)+2}if(null!=b){if(!E)return t.destroy(Error("Username is required to use password")),!1;if(!v(b))return t.destroy(Error("Invalid password")),!1;k+=p(b)+2}t.write(g.CONNECT_HEADER),i(t,k),l(t,n),r.bridgeMode&&(a+=128),t.write(131===a?g.VERSION131:132===a?g.VERSION132:4===a?g.VERSION4:5===a?g.VERSION5:g.VERSION3);var S=0;return S|=null!=d?g.USERNAME_MASK:0,S|=null!=b?g.PASSWORD_MASK:0,S|=s&&s.retain?g.WILL_RETAIN_MASK:0,S|=s&&s.qos?s.qos<<g.WILL_QOS_SHIFT:0,S|=s?g.WILL_FLAG_MASK:0,S|=u?g.CLEAN_SESSION_MASK:0,t.write(y.from([S])),P(t,f),5===a&&w.write(),l(t,h),s&&(5===a&&_.write(),o(t,s.topic),l(t,s.payload)),null!=d&&l(t,d),null!=b&&l(t,b),!0}(e,t);case"connack":return function(e,t,r){var n=r?r.protocolVersion:4,o=e||{},a=5===n?o.reasonCode:o.returnCode,s=o.properties,u=2;if("number"!=typeof a)return t.destroy(Error("Invalid return code")),!1;var l=null;if(5===n){if(!(l=c(t,s)))return!1;u+=l.length}return t.write(g.CONNACK_HEADER),i(t,u),t.write(o.sessionPresent?g.SESSIONPRESENT_HEADER:m),t.write(y.from([a])),null==l||l.write(),!0}(e,t,r);case"publish":return function(e,t,r){k("publish: packet: %o",e);var n=r?r.protocolVersion:4,o=e||{},a=o.qos||0,s=o.retain?g.RETAIN_MASK:0,u=o.topic,l=o.payload||b,f=o.messageId,h=o.properties,d=0;if("string"==typeof u)d+=y.byteLength(u)+2;else{if(!y.isBuffer(u))return t.destroy(Error("Invalid topic")),!1;d+=u.length+2}if(y.isBuffer(l)?d+=l.length:d+=y.byteLength(l),a&&"number"!=typeof f)return t.destroy(Error("Invalid messageId")),!1;a&&(d+=2);var v=null;if(5===n){if(!(v=c(t,h)))return!1;d+=v.length}return t.write(g.PUBLISH_HEADER[a][o.dup?1:0][s?1:0]),i(t,d),P(t,p(u)),t.write(u),a>0&&P(t,f),null==v||v.write(),k("publish: payload: %o",l),t.write(l)}(e,t,r);case"puback":case"pubrec":case"pubrel":case"pubcomp":return function(e,t,r){var n=r?r.protocolVersion:4,o=e||{},a=o.cmd||"puback",s=o.messageId,u=o.dup&&"pubrel"===a?g.DUP_MASK:0,l=0,c=o.reasonCode,h=o.properties,d=5===n?3:2;if("pubrel"===a&&(l=1),"number"!=typeof s)return t.destroy(Error("Invalid messageId")),!1;var p=null;if(5===n&&"object"==typeof h){if(!(p=f(t,h,r,d)))return!1;d+=p.length}return t.write(g.ACKS[a][l][u][0]),3===d&&(d+=0!==c?1:-1),i(t,d),P(t,s),5===n&&2!==d&&t.write(y.from([c])),null!==p?p.write():4===d&&t.write(y.from([0])),!0}(e,t,r);case"subscribe":return function(e,t,r){k("subscribe: packet: ");var n=r?r.protocolVersion:4,a=e||{},s=a.dup?g.DUP_MASK:0,u=a.messageId,l=a.subscriptions,f=a.properties,h=0;if("number"!=typeof u)return t.destroy(Error("Invalid messageId")),!1;h+=2;var d=null;if(5===n){if(!(d=c(t,f)))return!1;h+=d.length}if("object"!=typeof l||!l.length)return t.destroy(Error("Invalid subscriptions")),!1;for(var p=0;p<l.length;p+=1){var v=l[p].topic,b=l[p].qos;if("string"!=typeof v)return t.destroy(Error("Invalid subscriptions - invalid topic")),!1;if("number"!=typeof b)return t.destroy(Error("Invalid subscriptions - invalid qos")),!1;if(5===n){if("boolean"!=typeof(l[p].nl||!1))return t.destroy(Error("Invalid subscriptions - invalid No Local")),!1;if("boolean"!=typeof(l[p].rap||!1))return t.destroy(Error("Invalid subscriptions - invalid Retain as Published")),!1;var m=l[p].rh||0;if("number"!=typeof m||m>2)return t.destroy(Error("Invalid subscriptions - invalid Retain Handling")),!1}h+=y.byteLength(v)+2+1}k("subscribe: writing to stream: %o",g.SUBSCRIBE_HEADER),t.write(g.SUBSCRIBE_HEADER[1][s?1:0][0]),i(t,h),P(t,u),null!==d&&d.write();var w=!0,_=!0,E=!1,S=void 0;try{for(var A,I=l[Symbol.iterator]();!(_=(A=I.next()).done);_=!0){var T=A.value,O=void 0,R=T.topic,C=T.qos,x=+T.nl,B=+T.rap,M=T.rh;o(t,R),O=g.SUBSCRIBE_OPTIONS_QOS[C],5===n&&(O|=x?g.SUBSCRIBE_OPTIONS_NL:0,O|=B?g.SUBSCRIBE_OPTIONS_RAP:0,O|=M?g.SUBSCRIBE_OPTIONS_RH[M]:0),w=t.write(y.from([O]))}}catch(e){E=!0,S=e}finally{try{_||null==I.return||I.return()}finally{if(E)throw S}}return w}(e,t,r);case"suback":return function(e,t,r){var n=r?r.protocolVersion:4,o=e||{},a=o.messageId,s=o.granted,u=o.properties,l=0;if("number"!=typeof a)return t.destroy(Error("Invalid messageId")),!1;if(l+=2,"object"!=typeof s||!s.length)return t.destroy(Error("Invalid qos vector")),!1;for(var c=0;c<s.length;c+=1){if("number"!=typeof s[c])return t.destroy(Error("Invalid qos vector")),!1;l+=1}var h=null;if(5===n){if(!(h=f(t,u,r,l)))return!1;l+=h.length}return t.write(g.SUBACK_HEADER),i(t,l),P(t,a),null!==h&&h.write(),t.write(y.from(s))}(e,t,r);case"unsubscribe":return function(e,t,r){var n=r?r.protocolVersion:4,a=e||{},s=a.messageId,u=a.dup?g.DUP_MASK:0,l=a.unsubscriptions,f=a.properties,h=0;if("number"!=typeof s)return t.destroy(Error("Invalid messageId")),!1;if(h+=2,"object"!=typeof l||!l.length)return t.destroy(Error("Invalid unsubscriptions")),!1;for(var d=0;d<l.length;d+=1){if("string"!=typeof l[d])return t.destroy(Error("Invalid unsubscriptions")),!1;h+=y.byteLength(l[d])+2}var p=null;if(5===n){if(!(p=c(t,f)))return!1;h+=p.length}t.write(g.UNSUBSCRIBE_HEADER[1][u?1:0][0]),i(t,h),P(t,s),null!==p&&p.write();for(var v=!0,b=0;b<l.length;b++)v=o(t,l[b]);return v}(e,t,r);case"unsuback":return function(e,t,r){var n=r?r.protocolVersion:4,o=e||{},a=o.messageId,s=o.dup?g.DUP_MASK:0,u=o.granted,l=o.properties,c=o.cmd,h=2;if("number"!=typeof a)return t.destroy(Error("Invalid messageId")),!1;if(5===n){if("object"!=typeof u||!u.length)return t.destroy(Error("Invalid qos vector")),!1;for(var d=0;d<u.length;d+=1){if("number"!=typeof u[d])return t.destroy(Error("Invalid qos vector")),!1;h+=1}}var p=null;if(5===n){if(!(p=f(t,l,r,h)))return!1;h+=p.length}return t.write(g.ACKS[c][0][s][0]),i(t,h),P(t,a),null!==p&&p.write(),5===n&&t.write(y.from(u)),!0}(e,t,r);case"pingreq":case"pingresp":return function(e,t){return t.write(g.EMPTY[e.cmd])}(e,t);case"disconnect":return function(e,t,r){var n=r?r.protocolVersion:4,o=e||{},a=o.reasonCode,s=o.properties,u=5===n?1:0,l=null;if(5===n){if(!(l=f(t,s,r,u)))return!1;u+=l.length}return t.write(y.from([g.codes.disconnect<<4])),i(t,u),5===n&&t.write(y.from([a])),null!==l&&l.write(),!0}(e,t,r);case"auth":return function(e,t,r){var n=r?r.protocolVersion:4,o=e||{},a=o.reasonCode,s=o.properties,u=5===n?1:0;5!==n&&t.destroy(Error("Invalid mqtt version for auth packet"));var l=f(t,s,r,u);return!!l&&(u+=l.length,t.write(y.from([g.codes.auth<<4])),i(t,u),t.write(y.from([a])),null!==l&&l.write(),!0)}(e,t,r);default:return t.destroy(Error("Unknown command")),!1}},n=function(e){e.uncork()},i=function(e,t){if(t>g.VARBYTEINT_MAX)return e.destroy(Error("Invalid variable byte integer: "+t)),!1;var r=R[t];return r||(r=I(t),t<16384&&(R[t]=r)),k("writeVarByteInt: writing to stream: %o",r),e.write(r)},o=function(e,t){var r=y.byteLength(t);return P(e,r),k("writeString: %s",t),e.write(t,"utf8")},a=function(e,t,r){o(e,t),o(e,r)},s=function(e,t){return k("writeNumberCached: number: %d",t),k("writeNumberCached: %o",E[t]),e.write(E[t])},u=function(e,t){var r=S(t);return k("writeNumberGenerated: %o",r),e.write(r)},l=function(e,t){"string"==typeof t?o(e,t):t?(P(e,t.length),e.write(t)):P(e,0)},c=function(e,t){if("object"!=typeof t||null!=t.length)return{length:1,write:function(){d(e,{},0)}};var r=0;function n(t,r){var n=0;switch(g.propertiesTypes[t]){case"byte":if("boolean"!=typeof r)return e.destroy(Error("Invalid ".concat(t,": ").concat(r))),!1;n+=2;break;case"int8":if("number"!=typeof r||r<0||r>255)return e.destroy(Error("Invalid ".concat(t,": ").concat(r))),!1;n+=2;break;case"binary":if(r&&null===r)return e.destroy(Error("Invalid ".concat(t,": ").concat(r))),!1;n+=1+y.byteLength(r)+2;break;case"int16":if("number"!=typeof r||r<0||r>65535)return e.destroy(Error("Invalid ".concat(t,": ").concat(r))),!1;n+=3;break;case"int32":if("number"!=typeof r||r<0||r>4294967295)return e.destroy(Error("Invalid ".concat(t,": ").concat(r))),!1;n+=5;break;case"var":if("number"!=typeof r||r<0||r>268435455)return e.destroy(Error("Invalid ".concat(t,": ").concat(r))),!1;n+=1+y.byteLength(I(r));break;case"string":if("string"!=typeof r)return e.destroy(Error("Invalid ".concat(t,": ").concat(r))),!1;n+=3+y.byteLength(r.toString());break;case"pair":if("object"!=typeof r)return e.destroy(Error("Invalid ".concat(t,": ").concat(r))),!1;n+=Object.getOwnPropertyNames(r).reduce((function(e,t){var n=r[t];return e+(Array.isArray(n)?n.reduce((function(e,r){return e+(3+y.byteLength(t.toString())+2+y.byteLength(r.toString()))}),0):3+y.byteLength(t.toString())+2+y.byteLength(r[t].toString()))}),0);break;default:return e.destroy(Error("Invalid property ".concat(t,": ").concat(r))),!1}return n}if(t)for(var i in t){var o=0,a=0,s=t[i];if(void 0!==s){if(Array.isArray(s))for(var u=0;u<s.length;u++){if(!(a=n(i,s[u])))return!1;o+=a}else{if(!(a=n(i,s)))return!1;o=a}if(!o)return!1;r+=o}}return{length:y.byteLength(I(r))+r,write:function(){d(e,t,r)}}},f=function(e,t,r,n){var i=["reasonString","userProperties"],o=r&&r.properties&&r.properties.maximumPacketSize?r.properties.maximumPacketSize:0,a=c(e,t);if(o)for(;n+a.length>o;){var s=i.shift();if(!s||!t[s])return!1;delete t[s],a=c(e,t)}return a},h=function(e,t,r){switch(g.propertiesTypes[t]){case"byte":e.write(y.from([g.properties[t]])),e.write(y.from([+r]));break;case"int8":e.write(y.from([g.properties[t]])),e.write(y.from([r]));break;case"binary":e.write(y.from([g.properties[t]])),l(e,r);break;case"int16":e.write(y.from([g.properties[t]])),P(e,r);break;case"int32":e.write(y.from([g.properties[t]])),function(e,t){var r=T(t);k("write4ByteNumber: %o",r),e.write(r)}(e,r);break;case"var":e.write(y.from([g.properties[t]])),i(e,r);break;case"string":e.write(y.from([g.properties[t]])),o(e,r);break;case"pair":Object.getOwnPropertyNames(r).forEach((function(n){var i=r[n];Array.isArray(i)?i.forEach((function(r){e.write(y.from([g.properties[t]])),a(e,n.toString(),r.toString())})):(e.write(y.from([g.properties[t]])),a(e,n.toString(),i.toString()))}));break;default:return e.destroy(Error("Invalid property ".concat(t," value: ").concat(r))),!1}},d=function(e,t,r){for(var n in i(e,r),t)if({}.hasOwnProperty.call(t,n)&&null!=t[n]){var o=t[n];if(Array.isArray(o))for(var a=0;a<o.length;a++)h(e,n,o[a]);else h(e,n,o)}},p=function(e){return e?e instanceof y?e.length:y.byteLength(e):0},v=function(e){return"string"==typeof e||e instanceof y};te(),zt(),xt();var g=Xr(),y=(Vt(),ee(Bt)).Buffer,b=y.allocUnsafe(0),m=y.from([0]),w=rn(),_=nn().nextTick,k=en()("mqtt-packet:writeToStream"),E=w.cache,S=w.generateNumber,A=w.generateCache,I=w.genBufVariableByteInt,T=w.generate4ByteBuffer,P=s,O=!0;Object.defineProperty(r,"cacheNumbers",{get:function(){return P===s},set:function(e){e?((!E||0===Object.keys(E).length)&&(O=!0),P=s):(O=!1,P=u)}});var R={};t.exports=r})),an=$((function(e,t){te(),zt(),xt();var r=on(),n=(_r(),ee(pr)).EventEmitter,i=(Vt(),ee(Bt)).Buffer,o=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){var e;return(0,k.default)(this,r),(e=t.call(this))._array=Array(20),e._i=0,(0,D.default)(e)}return(0,C.default)(r,[{key:"write",value:function(e){return this._array[this._i++]=e,!0}},{key:"concat",value:function(){var e,t=0,r=Array(this._array.length),n=this._array,o=0;for(e=0;e<n.length&&void 0!==n[e];e++)"string"!=typeof n[e]?r[e]=n[e].length:r[e]=i.byteLength(n[e]),t+=r[e];var a=i.allocUnsafe(t);for(e=0;e<n.length&&void 0!==n[e];e++)"string"!=typeof n[e]?(n[e].copy(a,o),o+=r[e]):(a.write(n[e],o),o+=r[e]);return a}},{key:"destroy",value:function(e){e&&this.emit("error",e)}}]),r}(n);t.exports=function(e,t){var n=new o;return r(e,n,t),n.concat()}})),sn=$((function(e){te(),zt(),xt(),e.parser=tn().parser,e.generate=an(),e.writeToStream=on()})),un=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){"use strict";function e(){(0,k.default)(this,e),this.nextId=Math.max(1,Math.floor(65535*Math.random()))}return(0,C.default)(e,[{key:"allocate",value:function(){var e=this.nextId++;return 65536===this.nextId&&(this.nextId=1),e}},{key:"getLastAllocated",value:function(){return 1===this.nextId?65535:this.nextId-1}},{key:"register",value:function(e){return!0}},{key:"deallocate",value:function(e){}},{key:"clear",value:function(){}}]),e}()})),ln=$((function(e,t){var r=function(e){return e instanceof Ft?Ft.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)};te(),zt(),xt(),t.exports=function(e){var t=function(e,t){for(var i=Object.keys(e),o=Array(i.length),a=0;a<i.length;a++){var s=i[a],u=e[s];"object"!=typeof u||null===u?o[s]=u:u.constructor!==Object&&(c=n.get(u.constructor))?o[s]=c(u,t):ArrayBuffer.isView(u)?o[s]=r(u):o[s]=t(u)}return o};if((e=e||{}).circles)return function(e){var t=function(e,t){for(var a=Object.keys(e),s=Array(a.length),u=0;u<a.length;u++){var l=a[u],c=e[l];if("object"!=typeof c||null===c)s[l]=c;else if(c.constructor!==Object&&(h=o.get(c.constructor)))s[l]=h(c,t);else if(ArrayBuffer.isView(c))s[l]=r(c);else{var f=n.indexOf(c);s[l]=-1!==f?i[f]:t(c)}}return s},n=[],i=[],o=new Map,a=!0,s=!1,u=void 0;if(o.set(Date,(function(e){return new Date(e)})),o.set(Map,(function(e,r){return new Map(t(Array.from(e),r))})),o.set(Set,(function(e,r){return new Set(t(Array.from(e),r))})),e.constructorHandlers)try{for(var l,c=e.constructorHandlers[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var f=l.value;o.set(f[0],f[1])}}catch(e){s=!0,u=e}finally{try{a||null==c.return||c.return()}finally{if(s)throw u}}var h=null;return e.proto?function e(a){if("object"!=typeof a||null===a)return a;if(Array.isArray(a))return t(a,e);if(a.constructor!==Object&&(h=o.get(a.constructor)))return h(a,e);var s={};for(var u in n.push(a),i.push(s),a){var l=a[u];if("object"!=typeof l||null===l)s[u]=l;else if(l.constructor!==Object&&(h=o.get(l.constructor)))s[u]=h(l,e);else if(ArrayBuffer.isView(l))s[u]=r(l);else{var c=n.indexOf(l);s[u]=-1!==c?i[c]:e(l)}}return n.pop(),i.pop(),s}:function e(a){if("object"!=typeof a||null===a)return a;if(Array.isArray(a))return t(a,e);if(a.constructor!==Object&&(h=o.get(a.constructor)))return h(a,e);var s={};for(var u in n.push(a),i.push(s),a)if(!1!==Object.hasOwnProperty.call(a,u)){var l=a[u];if("object"!=typeof l||null===l)s[u]=l;else if(l.constructor!==Object&&(h=o.get(l.constructor)))s[u]=h(l,e);else if(ArrayBuffer.isView(l))s[u]=r(l);else{var c=n.indexOf(l);s[u]=-1!==c?i[c]:e(l)}}return n.pop(),i.pop(),s}}(e);var n=new Map,i=!0,o=!1,a=void 0;if(n.set(Date,(function(e){return new Date(e)})),n.set(Map,(function(e,r){return new Map(t(Array.from(e),r))})),n.set(Set,(function(e,r){return new Set(t(Array.from(e),r))})),e.constructorHandlers)try{for(var s,u=e.constructorHandlers[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var l=s.value;n.set(l[0],l[1])}}catch(e){o=!0,a=e}finally{try{i||null==u.return||u.return()}finally{if(o)throw a}}var c=null;return e.proto?function e(i){if("object"!=typeof i||null===i)return i;if(Array.isArray(i))return t(i,e);if(i.constructor!==Object&&(c=n.get(i.constructor)))return c(i,e);var o={};for(var a in i){var s=i[a];"object"!=typeof s||null===s?o[a]=s:s.constructor!==Object&&(c=n.get(s.constructor))?o[a]=c(s,e):ArrayBuffer.isView(s)?o[a]=r(s):o[a]=e(s)}return o}:function e(i){if("object"!=typeof i||null===i)return i;if(Array.isArray(i))return t(i,e);if(i.constructor!==Object&&(c=n.get(i.constructor)))return c(i,e);var o={};for(var a in i)if(!1!==Object.hasOwnProperty.call(i,a)){var s=i[a];"object"!=typeof s||null===s?o[a]=s:s.constructor!==Object&&(c=n.get(s.constructor))?o[a]=c(s,e):ArrayBuffer.isView(s)?o[a]=r(s):o[a]=e(s)}return o}}})),cn=$((function(e,t){te(),zt(),xt(),t.exports=ln()()})),fn=$((function(e){var t=function(e){for(var t=e.split("/"),r=0;r<t.length;r++)if("+"!==t[r]){if("#"===t[r])return r===t.length-1;if(-1!==t[r].indexOf("+")||-1!==t[r].indexOf("#"))return!1}return!0};te(),zt(),xt(),Object.defineProperty(e,"__esModule",{value:!0}),e.validateTopic=t,e.validateTopics=function(e){if(0===e.length)return"empty_topic_list";for(var r=0;r<e.length;r++)if(!t(e[r]))return e[r];return null}})),hn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"__esModule",{value:!0});var t=Kr(),r={objectMode:!0},n={clean:!0};e.default=function(){"use strict";function e(t){(0,k.default)(this,e),this.options=t||{},this.options=Object.assign(Object.assign({},n),t),this._inflights=new Map}return(0,C.default)(e,[{key:"put",value:function(e,t){return this._inflights.set(e.messageId,e),t&&t(),this}},{key:"createStream",value:function(){var e=new t.Readable(r),n=[],i=!1,o=0;return this._inflights.forEach((function(e){n.push(e)})),e._read=function(){!i&&o<n.length?e.push(n[o++]):e.push(null)},e.destroy=function(){if(!i)return i=!0,setTimeout((function(){e.emit("close")}),0),e},e}},{key:"del",value:function(e,t){var r=this._inflights.get(e.messageId);return r?(this._inflights.delete(e.messageId),t(null,r)):t&&t(Error("missing packet")),this}},{key:"get",value:function(e,t){var r=this._inflights.get(e.messageId);return r?t(null,r):t&&t(Error("missing packet")),this}},{key:"close",value:function(e){this.options.clean&&(this._inflights=null),e&&e()}}]),e}()})),dn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"__esModule",{value:!0});var t=[0,16,128,131,135,144,145,151,153];e.default=function(e,r,n){e.log("handlePublish: packet %o",r),n=(void 0===n?"undefined":(0,q.default)(n))<"u"?n:e.noop;var i,o=r.topic.toString(),a=r.payload,s=r.qos,u=r.messageId,l=e.options;if(5===e.options.protocolVersion&&(r.properties&&(i=r.properties.topicAlias),(void 0===i?"undefined":(0,q.default)(i))<"u"))if(0===o.length){if(!(i>0&&i<=65535))return e.log("handlePublish :: topic alias out of range. alias: %d",i),void e.emit("error",Error("Received Topic Alias is out of range"));var c=e.topicAliasRecv.getTopicByAlias(i);if(!c)return e.log("handlePublish :: unregistered topic alias. alias: %d",i),void e.emit("error",Error("Received unregistered Topic Alias"));o=c,e.log("handlePublish :: topic complemented by alias. topic: %s - alias: %d",o,i)}else{if(!e.topicAliasRecv.put(o,i))return e.log("handlePublish :: topic alias out of range. alias: %d",i),void e.emit("error",Error("Received Topic Alias is out of range"));e.log("handlePublish :: registered topic: %s - alias: %d",o,i)}switch(e.log("handlePublish: qos %d",s),s){case 2:l.customHandleAcks(o,a,r,(function(i,o){return"number"==typeof i&&(o=i,i=null),i?e.emit("error",i):-1===t.indexOf(o)?e.emit("error",Error("Wrong reason code for pubrec")):void(o?e._sendPacket({cmd:"pubrec",messageId:u,reasonCode:o},n):e.incomingStore.put(r,(function(){e._sendPacket({cmd:"pubrec",messageId:u},n)})))}));break;case 1:l.customHandleAcks(o,a,r,(function(i,s){return"number"==typeof i&&(s=i,i=null),i?e.emit("error",i):-1===t.indexOf(s)?e.emit("error",Error("Wrong reason code for puback")):(s||e.emit("message",o,a,r),void e.handleMessage(r,(function(t){if(t)return n&&n(t);e._sendPacket({cmd:"puback",messageId:u,reasonCode:s},n)})))}));break;case 0:e.emit("message",o,a,r),e.handleMessage(r,n);break;default:e.log("handlePublish: unknown QoS. Doing nothing.")}}})),pn=$((function(e,t){t.exports={version:"5.13.0"}})),vn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"__esModule",{value:!0}),e.MQTTJS_VERSION=e.nextTick=e.ErrorWithSubackPacket=e.ErrorWithReasonCode=void 0,e.applyMixin=function(e,t){for(var r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[t];;){var o=i[0],a=Object.getPrototypeOf(o);if(!(null==a?void 0:a.prototype))break;i.unshift(a)}var s=!0,u=!1,l=void 0,c=!0,f=!1,h=void 0;try{for(var d,p=i[Symbol.iterator]();!(c=(d=p.next()).done);c=!0){var v=d.value;try{for(var g,y=Object.getOwnPropertyNames(v.prototype)[Symbol.iterator]();!(s=(g=y.next()).done);s=!0){var b=g.value;(n||"constructor"!==b)&&Object.defineProperty(e.prototype,b,null!==(r=Object.getOwnPropertyDescriptor(v.prototype,b))&&void 0!==r?r:Object.create(null))}}catch(e){u=!0,l=e}finally{try{s||null==y.return||y.return()}finally{if(u)throw l}}}}catch(e){f=!0,h=e}finally{try{c||null==p.return||p.return()}finally{if(f)throw h}}},e.ErrorWithReasonCode=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(e,n){var i;return(0,k.default)(this,r),(i=t.call(this,e)).code=n,Object.setPrototypeOf((0,y.default)(i),r.prototype),Object.getPrototypeOf(i).name="ErrorWithReasonCode",(0,D.default)(i)}return r}((0,V.default)(Error)),e.ErrorWithSubackPacket=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(e,n){var i;return(0,k.default)(this,r),(i=t.call(this,e)).packet=n,Object.setPrototypeOf((0,y.default)(i),r.prototype),Object.getPrototypeOf(i).name="ErrorWithSubackPacket",(0,D.default)(i)}return r}((0,V.default)(Error)),e.nextTick="function"==typeof(null==re?void 0:re.nextTick)?re.nextTick:function(e){setTimeout(e,0)},e.MQTTJS_VERSION=pn().version})),gn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"__esModule",{value:!0}),e.ReasonCodes=void 0;var t=vn();e.ReasonCodes={0:"",1:"Unacceptable protocol version",2:"Identifier rejected",3:"Server unavailable",4:"Bad username or password",5:"Not authorized",16:"No matching subscribers",17:"No subscription existed",128:"Unspecified error",129:"Malformed Packet",130:"Protocol Error",131:"Implementation specific error",132:"Unsupported Protocol Version",133:"Client Identifier not valid",134:"Bad User Name or Password",135:"Not authorized",136:"Server unavailable",137:"Server busy",138:"Banned",139:"Server shutting down",140:"Bad authentication method",141:"Keep Alive timeout",142:"Session taken over",143:"Topic Filter invalid",144:"Topic Name invalid",145:"Packet identifier in use",146:"Packet Identifier not found",147:"Receive Maximum exceeded",148:"Topic Alias invalid",149:"Packet too large",150:"Message rate too high",151:"Quota exceeded",152:"Administrative action",153:"Payload format invalid",154:"Retain not supported",155:"QoS not supported",156:"Use another server",157:"Server moved",158:"Shared Subscriptions not supported",159:"Connection rate exceeded",160:"Maximum connect time",161:"Subscription Identifiers not supported",162:"Wildcard Subscriptions not supported"},e.default=function(r,n){var i=n.messageId,o=n.cmd,a=null,s=r.outgoing[i]?r.outgoing[i].cb:null,u=null;if(s){switch(r.log("_handleAck :: packet type",o),o){case"pubcomp":case"puback":var l=n.reasonCode;l&&l>0&&16!==l?(u=new t.ErrorWithReasonCode("Publish error: "+e.ReasonCodes[l],l),r._removeOutgoingAndStoreMessage(i,(function(){s(u,n)}))):r._removeOutgoingAndStoreMessage(i,s);break;case"pubrec":a={cmd:"pubrel",qos:2,messageId:i};var c=n.reasonCode;c&&c>0&&16!==c?(u=new t.ErrorWithReasonCode("Publish error: "+e.ReasonCodes[c],c),r._removeOutgoingAndStoreMessage(i,(function(){s(u,n)}))):r._sendPacket(a);break;case"suback":delete r.outgoing[i],r.messageIdProvider.deallocate(i);for(var f=n.granted,h=0;h<f.length;h++){var d=f[h];if(128&d){(u=Error("Subscribe error: "+e.ReasonCodes[d])).code=d;var p=r.messageIdToTopic[i];p&&p.forEach((function(e){delete r._resubscribeTopics[e]}))}}delete r.messageIdToTopic[i],r._invokeStoreProcessingQueue(),s(u,n);break;case"unsuback":delete r.outgoing[i],r.messageIdProvider.deallocate(i),r._invokeStoreProcessingQueue(),s(null,n);break;default:r.emit("error",Error("unrecognized packet type"))}r.disconnecting&&0===Object.keys(r.outgoing).length&&r.emit("outgoingEmpty")}else r.log("_handleAck :: Server sent an ack in error. Ignoring.")}})),yn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"__esModule",{value:!0});var t=vn(),r=gn();e.default=function(e,n){var i=e.options.protocolVersion,o=5===i?n.reasonCode:n.returnCode;if(5===i)e.handleAuth(n,(function(n,i){if(n)e.emit("error",n);else if(24===o)e.reconnecting=!1,e._sendPacket(i);else{var a=new t.ErrorWithReasonCode("Connection refused: "+r.ReasonCodes[o],o);e.emit("error",a)}}));else{var a=new t.ErrorWithReasonCode("Protocol error: Auth packets are only supported in MQTT 5. Your version:"+i,o);e.emit("error",a)}}})),bn=$((function(e){var t,r,n,i,o,a,s,u,l,c,f,h,d,p,v,g,y,b,m,_,B,M,H,Q,G,Y,J,X,$,Z,ee,ne,ie,oe,ae,se,ue,le,ce,fe,he,de,pe,ve,ge,ye,be=function(){var e=this,t=new qe((0,E.default)(this,o)),r=new qe((0,E.default)(this,o));(0,A.default)(this,Q,t),(0,A.default)(this,H,r),(0,A.default)(this,ee,(function(n,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ce.now();if(r[n]=0!==i?o:0,t[n]=i,0!==i&&e.ttlAutopurge){var a=setTimeout((function(){(0,E.default)(e,ne).call(e,n)&&(0,T.default)(e,ge,Pe).call(e,(0,E.default)(e,p)[n],"expire")}),i+1);a.unref&&a.unref()}})),(0,A.default)(this,$,(function(e){r[e]=0!==t[e]?Ce.now():0})),(0,A.default)(this,Z,(function(e,o){if(t[o]){var a=t[o],s=r[o];if(!a||!s)return;e.ttl=a,e.start=s,e.now=n||i();var u=e.now-s;e.remainingTTL=a-u}}));var n=0,i=function(){var t=Ce.now();if(e.ttlResolution>0){n=t;var r=setTimeout((function(){return n=0}),e.ttlResolution);r.unref&&r.unref()}return t};this.getRemainingTTL=function(o){var a=(0,E.default)(e,d).get(o);if(void 0===a)return 0;var s=t[a],u=r[a];return s&&u?s-((n||i())-u):1/0},(0,A.default)(this,ne,(function(e){var o=r[e],a=t[e];return!!a&&!!o&&(n||i())-o>a}))},me=function(){var e=this,t=new qe((0,E.default)(this,o));(0,A.default)(this,h,0),(0,A.default)(this,M,t),(0,A.default)(this,oe,(function(r){(0,A.default)(e,h,(0,E.default)(e,h)-t[r]),t[r]=0})),(0,A.default)(this,se,(function(t,r,n,i){if((0,T.default)(e,de,Ae).call(e,r))return 0;if(!We(n)){if(!i)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof i)throw new TypeError("sizeCalculation must be a function");if(n=i(r,t),!We(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return n})),(0,A.default)(this,ae,(function(r,n,i){if(t[r]=n,(0,E.default)(e,a))for(var o=(0,E.default)(e,a)-t[r];(0,E.default)(e,h)>o;)(0,T.default)(e,fe,Ee).call(e,!0);(0,A.default)(e,h,(0,E.default)(e,h)+t[r]),i&&(i.entrySize=n,i.totalCalculatedSize=(0,E.default)(e,h))}))},we=function(){var e,t,r,n,i=arguments;return(0,K.__generator)(this,(function(o){switch(o.label){case 0:if(e=(i.length>0&&void 0!==i[0]?i[0]:{}).allowStale,t=void 0===e?this.allowStale:e,!(0,E.default)(this,f))return[3,6];r=(0,E.default)(this,m),o.label=1;case 1:return(n=(0,T.default)(this,ce,ke).call(this,r))?t||!(0,E.default)(this,ne).call(this,r)?[4,r]:[3,3]:[3,4];case 2:o.sent(),o.label=3;case 3:n=r!==(0,E.default)(this,b),o.label=4;case 4:if(!n)return[3,6];r=(0,E.default)(this,y)[r],o.label=5;case 5:return[3,1];case 6:return[2]}}))},_e=function(){var e,t,r,n,i=arguments;return(0,K.__generator)(this,(function(o){switch(o.label){case 0:if(e=(i.length>0&&void 0!==i[0]?i[0]:{}).allowStale,t=void 0===e?this.allowStale:e,!(0,E.default)(this,f))return[3,6];r=(0,E.default)(this,b),o.label=1;case 1:return(n=(0,T.default)(this,ce,ke).call(this,r))?t||!(0,E.default)(this,ne).call(this,r)?[4,r]:[3,3]:[3,4];case 2:o.sent(),o.label=3;case 3:n=r!==(0,E.default)(this,m),o.label=4;case 4:if(!n)return[3,6];r=(0,E.default)(this,g)[r],o.label=5;case 5:return[3,1];case 6:return[2]}}))},ke=function(e){return void 0!==e&&(0,E.default)(this,d).get((0,E.default)(this,p)[e])===e},Ee=function(e){var t,r,n=(0,E.default)(this,b),i=(0,E.default)(this,p)[n],o=(0,E.default)(this,v)[n];return(0,E.default)(this,Y)&&(0,T.default)(this,de,Ae).call(this,o)?o.__abortController.abort(Error("evicted")):((0,E.default)(this,G)||(0,E.default)(this,J))&&((0,E.default)(this,G)&&(null===(t=(0,E.default)(this,s))||void 0===t||t.call(this,o,i,"evict")),(0,E.default)(this,J)&&(null===(r=(0,E.default)(this,B))||void 0===r||r.push([o,i,"evict"]))),(0,E.default)(this,oe).call(this,n),e&&((0,E.default)(this,p)[n]=void 0,(0,E.default)(this,v)[n]=void 0,(0,E.default)(this,_).push(n)),1===(0,E.default)(this,f)?((0,A.default)(this,b,(0,A.default)(this,m,0)),(0,E.default)(this,_).length=0):(0,A.default)(this,b,(0,E.default)(this,g)[n]),(0,E.default)(this,d).delete(i),(0,I.default)(this,f).value--,n},Se=function(e,t,r,n){var i=this,o=void 0===t?void 0:(0,E.default)(this,v)[t];if((0,T.default)(this,de,Ae).call(this,o))return o;var a=new je,s=r.signal;null==s||s.addEventListener("abort",(function(){return a.abort(s.reason)}),{signal:a.signal});var u={signal:a.signal,options:r,context:n},c=function(n){var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=a.signal.aborted,l=r.ignoreFetchAbort&&void 0!==n;if(r.status&&(s&&!o?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,l&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),s&&!l&&!o)return f(a.signal.reason);var c=h;return(0,E.default)(i,v)[t]===h&&(void 0===n?c.__staleWhileFetching?(0,E.default)(i,v)[t]=c.__staleWhileFetching:(0,T.default)(i,ge,Pe).call(i,e,"fetch"):(r.status&&(r.status.fetchUpdated=!0),i.set(e,n,u.options))),n},f=function(n){var o=a.signal.aborted&&r.allowStaleOnFetchAbort,s=o||r.allowStaleOnFetchRejection,u=s||r.noDeleteOnFetchRejection,l=h;if((0,E.default)(i,v)[t]===h&&(u&&void 0!==l.__staleWhileFetching?o||((0,E.default)(i,v)[t]=l.__staleWhileFetching):(0,T.default)(i,ge,Pe).call(i,e,"fetch")),s)return r.status&&void 0!==l.__staleWhileFetching&&(r.status.returnedStale=!0),l.__staleWhileFetching;if(l.__returned===l)throw n};r.status&&(r.status.fetchDispatched=!0);var h=new Promise((function(t,n){var s,f=null===(s=(0,E.default)(i,l))||void 0===s?void 0:s.call(i,e,o,u);f&&f instanceof Promise&&f.then((function(e){return t(void 0===e?void 0:e)}),n),a.signal.addEventListener("abort",(function(){(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(t(void 0),r.allowStaleOnFetchAbort&&(t=function(e){return c(e,!0)}))}))})).then(c,(function(e){return r.status&&(r.status.fetchRejected=!0,r.status.fetchError=e),f(e)})),p=Object.assign(h,{__abortController:a,__staleWhileFetching:o,__returned:void 0});return void 0===t?(this.set(e,p,(0,U.default)((0,L.default)({},u.options),{status:void 0})),t=(0,E.default)(this,d).get(e)):(0,E.default)(this,v)[t]=p,p},Ae=function(e){if(!(0,E.default)(this,Y))return!1;var t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof je},Ie=function(e,t){(0,E.default)(this,y)[t]=e,(0,E.default)(this,g)[e]=t},Te=function(e){e!==(0,E.default)(this,m)&&(e===(0,E.default)(this,b)?(0,A.default)(this,b,(0,E.default)(this,g)[e]):(0,T.default)(this,pe,Ie).call(this,(0,E.default)(this,y)[e],(0,E.default)(this,g)[e]),(0,T.default)(this,pe,Ie).call(this,(0,E.default)(this,m),e),(0,A.default)(this,m,e))},Pe=function(e,t){var r,n=!1;if(0!==(0,E.default)(this,f)){var i=(0,E.default)(this,d).get(e);if(void 0!==i)if(n=!0,1===(0,E.default)(this,f))(0,T.default)(this,ye,Oe).call(this,t);else{var o,a;(0,E.default)(this,oe).call(this,i);var l=(0,E.default)(this,v)[i];if((0,T.default)(this,de,Ae).call(this,l)?l.__abortController.abort(Error("deleted")):((0,E.default)(this,G)||(0,E.default)(this,J))&&((0,E.default)(this,G)&&(null===(o=(0,E.default)(this,s))||void 0===o||o.call(this,l,e,t)),(0,E.default)(this,J)&&(null===(a=(0,E.default)(this,B))||void 0===a||a.push([l,e,t]))),(0,E.default)(this,d).delete(e),(0,E.default)(this,p)[i]=void 0,(0,E.default)(this,v)[i]=void 0,i===(0,E.default)(this,m))(0,A.default)(this,m,(0,E.default)(this,y)[i]);else if(i===(0,E.default)(this,b))(0,A.default)(this,b,(0,E.default)(this,g)[i]);else{var c=(0,E.default)(this,y)[i];(0,E.default)(this,g)[c]=(0,E.default)(this,g)[i];var h=(0,E.default)(this,g)[i];(0,E.default)(this,y)[h]=(0,E.default)(this,y)[i]}(0,I.default)(this,f).value--,(0,E.default)(this,_).push(i)}}if((0,E.default)(this,J)&&(null===(r=(0,E.default)(this,B))||void 0===r?void 0:r.length))for(var w,k,S=(0,E.default)(this,B);k=null==S?void 0:S.shift();)null===(w=(0,E.default)(this,u))||void 0===w||w.call.apply(w,[this].concat((0,F.default)(k)));return n},Oe=function(e){var t=!0,r=!1,n=void 0;try{for(var i,o=(0,T.default)(this,le,_e).call(this,{allowStale:!0})[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value,l=(0,E.default)(this,v)[a];if((0,T.default)(this,de,Ae).call(this,l))l.__abortController.abort(Error("deleted"));else{var c,g,y=(0,E.default)(this,p)[a];(0,E.default)(this,G)&&(null===(c=(0,E.default)(this,s))||void 0===c||c.call(this,l,y,e)),(0,E.default)(this,J)&&(null===(g=(0,E.default)(this,B))||void 0===g||g.push([l,y,e]))}}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}if((0,E.default)(this,d).clear(),(0,E.default)(this,v).fill(void 0),(0,E.default)(this,p).fill(void 0),(0,E.default)(this,Q)&&(0,E.default)(this,H)&&((0,E.default)(this,Q).fill(0),(0,E.default)(this,H).fill(0)),(0,E.default)(this,M)&&(0,E.default)(this,M).fill(0),(0,A.default)(this,b,0),(0,A.default)(this,m,0),(0,E.default)(this,_).length=0,(0,A.default)(this,h,0),(0,A.default)(this,f,0),(0,E.default)(this,J)&&(0,E.default)(this,B))for(var w,k,S=(0,E.default)(this,B);k=null==S?void 0:S.shift();)null===(w=(0,E.default)(this,u))||void 0===w||w.call.apply(w,[this].concat((0,F.default)(k)))};te(),zt(),xt(),Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=void 0;var Re,Ce="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,xe=new Set,Be="object"==typeof re&&re?re:{},Me=function(e,t,r,n){"function"==typeof Be.emitWarning?Be.emitWarning(e,t,r,n):console.error("[".concat(r,"] ").concat(t,": ").concat(e))},je=globalThis.AbortController,Le=globalThis.AbortSignal;if((void 0===je?"undefined":(0,q.default)(je))>"u"){var Ue;Le=function(){"use strict";function e(){(0,k.default)(this,e),(0,x.default)(this,"onabort",void 0),(0,x.default)(this,"_onabort",[]),(0,x.default)(this,"reason",void 0),(0,x.default)(this,"aborted",!1)}return(0,C.default)(e,[{key:"addEventListener",value:function(e,t){this._onabort.push(t)}}]),e}(),je=function(){"use strict";function e(){(0,k.default)(this,e),(0,x.default)(this,"signal",new Le),De()}return(0,C.default)(e,[{key:"abort",value:function(e){if(!this.signal.aborted){var t,r;this.signal.reason=e,this.signal.aborted=!0;var n=!0,i=!1,o=void 0;try{for(var a,s=this.signal._onabort[Symbol.iterator]();!(n=(a=s.next()).done);n=!0)(0,a.value)(e)}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}null===(r=(t=this.signal).onabort)||void 0===r||r.call(t,e)}}}]),e}();var Ne="1"!==(null===(Ue=Be.env)||void 0===Ue?void 0:Ue.LRU_CACHE_IGNORE_AC_WARNING),De=function(){Ne&&(Ne=!1,Me("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",De))}}var We=function(e){return e&&e===Math.floor(e)&&e>0&&isFinite(e)},Fe=function(e){return We(e)?e<=256?Uint8Array:e<=65536?Uint16Array:e<=4294967296?Uint32Array:e<=Number.MAX_SAFE_INTEGER?qe:null:null},qe=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(e){var n;return(0,k.default)(this,r),(n=t.call(this,e)).fill(0),(0,D.default)(n)}return r}((0,V.default)(Array)),He=(n=function(){"use strict";function e(t,r){if((0,k.default)(this,e),(0,x.default)(this,"heap",void 0),(0,x.default)(this,"length",void 0),!(0,O.default)(e,n,i))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}return(0,C.default)(e,[{key:"push",value:function(e){this.heap[this.length++]=e}},{key:"pop",value:function(){return this.heap[--this.length]}}],[{key:"create",value:function(t){var r=Fe(t);if(!r)return[];(0,R.default)(e,n,i,!0);var o=new e(t,r);return(0,R.default)(e,n,i,!1),o}}]),e}(),i={writable:!0,value:!1},n),Ve=(o=new WeakMap,a=new WeakMap,s=new WeakMap,u=new WeakMap,l=new WeakMap,c=new WeakMap,f=new WeakMap,h=new WeakMap,d=new WeakMap,p=new WeakMap,v=new WeakMap,g=new WeakMap,y=new WeakMap,b=new WeakMap,m=new WeakMap,_=new WeakMap,B=new WeakMap,M=new WeakMap,H=new WeakMap,Q=new WeakMap,G=new WeakMap,Y=new WeakMap,J=new WeakMap,X=new WeakSet,$=new WeakMap,Z=new WeakMap,ee=new WeakMap,ne=new WeakMap,ie=new WeakSet,oe=new WeakMap,ae=new WeakMap,se=new WeakMap,ue=new WeakSet,le=new WeakSet,ce=new WeakSet,fe=new WeakSet,he=new WeakSet,de=new WeakSet,pe=new WeakSet,ve=new WeakSet,ge=new WeakSet,ye=new WeakSet,t=Symbol.iterator,r=Symbol.toStringTag,Re=function(){"use strict";function e(t){(0,k.default)(this,e),(0,P.default)(this,X),(0,P.default)(this,ie),(0,P.default)(this,ue),(0,P.default)(this,le),(0,P.default)(this,ce),(0,P.default)(this,fe),(0,P.default)(this,he),(0,P.default)(this,de),(0,P.default)(this,pe),(0,P.default)(this,ve),(0,P.default)(this,ge),(0,P.default)(this,ye),(0,S.default)(this,o,{writable:!0,value:void 0}),(0,S.default)(this,a,{writable:!0,value:void 0}),(0,S.default)(this,s,{writable:!0,value:void 0}),(0,S.default)(this,u,{writable:!0,value:void 0}),(0,S.default)(this,l,{writable:!0,value:void 0}),(0,S.default)(this,c,{writable:!0,value:void 0}),(0,x.default)(this,"ttl",void 0),(0,x.default)(this,"ttlResolution",void 0),(0,x.default)(this,"ttlAutopurge",void 0),(0,x.default)(this,"updateAgeOnGet",void 0),(0,x.default)(this,"updateAgeOnHas",void 0),(0,x.default)(this,"allowStale",void 0),(0,x.default)(this,"noDisposeOnSet",void 0),(0,x.default)(this,"noUpdateTTL",void 0),(0,x.default)(this,"maxEntrySize",void 0),(0,x.default)(this,"sizeCalculation",void 0),(0,x.default)(this,"noDeleteOnFetchRejection",void 0),(0,x.default)(this,"noDeleteOnStaleGet",void 0),(0,x.default)(this,"allowStaleOnFetchAbort",void 0),(0,x.default)(this,"allowStaleOnFetchRejection",void 0),(0,x.default)(this,"ignoreFetchAbort",void 0),(0,S.default)(this,f,{writable:!0,value:void 0}),(0,S.default)(this,h,{writable:!0,value:void 0}),(0,S.default)(this,d,{writable:!0,value:void 0}),(0,S.default)(this,p,{writable:!0,value:void 0}),(0,S.default)(this,v,{writable:!0,value:void 0}),(0,S.default)(this,g,{writable:!0,value:void 0}),(0,S.default)(this,y,{writable:!0,value:void 0}),(0,S.default)(this,b,{writable:!0,value:void 0}),(0,S.default)(this,m,{writable:!0,value:void 0}),(0,S.default)(this,_,{writable:!0,value:void 0}),(0,S.default)(this,B,{writable:!0,value:void 0}),(0,S.default)(this,M,{writable:!0,value:void 0}),(0,S.default)(this,H,{writable:!0,value:void 0}),(0,S.default)(this,Q,{writable:!0,value:void 0}),(0,S.default)(this,G,{writable:!0,value:void 0}),(0,S.default)(this,Y,{writable:!0,value:void 0}),(0,S.default)(this,J,{writable:!0,value:void 0}),(0,S.default)(this,$,{writable:!0,value:function(){}}),(0,S.default)(this,Z,{writable:!0,value:function(){}}),(0,S.default)(this,ee,{writable:!0,value:function(){}}),(0,S.default)(this,ne,{writable:!0,value:function(){return!1}}),(0,S.default)(this,oe,{writable:!0,value:function(){}}),(0,S.default)(this,ae,{writable:!0,value:function(){}}),(0,S.default)(this,se,{writable:!0,value:function(e,t,r,n){if(r||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0}}),(0,x.default)(this,r,"LRUCache");var n=t.max,i=void 0===n?0:n,w=t.ttl,I=t.ttlResolution,O=void 0===I?1:I,R=t.ttlAutopurge,C=t.updateAgeOnGet,j=t.updateAgeOnHas,L=t.allowStale,U=t.dispose,N=t.disposeAfter,D=t.noDisposeOnSet,W=t.noUpdateTTL,F=t.maxSize,q=void 0===F?0:F,V=t.maxEntrySize,z=void 0===V?0:V,K=t.sizeCalculation,te=t.fetchMethod,re=t.memoMethod,we=t.noDeleteOnFetchRejection,_e=t.noDeleteOnStaleGet,ke=t.allowStaleOnFetchRejection,Ee=t.allowStaleOnFetchAbort,Se=t.ignoreFetchAbort;if(0!==i&&!We(i))throw new TypeError("max option must be a nonnegative integer");var Ae=i?Fe(i):Array;if(!Ae)throw Error("invalid max value: "+i);if((0,A.default)(this,o,i),(0,A.default)(this,a,q),this.maxEntrySize=z||(0,E.default)(this,a),this.sizeCalculation=K,this.sizeCalculation){if(!(0,E.default)(this,a)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==re&&"function"!=typeof re)throw new TypeError("memoMethod must be a function if defined");if((0,A.default)(this,c,re),void 0!==te&&"function"!=typeof te)throw new TypeError("fetchMethod must be a function if specified");if((0,A.default)(this,l,te),(0,A.default)(this,Y,!!te),(0,A.default)(this,d,new Map),(0,A.default)(this,p,Array(i).fill(void 0)),(0,A.default)(this,v,Array(i).fill(void 0)),(0,A.default)(this,g,new Ae(i)),(0,A.default)(this,y,new Ae(i)),(0,A.default)(this,b,0),(0,A.default)(this,m,0),(0,A.default)(this,_,He.create(i)),(0,A.default)(this,f,0),(0,A.default)(this,h,0),"function"==typeof U&&(0,A.default)(this,s,U),"function"==typeof N?((0,A.default)(this,u,N),(0,A.default)(this,B,[])):((0,A.default)(this,u,void 0),(0,A.default)(this,B,void 0)),(0,A.default)(this,G,!!(0,E.default)(this,s)),(0,A.default)(this,J,!!(0,E.default)(this,u)),this.noDisposeOnSet=!!D,this.noUpdateTTL=!!W,this.noDeleteOnFetchRejection=!!we,this.allowStaleOnFetchRejection=!!ke,this.allowStaleOnFetchAbort=!!Ee,this.ignoreFetchAbort=!!Se,0!==this.maxEntrySize){if(0!==(0,E.default)(this,a)&&!We((0,E.default)(this,a)))throw new TypeError("maxSize must be a positive integer if specified");if(!We(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");(0,T.default)(this,ie,me).call(this)}if(this.allowStale=!!L,this.noDeleteOnStaleGet=!!_e,this.updateAgeOnGet=!!C,this.updateAgeOnHas=!!j,this.ttlResolution=We(O)||0===O?O:1,this.ttlAutopurge=!!R,this.ttl=w||0,this.ttl){if(!We(this.ttl))throw new TypeError("ttl must be a positive integer if specified");(0,T.default)(this,X,be).call(this)}if(0===(0,E.default)(this,o)&&0===this.ttl&&0===(0,E.default)(this,a))throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!(0,E.default)(this,o)&&!(0,E.default)(this,a)){var Ie="LRU_CACHE_UNBOUNDED";(function(e){return!xe.has(e)})(Ie)&&(xe.add(Ie),Me("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Ie,e))}}return(0,C.default)(e,[{key:"max",get:function(){return(0,E.default)(this,o)}},{key:"maxSize",get:function(){return(0,E.default)(this,a)}},{key:"calculatedSize",get:function(){return(0,E.default)(this,h)}},{key:"size",get:function(){return(0,E.default)(this,f)}},{key:"fetchMethod",get:function(){return(0,E.default)(this,l)}},{key:"memoMethod",get:function(){return(0,E.default)(this,c)}},{key:"dispose",get:function(){return(0,E.default)(this,s)}},{key:"disposeAfter",get:function(){return(0,E.default)(this,u)}},{key:"getRemainingTTL",value:function(e){return(0,E.default)(this,d).has(e)?1/0:0}},{key:"entries",value:function(){var e,t,r,n,i,o,a;return(0,K.__generator)(this,(function(s){switch(s.label){case 0:e=!0,t=!1,r=void 0,s.label=1;case 1:s.trys.push([1,7,8,9]),n=(0,T.default)(this,ue,we).call(this)[Symbol.iterator](),s.label=2;case 2:return(e=(i=n.next()).done)?[3,6]:(o=i.value,void 0===(0,E.default)(this,v)[o]||void 0===(0,E.default)(this,p)[o]||(0,T.default)(this,de,Ae).call(this,(0,E.default)(this,v)[o])?[3,4]:[4,[(0,E.default)(this,p)[o],(0,E.default)(this,v)[o]]]);case 3:s.sent(),s.label=4;case 4:s.label=5;case 5:return e=!0,[3,2];case 6:return[3,9];case 7:return a=s.sent(),t=!0,r=a,[3,9];case 8:try{e||null==n.return||n.return()}finally{if(t)throw r}return[7];case 9:return[2]}}))}},{key:"rentries",value:function(){var e,t,r,n,i,o,a;return(0,K.__generator)(this,(function(s){switch(s.label){case 0:e=!0,t=!1,r=void 0,s.label=1;case 1:s.trys.push([1,7,8,9]),n=(0,T.default)(this,le,_e).call(this)[Symbol.iterator](),s.label=2;case 2:return(e=(i=n.next()).done)?[3,6]:(o=i.value,void 0===(0,E.default)(this,v)[o]||void 0===(0,E.default)(this,p)[o]||(0,T.default)(this,de,Ae).call(this,(0,E.default)(this,v)[o])?[3,4]:[4,[(0,E.default)(this,p)[o],(0,E.default)(this,v)[o]]]);case 3:s.sent(),s.label=4;case 4:s.label=5;case 5:return e=!0,[3,2];case 6:return[3,9];case 7:return a=s.sent(),t=!0,r=a,[3,9];case 8:try{e||null==n.return||n.return()}finally{if(t)throw r}return[7];case 9:return[2]}}))}},{key:"keys",value:function(){var e,t,r,n,i,o,a,s;return(0,K.__generator)(this,(function(u){switch(u.label){case 0:e=!0,t=!1,r=void 0,u.label=1;case 1:u.trys.push([1,7,8,9]),n=(0,T.default)(this,ue,we).call(this)[Symbol.iterator](),u.label=2;case 2:return(e=(i=n.next()).done)?[3,6]:(o=i.value,void 0===(a=(0,E.default)(this,p)[o])||(0,T.default)(this,de,Ae).call(this,(0,E.default)(this,v)[o])?[3,4]:[4,a]);case 3:u.sent(),u.label=4;case 4:u.label=5;case 5:return e=!0,[3,2];case 6:return[3,9];case 7:return s=u.sent(),t=!0,r=s,[3,9];case 8:try{e||null==n.return||n.return()}finally{if(t)throw r}return[7];case 9:return[2]}}))}},{key:"rkeys",value:function(){var e,t,r,n,i,o,a,s;return(0,K.__generator)(this,(function(u){switch(u.label){case 0:e=!0,t=!1,r=void 0,u.label=1;case 1:u.trys.push([1,7,8,9]),n=(0,T.default)(this,le,_e).call(this)[Symbol.iterator](),u.label=2;case 2:return(e=(i=n.next()).done)?[3,6]:(o=i.value,void 0===(a=(0,E.default)(this,p)[o])||(0,T.default)(this,de,Ae).call(this,(0,E.default)(this,v)[o])?[3,4]:[4,a]);case 3:u.sent(),u.label=4;case 4:u.label=5;case 5:return e=!0,[3,2];case 6:return[3,9];case 7:return s=u.sent(),t=!0,r=s,[3,9];case 8:try{e||null==n.return||n.return()}finally{if(t)throw r}return[7];case 9:return[2]}}))}},{key:"values",value:function(){var e,t,r,n,i,o,a;return(0,K.__generator)(this,(function(s){switch(s.label){case 0:e=!0,t=!1,r=void 0,s.label=1;case 1:s.trys.push([1,7,8,9]),n=(0,T.default)(this,ue,we).call(this)[Symbol.iterator](),s.label=2;case 2:return(e=(i=n.next()).done)?[3,6]:(o=i.value,void 0===(0,E.default)(this,v)[o]||(0,T.default)(this,de,Ae).call(this,(0,E.default)(this,v)[o])?[3,4]:[4,(0,E.default)(this,v)[o]]);case 3:s.sent(),s.label=4;case 4:s.label=5;case 5:return e=!0,[3,2];case 6:return[3,9];case 7:return a=s.sent(),t=!0,r=a,[3,9];case 8:try{e||null==n.return||n.return()}finally{if(t)throw r}return[7];case 9:return[2]}}))}},{key:"rvalues",value:function(){var e,t,r,n,i,o,a;return(0,K.__generator)(this,(function(s){switch(s.label){case 0:e=!0,t=!1,r=void 0,s.label=1;case 1:s.trys.push([1,7,8,9]),n=(0,T.default)(this,le,_e).call(this)[Symbol.iterator](),s.label=2;case 2:return(e=(i=n.next()).done)?[3,6]:(o=i.value,void 0===(0,E.default)(this,v)[o]||(0,T.default)(this,de,Ae).call(this,(0,E.default)(this,v)[o])?[3,4]:[4,(0,E.default)(this,v)[o]]);case 3:s.sent(),s.label=4;case 4:s.label=5;case 5:return e=!0,[3,2];case 6:return[3,9];case 7:return a=s.sent(),t=!0,r=a,[3,9];case 8:try{e||null==n.return||n.return()}finally{if(t)throw r}return[7];case 9:return[2]}}))}},{key:t,value:function(){return this.entries()}},{key:"find",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=!0,n=!1,i=void 0;try{for(var o,a=(0,T.default)(this,ue,we).call(this)[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value,u=(0,E.default)(this,v)[s],l=(0,T.default)(this,de,Ae).call(this,u)?u.__staleWhileFetching:u;if(void 0!==l&&e(l,(0,E.default)(this,p)[s],this))return this.get((0,E.default)(this,p)[s],t)}}catch(e){n=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}}},{key:"forEach",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,r=!0,n=!1,i=void 0;try{for(var o,a=(0,T.default)(this,ue,we).call(this)[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value,u=(0,E.default)(this,v)[s],l=(0,T.default)(this,de,Ae).call(this,u)?u.__staleWhileFetching:u;void 0!==l&&e.call(t,l,(0,E.default)(this,p)[s],this)}}catch(e){n=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}}},{key:"rforEach",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,r=!0,n=!1,i=void 0;try{for(var o,a=(0,T.default)(this,le,_e).call(this)[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value,u=(0,E.default)(this,v)[s],l=(0,T.default)(this,de,Ae).call(this,u)?u.__staleWhileFetching:u;void 0!==l&&e.call(t,l,(0,E.default)(this,p)[s],this)}}catch(e){n=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}}},{key:"purgeStale",value:function(){var e=!1,t=!0,r=!1,n=void 0;try{for(var i,o=(0,T.default)(this,le,_e).call(this,{allowStale:!0})[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value;(0,E.default)(this,ne).call(this,a)&&((0,T.default)(this,ge,Pe).call(this,(0,E.default)(this,p)[a],"expire"),e=!0)}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}return e}},{key:"info",value:function(e){var t=(0,E.default)(this,d).get(e);if(void 0!==t){var r=(0,E.default)(this,v)[t],n=(0,T.default)(this,de,Ae).call(this,r)?r.__staleWhileFetching:r;if(void 0!==n){var i={value:n};if((0,E.default)(this,Q)&&(0,E.default)(this,H)){var o=(0,E.default)(this,Q)[t],a=(0,E.default)(this,H)[t];if(o&&a){var s=o-(Ce.now()-a);i.ttl=s,i.start=Date.now()}}return(0,E.default)(this,M)&&(i.size=(0,E.default)(this,M)[t]),i}}}},{key:"dump",value:function(){var e=[],t=!0,r=!1,n=void 0;try{for(var i,o=(0,T.default)(this,ue,we).call(this,{allowStale:!0})[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value,s=(0,E.default)(this,p)[a],u=(0,E.default)(this,v)[a],l=(0,T.default)(this,de,Ae).call(this,u)?u.__staleWhileFetching:u;if(void 0!==l&&void 0!==s){var c={value:l};if((0,E.default)(this,Q)&&(0,E.default)(this,H)){c.ttl=(0,E.default)(this,Q)[a];var f=Ce.now()-(0,E.default)(this,H)[a];c.start=Math.floor(Date.now()-f)}(0,E.default)(this,M)&&(c.size=(0,E.default)(this,M)[a]),e.unshift([s,c])}}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}return e}},{key:"load",value:function(e){this.clear();var t=!0,r=!1,n=void 0;try{for(var i,o=e[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=(0,W.default)(i.value,2),s=a[0],u=a[1];if(u.start){var l=Date.now()-u.start;u.start=Ce.now()-l}this.set(s,u.value,u)}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}}},{key:"set",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(void 0===t)return this.delete(e),this;var n=r.ttl,i=void 0===n?this.ttl:n,a=r.start,l=r.noDisposeOnSet,c=void 0===l?this.noDisposeOnSet:l,h=r.sizeCalculation,b=void 0===h?this.sizeCalculation:h,w=r.status,k=r.noUpdateTTL,S=void 0===k?this.noUpdateTTL:k,P=(0,E.default)(this,se).call(this,e,t,r.size||0,b);if(this.maxEntrySize&&P>this.maxEntrySize)return w&&(w.set="miss",w.maxEntrySizeExceeded=!0),(0,T.default)(this,ge,Pe).call(this,e,"set"),this;var O=0===(0,E.default)(this,f)?void 0:(0,E.default)(this,d).get(e);if(void 0===O)O=0===(0,E.default)(this,f)?(0,E.default)(this,m):0!==(0,E.default)(this,_).length?(0,E.default)(this,_).pop():(0,E.default)(this,f)===(0,E.default)(this,o)?(0,T.default)(this,fe,Ee).call(this,!1):(0,E.default)(this,f),(0,E.default)(this,p)[O]=e,(0,E.default)(this,v)[O]=t,(0,E.default)(this,d).set(e,O),(0,E.default)(this,g)[(0,E.default)(this,m)]=O,(0,E.default)(this,y)[O]=(0,E.default)(this,m),(0,A.default)(this,m,O),(0,I.default)(this,f).value++,(0,E.default)(this,ae).call(this,O,P,w),w&&(w.set="add"),S=!1;else{(0,T.default)(this,ve,Te).call(this,O);var R=(0,E.default)(this,v)[O];if(t!==R){var C,x;if((0,E.default)(this,Y)&&(0,T.default)(this,de,Ae).call(this,R)){var M,j;R.__abortController.abort(Error("replaced"));var L=R.__staleWhileFetching;void 0!==L&&!c&&((0,E.default)(this,G)&&(null===(M=(0,E.default)(this,s))||void 0===M||M.call(this,L,e,"set")),(0,E.default)(this,J)&&(null===(j=(0,E.default)(this,B))||void 0===j||j.push([L,e,"set"])))}else c||((0,E.default)(this,G)&&(null===(C=(0,E.default)(this,s))||void 0===C||C.call(this,R,e,"set")),(0,E.default)(this,J)&&(null===(x=(0,E.default)(this,B))||void 0===x||x.push([R,e,"set"])));if((0,E.default)(this,oe).call(this,O),(0,E.default)(this,ae).call(this,O,P,w),(0,E.default)(this,v)[O]=t,w){w.set="replace";var U=R&&(0,T.default)(this,de,Ae).call(this,R)?R.__staleWhileFetching:R;void 0!==U&&(w.oldValue=U)}}else w&&(w.set="update")}if(0!==i&&!(0,E.default)(this,Q)&&(0,T.default)(this,X,be).call(this),(0,E.default)(this,Q)&&(S||(0,E.default)(this,ee).call(this,O,i,a),w&&(0,E.default)(this,Z).call(this,w,O)),!c&&(0,E.default)(this,J)&&(0,E.default)(this,B))for(var N,D,W=(0,E.default)(this,B);D=null==W?void 0:W.shift();)null===(N=(0,E.default)(this,u))||void 0===N||N.call.apply(N,[this].concat((0,F.default)(D)));return this}},{key:"pop",value:function(){try{for(;(0,E.default)(this,f);){var e=(0,E.default)(this,v)[(0,E.default)(this,b)];if((0,T.default)(this,fe,Ee).call(this,!0),(0,T.default)(this,de,Ae).call(this,e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if((0,E.default)(this,J)&&(0,E.default)(this,B))for(var t,r,n=(0,E.default)(this,B);r=null==n?void 0:n.shift();)null===(t=(0,E.default)(this,u))||void 0===t||t.call.apply(t,[this].concat((0,F.default)(r)))}}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.updateAgeOnHas,n=void 0===r?this.updateAgeOnHas:r,i=t.status,o=(0,E.default)(this,d).get(e);if(void 0!==o){var a=(0,E.default)(this,v)[o];if((0,T.default)(this,de,Ae).call(this,a)&&void 0===a.__staleWhileFetching)return!1;if(!(0,E.default)(this,ne).call(this,o))return n&&(0,E.default)(this,$).call(this,o),i&&(i.has="hit",(0,E.default)(this,Z).call(this,i,o)),!0;i&&(i.has="stale",(0,E.default)(this,Z).call(this,i,o))}else i&&(i.has="miss");return!1}},{key:"peek",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).allowStale,r=void 0===t?this.allowStale:t,n=(0,E.default)(this,d).get(e);if(void 0!==n&&(r||!(0,E.default)(this,ne).call(this,n))){var i=(0,E.default)(this,v)[n];return(0,T.default)(this,de,Ae).call(this,i)?i.__staleWhileFetching:i}}},{key:"fetch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this;return(0,w.default)((function(){var n,i,o,a,s,u,l,c,f,h,p,g,y,b,m,w,_,k,S,A,I,P,O,R,C,x,B,M,j,L,U,N,D,W,F,q,H;return(0,K.__generator)(this,(function(V){return n=t.allowStale,i=void 0===n?r.allowStale:n,o=t.updateAgeOnGet,a=void 0===o?r.updateAgeOnGet:o,s=t.noDeleteOnStaleGet,u=void 0===s?r.noDeleteOnStaleGet:s,l=t.ttl,c=void 0===l?r.ttl:l,f=t.noDisposeOnSet,h=void 0===f?r.noDisposeOnSet:f,p=t.size,g=void 0===p?0:p,y=t.sizeCalculation,b=void 0===y?r.sizeCalculation:y,m=t.noUpdateTTL,w=void 0===m?r.noUpdateTTL:m,_=t.noDeleteOnFetchRejection,k=void 0===_?r.noDeleteOnFetchRejection:_,S=t.allowStaleOnFetchRejection,A=void 0===S?r.allowStaleOnFetchRejection:S,I=t.ignoreFetchAbort,P=void 0===I?r.ignoreFetchAbort:I,O=t.allowStaleOnFetchAbort,R=void 0===O?r.allowStaleOnFetchAbort:O,C=t.context,x=t.forceRefresh,B=void 0!==x&&x,M=t.status,j=t.signal,(0,E.default)(r,Y)?(L={allowStale:i,updateAgeOnGet:a,noDeleteOnStaleGet:u,ttl:c,noDisposeOnSet:h,size:g,sizeCalculation:b,noUpdateTTL:w,noDeleteOnFetchRejection:k,allowStaleOnFetchRejection:A,allowStaleOnFetchAbort:R,ignoreFetchAbort:P,status:M,signal:j},void 0===(U=(0,E.default)(r,d).get(e))?(M&&(M.fetch="miss"),[2,(N=(0,T.default)(r,he,Se).call(r,e,U,L,C)).__returned=N]):(D=(0,E.default)(r,v)[U],(0,T.default)(r,de,Ae).call(r,D)?(W=i&&void 0!==D.__staleWhileFetching,[2,(M&&(M.fetch="inflight",W&&(M.returnedStale=!0)),W?D.__staleWhileFetching:D.__returned=D)]):(F=(0,E.default)(r,ne).call(r,U),B||F?(q=(0,T.default)(r,he,Se).call(r,e,U,L,C),H=void 0!==q.__staleWhileFetching&&i,[2,(M&&(M.fetch=F?"stale":"refresh",H&&F&&(M.returnedStale=!0)),H?q.__staleWhileFetching:q.__returned=q)]):[2,(M&&(M.fetch="hit"),(0,T.default)(r,ve,Te).call(r,U),a&&(0,E.default)(r,$).call(r,U),M&&(0,E.default)(r,Z).call(r,M,U),D)]))):[2,(M&&(M.fetch="get"),r.get(e,{allowStale:i,updateAgeOnGet:a,noDeleteOnStaleGet:u,status:M}))]}))}))()}},{key:"forceFetch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this;return(0,w.default)((function(){var n;return(0,K.__generator)(this,(function(i){switch(i.label){case 0:return[4,r.fetch(e,t)];case 1:if(void 0===(n=i.sent()))throw Error("fetch() returned undefined");return[2,n]}}))}))()}},{key:"memo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,E.default)(this,c);if(!r)throw Error("no memoMethod provided to constructor");var n=t.context,i=t.forceRefresh,o=(0,N.default)(t,["context","forceRefresh"]),a=this.get(e,o);if(!i&&void 0!==a)return a;var s=r(e,a,{options:o,context:n});return this.set(e,s,o),s}},{key:"get",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.allowStale,n=void 0===r?this.allowStale:r,i=t.updateAgeOnGet,o=void 0===i?this.updateAgeOnGet:i,a=t.noDeleteOnStaleGet,s=void 0===a?this.noDeleteOnStaleGet:a,u=t.status,l=(0,E.default)(this,d).get(e);if(void 0!==l){var c=(0,E.default)(this,v)[l],f=(0,T.default)(this,de,Ae).call(this,c);return u&&(0,E.default)(this,Z).call(this,u,l),(0,E.default)(this,ne).call(this,l)?(u&&(u.get="stale"),f?(u&&n&&void 0!==c.__staleWhileFetching&&(u.returnedStale=!0),n?c.__staleWhileFetching:void 0):(s||(0,T.default)(this,ge,Pe).call(this,e,"expire"),u&&n&&(u.returnedStale=!0),n?c:void 0)):(u&&(u.get="hit"),f?c.__staleWhileFetching:((0,T.default)(this,ve,Te).call(this,l),o&&(0,E.default)(this,$).call(this,l),c))}u&&(u.get="miss")}},{key:"delete",value:function(e){return(0,T.default)(this,ge,Pe).call(this,e,"delete")}},{key:"clear",value:function(){return(0,T.default)(this,ye,Oe).call(this,"delete")}}],[{key:"unsafeExposeInternals",value:function(e){return{starts:(0,E.default)(e,H),ttls:(0,E.default)(e,Q),sizes:(0,E.default)(e,M),keyMap:(0,E.default)(e,d),keyList:(0,E.default)(e,p),valList:(0,E.default)(e,v),next:(0,E.default)(e,g),prev:(0,E.default)(e,y),get head(){return(0,E.default)(e,b)},get tail(){return(0,E.default)(e,m)},free:(0,E.default)(e,_),isBackgroundFetch:function(t){return(0,T.default)(e,de,Ae).call(e,t)},backgroundFetch:function(t,r,n,i){return(0,T.default)(e,he,Se).call(e,t,r,n,i)},moveToTail:function(t){return(0,T.default)(e,ve,Te).call(e,t)},indexes:function(t){return(0,T.default)(e,ue,we).call(e,t)},rindexes:function(t){return(0,T.default)(e,le,_e).call(e,t)},isStale:function(t){return(0,E.default)(e,ne).call(e,t)}}}}]),e}(),Re);e.LRUCache=Ve})),mn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.ContainerIterator=e.Container=e.Base=void 0,e.ContainerIterator=function(){"use strict";function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;(0,k.default)(this,e),this.iteratorType=t}return(0,C.default)(e,[{key:"equals",value:function(e){return this.o===e.o}}]),e}();var t=function(){"use strict";function e(){(0,k.default)(this,e),this.i=0}return(0,C.default)(e,[{key:"length",get:function(){return this.i}},{key:"size",value:function(){return this.i}},{key:"empty",value:function(){return 0===this.i}}]),e}();e.Base=t,e.Container=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){return(0,k.default)(this,r),t.apply(this,arguments)}return r}(t)})),wn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,k.default)(this,r),(e=t.call(this)).S=[];var i=(0,y.default)(e);return n.forEach((function(e){i.push(e)})),(0,D.default)(e)}return(0,C.default)(r,[{key:"clear",value:function(){this.i=0,this.S=[]}},{key:"push",value:function(e){return this.S.push(e),this.i+=1,this.i}},{key:"pop",value:function(){if(0!==this.i)return this.i-=1,this.S.pop()}},{key:"top",value:function(){return this.S[this.i-1]}}]),r}(mn().Base);e.default=t})),_n=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,k.default)(this,r),(e=t.call(this)).j=0,e.q=[];var i=(0,y.default)(e);return n.forEach((function(e){i.push(e)})),(0,D.default)(e)}return(0,C.default)(r,[{key:"clear",value:function(){this.q=[],this.i=this.j=0}},{key:"push",value:function(e){var t=this.q.length;if(this.j/t>.5&&this.j+this.i>=t&&t>4096){for(var r=this.i,n=0;n<r;++n)this.q[n]=this.q[this.j+n];this.j=0,this.q[this.i]=e}else this.q[this.j+this.i]=e;return++this.i}},{key:"pop",value:function(){if(0!==this.i){var e=this.q[this.j++];return this.i-=1,e}}},{key:"front",value:function(){if(0!==this.i)return this.q[this.j]}}]),r}(mn().Base);e.default=t})),kn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e,t){return e>t?-1:e<t?1:0},o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if((0,k.default)(this,r),(e=t.call(this)).v=i,Array.isArray(n))e.C=o?(0,F.default)(n):n;else{e.C=[];var a=(0,y.default)(e);n.forEach((function(e){a.C.push(e)}))}e.i=e.C.length;for(var s=e.i>>1,u=e.i-1>>1;u>=0;--u)e.k(u,s);return(0,D.default)(e)}return(0,C.default)(r,[{key:"m",value:function(e){for(var t=this.C[e];e>0;){var r=e-1>>1,n=this.C[r];if(this.v(n,t)<=0)break;this.C[e]=n,e=r}this.C[e]=t}},{key:"k",value:function(e,t){for(var r=this.C[e];e<t;){var n=e<<1|1,i=n+1,o=this.C[n];if(i<this.i&&this.v(o,this.C[i])>0&&(n=i,o=this.C[i]),this.v(o,r)>=0)break;this.C[e]=o,e=n}this.C[e]=r}},{key:"clear",value:function(){this.i=0,this.C.length=0}},{key:"push",value:function(e){this.C.push(e),this.m(this.i),this.i+=1}},{key:"pop",value:function(){if(0!==this.i){var e=this.C[0],t=this.C.pop();return this.i-=1,this.i&&(this.C[0]=t,this.k(0,this.i>>1)),e}}},{key:"top",value:function(){return this.C[0]}},{key:"find",value:function(e){return this.C.indexOf(e)>=0}},{key:"remove",value:function(e){var t=this.C.indexOf(e);return!(t<0||(0===t?this.pop():t===this.i-1?(this.C.pop(),this.i-=1):(this.C.splice(t,1,this.C.pop()),this.i-=1,this.m(t),this.k(t,this.i>>1)),0))}},{key:"updateItem",value:function(e){var t=this.C.indexOf(e);return!(t<0||(this.m(t),this.k(t,this.i>>1),0))}},{key:"toArray",value:function(){return(0,F.default)(this.C)}}]),r}(mn().Base);e.default=t})),En=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){return(0,k.default)(this,r),t.apply(this,arguments)}return r}(mn().Container);e.default=t})),Sn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.throwIteratorAccessError=function(){throw new RangeError("Iterator access denied!")}})),An=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.RandomIterator=void 0;var t=mn(),r=Sn(),n=function(e){"use strict";(0,j.default)(n,e);var t=(0,z.default)(n);function n(e,i){var o;return(0,k.default)(this,n),(o=t.call(this,i)).o=e,0===o.iteratorType?(o.pre=function(){return 0===this.o&&(0,r.throwIteratorAccessError)(),this.o-=1,this},o.next=function(){return this.o===this.container.size()&&(0,r.throwIteratorAccessError)(),this.o+=1,this}):(o.pre=function(){return this.o===this.container.size()-1&&(0,r.throwIteratorAccessError)(),this.o+=1,this},o.next=function(){return-1===this.o&&(0,r.throwIteratorAccessError)(),this.o-=1,this}),(0,D.default)(o)}return(0,C.default)(n,[{key:"pointer",get:function(){return this.container.getElementByPos(this.o)},set:function(e){this.container.setElementByPos(this.o,e)}}]),n}(t.ContainerIterator);e.RandomIterator=n})),In=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t,r=(t=En())&&t.t?t:{default:t},n=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(e,n,i){var o;return(0,k.default)(this,r),(o=t.call(this,e,i)).container=n,(0,D.default)(o)}return(0,C.default)(r,[{key:"copy",value:function(){return new r(this.o,this.container,this.iteratorType)}}]),r}(An().RandomIterator),i=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if((0,k.default)(this,r),e=t.call(this),Array.isArray(n))e.J=i?(0,F.default)(n):n,e.i=n.length;else{e.J=[];var o=(0,y.default)(e);n.forEach((function(e){o.pushBack(e)}))}return(0,D.default)(e)}return(0,C.default)(r,[{key:"clear",value:function(){this.i=0,this.J.length=0}},{key:"begin",value:function(){return new n(0,this)}},{key:"end",value:function(){return new n(this.i,this)}},{key:"rBegin",value:function(){return new n(this.i-1,this,1)}},{key:"rEnd",value:function(){return new n(-1,this,1)}},{key:"front",value:function(){return this.J[0]}},{key:"back",value:function(){return this.J[this.i-1]}},{key:"getElementByPos",value:function(e){if(e<0||e>this.i-1)throw new RangeError;return this.J[e]}},{key:"eraseElementByPos",value:function(e){if(e<0||e>this.i-1)throw new RangeError;return this.J.splice(e,1),this.i-=1,this.i}},{key:"eraseElementByValue",value:function(e){for(var t=0,r=0;r<this.i;++r)this.J[r]!==e&&(this.J[t++]=this.J[r]);return this.i=this.J.length=t,this.i}},{key:"eraseElementByIterator",value:function(e){var t=e.o;return e=e.next(),this.eraseElementByPos(t),e}},{key:"pushBack",value:function(e){return this.J.push(e),this.i+=1,this.i}},{key:"popBack",value:function(){if(0!==this.i)return this.i-=1,this.J.pop()}},{key:"setElementByPos",value:function(e,t){if(e<0||e>this.i-1)throw new RangeError;this.J[e]=t}},{key:"insert",value:function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(e<0||e>this.i)throw new RangeError;return(r=this.J).splice.apply(r,[e,0].concat((0,F.default)(Array(n).fill(t)))),this.i+=n,this.i}},{key:"find",value:function(e){for(var t=0;t<this.i;++t)if(this.J[t]===e)return new n(t,this);return this.end()}},{key:"reverse",value:function(){this.J.reverse()}},{key:"unique",value:function(){for(var e=1,t=1;t<this.i;++t)this.J[t]!==this.J[t-1]&&(this.J[e++]=this.J[t]);return this.i=this.J.length=e,this.i}},{key:"sort",value:function(e){this.J.sort(e)}},{key:"forEach",value:function(e){for(var t=0;t<this.i;++t)e(this.J[t],t,this)}},{key:Symbol.iterator,value:function(){return function(){return(0,K.__generator)(this,(function(e){switch(e.label){case 0:return[5,(0,K.__values)(this.J)];case 1:return e.sent(),[2]}}))}.bind(this)()}}]),r}(r.default);e.default=i})),Tn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t,r=(t=En())&&t.t?t:{default:t},n=mn(),i=Sn(),o=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(e,n,o,a){var s;return(0,k.default)(this,r),(s=t.call(this,a)).o=e,s.h=n,s.container=o,0===s.iteratorType?(s.pre=function(){return this.o.L===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.L,this},s.next=function(){return this.o===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.B,this}):(s.pre=function(){return this.o.B===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.B,this},s.next=function(){return this.o===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.L,this}),(0,D.default)(s)}return(0,C.default)(r,[{key:"pointer",get:function(){return this.o===this.h&&(0,i.throwIteratorAccessError)(),this.o.l},set:function(e){this.o===this.h&&(0,i.throwIteratorAccessError)(),this.o.l=e}},{key:"copy",value:function(){return new r(this.o,this.h,this.container,this.iteratorType)}}]),r}(n.ContainerIterator),a=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,k.default)(this,r),(e=t.call(this)).h={},e.p=e._=e.h.L=e.h.B=e.h;var i=(0,y.default)(e);return n.forEach((function(e){i.pushBack(e)})),(0,D.default)(e)}return(0,C.default)(r,[{key:"V",value:function(e){var t=e.L,r=e.B;t.B=r,r.L=t,e===this.p&&(this.p=r),e===this._&&(this._=t),this.i-=1}},{key:"G",value:function(e,t){var r=t.B,n={l:e,L:t,B:r};t.B=n,r.L=n,t===this.h&&(this.p=n),r===this.h&&(this._=n),this.i+=1}},{key:"clear",value:function(){this.i=0,this.p=this._=this.h.L=this.h.B=this.h}},{key:"begin",value:function(){return new o(this.p,this.h,this)}},{key:"end",value:function(){return new o(this.h,this.h,this)}},{key:"rBegin",value:function(){return new o(this._,this.h,this,1)}},{key:"rEnd",value:function(){return new o(this.h,this.h,this,1)}},{key:"front",value:function(){return this.p.l}},{key:"back",value:function(){return this._.l}},{key:"getElementByPos",value:function(e){if(e<0||e>this.i-1)throw new RangeError;for(var t=this.p;e--;)t=t.B;return t.l}},{key:"eraseElementByPos",value:function(e){if(e<0||e>this.i-1)throw new RangeError;for(var t=this.p;e--;)t=t.B;return this.V(t),this.i}},{key:"eraseElementByValue",value:function(e){for(var t=this.p;t!==this.h;)t.l===e&&this.V(t),t=t.B;return this.i}},{key:"eraseElementByIterator",value:function(e){var t=e.o;return t===this.h&&(0,i.throwIteratorAccessError)(),e=e.next(),this.V(t),e}},{key:"pushBack",value:function(e){return this.G(e,this._),this.i}},{key:"popBack",value:function(){if(0!==this.i){var e=this._.l;return this.V(this._),e}}},{key:"pushFront",value:function(e){return this.G(e,this.h),this.i}},{key:"popFront",value:function(){if(0!==this.i){var e=this.p.l;return this.V(this.p),e}}},{key:"setElementByPos",value:function(e,t){if(e<0||e>this.i-1)throw new RangeError;for(var r=this.p;e--;)r=r.B;r.l=t}},{key:"insert",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(e<0||e>this.i)throw new RangeError;if(r<=0)return this.i;if(0===e)for(;r--;)this.pushFront(t);else if(e===this.i)for(;r--;)this.pushBack(t);else{for(var n=this.p,i=1;i<e;++i)n=n.B;var o=n.B;for(this.i+=r;r--;)n.B={l:t,L:n},n.B.L=n,n=n.B;n.B=o,o.L=n}return this.i}},{key:"find",value:function(e){for(var t=this.p;t!==this.h;){if(t.l===e)return new o(t,this.h,this);t=t.B}return this.end()}},{key:"reverse",value:function(){if(!(this.i<=1))for(var e=this.p,t=this._,r=0;r<<1<this.i;){var n=e.l;e.l=t.l,t.l=n,e=e.B,t=t.L,r+=1}}},{key:"unique",value:function(){if(this.i<=1)return this.i;for(var e=this.p;e!==this.h;){for(var t=e;t.B!==this.h&&t.l===t.B.l;)t=t.B,this.i-=1;e.B=t.B,e.B.L=e,e=e.B}return this.i}},{key:"sort",value:function(e){if(!(this.i<=1)){var t=[];this.forEach((function(e){t.push(e)})),t.sort(e);var r=this.p;t.forEach((function(e){r.l=e,r=r.B}))}}},{key:"merge",value:function(e){var t=this;if(0===this.i)e.forEach((function(e){t.pushBack(e)}));else{var r=this.p;e.forEach((function(e){for(;r!==t.h&&r.l<=e;)r=r.B;t.G(e,r.L)}))}return this.i}},{key:"forEach",value:function(e){for(var t=this.p,r=0;t!==this.h;)e(t.l,r++,this),t=t.B}},{key:Symbol.iterator,value:function(){return function(){var e;return(0,K.__generator)(this,(function(t){switch(t.label){case 0:if(0===this.i)return[2];e=this.p,t.label=1;case 1:return e===this.h?[3,4]:[4,e.l];case 2:t.sent(),e=e.B,t.label=3;case 3:return[3,1];case 4:return[2]}}))}.bind(this)()}}]),r}(r.default);e.default=a})),Pn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t,r=(t=En())&&t.t?t:{default:t},n=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(e,n,i){var o;return(0,k.default)(this,r),(o=t.call(this,e,i)).container=n,(0,D.default)(o)}return(0,C.default)(r,[{key:"copy",value:function(){return new r(this.o,this.container,this.iteratorType)}}]),r}(An().RandomIterator),i=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4096;(0,k.default)(this,r),(e=t.call(this)).j=0,e.D=0,e.R=0,e.N=0,e.P=0,e.A=[];var o=function(){if("number"==typeof n.length)return n.length;if("number"==typeof n.size)return n.size;if("function"==typeof n.size)return n.size();throw new TypeError("Cannot get the length or size of the container")}();e.F=i,e.P=Math.max(Math.ceil(o/e.F),1);for(var a=0;a<e.P;++a)e.A.push(Array(e.F));var s=Math.ceil(o/e.F);e.j=e.R=(e.P>>1)-(s>>1),e.D=e.N=e.F-o%e.F>>1;var u=(0,y.default)(e);return n.forEach((function(e){u.pushBack(e)})),(0,D.default)(e)}return(0,C.default)(r,[{key:"T",value:function(){for(var e=[],t=Math.max(this.P>>1,1),r=0;r<t;++r)e[r]=Array(this.F);for(var n=this.j;n<this.P;++n)e[e.length]=this.A[n];for(var i=0;i<this.R;++i)e[e.length]=this.A[i];e[e.length]=(0,F.default)(this.A[this.R]),this.j=t,this.R=e.length-1;for(var o=0;o<t;++o)e[e.length]=Array(this.F);this.A=e,this.P=e.length}},{key:"O",value:function(e){var t=this.D+e+1,r=t%this.F,n=r-1,i=this.j+(t-r)/this.F;return 0===r&&(i-=1),i%=this.P,n<0&&(n+=this.F),{curNodeBucketIndex:i,curNodePointerIndex:n}}},{key:"clear",value:function(){this.A=[Array(this.F)],this.P=1,this.j=this.R=this.i=0,this.D=this.N=this.F>>1}},{key:"begin",value:function(){return new n(0,this)}},{key:"end",value:function(){return new n(this.i,this)}},{key:"rBegin",value:function(){return new n(this.i-1,this,1)}},{key:"rEnd",value:function(){return new n(-1,this,1)}},{key:"front",value:function(){if(0!==this.i)return this.A[this.j][this.D]}},{key:"back",value:function(){if(0!==this.i)return this.A[this.R][this.N]}},{key:"pushBack",value:function(e){return this.i&&(this.N<this.F-1?this.N+=1:this.R<this.P-1?(this.R+=1,this.N=0):(this.R=0,this.N=0),this.R===this.j&&this.N===this.D&&this.T()),this.i+=1,this.A[this.R][this.N]=e,this.i}},{key:"popBack",value:function(){if(0!==this.i){var e=this.A[this.R][this.N];return 1!==this.i&&(this.N>0?this.N-=1:this.R>0?(this.R-=1,this.N=this.F-1):(this.R=this.P-1,this.N=this.F-1)),this.i-=1,e}}},{key:"pushFront",value:function(e){return this.i&&(this.D>0?this.D-=1:this.j>0?(this.j-=1,this.D=this.F-1):(this.j=this.P-1,this.D=this.F-1),this.j===this.R&&this.D===this.N&&this.T()),this.i+=1,this.A[this.j][this.D]=e,this.i}},{key:"popFront",value:function(){if(0!==this.i){var e=this.A[this.j][this.D];return 1!==this.i&&(this.D<this.F-1?this.D+=1:this.j<this.P-1?(this.j+=1,this.D=0):(this.j=0,this.D=0)),this.i-=1,e}}},{key:"getElementByPos",value:function(e){if(e<0||e>this.i-1)throw new RangeError;var t=this.O(e),r=t.curNodeBucketIndex,n=t.curNodePointerIndex;return this.A[r][n]}},{key:"setElementByPos",value:function(e,t){if(e<0||e>this.i-1)throw new RangeError;var r=this.O(e),n=r.curNodeBucketIndex,i=r.curNodePointerIndex;this.A[n][i]=t}},{key:"insert",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(e<0||e>this.i)throw new RangeError;if(0===e)for(;r--;)this.pushFront(t);else if(e===this.i)for(;r--;)this.pushBack(t);else{for(var n=[],i=e;i<this.i;++i)n.push(this.getElementByPos(i));this.cut(e-1);for(var o=0;o<r;++o)this.pushBack(t);for(var a=0;a<n.length;++a)this.pushBack(n[a])}return this.i}},{key:"cut",value:function(e){if(e<0)return this.clear(),0;var t=this.O(e),r=t.curNodeBucketIndex,n=t.curNodePointerIndex;return this.R=r,this.N=n,this.i=e+1,this.i}},{key:"eraseElementByPos",value:function(e){if(e<0||e>this.i-1)throw new RangeError;if(0===e)this.popFront();else if(e===this.i-1)this.popBack();else{for(var t=[],r=e+1;r<this.i;++r)t.push(this.getElementByPos(r));this.cut(e),this.popBack();var n=this;t.forEach((function(e){n.pushBack(e)}))}return this.i}},{key:"eraseElementByValue",value:function(e){if(0===this.i)return 0;for(var t=[],r=0;r<this.i;++r){var n=this.getElementByPos(r);n!==e&&t.push(n)}for(var i=t.length,o=0;o<i;++o)this.setElementByPos(o,t[o]);return this.cut(i-1)}},{key:"eraseElementByIterator",value:function(e){var t=e.o;return this.eraseElementByPos(t),e.next()}},{key:"find",value:function(e){for(var t=0;t<this.i;++t)if(this.getElementByPos(t)===e)return new n(t,this);return this.end()}},{key:"reverse",value:function(){for(var e=0,t=this.i-1;e<t;){var r=this.getElementByPos(e);this.setElementByPos(e,this.getElementByPos(t)),this.setElementByPos(t,r),e+=1,t-=1}}},{key:"unique",value:function(){if(this.i<=1)return this.i;for(var e=1,t=this.getElementByPos(0),r=1;r<this.i;++r){var n=this.getElementByPos(r);n!==t&&(t=n,this.setElementByPos(e++,n))}for(;this.i>e;)this.popBack();return this.i}},{key:"sort",value:function(e){for(var t=[],r=0;r<this.i;++r)t.push(this.getElementByPos(r));t.sort(e);for(var n=0;n<this.i;++n)this.setElementByPos(n,t[n])}},{key:"shrinkToFit",value:function(){if(0!==this.i){var e=[];this.forEach((function(t){e.push(t)})),this.P=Math.max(Math.ceil(this.i/this.F),1),this.i=this.j=this.R=this.D=this.N=0,this.A=[];for(var t=0;t<this.P;++t)this.A.push(Array(this.F));for(var r=0;r<e.length;++r)this.pushBack(e[r])}}},{key:"forEach",value:function(e){for(var t=0;t<this.i;++t)e(this.getElementByPos(t),t,this)}},{key:Symbol.iterator,value:function(){return function(){var e;return(0,K.__generator)(this,(function(t){switch(t.label){case 0:e=0,t.label=1;case 1:return e<this.i?[4,this.getElementByPos(e)]:[3,4];case 2:t.sent(),t.label=3;case 3:return++e,[3,1];case 4:return[2]}}))}.bind(this)()}}]),r}(r.default);e.default=i})),On=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.TreeNodeEnableIndex=e.TreeNode=void 0;var t=function(){"use strict";function e(t,r){(0,k.default)(this,e),this.ee=1,this.u=void 0,this.l=void 0,this.U=void 0,this.W=void 0,this.tt=void 0,this.u=t,this.l=r}return(0,C.default)(e,[{key:"L",value:function(){var e=this;if(1===e.ee&&e.tt.tt===e)e=e.W;else if(e.U)for(e=e.U;e.W;)e=e.W;else{for(var t=e.tt;t.U===e;)t=(e=t).tt;e=t}return e}},{key:"B",value:function(){var e=this;if(e.W){for(e=e.W;e.U;)e=e.U;return e}for(var t=e.tt;t.W===e;)t=(e=t).tt;return e.W!==t?t:e}},{key:"te",value:function(){var e=this.tt,t=this.W,r=t.U;return e.tt===this?e.tt=t:e.U===this?e.U=t:e.W=t,t.tt=e,t.U=this,this.tt=t,this.W=r,r&&(r.tt=this),t}},{key:"se",value:function(){var e=this.tt,t=this.U,r=t.W;return e.tt===this?e.tt=t:e.U===this?e.U=t:e.W=t,t.tt=e,t.W=this,this.tt=t,this.U=r,r&&(r.tt=this),t}}]),e}();e.TreeNode=t,e.TreeNodeEnableIndex=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){var e;return(0,k.default)(this,r),(e=t.call.apply(t,[this].concat(Array.prototype.slice.call(arguments)))).rt=1,(0,D.default)(e)}return(0,C.default)(r,[{key:"te",value:function(){var e=(0,B.default)((0,M.default)(r.prototype),"te",this).call(this);return this.ie(),e.ie(),e}},{key:"se",value:function(){var e=(0,B.default)((0,M.default)(r.prototype),"se",this).call(this);return this.ie(),e.ie(),e}},{key:"ie",value:function(){this.rt=1,this.U&&(this.rt+=this.U.rt),this.W&&(this.rt+=this.W.rt)}}]),r}(t)})),Rn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=On(),r=mn(),n=Sn(),i=function(e){"use strict";(0,j.default)(i,e);var r=(0,z.default)(i);function i(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e,t){return e<t?-1:e>t?1:0},o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,k.default)(this,i),(e=r.call(this)).Y=void 0,e.v=n,o?(e.re=t.TreeNodeEnableIndex,e.M=function(e,t,r){var n=this.ne(e,t,r);if(n){for(var i=n.tt;i!==this.h;)i.rt+=1,i=i.tt;var o=this.he(n);if(o){var a=o.parentNode,s=o.grandParent,u=o.curNode;a.ie(),s.ie(),u.ie()}}return this.i},e.V=function(e){for(var t=this.fe(e);t!==this.h;)t.rt-=1,t=t.tt}):(e.re=t.TreeNode,e.M=function(e,t,r){var n=this.ne(e,t,r);return n&&this.he(n),this.i},e.V=e.fe),e.h=new e.re,(0,D.default)(e)}return(0,C.default)(i,[{key:"X",value:function(e,t){for(var r=this.h;e;){var n=this.v(e.u,t);if(n<0)e=e.W;else{if(!(n>0))return e;r=e,e=e.U}}return r}},{key:"Z",value:function(e,t){for(var r=this.h;e;)this.v(e.u,t)<=0?e=e.W:(r=e,e=e.U);return r}},{key:"$",value:function(e,t){for(var r=this.h;e;){var n=this.v(e.u,t);if(n<0)r=e,e=e.W;else{if(!(n>0))return e;e=e.U}}return r}},{key:"rr",value:function(e,t){for(var r=this.h;e;)this.v(e.u,t)<0?(r=e,e=e.W):e=e.U;return r}},{key:"ue",value:function(e){for(;;){var t=e.tt;if(t===this.h)return;if(1===e.ee)return void(e.ee=0);if(e===t.U){var r=t.W;if(1===r.ee)r.ee=0,t.ee=1,t===this.Y?this.Y=t.te():t.te();else{if(r.W&&1===r.W.ee)return r.ee=t.ee,t.ee=0,r.W.ee=0,void(t===this.Y?this.Y=t.te():t.te());r.U&&1===r.U.ee?(r.ee=1,r.U.ee=0,r.se()):(r.ee=1,e=t)}}else{var n=t.U;if(1===n.ee)n.ee=0,t.ee=1,t===this.Y?this.Y=t.se():t.se();else{if(n.U&&1===n.U.ee)return n.ee=t.ee,t.ee=0,n.U.ee=0,void(t===this.Y?this.Y=t.se():t.se());n.W&&1===n.W.ee?(n.ee=1,n.W.ee=0,n.te()):(n.ee=1,e=t)}}}}},{key:"fe",value:function(e){if(1===this.i)return this.clear(),this.h;for(var t=e;t.U||t.W;){if(t.W)for(t=t.W;t.U;)t=t.U;else t=t.U;var r,n;r=[t.u,e.u],e.u=r[0],t.u=r[1],n=[t.l,e.l],e.l=n[0],t.l=n[1],e=t}this.h.U===t?this.h.U=t.tt:this.h.W===t&&(this.h.W=t.tt),this.ue(t);var i=t.tt;return t===i.U?i.U=void 0:i.W=void 0,this.i-=1,this.Y.ee=0,i}},{key:"oe",value:function(e,t){return void 0!==e&&(!(!this.oe(e.U,t)&&!t(e))||this.oe(e.W,t))}},{key:"he",value:function(e){for(;;){var t=e.tt;if(0===t.ee)return;var r=t.tt;if(t===r.U){var n=r.W;if(n&&1===n.ee){if(n.ee=t.ee=0,r===this.Y)return;r.ee=1,e=r;continue}if(e===t.W){if(e.ee=0,e.U&&(e.U.tt=t),e.W&&(e.W.tt=r),t.W=e.U,r.U=e.W,e.U=t,e.W=r,r===this.Y)this.Y=e,this.h.tt=e;else{var i=r.tt;i.U===r?i.U=e:i.W=e}return e.tt=r.tt,t.tt=e,r.tt=e,r.ee=1,{parentNode:t,grandParent:r,curNode:e}}t.ee=0,r===this.Y?this.Y=r.se():r.se(),r.ee=1}else{var o=r.U;if(o&&1===o.ee){if(o.ee=t.ee=0,r===this.Y)return;r.ee=1,e=r;continue}if(e===t.U){if(e.ee=0,e.U&&(e.U.tt=r),e.W&&(e.W.tt=t),r.W=e.U,t.U=e.W,e.U=r,e.W=t,r===this.Y)this.Y=e,this.h.tt=e;else{var a=r.tt;a.U===r?a.U=e:a.W=e}return e.tt=r.tt,t.tt=e,r.tt=e,r.ee=1,{parentNode:t,grandParent:r,curNode:e}}t.ee=0,r===this.Y?this.Y=r.te():r.te(),r.ee=1}return}}},{key:"ne",value:function(e,t,r){if(void 0===this.Y)return this.i+=1,this.Y=new this.re(e,t),this.Y.ee=0,this.Y.tt=this.h,this.h.tt=this.Y,this.h.U=this.Y,void(this.h.W=this.Y);var n,i=this.h.U,o=this.v(i.u,e);if(0!==o){if(o>0)i.U=new this.re(e,t),i.U.tt=i,n=i.U,this.h.U=n;else{var a=this.h.W,s=this.v(a.u,e);if(0===s)return void(a.l=t);if(s<0)a.W=new this.re(e,t),a.W.tt=a,n=a.W,this.h.W=n;else{if(void 0!==r){var u=r.o;if(u!==this.h){var l=this.v(u.u,e);if(0===l)return void(u.l=t);if(l>0){var c=u.L(),f=this.v(c.u,e);if(0===f)return void(c.l=t);f<0&&(n=new this.re(e,t),void 0===c.W?(c.W=n,n.tt=c):(u.U=n,n.tt=u))}}}if(void 0===n)for(n=this.Y;;){var h=this.v(n.u,e);if(h>0){if(void 0===n.U){n.U=new this.re(e,t),n.U.tt=n,n=n.U;break}n=n.U}else{if(!(h<0))return void(n.l=t);if(void 0===n.W){n.W=new this.re(e,t),n.W.tt=n,n=n.W;break}n=n.W}}}}return this.i+=1,n}i.l=t}},{key:"I",value:function(e,t){for(;e;){var r=this.v(e.u,t);if(r<0)e=e.W;else{if(!(r>0))return e;e=e.U}}return e||this.h}},{key:"clear",value:function(){this.i=0,this.Y=void 0,this.h.tt=void 0,this.h.U=this.h.W=void 0}},{key:"updateKeyByIterator",value:function(e,t){var r=e.o;if(r===this.h&&(0,n.throwIteratorAccessError)(),1===this.i)return r.u=t,!0;if(r===this.h.U)return this.v(r.B().u,t)>0&&(r.u=t,!0);if(r===this.h.W)return this.v(r.L().u,t)<0&&(r.u=t,!0);var i=r.L().u;if(this.v(i,t)>=0)return!1;var o=r.B().u;return!(this.v(o,t)<=0||(r.u=t,0))}},{key:"eraseElementByPos",value:function(e){if(e<0||e>this.i-1)throw new RangeError;var t=0,r=this;return this.oe(this.Y,(function(n){return e===t?(r.V(n),!0):(t+=1,!1)})),this.i}},{key:"eraseElementByKey",value:function(e){if(0===this.i)return!1;var t=this.I(this.Y,e);return t!==this.h&&(this.V(t),!0)}},{key:"eraseElementByIterator",value:function(e){var t=e.o;t===this.h&&(0,n.throwIteratorAccessError)();var r=void 0===t.W;return 0===e.iteratorType?r&&e.next():(!r||void 0===t.U)&&e.next(),this.V(t),e}},{key:"forEach",value:function(e){var t=0,r=!0,n=!1,i=void 0;try{for(var o,a=this[Symbol.iterator]();!(r=(o=a.next()).done);r=!0)e(o.value,t++,this)}catch(e){n=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}}},{key:"getElementByPos",value:function(e){if(e<0||e>this.i-1)throw new RangeError;var t,r=0,n=!0,i=!1,o=void 0;try{for(var a,s=this[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value;if(r===e){t=u;break}r+=1}}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return t}},{key:"getHeight",value:function(){if(0===this.i)return 0;var e=function(t){return t?Math.max(e(t.U),e(t.W))+1:0};return e(this.Y)}}]),i}(r.Container);e.default=i})),Cn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=mn(),r=Sn(),n=function(e){"use strict";(0,j.default)(n,e);var t=(0,z.default)(n);function n(e,i,o){var a;return(0,k.default)(this,n),(a=t.call(this,o)).o=e,a.h=i,0===a.iteratorType?(a.pre=function(){return this.o===this.h.U&&(0,r.throwIteratorAccessError)(),this.o=this.o.L(),this},a.next=function(){return this.o===this.h&&(0,r.throwIteratorAccessError)(),this.o=this.o.B(),this}):(a.pre=function(){return this.o===this.h.W&&(0,r.throwIteratorAccessError)(),this.o=this.o.B(),this},a.next=function(){return this.o===this.h&&(0,r.throwIteratorAccessError)(),this.o=this.o.L(),this}),(0,D.default)(a)}return(0,C.default)(n,[{key:"index",get:function(){var e=this.o,t=this.h.tt;if(e===this.h)return t?t.rt-1:0;var r=0;for(e.U&&(r+=e.U.rt);e!==t;){var n=e.tt;e===n.W&&(r+=1,n.U&&(r+=n.U.rt)),e=n}return r}}]),n}(t.ContainerIterator);e.default=n})),xn=$((function(e){var t=function(e){return e&&e.t?e:{default:e}};te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var r=t(Rn()),n=t(Cn()),i=Sn(),o=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(e,n,i,o){var a;return(0,k.default)(this,r),(a=t.call(this,e,n,o)).container=i,(0,D.default)(a)}return(0,C.default)(r,[{key:"pointer",get:function(){return this.o===this.h&&(0,i.throwIteratorAccessError)(),this.o.u}},{key:"copy",value:function(){return new r(this.o,this.h,this.container,this.iteratorType)}}]),r}(n.default),a=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;(0,k.default)(this,r),e=t.call(this,i,o);var a=(0,y.default)(e);return n.forEach((function(e){a.insert(e)})),e}return(0,C.default)(r,[{key:"K",value:function(e){return(0,K.__generator)(this,(function(t){switch(t.label){case 0:return void 0!==e?[5,(0,K.__values)(this.K(e.U))]:[3,4];case 1:return t.sent(),[4,e.u];case 2:return t.sent(),[5,(0,K.__values)(this.K(e.W))];case 3:t.sent(),t.label=4;case 4:return[2]}}))}},{key:"begin",value:function(){return new o(this.h.U||this.h,this.h,this)}},{key:"end",value:function(){return new o(this.h,this.h,this)}},{key:"rBegin",value:function(){return new o(this.h.W||this.h,this.h,this,1)}},{key:"rEnd",value:function(){return new o(this.h,this.h,this,1)}},{key:"front",value:function(){return this.h.U?this.h.U.u:void 0}},{key:"back",value:function(){return this.h.W?this.h.W.u:void 0}},{key:"insert",value:function(e,t){return this.M(e,void 0,t)}},{key:"find",value:function(e){var t=this.I(this.Y,e);return new o(t,this.h,this)}},{key:"lowerBound",value:function(e){var t=this.X(this.Y,e);return new o(t,this.h,this)}},{key:"upperBound",value:function(e){var t=this.Z(this.Y,e);return new o(t,this.h,this)}},{key:"reverseLowerBound",value:function(e){var t=this.$(this.Y,e);return new o(t,this.h,this)}},{key:"reverseUpperBound",value:function(e){var t=this.rr(this.Y,e);return new o(t,this.h,this)}},{key:"union",value:function(e){var t=this;return e.forEach((function(e){t.insert(e)})),this.i}},{key:Symbol.iterator,value:function(){return this.K(this.Y)}}]),r}(r.default);e.default=a})),Bn=$((function(e){var t=function(e){return e&&e.t?e:{default:e}};te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var r=t(Rn()),n=t(Cn()),i=Sn(),o=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(e,n,i,o){var a;return(0,k.default)(this,r),(a=t.call(this,e,n,o)).container=i,(0,D.default)(a)}return(0,C.default)(r,[{key:"pointer",get:function(){this.o===this.h&&(0,i.throwIteratorAccessError)();var e=this;return new Proxy([],{get:function(t,r){return"0"===r?e.o.u:"1"===r?e.o.l:void 0},set:function(t,r,n){if("1"!==r)throw new TypeError("props must be 1");return e.o.l=n,!0}})}},{key:"copy",value:function(){return new r(this.o,this.h,this.container,this.iteratorType)}}]),r}(n.default),a=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;(0,k.default)(this,r),e=t.call(this,i,o);var a=(0,y.default)(e);return n.forEach((function(e){a.setElement(e[0],e[1])})),e}return(0,C.default)(r,[{key:"K",value:function(e){return(0,K.__generator)(this,(function(t){switch(t.label){case 0:return void 0!==e?[5,(0,K.__values)(this.K(e.U))]:[3,4];case 1:return t.sent(),[4,[e.u,e.l]];case 2:return t.sent(),[5,(0,K.__values)(this.K(e.W))];case 3:t.sent(),t.label=4;case 4:return[2]}}))}},{key:"begin",value:function(){return new o(this.h.U||this.h,this.h,this)}},{key:"end",value:function(){return new o(this.h,this.h,this)}},{key:"rBegin",value:function(){return new o(this.h.W||this.h,this.h,this,1)}},{key:"rEnd",value:function(){return new o(this.h,this.h,this,1)}},{key:"front",value:function(){if(0!==this.i){var e=this.h.U;return[e.u,e.l]}}},{key:"back",value:function(){if(0!==this.i){var e=this.h.W;return[e.u,e.l]}}},{key:"lowerBound",value:function(e){var t=this.X(this.Y,e);return new o(t,this.h,this)}},{key:"upperBound",value:function(e){var t=this.Z(this.Y,e);return new o(t,this.h,this)}},{key:"reverseLowerBound",value:function(e){var t=this.$(this.Y,e);return new o(t,this.h,this)}},{key:"reverseUpperBound",value:function(e){var t=this.rr(this.Y,e);return new o(t,this.h,this)}},{key:"setElement",value:function(e,t,r){return this.M(e,t,r)}},{key:"find",value:function(e){var t=this.I(this.Y,e);return new o(t,this.h,this)}},{key:"getElementByKey",value:function(e){return this.I(this.Y,e).l}},{key:"union",value:function(e){var t=this;return e.forEach((function(e){t.setElement(e[0],e[1])})),this.i}},{key:Symbol.iterator,value:function(){return this.K(this.Y)}}]),r}(r.default);e.default=a})),Mn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.default=function(e){var t=void 0===e?"undefined":(0,q.default)(e);return"object"===t&&null!==e||"function"===t}})),jn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.HashContainerIterator=e.HashContainer=void 0;var t,r=mn(),n=(t=Mn())&&t.t?t:{default:t},i=Sn(),o=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(e,n,o){var a;return(0,k.default)(this,r),(a=t.call(this,o)).o=e,a.h=n,0===a.iteratorType?(a.pre=function(){return this.o.L===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.L,this},a.next=function(){return this.o===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.B,this}):(a.pre=function(){return this.o.B===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.B,this},a.next=function(){return this.o===this.h&&(0,i.throwIteratorAccessError)(),this.o=this.o.L,this}),(0,D.default)(a)}return r}(r.ContainerIterator);e.HashContainerIterator=o;var a=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){var e;return(0,k.default)(this,r),(e=t.call(this)).H=[],e.g={},e.HASH_TAG=Symbol(),Object.setPrototypeOf(e.g,null),e.h={},e.h.L=e.h.B=e.p=e._=e.h,(0,D.default)(e)}return(0,C.default)(r,[{key:"V",value:function(e){var t=e.L,r=e.B;t.B=r,r.L=t,e===this.p&&(this.p=r),e===this._&&(this._=t),this.i-=1}},{key:"M",value:function(e,t,r){var i;if(void 0===r&&(r=(0,n.default)(e)),r){var o=e[this.HASH_TAG];if(void 0!==o)return this.H[o].l=t,this.i;Object.defineProperty(e,this.HASH_TAG,{value:this.H.length,configurable:!0}),i={u:e,l:t,L:this._,B:this.h},this.H.push(i)}else{var a=this.g[e];if(a)return a.l=t,this.i;i={u:e,l:t,L:this._,B:this.h},this.g[e]=i}return 0===this.i?(this.p=i,this.h.B=i):this._.B=i,this._=i,this.h.L=i,++this.i}},{key:"I",value:function(e,t){if(void 0===t&&(t=(0,n.default)(e)),t){var r=e[this.HASH_TAG];return void 0===r?this.h:this.H[r]}return this.g[e]||this.h}},{key:"clear",value:function(){var e=this.HASH_TAG;this.H.forEach((function(t){delete t.u[e]})),this.H=[],this.g={},Object.setPrototypeOf(this.g,null),this.i=0,this.p=this._=this.h.L=this.h.B=this.h}},{key:"eraseElementByKey",value:function(e,t){var r;if(void 0===t&&(t=(0,n.default)(e)),t){var i=e[this.HASH_TAG];if(void 0===i)return!1;delete e[this.HASH_TAG],r=this.H[i],delete this.H[i]}else{if(void 0===(r=this.g[e]))return!1;delete this.g[e]}return this.V(r),!0}},{key:"eraseElementByIterator",value:function(e){var t=e.o;return t===this.h&&(0,i.throwIteratorAccessError)(),this.V(t),e.next()}},{key:"eraseElementByPos",value:function(e){if(e<0||e>this.i-1)throw new RangeError;for(var t=this.p;e--;)t=t.B;return this.V(t),this.i}}]),r}(r.Container);e.HashContainer=a})),Ln=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t=jn(),r=Sn(),n=function(e){"use strict";(0,j.default)(n,e);var t=(0,z.default)(n);function n(e,r,i,o){var a;return(0,k.default)(this,n),(a=t.call(this,e,r,o)).container=i,(0,D.default)(a)}return(0,C.default)(n,[{key:"pointer",get:function(){return this.o===this.h&&(0,r.throwIteratorAccessError)(),this.o.u}},{key:"copy",value:function(){return new n(this.o,this.h,this.container,this.iteratorType)}}]),n}(t.HashContainerIterator),i=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,k.default)(this,r),e=t.call(this);var i=(0,y.default)(e);return n.forEach((function(e){i.insert(e)})),e}return(0,C.default)(r,[{key:"begin",value:function(){return new n(this.p,this.h,this)}},{key:"end",value:function(){return new n(this.h,this.h,this)}},{key:"rBegin",value:function(){return new n(this._,this.h,this,1)}},{key:"rEnd",value:function(){return new n(this.h,this.h,this,1)}},{key:"front",value:function(){return this.p.u}},{key:"back",value:function(){return this._.u}},{key:"insert",value:function(e,t){return this.M(e,void 0,t)}},{key:"getElementByPos",value:function(e){if(e<0||e>this.i-1)throw new RangeError;for(var t=this.p;e--;)t=t.B;return t.u}},{key:"find",value:function(e,t){var r=this.I(e,t);return new n(r,this.h,this)}},{key:"forEach",value:function(e){for(var t=0,r=this.p;r!==this.h;)e(r.u,t++,this),r=r.B}},{key:Symbol.iterator,value:function(){return function(){var e;return(0,K.__generator)(this,(function(t){switch(t.label){case 0:e=this.p,t.label=1;case 1:return e===this.h?[3,4]:[4,e.u];case 2:t.sent(),e=e.B,t.label=3;case 3:return[3,1];case 4:return[2]}}))}.bind(this)()}}]),r}(t.HashContainer);e.default=i})),Un=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),e.default=void 0;var t,r=jn(),n=(t=Mn())&&t.t?t:{default:t},i=Sn(),o=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(e,n,i,o){var a;return(0,k.default)(this,r),(a=t.call(this,e,n,o)).container=i,(0,D.default)(a)}return(0,C.default)(r,[{key:"pointer",get:function(){this.o===this.h&&(0,i.throwIteratorAccessError)();var e=this;return new Proxy([],{get:function(t,r){return"0"===r?e.o.u:"1"===r?e.o.l:void 0},set:function(t,r,n){if("1"!==r)throw new TypeError("props must be 1");return e.o.l=n,!0}})}},{key:"copy",value:function(){return new r(this.o,this.h,this.container,this.iteratorType)}}]),r}(r.HashContainerIterator),a=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,k.default)(this,r),e=t.call(this);var i=(0,y.default)(e);return n.forEach((function(e){i.setElement(e[0],e[1])})),e}return(0,C.default)(r,[{key:"begin",value:function(){return new o(this.p,this.h,this)}},{key:"end",value:function(){return new o(this.h,this.h,this)}},{key:"rBegin",value:function(){return new o(this._,this.h,this,1)}},{key:"rEnd",value:function(){return new o(this.h,this.h,this,1)}},{key:"front",value:function(){if(0!==this.i)return[this.p.u,this.p.l]}},{key:"back",value:function(){if(0!==this.i)return[this._.u,this._.l]}},{key:"setElement",value:function(e,t,r){return this.M(e,t,r)}},{key:"getElementByKey",value:function(e,t){if(void 0===t&&(t=(0,n.default)(e)),t){var r=e[this.HASH_TAG];return void 0!==r?this.H[r].l:void 0}var i=this.g[e];return i?i.l:void 0}},{key:"getElementByPos",value:function(e){if(e<0||e>this.i-1)throw new RangeError;for(var t=this.p;e--;)t=t.B;return[t.u,t.l]}},{key:"find",value:function(e,t){var r=this.I(e,t);return new o(r,this.h,this)}},{key:"forEach",value:function(e){for(var t=0,r=this.p;r!==this.h;)e([r.u,r.l],t++,this),r=r.B}},{key:Symbol.iterator,value:function(){return function(){var e;return(0,K.__generator)(this,(function(t){switch(t.label){case 0:e=this.p,t.label=1;case 1:return e===this.h?[3,4]:[4,[e.u,e.l]];case 2:t.sent(),e=e.B,t.label=3;case 3:return[3,1];case 4:return[2]}}))}.bind(this)()}}]),r}(r.HashContainer);e.default=a})),Nn=$((function(e){var t=function(e){return e&&e.t?e:{default:e}};te(),zt(),xt(),Object.defineProperty(e,"t",{value:!0}),Object.defineProperty(e,"Deque",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"HashMap",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"HashSet",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"LinkList",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"OrderedMap",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"OrderedSet",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"PriorityQueue",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"Queue",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"Stack",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"Vector",{enumerable:!0,get:function(){return o.default}});var r=t(wn()),n=t(_n()),i=t(kn()),o=t(In()),a=t(Tn()),s=t(Pn()),u=t(xn()),l=t(Bn()),c=t(Ln()),f=t(Un())})),Dn=$((function(e,t){var r=function(e,t){this.low=e,this.high=t};te(),zt(),xt();var n=Nn().OrderedSet,i=en()("number-allocator:trace"),o=en()("number-allocator:error");function a(e,t){if(!(this instanceof a))return new a(e,t);this.min=e,this.max=t,this.ss=new n([],(function(e,t){return e.compare(t)})),i("Create"),this.clear()}r.prototype.equals=function(e){return this.low===e.low&&this.high===e.high},r.prototype.compare=function(e){return this.low<e.low&&this.high<e.low?-1:e.low<this.low&&e.high<this.low?1:0},a.prototype.firstVacant=function(){return 0===this.ss.size()?null:this.ss.front().low},a.prototype.alloc=function(){if(0===this.ss.size())return i("alloc():empty"),null;var e=this.ss.begin(),t=e.pointer.low,n=e.pointer.high,o=t;return o+1<=n?this.ss.updateKeyByIterator(e,new r(t+1,n)):this.ss.eraseElementByPos(0),i("alloc():"+o),o},a.prototype.use=function(e){var t=new r(e,e),n=this.ss.lowerBound(t);if(!n.equals(this.ss.end())){var o=n.pointer.low,a=n.pointer.high;return n.pointer.equals(t)?(this.ss.eraseElementByIterator(n),i("use():"+e),!0):!(o>e||(o===e?(this.ss.updateKeyByIterator(n,new r(o+1,a)),i("use():"+e),0):a===e?(this.ss.updateKeyByIterator(n,new r(o,a-1)),i("use():"+e),0):(this.ss.updateKeyByIterator(n,new r(e+1,a)),this.ss.insert(new r(o,e-1)),i("use():"+e),0)))}return i("use():failed"),!1},a.prototype.free=function(e){if(e<this.min||e>this.max)o("free():"+e+" is out of range");else{var t=new r(e,e),n=this.ss.upperBound(t);if(n.equals(this.ss.end())){if(n.equals(this.ss.begin()))return void this.ss.insert(t);n.pre();var a=n.pointer.high;n.pointer.high+1===e?this.ss.updateKeyByIterator(n,new r(a,e)):this.ss.insert(t)}else if(n.equals(this.ss.begin()))if(e+1===n.pointer.low){var s=n.pointer.high;this.ss.updateKeyByIterator(n,new r(e,s))}else this.ss.insert(t);else{var u=n.pointer.low,l=n.pointer.high;n.pre();var c=n.pointer.low;n.pointer.high+1===e?e+1===u?(this.ss.eraseElementByIterator(n),this.ss.updateKeyByIterator(n,new r(c,l))):this.ss.updateKeyByIterator(n,new r(c,e)):e+1===u?(this.ss.eraseElementByIterator(n.next()),this.ss.insert(new r(e,l))):this.ss.insert(t)}i("free():"+e)}},a.prototype.clear=function(){i("clear()"),this.ss.clear(),this.ss.insert(new r(this.min,this.max))},a.prototype.intervalCount=function(){return this.ss.size()},a.prototype.dump=function(){var e=!0,t=!1,r=void 0;try{for(var n,i=this.ss[Symbol.iterator]();!(e=(n=i.next()).done);e=!0)n.value}catch(e){t=!0,r=e}finally{try{e||null==i.return||i.return()}finally{if(t)throw r}}},t.exports=a})),Wn=$((function(e,t){te(),zt(),xt();var r=Dn();t.exports.NumberAllocator=r})),Fn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"__esModule",{value:!0});var t=bn(),r=Wn();e.default=function(){"use strict";function e(n){(0,k.default)(this,e),n>0&&(this.aliasToTopic=new t.LRUCache({max:n}),this.topicToAlias={},this.numberAllocator=new r.NumberAllocator(1,n),this.max=n,this.length=0)}return(0,C.default)(e,[{key:"put",value:function(e,t){if(0===t||t>this.max)return!1;var r=this.aliasToTopic.get(t);return r&&delete this.topicToAlias[r],this.aliasToTopic.set(t,e),this.topicToAlias[e]=t,this.numberAllocator.use(t),this.length=this.aliasToTopic.size,!0}},{key:"getTopicByAlias",value:function(e){return this.aliasToTopic.get(e)}},{key:"getAliasByTopic",value:function(e){var t=this.topicToAlias[e];return(void 0===t?"undefined":(0,q.default)(t))<"u"&&this.aliasToTopic.get(t),t}},{key:"clear",value:function(){this.aliasToTopic.clear(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0}},{key:"getLruAlias",value:function(){return this.numberAllocator.firstVacant()||(0,F.default)(this.aliasToTopic.keys())[this.aliasToTopic.size-1]}}]),e}()})),qn=$((function(e){te(),zt(),xt();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0});var r=gn(),n=t(Fn()),i=vn();e.default=function(e,t){e.log("_handleConnack");var o=e.options,a=5===o.protocolVersion?t.reasonCode:t.returnCode;if(clearTimeout(e.connackTimer),delete e.topicAliasSend,t.properties){if(t.properties.topicAliasMaximum){if(t.properties.topicAliasMaximum>65535)return void e.emit("error",Error("topicAliasMaximum from broker is out of range"));t.properties.topicAliasMaximum>0&&(e.topicAliasSend=new n.default(t.properties.topicAliasMaximum))}t.properties.serverKeepAlive&&o.keepalive&&(o.keepalive=t.properties.serverKeepAlive),t.properties.maximumPacketSize&&(o.properties||(o.properties={}),o.properties.maximumPacketSize=t.properties.maximumPacketSize)}if(0===a)e.reconnecting=!1,e._onConnect(t);else if(a>0){var s=new i.ErrorWithReasonCode("Connection refused: "+r.ReasonCodes[a],a);e.emit("error",s),e.options.reconnectOnConnackError&&e._cleanUp(!0)}}})),Hn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,t,r){e.log("handling pubrel packet");var n=(void 0===r?"undefined":(0,q.default)(r))<"u"?r:e.noop,i={cmd:"pubcomp",messageId:t.messageId};e.incomingStore.get(t,(function(t,r){t?e._sendPacket(i,n):(e.emit("message",r.topic,r.payload,r),e.handleMessage(r,(function(t){if(t)return n(t);e.incomingStore.del(r,e.noop),e._sendPacket(i,n)})))}))}})),Vn=$((function(e){te(),zt(),xt();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0});var r=t(dn()),n=t(yn()),i=t(qn()),o=t(gn()),a=t(Hn());e.default=function(e,t,s){var u=e.options;if(5===u.protocolVersion&&u.properties&&u.properties.maximumPacketSize&&u.properties.maximumPacketSize<t.length)return e.emit("error",Error("exceeding packets size "+t.cmd)),e.end({reasonCode:149,properties:{reasonString:"Maximum packet size was exceeded"}}),e;switch(e.log("_handlePacket :: emitting packetreceive"),e.emit("packetreceive",t),t.cmd){case"publish":(0,r.default)(e,t,s);break;case"puback":case"pubrec":case"pubcomp":case"suback":case"unsuback":e.reschedulePing(),(0,o.default)(e,t),s();break;case"pubrel":e.reschedulePing(),(0,a.default)(e,t,s);break;case"connack":(0,i.default)(e,t),s();break;case"auth":e.reschedulePing(),(0,n.default)(e,t),s();break;case"pingresp":e.log("_handlePacket :: received pingresp"),e.reschedulePing(!0),s();break;case"disconnect":e.emit("disconnect",t),s();break;default:e.log("_handlePacket :: unknown command"),s()}}})),zn=$((function(e){te(),zt(),xt();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.TypedEventEmitter=void 0;var r=t((_r(),ee(pr))),n=vn(),i=function e(){"use strict";(0,k.default)(this,e)};e.TypedEventEmitter=i,(0,n.applyMixin)(i,r.default)})),Kn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"__esModule",{value:!0}),e.isReactNativeBrowser=e.isWebWorker=void 0;var t,r=function(){var e,t;return!("object"!=typeof self||null===(t=null===(e=null===self||void 0===self?void 0:self.constructor)||void 0===e?void 0:e.name)||void 0===t||!t.includes("WorkerGlobalScope"))},n=function(){return("undefined"==typeof navigator?"undefined":(0,q.default)(navigator))<"u"&&"ReactNative"===navigator.product},i=("undefined"==typeof window?"undefined":(0,q.default)(window))<"u"&&(("undefined"==typeof navigator?"undefined":(0,q.default)(navigator))<"u"&&(null===(t=navigator.userAgent)||void 0===t?void 0:t.toLowerCase().indexOf(" electron/"))>-1&&null!=re&&re.versions?!{}.hasOwnProperty.call(re.versions,"electron"):(0,q.default)(window.document)<"u")||r()||n();e.isWebWorker=r(),e.isReactNativeBrowser=n(),e.default=i})),Qn=$((function(e,t){var r,n;te(),zt(),xt(),r=e,n=function(e){var t,r=void 0===Number.MAX_SAFE_INTEGER?9007199254740991:Number.MAX_SAFE_INTEGER,n=536870912,i=2*n,o=new WeakMap,a=function(e,t){return function(o){var a=t.get(o),s=void 0===a?o.size:a<i?a+1:0;if(!o.has(s))return e(o,s);if(o.size<n){for(;o.has(s);)s=Math.floor(Math.random()*i);return e(o,s)}if(o.size>r)throw Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;o.has(s);)s=Math.floor(Math.random()*r);return e(o,s)}}((t=o,function(e,r){return t.set(e,r),r}),o),s=function(e){return function(t){var r=e(t);return t.add(r),r}}(a);e.addUniqueNumber=s,e.generateUniqueNumber=a},"object"==typeof e&&(void 0===t?"undefined":(0,q.default)(t))<"u"?n(e):"function"==typeof define&&define.amd?define(["exports"],n):n((r=("undefined"==typeof globalThis?"undefined":(0,q.default)(globalThis))<"u"?globalThis:r||self).fastUniqueNumbers={})})),Gn=$((function(e,t){var r,n;te(),zt(),xt(),r=e,n=function(e,t){e.load=function(e){var r=new Map([[0,function(){}]]),n=new Map([[0,function(){}]]),i=new Map,o=new Worker(e);return o.addEventListener("message",(function(e){var t=e.data;if(function(e){return void 0!==e.method&&"call"===e.method}(t)){var o=t.params,a=o.timerId,s=o.timerType;if("interval"===s){var u=r.get(a);if("number"==typeof u){var l=i.get(u);if(void 0===l||l.timerId!==a||l.timerType!==s)throw Error("The timer is in an undefined state.")}else{if(!((void 0===u?"undefined":(0,q.default)(u))<"u"))throw Error("The timer is in an undefined state.");u()}}else if("timeout"===s){var c=n.get(a);if("number"==typeof c){var f=i.get(c);if(void 0===f||f.timerId!==a||f.timerType!==s)throw Error("The timer is in an undefined state.")}else{if(!((void 0===c?"undefined":(0,q.default)(c))<"u"))throw Error("The timer is in an undefined state.");c(),n.delete(a)}}}else{if(!function(e){return null===e.error&&"number"==typeof e.id}(t)){var h=t.error.message;throw Error(h)}var d=t.id,p=i.get(d);if(void 0===p)throw Error("The timer is in an undefined state.");var v=p.timerId,g=p.timerType;i.delete(d),"interval"===g?r.delete(v):n.delete(v)}})),{clearInterval:function(e){var n=t.generateUniqueNumber(i);i.set(n,{timerId:e,timerType:"interval"}),r.set(e,n),o.postMessage({id:n,method:"clear",params:{timerId:e,timerType:"interval"}})},clearTimeout:function(e){var r=t.generateUniqueNumber(i);i.set(r,{timerId:e,timerType:"timeout"}),n.set(e,r),o.postMessage({id:r,method:"clear",params:{timerId:e,timerType:"timeout"}})},setInterval:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=t.generateUniqueNumber(r);return r.set(i,(function(){e(),"function"==typeof r.get(i)&&o.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:i,timerType:"interval"}})})),o.postMessage({id:null,method:"set",params:{delay:n,now:performance.now(),timerId:i,timerType:"interval"}}),i},setTimeout:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=t.generateUniqueNumber(n);return n.set(i,e),o.postMessage({id:null,method:"set",params:{delay:r,now:performance.now(),timerId:i,timerType:"timeout"}}),i}}}},"object"==typeof e&&(void 0===t?"undefined":(0,q.default)(t))<"u"?n(e,Qn()):"function"==typeof define&&define.amd?define(["exports","fast-unique-numbers"],n):n((r=("undefined"==typeof globalThis?"undefined":(0,q.default)(globalThis))<"u"?globalThis:r||self).workerTimersBroker={},r.fastUniqueNumbers)})),Yn=$((function(e,t){var r,n;te(),zt(),xt(),r=e,n=function(e,t){var r,n,i=(r=t.load,n=null,function(){if(null!==n)return n;var e=new Blob(['(()=>{var e={472:(e,t,r)=>{var o,i;void 0===(i="function"==typeof(o=function(){"use strict";var e=new Map,t=new Map,r=function(t){var r=e.get(t);if(void 0===r)throw new Error(\'There is no interval scheduled with the given id "\'.concat(t,\'".\'));clearTimeout(r),e.delete(t)},o=function(e){var r=t.get(e);if(void 0===r)throw new Error(\'There is no timeout scheduled with the given id "\'.concat(e,\'".\'));clearTimeout(r),t.delete(e)},i=function(e,t){var r,o=performance.now();return{expected:o+(r=e-Math.max(0,o-t)),remainingDelay:r}},n=function e(t,r,o,i){var n=performance.now();n>o?postMessage({id:null,method:"call",params:{timerId:r,timerType:i}}):t.set(r,setTimeout(e,o-n,t,r,o,i))},a=function(t,r,o){var a=i(t,o),s=a.expected,d=a.remainingDelay;e.set(r,setTimeout(n,d,e,r,s,"interval"))},s=function(e,r,o){var a=i(e,o),s=a.expected,d=a.remainingDelay;t.set(r,setTimeout(n,d,t,r,s,"timeout"))};addEventListener("message",(function(e){var t=e.data;try{if("clear"===t.method){var i=t.id,n=t.params,d=n.timerId,c=n.timerType;if("interval"===c)r(d),postMessage({error:null,id:i});else{if("timeout"!==c)throw new Error(\'The given type "\'.concat(c,\'" is not supported\'));o(d),postMessage({error:null,id:i})}}else{if("set"!==t.method)throw new Error(\'The given method "\'.concat(t.method,\'" is not supported\'));var u=t.params,l=u.delay,p=u.now,m=u.timerId,v=u.timerType;if("interval"===v)a(l,m,p);else{if("timeout"!==v)throw new Error(\'The given type "\'.concat(v,\'" is not supported\'));s(l,m,p)}}}catch(e){postMessage({error:{message:e.message},id:t.id,result:null})}}))})?o.call(t,r,t,e):o)||(e.exports=i)}},t={};function r(o){var i=t[o];if(void 0!==i)return i.exports;var n=t[o]={exports:{}};return e[o](n,n.exports,r),n.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";r(472)})()})();'],{type:"application/javascript; charset=utf-8"}),t=URL.createObjectURL(e);return n=r(t),setTimeout((function(){return URL.revokeObjectURL(t)})),n});e.clearInterval=function(e){return i().clearInterval(e)},e.clearTimeout=function(e){return i().clearTimeout(e)},e.setInterval=function(){var e;return(e=i()).setInterval.apply(e,arguments)},e.setTimeout=function(){var e;return(e=i()).setTimeout.apply(e,arguments)}},"object"==typeof e&&(void 0===t?"undefined":(0,q.default)(t))<"u"?n(e,Gn()):"function"==typeof define&&define.amd?define(["exports","worker-timers-broker"],n):n((r=("undefined"==typeof globalThis?"undefined":(0,q.default)(globalThis))<"u"?globalThis:r||self).workerTimers={},r.workerTimersBroker)})),Jn=$((function(e){te(),zt(),xt();var t,r=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),n=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=e&&e.__importStar||(t=function(e){return(t=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)({}).hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)},function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var o=t(e),a=0;a<o.length;a++)"default"!==o[a]&&r(i,e,o[a]);return n(i,e),i});Object.defineProperty(e,"__esModule",{value:!0});var o=i(Kn()),a=Yn(),s={set:a.setInterval,clear:a.clearInterval},u={set:function(e,t){return setInterval(e,t)},clear:function(e){return clearInterval(e)}};e.default=function(e){switch(e){case"native":return u;case"worker":return s;default:return!o.default||o.isWebWorker||o.isReactNativeBrowser?u:s}}})),Xn=$((function(e){te(),zt(),xt();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0});var r=t(Jn());e.default=function(){"use strict";function e(t,n){(0,k.default)(this,e),this.destroyed=!1,this.client=t,this.timer="object"==typeof n&&"set"in n&&"clear"in n?n:(0,r.default)(n),this.setKeepalive(t.options.keepalive)}return(0,C.default)(e,[{key:"keepaliveTimeoutTimestamp",get:function(){return this._keepaliveTimeoutTimestamp}},{key:"intervalEvery",get:function(){return this._intervalEvery}},{key:"keepalive",get:function(){return this._keepalive}},{key:"clear",value:function(){this.timerId&&(this.timer.clear(this.timerId),this.timerId=null)}},{key:"setKeepalive",value:function(e){if(isNaN(e*=1e3)||e<=0||e>2147483647)throw Error("Keepalive value must be an integer between 0 and 2147483647. Provided value is "+e);this._keepalive=e,this.reschedule(),this.client.log("KeepaliveManager: set keepalive to ".concat(e,"ms"))}},{key:"destroy",value:function(){this.clear(),this.destroyed=!0}},{key:"reschedule",value:function(){var e=this;if(!this.destroyed){this.clear(),this.counter=0;var t=Math.ceil(1.5*this._keepalive);this._keepaliveTimeoutTimestamp=Date.now()+t,this._intervalEvery=Math.ceil(this._keepalive/2),this.timerId=this.timer.set((function(){e.destroyed||(e.counter+=1,2===e.counter?e.client.sendPing():e.counter>2&&e.client.onKeepaliveTimeout())}),this._intervalEvery)}}}]),e}()})),$n=$((function(e){te(),zt(),xt();var t,r=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),n=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=e&&e.__importStar||(t=function(e){return(t=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)({}).hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)},function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var o=t(e),a=0;a<o.length;a++)"default"!==o[a]&&r(i,e,o[a]);return n(i,e),i}),o=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0});var a=o(Kt()),s=o(sn()),u=o(un()),l=Kr(),c=o(cn()),f=i(fn()),h=o(en()),d=o(hn()),p=o(Vn()),v=vn(),g=zn(),b=o(Xn()),m=i(Kn()),w=globalThis.setImmediate||function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.shift();(0,v.nextTick)((function(){n.apply(void 0,(0,F.default)(t))}))},_={keepalive:60,reschedulePings:!0,protocolId:"MQTT",protocolVersion:4,reconnectPeriod:1e3,connectTimeout:3e4,clean:!0,resubscribe:!0,subscribeBatchSize:null,writeCache:!0,timerVariant:"auto"},E=function(e){"use strict";(0,j.default)(r,e);var t=(0,z.default)(r);function r(e,n){var i;for(var o in(0,k.default)(this,r),(i=t.call(this)).options=n||{},_)(0,q.default)(i.options[o])>"u"?i.options[o]=_[o]:i.options[o]=n[o];return i.log=i.options.log||(0,h.default)("mqttjs:client"),i.noop=i._noop.bind((0,y.default)(i)),i.log("MqttClient :: version:",r.VERSION),m.isWebWorker?i.log("MqttClient :: environment","webworker"):i.log("MqttClient :: environment",m.default?"browser":"node"),i.log("MqttClient :: options.protocol",n.protocol),i.log("MqttClient :: options.protocolVersion",n.protocolVersion),i.log("MqttClient :: options.username",n.username),i.log("MqttClient :: options.keepalive",n.keepalive),i.log("MqttClient :: options.reconnectPeriod",n.reconnectPeriod),i.log("MqttClient :: options.rejectUnauthorized",n.rejectUnauthorized),i.log("MqttClient :: options.properties.topicAliasMaximum",n.properties?n.properties.topicAliasMaximum:void 0),i.options.clientId="string"==typeof n.clientId?n.clientId:r.defaultId(),i.log("MqttClient :: clientId",i.options.clientId),i.options.customHandleAcks=5===n.protocolVersion&&n.customHandleAcks?n.customHandleAcks:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];t[3](null,0)},i.options.writeCache||(s.default.writeToStream.cacheNumbers=!1),i.streamBuilder=e,i.messageIdProvider=(0,q.default)(i.options.messageIdProvider)>"u"?new u.default:i.options.messageIdProvider,i.outgoingStore=n.outgoingStore||new d.default,i.incomingStore=n.incomingStore||new d.default,i.queueQoSZero=void 0===n.queueQoSZero||n.queueQoSZero,i._resubscribeTopics={},i.messageIdToTopic={},i.keepaliveManager=null,i.connected=!1,i.disconnecting=!1,i.reconnecting=!1,i.queue=[],i.connackTimer=null,i.reconnectTimer=null,i._storeProcessing=!1,i._packetIdsDuringStoreProcessing={},i._storeProcessingQueue=[],i.outgoing={},i._firstConnection=!0,n.properties&&n.properties.topicAliasMaximum>0&&(n.properties.topicAliasMaximum>65535?i.log("MqttClient :: options.properties.topicAliasMaximum is out of range"):i.topicAliasRecv=new a.default(n.properties.topicAliasMaximum)),i.on("connect",(function(){var e=(0,y.default)(i).queue,t=function(){var r,n=e.shift();if(i.log("deliver :: entry %o",n),n){r=n.packet,i.log("deliver :: call _sendPacket for %o",r);var o=!0;r.messageId&&0!==r.messageId&&(i.messageIdProvider.register(r.messageId)||(o=!1)),o?i._sendPacket(r,(function(e){n.cb&&n.cb(e),t()})):(i.log("messageId: %d has already used. The message is skipped and removed.",r.messageId),t())}else i._resubscribe()};i.log("connect :: sending queued packets"),t()})),i.on("close",(function(){i.log("close :: connected set to `false`"),i.connected=!1,i.log("close :: clearing connackTimer"),clearTimeout(i.connackTimer),i._destroyKeepaliveManager(),i.topicAliasRecv&&i.topicAliasRecv.clear(),i.log("close :: calling _setupReconnect"),i._setupReconnect()})),i.options.manualConnect||(i.log("MqttClient :: setting up stream"),i.connect()),(0,D.default)(i)}return(0,C.default)(r,[{key:"handleAuth",value:function(e,t){t()}},{key:"handleMessage",value:function(e,t){t()}},{key:"_nextId",value:function(){return this.messageIdProvider.allocate()}},{key:"getLastMessageId",value:function(){return this.messageIdProvider.getLastAllocated()}},{key:"connect",value:function(){var e,t=this,r=new l.Writable,n=s.default.parser(this.options),i=null,o=[];this.log("connect :: calling method to clear reconnect"),this._clearReconnect(),this.disconnected&&!this.reconnecting&&(this.incomingStore=this.options.incomingStore||new d.default,this.outgoingStore=this.options.outgoingStore||new d.default,this.disconnecting=!1,this.disconnected=!1),this.log("connect :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),n.on("packet",(function(e){t.log("parser :: on packet push to packets array."),o.push(e)}));var a=function(){t.log("work :: getting next packet in queue");var e=o.shift();if(e)t.log("work :: packet pulled from queue"),(0,p.default)(t,e,u);else{t.log("work :: no packets in queue");var r=i;i=null,t.log("work :: done flag is %s",!!r),r&&r()}},u=function(){if(o.length)(0,v.nextTick)(a);else{var e=i;i=null,e()}};r._write=function(e,r,o){i=o,t.log("writable stream :: parsing buffer"),n.parse(e),a()},this.log("connect :: pipe stream to writable stream"),this.stream.pipe(r),this.stream.on("error",(function(e){t.log("streamErrorHandler :: error",e.message),e.code?(t.log("streamErrorHandler :: emitting error"),t.emit("error",e)):t.noop(e)})),this.stream.on("close",(function(){t.log("(%s)stream :: on close",t.options.clientId),t._flushVolatile(),t.log("stream: emit close to MqttClient"),t.emit("close")})),this.log("connect: sending packet `connect`");var c={cmd:"connect",protocolId:this.options.protocolId,protocolVersion:this.options.protocolVersion,clean:this.options.clean,clientId:this.options.clientId,keepalive:this.options.keepalive,username:this.options.username,password:this.options.password,properties:this.options.properties};if(this.options.will&&(c.will=Object.assign(Object.assign({},this.options.will),{payload:null===(e=this.options.will)||void 0===e?void 0:e.payload})),this.topicAliasRecv&&(c.properties||(c.properties={}),this.topicAliasRecv&&(c.properties.topicAliasMaximum=this.topicAliasRecv.max)),this._writePacket(c),n.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return this.end((function(){return t.emit("error",Error("Packet has no Authentication Method"))})),this;if(this.options.properties.authenticationMethod&&this.options.authPacket&&"object"==typeof this.options.authPacket){var f=Object.assign({cmd:"auth",reasonCode:0},this.options.authPacket);this._writePacket(f)}}return this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout((function(){t.log("!!connectTimeout hit!! Calling _cleanUp with force `true`"),t.emit("error",Error("connack timeout")),t._cleanUp(!0)}),this.options.connectTimeout),this}},{key:"publish",value:function(e,t,r,n){var i=this;this.log("publish :: message `%s` to topic `%s`",t,e);var o=this.options;"function"==typeof r&&(n=r,r=null),r=r||{};var a=(r=Object.assign(Object.assign({},{qos:0,retain:!1,dup:!1}),r)).qos,s=r.retain,u=r.dup,l=r.properties,c=r.cbStorePut;if(this._checkDisconnecting(n))return this;var f=function(){var r=0;if((1===a||2===a)&&null===(r=i._nextId()))return i.log("No messageId left"),!1;var f={cmd:"publish",topic:e,payload:t,qos:a,retain:s,messageId:r,dup:u};switch(5===o.protocolVersion&&(f.properties=l),i.log("publish :: qos",a),a){case 1:case 2:i.outgoing[f.messageId]={volatile:!1,cb:n||i.noop},i.log("MqttClient:publish: packet cmd: %s",f.cmd),i._sendPacket(f,void 0,c);break;default:i.log("MqttClient:publish: packet cmd: %s",f.cmd),i._sendPacket(f,n,c)}return!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!f())&&this._storeProcessingQueue.push({invoke:f,cbStorePut:r.cbStorePut,callback:n}),this}},{key:"publishAsync",value:function(e,t,r){var n=this;return new Promise((function(i,o){n.publish(e,t,r,(function(e,t){e?o(e):i(t)}))}))}},{key:"subscribe",value:function(e,t,r){var n=this,i=this.options.protocolVersion;"function"==typeof t&&(r=t),r=r||this.noop;var o=!1,a=[];"string"==typeof e?a=e=[e]:Array.isArray(e)?a=e:"object"==typeof e&&(o=e.resubscribe,delete e.resubscribe,a=Object.keys(e));var s=f.validateTopics(a);if(null!==s)return w(r,Error("Invalid topic "+s)),this;if(this._checkDisconnecting(r))return this.log("subscribe: discconecting true"),this;var u={qos:0};5===i&&(u.nl=!1,u.rap=!1,u.rh=0);var l=(t=Object.assign(Object.assign({},u),t)).properties,c=[],h=function(e,r){if(r=r||t,!{}.hasOwnProperty.call(n._resubscribeTopics,e)||n._resubscribeTopics[e].qos<r.qos||o){var a={topic:e,qos:r.qos};5===i&&(a.nl=r.nl,a.rap=r.rap,a.rh=r.rh,a.properties=l),n.log("subscribe: pushing topic `%s` and qos `%s` to subs list",a.topic,a.qos),c.push(a)}};if(Array.isArray(e)?e.forEach((function(e){n.log("subscribe: array topic %s",e),h(e)})):Object.keys(e).forEach((function(t){n.log("subscribe: object topic %s, %o",t,e[t]),h(t,e[t])})),!c.length)return r(null,[]),this;var d=function(e,t){var r={cmd:"subscribe",subscriptions:e,messageId:t};if(l&&(r.properties=l),n.options.resubscribe){n.log("subscribe :: resubscribe true");var o=[];e.forEach((function(e){if(n.options.reconnectPeriod>0){var t={qos:e.qos};5===i&&(t.nl=e.nl||!1,t.rap=e.rap||!1,t.rh=e.rh||0,t.properties=e.properties),n._resubscribeTopics[e.topic]=t,o.push(e.topic)}})),n.messageIdToTopic[r.messageId]=o}var a=new Promise((function(t,i){n.outgoing[r.messageId]={volatile:!0,cb:function(r,n){if(!r)for(var o=n.granted,a=0;a<o.length;a+=1)e[a].qos=o[a];r?i(new v.ErrorWithSubackPacket(r.message,n)):t(n)}}}));return n.log("subscribe :: call _sendPacket"),n._sendPacket(r),a},p=function(){for(var e,t=null!==(e=n.options.subscribeBatchSize)&&void 0!==e?e:c.length,i=[],o=0;o<c.length;o+=t){var a=c.slice(o,o+t),s=n._nextId();if(null===s)return n.log("No messageId left"),!1;i.push(d(a,s))}return Promise.all(i).then((function(e){r(null,c,e.at(-1))})).catch((function(e){r(e,c,e.packet)})),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!p())&&this._storeProcessingQueue.push({invoke:p,callback:r}),this}},{key:"subscribeAsync",value:function(e,t){var r=this;return new Promise((function(n,i){r.subscribe(e,t,(function(e,t){e?i(e):n(t)}))}))}},{key:"unsubscribe",value:function(e,t,r){var n=this;"string"==typeof e&&(e=[e]),"function"==typeof t&&(r=t),r=r||this.noop;var i=f.validateTopics(e);if(null!==i)return w(r,Error("Invalid topic "+i)),this;if(this._checkDisconnecting(r))return this;var o=function(){var i=n._nextId();if(null===i)return n.log("No messageId left"),!1;var o={cmd:"unsubscribe",messageId:i,unsubscriptions:[]};return"string"==typeof e?o.unsubscriptions=[e]:Array.isArray(e)&&(o.unsubscriptions=e),n.options.resubscribe&&o.unsubscriptions.forEach((function(e){delete n._resubscribeTopics[e]})),"object"==typeof t&&t.properties&&(o.properties=t.properties),n.outgoing[o.messageId]={volatile:!0,cb:r},n.log("unsubscribe: call _sendPacket"),n._sendPacket(o),!0};return(this._storeProcessing||this._storeProcessingQueue.length>0||!o())&&this._storeProcessingQueue.push({invoke:o,callback:r}),this}},{key:"unsubscribeAsync",value:function(e,t){var r=this;return new Promise((function(n,i){r.unsubscribe(e,t,(function(e,t){e?i(e):n(t)}))}))}},{key:"end",value:function(e,t,r){var n=this;this.log("end :: (%s)",this.options.clientId),(null==e||"boolean"!=typeof e)&&(r=r||t,t=e,e=!1),"object"!=typeof t&&(r=r||t,t=null),this.log("end :: cb? %s",!!r),(!r||"function"!=typeof r)&&(r=this.noop);var i=function(){n.log("end :: closeStores: closing incoming and outgoing stores"),n.disconnected=!0,n.incomingStore.close((function(e){n.outgoingStore.close((function(t){if(n.log("end :: closeStores: emitting end"),n.emit("end"),r){var i=e||t;n.log("end :: closeStores: invoking callback with args"),r(i)}}))})),n._deferredReconnect?n._deferredReconnect():(0===n.options.reconnectPeriod||n.options.manualConnect)&&(n.disconnecting=!1)},o=function(){n.log("end :: (%s) :: finish :: calling _cleanUp with force %s",n.options.clientId,e),n._cleanUp(e,(function(){n.log("end :: finish :: calling process.nextTick on closeStores"),(0,v.nextTick)(i)}),t)};return this.disconnecting?(r(),this):(this._clearReconnect(),this.disconnecting=!0,!e&&Object.keys(this.outgoing).length>0?(this.log("end :: (%s) :: calling finish in 10ms once outgoing is empty",this.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,o,10))):(this.log("end :: (%s) :: immediately calling finish",this.options.clientId),o()),this)}},{key:"endAsync",value:function(e,t){var r=this;return new Promise((function(n,i){r.end(e,t,(function(e){e?i(e):n()}))}))}},{key:"removeOutgoingMessage",value:function(e){if(this.outgoing[e]){var t=this.outgoing[e].cb;this._removeOutgoingAndStoreMessage(e,(function(){t(Error("Message removed"))}))}return this}},{key:"reconnect",value:function(e){var t=this;this.log("client reconnect");var r=function(){e?(t.options.incomingStore=e.incomingStore,t.options.outgoingStore=e.outgoingStore):(t.options.incomingStore=null,t.options.outgoingStore=null),t.incomingStore=t.options.incomingStore||new d.default,t.outgoingStore=t.options.outgoingStore||new d.default,t.disconnecting=!1,t.disconnected=!1,t._deferredReconnect=null,t._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=r:r(),this}},{key:"_flushVolatile",value:function(){var e=this;this.outgoing&&(this.log("_flushVolatile :: deleting volatile messages from the queue and setting their callbacks as error function"),Object.keys(this.outgoing).forEach((function(t){e.outgoing[t].volatile&&"function"==typeof e.outgoing[t].cb&&(e.outgoing[t].cb(Error("Connection closed")),delete e.outgoing[t])})))}},{key:"_flush",value:function(){var e=this;this.outgoing&&(this.log("_flush: queue exists? %b",!!this.outgoing),Object.keys(this.outgoing).forEach((function(t){"function"==typeof e.outgoing[t].cb&&(e.outgoing[t].cb(Error("Connection closed")),delete e.outgoing[t])})))}},{key:"_removeTopicAliasAndRecoverTopicName",value:function(e){var t;e.properties&&(t=e.properties.topicAlias);var r=e.topic.toString();if(this.log("_removeTopicAliasAndRecoverTopicName :: alias %d, topic %o",t,r),0===r.length){if((void 0===t?"undefined":(0,q.default)(t))>"u")return Error("Unregistered Topic Alias");if((void 0===(r=this.topicAliasSend.getTopicByAlias(t))?"undefined":(0,q.default)(r))>"u")return Error("Unregistered Topic Alias");e.topic=r}t&&delete e.properties.topicAlias}},{key:"_checkDisconnecting",value:function(e){return this.disconnecting&&(e&&e!==this.noop?e(Error("client disconnecting")):this.emit("error",Error("client disconnecting"))),this.disconnecting}},{key:"_reconnect",value:function(){var e=this;this.log("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end((function(){e.connect()})),this.log("client already connected. disconnecting first.")):(this.log("_reconnect: calling connect"),this.connect())}},{key:"_setupReconnect",value:function(){var e=this;!this.disconnecting&&!this.reconnectTimer&&this.options.reconnectPeriod>0?(this.reconnecting||(this.log("_setupReconnect :: emit `offline` state"),this.emit("offline"),this.log("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),this.log("_setupReconnect :: setting reconnectTimer for %d ms",this.options.reconnectPeriod),this.reconnectTimer=setInterval((function(){e.log("reconnectTimer :: reconnect triggered!"),e._reconnect()}),this.options.reconnectPeriod)):this.log("_setupReconnect :: doing nothing...")}},{key:"_clearReconnect",value:function(){this.log("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)}},{key:"_cleanUp",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this;if(t&&(this.log("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",t)),this.log("_cleanUp :: forced? %s",e),e)0===this.options.reconnectPeriod&&this.options.clean&&this._flush(),this.log("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{var i=Object.assign({cmd:"disconnect"},r);this.log("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(i,(function(){n.log("_cleanUp :: (%s) :: destroying stream",n.options.clientId),w((function(){n.stream.end((function(){n.log("_cleanUp :: (%s) :: stream destroyed",n.options.clientId)}))}))}))}!this.disconnecting&&!this.reconnecting&&(this.log("_cleanUp :: client not disconnecting/reconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),this._destroyKeepaliveManager(),t&&!this.connected&&(this.log("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",t),t())}},{key:"_storeAndSend",value:function(e,t,r){var n=this;this.log("storeAndSend :: store packet with cmd %s to outgoingStore",e.cmd);var i,o=e;if("publish"===o.cmd&&(o=(0,c.default)(e),i=this._removeTopicAliasAndRecoverTopicName(o)))return t&&t(i);this.outgoingStore.put(o,(function(i){if(i)return t&&t(i);r(),n._writePacket(e,t)}))}},{key:"_applyTopicAlias",value:function(e){if(5===this.options.protocolVersion&&"publish"===e.cmd){var t;e.properties&&(t=e.properties.topicAlias);var r=e.topic.toString();if(this.topicAliasSend)if(t){if(0!==r.length&&(this.log("applyTopicAlias :: register topic: %s - alias: %d",r,t),!this.topicAliasSend.put(r,t)))return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",r,t),Error("Sending Topic Alias out of range")}else 0!==r.length&&(this.options.autoAssignTopicAlias?(t=this.topicAliasSend.getAliasByTopic(r))?(e.topic="",e.properties=Object.assign(Object.assign({},e.properties),{topicAlias:t}),this.log("applyTopicAlias :: auto assign(use) topic: %s - alias: %d",r,t)):(t=this.topicAliasSend.getLruAlias(),this.topicAliasSend.put(r,t),e.properties=Object.assign(Object.assign({},e.properties),{topicAlias:t}),this.log("applyTopicAlias :: auto assign topic: %s - alias: %d",r,t)):this.options.autoUseTopicAlias&&(t=this.topicAliasSend.getAliasByTopic(r))&&(e.topic="",e.properties=Object.assign(Object.assign({},e.properties),{topicAlias:t}),this.log("applyTopicAlias :: auto use topic: %s - alias: %d",r,t)));else if(t)return this.log("applyTopicAlias :: error out of range. topic: %s - alias: %d",r,t),Error("Sending Topic Alias out of range")}}},{key:"_noop",value:function(e){this.log("noop ::",e)}},{key:"_writePacket",value:function(e,t){this.log("_writePacket :: packet: %O",e),this.log("_writePacket :: emitting `packetsend`"),this.emit("packetsend",e),this.log("_writePacket :: writing to stream");var r=s.default.writeToStream(e,this.stream,this.options);this.log("_writePacket :: writeToStream result %s",r),!r&&t&&t!==this.noop?(this.log("_writePacket :: handle events on `drain` once through callback."),this.stream.once("drain",t)):t&&(this.log("_writePacket :: invoking cb"),t())}},{key:"_sendPacket",value:function(e,t,r,n){this.log("_sendPacket :: (%s) :: start",this.options.clientId),r=r||this.noop,t=t||this.noop;var i=this._applyTopicAlias(e);if(i)t(i);else{if(!this.connected)return"auth"===e.cmd?void this._writePacket(e,t):(this.log("_sendPacket :: client not connected. Storing packet offline."),void this._storePacket(e,t,r));if(n)this._writePacket(e,t);else{switch(e.cmd){case"publish":break;case"pubrel":return void this._storeAndSend(e,t,r);default:return void this._writePacket(e,t)}switch(e.qos){case 2:case 1:this._storeAndSend(e,t,r);break;default:this._writePacket(e,t)}this.log("_sendPacket :: (%s) :: end",this.options.clientId)}}}},{key:"_storePacket",value:function(e,t,r){this.log("_storePacket :: packet: %o",e),this.log("_storePacket :: cb? %s",!!t),r=r||this.noop;var n=e;if("publish"===n.cmd){n=(0,c.default)(e);var i=this._removeTopicAliasAndRecoverTopicName(n);if(i)return t&&t(i)}var o=n.qos||0;0===o&&this.queueQoSZero||"publish"!==n.cmd?this.queue.push({packet:n,cb:t}):o>0?(t=this.outgoing[n.messageId]?this.outgoing[n.messageId].cb:null,this.outgoingStore.put(n,(function(e){if(e)return t&&t(e);r()}))):t&&t(Error("No connection to broker"))}},{key:"_setupKeepaliveManager",value:function(){this.log("_setupKeepaliveManager :: keepalive %d (seconds)",this.options.keepalive),!this.keepaliveManager&&this.options.keepalive&&(this.keepaliveManager=new b.default(this,this.options.timerVariant))}},{key:"_destroyKeepaliveManager",value:function(){this.keepaliveManager&&(this.log("_destroyKeepaliveManager :: destroying keepalive manager"),this.keepaliveManager.destroy(),this.keepaliveManager=null)}},{key:"reschedulePing",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.keepaliveManager&&this.options.keepalive&&(e||this.options.reschedulePings)&&this._reschedulePing()}},{key:"_reschedulePing",value:function(){this.log("_reschedulePing :: rescheduling ping"),this.keepaliveManager.reschedule()}},{key:"sendPing",value:function(){this.log("_sendPing :: sending pingreq"),this._sendPacket({cmd:"pingreq"})}},{key:"onKeepaliveTimeout",value:function(){this.emit("error",Error("Keepalive timeout")),this.log("onKeepaliveTimeout :: calling _cleanUp with force true"),this._cleanUp(!0)}},{key:"_resubscribe",value:function(){this.log("_resubscribe");var e=Object.keys(this._resubscribeTopics);if(!this._firstConnection&&(this.options.clean||this.options.protocolVersion>=4&&!this.connackPacket.sessionPresent)&&e.length>0)if(this.options.resubscribe)if(5===this.options.protocolVersion){this.log("_resubscribe: protocolVersion 5");for(var t=0;t<e.length;t++){var r={};r[e[t]]=this._resubscribeTopics[e[t]],r.resubscribe=!0,this.subscribe(r,{properties:r[e[t]].properties})}}else this._resubscribeTopics.resubscribe=!0,this.subscribe(this._resubscribeTopics);else this._resubscribeTopics={};this._firstConnection=!1}},{key:"_onConnect",value:function(e){var t=this;if(this.disconnected)this.emit("connect",e);else{this.connackPacket=e,this.messageIdProvider.clear(),this._setupKeepaliveManager(),this.connected=!0;var r=function(){var n=t.outgoingStore.createStream(),i=function(){n.destroy(),n=null,t._flushStoreProcessingQueue(),o()},o=function(){t._storeProcessing=!1,t._packetIdsDuringStoreProcessing={}};t.once("close",i),n.on("error",(function(e){o(),t._flushStoreProcessingQueue(),t.removeListener("close",i),t.emit("error",e)}));var a=function(){if(n){var e,r=n.read(1);r?(t._storeProcessing=!0,t._packetIdsDuringStoreProcessing[r.messageId]?a():t.disconnecting||t.reconnectTimer?n.destroy&&n.destroy():(e=t.outgoing[r.messageId]?t.outgoing[r.messageId].cb:null,t.outgoing[r.messageId]={volatile:!1,cb:function(t,r){e&&e(t,r),a()}},t._packetIdsDuringStoreProcessing[r.messageId]=!0,t.messageIdProvider.register(r.messageId)?t._sendPacket(r,void 0,void 0,!0):t.log("messageId: %d has already used.",r.messageId))):n.once("readable",a)}};n.on("end",(function(){var n=!0;for(var a in t._packetIdsDuringStoreProcessing)if(!t._packetIdsDuringStoreProcessing[a]){n=!1;break}t.removeListener("close",i),n?(o(),t._invokeAllStoreProcessingQueue(),t.emit("connect",e)):r()})),a()};r()}}},{key:"_invokeStoreProcessingQueue",value:function(){if(!this._storeProcessing&&this._storeProcessingQueue.length>0){var e=this._storeProcessingQueue[0];if(e&&e.invoke())return this._storeProcessingQueue.shift(),!0}return!1}},{key:"_invokeAllStoreProcessingQueue",value:function(){for(;this._invokeStoreProcessingQueue(););}},{key:"_flushStoreProcessingQueue",value:function(){var e=!0,t=!1,r=void 0;try{for(var n,i=this._storeProcessingQueue[Symbol.iterator]();!(e=(n=i.next()).done);e=!0){var o=n.value;o.cbStorePut&&o.cbStorePut(Error("Connection closed")),o.callback&&o.callback(Error("Connection closed"))}}catch(e){t=!0,r=e}finally{try{e||null==i.return||i.return()}finally{if(t)throw r}}this._storeProcessingQueue.splice(0)}},{key:"_removeOutgoingAndStoreMessage",value:function(e,t){var r=this;delete this.outgoing[e],this.outgoingStore.del({messageId:e},(function(n,i){t(n,i),r.messageIdProvider.deallocate(e),r._invokeStoreProcessingQueue()}))}}],[{key:"defaultId",value:function(){return"mqttjs_"+Math.random().toString(16).substr(2,8)}}]),r}(g.TypedEventEmitter);E.VERSION=v.MQTTJS_VERSION,e.default=E})),Zn=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"__esModule",{value:!0});var t=Wn();e.default=function(){"use strict";function e(){(0,k.default)(this,e),this.numberAllocator=new t.NumberAllocator(1,65535)}return(0,C.default)(e,[{key:"allocate",value:function(){return this.lastId=this.numberAllocator.alloc(),this.lastId}},{key:"getLastAllocated",value:function(){return this.lastId}},{key:"register",value:function(e){return this.numberAllocator.use(e)}},{key:"deallocate",value:function(e){this.numberAllocator.free(e)}},{key:"clear",value:function(){this.numberAllocator.clear()}}]),e}()}));function ei(e){throw new RangeError(ai[e])}function ti(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(oi,".")).split("."),t).join(".")}function ri(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var o=e.charCodeAt(r++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),r--)}else t.push(i)}return t}var ni,ii,oi,ai,si,ui,li,ci,fi,hi,di,pi=X((function(){te(),zt(),xt(),ni=/^xn--/,ii=/[^\0-\x7E]/,oi=/[\x2E\u3002\uFF0E\uFF61]/g,ai={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},si=Math.floor,ui=String.fromCharCode,li=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},ci=function(e,t,r){var n=0;for(e=r?si(e/700):e>>1,e+=si(e/t);e>455;n+=36)e=si(e/35);return si(n+36*e/(e+38))},hi=function(e){var t=[],r=(e=ri(e)).length,n=128,i=0,o=72,a=!0,s=!1,u=void 0;try{for(var l,c=e[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var f=l.value;f<128&&t.push(ui(f))}}catch(e){s=!0,u=e}finally{try{a||null==c.return||c.return()}finally{if(s)throw u}}var h=t.length,d=h;for(h&&t.push("-");d<r;){var p=2147483647,v=!0,g=!1,y=void 0;try{for(var b,m=e[Symbol.iterator]();!(v=(b=m.next()).done);v=!0){var w=b.value;w>=n&&w<p&&(p=w)}}catch(e){g=!0,y=e}finally{try{v||null==m.return||m.return()}finally{if(g)throw y}}var _=d+1;p-n>si((2147483647-i)/_)&&ei("overflow"),i+=(p-n)*_,n=p;var k=!0,E=!1,S=void 0;try{for(var A,I=e[Symbol.iterator]();!(k=(A=I.next()).done);k=!0){var T=A.value;if(T<n&&++i>2147483647&&ei("overflow"),T==n){for(var P=i,O=36;;O+=36){var R=O<=o?1:O>=o+26?26:O-o;if(P<R)break;var C=P-R,x=36-R;t.push(ui(li(R+C%x,0))),P=si(C/x)}t.push(ui(li(P,0))),o=ci(i,_,d==h),i=0,++d}}}catch(e){E=!0,S=e}finally{try{k||null==I.return||I.return()}finally{if(E)throw S}}++i,++n}return t.join("")},di={version:"2.1.0",ucs2:{decode:ri,encode:function(e){var t;return(t=String).fromCodePoint.apply(t,(0,F.default)(e))}},decode:fi=function(e){var t,r,n=[],i=e.length,o=0,a=128,s=72,u=e.lastIndexOf("-");u<0&&(u=0);for(var l=0;l<u;++l)e.charCodeAt(l)>=128&&ei("not-basic"),n.push(e.charCodeAt(l));for(var c=u>0?u+1:0;c<i;){for(var f=o,h=1,d=36;;d+=36){c>=i&&ei("invalid-input");var p=(r=e.charCodeAt(c++))-48<10?r-22:r-65<26?r-65:r-97<26?r-97:36;(p>=36||p>si((2147483647-o)/h))&&ei("overflow"),o+=p*h;var v=d<=s?1:d>=s+26?26:d-s;if(p<v)break;var g=36-v;h>si(2147483647/g)&&ei("overflow"),h*=g}var y=n.length+1;s=ci(o-f,y,0==f),si(o/y)>2147483647-a&&ei("overflow"),a+=si(o/y),o%=y,n.splice(o++,0,a)}return(t=String).fromCodePoint.apply(t,(0,F.default)(n))},encode:hi,toASCII:function(e){return ti(e,(function(e){return ii.test(e)?"xn--"+hi(e):e}))},toUnicode:function(e){return ti(e,(function(e){return ni.test(e)?fi(e.slice(4).toLowerCase()):e}))}},di.toASCII,di.toUnicode,di.ucs2,di.version}));function vi(e,t){return{}.hasOwnProperty.call(e,t)}var gi,yi,bi,mi,wi=X((function(){te(),zt(),xt(),gi=function(e,t,r,n){t=t||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var o=/\+/g;e=e.split(t);var a=1e3;n&&"number"==typeof n.maxKeys&&(a=n.maxKeys);var s=e.length;a>0&&s>a&&(s=a);for(var u=0;u<s;++u){var l,c,f,h,d=e[u].replace(o,"%20"),p=d.indexOf(r);p>=0?(l=d.substr(0,p),c=d.substr(p+1)):(l=d,c=""),f=decodeURIComponent(l),h=decodeURIComponent(c),vi(i,f)?Array.isArray(i[f])?i[f].push(h):i[f]=[i[f],h]:i[f]=h}return i},yi=function(e){switch(void 0===e?"undefined":(0,q.default)(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},bi=function(e,t,r,n){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(n){var i=encodeURIComponent(yi(n))+r;return Array.isArray(e[n])?e[n].map((function(e){return i+encodeURIComponent(yi(e))})).join(t):i+encodeURIComponent(yi(e[n]))})).join(t):n?encodeURIComponent(yi(n))+r+encodeURIComponent(yi(e)):""},(mi={}).decode=mi.parse=gi,mi.encode=mi.stringify=bi,mi.decode,mi.encode,mi.parse,mi.stringify}));function _i(){throw Error("setTimeout has not been defined")}function ki(){throw Error("clearTimeout has not been defined")}function Ei(e){if(Oi===setTimeout)return setTimeout(e,0);if((Oi===_i||!Oi)&&setTimeout)return Oi=setTimeout,setTimeout(e,0);try{return Oi(e,0)}catch(t){try{return Oi.call(null,e,0)}catch(t){return Oi.call(this||Ci,e,0)}}}function Si(){ji&&Bi&&(ji=!1,Bi.length?Mi=Bi.concat(Mi):Li=-1,Mi.length&&Ai())}function Ai(){if(!ji){var e=Ei(Si);ji=!0;for(var t=Mi.length;t;){for(Bi=Mi,Mi=[];++Li<t;)Bi&&Bi[Li].run();Li=-1,t=Mi.length}Bi=null,ji=!1,function(e){if(Ri===clearTimeout)return clearTimeout(e);if((Ri===ki||!Ri)&&clearTimeout)return Ri=clearTimeout,clearTimeout(e);try{Ri(e)}catch(t){try{return Ri.call(null,e)}catch(t){return Ri.call(this||Ci,e)}}}(e)}}function Ii(e,t){(this||Ci).fun=e,(this||Ci).array=t}function Ti(){}var Pi,Oi,Ri,Ci,xi,Bi,Mi,ji,Li,Ui,Ni,Di,Wi,Fi,qi,Hi,Vi,zi=X((function(){te(),zt(),xt(),Ci=("undefined"==typeof globalThis?"undefined":(0,q.default)(globalThis))<"u"?globalThis:("undefined"==typeof self?"undefined":(0,q.default)(self))<"u"?self:e,xi=Pi={},function(){try{Oi="function"==typeof setTimeout?setTimeout:_i}catch(e){Oi=_i}try{Ri="function"==typeof clearTimeout?clearTimeout:ki}catch(e){Ri=ki}}(),Mi=[],ji=!1,Li=-1,xi.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];Mi.push(new Ii(e,t)),1!==Mi.length||ji||Ei(Ai)},Ii.prototype.run=function(){(this||Ci).fun.apply(null,(this||Ci).array)},xi.title="browser",xi.browser=!0,xi.env={},xi.argv=[],xi.version="",xi.versions={},xi.on=Ti,xi.addListener=Ti,xi.once=Ti,xi.off=Ti,xi.removeListener=Ti,xi.removeAllListeners=Ti,xi.emit=Ti,xi.prependListener=Ti,xi.prependOnceListener=Ti,xi.listeners=function(){return[]},xi.binding=function(){throw Error("process.binding is not supported")},xi.cwd=function(){return"/"},xi.chdir=function(){throw Error("process.chdir is not supported")},xi.umask=function(){return 0},(Ui=Pi).binding,Ui.browser,Ui.chdir,Ui.cwd,Ui.emit,Ui.env,Ui.listeners,Ui.nextTick,Ui.off,Ui.on,Ui.once,Ui.prependListener,Ui.prependOnceListener,Ui.removeAllListeners,Ui.removeListener,Ui.title,Ui.umask,Ui.version,Ui.versions})),Ki=X((function(){te(),zt(),xt(),Ni={},Di=!1,Wi=("undefined"==typeof globalThis?"undefined":(0,q.default)(globalThis))<"u"?globalThis:("undefined"==typeof self?"undefined":(0,q.default)(self))<"u"?self:e,(Fi=function(){var e=function(){throw Error("setTimeout has not been defined")},t=function(){throw Error("clearTimeout has not been defined")},r=function(t){if(s===setTimeout)return setTimeout(t,0);if((s===e||!s)&&setTimeout)return s=setTimeout,setTimeout(t,0);try{return s(t,0)}catch(e){try{return s.call(null,t,0)}catch(e){return s.call(this||Wi,t,0)}}},n=function(){!h||!c||(h=!1,c.length?f=c.concat(f):d=-1,f.length&&i())},i=function(){if(!h){var e=r(n);h=!0;for(var i=f.length;i;){for(c=f,f=[];++d<i;)c&&c[d].run();d=-1,i=f.length}c=null,h=!1,function(e){if(u===clearTimeout)return clearTimeout(e);if((u===t||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(e);try{u(e)}catch(t){try{return u.call(null,e)}catch(t){return u.call(this||Wi,e)}}}(e)}},o=function(e,t){(this||Wi).fun=e,(this||Wi).array=t},a=function(){};if(Di)return Ni;Di=!0;var s,u,l=Ni={};!function(){try{s="function"==typeof setTimeout?setTimeout:e}catch(t){s=e}try{u="function"==typeof clearTimeout?clearTimeout:t}catch(e){u=t}}();var c,f=[],h=!1,d=-1;return l.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];f.push(new o(e,t)),1===f.length&&!h&&r(i)},o.prototype.run=function(){(this||Wi).fun.apply(null,(this||Wi).array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=a,l.addListener=a,l.once=a,l.off=a,l.removeListener=a,l.removeAllListeners=a,l.emit=a,l.prependListener=a,l.prependOnceListener=a,l.listeners=function(){return[]},l.binding=function(){throw Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(){throw Error("process.chdir is not supported")},l.umask=function(){return 0},Ni}()).platform="browser",Fi.addListener,Fi.argv,Fi.binding,Fi.browser,Fi.chdir,Fi.cwd,Fi.emit,Fi.env,Fi.listeners,Fi.nextTick,Fi.off,Fi.on,Fi.once,Fi.prependListener,Fi.prependOnceListener,Fi.removeAllListeners,Fi.removeListener,Fi.title,Fi.umask,Fi.version,Fi.versions})),Qi=X((function(){te(),zt(),xt(),Ki(),qi={},Hi=!1,Vi=function(){var e=function(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))},t=function(e,t){for(var r,n="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(o!==s-1&&1!==a)if(o!==s-1&&2===a){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",i=0):i=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=s,a=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,s):n=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n};if(Hi)return qi;Hi=!0;var r=Fi,n={resolve:function(){for(var n,i="",o=!1,a=arguments.length-1;a>=-1&&!o;a--){var s;a>=0?s=arguments[a]:(void 0===n&&(n=r.cwd()),s=n),e(s),0!==s.length&&(i=s+"/"+i,o=47===s.charCodeAt(0))}return i=t(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(r){if(e(r),0===r.length)return".";var n=47===r.charCodeAt(0),i=47===r.charCodeAt(r.length-1);return 0===(r=t(r,!n)).length&&!n&&(r="."),r.length>0&&i&&(r+="/"),n?"/"+r:r},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,r=0;r<arguments.length;++r){var i=arguments[r];e(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r||(t=n.resolve(t))===(r=n.resolve(r)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var o=t.length,a=o-i,s=1;s<r.length&&47===r.charCodeAt(s);++s);for(var u=r.length-s,l=a<u?a:u,c=-1,f=0;f<=l;++f){if(f===l){if(u>l){if(47===r.charCodeAt(s+f))return r.slice(s+f+1);if(0===f)return r.slice(s+f)}else a>l&&(47===t.charCodeAt(i+f)?c=f:0===f&&(c=0));break}var h=t.charCodeAt(i+f);if(h!==r.charCodeAt(s+f))break;47===h&&(c=f)}var d="";for(f=i+c+1;f<=o;++f)(f===o||47===t.charCodeAt(f))&&(0===d.length?d+="..":d+="/..");return d.length>0?d+r.slice(s+c):(s+=c,47===r.charCodeAt(s)&&++s,r.slice(s))},_makeLong:function(e){return e},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,i=-1,o=!0,a=t.length-1;a>=1;--a)if(47===(r=t.charCodeAt(a))){if(!o){i=a;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,i=0,o=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var s=r.length-1,u=-1;for(n=t.length-1;n>=0;--n){var l=t.charCodeAt(n);if(47===l){if(!a){i=n+1;break}}else-1===u&&(a=!1,u=n+1),s>=0&&(l===r.charCodeAt(s)?-1==--s&&(o=n):(s=-1,o=u))}return i===o?o=u:-1===o&&(o=t.length),t.slice(i,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){i=n+1;break}}else-1===o&&(a=!1,o=n+1);return-1===o?"":t.slice(i,o)},extname:function(t){e(t);for(var r=-1,n=0,i=-1,o=!0,a=0,s=t.length-1;s>=0;--s){var u=t.charCodeAt(s);if(47!==u)-1===i&&(o=!1,i=s+1),46===u?-1===r?r=s:1!==a&&(a=1):-1!==r&&(a=-1);else if(!o){n=s+1;break}}return-1===r||-1===i||0===a||1===a&&r===i-1&&r===n+1?"":t.slice(r,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+(void 0===e?"undefined":(0,q.default)(e)));return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,i=t.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var a=-1,s=0,u=-1,l=!0,c=t.length-1,f=0;c>=n;--c)if(47!==(i=t.charCodeAt(c)))-1===u&&(l=!1,u=c+1),46===i?-1===a?a=c:1!==f&&(f=1):-1!==a&&(f=-1);else if(!l){s=c+1;break}return-1===a||-1===u||0===f||1===f&&a===u-1&&a===s+1?-1!==u&&(r.base=r.name=0===s&&o?t.slice(1,u):t.slice(s,u)):(0===s&&o?(r.name=t.slice(1,a),r.base=t.slice(1,u)):(r.name=t.slice(s,a),r.base=t.slice(s,u)),r.ext=t.slice(a,u)),s>0?r.dir=t.slice(0,s-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};return n.posix=n,qi=n}()})),Gi={};function Yi(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function Ji(e,t,r){if(e&&no.isObject(e)&&e instanceof Yi)return e;var n=new Yi;return n.parse(e,t,r),n}function Xi(e){if("string"==typeof e)e=new URL(e);else if(!(e instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if("file:"!==e.protocol)throw new Deno.errors.InvalidData("invalid url scheme");return Io?function(e){for(var t=e.hostname,r=e.pathname,n=0;n<r.length;n++)if("%"===r[n]){var i=r.codePointAt(n+2)||32;if("2"===r[n+1]&&102===i||"5"===r[n+1]&&99===i)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(r=r.replace(To,"\\"),r=decodeURIComponent(r),""!==t)return"\\\\".concat(t).concat(r);var o=32|r.codePointAt(1),a=r[2];if(o<So||o>Ao||":"!==a)throw new Deno.errors.InvalidData("file url path must be absolute");return r.slice(1)}(e):function(e){if(""!==e.hostname)throw new Deno.errors.InvalidData("invalid file url hostname");for(var t=e.pathname,r=0;r<t.length;r++)if("%"===t[r]){var n=t.codePointAt(r+2)||32;if("2"===t[r+1]&&102===n)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(t)}(e)}function $i(e){var t=wo.resolve(e),r=e.charCodeAt(e.length-1);(r===Eo||Io&&r===ko)&&t[t.length-1]!==wo.sep&&(t+="/");var n=new URL("file://");return t.includes("%")&&(t=t.replace(Po,"%25")),!Io&&t.includes("\\")&&(t=t.replace(Oo,"%5C")),t.includes("\n")&&(t=t.replace(Ro,"%0A")),t.includes("\r")&&(t=t.replace(Co,"%0D")),t.includes("\t")&&(t=t.replace(xo,"%09")),n.pathname=t,n}function Zi(e){if("string"==typeof e)e=new URL(e);else if(!(e instanceof URL))throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");if("file:"!==e.protocol)throw new Deno.errors.InvalidData("invalid url scheme");return Vo?function(e){for(var t=e.hostname,r=e.pathname,n=0;n<r.length;n++)if("%"===r[n]){var i=r.codePointAt(n+2)||32;if("2"===r[n+1]&&102===i||"5"===r[n+1]&&99===i)throw new Deno.errors.InvalidData("must not include encoded \\ or / characters")}if(r=r.replace(zo,"\\"),r=decodeURIComponent(r),""!==t)return"\\\\".concat(t).concat(r);var o=32|r.codePointAt(1),a=r[2];if(o<qo||o>Ho||":"!==a)throw new Deno.errors.InvalidData("file url path must be absolute");return r.slice(1)}(e):function(e){if(""!==e.hostname)throw new Deno.errors.InvalidData("invalid file url hostname");for(var t=e.pathname,r=0;r<t.length;r++)if("%"===t[r]){var n=t.codePointAt(r+2)||32;if("2"===t[r+1]&&102===n)throw new Deno.errors.InvalidData("must not include encoded / characters")}return decodeURIComponent(t)}(e)}function eo(e){var t=Vi.resolve(e),r=e.charCodeAt(e.length-1);(r===Fo||Vo&&r===Wo)&&t[t.length-1]!==Vi.sep&&(t+="/");var n=new URL("file://");return t.includes("%")&&(t=t.replace(Ko,"%25")),!Vo&&t.includes("\\")&&(t=t.replace(Qo,"%5C")),t.includes("\n")&&(t=t.replace(Go,"%0A")),t.includes("\r")&&(t=t.replace(Yo,"%0D")),t.includes("\t")&&(t=t.replace(Jo,"%09")),n.pathname=t,n}Z(Gi,{URL:function(){return Do},Url:function(){return Mo},default:function(){return to},fileURLToPath:function(){return Zi},format:function(){return jo},parse:function(){return No},pathToFileURL:function(){return eo},resolve:function(){return Lo},resolveObject:function(){return Uo}});var to,ro,no,io,oo,ao,so,uo,lo,co,fo,ho,po,vo,go,yo,bo,mo,wo,_o,ko,Eo,So,Ao,Io,To,Po,Oo,Ro,Co,xo,Bo,Mo,jo,Lo,Uo,No,Do,Wo,Fo,qo,Ho,Vo,zo,Ko,Qo,Go,Yo,Jo,Xo=X((function(){te(),zt(),xt(),pi(),wi(),zi(),Qi(),Ki(),ro=di,no={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}},(to={}).parse=Ji,to.resolve=function(e,t){return Ji(e,!1,!0).resolve(t)},to.resolveObject=function(e,t){return e?Ji(e,!1,!0).resolveObject(t):t},to.format=function(e){return no.isString(e)&&(e=Ji(e)),e instanceof Yi?e.format():Yi.prototype.format.call(e)},to.Url=Yi,io=/^([a-z0-9.+-]+:)/i,oo=/:[0-9]*$/,ao=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,so=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),uo=["'"].concat(so),lo=["%","/","?",";","#"].concat(uo),co=["/","?","#"],fo=/^[+a-z0-9A-Z_-]{0,63}$/,ho=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,po={javascript:!0,"javascript:":!0},vo={javascript:!0,"javascript:":!0},go={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},yo=mi,Yi.prototype.parse=function(e,t,r){if(!no.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+(void 0===e?"undefined":(0,q.default)(e)));var n=e.indexOf("?"),i=-1!==n&&n<e.indexOf("#")?"?":"#",o=e.split(i);o[0]=o[0].replace(/\\/g,"/");var a=e=o.join(i);if(a=a.trim(),!r&&1===e.split("#").length){var s=ao.exec(a);if(s)return this.path=a,this.href=a,this.pathname=s[1],s[2]?(this.search=s[2],this.query=t?yo.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var u=io.exec(a);if(u){var l=(u=u[0]).toLowerCase();this.protocol=l,a=a.substr(u.length)}if(r||u||a.match(/^\/\/[^@\/]+@[^@\/]+/)){var c="//"===a.substr(0,2);!c||u&&vo[u]||(a=a.substr(2),this.slashes=!0)}if(!vo[u]&&(c||u&&!go[u])){for(var f,h,d=-1,p=0;p<co.length;p++)-1!==(v=a.indexOf(co[p]))&&(-1===d||v<d)&&(d=v);for(-1!==(h=-1===d?a.lastIndexOf("@"):a.lastIndexOf("@",d))&&(f=a.slice(0,h),a=a.slice(h+1),this.auth=decodeURIComponent(f)),d=-1,p=0;p<lo.length;p++){var v;-1!==(v=a.indexOf(lo[p]))&&(-1===d||v<d)&&(d=v)}-1===d&&(d=a.length),this.host=a.slice(0,d),a=a.slice(d),this.parseHost(),this.hostname=this.hostname||"";var g="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!g)for(var y=this.hostname.split(/\./),b=(p=0,y.length);p<b;p++){var m=y[p];if(m&&!m.match(fo)){for(var w="",_=0,k=m.length;_<k;_++)m.charCodeAt(_)>127?w+="x":w+=m[_];if(!w.match(fo)){var E=y.slice(0,p),S=y.slice(p+1),A=m.match(ho);A&&(E.push(A[1]),S.unshift(A[2])),S.length&&(a="/"+S.join(".")+a),this.hostname=E.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),g||(this.hostname=ro.toASCII(this.hostname));var I=this.port?":"+this.port:"",T=this.hostname||"";this.host=T+I,this.href+=this.host,g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!po[l])for(p=0,b=uo.length;p<b;p++){var P=uo[p];if(-1!==a.indexOf(P)){var O=encodeURIComponent(P);O===P&&(O=escape(P)),a=a.split(P).join(O)}}var R=a.indexOf("#");-1!==R&&(this.hash=a.substr(R),a=a.slice(0,R));var C=a.indexOf("?");if(-1!==C?(this.search=a.substr(C),this.query=a.substr(C+1),t&&(this.query=yo.parse(this.query)),a=a.slice(0,C)):t&&(this.search="",this.query={}),a&&(this.pathname=a),go[l]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){I=this.pathname||"";var x=this.search||"";this.path=I+x}return this.href=this.format(),this},Yi.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&no.isObject(this.query)&&Object.keys(this.query).length&&(o=yo.stringify(this.query));var a=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||go[t])&&!1!==i?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),t+i+(r=r.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+n},Yi.prototype.resolve=function(e){return this.resolveObject(Ji(e,!1,!0)).format()},Yi.prototype.resolveObject=function(e){if(no.isString(e)){var t=new Yi;t.parse(e,!1,!0),e=t}for(var r=new Yi,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];r[o]=this[o]}if(r.hash=e.hash,""===e.href)return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),s=0;s<a.length;s++){var u=a[s];"protocol"!==u&&(r[u]=e[u])}return go[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!go[e.protocol]){for(var l=Object.keys(e),c=0;c<l.length;c++){var f=l[c];r[f]=e[f]}return r.href=r.format(),r}if(r.protocol=e.protocol,e.host||vo[e.protocol])r.pathname=e.pathname;else{for(var h=(e.pathname||"").split("/");h.length&&!(e.host=h.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==h[0]&&h.unshift(""),h.length<2&&h.unshift(""),r.pathname=h.join("/")}if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var d=r.pathname||"",p=r.search||"";r.path=d+p}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),g=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=g||v||r.host&&e.pathname,b=y,m=r.pathname&&r.pathname.split("/")||[],w=(h=e.pathname&&e.pathname.split("/")||[],r.protocol&&!go[r.protocol]);if(w&&(r.hostname="",r.port=null,r.host&&(""===m[0]?m[0]=r.host:m.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===h[0]?h[0]=e.host:h.unshift(e.host)),e.host=null),y=y&&(""===h[0]||""===m[0])),g)r.host=e.host||""===e.host?e.host:r.host,r.hostname=e.hostname||""===e.hostname?e.hostname:r.hostname,r.search=e.search,r.query=e.query,m=h;else if(h.length)m||(m=[]),m.pop(),m=m.concat(h),r.search=e.search,r.query=e.query;else if(!no.isNullOrUndefined(e.search))return w&&(r.hostname=r.host=m.shift(),(A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=A.shift(),r.host=r.hostname=A.shift())),r.search=e.search,r.query=e.query,no.isNull(r.pathname)&&no.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!m.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var _=m.slice(-1)[0],k=(r.host||e.host||m.length>1)&&("."===_||".."===_)||""===_,E=0,S=m.length;S>=0;S--)"."===(_=m[S])?m.splice(S,1):".."===_?(m.splice(S,1),E++):E&&(m.splice(S,1),E--);if(!y&&!b)for(;E--;E)m.unshift("..");!y||""===m[0]||m[0]&&"/"===m[0].charAt(0)||m.unshift(""),k&&"/"!==m.join("/").substr(-1)&&m.push("");var A,I=""===m[0]||m[0]&&"/"===m[0].charAt(0);return w&&(r.hostname=r.host=I?"":m.length?m.shift():"",(A=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=A.shift(),r.host=r.hostname=A.shift())),(y=y||r.host&&m.length)&&!I&&m.unshift(""),m.length?r.pathname=m.join("/"):(r.pathname=null,r.path=null),no.isNull(r.pathname)&&no.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},Yi.prototype.parseHost=function(){var e=this.host,t=oo.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)},to.Url,to.format,to.resolve,to.resolveObject,bo={},mo=!1,wo=function(){var e=function(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))},t=function(e,t){for(var r,n="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(o!==s-1&&1!==a)if(o!==s-1&&2===a){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",i=0):i=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=s,a=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,s):n=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n};if(mo)return bo;mo=!0;var r=Ui,n={resolve:function(){for(var n,i="",o=!1,a=arguments.length-1;a>=-1&&!o;a--){var s;a>=0?s=arguments[a]:(void 0===n&&(n=r.cwd()),s=n),e(s),0!==s.length&&(i=s+"/"+i,o=47===s.charCodeAt(0))}return i=t(i,!o),o?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(r){if(e(r),0===r.length)return".";var n=47===r.charCodeAt(0),i=47===r.charCodeAt(r.length-1);return 0===(r=t(r,!n)).length&&!n&&(r="."),r.length>0&&i&&(r+="/"),n?"/"+r:r},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,r=0;r<arguments.length;++r){var i=arguments[r];e(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":n.normalize(t)},relative:function(t,r){if(e(t),e(r),t===r||(t=n.resolve(t))===(r=n.resolve(r)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var o=t.length,a=o-i,s=1;s<r.length&&47===r.charCodeAt(s);++s);for(var u=r.length-s,l=a<u?a:u,c=-1,f=0;f<=l;++f){if(f===l){if(u>l){if(47===r.charCodeAt(s+f))return r.slice(s+f+1);if(0===f)return r.slice(s+f)}else a>l&&(47===t.charCodeAt(i+f)?c=f:0===f&&(c=0));break}var h=t.charCodeAt(i+f);if(h!==r.charCodeAt(s+f))break;47===h&&(c=f)}var d="";for(f=i+c+1;f<=o;++f)(f===o||47===t.charCodeAt(f))&&(0===d.length?d+="..":d+="/..");return d.length>0?d+r.slice(s+c):(s+=c,47===r.charCodeAt(s)&&++s,r.slice(s))},_makeLong:function(e){return e},dirname:function(t){if(e(t),0===t.length)return".";for(var r=t.charCodeAt(0),n=47===r,i=-1,o=!0,a=t.length-1;a>=1;--a)if(47===(r=t.charCodeAt(a))){if(!o){i=a;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');e(t);var n,i=0,o=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=t.length){if(r.length===t.length&&r===t)return"";var s=r.length-1,u=-1;for(n=t.length-1;n>=0;--n){var l=t.charCodeAt(n);if(47===l){if(!a){i=n+1;break}}else-1===u&&(a=!1,u=n+1),s>=0&&(l===r.charCodeAt(s)?-1==--s&&(o=n):(s=-1,o=u))}return i===o?o=u:-1===o&&(o=t.length),t.slice(i,o)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){i=n+1;break}}else-1===o&&(a=!1,o=n+1);return-1===o?"":t.slice(i,o)},extname:function(t){e(t);for(var r=-1,n=0,i=-1,o=!0,a=0,s=t.length-1;s>=0;--s){var u=t.charCodeAt(s);if(47!==u)-1===i&&(o=!1,i=s+1),46===u?-1===r?r=s:1!==a&&(a=1):-1!==r&&(a=-1);else if(!o){n=s+1;break}}return-1===r||-1===i||0===a||1===a&&r===i-1&&r===n+1?"":t.slice(r,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+(void 0===e?"undefined":(0,q.default)(e)));return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(t){e(t);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return r;var n,i=t.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var a=-1,s=0,u=-1,l=!0,c=t.length-1,f=0;c>=n;--c)if(47!==(i=t.charCodeAt(c)))-1===u&&(l=!1,u=c+1),46===i?-1===a?a=c:1!==f&&(f=1):-1!==a&&(f=-1);else if(!l){s=c+1;break}return-1===a||-1===u||0===f||1===f&&a===u-1&&a===s+1?-1!==u&&(r.base=r.name=0===s&&o?t.slice(1,u):t.slice(s,u)):(0===s&&o?(r.name=t.slice(1,a),r.base=t.slice(1,u)):(r.name=t.slice(s,a),r.base=t.slice(s,u)),r.ext=t.slice(a,u)),s>0?r.dir=t.slice(0,s-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};return n.posix=n,bo=n}(),_o=("undefined"==typeof Deno?"undefined":(0,q.default)(Deno))<"u"?"windows"===Deno.build.os?"win32":Deno.build.os:void 0,to.URL=("undefined"==typeof URL?"undefined":(0,q.default)(URL))<"u"?URL:null,to.pathToFileURL=$i,to.fileURLToPath=Xi,to.Url,to.format,to.resolve,to.resolveObject,to.URL,ko=92,Eo=47,So=97,Ao=122,Io="win32"===_o,To=/\//g,Po=/%/g,Oo=/\\/g,Ro=/\n/g,Co=/\r/g,xo=/\t/g,Bo=("undefined"==typeof Deno?"undefined":(0,q.default)(Deno))<"u"?"windows"===Deno.build.os?"win32":Deno.build.os:void 0,to.URL=("undefined"==typeof URL?"undefined":(0,q.default)(URL))<"u"?URL:null,to.pathToFileURL=eo,to.fileURLToPath=Zi,Mo=to.Url,jo=to.format,Lo=to.resolve,Uo=to.resolveObject,No=to.parse,Do=to.URL,Wo=92,Fo=47,qo=97,Ho=122,Vo="win32"===Bo,zo=/\//g,Ko=/%/g,Qo=/\\/g,Go=/\n/g,Yo=/\r/g,Jo=/\t/g})),$o=$((function(e,t){te(),zt(),xt(),t.exports=function(){throw Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}})),Zo=$((function(e){var t=function(e,t){for(var r=Array(e.length),i=0;i<e.length;i++)"string"==typeof e[i].chunk?r[i]=n.Buffer.from(e[i].chunk,"utf8"):r[i]=e[i].chunk;this._write(n.Buffer.concat(r),"binary",t)};te(),zt(),xt(),Object.defineProperty(e,"__esModule",{value:!0}),e.BufferedDuplex=void 0,e.writev=t;var r=Kr(),n=(Vt(),ee(Bt)),i=function(e){"use strict";(0,j.default)(n,e);var r=(0,z.default)(n);function n(e,i,o){var a;return(0,k.default)(this,n),(a=r.call(this,{objectMode:!0})).proxy=i,a.socket=o,a.writeQueue=[],e.objectMode||(a._writev=t.bind((0,y.default)(a))),a.isSocketOpen=!1,a.proxy.on("data",(function(e){!a.destroyed&&a.readable&&a.push(e)})),(0,D.default)(a)}return(0,C.default)(n,[{key:"_read",value:function(e){this.proxy.read(e)}},{key:"_write",value:function(e,t,r){this.isSocketOpen?this.writeToProxy(e,t,r):this.writeQueue.push({chunk:e,encoding:t,cb:r})}},{key:"_final",value:function(e){this.writeQueue=[],this.proxy.end(e)}},{key:"_destroy",value:function(e,t){this.writeQueue=[],this.proxy.destroy(),t(e)}},{key:"socketReady",value:function(){this.emit("connect"),this.isSocketOpen=!0,this.processWriteQueue()}},{key:"writeToProxy",value:function(e,t,r){!1===this.proxy.write(e,t)?this.proxy.once("drain",r):r()}},{key:"processWriteQueue",value:function(){for(;this.writeQueue.length>0;){var e=this.writeQueue.shift(),t=e.chunk,r=e.encoding,n=e.cb;this.writeToProxy(t,r,n)}}}]),n}(r.Duplex);e.BufferedDuplex=i})),ea=$((function(e){var t=function(e,t){var r="".concat(e.protocol,"://").concat(e.hostname,":").concat(e.port).concat(e.path);return"function"==typeof e.transformWsUrl&&(r=e.transformWsUrl(r,e,t)),r},r=function(e){var t=e;return e.port||("wss"===e.protocol?t.port=443:t.port=80),e.path||(t.path="/"),e.wsOptions||(t.wsOptions={}),!u.default&&!e.forceNativeWebSocket&&"wss"===e.protocol&&f.forEach((function(r){({}).hasOwnProperty.call(e,r)&&!{}.hasOwnProperty.call(e.wsOptions,r)&&(t.wsOptions[r]=e[r])})),t};te(),zt(),xt();var n=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.streamBuilder=e.browserStreamBuilder=void 0;var i=(Vt(),ee(Bt)),o=n($o()),a=n(en()),s=Kr(),u=n(Kn()),l=Zo(),c=(0,a.default)("mqttjs:ws"),f=["rejectUnauthorized","ca","cert","key","pfx","passphrase"];e.streamBuilder=function(e,n){c("streamBuilder");var i=r(n);i.hostname=i.hostname||i.host||"localhost";var a=t(i,e),s=function(e,t,r){c("createWebSocket"),c("protocol: ".concat(r.protocolId," ").concat(r.protocolVersion));var n="MQIsdp"===r.protocolId&&3===r.protocolVersion?"mqttv3.1":"mqtt";return c("creating new Websocket for url: ".concat(t," and protocol: ").concat(n)),r.createWebsocket?r.createWebsocket(t,[n],r):new o.default(t,[n],r.wsOptions)}(0,a,i),u=o.default.createWebSocketStream(s,i.wsOptions);return u.url=a,s.on("close",(function(){u.destroy()})),u},e.browserStreamBuilder=function(e,n){var o=function(){c("WebSocket onOpen"),f instanceof l.BufferedDuplex&&f.socketReady()},a=function(e){c("WebSocket onClose",e),f.end(),f.destroy()},u=function(e){c("WebSocket onError",e);var t=Error("WebSocket error");t.event=e,f.destroy(t)};c("browserStreamBuilder");var f,h=function(e){var t=r(e);if(t.hostname||(t.hostname=t.host),!t.hostname){if(("undefined"==typeof document?"undefined":(0,q.default)(document))>"u")throw Error("Could not determine host. Specify host manually.");var n=new URL(document.URL);t.hostname=n.hostname,t.port||(t.port=Number(n.port))}return void 0===t.objectMode&&(t.objectMode=!(!0===t.binary||void 0===t.binary)),t}(n).browserBufferSize||524288,d=n.browserBufferTimeout||1e3,p=!n.objectMode,v=function(e,r){var n,i="MQIsdp"===r.protocolId&&3===r.protocolVersion?"mqttv3.1":"mqtt",o=t(r,e);return(n=r.createWebsocket?r.createWebsocket(o,[i],r):new WebSocket(o,[i])).binaryType="arraybuffer",n}(e,n),g=function(e,t,r){var n=new s.Transform({objectMode:e.objectMode});return n._write=function e(t,r,n){if(v.bufferedAmount>h)setTimeout(e,d,t,r,n);else{p&&"string"==typeof t&&(t=i.Buffer.from(t,"utf8"));try{v.send(t)}catch(e){return n(e)}n()}},n._flush=function(e){v.close(),e()},n}(n);n.objectMode||(g._writev=l.writev.bind(g)),g.on("close",(function(){v.close()}));var y=(0,q.default)(v.addEventListener)<"u";function b(e){return m.apply(this,arguments)}function m(){return m=(0,w.default)((function(e){var t,r,n,o,a;return(0,K.__generator)(this,(function(s){switch(s.label){case 0:return g&&!g.destroyed&&g.readable?(t=e.data)instanceof ArrayBuffer?(r=i.Buffer.from(t),[3,5]):[3,1]:[2];case 1:return t instanceof Blob?(a=(o=i.Buffer).from,[4,new Response(t).arrayBuffer()]):[3,3];case 2:return n=a.apply(o,[s.sent()]),[3,4];case 3:n=i.Buffer.from(t,"utf8"),s.label=4;case 4:r=n,s.label=5;case 5:return t=r,g.push(t),[2]}}))})),m.apply(this,arguments)}return v.readyState===v.OPEN?(f=g).socket=v:(f=new l.BufferedDuplex(n,g,v),y?v.addEventListener("open",o):v.onopen=o),y?(v.addEventListener("close",a),v.addEventListener("error",u),v.addEventListener("message",b)):(v.onclose=a,v.onerror=u,v.onmessage=b),f}})),ta={};function ra(){throw Error("Node.js net module is not supported by JSPM core outside of Node.js")}Z(ta,{Server:function(){return ra},Socket:function(){return ra},Stream:function(){return ra},_createServerHandle:function(){return ra},_normalizeArgs:function(){return ra},_setSimultaneousAccepts:function(){return ra},connect:function(){return ra},createConnection:function(){return ra},createServer:function(){return ra},default:function(){return na},isIP:function(){return ra},isIPv4:function(){return ra},isIPv6:function(){return ra}});var na,ia=X((function(){te(),zt(),xt(),na={_createServerHandle:ra,_normalizeArgs:ra,_setSimultaneousAccepts:ra,connect:ra,createConnection:ra,createServer:ra,isIP:ra,isIPv4:ra,isIPv6:ra,Server:ra,Socket:ra,Stream:ra}})),oa=$((function(e,t){te(),zt(),xt(),t.exports={}})),aa=$((function(e){te(),zt(),xt();var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0});var r=t((ia(),ee(ta))),n=t(en()),i=t(oa()),o=(0,n.default)("mqttjs:tcp");e.default=function(e,t){if(t.port=t.port||1883,t.hostname=t.hostname||t.host||"localhost",t.socksProxy)return(0,i.default)(t.hostname,t.port,t.socksProxy,{timeout:t.socksTimeout});var n=t.port,a=t.path,s=t.hostname;return o("port %d and host %s",n,s),r.default.createConnection({port:n,host:s,path:a})}})),sa={};Z(sa,{default:function(){return ua}});var ua,la,ca,fa,ha,da,pa,va,ga,ya,ba,ma=X((function(){te(),zt(),xt(),ua={}})),wa=$((function(e){te(),zt(),xt();var t=e&&e.__rest||function(e,t){var r={};for(var n in e)({}).hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&{}.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r},r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0});var n=r((ma(),ee(sa))),i=r((ia(),ee(ta))),o=r(en()),a=r(oa()),s=(0,o.default)("mqttjs:tls");e.default=function(e,r){var o=function(t){r.rejectUnauthorized&&e.emit("error",t),u.end()};r.port=r.port||8883,r.host=r.hostname||r.host||"localhost",0===i.default.isIP(r.host)&&(r.servername=r.host),r.rejectUnauthorized=!1!==r.rejectUnauthorized,delete r.path,s("port %d host %s rejectUnauthorized %b",r.port,r.host,r.rejectUnauthorized);var u=function(e){var r=e.host,i=e.port,o=e.socksProxy,s=t(e,["host","port","socksProxy"]);return n.default.connect(o?Object.assign(Object.assign({},s),{socket:(0,a.default)(r,i,o,{timeout:e.socksTimeout})}):e)}(r);return u.on("secureConnect",(function(){r.rejectUnauthorized&&!u.authorized?u.emit("error",Error("TLS not authorized")):u.removeListener("error",o)})),u.on("error",o),u}})),_a=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"__esModule",{value:!0});var t,r,n,i=(Vt(),ee(Bt)),o=Kr(),a=Zo();e.default=function(e,s){if(s.hostname=s.hostname||s.host,!s.hostname)throw Error("Could not determine host. Specify host manually.");var u="MQIsdp"===s.protocolId&&3===s.protocolVersion?"mqttv3.1":"mqtt";!function(e){e.hostname||(e.hostname="localhost"),e.path||(e.path="/"),e.wsOptions||(e.wsOptions={})}(s);var l,c=function(e,t){var r="wxs"===e.protocol?"wss":"ws",n="".concat(r,"://").concat(e.hostname).concat(e.path);return e.port&&80!==e.port&&443!==e.port&&(n="".concat(r,"://").concat(e.hostname,":").concat(e.port).concat(e.path)),"function"==typeof e.transformWsUrl&&(n=e.transformWsUrl(n,e,t)),n}(s,e);t=wx.connectSocket({url:c,protocols:[u]}),(l=new o.Transform)._write=function(e,r,n){t.send({data:e.buffer,success:function(){n()},fail:function(e){n(Error(e))}})},l._flush=function(e){t.close({success:function(){e()}})},r=l,(n=new a.BufferedDuplex(s,r,t))._destroy=function(e,r){t.close({success:function(){r&&r(e)}})};var f=n.destroy;return n.destroy=function(e,r){return n.destroy=f,setTimeout((function(){t.close({fail:function(){n._destroy(e,r)}})}),0),n},t.onOpen((function(){n.socketReady()})),t.onMessage((function(e){var t=e.data;t=t instanceof ArrayBuffer?i.Buffer.from(t):i.Buffer.from(t,"utf8"),r.push(t)})),t.onClose((function(){n.emit("close"),n.end(),n.destroy()})),t.onError((function(e){var t=Error(e.errMsg);n.destroy(t)})),n}})),ka=$((function(e){te(),zt(),xt(),Object.defineProperty(e,"__esModule",{value:!0});var t,r,n,i=(Vt(),ee(Bt)),o=Kr(),a=Zo(),s=!1;e.default=function(e,u){if(u.hostname=u.hostname||u.host,!u.hostname)throw Error("Could not determine host. Specify host manually.");var l="MQIsdp"===u.protocolId&&3===u.protocolVersion?"mqttv3.1":"mqtt";!function(e){e.hostname||(e.hostname="localhost"),e.path||(e.path="/"),e.wsOptions||(e.wsOptions={})}(u);var c,f=function(e,t){var r="alis"===e.protocol?"wss":"ws",n="".concat(r,"://").concat(e.hostname).concat(e.path);return e.port&&80!==e.port&&443!==e.port&&(n="".concat(r,"://").concat(e.hostname,":").concat(e.port).concat(e.path)),"function"==typeof e.transformWsUrl&&(n=e.transformWsUrl(n,e,t)),n}(u,e);return(t=u.my).connectSocket({url:f,protocols:l}),(c=new o.Transform)._write=function(e,r,n){t.sendSocketMessage({data:e.buffer,success:function(){n()},fail:function(){n(Error())}})},c._flush=function(e){t.closeSocket({success:function(){e()}})},r=c,n=new a.BufferedDuplex(u,r,t),s||(s=!0,t.onSocketOpen((function(){n.socketReady()})),t.onSocketMessage((function(e){if("string"==typeof e.data){var t=i.Buffer.from(e.data,"base64");r.push(t)}else{var n=new FileReader;n.addEventListener("load",(function(){var e=n.result;e=e instanceof ArrayBuffer?i.Buffer.from(e):i.Buffer.from(e,"utf8"),r.push(e)})),n.readAsArrayBuffer(e.data)}})),t.onSocketClose((function(){n.end(),n.destroy()})),t.onSocketError((function(e){n.destroy(e)}))),n}})),Ea=$((function(e){var t=function(e,t){var r,n,l;if(s("connecting to an MQTT broker..."),"object"==typeof e&&!t&&(t=e,e=""),t=t||{},e&&"string"==typeof e){var c=i.default.parse(e,!0),f={};if(null!=c.port&&(f.port=Number(c.port)),f.host=c.hostname,f.query=c.query,f.auth=c.auth,f.protocol=c.protocol,f.path=c.path,!(t=Object.assign(Object.assign({},f),t)).protocol)throw Error("Missing protocol");t.protocol=t.protocol.replace(/:$/,"")}if(t.unixSocket=t.unixSocket||(null===(r=t.protocol)||void 0===r?void 0:r.includes("+unix")),t.unixSocket?t.protocol=t.protocol.replace("+unix",""):null!==(n=t.protocol)&&void 0!==n&&n.startsWith("ws")||null!==(l=t.protocol)&&void 0!==l&&l.startsWith("wx")||delete t.path,function(e){var t;e.auth&&((t=e.auth.match(/^(.+):(.+)$/))?(e.username=t[1],e.password=t[2]):e.username=e.auth)}(t),t.query&&"string"==typeof t.query.clientId&&(t.clientId=t.query.clientId),a.default||t.unixSocket?t.socksProxy=void 0:void 0===t.socksProxy&&(void 0===re?"undefined":(0,q.default)(re))<"u"&&(t.socksProxy=re.env.MQTTJS_SOCKS_PROXY),t.cert&&t.key){if(!t.protocol)throw Error("Missing secure protocol key");if(-1===["mqtts","wss","wxs","alis"].indexOf(t.protocol))switch(t.protocol){case"mqtt":t.protocol="mqtts";break;case"ws":t.protocol="wss";break;case"wx":t.protocol="wxs";break;case"ali":t.protocol="alis";break;default:throw Error('Unknown protocol for secure connection: "'.concat(t.protocol,'"!'))}}if(u||(u={},a.default||t.forceNativeWebSocket?(u.ws=ea().browserStreamBuilder,u.wss=ea().browserStreamBuilder,u.wx=_a().default,u.wxs=_a().default,u.ali=ka().default,u.alis=ka().default):(u.ws=ea().streamBuilder,u.wss=ea().streamBuilder,u.mqtt=aa().default,u.tcp=aa().default,u.ssl=wa().default,u.tls=u.ssl,u.mqtts=wa().default)),!u[t.protocol]){var h=-1!==["mqtts","wss"].indexOf(t.protocol);t.protocol=["mqtt","mqtts","ws","wss","wx","wxs","ali","alis"].filter((function(e,t){return(!h||t%2!=0)&&"function"==typeof u[e]}))[0]}if(!1===t.clean&&!t.clientId)throw Error("Missing clientId for unclean clients");t.protocol&&(t.defaultProtocol=t.protocol);var d=new o.default((function(e){return t.servers&&((!e._reconnectCount||e._reconnectCount===t.servers.length)&&(e._reconnectCount=0),t.host=t.servers[e._reconnectCount].host,t.port=t.servers[e._reconnectCount].port,t.protocol=t.servers[e._reconnectCount].protocol?t.servers[e._reconnectCount].protocol:t.defaultProtocol,t.hostname=t.host,e._reconnectCount++),s("calling streambuilder for",t.protocol),u[t.protocol](e,t)}),t);return d.on("error",(function(){})),d};te(),zt(),xt();var r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.connectAsync=function(e,r){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return new Promise((function(i,o){var a=function(){Object.keys(u).forEach((function(e){s.off(e,u[e])}))},s=t(e,r),u={connect:function(){a(),i(s)},end:function(){a(),i(s)},error:function(e){a(),s.end(),o(e)}};!1===n&&(u.close=function(){u.error(Error("Couldn't connect to server"))}),Object.keys(u).forEach((function(e){s.on(e,u[e])}))}))};var n=r(en()),i=r((Xo(),ee(Gi))),o=r($n()),a=r(Kn());"function"!=typeof(null==re?void 0:re.nextTick)&&(re.nextTick=setImmediate);var s=(0,n.default)("mqttjs"),u=null;e.default=t})),Sa=$((function(e){te(),zt(),xt();var t,r=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),n=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=e&&e.__importStar||(t=function(e){return(t=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)({}).hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)},function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var o=t(e),a=0;a<o.length;a++)"default"!==o[a]&&r(i,e,o[a]);return n(i,e),i}),o=e&&e.__exportStar||function(e,t){for(var n in e)"default"!==n&&!{}.hasOwnProperty.call(t,n)&&r(t,e,n)},a=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.ReasonCodes=e.KeepaliveManager=e.UniqueMessageIdProvider=e.DefaultMessageIdProvider=e.Store=e.MqttClient=e.connectAsync=e.connect=e.Client=void 0;var s=a($n());e.MqttClient=s.default;var u=a(un());e.DefaultMessageIdProvider=u.default;var l=a(Zn());e.UniqueMessageIdProvider=l.default;var c=a(hn());e.Store=c.default;var f=i(Ea());e.connect=f.default,Object.defineProperty(e,"connectAsync",{enumerable:!0,get:function(){return f.connectAsync}});var h=a(Xn());e.KeepaliveManager=h.default,e.Client=s.default,o($n(),e),o(vn(),e);var d=gn();Object.defineProperty(e,"ReasonCodes",{enumerable:!0,get:function(){return d.ReasonCodes}})})),Aa=$((function(e){te(),zt(),xt();var t,r=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),n=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=e&&e.__importStar||(t=function(e){return(t=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)({}).hasOwnProperty.call(e,r)&&(t[t.length]=r);return t})(e)},function(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var o=t(e),a=0;a<o.length;a++)"default"!==o[a]&&r(i,e,o[a]);return n(i,e),i}),o=e&&e.__exportStar||function(e,t){for(var n in e)"default"!==n&&!{}.hasOwnProperty.call(t,n)&&r(t,e,n)};Object.defineProperty(e,"__esModule",{value:!0});var a=i(Sa());e.default=a,o(Sa(),e)})),Ia=Aa(),Ta=Math.floor,Pa=Math.random,Oa="Trystero",Ra=function(e,t){return Array(e).fill().map(t)},Ca=Ra(20,(function(){return"0123456789AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz"[Ta(62*Pa())]})).join(""),xa=Promise.all.bind(Promise),Ba="undefined"!=typeof window,Ma=Object.entries,ja=Object.fromEntries,La=Object.keys,Ua=function(){},Na=function(e){return Error("".concat(Oa,": ").concat(e))},Da=new TextEncoder,Wa=new TextDecoder,Fa=function(e){return Da.encode(e)},qa=function(e){return Wa.decode(e)},Ha=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.join("@")},Va=JSON.stringify,za=JSON.parse,Ka="AES-GCM",Qa={},Ga=(la=(0,w.default)((function(e){var t,r,n;return(0,K.__generator)(this,(function(i){switch(i.label){case 0:return(t=Qa[e])?[3,2]:(r=Array.from,n=Uint8Array.bind,[4,crypto.subtle.digest("SHA-1",Fa(e))]);case 1:t=Qa[e]=r.apply(Array,[new(n.apply(Uint8Array,[void 0,i.sent()]))]).map((function(e){return e.toString(36)})).join(""),i.label=2;case 2:return[2,t]}}))})),function(e){return la.apply(this,arguments)}),Ya=function(){var e=(0,w.default)((function(e,t){var r,n,i,o,a,s;return(0,K.__generator)(this,(function(u){switch(u.label){case 0:return r=crypto.getRandomValues(new Uint8Array(16)),i=r.join(",")+"$",a=(o=crypto.subtle).encrypt,s=[{name:Ka,iv:r}],[4,e];case 1:return[4,a.apply(o,s.concat([u.sent(),Fa(t)]))];case 2:return[2,i+(n=u.sent(),btoa(String.fromCharCode.apply(null,new Uint8Array(n))))]}}))}));return function(t,r){return e.apply(this,arguments)}}(),Ja=function(){var e=(0,w.default)((function(e,t){var r,n,i,o,a,s;return(0,K.__generator)(this,(function(u){switch(u.label){case 0:return r=(0,W.default)(t.split("$"),2),n=r[0],i=r[1],a=(o=crypto.subtle).decrypt,s=[{name:Ka,iv:new Uint8Array(n.split(","))}],[4,e];case 1:return[4,a.apply(o,s.concat([u.sent(),function(e){var t=atob(e);return new Uint8Array(t.length).map((function(e,r){return t.charCodeAt(r)})).buffer}(i)]))];case 2:return[2,qa.apply(void 0,[u.sent()])]}}))}));return function(t,r){return e.apply(this,arguments)}}(),Xa="icegatheringstatechange",$a="offer",Za=function(e,t){var r=t.rtcConfig,n=t.rtcPolyfill,i=t.turnConfig,o=new(n||RTCPeerConnection)((0,L.default)({iceServers:es.concat(i||[])},r)),a={},s=!1,u=!1,l=null,c=function(e){e.binaryType="arraybuffer",e.bufferedAmountLowThreshold=65535,e.onmessage=function(e){var t;return null===(t=a.data)||void 0===t?void 0:t.call(a,e.data)},e.onopen=function(){var e;return null===(e=a.connect)||void 0===e?void 0:e.call(a)},e.onclose=function(){var e;return null===(e=a.close)||void 0===e?void 0:e.call(a)},e.onerror=function(e){var t;return null===(t=a.error)||void 0===t?void 0:t.call(a,e)}},f=function(e){return Promise.race([new Promise((function(t){var r=function(){"complete"===e.iceGatheringState&&(e.removeEventListener(Xa,r),t())};e.addEventListener(Xa,r),r()})),new Promise((function(e){return setTimeout(e,5e3)}))]).then((function(){return{type:e.localDescription.type,sdp:e.localDescription.sdp.replace(/a=ice-options:trickle\s\n/g,"")}}))};return e?(l=o.createDataChannel("data"),c(l)):o.ondatachannel=function(e){var t=e.channel;l=t,c(t)},o.onnegotiationneeded=(0,w.default)((function(){var e,t,r,n;return(0,K.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,3,4,5]),s=!0,[4,o.setLocalDescription()];case 1:return i.sent(),[4,f(o)];case 2:return t=i.sent(),null===(e=a.signal)||void 0===e||e.call(a,t),[3,5];case 3:return r=i.sent(),null===(n=a.error)||void 0===n||n.call(a,r),[3,5];case 4:return s=!1,[7];case 5:return[2]}}))})),o.onconnectionstatechange=function(){var e;["disconnected","failed","closed"].includes(o.connectionState)&&(null===(e=a.close)||void 0===e||e.call(a))},o.ontrack=function(e){var t,r;null===(t=a.track)||void 0===t||t.call(a,e.track,e.streams[0]),null===(r=a.stream)||void 0===r||r.call(a,e.streams[0])},o.onremovestream=function(e){var t;return null===(t=a.stream)||void 0===t?void 0:t.call(a,e.stream)},e&&(o.canTrickleIceCandidates||o.onnegotiationneeded()),{created:Date.now(),connection:o,get channel(){return l},get isDead(){return"closed"===o.connectionState},signal:function(t){return(0,w.default)((function(){var r,n,i,c,h;return(0,K.__generator)(this,(function(d){switch(d.label){case 0:if("open"===(null==l?void 0:l.readyState)&&!(null===(r=t.sdp)||void 0===r?void 0:r.includes("a=rtpmap")))return[3,14];d.label=1;case 1:return d.trys.push([1,13,,14]),t.type!==$a?[3,8]:s||"stable"!==o.signalingState&&!u?e?[2]:[4,xa([o.setLocalDescription({type:"rollback"}),o.setRemoteDescription(t)])]:[3,3];case 2:return d.sent(),[3,5];case 3:return[4,o.setRemoteDescription(t)];case 4:d.sent(),d.label=5;case 5:return[4,o.setLocalDescription()];case 6:return d.sent(),[4,f(o)];case 7:return i=d.sent(),[2,(null===(n=a.signal)||void 0===n||n.call(a,i),i)];case 8:if("answer"!==t.type)return[3,12];u=!0,d.label=9;case 9:return d.trys.push([9,,11,12]),[4,o.setRemoteDescription(t)];case 10:return d.sent(),[3,12];case 11:return u=!1,[7];case 12:return[3,14];case 13:return c=d.sent(),null===(h=a.error)||void 0===h||h.call(a,c),[3,14];case 14:return[2]}}))}))()},sendData:function(e){return l.send(e)},destroy:function(){null==l||l.close(),o.close(),s=!1,u=!1},setHandlers:function(e){return Object.assign(a,e)},offerPromise:e?new Promise((function(e){return a.signal=function(t){t.type===$a&&e(t)}})):Promise.resolve(),addStream:function(e){return e.getTracks().forEach((function(t){return o.addTrack(t,e)}))},removeStream:function(e){return o.getSenders().filter((function(t){return e.getTracks().includes(t.track)})).forEach((function(e){return o.removeTrack(e)}))},addTrack:function(e,t){return o.addTrack(e,t)},removeTrack:function(e){var t=o.getSenders().find((function(t){return t.track===e}));t&&o.removeTrack(t)},replaceTrack:function(e,t){var r=o.getSenders().find((function(t){return t.track===e}));if(r)return r.replaceTrack(t)}}},es=(0,F.default)(Ra(3,(function(e,t){return"stun:stun".concat(t||"",".l.google.com:19302")}))).concat(["stun:stun.cloudflare.com:3478"]).map((function(e){return{urls:e}})),ts=Object.getPrototypeOf(Uint8Array),rs=16369,ns=255,is="bufferedamountlow",os=function(e){return"@_"+e},as={},ss={},us=function(e){var t=e.options;return t.host+t.path},ls=(ca={init:function(e){return function(e,t,r){return(e.relayUrls||t).slice(0,e.relayUrls?e.relayUrls.length:e.relayRedundancy||4)}(e,cs).map((function(e){var t=Ia.connect(e),r=us(t);return as[r]=t.stream.socket,ss[r]={},t.on("message",(function(e,t){var n,i;return null===(i=(n=ss[r])[e])||void 0===i?void 0:i.call(n,e,t.toString())})).on("error",(function(e){return console.error(e)})),new Promise((function(e){return t.on("connect",(function(){return e(t)}))}))}))},subscribe:function(e,t,r,n){var i=us(e);return ss[i][t]=ss[i][r]=function(t,r){return n(t,r,e.publish.bind(e))},e.subscribe(t),e.subscribe(r),function(){e.unsubscribe(t),e.unsubscribe(r),delete ss[i][t],delete ss[i][r]}},announce:function(e,t){return e.publish(t,Va({peerId:Ca}))}},pa=ca.init,va=ca.subscribe,ga=ca.announce,ya={},ba=!1,function(e,t,r){var n,i,y=e.appId;if(null===(i=ya[y])||void 0===i?void 0:i[t])return ya[y][t];var b={},m={},_=Ha(Oa,y,t),k=Ga(_),E=Ga(Ha(_,Ca)),S=function(){var e=(0,w.default)((function(e,t,r){var n,i,o;return(0,K.__generator)(this,(function(a){switch(a.label){case 0:return i=(n=crypto.subtle).importKey,o=["raw"],[4,crypto.subtle.digest({name:"SHA-256"},Fa("".concat(e,":").concat(t,":").concat(r)))];case 1:return[2,i.apply(n,o.concat([a.sent(),{name:Ka},!1,["encrypt","decrypt"]]))]}}))}));return function(t,r,n){return e.apply(this,arguments)}}()(e.password||"",y,t),A=function(e){return function(){var t=(0,w.default)((function(t){var r;return(0,K.__generator)(this,(function(n){switch(n.label){case 0:return r={type:t.type},[4,e(S,t.sdp)];case 1:return[2,(r.sdp=n.sent(),r)]}}))}));return function(e){return t.apply(this,arguments)}}()},I=A(Ja),T=A(Ya),P=function(){return Za(!0,e)},O=function(e,t,r){var n;m[t]?m[t]!==e&&e.destroy():(m[t]=e,H(e,t),null===(n=b[t])||void 0===n||n.forEach((function(e,t){t!==r&&e.destroy()})),delete b[t])},R=function(e,t){m[t]===e&&delete m[t]},C=function(e){return(n=ha).push.apply(n,(0,F.default)(Ra(e,P))),xa(ha.splice(0,e).map((function(e){return e.offerPromise.then(T).then((function(t){return{peer:e,offer:t}}))})))},x=function(n,i){return null==r?void 0:r({error:"incorrect password (".concat(e.password,") when decrypting ").concat(i),appId:y,peerId:n,roomId:t})},B=function(t){return function(){var r=(0,w.default)((function(r,n,i){var s,u,l,c,f,h,d,p,v,g,y,w,S,A,P,B,M,L,U,N,D,F,q,H,V,z;return(0,K.__generator)(this,(function(K){switch(K.label){case 0:return[4,xa([k,E])];case 1:if(s=W.default.apply(void 0,[K.sent(),2]),u=s[0],l=s[1],r!==u&&r!==l)return[2];if(c="string"==typeof n?za(n):n,f=c.peerId,h=c.offer,d=c.answer,p=c.peer,f===Ca||m[f])return[3,16];if(f&&!h&&!d)return[3,14];if(!h)return[3,8];if((null===(v=b[f])||void 0===v?void 0:v[t])&&Ca>f)return[2];(g=Za(!1,e)).setHandlers({connect:function(){return O(g,f,t)},close:function(){return R(g,f)}}),K.label=2;case 2:return K.trys.push([2,4,,5]),[4,I(h)];case 3:return y=K.sent(),[3,5];case 4:return K.sent(),[2,void x(f,"offer")];case 5:return g.isDead?[2]:[4,xa([Ga(Ha(_,f)),g.signal(y)])];case 6:return w=W.default.apply(void 0,[K.sent(),2]),S=w[0],A=w[1],P=[S],B={peerId:Ca},[4,T(A)];case 7:return i.apply(void 0,P.concat([Va.apply(void 0,[(B.answer=K.sent(),B)])])),[3,13];case 8:if(!d)return[3,13];K.label=9;case 9:return K.trys.push([9,11,,12]),[4,I(d)];case 10:return M=K.sent(),[3,12];case 11:return K.sent(),[2,void x(f,"answer")];case 12:p?(p.setHandlers({connect:function(){return O(p,f,t)},close:function(){return R(p,f)}}),p.signal(M)):(U=null===(L=b[f])||void 0===L?void 0:L[t])&&!U.isDead&&U.signal(M),K.label=13;case 13:return[3,16];case 14:return(null===(N=b[f])||void 0===N?void 0:N[t])?[2]:[4,xa([C(1),Ga(Ha(_,f))])];case 15:D=W.default.apply(void 0,[K.sent(),2]),F=(0,W.default)(D[0],1),q=F[0],H=q.peer,V=q.offer,z=D[1],(o=b)[a=f]||(o[a]=[]),b[f][t]=H,setTimeout((function(){return function(e,t){var r;if(!m[e]){var n=null===(r=b[e])||void 0===r?void 0:r[t];n&&(delete b[e][t],n.destroy())}}(f,t)}),.9*j[t]),H.setHandlers({connect:function(){return O(H,f,t)},close:function(){return R(H,f)}}),i(z,Va({peerId:Ca,offer:V})),K.label=16;case 16:return[2]}}))}));return function(e,t,n){return r.apply(this,arguments)}}()};if(!e)throw Na("requires a config map as the first argument");if(!y&&!e.firebaseApp)throw Na("config map is missing appId field");if(!t)throw Na("roomId argument required");if(!ba){var M=pa(e);ha=Ra(20,P),fa=Array.isArray(M)?M:[M],ba=!0,da=setInterval((function(){return ha=ha.filter((function(e){var t=Date.now()-e.created<57333;return t||e.destroy(),t}))}),59052.99)}var j=fa.map((function(){return 5333})),N=[],D=fa.map(function(){var e=(0,w.default)((function(e,t){var r;return(0,K.__generator)(this,(function(n){switch(n.label){case 0:return[4,e];case 1:return r=[n.sent()],[4,k];case 2:return r=r.concat(n.sent()),[4,E];case 3:return[2,va.apply(void 0,r.concat([n.sent(),B(t),C]))]}}))}));return function(t,r){return e.apply(this,arguments)}}());xa([k,E]).then((function(e){var t=(0,W.default)(e,2),r=t[0],n=t[1],i=function(){var e=(0,w.default)((function(e,t){var o;return(0,K.__generator)(this,(function(a){switch(a.label){case 0:return[4,ga(e,r,n)];case 1:return"number"==typeof(o=a.sent())&&(j[t]=o),N[t]=setTimeout((function(){return i(e,t)}),j[t]),[2]}}))}));return function(t,r){return e.apply(this,arguments)}}();D.forEach(function(){var e=(0,w.default)((function(e,t){return(0,K.__generator)(this,(function(r){switch(r.label){case 0:return[4,e];case 1:return r.sent(),[4,fa[t]];case 2:return i.apply(void 0,[r.sent(),t]),[2]}}))}));return function(t,r){return e.apply(this,arguments)}}())}));var H=Ua;return(s=ya)[u=y]||(s[u]={}),ya[y][t]=function(e,t,r){var n={},i={},o={},a={},s={},u={},y={},b={onPeerJoin:Ua,onPeerLeave:Ua,onPeerStream:Ua,onPeerTrack:Ua},m=function(e,t){return(e?Array.isArray(e)?e:[e]:La(n)).flatMap((function(e){var r=n[e];return r?t(e,r):(console.warn("".concat(Oa,": no peer with id ").concat(e," found")),[])}))},_=function(e){n[e]&&(delete n[e],delete a[e],delete s[e],b.onPeerLeave(e),t(e))},k=function(e){if(i[e])return o[e];if(!e)throw Na("action type argument is required");var t=Fa(e);if(t.byteLength>12)throw Na('action type string "'.concat(e,'" (').concat(t.byteLength,"b) exceeds byte limit (12). Hint: choose a shorter name."));var r=new Uint8Array(12);r.set(t);var a=0;return i[e]={onComplete:Ua,onProgress:Ua,setOnComplete:function(t){return i[e]=(0,U.default)((0,L.default)({},i[e]),{onComplete:t})},setOnProgress:function(t){return i[e]=(0,U.default)((0,L.default)({},i[e]),{onProgress:t})},send:function(e,t,i,o){return(0,w.default)((function(){var s,u,l,c,f,h,d,p,v,g,y;return(0,K.__generator)(this,(function(b){switch(b.label){case 0:if(i&&"object"!=typeof i)throw Na("action meta argument must be an object");if("undefined"===(s=void 0===e?"undefined":(0,q.default)(e)))throw Na("action data cannot be undefined");if(u="string"!==s,l=e instanceof Blob,c=l||e instanceof ArrayBuffer||e instanceof ts,i&&!c)throw Na("action meta argument can only be used with binary data");return c?(g=Uint8Array.bind,l?[4,e.arrayBuffer()]:[3,2]):[3,4];case 1:return y=b.sent(),[3,3];case 2:y=e,b.label=3;case 3:return v=new(g.apply(Uint8Array,[void 0,y])),[3,5];case 4:v=Fa(u?Va(e):e),b.label=5;case 5:return f=v,h=i?Fa(Va(i)):null,d=Math.ceil(f.byteLength/rs)+(i?1:0)||1,p=Ra(d,(function(e,t){var n=t===d-1,o=i&&0===t,s=new Uint8Array(15+(o?h.byteLength:n?f.byteLength-rs*(d-(i?2:1)):rs));return s.set(r),s.set([a],12),s.set([n|o<<1|c<<2|u<<3],13),s.set([Math.round((t+1)/d*ns)],14),s.set(i?o?h:f.subarray((t-1)*rs,t*rs):f.subarray(t*rs,(t+1)*rs),15),s})),[2,(a=a+1&ns,xa(m(t,function(){var e=(0,w.default)((function(e,t){var r,a,s;return(0,K.__generator)(this,(function(u){switch(u.label){case 0:r=t.channel,a=0,u.label=1;case 1:return a<d?(s=p[a],r.bufferedAmount>r.bufferedAmountLowThreshold?[4,new Promise((function(e){var t=function(){r.removeEventListener(is,t),e()};r.addEventListener(is,t)}))]:[3,3]):[3,5];case 2:u.sent(),u.label=3;case 3:if(!n[e])return[3,5];t.sendData(s),a++,null==o||o(s[14]/ns,e,i),u.label=4;case 4:return[3,1];case 5:return[2]}}))}));return function(t,r){return e.apply(this,arguments)}}())))]}}))}))()}},(l=o)[c=e]||(l[c]=[i[e].send,i[e].setOnComplete,i[e].setOnProgress])},E=function(e,t){var r=new Uint8Array(t),n=qa(r.subarray(0,12)).replaceAll("\0",""),o=(0,W.default)(r.subarray(12,13),1)[0],s=(0,W.default)(r.subarray(13,14),1)[0],u=(0,W.default)(r.subarray(14,15),1)[0],l=r.subarray(15),c=!!(1&s),y=!!(2&s),b=!!(4&s),m=!!(8&s);if(i[n]){(f=a)[h=e]||(f[h]={}),(d=a[e])[p=n]||(d[p]={});var w=(v=a[e][n])[g=o]||(v[g]={chunks:[]});if(y?w.meta=za(qa(l)):w.chunks.push(l),i[n].onProgress(u/ns,e,w.meta),c){var _=new Uint8Array(w.chunks.reduce((function(e,t){return e+t.byteLength}),0));if(w.chunks.reduce((function(e,t){return _.set(t,e),e+t.byteLength}),0),delete a[e][n][o],b)i[n].onComplete(_,e,w.meta);else{var k=qa(_);i[n].onComplete(m?za(k):k,e)}}}else console.warn("".concat(Oa,": received message with unregistered type (").concat(n,")"))},S=function(){var e=(0,w.default)((function(){return(0,K.__generator)(this,(function(e){switch(e.label){case 0:return[4,Q("")];case 1:return e.sent(),[4,new Promise((function(e){return setTimeout(e,99)}))];case 2:return e.sent(),Ma(n).forEach((function(e){var t=(0,W.default)(e,2),r=t[0];t[1].destroy(),delete n[r]})),r(),[2]}}))}));return function(){return e.apply(this,arguments)}}(),A=(0,W.default)(k(os("ping")),2),I=A[0],T=A[1],P=(0,W.default)(k(os("pong")),2),O=P[0],R=P[1],C=(0,W.default)(k(os("signal")),2),x=C[0],B=C[1],M=(0,W.default)(k(os("stream")),2),j=M[0],N=M[1],D=(0,W.default)(k(os("track")),2),F=D[0],V=D[1],z=(0,W.default)(k(os("leave")),2),Q=z[0],G=z[1];return H=function(e,t){var r;n[t]||(n[t]=e,e.setHandlers({data:function(e){return E(t,e)},stream:function(e){b.onPeerStream(e,t,u[t]),delete u[t]},track:function(e,r){b.onPeerTrack(e,r,t,y[t]),delete y[t]},signal:function(e){return x(e,t)},close:function(){return _(t)},error:function(e){console.error(e),_(t)}}),b.onPeerJoin(t),null===(r=e.drainEarlyData)||void 0===r||r.call(e,(function(e){return E(t,e)})))},T((function(e,t){return O("",t)})),R((function(e,t){var r;null===(r=s[t])||void 0===r||r.call(s),delete s[t]})),B((function(e,t){var r;return null===(r=n[t])||void 0===r?void 0:r.signal(e)})),N((function(e,t){return u[t]=e})),V((function(e,t){return y[t]=e})),G((function(e,t){return _(t)})),Ba&&addEventListener("beforeunload",S),{makeAction:k,leave:S,ping:function(e){return(0,w.default)((function(){var t;return(0,K.__generator)(this,(function(r){switch(r.label){case 0:if(!e)throw Na("ping() must be called with target peer ID");return t=Date.now(),I("",e),[4,new Promise((function(t){return s[e]=t}))];case 1:return[2,(r.sent(),Date.now()-t)]}}))}))()},getPeers:function(){return ja(Ma(n).map((function(e){var t=(0,W.default)(e,2);return[t[0],t[1].connection]})))},addStream:function(e,t,r){return m(t,function(){var t=(0,w.default)((function(t,n){return(0,K.__generator)(this,(function(i){switch(i.label){case 0:return r?[4,j(r,t)]:[3,2];case 1:i.sent(),i.label=2;case 2:return n.addStream(e),[2]}}))}));return function(e,r){return t.apply(this,arguments)}}())},removeStream:function(e,t){return m(t,(function(t,r){return r.removeStream(e)}))},addTrack:function(e,t,r,n){return m(r,function(){var r=(0,w.default)((function(r,i){return(0,K.__generator)(this,(function(o){switch(o.label){case 0:return n?[4,F(n,r)]:[3,2];case 1:o.sent(),o.label=2;case 2:return i.addTrack(e,t),[2]}}))}));return function(e,t){return r.apply(this,arguments)}}())},removeTrack:function(e,t){return m(t,(function(t,r){return r.removeTrack(e)}))},replaceTrack:function(e,t,r,n){return m(r,function(){var r=(0,w.default)((function(r,i){return(0,K.__generator)(this,(function(o){switch(o.label){case 0:return n?[4,F(n,r)]:[3,2];case 1:o.sent(),o.label=2;case 2:return i.replaceTrack(e,t),[2]}}))}));return function(e,t){return r.apply(this,arguments)}}())},onPeerJoin:function(e){return b.onPeerJoin=e},onPeerLeave:function(e){return b.onPeerLeave=e},onPeerStream:function(e){return b.onPeerStream=e},onPeerTrack:function(e){return b.onPeerTrack=e}}}(0,(function(e){return delete m[e]}),(function(){delete ya[y][t],N.forEach(clearTimeout),D.forEach(function(){var e=(0,w.default)((function(e){return(0,K.__generator)(this,(function(t){switch(t.label){case 0:return[4,e];case 1:return[2,t.sent()()]}}))}));return function(t){return e.apply(this,arguments)}}()),clearInterval(da)}))}),cs=["mqtt.eclipseprojects.io/mqtt","broker.hivemq.com:8884/mqtt","broker.emqx.io:8084/mqtt","test.mosquitto.org:8081/mqtt"].map((function(e){return"wss://"+e}))})),r.register("1PH9R",(function(e,r){function n(e,t){var r={},n=!1;function i(r,i){return n=!0,i=new Promise((function(t){t(e[r](i))})),{done:!1,value:t(i)}}return"function"==typeof Symbol&&Symbol.iterator&&(r[Symbol.iterator]=function(){return this}),r.next=function(e){return n?(n=!1,e):i("next",e)},"function"==typeof e.throw&&(r.throw=function(e){if(n)throw n=!1,e;return i("throw",e)}),"function"==typeof e.return&&(r.return=function(e){return i("return",e)}),r}t(e.exports,"default",(function(){return n}))})),r.register("3u2tY",(function(e,r){function n(e){var t,r,n,o=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);o--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new i(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function i(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then((function(e){return{value:e,done:t}}))}return i=function(e){this.s=e,this.n=e.next},i.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new i(e)}t(e.exports,"default",(function(){return n}))})),r.register("9yQwa",(function(e,n){t(e.exports,"default",(function(){return o}));var i=r("kRxx3");function o(e){return new(0,i.default)(e)}})),r.register("kRxx3",(function(e,r){function n(e){this.wrapped=e}t(e.exports,"default",(function(){return n}))})),r.register("8qpTe",(function(e,n){t(e.exports,"default",(function(){return a}));var i=r("k7SOi"),o=r("laD7J");function a(e,t){var r=(0,i.default)(e,t,"get");return(0,o.default)(e,r)}})),r.register("k7SOi",(function(e,r){function n(e,t,r){if(!t.has(e))throw new TypeError("attempted to "+r+" private field on non-instance");return t.get(e)}t(e.exports,"default",(function(){return n}))})),r.register("laD7J",(function(e,r){function n(e,t){return t.get?t.get.call(e):t.value}t(e.exports,"default",(function(){return n}))})),r.register("gwSkA",(function(e,n){t(e.exports,"default",(function(){return o}));var i=r("hv1Iw");function o(e,t,r){(0,i.default)(e,t),t.set(e,r)}})),r.register("hv1Iw",(function(e,r){function n(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}t(e.exports,"default",(function(){return n}))})),r.register("7ukXT",(function(e,n){t(e.exports,"default",(function(){return a}));var i=r("k7SOi"),o=r("c4HTA");function a(e,t,r){var n=(0,i.default)(e,t,"set");return(0,o.default)(e,n,r),r}})),r.register("c4HTA",(function(e,r){function n(e,t,r){if(t.set)t.set.call(e,r);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=r}}t(e.exports,"default",(function(){return n}))})),r.register("8TzS1",(function(e,n){t(e.exports,"default",(function(){return a}));var i=r("k7SOi"),o=r("Fzx8d");function a(e,t){var r=(0,i.default)(e,t,"update");return(0,o.default)(e,r)}})),r.register("Fzx8d",(function(e,r){function n(e,t){if(t.set){if(!t.get)throw new TypeError("attempted to read set only private field");return"__destrWrapper"in t||(t.__destrWrapper={set value(r){t.set.call(e,r)},get value(){return t.get.call(e)}}),t.__destrWrapper}if(!t.writable)throw new TypeError("attempted to set read only private field");return t}t(e.exports,"default",(function(){return n}))})),r.register("aFAb1",(function(e,r){function n(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}t(e.exports,"default",(function(){return n}))})),r.register("kw2NY",(function(e,n){t(e.exports,"default",(function(){return o}));var i=r("hv1Iw");function o(e,t){(0,i.default)(e,t),t.add(e)}})),r.register("lxHBR",(function(e,n){t(e.exports,"default",(function(){return s}));var i=r("a3i4E"),o=r("jX9Fw"),a=r("laD7J");function s(e,t,r){return(0,i.default)(e,t),(0,o.default)(r,"get"),(0,a.default)(e,r)}})),r.register("a3i4E",(function(e,r){function n(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}t(e.exports,"default",(function(){return n}))})),r.register("jX9Fw",(function(e,r){function n(e,t){if(void 0===e)throw new TypeError("attempted to "+t+" private static field before its declaration")}t(e.exports,"default",(function(){return n}))})),r.register("gJ3S3",(function(e,n){t(e.exports,"default",(function(){return s}));var i=r("a3i4E"),o=r("jX9Fw"),a=r("c4HTA");function s(e,t,r,n){return(0,i.default)(e,t),(0,o.default)(r,"set"),(0,a.default)(e,r,n),n}})),r.register("hXL9f",(function(e,n){t(e.exports,"default",(function(){return o}));var i=r("4pMaJ");function o(e){return function(){return new(0,i.default)(e.apply(this,arguments))}}})),r.register("4pMaJ",(function(e,n){t(e.exports,"default",(function(){return o}));var i=r("kRxx3");function o(e){var t,r;function n(t,r){try{var a=e[t](r),s=a.value,u=s instanceof i.default;Promise.resolve(u?s.wrapped:s).then((function(e){u?n("next",e):o(a.done?"return":"normal",e)}),(function(e){n("throw",e)}))}catch(e){o("throw",e)}}function o(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,i){return new Promise((function(o,a){var s={key:e,arg:i,resolve:o,reject:a,next:null};r?r=r.next=s:(t=r=s,n(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(o.prototype[Symbol.asyncIterator]=function(){return this}),o.prototype.next=function(e){return this._invoke("next",e)},o.prototype.throw=function(e){return this._invoke("throw",e)},o.prototype.return=function(e){return this._invoke("return",e)}}))}();
|