@maincode-ai/matilda-code 0.21.12 → 0.21.13

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.
Files changed (150) hide show
  1. package/bundled/mainy/docs/configuration/model-providers.md +0 -82
  2. package/bundled/mainy/docs/configuration/settings.md +30 -2
  3. package/bundled/mainy/docs/features/auto-mode.md +1 -1
  4. package/bundled/mainy/docs/features/channels/_meta.ts +0 -3
  5. package/bundled/mainy/docs/features/channels/overview.md +8 -16
  6. package/bundled/mainy/docs/features/commands.md +4 -4
  7. package/bundled/mainy/docs/features/hooks.md +9 -7
  8. package/bundled/mainy/docs/features/language.md +2 -29
  9. package/bundled/mainy/docs/features/worktree.md +0 -2
  10. package/bundled/mainy/docs/integration-github-action.md +3 -3
  11. package/bundled/mainy/docs/quickstart.md +2 -2
  12. package/bundled/mainy/docs/support/troubleshooting.md +1 -1
  13. package/chunks/agent-SRAIVZEE.js +3 -0
  14. package/chunks/agent-headless-XRDOZESG.js +3 -0
  15. package/chunks/{anthropicContentGenerator-VKFTAIU3.js → anthropicContentGenerator-LLDIKDMQ.js} +3 -3
  16. package/chunks/{askUserQuestion-2QI4NSFJ.js → askUserQuestion-BNSWGD26.js} +1 -1
  17. package/chunks/{ca-I2HEEIL7.js → ca-NPYL24ME.js} +2 -2
  18. package/chunks/{chunk-YJAKOETP.js → chunk-27HUYW23.js} +2 -2
  19. package/chunks/{chunk-EQGA7LH7.js → chunk-3B2HABK7.js} +1 -1
  20. package/chunks/{chunk-CSJTA7NE.js → chunk-3MTZTNAU.js} +18 -18
  21. package/chunks/{chunk-YRQP3SLC.js → chunk-5OHGYMKP.js} +1 -1
  22. package/chunks/chunk-6I6VGTKD.js +8 -0
  23. package/chunks/{chunk-MCQUPLRE.js → chunk-6M5G5FBH.js} +1 -1
  24. package/chunks/chunk-7ZODGQO6.js +4 -0
  25. package/chunks/chunk-AOOZREGV.js +9 -0
  26. package/chunks/chunk-DHDD5YJC.js +207 -0
  27. package/chunks/{chunk-WV3IUPZS.js → chunk-EZDV7A76.js} +1 -1
  28. package/chunks/{chunk-QVCGLQCI.js → chunk-IJEGHQ7Z.js} +3 -3
  29. package/chunks/{chunk-5C2RJ5RR.js → chunk-LWARA7JY.js} +1 -1
  30. package/chunks/{chunk-VTGICC67.js → chunk-MEV5XQI2.js} +1 -1
  31. package/chunks/{chunk-DOOFGSRV.js → chunk-P5TG5CON.js} +1 -1
  32. package/chunks/{chunk-JRECUFB3.js → chunk-PEKAUGYV.js} +552 -561
  33. package/chunks/chunk-PGUG43HG.js +24 -0
  34. package/chunks/{chunk-CZGZ3KK7.js → chunk-QZI2ZGZY.js} +1 -1
  35. package/chunks/chunk-RI54U73U.js +56 -0
  36. package/chunks/chunk-RPFSFS7Z.js +39 -0
  37. package/chunks/chunk-SOEIVSM5.js +113 -0
  38. package/chunks/{chunk-4J6DC24J.js → chunk-SVSY6AWS.js} +1 -1
  39. package/chunks/{chunk-6E766NPX.js → chunk-TWJLOEAI.js} +1 -1
  40. package/chunks/{chunk-HYVP4472.js → chunk-V6UPUMP3.js} +1 -1
  41. package/chunks/chunk-W4QSMIWO.js +9 -0
  42. package/chunks/chunk-ZX34M2GF.js +14 -0
  43. package/chunks/{computer-use-WKDNUTLD.js → computer-use-J4GAM4M6.js} +1 -1
  44. package/chunks/contextCommand-5F5M7NA4.js +3 -0
  45. package/chunks/{cron-create-F2LXM2OA.js → cron-create-IDWSZENI.js} +1 -1
  46. package/chunks/{cron-delete-DE6Q2S2L.js → cron-delete-NQCDZDUI.js} +1 -1
  47. package/chunks/{cron-list-IAQEJVV7.js → cron-list-Z4XMC3TO.js} +1 -1
  48. package/chunks/{de-AQXFJYZI.js → de-34YZHGC6.js} +2 -2
  49. package/chunks/{devtools-5JRKK3E7.js → devtools-XRQ4YJ5S.js} +1 -1
  50. package/chunks/{dist-P6SLWL5V.js → dist-PH6JW7XD.js} +1 -1
  51. package/chunks/{edit-QQNJZ55P.js → edit-X2S2ZXRN.js} +1 -1
  52. package/chunks/{en-EJLDYIBM.js → en-QLGMD6OS.js} +3 -3
  53. package/chunks/{enter-worktree-5X5SAMBJ.js → enter-worktree-TUCGNCLO.js} +1 -1
  54. package/chunks/{enterPlanMode-HP35SPLN.js → enterPlanMode-SQEZAAIR.js} +1 -1
  55. package/chunks/{exit-worktree-SRKZBEYF.js → exit-worktree-7FLITFZI.js} +1 -1
  56. package/chunks/{exitPlanMode-WSPTGGVN.js → exitPlanMode-O5UUJ3GM.js} +1 -1
  57. package/chunks/{fr-6TDHK7F2.js → fr-EDNBQACJ.js} +3 -3
  58. package/chunks/geminiContentGenerator-FIZFLPU3.js +8 -0
  59. package/chunks/glob-GSFTYAS2.js +22 -0
  60. package/chunks/{goal-tools-C6BSBHCF.js → goal-tools-YQOA6OKU.js} +1 -1
  61. package/chunks/{grep-MVCOBUYW.js → grep-VAB2VSXM.js} +1 -1
  62. package/chunks/{ja-GGNJR7AR.js → ja-LV4RLM3M.js} +2 -2
  63. package/chunks/{ls-JYJXFSXN.js → ls-IZJ3CKZY.js} +1 -1
  64. package/chunks/{lsp-DYDK6XCS.js → lsp-NGLDRHZU.js} +1 -1
  65. package/chunks/matildaAgentContentGenerator-QQHPCFJ5.js +8 -0
  66. package/chunks/matildaContentGenerator-W7Z33ONU.js +8 -0
  67. package/chunks/mcp-client-DXUNIEIB.js +3 -0
  68. package/chunks/monitor-4PFIGAGG.js +32 -0
  69. package/chunks/notebook-edit-MWJYAATJ.js +17 -0
  70. package/chunks/{openaiContentGenerator-2EALAM3U.js → openaiContentGenerator-NDVJL6QL.js} +1 -1
  71. package/chunks/{pt-D6L2QTDM.js → pt-5SQ4DGL7.js} +2 -2
  72. package/chunks/read-file-WPZKPXWA.js +3 -0
  73. package/chunks/ripGrep-7LZDZFTX.js +3 -0
  74. package/chunks/{ru-BNJCHDYO.js → ru-7K24S53N.js} +2 -2
  75. package/chunks/scheduler-DK2MVKXX.js +8 -0
  76. package/chunks/{send-message-P3SMWNEE.js → send-message-TCPX5UDU.js} +1 -1
  77. package/chunks/{serve-FXH6EBQ6.js → serve-GSZPJI2O.js} +59 -48
  78. package/chunks/shell-PRS47PDP.js +3 -0
  79. package/chunks/{skill-HZPFEAPF.js → skill-ETQM5NI3.js} +1 -1
  80. package/chunks/src-UB7DZRYK.js +3 -0
  81. package/chunks/{symbol-search-EAIZPWN7.js → symbol-search-HARHZ5AH.js} +1 -1
  82. package/chunks/{syntheticOutput-432LXITX.js → syntheticOutput-WZDPECYS.js} +1 -1
  83. package/chunks/task-create-XRNIDT4T.js +3 -0
  84. package/chunks/{task-detach-XMSJ3HBM.js → task-detach-TBAVUOTC.js} +1 -1
  85. package/chunks/task-list-Z6BDZZID.js +9 -0
  86. package/chunks/{task-stop-NTS62FLG.js → task-stop-HDSARSJ6.js} +1 -1
  87. package/chunks/{task-update-AR26UFYZ.js → task-update-MW2VT2XV.js} +1 -1
  88. package/chunks/{team-create-PYXFVIR5.js → team-create-VMYNLZCC.js} +1 -1
  89. package/chunks/team-delete-F7QDC2TE.js +8 -0
  90. package/chunks/{todoWrite-5NZ7CHTC.js → todoWrite-SCF5M24M.js} +1 -1
  91. package/chunks/{tool-search-RKZDSRYS.js → tool-search-WX6FOE35.js} +1 -1
  92. package/chunks/{web-fetch-VW3SVDQ6.js → web-fetch-CKYBHGLF.js} +1 -1
  93. package/chunks/{web-search-XQUIZARL.js → web-search-67DFNS5V.js} +1 -1
  94. package/chunks/{workflow-YXNXDRWZ.js → workflow-WBSRQG3N.js} +2 -2
  95. package/chunks/write-file-S5FAX4JJ.js +15 -0
  96. package/cli.js +436 -439
  97. package/locales/ca.js +0 -3
  98. package/locales/de.js +0 -3
  99. package/locales/en.js +0 -3
  100. package/locales/fr.js +0 -3
  101. package/locales/ja.js +0 -3
  102. package/locales/pt.js +0 -3
  103. package/locales/ru.js +0 -3
  104. package/package.json +2 -2
  105. package/sandbox-macos-permissive-closed.sb +0 -1
  106. package/sandbox-macos-permissive-open.sb +0 -1
  107. package/sandbox-macos-permissive-proxied.sb +0 -1
  108. package/sandbox-macos-restrictive-closed.sb +0 -1
  109. package/sandbox-macos-restrictive-open.sb +0 -1
  110. package/sandbox-macos-restrictive-proxied.sb +0 -1
  111. package/bundled/mainy/docs/features/channels/dingtalk.md +0 -134
  112. package/bundled/mainy/docs/features/channels/feishu.md +0 -186
  113. package/bundled/mainy/docs/features/channels/weixin.md +0 -106
  114. package/chunks/agent-WM63A6NK.js +0 -3
  115. package/chunks/agent-headless-QIUBDKPW.js +0 -3
  116. package/chunks/chunk-2MOGYHWM.js +0 -8
  117. package/chunks/chunk-3IRGBRSP.js +0 -113
  118. package/chunks/chunk-6GBNB5Z2.js +0 -3
  119. package/chunks/chunk-6Z2MV7ZY.js +0 -186
  120. package/chunks/chunk-BVOCFLC4.js +0 -56
  121. package/chunks/chunk-FPO57O66.js +0 -39
  122. package/chunks/chunk-LJR4RZZ2.js +0 -3
  123. package/chunks/chunk-MO2HXJG5.js +0 -9
  124. package/chunks/chunk-PA6532AY.js +0 -6
  125. package/chunks/chunk-S3CWEVTS.js +0 -15
  126. package/chunks/chunk-U347OO7S.js +0 -9
  127. package/chunks/chunk-UIRBHC5X.js +0 -3
  128. package/chunks/chunk-WVY2P6WH.js +0 -26
  129. package/chunks/chunk-WZ75OGYY.js +0 -14
  130. package/chunks/chunk-XMZIY7XX.js +0 -13
  131. package/chunks/contextCommand-DAB3HOHY.js +0 -3
  132. package/chunks/dist-ME6647DQ.js +0 -195
  133. package/chunks/dist-VG3ZDJ2A.js +0 -28
  134. package/chunks/dist-YTCHM57U.js +0 -23
  135. package/chunks/geminiContentGenerator-RJ73DQAP.js +0 -8
  136. package/chunks/glob-QQ6LGKDX.js +0 -22
  137. package/chunks/matildaAgentContentGenerator-YUYS4336.js +0 -8
  138. package/chunks/matildaContentGenerator-O4Z2QPCP.js +0 -8
  139. package/chunks/mcp-client-RXVQU5VI.js +0 -3
  140. package/chunks/monitor-77KXDXPR.js +0 -32
  141. package/chunks/notebook-edit-TKJD2EQZ.js +0 -17
  142. package/chunks/read-file-3KUAH6ND.js +0 -3
  143. package/chunks/ripGrep-U2PLKXMY.js +0 -3
  144. package/chunks/scheduler-J7VU2V5Y.js +0 -8
  145. package/chunks/shell-PXR2AXDD.js +0 -3
  146. package/chunks/src-RFAEPLY7.js +0 -3
  147. package/chunks/task-create-Z3QRCMX4.js +0 -3
  148. package/chunks/task-list-GXAJW3JP.js +0 -9
  149. package/chunks/team-delete-OMYVUAQU.js +0 -8
  150. package/chunks/write-file-XDDLTGSG.js +0 -15
@@ -1,9 +0,0 @@
1
- // Force strict mode and setup for ESM
2
- "use strict";
3
- import{b as d}from"./chunk-GZPNIYVZ.js";import{a as g,d as E}from"./chunk-OWGSC52X.js";var k=E((dr,Ge)=>{"use strict";d();var We=["nodebuffer","arraybuffer","fragments"],qe=typeof Blob<"u";qe&&We.push("blob");Ge.exports={BINARY_TYPES:We,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:qe,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var K=E((mr,re)=>{"use strict";d();var{EMPTY_BUFFER:Vt}=k(),ge=Buffer[Symbol.species];function zt(t,e){if(t.length===0)return Vt;if(t.length===1)return t[0];let s=Buffer.allocUnsafe(e),r=0;for(let i=0;i<t.length;i++){let n=t[i];s.set(n,r),r+=n.length}return r<e?new ge(s.buffer,s.byteOffset,r):s}function $e(t,e,s,r,i){for(let n=0;n<i;n++)s[r+n]=t[n]^e[n&3]}function je(t,e){for(let s=0;s<t.length;s++)t[s]^=e[s&3]}function Ht(t){return t.length===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.length)}function ye(t){if(ye.readOnly=!0,Buffer.isBuffer(t))return t;let e;return t instanceof ArrayBuffer?e=new ge(t):ArrayBuffer.isView(t)?e=new ge(t.buffer,t.byteOffset,t.byteLength):(e=Buffer.from(t),ye.readOnly=!1),e}re.exports={concat:zt,mask:$e,toArrayBuffer:Ht,toBuffer:ye,unmask:je};if(!process.env.WS_NO_BUFFER_UTIL)try{let t=g("bufferutil");re.exports.mask=function(e,s,r,i,n){n<48?$e(e,s,r,i,n):t.mask(e,s,r,i,n)},re.exports.unmask=function(e,s){e.length<32?je(e,s):t.unmask(e,s)}}catch{}});var He=E((gr,ze)=>{"use strict";d();var Ve=Symbol("kDone"),xe=Symbol("kRun"),Se=class{constructor(e){this[Ve]=()=>{this.pending--,this[xe]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[xe]()}[xe](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Ve])}}};ze.exports=Se});var Z=E((xr,Ze)=>{"use strict";d();var X=g("zlib"),Ye=K(),Yt=He(),{kStatusCode:Ke}=k(),Kt=Buffer[Symbol.species],Xt=Buffer.from([0,0,255,255]),ne=Symbol("permessage-deflate"),C=Symbol("total-length"),W=Symbol("callback"),P=Symbol("buffers"),q=Symbol("error"),ie,Ee=class{constructor(e){if(this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._maxPayload=this._options.maxPayload|0,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,!ie){let s=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;ie=new Yt(s)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[W];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let s=this._options,r=e.find(i=>!(s.serverNoContextTakeover===!1&&i.server_no_context_takeover||i.server_max_window_bits&&(s.serverMaxWindowBits===!1||typeof s.serverMaxWindowBits=="number"&&s.serverMaxWindowBits>i.server_max_window_bits)||typeof s.clientMaxWindowBits=="number"&&!i.client_max_window_bits));if(!r)throw new Error("None of the extension offers can be accepted");return s.serverNoContextTakeover&&(r.server_no_context_takeover=!0),s.clientNoContextTakeover&&(r.client_no_context_takeover=!0),typeof s.serverMaxWindowBits=="number"&&(r.server_max_window_bits=s.serverMaxWindowBits),typeof s.clientMaxWindowBits=="number"?r.client_max_window_bits=s.clientMaxWindowBits:(r.client_max_window_bits===!0||s.clientMaxWindowBits===!1)&&delete r.client_max_window_bits,r}acceptAsClient(e){let s=e[0];if(this._options.clientNoContextTakeover===!1&&s.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!s.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(s.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&s.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return s}normalizeParams(e){return e.forEach(s=>{Object.keys(s).forEach(r=>{let i=s[r];if(i.length>1)throw new Error(`Parameter "${r}" must have only a single value`);if(i=i[0],r==="client_max_window_bits"){if(i!==!0){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else if(r==="server_max_window_bits"){let n=+i;if(!Number.isInteger(n)||n<8||n>15)throw new TypeError(`Invalid value for parameter "${r}": ${i}`);i=n}else if(r==="client_no_context_takeover"||r==="server_no_context_takeover"){if(i!==!0)throw new TypeError(`Invalid value for parameter "${r}": ${i}`)}else throw new Error(`Unknown parameter "${r}"`);s[r]=i})}),e}decompress(e,s,r){ie.add(i=>{this._decompress(e,s,(n,o)=>{i(),r(n,o)})})}compress(e,s,r){ie.add(i=>{this._compress(e,s,(n,o)=>{i(),r(n,o)})})}_decompress(e,s,r){let i=this._isServer?"client":"server";if(!this._inflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?X.Z_DEFAULT_WINDOWBITS:this.params[n];this._inflate=X.createInflateRaw({...this._options.zlibInflateOptions,windowBits:o}),this._inflate[ne]=this,this._inflate[C]=0,this._inflate[P]=[],this._inflate.on("error",Qt),this._inflate.on("data",Xe)}this._inflate[W]=r,this._inflate.write(e),s&&this._inflate.write(Xt),this._inflate.flush(()=>{let n=this._inflate[q];if(n){this._inflate.close(),this._inflate=null,r(n);return}let o=Ye.concat(this._inflate[P],this._inflate[C]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[C]=0,this._inflate[P]=[],s&&this.params[`${i}_no_context_takeover`]&&this._inflate.reset()),r(null,o)})}_compress(e,s,r){let i=this._isServer?"server":"client";if(!this._deflate){let n=`${i}_max_window_bits`,o=typeof this.params[n]!="number"?X.Z_DEFAULT_WINDOWBITS:this.params[n];this._deflate=X.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:o}),this._deflate[C]=0,this._deflate[P]=[],this._deflate.on("data",Zt)}this._deflate[W]=r,this._deflate.write(e),this._deflate.flush(X.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let n=Ye.concat(this._deflate[P],this._deflate[C]);s&&(n=new Kt(n.buffer,n.byteOffset,n.length-4)),this._deflate[W]=null,this._deflate[C]=0,this._deflate[P]=[],s&&this.params[`${i}_no_context_takeover`]&&this._deflate.reset(),r(null,n)})}};Ze.exports=Ee;function Zt(t){this[P].push(t),this[C]+=t.length}function Xe(t){if(this[C]+=t.length,this[ne]._maxPayload<1||this[C]<=this[ne]._maxPayload){this[P].push(t);return}this[q]=new RangeError("Max payload size exceeded"),this[q].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[q][Ke]=1009,this.removeListener("data",Xe),this.reset()}function Qt(t){if(this[ne]._inflate=null,this[q]){this[W](this[q]);return}t[Ke]=1007,this[W](t)}});var G=E((Er,oe)=>{"use strict";d();var{isUtf8:Qe}=g("buffer"),{hasBlob:Jt}=k(),es=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function ts(t){return t>=1e3&&t<=1014&&t!==1004&&t!==1005&&t!==1006||t>=3e3&&t<=4999}function ve(t){let e=t.length,s=0;for(;s<e;)if((t[s]&128)===0)s++;else if((t[s]&224)===192){if(s+1===e||(t[s+1]&192)!==128||(t[s]&254)===192)return!1;s+=2}else if((t[s]&240)===224){if(s+2>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||t[s]===224&&(t[s+1]&224)===128||t[s]===237&&(t[s+1]&224)===160)return!1;s+=3}else if((t[s]&248)===240){if(s+3>=e||(t[s+1]&192)!==128||(t[s+2]&192)!==128||(t[s+3]&192)!==128||t[s]===240&&(t[s+1]&240)===128||t[s]===244&&t[s+1]>143||t[s]>244)return!1;s+=4}else return!1;return!0}function ss(t){return Jt&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&(t[Symbol.toStringTag]==="Blob"||t[Symbol.toStringTag]==="File")}oe.exports={isBlob:ss,isValidStatusCode:ts,isValidUTF8:ve,tokenChars:es};if(Qe)oe.exports.isValidUTF8=function(t){return t.length<24?ve(t):Qe(t)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let t=g("utf-8-validate");oe.exports.isValidUTF8=function(e){return e.length<32?ve(e):t(e)}}catch{}});var ot=E((br,nt)=>{"use strict";d();var{Writable:rs}=g("stream"),Je=Z(),{BINARY_TYPES:is,EMPTY_BUFFER:et,kStatusCode:ns,kWebSocket:os}=k(),{concat:be,toArrayBuffer:as,unmask:fs}=K(),{isValidStatusCode:ls,isValidUTF8:tt}=G(),ae=Buffer[Symbol.species],b=0,st=1,rt=2,it=3,we=4,Oe=5,fe=6,Te=class extends rs{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||is[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=e.maxBufferedChunks|0,this._maxFragments=e.maxFragments|0,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[os]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=b}_write(e,s,r){if(this._opcode===8&&this._state==b)return r();if(this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks){r(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));return}this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(r)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let r=this._buffers[0];return this._buffers[0]=new ae(r.buffer,r.byteOffset+e,r.length-e),new ae(r.buffer,r.byteOffset,e)}let s=Buffer.allocUnsafe(e);do{let r=this._buffers[0],i=s.length-e;e>=r.length?s.set(this._buffers.shift(),i):(s.set(new Uint8Array(r.buffer,r.byteOffset,e),i),this._buffers[0]=new ae(r.buffer,r.byteOffset+e,r.length-e)),e-=r.length}while(e>0);return s}startLoop(e){this._loop=!0;do switch(this._state){case b:this.getInfo(e);break;case st:this.getPayloadLength16(e);break;case rt:this.getPayloadLength64(e);break;case it:this.getMask();break;case we:this.getData(e);break;case Oe:case fe:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let s=this.consume(2);if((s[0]&48)!==0){let i=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(i);return}let r=(s[0]&64)===64;if(r&&!this._extensions[Je.extensionName]){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._fin=(s[0]&128)===128,this._opcode=s[0]&15,this._payloadLength=s[1]&127,this._opcode===0){if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(!this._fragmented){let i=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}this._compressed=r}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let i=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(i);return}if(r){let i=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(i);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let i=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(i);return}}else{let i=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(i);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(s[1]&128)===128,this._isServer){if(!this._masked){let i=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(i);return}}else if(this._masked){let i=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(i);return}this._payloadLength===126?this._state=st:this._payloadLength===127?this._state=rt:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let s=this.consume(8),r=s.readUInt32BE(0);if(r>Math.pow(2,21)-1){let i=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(i);return}this._payloadLength=r*Math.pow(2,32)+s.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let s=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(s);return}this._masked?this._state=it:this._state=we}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=we}getData(e){let s=et;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}s=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&fs(s,this._mask)}if(this._opcode>7){this.controlMessage(s,e);return}if(this._compressed){this._state=Oe,this.decompress(s,e);return}if(s.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let r=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");e(r);return}this._messageLength=this._totalPayloadLength,this._fragments.push(s)}this.dataMessage(e)}decompress(e,s){this._extensions[Je.extensionName].decompress(e,this._fin,(i,n)=>{if(i)return s(i);if(n.length){if(this._messageLength+=n.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let o=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");s(o);return}if(this._maxFragments>0&&this._fragments.length>=this._maxFragments){let o=this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS");s(o);return}this._fragments.push(n)}this.dataMessage(s),this._state===b&&this.startLoop(s)})}dataMessage(e){if(!this._fin){this._state=b;return}let s=this._messageLength,r=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let i;this._binaryType==="nodebuffer"?i=be(r,s):this._binaryType==="arraybuffer"?i=as(be(r,s)):this._binaryType==="blob"?i=new Blob(r):i=r,this._allowSynchronousEvents?(this.emit("message",i,!0),this._state=b):(this._state=fe,setImmediate(()=>{this.emit("message",i,!0),this._state=b,this.startLoop(e)}))}else{let i=be(r,s);if(!this._skipUTF8Validation&&!tt(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(n);return}this._state===Oe||this._allowSynchronousEvents?(this.emit("message",i,!1),this._state=b):(this._state=fe,setImmediate(()=>{this.emit("message",i,!1),this._state=b,this.startLoop(e)}))}}controlMessage(e,s){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,et),this.end();else{let r=e.readUInt16BE(0);if(!ls(r)){let n=this.createError(RangeError,`invalid status code ${r}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");s(n);return}let i=new ae(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!tt(i)){let n=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");s(n);return}this._loop=!1,this.emit("conclude",r,i),this.end()}this._state=b;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=b):(this._state=fe,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=b,this.startLoop(s)}))}createError(e,s,r,i,n){this._loop=!1,this._errored=!0;let o=new e(r?`Invalid WebSocket frame: ${s}`:s);return Error.captureStackTrace(o,this.createError),o.code=n,o[ns]=i,o}};nt.exports=Te});var ht=E((Tr,lt)=>{"use strict";d();var{Duplex:Or}=g("stream"),{randomFillSync:hs}=g("crypto"),{types:{isUint8Array:cs}}=g("util"),at=Z(),{EMPTY_BUFFER:us,kWebSocket:ds,NOOP:_s}=k(),{isBlob:$,isValidStatusCode:ms}=G(),{mask:ft,toBuffer:R}=K(),w=Symbol("kByteLength"),ps=Buffer.alloc(4),le=8*1024,U,j=le,O=0,gs=1,ys=2,ke=class t{constructor(e,s,r){this._extensions=s||{},r&&(this._generateMask=r,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=O,this.onerror=_s,this[ds]=void 0}static frame(e,s){let r,i=!1,n=2,o=!1;s.mask&&(r=s.maskBuffer||ps,s.generateMask?s.generateMask(r):(j===le&&(U===void 0&&(U=Buffer.alloc(le)),hs(U,0,le),j=0),r[0]=U[j++],r[1]=U[j++],r[2]=U[j++],r[3]=U[j++]),o=(r[0]|r[1]|r[2]|r[3])===0,n=6);let f;typeof e=="string"?(!s.mask||o)&&s[w]!==void 0?f=s[w]:(e=Buffer.from(e),f=e.length):(f=e.length,i=s.mask&&s.readOnly&&!o);let l=f;f>=65536?(n+=8,l=127):f>125&&(n+=2,l=126);let a=Buffer.allocUnsafe(i?f+n:n);return a[0]=s.fin?s.opcode|128:s.opcode,s.rsv1&&(a[0]|=64),a[1]=l,l===126?a.writeUInt16BE(f,2):l===127&&(a[2]=a[3]=0,a.writeUIntBE(f,4,6)),s.mask?(a[1]|=128,a[n-4]=r[0],a[n-3]=r[1],a[n-2]=r[2],a[n-1]=r[3],o?[a,e]:i?(ft(e,r,a,n,f),[a]):(ft(e,r,e,0,f),[a,e])):[a,e]}close(e,s,r,i){let n;if(e===void 0)n=us;else{if(typeof e!="number"||!ms(e))throw new TypeError("First argument must be a valid error code number");if(s===void 0||!s.length)n=Buffer.allocUnsafe(2),n.writeUInt16BE(e,0);else{let f=Buffer.byteLength(s);if(f>123)throw new RangeError("The message must not be greater than 123 bytes");if(n=Buffer.allocUnsafe(2+f),n.writeUInt16BE(e,0),typeof s=="string")n.write(s,2);else if(cs(s))n.set(s,2);else throw new TypeError("Second argument must be a string or a Uint8Array")}}let o={[w]:n.length,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==O?this.enqueue([this.dispatch,n,!1,o,i]):this.sendFrame(t.frame(n,o),i)}ping(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):$(e)?(i=e.size,n=!1):(e=R(e),i=e.length,n=R.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[w]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};$(e)?this._state!==O?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==O?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}pong(e,s,r){let i,n;if(typeof e=="string"?(i=Buffer.byteLength(e),n=!1):$(e)?(i=e.size,n=!1):(e=R(e),i=e.length,n=R.readOnly),i>125)throw new RangeError("The data size must not be greater than 125 bytes");let o={[w]:i,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};$(e)?this._state!==O?this.enqueue([this.getBlobData,e,!1,o,r]):this.getBlobData(e,!1,o,r):this._state!==O?this.enqueue([this.dispatch,e,!1,o,r]):this.sendFrame(t.frame(e,o),r)}send(e,s,r){let i=this._extensions[at.extensionName],n=s.binary?2:1,o=s.compress,f,l;typeof e=="string"?(f=Buffer.byteLength(e),l=!1):$(e)?(f=e.size,l=!1):(e=R(e),f=e.length,l=R.readOnly),this._firstFragment?(this._firstFragment=!1,o&&i&&i.params[i._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(o=f>=i._threshold),this._compress=o):(o=!1,n=0),s.fin&&(this._firstFragment=!0);let a={[w]:f,fin:s.fin,generateMask:this._generateMask,mask:s.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:l,rsv1:o};$(e)?this._state!==O?this.enqueue([this.getBlobData,e,this._compress,a,r]):this.getBlobData(e,this._compress,a,r):this._state!==O?this.enqueue([this.dispatch,e,this._compress,a,r]):this.dispatch(e,this._compress,a,r)}getBlobData(e,s,r,i){this._bufferedBytes+=r[w],this._state=ys,e.arrayBuffer().then(n=>{if(this._socket.destroyed){let f=new Error("The socket was closed while the blob was being read");process.nextTick(Ce,this,f,i);return}this._bufferedBytes-=r[w];let o=R(n);s?this.dispatch(o,s,r,i):(this._state=O,this.sendFrame(t.frame(o,r),i),this.dequeue())}).catch(n=>{process.nextTick(xs,this,n,i)})}dispatch(e,s,r,i){if(!s){this.sendFrame(t.frame(e,r),i);return}let n=this._extensions[at.extensionName];this._bufferedBytes+=r[w],this._state=gs,n.compress(e,r.fin,(o,f)=>{if(this._socket.destroyed){let l=new Error("The socket was closed while data was being compressed");Ce(this,l,i);return}this._bufferedBytes-=r[w],this._state=O,r.readOnly=!1,this.sendFrame(t.frame(f,r),i),this.dequeue()})}dequeue(){for(;this._state===O&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][w],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][w],this._queue.push(e)}sendFrame(e,s){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],s),this._socket.uncork()):this._socket.write(e[0],s)}};lt.exports=ke;function Ce(t,e,s){typeof s=="function"&&s(e);for(let r=0;r<t._queue.length;r++){let i=t._queue[r],n=i[i.length-1];typeof n=="function"&&n(e)}}function xs(t,e,s){Ce(t,e,s),t.onerror(e)}});var Le=E((Cr,ct)=>{"use strict";d();var{tokenChars:Q}=G();function T(t,e,s){t[e]===void 0?t[e]=[s]:t[e].push(s)}function Ss(t){let e=Object.create(null),s=Object.create(null),r=!1,i=!1,n=!1,o,f,l=-1,a=-1,h=-1,c=0;for(;c<t.length;c++)if(a=t.charCodeAt(c),o===void 0)if(h===-1&&Q[a]===1)l===-1&&(l=c);else if(c!==0&&(a===32||a===9))h===-1&&l!==-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let y=t.slice(l,h);a===44?(T(e,y,s),s=Object.create(null)):o=y,l=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);else if(f===void 0)if(h===-1&&Q[a]===1)l===-1&&(l=c);else if(a===32||a===9)h===-1&&l!==-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c),T(s,t.slice(l,h),!0),a===44&&(T(e,o,s),s=Object.create(null),o=void 0),l=h=-1}else if(a===61&&l!==-1&&h===-1)f=t.slice(l,c),l=h=-1;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(i){if(Q[a]!==1)throw new SyntaxError(`Unexpected character at index ${c}`);l===-1?l=c:r||(r=!0),i=!1}else if(n)if(Q[a]===1)l===-1&&(l=c);else if(a===34&&l!==-1)n=!1,h=c;else if(a===92)i=!0;else throw new SyntaxError(`Unexpected character at index ${c}`);else if(a===34&&t.charCodeAt(c-1)===61)n=!0;else if(h===-1&&Q[a]===1)l===-1&&(l=c);else if(l!==-1&&(a===32||a===9))h===-1&&(h=c);else if(a===59||a===44){if(l===-1)throw new SyntaxError(`Unexpected character at index ${c}`);h===-1&&(h=c);let y=t.slice(l,h);r&&(y=y.replace(/\\/g,""),r=!1),T(s,f,y),a===44&&(T(e,o,s),s=Object.create(null),o=void 0),f=void 0,l=h=-1}else throw new SyntaxError(`Unexpected character at index ${c}`);if(l===-1||n||a===32||a===9)throw new SyntaxError("Unexpected end of input");h===-1&&(h=c);let m=t.slice(l,h);return o===void 0?T(e,m,s):(f===void 0?T(s,m,!0):r?T(s,f,m.replace(/\\/g,"")):T(s,f,m),T(e,o,s)),e}function Es(t){return Object.keys(t).map(e=>{let s=t[e];return Array.isArray(s)||(s=[s]),s.map(r=>[e].concat(Object.keys(r).map(i=>{let n=r[i];return Array.isArray(n)||(n=[n]),n.map(o=>o===!0?i:`${i}=${o}`).join("; ")})).join("; ")).join(", ")}).join(", ")}ct.exports={format:Es,parse:Ss}});var St=E((Nr,xt)=>{"use strict";d();var{kForOnEventAttribute:J,kListener:Ne}=k(),ut=Symbol("kCode"),dt=Symbol("kData"),_t=Symbol("kError"),mt=Symbol("kMessage"),pt=Symbol("kReason"),V=Symbol("kTarget"),gt=Symbol("kType"),yt=Symbol("kWasClean"),L=class{constructor(e){this[V]=null,this[gt]=e}get target(){return this[V]}get type(){return this[gt]}};Object.defineProperty(L.prototype,"target",{enumerable:!0});Object.defineProperty(L.prototype,"type",{enumerable:!0});var I=class extends L{constructor(e,s={}){super(e),this[ut]=s.code===void 0?0:s.code,this[pt]=s.reason===void 0?"":s.reason,this[yt]=s.wasClean===void 0?!1:s.wasClean}get code(){return this[ut]}get reason(){return this[pt]}get wasClean(){return this[yt]}};Object.defineProperty(I.prototype,"code",{enumerable:!0});Object.defineProperty(I.prototype,"reason",{enumerable:!0});Object.defineProperty(I.prototype,"wasClean",{enumerable:!0});var z=class extends L{constructor(e,s={}){super(e),this[_t]=s.error===void 0?null:s.error,this[mt]=s.message===void 0?"":s.message}get error(){return this[_t]}get message(){return this[mt]}};Object.defineProperty(z.prototype,"error",{enumerable:!0});Object.defineProperty(z.prototype,"message",{enumerable:!0});var ee=class extends L{constructor(e,s={}){super(e),this[dt]=s.data===void 0?null:s.data}get data(){return this[dt]}};Object.defineProperty(ee.prototype,"data",{enumerable:!0});var vs={addEventListener(t,e,s={}){for(let i of this.listeners(t))if(!s[J]&&i[Ne]===e&&!i[J])return;let r;if(t==="message")r=function(n,o){let f=new ee("message",{data:o?n:n.toString()});f[V]=this,he(e,this,f)};else if(t==="close")r=function(n,o){let f=new I("close",{code:n,reason:o.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});f[V]=this,he(e,this,f)};else if(t==="error")r=function(n){let o=new z("error",{error:n,message:n.message});o[V]=this,he(e,this,o)};else if(t==="open")r=function(){let n=new L("open");n[V]=this,he(e,this,n)};else return;r[J]=!!s[J],r[Ne]=e,s.once?this.once(t,r):this.on(t,r)},removeEventListener(t,e){for(let s of this.listeners(t))if(s[Ne]===e&&!s[J]){this.removeListener(t,s);break}}};xt.exports={CloseEvent:I,ErrorEvent:z,Event:L,EventTarget:vs,MessageEvent:ee};function he(t,e,s){typeof t=="object"&&t.handleEvent?t.handleEvent.call(t,s):t.call(e,s)}});var Ie=E((Ur,Bt)=>{"use strict";d();var bs=g("events"),ws=g("https"),Os=g("http"),bt=g("net"),Ts=g("tls"),{randomBytes:ks,createHash:Cs}=g("crypto"),{Duplex:Br,Readable:Rr}=g("stream"),{URL:Pe}=g("url"),B=Z(),Ls=ot(),Ns=ht(),{isBlob:Ps}=G(),{BINARY_TYPES:Et,CLOSE_TIMEOUT:Bs,EMPTY_BUFFER:ce,GUID:Rs,kForOnEventAttribute:Be,kListener:Us,kStatusCode:Is,kWebSocket:x,NOOP:wt}=k(),{EventTarget:{addEventListener:Ds,removeEventListener:Fs}}=St(),{format:Ms,parse:As}=Le(),{toBuffer:Ws}=K(),Ot=Symbol("kAborted"),Re=[8,13],N=["CONNECTING","OPEN","CLOSING","CLOSED"],qs=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,_=class t extends bs{constructor(e,s,r){super(),this._binaryType=Et[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=ce,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=t.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,s===void 0?s=[]:Array.isArray(s)||(typeof s=="object"&&s!==null?(r=s,s=[]):s=[s]),Tt(this,e,s,r)):(this._autoPong=r.autoPong,this._closeTimeout=r.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){Et.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,s,r){let i=new Ls({allowSynchronousEvents:r.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:r.maxBufferedChunks,maxFragments:r.maxFragments,maxPayload:r.maxPayload,skipUTF8Validation:r.skipUTF8Validation}),n=new Ns(e,this._extensions,r.generateMask);this._receiver=i,this._sender=n,this._socket=e,i[x]=this,n[x]=this,e[x]=this,i.on("conclude",js),i.on("drain",Vs),i.on("error",zs),i.on("message",Hs),i.on("ping",Ys),i.on("pong",Ks),n.onerror=Xs,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),s.length>0&&e.unshift(s),e.on("close",Lt),e.on("data",de),e.on("end",Nt),e.on("error",Pt),this._readyState=t.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[B.extensionName]&&this._extensions[B.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=t.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,s){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){v(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===t.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=t.CLOSING,this._sender.close(e,s,!this._isServer,r=>{r||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),Ct(this)}}pause(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Ue(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.ping(e||ce,s,r)}pong(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(r=e,e=s=void 0):typeof s=="function"&&(r=s,s=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Ue(this,e,r);return}s===void 0&&(s=!this._isServer),this._sender.pong(e||ce,s,r)}resume(){this.readyState===t.CONNECTING||this.readyState===t.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,s,r){if(this.readyState===t.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof s=="function"&&(r=s,s={}),typeof e=="number"&&(e=e.toString()),this.readyState!==t.OPEN){Ue(this,e,r);return}let i={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...s};this._extensions[B.extensionName]||(i.compress=!1),this._sender.send(e||ce,i,r)}terminate(){if(this.readyState!==t.CLOSED){if(this.readyState===t.CONNECTING){v(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=t.CLOSING,this._socket.destroy())}}};Object.defineProperty(_,"CONNECTING",{enumerable:!0,value:N.indexOf("CONNECTING")});Object.defineProperty(_.prototype,"CONNECTING",{enumerable:!0,value:N.indexOf("CONNECTING")});Object.defineProperty(_,"OPEN",{enumerable:!0,value:N.indexOf("OPEN")});Object.defineProperty(_.prototype,"OPEN",{enumerable:!0,value:N.indexOf("OPEN")});Object.defineProperty(_,"CLOSING",{enumerable:!0,value:N.indexOf("CLOSING")});Object.defineProperty(_.prototype,"CLOSING",{enumerable:!0,value:N.indexOf("CLOSING")});Object.defineProperty(_,"CLOSED",{enumerable:!0,value:N.indexOf("CLOSED")});Object.defineProperty(_.prototype,"CLOSED",{enumerable:!0,value:N.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(t=>{Object.defineProperty(_.prototype,t,{enumerable:!0})});["open","error","close","message"].forEach(t=>{Object.defineProperty(_.prototype,`on${t}`,{enumerable:!0,get(){for(let e of this.listeners(t))if(e[Be])return e[Us];return null},set(e){for(let s of this.listeners(t))if(s[Be]){this.removeListener(t,s);break}typeof e=="function"&&this.addEventListener(t,e,{[Be]:!0})}})});_.prototype.addEventListener=Ds;_.prototype.removeEventListener=Fs;Bt.exports=_;function Tt(t,e,s,r){let i={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:Bs,protocolVersion:Re[1],maxBufferedChunks:1048576,maxFragments:131072,maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(t._autoPong=i.autoPong,t._closeTimeout=i.closeTimeout,!Re.includes(i.protocolVersion))throw new RangeError(`Unsupported protocol version: ${i.protocolVersion} (supported versions: ${Re.join(", ")})`);let n;if(e instanceof Pe)n=e;else try{n=new Pe(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}n.protocol==="http:"?n.protocol="ws:":n.protocol==="https:"&&(n.protocol="wss:"),t._url=n.href;let o=n.protocol==="wss:",f=n.protocol==="ws+unix:",l;if(n.protocol!=="ws:"&&!o&&!f?l=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:f&&!n.pathname?l="The URL's pathname is empty":n.hash&&(l="The URL contains a fragment identifier"),l){let u=new SyntaxError(l);if(t._redirects===0)throw u;ue(t,u);return}let a=o?443:80,h=ks(16).toString("base64"),c=o?ws.request:Os.request,m=new Set,y;if(i.createConnection=i.createConnection||(o?$s:Gs),i.defaultPort=i.defaultPort||a,i.port=n.port||a,i.host=n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,i.headers={...i.headers,"Sec-WebSocket-Version":i.protocolVersion,"Sec-WebSocket-Key":h,Connection:"Upgrade",Upgrade:"websocket"},i.path=n.pathname+n.search,i.timeout=i.handshakeTimeout,i.perMessageDeflate&&(y=new B({...i.perMessageDeflate,isServer:!1,maxPayload:i.maxPayload}),i.headers["Sec-WebSocket-Extensions"]=Ms({[B.extensionName]:y.offer()})),s.length){for(let u of s){if(typeof u!="string"||!qs.test(u)||m.has(u))throw new SyntaxError("An invalid or duplicated subprotocol was specified");m.add(u)}i.headers["Sec-WebSocket-Protocol"]=s.join(",")}if(i.origin&&(i.protocolVersion<13?i.headers["Sec-WebSocket-Origin"]=i.origin:i.headers.Origin=i.origin),(n.username||n.password)&&(i.auth=`${n.username}:${n.password}`),f){let u=i.path.split(":");i.socketPath=u[0],i.path=u[1]}let p;if(i.followRedirects){if(t._redirects===0){t._originalIpc=f,t._originalSecure=o,t._originalHostOrSocketPath=f?i.socketPath:n.host;let u=r&&r.headers;if(r={...r,headers:{}},u)for(let[S,M]of Object.entries(u))r.headers[S.toLowerCase()]=M}else if(t.listenerCount("redirect")===0){let u=f?t._originalIpc?i.socketPath===t._originalHostOrSocketPath:!1:t._originalIpc?!1:n.host===t._originalHostOrSocketPath;(!u||t._originalSecure&&!o)&&(delete i.headers.authorization,delete i.headers.cookie,u||delete i.headers.host,i.auth=void 0)}i.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(i.auth).toString("base64")),p=t._req=c(i),t._redirects&&t.emit("redirect",t.url,p)}else p=t._req=c(i);i.timeout&&p.on("timeout",()=>{v(t,p,"Opening handshake has timed out")}),p.on("error",u=>{p===null||p[Ot]||(p=t._req=null,ue(t,u))}),p.on("response",u=>{let S=u.headers.location,M=u.statusCode;if(S&&i.followRedirects&&M>=300&&M<400){if(++t._redirects>i.maxRedirects){v(t,p,"Maximum redirects exceeded");return}p.abort();let H;try{H=new Pe(S,e)}catch{let A=new SyntaxError(`Invalid URL: ${S}`);ue(t,A);return}Tt(t,H,s,r)}else t.emit("unexpected-response",p,u)||v(t,p,`Unexpected server response: ${u.statusCode}`)}),p.on("upgrade",(u,S,M)=>{if(t.emit("upgrade",u),t.readyState!==_.CONNECTING)return;p=t._req=null;let H=u.headers.upgrade;if(H===void 0||H.toLowerCase()!=="websocket"){v(t,S,"Invalid Upgrade header");return}let Fe=Cs("sha1").update(h+Rs).digest("base64");if(u.headers["sec-websocket-accept"]!==Fe){v(t,S,"Invalid Sec-WebSocket-Accept header");return}let A=u.headers["sec-websocket-protocol"],Y;if(A!==void 0?m.size?m.has(A)||(Y="Server sent an invalid subprotocol"):Y="Server sent a subprotocol but none was requested":m.size&&(Y="Server sent no subprotocol"),Y){v(t,S,Y);return}A&&(t._protocol=A);let Me=u.headers["sec-websocket-extensions"];if(Me!==void 0){if(!y){v(t,S,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let me;try{me=As(Me)}catch{v(t,S,"Invalid Sec-WebSocket-Extensions header");return}let Ae=Object.keys(me);if(Ae.length!==1||Ae[0]!==B.extensionName){v(t,S,"Server indicated an extension that was not requested");return}try{y.accept(me[B.extensionName])}catch{v(t,S,"Invalid Sec-WebSocket-Extensions header");return}t._extensions[B.extensionName]=y}t.setSocket(S,M,{allowSynchronousEvents:i.allowSynchronousEvents,generateMask:i.generateMask,maxBufferedChunks:i.maxBufferedChunks,maxFragments:i.maxFragments,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation})}),i.finishRequest?i.finishRequest(p,t):p.end()}function ue(t,e){t._readyState=_.CLOSING,t._errorEmitted=!0,t.emit("error",e),t.emitClose()}function Gs(t){return t.path=t.socketPath,bt.connect(t)}function $s(t){return t.path=void 0,!t.servername&&t.servername!==""&&(t.servername=bt.isIP(t.host)?"":t.host),Ts.connect(t)}function v(t,e,s){t._readyState=_.CLOSING;let r=new Error(s);Error.captureStackTrace(r,v),e.setHeader?(e[Ot]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(ue,t,r)):(e.destroy(r),e.once("error",t.emit.bind(t,"error")),e.once("close",t.emitClose.bind(t)))}function Ue(t,e,s){if(e){let r=Ps(e)?e.size:Ws(e).length;t._socket?t._sender._bufferedBytes+=r:t._bufferedAmount+=r}if(s){let r=new Error(`WebSocket is not open: readyState ${t.readyState} (${N[t.readyState]})`);process.nextTick(s,r)}}function js(t,e){let s=this[x];s._closeFrameReceived=!0,s._closeMessage=e,s._closeCode=t,s._socket[x]!==void 0&&(s._socket.removeListener("data",de),process.nextTick(kt,s._socket),t===1005?s.close():s.close(t,e))}function Vs(){let t=this[x];t.isPaused||t._socket.resume()}function zs(t){let e=this[x];e._socket[x]!==void 0&&(e._socket.removeListener("data",de),process.nextTick(kt,e._socket),e.close(t[Is])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t))}function vt(){this[x].emitClose()}function Hs(t,e){this[x].emit("message",t,e)}function Ys(t){let e=this[x];e._autoPong&&e.pong(t,!this._isServer,wt),e.emit("ping",t)}function Ks(t){this[x].emit("pong",t)}function kt(t){t.resume()}function Xs(t){let e=this[x];e.readyState!==_.CLOSED&&(e.readyState===_.OPEN&&(e._readyState=_.CLOSING,Ct(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",t)))}function Ct(t){t._closeTimer=setTimeout(t._socket.destroy.bind(t._socket),t._closeTimeout)}function Lt(){let t=this[x];if(this.removeListener("close",Lt),this.removeListener("data",de),this.removeListener("end",Nt),t._readyState=_.CLOSING,!this._readableState.endEmitted&&!t._closeFrameReceived&&!t._receiver._writableState.errorEmitted&&this._readableState.length!==0){let e=this.read(this._readableState.length);t._receiver.write(e)}t._receiver.end(),this[x]=void 0,clearTimeout(t._closeTimer),t._receiver._writableState.finished||t._receiver._writableState.errorEmitted?t.emitClose():(t._receiver.on("error",vt),t._receiver.on("finish",vt))}function de(t){this[x]._receiver.write(t)||this.pause()}function Nt(){let t=this[x];t._readyState=_.CLOSING,t._receiver.end(),this.end()}function Pt(){let t=this[x];this.removeListener("error",Pt),this.on("error",wt),t&&(t._readyState=_.CLOSING,this.destroy())}});var er=E((Fr,It)=>{"use strict";d();var Dr=Ie(),{Duplex:Zs}=g("stream");function Rt(t){t.emit("close")}function Qs(){!this.destroyed&&this._writableState.finished&&this.destroy()}function Ut(t){this.removeListener("error",Ut),this.destroy(),this.listenerCount("error")===0&&this.emit("error",t)}function Js(t,e){let s=!0,r=new Zs({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return t.on("message",function(n,o){let f=!o&&r._readableState.objectMode?n.toString():n;r.push(f)||t.pause()}),t.once("error",function(n){r.destroyed||(s=!1,r.destroy(n))}),t.once("close",function(){r.destroyed||r.push(null)}),r._destroy=function(i,n){if(t.readyState===t.CLOSED){n(i),process.nextTick(Rt,r);return}let o=!1;t.once("error",function(l){o=!0,n(l)}),t.once("close",function(){o||n(i),process.nextTick(Rt,r)}),s&&t.terminate()},r._final=function(i){if(t.readyState===t.CONNECTING){t.once("open",function(){r._final(i)});return}t._socket!==null&&(t._socket._writableState.finished?(i(),r._readableState.endEmitted&&r.destroy()):(t._socket.once("finish",function(){i()}),t.close()))},r._read=function(){t.isPaused&&t.resume()},r._write=function(i,n,o){if(t.readyState===t.CONNECTING){t.once("open",function(){r._write(i,n,o)});return}t.send(i,o)},r.on("end",Qs),r.on("error",Ut),r}It.exports=Js});var Ft=E((Ar,Dt)=>{"use strict";d();var{tokenChars:tr}=G();function sr(t){let e=new Set,s=-1,r=-1,i=0;for(i;i<t.length;i++){let o=t.charCodeAt(i);if(r===-1&&tr[o]===1)s===-1&&(s=i);else if(i!==0&&(o===32||o===9))r===-1&&s!==-1&&(r=i);else if(o===44){if(s===-1)throw new SyntaxError(`Unexpected character at index ${i}`);r===-1&&(r=i);let f=t.slice(s,r);if(e.has(f))throw new SyntaxError(`The "${f}" subprotocol is duplicated`);e.add(f),s=r=-1}else throw new SyntaxError(`Unexpected character at index ${i}`)}if(s===-1||r!==-1)throw new SyntaxError("Unexpected end of input");let n=t.slice(s,i);if(e.has(n))throw new SyntaxError(`The "${n}" subprotocol is duplicated`);return e.add(n),e}Dt.exports={parse:sr}});var ur=E((Gr,$t)=>{"use strict";d();var rr=g("events"),_e=g("http"),{Duplex:qr}=g("stream"),{createHash:ir}=g("crypto"),Mt=Le(),D=Z(),nr=Ft(),or=Ie(),{CLOSE_TIMEOUT:ar,GUID:fr,kWebSocket:lr}=k(),hr=/^[+/0-9A-Za-z]{22}==$/,At=0,Wt=1,Gt=2,De=class extends rr{constructor(e,s){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:1024*1024,maxFragments:128*1024,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:ar,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:or,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=_e.createServer((r,i)=>{let n=_e.STATUS_CODES[426];i.writeHead(426,{"Content-Length":n.length,"Content-Type":"text/plain"}),i.end(n)}),this._server.listen(e.port,e.host,e.backlog,s)):e.server&&(this._server=e.server),this._server){let r=this.emit.bind(this,"connection");this._removeListeners=cr(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(i,n,o)=>{this.handleUpgrade(i,n,o,r)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=At}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===Gt){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(te,this);return}if(e&&this.once("close",e),this._state!==Wt)if(this._state=Wt,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(te,this):process.nextTick(te,this);else{let s=this._server;this._removeListeners(),this._removeListeners=this._server=null,s.close(()=>{te(this)})}}shouldHandle(e){if(this.options.path){let s=e.url.indexOf("?");if((s!==-1?e.url.slice(0,s):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,s,r,i){s.on("error",qt);let n=e.headers["sec-websocket-key"],o=e.headers.upgrade,f=+e.headers["sec-websocket-version"];if(e.method!=="GET"){F(this,e,s,405,"Invalid HTTP method");return}if(o===void 0||o.toLowerCase()!=="websocket"){F(this,e,s,400,"Invalid Upgrade header");return}if(n===void 0||!hr.test(n)){F(this,e,s,400,"Missing or invalid Sec-WebSocket-Key header");return}if(f!==13&&f!==8){F(this,e,s,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){se(s,400);return}let l=e.headers["sec-websocket-protocol"],a=new Set;if(l!==void 0)try{a=nr.parse(l)}catch{F(this,e,s,400,"Invalid Sec-WebSocket-Protocol header");return}let h=e.headers["sec-websocket-extensions"],c={};if(this.options.perMessageDeflate&&h!==void 0){let m=new D({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let y=Mt.parse(h);y[D.extensionName]&&(m.accept(y[D.extensionName]),c[D.extensionName]=m)}catch{F(this,e,s,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let m={origin:e.headers[`${f===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(m,(y,p,u,S)=>{if(!y)return se(s,p||401,u,S);this.completeUpgrade(c,n,a,e,s,r,i)});return}if(!this.options.verifyClient(m))return se(s,401)}this.completeUpgrade(c,n,a,e,s,r,i)}completeUpgrade(e,s,r,i,n,o,f){if(!n.readable||!n.writable)return n.destroy();if(n[lr])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>At)return se(n,503);let a=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${ir("sha1").update(s+fr).digest("base64")}`],h=new this.options.WebSocket(null,void 0,this.options);if(r.size){let c=this.options.handleProtocols?this.options.handleProtocols(r,i):r.values().next().value;c&&(a.push(`Sec-WebSocket-Protocol: ${c}`),h._protocol=c)}if(e[D.extensionName]){let c=e[D.extensionName].params,m=Mt.format({[D.extensionName]:[c]});a.push(`Sec-WebSocket-Extensions: ${m}`),h._extensions=e}this.emit("headers",a,i),n.write(a.concat(`\r
4
- `).join(`\r
5
- `)),n.removeListener("error",qt),h.setSocket(n,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(h),h.on("close",()=>{this.clients.delete(h),this._shouldEmitClose&&!this.clients.size&&process.nextTick(te,this)})),f(h,i)}};$t.exports=De;function cr(t,e){for(let s of Object.keys(e))t.on(s,e[s]);return function(){for(let r of Object.keys(e))t.removeListener(r,e[r])}}function te(t){t._state=Gt,t.emit("close")}function qt(){this.destroy()}function se(t,e,s,r){s=s||_e.STATUS_CODES[e],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(s),...r},t.once("finish",t.destroy),t.end(`HTTP/1.1 ${e} ${_e.STATUS_CODES[e]}\r
6
- `+Object.keys(r).map(i=>`${i}: ${r[i]}`).join(`\r
7
- `)+`\r
8
- \r
9
- `+s)}function F(t,e,s,r,i,n){if(t.listenerCount("wsClientError")){let o=new Error(i);Error.captureStackTrace(o,F),t.emit("wsClientError",o,s,e)}else se(s,r,i,n)}});export{Z as a,ot as b,ht as c,Le as d,Ie as e,er as f,Ft as g,ur as h};
@@ -1,3 +0,0 @@
1
- // Force strict mode and setup for ESM
2
- "use strict";
3
- import{b as p}from"./chunk-GZPNIYVZ.js";import{d as v}from"./chunk-OWGSC52X.js";var f=v((T,y)=>{"use strict";p();var m="Function.prototype.bind called on incompatible ",O=Object.prototype.toString,w=Math.max,x="[object Function]",s=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},F=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r},S=function(a,e){for(var t="",r=0;r<a.length;r+=1)t+=a[r],r+1<a.length&&(t+=e);return t};y.exports=function(e){var t=this;if(typeof t!="function"||O.apply(t)!==x)throw new TypeError(m+t);for(var r=F(arguments,1),n,o=function(){if(this instanceof n){var c=t.apply(this,s(r,arguments));return Object(c)===c?c:this}return t.apply(e,s(r,arguments))},d=w(0,t.length-r.length),l=[],u=0;u<d;u++)l[u]="$"+u;if(n=Function("binder","return function ("+S(l,",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var i=function(){};i.prototype=t.prototype,n.prototype=new i,i.prototype=null}return n}});var g=v((j,h)=>{"use strict";p();var E=f();h.exports=Function.prototype.bind||E});var M=v((P,b)=>{"use strict";p();var R=Function.prototype.call,q=Object.prototype.hasOwnProperty,A=g();b.exports=A.call(R,q)});export{g as a,M as b};
@@ -1,26 +0,0 @@
1
- // Force strict mode and setup for ESM
2
- "use strict";
3
- import{b as w}from"./chunk-GZPNIYVZ.js";import{a as ht,d as L}from"./chunk-OWGSC52X.js";var Ft=L((We,It)=>{"use strict";w();It.exports=Ie;function Ie(i,t){for(var e=new Array(arguments.length-1),n=0,s=2,u=!0;s<arguments.length;)e[n++]=arguments[s++];return new Promise(function(g,f){e[n]=function(d){if(u)if(u=!1,d)f(d);else{for(var O=new Array(arguments.length-1),v=0;v<O.length;)O[v++]=arguments[v];g.apply(null,O)}};try{i.apply(t||null,e)}catch(o){u&&(u=!1,f(o))}})}});var Mt=L(Dt=>{"use strict";w();var rt=Dt;rt.length=function(t){var e=t.length;if(!e)return 0;for(var n=0;--e%4>1&&t.charAt(e)==="=";)++n;return Math.ceil(t.length*3)/4-n};var J=new Array(64),Ct=new Array(123);for(k=0;k<64;)Ct[J[k]=k<26?k+65:k<52?k+71:k<62?k-4:k-59|43]=k++;var k;rt.encode=function(t,e,n){for(var s=null,u=[],a=0,g=0,f;e<n;){var o=t[e++];switch(g){case 0:u[a++]=J[o>>2],f=(o&3)<<4,g=1;break;case 1:u[a++]=J[f|o>>4],f=(o&15)<<2,g=2;break;case 2:u[a++]=J[f|o>>6],u[a++]=J[o&63],g=0;break}a>8191&&((s||(s=[])).push(String.fromCharCode.apply(String,u)),a=0)}return g&&(u[a++]=J[f],u[a++]=61,g===1&&(u[a++]=61)),s?(a&&s.push(String.fromCharCode.apply(String,u.slice(0,a))),s.join("")):String.fromCharCode.apply(String,u.slice(0,a))};var St="invalid encoding";rt.decode=function(t,e,n){for(var s=n,u=0,a,g=0;g<t.length;){var f=t.charCodeAt(g++);if(f===61&&u>1)break;if((f=Ct[f])===void 0)throw Error(St);switch(u){case 0:a=f,u=1;break;case 1:e[n++]=a<<2|(f&48)>>4,a=f,u=2;break;case 2:e[n++]=(a&15)<<4|(f&60)>>2,a=f,u=3;break;case 3:e[n++]=(a&3)<<6|f,u=0;break}}if(u===1)throw Error(St);return n-s};rt.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var Ut=L((Ve,Tt)=>{"use strict";w();Tt.exports=it;function it(){this._listeners=Object.create(null)}it.prototype.on=function(t,e,n){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:e,ctx:n||this}),this};it.prototype.off=function(t,e){if(t===void 0)this._listeners=Object.create(null);else if(e===void 0)this._listeners[t]=[];else{var n=this._listeners[t];if(!n)return this;for(var s=0;s<n.length;)n[s].fn===e?n.splice(s,1):++s}return this};it.prototype.emit=function(t){var e=this._listeners[t];if(e){for(var n=[],s=1;s<arguments.length;)n.push(arguments[s++]);for(s=0;s<e.length;)e[s].fn.apply(e[s++].ctx,n)}return this}});var Zt=L((Xe,zt)=>{"use strict";w();zt.exports=jt(jt);function jt(i){return typeof Float32Array<"u"?function(){var t=new Float32Array([-0]),e=new Uint8Array(t.buffer),n=e[3]===128;function s(f,o,d){t[0]=f,o[d]=e[0],o[d+1]=e[1],o[d+2]=e[2],o[d+3]=e[3]}function u(f,o,d){t[0]=f,o[d]=e[3],o[d+1]=e[2],o[d+2]=e[1],o[d+3]=e[0]}i.writeFloatLE=n?s:u,i.writeFloatBE=n?u:s;function a(f,o){return e[0]=f[o],e[1]=f[o+1],e[2]=f[o+2],e[3]=f[o+3],t[0]}function g(f,o){return e[3]=f[o],e[2]=f[o+1],e[1]=f[o+2],e[0]=f[o+3],t[0]}i.readFloatLE=n?a:g,i.readFloatBE=n?g:a}():function(){function t(n,s,u,a){var g=s<0?1:0;if(g&&(s=-s),s===0)n(1/s>0?0:2147483648,u,a);else if(isNaN(s))n(2143289344,u,a);else if(s>34028234663852886e22)n((g<<31|2139095040)>>>0,u,a);else if(s<11754943508222875e-54)n((g<<31|Math.round(s/1401298464324817e-60))>>>0,u,a);else{var f=Math.floor(Math.log(s)/Math.LN2),o=Math.round(s*Math.pow(2,-f)*8388608)&8388607;n((g<<31|f+127<<23|o)>>>0,u,a)}}i.writeFloatLE=t.bind(null,kt),i.writeFloatBE=t.bind(null,Pt);function e(n,s,u){var a=n(s,u),g=(a>>31)*2+1,f=a>>>23&255,o=a&8388607;return f===255?o?NaN:g*(1/0):f===0?g*1401298464324817e-60*o:g*Math.pow(2,f-150)*(o+8388608)}i.readFloatLE=e.bind(null,Rt),i.readFloatBE=e.bind(null,Wt)}(),typeof Float64Array<"u"?function(){var t=new Float64Array([-0]),e=new Uint8Array(t.buffer),n=e[7]===128;function s(f,o,d){t[0]=f,o[d]=e[0],o[d+1]=e[1],o[d+2]=e[2],o[d+3]=e[3],o[d+4]=e[4],o[d+5]=e[5],o[d+6]=e[6],o[d+7]=e[7]}function u(f,o,d){t[0]=f,o[d]=e[7],o[d+1]=e[6],o[d+2]=e[5],o[d+3]=e[4],o[d+4]=e[3],o[d+5]=e[2],o[d+6]=e[1],o[d+7]=e[0]}i.writeDoubleLE=n?s:u,i.writeDoubleBE=n?u:s;function a(f,o){return e[0]=f[o],e[1]=f[o+1],e[2]=f[o+2],e[3]=f[o+3],e[4]=f[o+4],e[5]=f[o+5],e[6]=f[o+6],e[7]=f[o+7],t[0]}function g(f,o){return e[7]=f[o],e[6]=f[o+1],e[5]=f[o+2],e[4]=f[o+3],e[3]=f[o+4],e[2]=f[o+5],e[1]=f[o+6],e[0]=f[o+7],t[0]}i.readDoubleLE=n?a:g,i.readDoubleBE=n?g:a}():function(){function t(n,s,u,a,g,f){var o=a<0?1:0;if(o&&(a=-a),a===0)n(0,g,f+s),n(1/a>0?0:2147483648,g,f+u);else if(isNaN(a))n(0,g,f+s),n(2146959360,g,f+u);else if(a>17976931348623157e292)n(0,g,f+s),n((o<<31|2146435072)>>>0,g,f+u);else{var d;if(a<22250738585072014e-324)d=a/5e-324,n(d>>>0,g,f+s),n((o<<31|d/4294967296)>>>0,g,f+u);else{var O=Math.floor(Math.log(a)/Math.LN2);O===1024&&(O=1023),d=a*Math.pow(2,-O),n(d*4503599627370496>>>0,g,f+s),n((o<<31|O+1023<<20|d*1048576&1048575)>>>0,g,f+u)}}}i.writeDoubleLE=t.bind(null,kt,0,4),i.writeDoubleBE=t.bind(null,Pt,4,0);function e(n,s,u,a,g){var f=n(a,g+s),o=n(a,g+u),d=(o>>31)*2+1,O=o>>>20&2047,v=4294967296*(o&1048575)+f;return O===2047?v?NaN:d*(1/0):O===0?d*5e-324*v:d*Math.pow(2,O-1075)*(v+4503599627370496)}i.readDoubleLE=e.bind(null,Rt,0,4),i.readDoubleBE=e.bind(null,Wt,4,0)}(),i}function kt(i,t,e){t[e]=i&255,t[e+1]=i>>>8&255,t[e+2]=i>>>16&255,t[e+3]=i>>>24}function Pt(i,t,e){t[e]=i>>>24,t[e+1]=i>>>16&255,t[e+2]=i>>>8&255,t[e+3]=i&255}function Rt(i,t){return(i[t]|i[t+1]<<8|i[t+2]<<16|i[t+3]<<24)>>>0}function Wt(i,t){return(i[t]<<24|i[t+1]<<16|i[t+2]<<8|i[t+3])>>>0}});var Vt=L((Je,Ht)=>{"use strict";w();Ht.exports=Fe;function Fe(i){try{if(typeof ht!="function")return null;var t=ht(i);return t&&(t.length||Object.keys(t).length)?t:null}catch{return null}}});var Xt=L(Gt=>{"use strict";w();var ut=Gt,ft="\uFFFD";ut.length=function(t){for(var e=0,n=0,s=0;s<t.length;++s)n=t.charCodeAt(s),n<128?e+=1:n<2048?e+=2:(n&64512)===55296&&(t.charCodeAt(s+1)&64512)===56320?(++s,e+=4):e+=3;return e};ut.read=function(t,e,n){if(n-e<1)return"";for(var s="",u=e;u<n;){var a=t[u++];if(a<=127)s+=String.fromCharCode(a);else if(a>=192&&a<224){var g=(a&31)<<6|t[u++]&63;s+=g>=128?String.fromCharCode(g):ft}else if(a>=224&&a<240){var f=(a&15)<<12|(t[u++]&63)<<6|t[u++]&63;s+=f>=2048?String.fromCharCode(f):ft}else if(a>=240){var o=(a&7)<<18|(t[u++]&63)<<12|(t[u++]&63)<<6|t[u++]&63;o<65536||o>1114111?s+=ft:(o-=65536,s+=String.fromCharCode(55296+(o>>10)),s+=String.fromCharCode(56320+(o&1023)))}}return s};ut.write=function(t,e,n){for(var s=n,u,a,g=0;g<t.length;++g)u=t.charCodeAt(g),u<128?e[n++]=u:u<2048?(e[n++]=u>>6|192,e[n++]=u&63|128):(u&64512)===55296&&((a=t.charCodeAt(g+1))&64512)===56320?(u=65536+((u&1023)<<10)+(a&1023),++g,e[n++]=u>>18|240,e[n++]=u>>12&63|128,e[n++]=u>>6&63|128,e[n++]=u&63|128):(e[n++]=u>>12|224,e[n++]=u>>6&63|128,e[n++]=u&63|128);return n-s}});var Jt=L((er,$t)=>{"use strict";w();$t.exports=Se;function Se(i,t,e){var n=e||8192,s=n>>>1,u=null,a=n;return function(f){if(f<1||f>s)return i(f);a+f>n&&(u=i(n),a=0);var o=t.call(u,a,a+=f);return a&7&&(a=(a|7)+1),o}}});var Qt=L((ir,Kt)=>{"use strict";w();Kt.exports=A;var K=Z();function A(i,t){this.lo=i>>>0,this.hi=t>>>0}var V=A.zero=new A(0,0);V.toNumber=function(){return 0};V.zzEncode=V.zzDecode=function(){return this};V.length=function(){return 1};var Ce=A.zeroHash="\0\0\0\0\0\0\0\0";A.fromNumber=function(t){if(t===0)return V;var e=t<0;e&&(t=-t);var n=t>>>0,s=(t-n)/4294967296>>>0;return e&&(s=~s>>>0,n=~n>>>0,++n>4294967295&&(n=0,++s>4294967295&&(s=0))),new A(n,s)};A.from=function(t){if(typeof t=="number")return A.fromNumber(t);if(K.isString(t))if(K.Long)t=K.Long.fromString(t);else return A.fromNumber(parseInt(t,10));return t.low||t.high?new A(t.low>>>0,t.high>>>0):V};A.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var e=~this.lo+1>>>0,n=~this.hi>>>0;return e||(n=n+1>>>0),-(e+n*4294967296)}return this.lo+this.hi*4294967296};A.prototype.toLong=function(t){return K.Long?new K.Long(this.lo|0,this.hi|0,!!t):{low:this.lo|0,high:this.hi|0,unsigned:!!t}};var z=String.prototype.charCodeAt;A.fromHash=function(t){return t===Ce?V:new A((z.call(t,0)|z.call(t,1)<<8|z.call(t,2)<<16|z.call(t,3)<<24)>>>0,(z.call(t,4)|z.call(t,5)<<8|z.call(t,6)<<16|z.call(t,7)<<24)>>>0)};A.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};A.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this};A.prototype.zzDecode=function(){var t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this};A.prototype.length=function(){var t=this.lo,e=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return n===0?e===0?t<16384?t<128?1:2:t<2097152?3:4:e<16384?e<128?5:6:e<2097152?7:8:n<128?9:10}});var Yt=L((Q,at)=>{w();(function(i,t){function e(n){return n.default||n}typeof define=="function"&&define.amd?define([],function(){var n={};return t(n),e(n)}):typeof Q=="object"?(t(Q),typeof at=="object"&&(at.exports=e(Q))):function(){var n={};t(n),i.Long=e(n)}()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Q,function(i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function e(h,r,c){this.low=h|0,this.high=r|0,this.unsigned=!!c}e.prototype.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0});function n(h){return(h&&h.__isLong__)===!0}function s(h){var r=Math.clz32(h&-h);return h?31-r:r}e.isLong=n;var u={},a={};function g(h,r){var c,y,E;return r?(h>>>=0,(E=0<=h&&h<256)&&(y=a[h],y)?y:(c=o(h,0,!0),E&&(a[h]=c),c)):(h|=0,(E=-128<=h&&h<128)&&(y=u[h],y)?y:(c=o(h,h<0?-1:0,!1),E&&(u[h]=c),c))}e.fromInt=g;function f(h,r){if(isNaN(h))return r?W:j;if(r){if(h<0)return W;if(h>=Bt)return qt}else{if(h<=-Lt)return I;if(h+1>=Lt)return Ot}return h<0?f(-h,r).neg():o(h%X|0,h/X|0,r)}e.fromNumber=f;function o(h,r,c){return new e(h,r,c)}e.fromBits=o;var d=Math.pow;function O(h,r,c){if(h.length===0)throw Error("empty string");if(typeof r=="number"?(c=r,r=!1):r=!!r,h==="NaN"||h==="Infinity"||h==="+Infinity"||h==="-Infinity")return r?W:j;if(c=c||10,c<2||36<c)throw RangeError("radix");var y;if((y=h.indexOf("-"))>0)throw Error("interior hyphen");if(y===0)return O(h.substring(1),r,c).neg();for(var E=f(d(c,8)),m=j,B=0;B<h.length;B+=8){var F=Math.min(8,h.length-B),D=parseInt(h.substring(B,B+F),c);if(F<8){var q=f(d(c,F));m=m.mul(q).add(f(D))}else m=m.mul(E),m=m.add(f(D))}return m.unsigned=r,m}e.fromString=O;function v(h,r){return typeof h=="number"?f(h,r):typeof h=="string"?O(h,r):o(h.low,h.high,typeof r=="boolean"?r:h.unsigned)}e.fromValue=v;var xt=65536,qe=1<<24,X=xt*xt,Bt=X*X,Lt=Bt/2,Nt=g(qe),j=g(0);e.ZERO=j;var W=g(0,!0);e.UZERO=W;var $=g(1);e.ONE=$;var At=g(1,!0);e.UONE=At;var st=g(-1);e.NEG_ONE=st;var Ot=o(-1,2147483647,!1);e.MAX_VALUE=Ot;var qt=o(-1,-1,!0);e.MAX_UNSIGNED_VALUE=qt;var I=o(0,-2147483648,!1);e.MIN_VALUE=I;var l=e.prototype;l.toInt=function(){return this.unsigned?this.low>>>0:this.low},l.toNumber=function(){return this.unsigned?(this.high>>>0)*X+(this.low>>>0):this.high*X+(this.low>>>0)},l.toString=function(r){if(r=r||10,r<2||36<r)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(I)){var c=f(r),y=this.div(c),E=y.mul(c).sub(this);return y.toString(r)+E.toInt().toString(r)}else return"-"+this.neg().toString(r);for(var m=f(d(r,6),this.unsigned),B=this,F="";;){var D=B.div(m),q=B.sub(D.mul(m)).toInt()>>>0,x=q.toString(r);if(B=D,B.isZero())return x+F;for(;x.length<6;)x="0"+x;F=""+x+F}},l.getHighBits=function(){return this.high},l.getHighBitsUnsigned=function(){return this.high>>>0},l.getLowBits=function(){return this.low},l.getLowBitsUnsigned=function(){return this.low>>>0},l.getNumBitsAbs=function(){if(this.isNegative())return this.eq(I)?64:this.neg().getNumBitsAbs();for(var r=this.high!=0?this.high:this.low,c=31;c>0&&(r&1<<c)==0;c--);return this.high!=0?c+33:c+1},l.isSafeInteger=function(){var r=this.high>>21;return r?this.unsigned?!1:r===-1&&!(this.low===0&&this.high===-2097152):!0},l.isZero=function(){return this.high===0&&this.low===0},l.eqz=l.isZero,l.isNegative=function(){return!this.unsigned&&this.high<0},l.isPositive=function(){return this.unsigned||this.high>=0},l.isOdd=function(){return(this.low&1)===1},l.isEven=function(){return(this.low&1)===0},l.equals=function(r){return n(r)||(r=v(r)),this.unsigned!==r.unsigned&&this.high>>>31===1&&r.high>>>31===1?!1:this.high===r.high&&this.low===r.low},l.eq=l.equals,l.notEquals=function(r){return!this.eq(r)},l.neq=l.notEquals,l.ne=l.notEquals,l.lessThan=function(r){return this.comp(r)<0},l.lt=l.lessThan,l.lessThanOrEqual=function(r){return this.comp(r)<=0},l.lte=l.lessThanOrEqual,l.le=l.lessThanOrEqual,l.greaterThan=function(r){return this.comp(r)>0},l.gt=l.greaterThan,l.greaterThanOrEqual=function(r){return this.comp(r)>=0},l.gte=l.greaterThanOrEqual,l.ge=l.greaterThanOrEqual,l.compare=function(r){if(n(r)||(r=v(r)),this.eq(r))return 0;var c=this.isNegative(),y=r.isNegative();return c&&!y?-1:!c&&y?1:this.unsigned?r.high>>>0>this.high>>>0||r.high===this.high&&r.low>>>0>this.low>>>0?-1:1:this.sub(r).isNegative()?-1:1},l.comp=l.compare,l.negate=function(){return!this.unsigned&&this.eq(I)?I:this.not().add($)},l.neg=l.negate,l.add=function(r){n(r)||(r=v(r));var c=this.high>>>16,y=this.high&65535,E=this.low>>>16,m=this.low&65535,B=r.high>>>16,F=r.high&65535,D=r.low>>>16,q=r.low&65535,x=0,M=0,N=0,C=0;return C+=m+q,N+=C>>>16,C&=65535,N+=E+D,M+=N>>>16,N&=65535,M+=y+F,x+=M>>>16,M&=65535,x+=c+B,x&=65535,o(N<<16|C,x<<16|M,this.unsigned)},l.subtract=function(r){return n(r)||(r=v(r)),this.add(r.neg())},l.sub=l.subtract,l.multiply=function(r){if(this.isZero())return this;if(n(r)||(r=v(r)),t){var c=t.mul(this.low,this.high,r.low,r.high);return o(c,t.get_high(),this.unsigned)}if(r.isZero())return this.unsigned?W:j;if(this.eq(I))return r.isOdd()?I:j;if(r.eq(I))return this.isOdd()?I:j;if(this.isNegative())return r.isNegative()?this.neg().mul(r.neg()):this.neg().mul(r).neg();if(r.isNegative())return this.mul(r.neg()).neg();if(this.lt(Nt)&&r.lt(Nt))return f(this.toNumber()*r.toNumber(),this.unsigned);var y=this.high>>>16,E=this.high&65535,m=this.low>>>16,B=this.low&65535,F=r.high>>>16,D=r.high&65535,q=r.low>>>16,x=r.low&65535,M=0,N=0,C=0,et=0;return et+=B*x,C+=et>>>16,et&=65535,C+=m*x,N+=C>>>16,C&=65535,C+=B*q,N+=C>>>16,C&=65535,N+=E*x,M+=N>>>16,N&=65535,N+=m*q,M+=N>>>16,N&=65535,N+=B*D,M+=N>>>16,N&=65535,M+=y*x+E*q+m*D+B*F,M&=65535,o(C<<16|et,M<<16|N,this.unsigned)},l.mul=l.multiply,l.divide=function(r){if(n(r)||(r=v(r)),r.isZero())throw Error("division by zero");if(t){if(!this.unsigned&&this.high===-2147483648&&r.low===-1&&r.high===-1)return this;var c=(this.unsigned?t.div_u:t.div_s)(this.low,this.high,r.low,r.high);return o(c,t.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?W:j;var y,E,m;if(this.unsigned){if(r.unsigned||(r=r.toUnsigned()),r.gt(this))return W;if(r.gt(this.shru(1)))return At;m=W}else{if(this.eq(I)){if(r.eq($)||r.eq(st))return I;if(r.eq(I))return $;var B=this.shr(1);return y=B.div(r).shl(1),y.eq(j)?r.isNegative()?$:st:(E=this.sub(r.mul(y)),m=y.add(E.div(r)),m)}else if(r.eq(I))return this.unsigned?W:j;if(this.isNegative())return r.isNegative()?this.neg().div(r.neg()):this.neg().div(r).neg();if(r.isNegative())return this.div(r.neg()).neg();m=j}for(E=this;E.gte(r);){y=Math.max(1,Math.floor(E.toNumber()/r.toNumber()));for(var F=Math.ceil(Math.log(y)/Math.LN2),D=F<=48?1:d(2,F-48),q=f(y),x=q.mul(r);x.isNegative()||x.gt(E);)y-=D,q=f(y,this.unsigned),x=q.mul(r);q.isZero()&&(q=$),m=m.add(q),E=E.sub(x)}return m},l.div=l.divide,l.modulo=function(r){if(n(r)||(r=v(r)),t){var c=(this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,r.low,r.high);return o(c,t.get_high(),this.unsigned)}return this.sub(this.div(r).mul(r))},l.mod=l.modulo,l.rem=l.modulo,l.not=function(){return o(~this.low,~this.high,this.unsigned)},l.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},l.clz=l.countLeadingZeros,l.countTrailingZeros=function(){return this.low?s(this.low):s(this.high)+32},l.ctz=l.countTrailingZeros,l.and=function(r){return n(r)||(r=v(r)),o(this.low&r.low,this.high&r.high,this.unsigned)},l.or=function(r){return n(r)||(r=v(r)),o(this.low|r.low,this.high|r.high,this.unsigned)},l.xor=function(r){return n(r)||(r=v(r)),o(this.low^r.low,this.high^r.high,this.unsigned)},l.shiftLeft=function(r){return n(r)&&(r=r.toInt()),(r&=63)===0?this:r<32?o(this.low<<r,this.high<<r|this.low>>>32-r,this.unsigned):o(0,this.low<<r-32,this.unsigned)},l.shl=l.shiftLeft,l.shiftRight=function(r){return n(r)&&(r=r.toInt()),(r&=63)===0?this:r<32?o(this.low>>>r|this.high<<32-r,this.high>>r,this.unsigned):o(this.high>>r-32,this.high>=0?0:-1,this.unsigned)},l.shr=l.shiftRight,l.shiftRightUnsigned=function(r){return n(r)&&(r=r.toInt()),(r&=63)===0?this:r<32?o(this.low>>>r|this.high<<32-r,this.high>>>r,this.unsigned):r===32?o(this.high,0,this.unsigned):o(this.high>>>r-32,0,this.unsigned)},l.shru=l.shiftRightUnsigned,l.shr_u=l.shiftRightUnsigned,l.rotateLeft=function(r){var c;return n(r)&&(r=r.toInt()),(r&=63)===0?this:r===32?o(this.high,this.low,this.unsigned):r<32?(c=32-r,o(this.low<<r|this.high>>>c,this.high<<r|this.low>>>c,this.unsigned)):(r-=32,c=32-r,o(this.high<<r|this.low>>>c,this.low<<r|this.high>>>c,this.unsigned))},l.rotl=l.rotateLeft,l.rotateRight=function(r){var c;return n(r)&&(r=r.toInt()),(r&=63)===0?this:r===32?o(this.high,this.low,this.unsigned):r<32?(c=32-r,o(this.high<<c|this.low>>>r,this.low<<c|this.high>>>r,this.unsigned)):(r-=32,c=32-r,o(this.low<<c|this.high>>>r,this.high<<c|this.low>>>r,this.unsigned))},l.rotr=l.rotateRight,l.toSigned=function(){return this.unsigned?o(this.low,this.high,!1):this},l.toUnsigned=function(){return this.unsigned?this:o(this.low,this.high,!0)},l.toBytes=function(r){return r?this.toBytesLE():this.toBytesBE()},l.toBytesLE=function(){var r=this.high,c=this.low;return[c&255,c>>>8&255,c>>>16&255,c>>>24,r&255,r>>>8&255,r>>>16&255,r>>>24]},l.toBytesBE=function(){var r=this.high,c=this.low;return[r>>>24,r>>>16&255,r>>>8&255,r&255,c>>>24,c>>>16&255,c>>>8&255,c&255]},e.fromBytes=function(r,c,y){return y?e.fromBytesLE(r,c):e.fromBytesBE(r,c)},e.fromBytesLE=function(r,c){return new e(r[0]|r[1]<<8|r[2]<<16|r[3]<<24,r[4]|r[5]<<8|r[6]<<16|r[7]<<24,c)},e.fromBytesBE=function(r,c){return new e(r[4]<<24|r[5]<<16|r[6]<<8|r[7],r[0]<<24|r[1]<<16|r[2]<<8|r[3],c)},typeof BigInt=="function"&&(e.fromBigInt=function(r,c){var y=Number(BigInt.asIntN(32,r)),E=Number(BigInt.asIntN(32,r>>BigInt(32)));return o(y,E,c)},e.fromValue=function(r,c){return typeof r=="bigint"?e.fromBigInt(r,c):v(r,c)},l.toBigInt=function(){var r=BigInt(this.low>>>0),c=BigInt(this.unsigned?this.high>>>0:this.high);return c<<BigInt(32)|r});var Re=i.default=e})});var Z=L(lt=>{"use strict";w();var p=lt;p.asPromise=Ft();p.base64=Mt();p.EventEmitter=Ut();p.float=Zt();p.inquire=Vt();p.utf8=Xt();p.pool=Jt();p.LongBits=Qt();function te(i){return i==="__proto__"||i==="prototype"||i==="constructor"}p.isUnsafeProperty=te;p.isNode=!!(typeof globalThis<"u"&&globalThis&&globalThis.process&&globalThis.process.versions&&globalThis.process.versions.node);p.global=p.isNode&&globalThis||typeof window<"u"&&window||typeof self<"u"&&self||lt;p.emptyArray=Object.freeze?Object.freeze([]):[];p.emptyObject=Object.freeze?Object.freeze({}):{};p.isInteger=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};p.isString=function(t){return typeof t=="string"||t instanceof String};p.isObject=function(t){return t&&typeof t=="object"};p.isset=p.isSet=function(t,e){var n=t[e];return n!=null&&t.hasOwnProperty(e)?typeof n!="object"||(Array.isArray(n)?n.length:Object.keys(n).length)>0:!1};p.Buffer=function(){try{var i=p.global.Buffer;return i.prototype.utf8Write?i:null}catch{return null}}();p._Buffer_from=null;p._Buffer_allocUnsafe=null;p.newBuffer=function(t){return typeof t=="number"?p.Buffer?p._Buffer_allocUnsafe(t):new p.Array(t):p.Buffer?p._Buffer_from(t):typeof Uint8Array>"u"?t:new Uint8Array(t)};p.Array=typeof Uint8Array<"u"?Uint8Array:Array;p.Long=p.global.dcodeIO&&p.global.dcodeIO.Long||p.global.Long||function(){try{var i=Yt();return i&&i.isLong?i:null}catch{return null}}();p.key2Re=/^true|false|0|1$/;p.key32Re=/^-?(?:0|[1-9][0-9]*)$/;p.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;p.longToHash=function(t){return t?p.LongBits.from(t).toHash():p.LongBits.zeroHash};p.longFromHash=function(t,e){var n=p.LongBits.fromHash(t);return p.Long?p.Long.fromBits(n.lo,n.hi,e):n.toNumber(!!e)};function ee(i){var t=typeof arguments[arguments.length-1]=="boolean",e=t?arguments.length-1:arguments.length;t=t&&arguments[arguments.length-1];for(var n=1;n<e;++n){var s=arguments[n];if(s)for(var u=Object.keys(s),a=0;a<u.length;++a)!te(u[a])&&(i[u[a]]===void 0||!t)&&(i[u[a]]=s[u[a]])}return i}p.merge=ee;p.nestingLimit=32;p.recursionLimit=100;p.makeProp=function(t,e){Object.defineProperty(t,e,{enumerable:!0,configurable:!0,writable:!0})};p.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)};function re(i){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:new Error().stack||""}),n&&ee(this,n)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return i},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}p.newError=re;p.ProtocolError=re("ProtocolError");p.oneOfGetter=function(t){for(var e={},n=0;n<t.length;++n)e[t[n]]=1;return function(){for(var s=Object.keys(this),u=s.length-1;u>-1;--u)if(e[s[u]]===1&&this[s[u]]!==void 0&&this[s[u]]!==null)return s[u]}};p.oneOfSetter=function(t){return function(e){for(var n=0;n<t.length;++n)t[n]!==e&&delete this[t[n]]}};p.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};p._configure=function(){var i=p.Buffer;if(!i){p._Buffer_from=p._Buffer_allocUnsafe=null;return}p._Buffer_from=i.from!==Uint8Array.from&&i.from||function(e,n){return new i(e,n)},p._Buffer_allocUnsafe=i.allocUnsafe||function(e){return new i(e)}}});var _t=L((fr,se)=>{"use strict";w();se.exports=_;var T=Z(),ct,nt=T.LongBits,ie=T.base64,ne=T.utf8;function Y(i,t,e){this.fn=i,this.len=t,this.next=void 0,this.val=e}function pt(){}function De(i){this.head=i.head,this.tail=i.tail,this.len=i.len,this.next=i.states}function _(){this.len=0,this.head=new Y(pt,0,0),this.tail=this.head,this.states=null}var oe=function(){return T.Buffer?function(){return(_.create=function(){return new ct})()}:function(){return new _}};_.create=oe();_.alloc=function(t){return new T.Array(t)};T.Array!==Array&&(_.alloc=T.pool(_.alloc,T.Array.prototype.subarray));_.prototype._push=function(t,e,n){return this.tail=this.tail.next=new Y(t,e,n),this.len+=e,this};function dt(i,t,e){t[e]=i&255}function Me(i,t,e){for(;i>127;)t[e++]=i&127|128,i>>>=7;t[e]=i}function wt(i,t){this.len=i,this.next=void 0,this.val=t}wt.prototype=Object.create(Y.prototype);wt.prototype.fn=Me;_.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new wt((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this};_.prototype.int32=function(t){return(t|=0)<0?this._push(yt,10,nt.fromNumber(t)):this.uint32(t)};_.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function yt(i,t,e){for(var n=i.lo,s=i.hi;s;)t[e++]=n&127|128,n=(n>>>7|s<<25)>>>0,s>>>=7;for(;n>127;)t[e++]=n&127|128,n=n>>>7;t[e++]=n}_.prototype.uint64=function(t){var e=nt.from(t);return this._push(yt,e.length(),e)};_.prototype.int64=_.prototype.uint64;_.prototype.sint64=function(t){var e=nt.from(t).zzEncode();return this._push(yt,e.length(),e)};_.prototype.bool=function(t){return this._push(dt,1,t?1:0)};function gt(i,t,e){t[e]=i&255,t[e+1]=i>>>8&255,t[e+2]=i>>>16&255,t[e+3]=i>>>24}_.prototype.fixed32=function(t){return this._push(gt,4,t>>>0)};_.prototype.sfixed32=_.prototype.fixed32;_.prototype.fixed64=function(t){var e=nt.from(t);return this._push(gt,4,e.lo)._push(gt,4,e.hi)};_.prototype.sfixed64=_.prototype.fixed64;_.prototype.float=function(t){return this._push(T.float.writeFloatLE,4,t)};_.prototype.double=function(t){return this._push(T.float.writeDoubleLE,8,t)};var Te=T.Array.prototype.set?function(t,e,n){e.set(t,n)}:function(t,e,n){for(var s=0;s<t.length;++s)e[n+s]=t[s]};_.prototype.bytes=function(t){var e=t.length>>>0;if(!e)return this._push(dt,1,0);if(T.isString(t)){var n=_.alloc(e=ie.length(t));ie.decode(t,n,0),t=n}return this.uint32(e)._push(Te,e,t)};_.prototype.string=function(t){var e=ne.length(t);return e?this.uint32(e)._push(ne.write,e,t):this._push(dt,1,0)};_.prototype.fork=function(){return this.states=new De(this),this.head=this.tail=new Y(pt,0,0),this.len=0,this};_.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Y(pt,0,0),this.len=0),this};_.prototype.ldelim=function(){var t=this.head,e=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=t.next,this.tail=e,this.len+=n),this};_.prototype.finish=function(){for(var t=this.head.next,e=this.constructor.alloc(this.len),n=0;t;)t.fn(t.val,e,n),n+=t.len,t=t.next;return e};_._configure=function(i){ct=i,_.create=oe(),ct._configure()}});var ue=L((ar,fe)=>{"use strict";w();fe.exports=R;var he=_t();(R.prototype=Object.create(he.prototype)).constructor=R;var H=Z();function R(){he.call(this)}R._configure=function(){R.alloc=H._Buffer_allocUnsafe,R.writeBytesBuffer=H.Buffer&&H.Buffer.prototype instanceof Uint8Array&&H.Buffer.prototype.set.name==="set"?function(t,e,n){e.set(t,n)}:function(t,e,n){if(t.copy)t.copy(e,n,0,t.length);else for(var s=0;s<t.length;)e[n++]=t[s++]}};R.prototype.bytes=function(t){H.isString(t)&&(t=H._Buffer_from(t,"base64"));var e=t.length>>>0;return this.uint32(e),e&&this._push(R.writeBytesBuffer,e,t),this};function Ue(i,t,e){i.length<40?H.utf8.write(i,t,e):t.utf8Write?t.utf8Write(i,e):t.write(i,e)}R.prototype.string=function(t){var e=H.Buffer.byteLength(t);return this.uint32(e),e&&this._push(Ue,e,t),this};R._configure()});var bt=L((cr,pe)=>{"use strict";w();pe.exports=b;var U=Z(),Et,ce=U.LongBits,je=U.utf8;function P(i,t){return RangeError("index out of range: "+i.pos+" + "+(t||1)+" > "+i.len)}function b(i){this.buf=i,this.pos=0,this.len=i.length}var ae=typeof Uint8Array<"u"?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new b(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new b(t);throw Error("illegal buffer")},ge=function(){return U.Buffer?function(e){return(b.create=function(s){return U.Buffer.isBuffer(s)?new Et(s):ae(s)})(e)}:ae};b.create=ge();b.prototype._slice=U.Array.prototype.subarray||U.Array.prototype.slice;b.prototype.uint32=function(){var t=4294967295;return function(){if(t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(t=(t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,P(this,10);return t}}();b.prototype.int32=function(){return this.uint32()|0};b.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(t&1)|0};function mt(){var i=new ce(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(i.lo=(i.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return i;if(i.lo=(i.lo|(this.buf[this.pos]&127)<<28)>>>0,i.hi=(i.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return i;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw P(this);if(i.lo=(i.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return i}return i.lo=(i.lo|(this.buf[this.pos++]&127)<<t*7)>>>0,i}if(this.len-this.pos>4){for(;t<5;++t)if(i.hi=(i.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return i}else for(;t<5;++t){if(this.pos>=this.len)throw P(this);if(i.hi=(i.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return i}throw Error("invalid varint encoding")}b.prototype.bool=function(){return this.uint32()!==0};function ot(i,t){return(i[t-4]|i[t-3]<<8|i[t-2]<<16|i[t-1]<<24)>>>0}b.prototype.fixed32=function(){if(this.pos+4>this.len)throw P(this,4);return ot(this.buf,this.pos+=4)};b.prototype.sfixed32=function(){if(this.pos+4>this.len)throw P(this,4);return ot(this.buf,this.pos+=4)|0};function le(){if(this.pos+8>this.len)throw P(this,8);return new ce(ot(this.buf,this.pos+=4),ot(this.buf,this.pos+=4))}b.prototype.float=function(){if(this.pos+4>this.len)throw P(this,4);var t=U.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};b.prototype.double=function(){if(this.pos+8>this.len)throw P(this,4);var t=U.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t};b.prototype.bytes=function(){var t=this.uint32(),e=this.pos,n=this.pos+t;if(n>this.len)throw P(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(e,n);if(e===n){var s=U.Buffer;return s?s.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,e,n)};b.prototype.string=function(){var t=this.bytes();return je.read(t,0,t.length)};b.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw P(this,t);this.pos+=t}else do if(this.pos>=this.len)throw P(this);while(this.buf[this.pos++]&128);return this};b.recursionLimit=U.recursionLimit;b.prototype.skipType=function(i,t){if(t===void 0&&(t=0),t>b.recursionLimit)throw Error("maximum nesting depth exceeded");switch(i){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(i=this.uint32()&7)!==4;)this.skipType(i,t+1);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+i+" at offset "+this.pos)}return this};b._configure=function(i){Et=i,b.create=ge(),Et._configure();var t=U.Long?"toLong":"toNumber";U.merge(b.prototype,{int64:function(){return mt.call(this)[t](!1)},uint64:function(){return mt.call(this)[t](!0)},sint64:function(){return mt.call(this).zzDecode()[t](!1)},fixed64:function(){return le.call(this)[t](!0)},sfixed64:function(){return le.call(this)[t](!1)}})}});var _e=L((pr,ye)=>{"use strict";w();ye.exports=G;var we=bt();(G.prototype=Object.create(we.prototype)).constructor=G;var de=Z();function G(i){we.call(this,i)}G._configure=function(){de.Buffer&&(G.prototype._slice=de.Buffer.prototype.slice)};G.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))};G._configure()});var Ee=L((wr,me)=>{"use strict";w();me.exports=tt;var vt=Z();(tt.prototype=Object.create(vt.EventEmitter.prototype)).constructor=tt;function tt(i,t,e){if(typeof i!="function")throw TypeError("rpcImpl must be a function");vt.EventEmitter.call(this),this.rpcImpl=i,this.requestDelimited=!!t,this.responseDelimited=!!e}tt.prototype.rpcCall=function i(t,e,n,s,u){if(!s)throw TypeError("request must be specified");var a=this;if(!u)return vt.asPromise(i,a,t,e,n,s);if(!a.rpcImpl){setTimeout(function(){u(Error("already ended"))},0);return}try{return a.rpcImpl(t,e[a.requestDelimited?"encodeDelimited":"encode"](s).finish(),function(f,o){if(f)return a.emit("error",f,t),u(f);if(o===null){a.end(!0);return}if(!(o instanceof n))try{o=n[a.responseDelimited?"decodeDelimited":"decode"](o)}catch(d){return a.emit("error",d,t),u(d)}return a.emit("data",o,t),u(null,o)})}catch(g){a.emit("error",g,t),setTimeout(function(){u(g)},0);return}};tt.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var ve=L(be=>{"use strict";w();var ke=be;ke.Service=Ee()});var Be=L((Er,xe)=>{"use strict";w();xe.exports={}});var Ae=L(Ne=>{"use strict";w();var S=Ne;S.build="minimal";S.Writer=_t();S.BufferWriter=ue();S.Reader=bt();S.BufferReader=_e();S.util=Z();S.rpc=ve();S.roots=Be();S.configure=Le;function Le(){S.util._configure(),S.Writer._configure(S.BufferWriter),S.Reader._configure(S.BufferReader)}Le()});var Pe=L((Br,Oe)=>{"use strict";w();Oe.exports=Ae()});export{Ft as a,Yt as b,Z as c,_t as d,bt as e,ve as f,Be as g,Ae as h,Pe as i};
4
- /*! Bundled license information:
5
-
6
- long/umd/index.js:
7
- (**
8
- * @license
9
- * Copyright 2009 The Closure Library Authors
10
- * Copyright 2020 Daniel Wirtz / The long.js Authors.
11
- *
12
- * Licensed under the Apache License, Version 2.0 (the "License");
13
- * you may not use this file except in compliance with the License.
14
- * You may obtain a copy of the License at
15
- *
16
- * http://www.apache.org/licenses/LICENSE-2.0
17
- *
18
- * Unless required by applicable law or agreed to in writing, software
19
- * distributed under the License is distributed on an "AS IS" BASIS,
20
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
- * See the License for the specific language governing permissions and
22
- * limitations under the License.
23
- *
24
- * SPDX-License-Identifier: Apache-2.0
25
- *)
26
- */
@@ -1,14 +0,0 @@
1
- // Force strict mode and setup for ESM
2
- "use strict";
3
- import{a as Ke,b as $e,c as Ge,e as Ve}from"./chunk-XMZIY7XX.js";import{b as ee}from"./chunk-UIRBHC5X.js";import{a as Me}from"./chunk-G7R2XEEF.js";import{b as o}from"./chunk-GZPNIYVZ.js";import{a as _,d as l}from"./chunk-OWGSC52X.js";var ie=l((rr,re)=>{o();var te=_("stream").Stream,We=_("util");re.exports=g;function g(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}We.inherits(g,te);g.create=function(e,r){var t=new this;r=r||{};for(var i in r)t[i]=r[i];t.source=e;var n=e.emit;return e.emit=function(){return t._handleEmit(arguments),n.apply(e,arguments)},e.on("error",function(){}),t.pauseStream&&e.pause(),t};Object.defineProperty(g.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});g.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};g.prototype.resume=function(){this._released||this.release(),this.source.resume()};g.prototype.pause=function(){this.source.pause()};g.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};g.prototype.pipe=function(){var e=te.prototype.pipe.apply(this,arguments);return this.resume(),e};g.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};g.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var ae=l((nr,oe)=>{o();var Xe=_("util"),se=_("stream").Stream,ne=ie();oe.exports=p;function p(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}Xe.inherits(p,se);p.create=function(e){var r=new this;e=e||{};for(var t in e)r[t]=e[t];return r};p.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};p.prototype.append=function(e){var r=p.isStreamLike(e);if(r){if(!(e instanceof ne)){var t=ne.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=t}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};p.prototype.pipe=function(e,r){return se.prototype.pipe.call(this,e,r),this.resume(),e};p.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};p.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var r=e;r(function(t){var i=p.isStreamLike(t);i&&(t.on("data",this._checkDataSize.bind(this)),this._handleErrors(t)),this._pipeNext(t)}.bind(this))};p.prototype._pipeNext=function(e){this._currentStream=e;var r=p.isStreamLike(e);if(r){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var t=e;this.write(t),this._getNext()};p.prototype._handleErrors=function(e){var r=this;e.on("error",function(t){r._emitError(t)})};p.prototype.write=function(e){this.emit("data",e)};p.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};p.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};p.prototype.end=function(){this._reset(),this.emit("end")};p.prototype.destroy=function(){this._reset(),this.emit("close")};p.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};p.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};p.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(r){r.dataSize&&(e.dataSize+=r.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};p.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var he=l(m=>{"use strict";o();var B=Ke(),Ye=_("path").extname,ue=/^\s*([^;\s]*)(?:;|\s|$)/,Je=/^text\//i;m.charset=fe;m.charsets={lookup:fe};m.contentType=Qe;m.extension=Ze;m.extensions=Object.create(null);m.lookup=et;m.types=Object.create(null);tt(m.extensions,m.types);function fe(e){if(!e||typeof e!="string")return!1;var r=ue.exec(e),t=r&&B[r[1].toLowerCase()];return t&&t.charset?t.charset:r&&Je.test(r[1])?"UTF-8":!1}function Qe(e){if(!e||typeof e!="string")return!1;var r=e.indexOf("/")===-1?m.lookup(e):e;if(!r)return!1;if(r.indexOf("charset")===-1){var t=m.charset(r);t&&(r+="; charset="+t.toLowerCase())}return r}function Ze(e){if(!e||typeof e!="string")return!1;var r=ue.exec(e),t=r&&m.extensions[r[1].toLowerCase()];return!t||!t.length?!1:t[0]}function et(e){if(!e||typeof e!="string")return!1;var r=Ye("x."+e).toLowerCase().substr(1);return r&&m.types[r]||!1}function tt(e,r){var t=["nginx","apache",void 0,"iana"];Object.keys(B).forEach(function(n){var s=B[n],a=s.extensions;if(!(!a||!a.length)){e[n]=a;for(var h=0;h<a.length;h++){var d=a[h];if(r[d]){var c=t.indexOf(B[r[d]].source),f=t.indexOf(s.source);if(r[d]!=="application/octet-stream"&&(c>f||c===f&&r[d].substr(0,12)==="application/"))continue}r[d]=n}}})}});var pe=l((ur,ce)=>{o();ce.exports=rt;function rt(e){var r=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;r?r(e):setTimeout(e,0)}});var N=l((hr,le)=>{o();var de=pe();le.exports=it;function it(e){var r=!1;return de(function(){r=!0}),function(i,n){r?e(i,n):de(function(){e(i,n)})}}});var k=l((pr,_e)=>{o();_e.exports=nt;function nt(e){Object.keys(e.jobs).forEach(st.bind(e)),e.jobs={}}function st(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}});var z=l((lr,ye)=>{o();var me=N(),ot=k();ye.exports=at;function at(e,r,t,i){var n=t.keyedList?t.keyedList[t.index]:t.index;t.jobs[n]=ut(r,n,e[n],function(s,a){n in t.jobs&&(delete t.jobs[n],s?ot(t):t.results[n]=a,i(s,t.results))})}function ut(e,r,t,i){var n;return e.length==2?n=e(t,me(i)):n=e(t,r,me(i)),n}});var U=l((mr,ge)=>{o();ge.exports=ft;function ft(e,r){var t=!Array.isArray(e),i={index:0,keyedList:t||r?Object.keys(e):null,jobs:{},results:t?{}:[],size:t?Object.keys(e).length:e.length};return r&&i.keyedList.sort(t?r:function(n,s){return r(e[n],e[s])}),i}});var j=l((gr,ve)=>{o();var ht=k(),ct=N();ve.exports=pt;function pt(e){Object.keys(this.jobs).length&&(this.index=this.size,ht(this),ct(e)(null,this.results))}});var be=l((xr,xe)=>{o();var dt=z(),lt=U(),_t=j();xe.exports=mt;function mt(e,r,t){for(var i=lt(e);i.index<(i.keyedList||e).length;)dt(e,r,i,function(n,s){if(n){t(n,s);return}if(Object.keys(i.jobs).length===0){t(null,i.results);return}}),i.index++;return _t.bind(i,t)}});var C=l((Er,O)=>{o();var Ee=z(),yt=U(),gt=j();O.exports=vt;O.exports.ascending=Se;O.exports.descending=xt;function vt(e,r,t,i){var n=yt(e,t);return Ee(e,r,n,function s(a,h){if(a){i(a,h);return}if(n.index++,n.index<(n.keyedList||e).length){Ee(e,r,n,s);return}i(null,n.results)}),gt.bind(n,i)}function Se(e,r){return e<r?-1:e>r?1:0}function xt(e,r){return-1*Se(e,r)}});var qe=l((Lr,Le)=>{o();var bt=C();Le.exports=Et;function Et(e,r,t){return bt(e,r,null,t)}});var Re=l((wr,we)=>{o();we.exports={parallel:be(),serial:qe(),serialOrdered:C()}});var Be=l((Tr,Te)=>{"use strict";o();var St=Ge();Te.exports=function(){return St()&&!!Symbol.toStringTag}});var Ne=l((Or,De)=>{"use strict";o();var Lt=Ve(),Oe=Lt("%Object.defineProperty%",!0),qt=Be()(),wt=ee(),Rt=$e(),D=qt?Symbol.toStringTag:null;De.exports=function(r,t){var i=arguments.length>2&&!!arguments[2]&&arguments[2].force,n=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof i<"u"&&typeof i!="boolean"||typeof n<"u"&&typeof n!="boolean")throw new Rt("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");D&&(i||!wt(r,D))&&(Oe?Oe(r,D,{configurable:!n,enumerable:!1,value:t,writable:!1}):r[D]=t)}});var ze=l((Nr,ke)=>{"use strict";o();ke.exports=function(e,r){return Object.keys(r).forEach(function(t){e[t]=e[t]||r[t]}),e}});var Ct=l((zr,Ue)=>{"use strict";o();var H=ae(),Tt=_("util"),A=_("path"),Bt=_("http"),Ot=_("https"),Dt=_("url").parse,Nt=_("fs"),kt=_("stream").Stream,zt=_("crypto"),P=he(),Ut=Re(),jt=Ne(),v=ee(),I=ze();function u(e){if(!(this instanceof u))return new u(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],H.call(this),e=e||{};for(var r in e)this[r]=e[r]}Tt.inherits(u,H);u.LINE_BREAK=`\r
4
- `;u.DEFAULT_CONTENT_TYPE="application/octet-stream";u.prototype.append=function(e,r,t){t=t||{},typeof t=="string"&&(t={filename:t});var i=H.prototype.append.bind(this);if((typeof r=="number"||r==null)&&(r=String(r)),Array.isArray(r)){this._error(new Error("Arrays are not supported."));return}var n=this._multiPartHeader(e,r,t),s=this._multiPartFooter();i(n),i(r),i(s),this._trackLength(n,r,t)};u.prototype._trackLength=function(e,r,t){var i=0;t.knownLength!=null?i+=Number(t.knownLength):Buffer.isBuffer(r)?i=r.length:typeof r=="string"&&(i=Buffer.byteLength(r)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(e)+u.LINE_BREAK.length,!(!r||!r.path&&!(r.readable&&v(r,"httpVersion"))&&!(r instanceof kt))&&(t.knownLength||this._valuesToMeasure.push(r))};u.prototype._lengthRetriever=function(e,r){v(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?r(null,e.end+1-(e.start?e.start:0)):Nt.stat(e.path,function(t,i){if(t){r(t);return}var n=i.size-(e.start?e.start:0);r(null,n)}):v(e,"httpVersion")?r(null,Number(e.headers["content-length"])):v(e,"httpModule")?(e.on("response",function(t){e.pause(),r(null,Number(t.headers["content-length"]))}),e.resume()):r("Unknown stream")};u.prototype._multiPartHeader=function(e,r,t){if(typeof t.header=="string")return t.header;var i=this._getContentDisposition(r,t),n=this._getContentType(r,t),s="",a={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(n||[])};typeof t.header=="object"&&I(a,t.header);var h;for(var d in a)if(v(a,d)){if(h=a[d],h==null)continue;Array.isArray(h)||(h=[h]),h.length&&(s+=d+": "+h.join("; ")+u.LINE_BREAK)}return"--"+this.getBoundary()+u.LINE_BREAK+s+u.LINE_BREAK};u.prototype._getContentDisposition=function(e,r){var t;if(typeof r.filepath=="string"?t=A.normalize(r.filepath).replace(/\\/g,"/"):r.filename||e&&(e.name||e.path)?t=A.basename(r.filename||e&&(e.name||e.path)):e&&e.readable&&v(e,"httpVersion")&&(t=A.basename(e.client._httpMessage.path||"")),t)return'filename="'+t+'"'};u.prototype._getContentType=function(e,r){var t=r.contentType;return!t&&e&&e.name&&(t=P.lookup(e.name)),!t&&e&&e.path&&(t=P.lookup(e.path)),!t&&e&&e.readable&&v(e,"httpVersion")&&(t=e.headers["content-type"]),!t&&(r.filepath||r.filename)&&(t=P.lookup(r.filepath||r.filename)),!t&&e&&typeof e=="object"&&(t=u.DEFAULT_CONTENT_TYPE),t};u.prototype._multiPartFooter=function(){return function(e){var r=u.LINE_BREAK,t=this._streams.length===0;t&&(r+=this._lastBoundary()),e(r)}.bind(this)};u.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+u.LINE_BREAK};u.prototype.getHeaders=function(e){var r,t={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(r in e)v(e,r)&&(t[r.toLowerCase()]=e[r]);return t};u.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};u.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};u.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),r=this.getBoundary(),t=0,i=this._streams.length;t<i;t++)typeof this._streams[t]!="function"&&(Buffer.isBuffer(this._streams[t])?e=Buffer.concat([e,this._streams[t]]):e=Buffer.concat([e,Buffer.from(this._streams[t])]),(typeof this._streams[t]!="string"||this._streams[t].substring(2,r.length+2)!==r)&&(e=Buffer.concat([e,Buffer.from(u.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};u.prototype._generateBoundary=function(){this._boundary="--------------------------"+zt.randomBytes(12).toString("hex")};u.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};u.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};u.prototype.getLength=function(e){var r=this._overheadLength+this._valueLength;if(this._streams.length&&(r+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,r));return}Ut.parallel(this._valuesToMeasure,this._lengthRetriever,function(t,i){if(t){e(t);return}i.forEach(function(n){r+=n}),e(null,r)})};u.prototype.submit=function(e,r){var t,i,n={method:"post"};return typeof e=="string"?(e=Dt(e),i=I({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},n)):(i=I(e,n),i.port||(i.port=i.protocol==="https:"?443:80)),i.headers=this.getHeaders(e.headers),i.protocol==="https:"?t=Ot.request(i):t=Bt.request(i),this.getLength(function(s,a){if(s&&s!=="Unknown stream"){this._error(s);return}if(a&&t.setHeader("Content-Length",a),this.pipe(t),r){var h,d=function(c,f){return t.removeListener("error",d),t.removeListener("response",h),r.call(this,c,f)};h=d.bind(this,null),t.on("error",d),t.on("response",h)}}.bind(this)),t};u.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};u.prototype.toString=function(){return"[object FormData]"};jt(u.prototype,"FormData");Ue.exports=u});var Mt=l(je=>{"use strict";o();var At=_("url").parse,Pt={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},It=String.prototype.endsWith||function(e){return e.length<=this.length&&this.indexOf(e,this.length-e.length)!==-1};function Ht(e){var r=typeof e=="string"?At(e):e||{},t=r.protocol,i=r.host,n=r.port;if(typeof i!="string"||!i||typeof t!="string"||(t=t.split(":",1)[0],i=i.replace(/:\d*$/,""),n=parseInt(n)||Pt[t]||0,!Ft(i,n)))return"";var s=S("npm_config_"+t+"_proxy")||S(t+"_proxy")||S("npm_config_proxy")||S("all_proxy");return s&&s.indexOf("://")===-1&&(s=t+"://"+s),s}function Ft(e,r){var t=(S("npm_config_no_proxy")||S("no_proxy")).toLowerCase();return t?t==="*"?!1:t.split(/[,\s]/).every(function(i){if(!i)return!0;var n=i.match(/^(.+):(\d+)$/),s=n?n[1]:i,a=n?parseInt(n[2]):0;return a&&a!==r?!0:/^[.*]/.test(s)?(s.charAt(0)==="*"&&(s=s.slice(1)),!It.call(e,s)):e!==s}):!0}function S(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}je.getProxyForUrl=Ht});var Ae=l((Ar,Ce)=>{o();var L;Ce.exports=function(){if(!L){try{L=Me()("follow-redirects")}catch{}typeof L!="function"&&(L=function(){})}L.apply(null,arguments)}});var tr=l((Ir,Z)=>{o();var w=_("url"),q=w.URL,Kt=_("http"),$t=_("https"),G=_("stream").Writable,V=_("assert"),Pe=Ae();(function(){var r=typeof process<"u",t=typeof window<"u"&&typeof document<"u",i=E(Error.captureStackTrace);!r&&(t||!i)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var W=!1;try{V(new q(""))}catch(e){W=e.code==="ERR_INVALID_URL"}var Gt=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],X=["abort","aborted","connect","error","socket","timeout"],Y=Object.create(null);X.forEach(function(e){Y[e]=function(r,t,i){this._redirectable.emit(e,r,t,i)}});var M=R("ERR_INVALID_URL","Invalid URL",TypeError),K=R("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Vt=R("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",K),Wt=R("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Xt=R("ERR_STREAM_WRITE_AFTER_END","write after end"),Yt=G.prototype.destroy||He;function y(e,r){G.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],r&&this.on("response",r);var t=this;this._onNativeResponse=function(i){try{t._processResponse(i)}catch(n){t.emit("error",n instanceof K?n:new K({cause:n}))}},this._performRequest()}y.prototype=Object.create(G.prototype);y.prototype.abort=function(){Q(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};y.prototype.destroy=function(e){return Q(this._currentRequest,e),Yt.call(this,e),this};y.prototype.write=function(e,r,t){if(this._ending)throw new Xt;if(!b(e)&&!Zt(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(E(r)&&(t=r,r=null),e.length===0){t&&t();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:r}),this._currentRequest.write(e,r,t)):(this.emit("error",new Wt),this.abort())};y.prototype.end=function(e,r,t){if(E(e)?(t=e,e=r=null):E(r)&&(t=r,r=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,t);else{var i=this,n=this._currentRequest;this.write(e,r,function(){i._ended=!0,n.end(null,null,t)}),this._ending=!0}};y.prototype.setHeader=function(e,r){this._options.headers[e]=r,this._currentRequest.setHeader(e,r)};y.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};y.prototype.setTimeout=function(e,r){var t=this;function i(a){a.setTimeout(e),a.removeListener("timeout",a.destroy),a.addListener("timeout",a.destroy)}function n(a){t._timeout&&clearTimeout(t._timeout),t._timeout=setTimeout(function(){t.emit("timeout"),s()},e),i(a)}function s(){t._timeout&&(clearTimeout(t._timeout),t._timeout=null),t.removeListener("abort",s),t.removeListener("error",s),t.removeListener("response",s),t.removeListener("close",s),r&&t.removeListener("timeout",r),t.socket||t._currentRequest.removeListener("socket",n)}return r&&this.on("timeout",r),this.socket?n(this.socket):this._currentRequest.once("socket",n),this.on("socket",i),this.on("abort",s),this.on("error",s),this.on("response",s),this.on("close",s),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){y.prototype[e]=function(r,t){return this._currentRequest[e](r,t)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(y.prototype,e,{get:function(){return this._currentRequest[e]}})});y.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var r=e.path.indexOf("?");r<0?e.pathname=e.path:(e.pathname=e.path.substring(0,r),e.search=e.path.substring(r))}};y.prototype._performRequest=function(){var e=this._options.protocol,r=this._options.nativeProtocols[e];if(!r)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var t=e.slice(0,-1);this._options.agent=this._options.agents[t]}var i=this._currentRequest=r.request(this._options,this._onNativeResponse);i._redirectable=this;for(var n of X)i.on(n,Y[n]);if(this._currentUrl=/^\//.test(this._options.path)?w.format(this._options):this._options.path,this._isRedirect){var s=0,a=this,h=this._requestBodyBuffers;(function d(c){if(i===a._currentRequest)if(c)a.emit("error",c);else if(s<h.length){var f=h[s++];i.finished||i.write(f.data,f.encoding,d)}else a._ended&&i.end()})()}};y.prototype._processResponse=function(e){var r=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:r});var t=e.headers.location;if(!t||this._options.followRedirects===!1||r<300||r>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(Q(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Vt;var i,n=this._options.beforeRedirect;n&&(i=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((r===301||r===302)&&this._options.method==="POST"||r===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],F(/^content-/i,this._options.headers));var a=F(/^host$/i,this._options.headers),h=J(this._currentUrl),d=a||h.host,c=/^\w+:/.test(t)?this._currentUrl:w.format(Object.assign(h,{host:d})),f=Jt(t,c);if(Pe("redirecting to",f.href),this._isRedirect=!0,$(f,this._options),(f.protocol!==h.protocol&&f.protocol!=="https:"||f.host!==d&&!Qt(f.host,d))&&F(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),E(n)){var x={headers:e.headers,statusCode:r},T={url:c,method:s,headers:i};n(this._options,x,T),this._sanitizeOptions(this._options)}this._performRequest()};function Ie(e){var r={maxRedirects:21,maxBodyLength:10485760},t={};return Object.keys(e).forEach(function(i){var n=i+":",s=t[n]=e[i],a=r[i]=Object.create(s);function h(c,f,x){return er(c)?c=$(c):b(c)?c=$(J(c)):(x=f,f=Fe(c),c={protocol:n}),E(f)&&(x=f,f=null),f=Object.assign({maxRedirects:r.maxRedirects,maxBodyLength:r.maxBodyLength},c,f),f.nativeProtocols=t,!b(f.host)&&!b(f.hostname)&&(f.hostname="::1"),V.equal(f.protocol,n,"protocol mismatch"),Pe("options",f),new y(f,x)}function d(c,f,x){var T=a.request(c,f,x);return T.end(),T}Object.defineProperties(a,{request:{value:h,configurable:!0,enumerable:!0,writable:!0},get:{value:d,configurable:!0,enumerable:!0,writable:!0}})}),r}function He(){}function J(e){var r;if(W)r=new q(e);else if(r=Fe(w.parse(e)),!b(r.protocol))throw new M({input:e});return r}function Jt(e,r){return W?new q(e,r):J(w.resolve(r,e))}function Fe(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new M({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new M({input:e.href||e});return e}function $(e,r){var t=r||{};for(var i of Gt)t[i]=e[i];return t.hostname.startsWith("[")&&(t.hostname=t.hostname.slice(1,-1)),t.port!==""&&(t.port=Number(t.port)),t.path=t.search?t.pathname+t.search:t.pathname,t}function F(e,r){var t;for(var i in r)e.test(i)&&(t=r[i],delete r[i]);return t===null||typeof t>"u"?void 0:String(t).trim()}function R(e,r,t){function i(n){E(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?r+": "+this.cause.message:r}return i.prototype=new(t||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),i}function Q(e,r){for(var t of X)e.removeListener(t,Y[t]);e.on("error",He),e.destroy(r)}function Qt(e,r){V(b(e)&&b(r));var t=e.length-r.length-1;return t>0&&e[t]==="."&&e.endsWith(r)}function b(e){return typeof e=="string"||e instanceof String}function E(e){return typeof e=="function"}function Zt(e){return typeof e=="object"&&"length"in e}function er(e){return q&&e instanceof q}Z.exports=Ie({http:Kt,https:$t});Z.exports.wrap=Ie});export{Ct as a,Mt as b,tr as c};
5
- /*! Bundled license information:
6
-
7
- mime-types/index.js:
8
- (*!
9
- * mime-types
10
- * Copyright(c) 2014 Jonathan Ong
11
- * Copyright(c) 2015 Douglas Christopher Wilson
12
- * MIT Licensed
13
- *)
14
- */