@cline/core 0.0.95 → 0.2.0

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 (167) hide show
  1. package/dist/ClineCore.d.ts +6 -1
  2. package/dist/account/rpc.d.ts +3 -1
  3. package/dist/cline-core/runtime-services.d.ts +4 -2
  4. package/dist/cloud/controller.d.ts +5 -2
  5. package/dist/cloud/hub-client.d.ts +51 -0
  6. package/dist/cloud/hub-protocol.d.ts +18 -0
  7. package/dist/cloud/index.d.ts +2 -0
  8. package/dist/cloud/index.js +16 -16
  9. package/dist/cloud/types.d.ts +4 -1
  10. package/dist/extensions/context/compaction-shared.d.ts +1 -0
  11. package/dist/extensions/context/compaction.d.ts +7 -0
  12. package/dist/extensions/context/summarize-conversation.d.ts +7 -0
  13. package/dist/extensions/context/summary-generation.d.ts +14 -0
  14. package/dist/extensions/mcp/apps.d.ts +16 -0
  15. package/dist/extensions/mcp/client.d.ts +1 -0
  16. package/dist/extensions/mcp/index.d.ts +5 -1
  17. package/dist/extensions/mcp/manager.d.ts +2 -1
  18. package/dist/extensions/mcp/session-apps.d.ts +28 -0
  19. package/dist/extensions/mcp/types.d.ts +22 -0
  20. package/dist/extensions/plugin/plugin-command-origin.d.ts +8 -0
  21. package/dist/extensions/plugin/plugin-registry.d.ts +1 -0
  22. package/dist/extensions/plugin/plugin-runtime.d.ts +7 -0
  23. package/dist/hub/client/index.d.ts +6 -0
  24. package/dist/hub/client/managed-hub-build-watcher.d.ts +2 -0
  25. package/dist/hub/client/plugin-commands.d.ts +4 -0
  26. package/dist/hub/client/session-client.d.ts +2 -0
  27. package/dist/hub/daemon/entry.js +241 -228
  28. package/dist/hub/index.d.ts +1 -0
  29. package/dist/hub/index.js +231 -218
  30. package/dist/hub/runtime-host/hub-runtime-host.d.ts +6 -0
  31. package/dist/hub/server/cloud-session-service.d.ts +50 -0
  32. package/dist/hub/server/handlers/capability-handlers.d.ts +18 -1
  33. package/dist/hub/server/handlers/context.d.ts +13 -2
  34. package/dist/hub/server/handlers/mcp-apps-handlers.d.ts +5 -0
  35. package/dist/hub/server/hub-server-options.d.ts +3 -0
  36. package/dist/hub/server/hub-server-transport.d.ts +2 -0
  37. package/dist/index.d.ts +8 -4
  38. package/dist/index.js +278 -258
  39. package/dist/plugin-runtime/node_modules/@cline/agents/dist/index.js +76 -0
  40. package/dist/plugin-runtime/node_modules/@cline/agents/package.json +1 -0
  41. package/dist/plugin-runtime/node_modules/@cline/core/dist/ai-sdk-b1d8eb67.js +1 -0
  42. package/dist/plugin-runtime/node_modules/@cline/core/dist/anthropic-33qvrctr.js +1 -0
  43. package/dist/plugin-runtime/node_modules/@cline/core/dist/bedrock-paabhz8w.js +1 -0
  44. package/dist/plugin-runtime/node_modules/@cline/core/dist/cline-yhsfqcy1.js +1 -0
  45. package/dist/plugin-runtime/node_modules/@cline/core/dist/cloud/index.js +21 -0
  46. package/dist/plugin-runtime/node_modules/@cline/core/dist/community-gqgs7446.js +1 -0
  47. package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-embedding-model-strategy-SAVQFBF4-822304b0.js +1 -0
  48. package/dist/plugin-runtime/node_modules/@cline/core/dist/foundation-models-language-model-strategy-BPQO66W7-hky2m2yx.js +1 -0
  49. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-sqf1kd37.js +1 -0
  50. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-bsd-tx1kp6xn.js +1 -0
  51. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-6cpgjxme.js +2 -0
  52. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-darwin-fxchqbze.js +2 -0
  53. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-m3bzwmzc.js +1 -0
  54. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-linux-pr9sb5fr.js +1 -0
  55. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-nckraycx.js +1 -0
  56. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-unsupported-w91yq3tm.js +1 -0
  57. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-xdyxc2tf.js +1 -0
  58. package/dist/plugin-runtime/node_modules/@cline/core/dist/getMachineId-win-yxsvs11a.js +1 -0
  59. package/dist/plugin-runtime/node_modules/@cline/core/dist/google-pgdk2dm9.js +1 -0
  60. package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/daemon/entry.js +1160 -0
  61. package/dist/plugin-runtime/node_modules/@cline/core/dist/hub/index.js +1147 -0
  62. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-02jpyn9y.js +85 -0
  63. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-0cb4390m.js +137 -0
  64. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-0f8xrhgt.js +209 -0
  65. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-1f8vb421.js +2 -0
  66. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-28c7m0fv.js +16 -0
  67. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-2em3jg4q.js +1 -0
  68. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-4n1zpzbe.js +2 -0
  69. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-54eea0ex.js +2 -0
  70. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-5j92dtg5.js +16 -0
  71. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-6akf3a5d.js +2 -0
  72. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-6k6ep10s.js +136 -0
  73. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-71ym4q6s.js +2 -0
  74. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-91p1ghfk.js +14 -0
  75. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-9qkpjy7x.js +2 -0
  76. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-9swk4nej.js +3 -0
  77. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-aa2s5myc.js +1 -0
  78. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ae0ajw38.js +13 -0
  79. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bxvyzjhc.js +1 -0
  80. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-bzy863k0.js +6 -0
  81. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-d96n0s70.js +20 -0
  82. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-dsd6vt8c.js +1 -0
  83. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-e2q4azd9.js +119 -0
  84. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-egd18jj2.js +4 -0
  85. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-eh83hr16.js +2 -0
  86. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-ev9r2dy3.js +1204 -0
  87. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-f2mvvryf.js +190 -0
  88. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-h7gn5v3f.js +2 -0
  89. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-h7s1a560.js +12 -0
  90. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-hkhq3jtz.js +21 -0
  91. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-j8r18nfg.js +15 -0
  92. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-jhny555h.js +6 -0
  93. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m1gpa2eg.js +146 -0
  94. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m2ad6tgj.js +1 -0
  95. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-m7mks2jq.js +4 -0
  96. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-mcnngj50.js +62 -0
  97. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-n2srkkh0.js +39 -0
  98. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-nbs1tsny.js +142 -0
  99. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-nqjnz7m4.js +9 -0
  100. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-rmhzyxr8.js +3 -0
  101. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-rtzf3vvk.js +6 -0
  102. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-sw74pcm3.js +2 -0
  103. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-t3eanyjj.js +3 -0
  104. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-tseksj1v.js +1 -0
  105. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v0ctpcdr.js +12 -0
  106. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v4-dx8bd4wq.js +1 -0
  107. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v695918t.js +14 -0
  108. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-v96yy1pw.js +1 -0
  109. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-vfm7r9wk.js +65 -0
  110. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-xecthgrg.js +9 -0
  111. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-xn1xhp06.js +9 -0
  112. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-yfdscfdx.js +1 -0
  113. package/dist/plugin-runtime/node_modules/@cline/core/dist/index-yrnwqsdt.js +2 -0
  114. package/dist/plugin-runtime/node_modules/@cline/core/dist/index.js +1 -0
  115. package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-static-3mgy2y9y.js +473 -0
  116. package/dist/plugin-runtime/node_modules/@cline/core/dist/jiti-w1xrs0vd.js +1 -0
  117. package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-stream-telemetry-9tppg77c.js +1 -0
  118. package/dist/plugin-runtime/node_modules/@cline/core/dist/langfuse-telemetry-y658kpzy.js +1 -0
  119. package/dist/plugin-runtime/node_modules/@cline/core/dist/mistral-cmhqd91b.js +1 -0
  120. package/dist/plugin-runtime/node_modules/@cline/core/dist/multipart-parser-qkjjf8mm.js +2 -0
  121. package/dist/plugin-runtime/node_modules/@cline/core/dist/ollama-8z6y9d1h.js +1 -0
  122. package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-cfmja1ez.js +1 -0
  123. package/dist/plugin-runtime/node_modules/@cline/core/dist/openai-compatible-1t7n5sxj.js +1 -0
  124. package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-embedding-model-strategy-GT27AFII-k6yqgnyd.js +1 -0
  125. package/dist/plugin-runtime/node_modules/@cline/core/dist/orchestration-language-model-strategy-YEQPUCOT-6rdyebbq.js +1 -0
  126. package/dist/plugin-runtime/node_modules/@cline/core/dist/services/feature-flags/posthog.js +2 -0
  127. package/dist/plugin-runtime/node_modules/@cline/core/dist/services/telemetry/index.js +1 -0
  128. package/dist/plugin-runtime/node_modules/@cline/core/dist/token-1h068py9.js +1 -0
  129. package/dist/plugin-runtime/node_modules/@cline/core/dist/token-util-7jchft51.js +1 -0
  130. package/dist/plugin-runtime/node_modules/@cline/core/dist/vertex-qfxfsrn4.js +1 -0
  131. package/dist/plugin-runtime/node_modules/@cline/core/package.json +1 -0
  132. package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.browser.js +16 -0
  133. package/dist/plugin-runtime/node_modules/@cline/llms/dist/index.js +1 -0
  134. package/dist/plugin-runtime/node_modules/@cline/llms/package.json +1 -0
  135. package/dist/plugin-runtime/node_modules/@cline/sdk/dist/index.js +1 -0
  136. package/dist/plugin-runtime/node_modules/@cline/sdk/package.json +1 -0
  137. package/dist/plugin-runtime/node_modules/@cline/shared/dist/automation/index.js +57 -0
  138. package/dist/plugin-runtime/node_modules/@cline/shared/dist/db/index.js +127 -0
  139. package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.browser.js +110 -0
  140. package/dist/plugin-runtime/node_modules/@cline/shared/dist/index.js +1 -0
  141. package/dist/plugin-runtime/node_modules/@cline/shared/dist/node.js +1 -0
  142. package/dist/plugin-runtime/node_modules/@cline/shared/dist/remote-config/index.js +68 -0
  143. package/dist/plugin-runtime/node_modules/@cline/shared/dist/storage/index.js +1 -0
  144. package/dist/plugin-runtime/node_modules/@cline/shared/dist/types/index.js +1 -0
  145. package/dist/plugin-runtime/node_modules/@cline/shared/package.json +1 -0
  146. package/dist/plugin-runtime/package.json +1 -0
  147. package/dist/{extensions → plugin-runtime}/plugin-sandbox-bootstrap.js +129 -129
  148. package/dist/remote/remote-environments.d.ts +1 -0
  149. package/dist/runtime/config/agent-runtime-config-builder.d.ts +2 -0
  150. package/dist/runtime/host/local-runtime-host.d.ts +10 -0
  151. package/dist/runtime/host/runtime-host.d.ts +6 -0
  152. package/dist/runtime/orchestration/runtime-oauth-token-manager.d.ts +3 -0
  153. package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +10 -1
  154. package/dist/runtime/orchestration/session-runtime.d.ts +2 -0
  155. package/dist/runtime/tools/subprocess-sandbox.d.ts +22 -0
  156. package/dist/services/llms/cline-recommended-models.d.ts +2 -0
  157. package/dist/services/local-runtime-bootstrap.d.ts +1 -0
  158. package/dist/services/plugin-command-api.d.ts +47 -0
  159. package/dist/services/plugin-commands.d.ts +25 -27
  160. package/dist/services/skills-cli.d.ts +2 -0
  161. package/dist/services/telemetry/core-events.d.ts +26 -0
  162. package/dist/services/telemetry/index.js +1 -1
  163. package/dist/services/telemetry/run-health.d.ts +40 -0
  164. package/dist/services/telemetry/stall-signals.d.ts +12 -0
  165. package/dist/types/config.d.ts +1 -0
  166. package/dist/types/session.d.ts +7 -0
  167. package/package.json +6 -5
@@ -0,0 +1,2 @@
1
+ import{i,c}from"./index-mcnngj50.js";var Oc=i(function(e){Object.defineProperty(e,"__esModule",{value:!0});e.execAsync=void 0;var r=c("child_process"),t=c("util");e.execAsync=t.promisify(r.exec)});
2
+ export{Oc};
@@ -0,0 +1,12 @@
1
+ import{v,i,bt,c}from"./index-mcnngj50.js";var Ln=i(function(vt,Mn){(function(m,u){typeof vt==="object"&&typeof Mn<"u"?u(vt):typeof define==="function"&&define.amd?define(["exports"],u):(m=typeof globalThis<"u"?globalThis:m||self,u(m.WebStreamsPolyfill={}))})(vt,function(m){function u(){return}function l(e){return typeof e==="object"&&e!==null||typeof e==="function"}let p=u;function f(e,t){try{Object.defineProperty(e,"name",{value:t,configurable:!0})}catch(r){}}let C=Promise,T=Promise.prototype.then,be=Promise.reject.bind(C);function q(e){return new C(e)}function S(e){return q((t)=>t(e))}function h(e){return be(e)}function F(e,t,r){return T.call(e,t,r)}function A(e,t,r){F(F(e,t,r),void 0,p)}function N(e,t){A(e,t)}function Y(e,t){A(e,void 0,t)}function x(e,t,r){return F(e,t,r)}function ve(e){F(e,void 0,p)}let me=(e)=>{if(typeof queueMicrotask==="function")me=queueMicrotask;else{let t=S(void 0);me=(r)=>F(t,r)}return me(e)};function pe(e,t,r){if(typeof e!=="function")throw TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}function ae(e,t,r){try{return S(pe(e,t,r))}catch(n){return h(n)}}let yr=16384;class z{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(e){let t=this._back,r=t;if(t._elements.length===yr-1)r={_elements:[],_next:void 0};if(t._elements.push(e),r!==t)this._back=r,t._next=r;++this._size}shift(){let e=this._front,t=e,r=this._cursor,n=r+1,o=e._elements,a=o[r];if(n===yr)t=e._next,n=0;if(--this._size,this._cursor=n,e!==t)this._front=t;return o[r]=void 0,a}forEach(e){let t=this._cursor,r=this._front,n=r._elements;while(t!==n.length||r._next!==void 0){if(t===n.length){if(r=r._next,n=r._elements,t=0,n.length===0)break}e(n[t]),++t}}peek(){let e=this._front,t=this._cursor;return e._elements[t]}}let gr=Symbol("[[AbortSteps]]"),Sr=Symbol("[[ErrorSteps]]"),Et=Symbol("[[CancelSteps]]"),qt=Symbol("[[PullSteps]]"),At=Symbol("[[ReleaseSteps]]");function wr(e,t){if(e._ownerReadableStream=t,t._reader=e,t._state==="readable")Wt(e);else if(t._state==="closed")Gn(e);else Rr(e,t._storedError)}function kt(e,t){let r=e._ownerReadableStream;return D(r,t)}function Z(e){let t=e._ownerReadableStream;if(t._state==="readable")Bt(e,TypeError("Reader was released and can no longer be used to monitor the stream's closedness"));else Yn(e,TypeError("Reader was released and can no longer be used to monitor the stream's closedness"));t._readableStreamController[At](),t._reader=void 0,e._ownerReadableStream=void 0}function Je(e){return TypeError("Cannot "+e+" a stream using a released reader")}function Wt(e){e._closedPromise=q((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r})}function Rr(e,t){Wt(e),Bt(e,t)}function Gn(e){Wt(e),Cr(e)}function Bt(e,t){if(e._closedPromise_reject===void 0)return;ve(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function Yn(e,t){Rr(e,t)}function Cr(e){if(e._closedPromise_resolve===void 0)return;e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}let Pr=Number.isFinite||function(e){return typeof e==="number"&&isFinite(e)},xn=Math.trunc||function(e){return e<0?Math.ceil(e):Math.floor(e)};function Zn(e){return typeof e==="object"||typeof e==="function"}function U(e,t){if(e!==void 0&&!Zn(e))throw TypeError(`${t} is not an object.`)}function I(e,t){if(typeof e!=="function")throw TypeError(`${t} is not a function.`)}function Xn(e){return typeof e==="object"&&e!==null||typeof e==="function"}function Tr(e,t){if(!Xn(e))throw TypeError(`${t} is not an object.`)}function X(e,t,r){if(e===void 0)throw TypeError(`Parameter ${t} is required in '${r}'.`)}function Ft(e,t,r){if(e===void 0)throw TypeError(`${t} is required in '${r}'.`)}function zt(e){return Number(e)}function vr(e){return e===0?0:e}function Jn(e){return vr(xn(e))}function Ot(e,t){let n=Number.MAX_SAFE_INTEGER,o=Number(e);if(o=vr(o),!Pr(o))throw TypeError(`${t} is not a finite number`);if(o=Jn(o),o<0||o>n)throw TypeError(`${t} is outside the accepted range of 0 to ${n}, inclusive`);if(!Pr(o)||o===0)return 0;return o}function It(e,t){if(!de(e))throw TypeError(`${t} is not a ReadableStream.`)}function Ee(e){return new J(e)}function Er(e,t){e._reader._readRequests.push(t)}function jt(e,t,r){let o=e._reader._readRequests.shift();if(r)o._closeSteps();else o._chunkSteps(t)}function Ke(e){return e._reader._readRequests.length}function qr(e){let t=e._reader;if(t===void 0)return!1;if(!se(t))return!1;return!0}class J{constructor(e){if(X(e,1,"ReadableStreamDefaultReader"),It(e,"First parameter"),ce(e))throw TypeError("This stream has already been locked for exclusive reading by another reader");wr(this,e),this._readRequests=new z}get closed(){if(!se(this))return h(et("closed"));return this._closedPromise}cancel(e=void 0){if(!se(this))return h(et("cancel"));if(this._ownerReadableStream===void 0)return h(Je("cancel"));return kt(this,e)}read(){if(!se(this))return h(et("read"));if(this._ownerReadableStream===void 0)return h(Je("read from"));let e,t,r=q((o,a)=>{e=o,t=a});return Me(this,{_chunkSteps:(o)=>e({value:o,done:!1}),_closeSteps:()=>e({value:void 0,done:!0}),_errorSteps:(o)=>t(o)}),r}releaseLock(){if(!se(this))throw et("releaseLock");if(this._ownerReadableStream===void 0)return;Kn(this)}}if(Object.defineProperties(J.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),f(J.prototype.cancel,"cancel"),f(J.prototype.read,"read"),f(J.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(J.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function se(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_readRequests"))return!1;return e instanceof J}function Me(e,t){let r=e._ownerReadableStream;if(r._disturbed=!0,r._state==="closed")t._closeSteps();else if(r._state==="errored")t._errorSteps(r._storedError);else r._readableStreamController[qt](t)}function Kn(e){Z(e);let t=TypeError("Reader was released");Ar(e,t)}function Ar(e,t){let r=e._readRequests;e._readRequests=new z,r.forEach((n)=>{n._errorSteps(t)})}function et(e){return TypeError(`ReadableStreamDefaultReader.prototype.${e} can only be used on a ReadableStreamDefaultReader`)}let eo=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class Mt{constructor(e,t){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=e,this._preventCancel=t}next(){let e=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?x(this._ongoingPromise,e,e):e(),this._ongoingPromise}return(e){let t=()=>this._returnSteps(e);return this._ongoingPromise?x(this._ongoingPromise,t,t):t()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let e=this._reader,t,r,n=q((a,s)=>{t=a,r=s});return Me(e,{_chunkSteps:(a)=>{this._ongoingPromise=void 0,me(()=>t({value:a,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,Z(e),t({value:void 0,done:!0})},_errorSteps:(a)=>{this._ongoingPromise=void 0,this._isFinished=!0,Z(e),r(a)}}),n}_returnSteps(e){if(this._isFinished)return Promise.resolve({value:e,done:!0});this._isFinished=!0;let t=this._reader;if(!this._preventCancel){let r=kt(t,e);return Z(t),x(r,()=>({value:e,done:!0}))}return Z(t),S({value:e,done:!0})}}let kr={next(){if(!Wr(this))return h(Br("next"));return this._asyncIteratorImpl.next()},return(e){if(!Wr(this))return h(Br("return"));return this._asyncIteratorImpl.return(e)}};Object.setPrototypeOf(kr,eo);function to(e,t){let r=Ee(e),n=new Mt(r,t),o=Object.create(kr);return o._asyncIteratorImpl=n,o}function Wr(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_asyncIteratorImpl"))return!1;try{return e._asyncIteratorImpl instanceof Mt}catch(t){return!1}}function Br(e){return TypeError(`ReadableStreamAsyncIterator.${e} can only be used on a ReadableSteamAsyncIterator`)}let Fr=Number.isNaN||function(e){return e!==e};var Lt,$t,Dt;function Le(e){return e.slice()}function zr(e,t,r,n,o){new Uint8Array(e).set(new Uint8Array(r,n,o),t)}let K=(e)=>{if(typeof e.transfer==="function")K=(t)=>t.transfer();else if(typeof structuredClone==="function")K=(t)=>structuredClone(t,{transfer:[t]});else K=(t)=>t;return K(e)},ue=(e)=>{if(typeof e.detached==="boolean")ue=(t)=>t.detached;else ue=(t)=>t.byteLength===0;return ue(e)};function Or(e,t,r){if(e.slice)return e.slice(t,r);let n=r-t,o=new ArrayBuffer(n);return zr(o,0,e,t,n),o}function tt(e,t){let r=e[t];if(r===void 0||r===null)return;if(typeof r!=="function")throw TypeError(`${String(t)} is not a function`);return r}function ro(e){let t={[Symbol.iterator]:()=>e.iterator},r=async function*(){return yield*t}(),n=r.next;return{iterator:r,nextMethod:n,done:!1}}let Nt=(Dt=(Lt=Symbol.asyncIterator)!==null&&Lt!==void 0?Lt:($t=Symbol.for)===null||$t===void 0?void 0:$t.call(Symbol,"Symbol.asyncIterator"))!==null&&Dt!==void 0?Dt:"@@asyncIterator";function Ir(e,t="sync",r){if(r===void 0)if(t==="async"){if(r=tt(e,Nt),r===void 0){let a=tt(e,Symbol.iterator),s=Ir(e,"sync",a);return ro(s)}}else r=tt(e,Symbol.iterator);if(r===void 0)throw TypeError("The object is not iterable");let n=pe(r,e,[]);if(!l(n))throw TypeError("The iterator method must return an object");let o=n.next;return{iterator:n,nextMethod:o,done:!1}}function no(e){let t=pe(e.nextMethod,e.iterator,[]);if(!l(t))throw TypeError("The iterator.next() method must return an object");return t}function oo(e){return Boolean(e.done)}function io(e){return e.value}function ao(e){if(typeof e!=="number")return!1;if(Fr(e))return!1;if(e<0)return!1;return!0}function jr(e){let t=Or(e.buffer,e.byteOffset,e.byteOffset+e.byteLength);return new Uint8Array(t)}function Ut(e){let t=e._queue.shift();if(e._queueTotalSize-=t.size,e._queueTotalSize<0)e._queueTotalSize=0;return t.value}function Vt(e,t,r){if(!ao(r)||r===1/0)throw RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r}function so(e){return e._queue.peek().value}function le(e){e._queue=new z,e._queueTotalSize=0}function Mr(e){return e===DataView}function uo(e){return Mr(e.constructor)}function lo(e){if(Mr(e))return 1;return e.BYTES_PER_ELEMENT}class fe{constructor(){throw TypeError("Illegal constructor")}get view(){if(!Ht(this))throw Zt("view");return this._view}respond(e){if(!Ht(this))throw Zt("respond");if(X(e,1,"respond"),e=Ot(e,"First parameter"),this._associatedReadableByteStreamController===void 0)throw TypeError("This BYOB request has been invalidated");if(ue(this._view.buffer))throw TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");it(this._associatedReadableByteStreamController,e)}respondWithNewView(e){if(!Ht(this))throw Zt("respondWithNewView");if(X(e,1,"respondWithNewView"),!ArrayBuffer.isView(e))throw TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw TypeError("This BYOB request has been invalidated");if(ue(e.buffer))throw TypeError("The given view's buffer has been detached and so cannot be used as a response");at(this._associatedReadableByteStreamController,e)}}if(Object.defineProperties(fe.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),f(fe.prototype.respond,"respond"),f(fe.prototype.respondWithNewView,"respondWithNewView"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(fe.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class V{constructor(){throw TypeError("Illegal constructor")}get byobRequest(){if(!_e(this))throw De("byobRequest");return xt(this)}get desiredSize(){if(!_e(this))throw De("desiredSize");return xr(this)}close(){if(!_e(this))throw De("close");if(this._closeRequested)throw TypeError("The stream has already been closed; do not close it again!");let e=this._controlledReadableByteStream._state;if(e!=="readable")throw TypeError(`The stream (in ${e} state) is not in the readable state and cannot be closed`);$e(this)}enqueue(e){if(!_e(this))throw De("enqueue");if(X(e,1,"enqueue"),!ArrayBuffer.isView(e))throw TypeError("chunk must be an array buffer view");if(e.byteLength===0)throw TypeError("chunk must have non-zero byteLength");if(e.buffer.byteLength===0)throw TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw TypeError("stream is closed or draining");let t=this._controlledReadableByteStream._state;if(t!=="readable")throw TypeError(`The stream (in ${t} state) is not in the readable state and cannot be enqueued to`);ot(this,e)}error(e=void 0){if(!_e(this))throw De("error");j(this,e)}[Et](e){Lr(this),le(this);let t=this._cancelAlgorithm(e);return nt(this),t}[qt](e){let t=this._controlledReadableByteStream;if(this._queueTotalSize>0){Yr(this,e);return}let r=this._autoAllocateChunkSize;if(r!==void 0){let n;try{n=new ArrayBuffer(r)}catch(a){e._errorSteps(a);return}let o={buffer:n,bufferByteLength:r,byteOffset:0,byteLength:r,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(o)}Er(t,e),ye(this)}[At](){if(this._pendingPullIntos.length>0){let e=this._pendingPullIntos.peek();e.readerType="none",this._pendingPullIntos=new z,this._pendingPullIntos.push(e)}}}if(Object.defineProperties(V.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),f(V.prototype.close,"close"),f(V.prototype.enqueue,"enqueue"),f(V.prototype.error,"error"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(V.prototype,Symbol.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function _e(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream"))return!1;return e instanceof V}function Ht(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController"))return!1;return e instanceof fe}function ye(e){if(!mo(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;let r=e._pullAlgorithm();A(r,()=>{if(e._pulling=!1,e._pullAgain)e._pullAgain=!1,ye(e);return null},(n)=>(j(e,n),null))}function Lr(e){Gt(e),e._pendingPullIntos=new z}function Qt(e,t){let r=!1;if(e._state==="closed")r=!0;let n=$r(t);if(t.readerType==="default")jt(e,n,r);else wo(e,n,r)}function $r(e){let{bytesFilled:t,elementSize:r}=e;return new e.viewConstructor(e.buffer,e.byteOffset,t/r)}function rt(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function Dr(e,t,r,n){let o;try{o=Or(t,r,r+n)}catch(a){throw j(e,a),a}rt(e,o,0,n)}function Nr(e,t){if(t.bytesFilled>0)Dr(e,t.buffer,t.byteOffset,t.bytesFilled);qe(e)}function Ur(e,t){let r=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),n=t.bytesFilled+r,o=r,a=!1,s=n%t.elementSize,d=n-s;if(d>=t.minimumFill)o=d-t.bytesFilled,a=!0;let b=e._queue;while(o>0){let y=b.peek(),g=Math.min(o,y.byteLength),w=t.byteOffset+t.bytesFilled;if(zr(t.buffer,w,y.buffer,y.byteOffset,g),y.byteLength===g)b.shift();else y.byteOffset+=g,y.byteLength-=g;e._queueTotalSize-=g,Hr(e,g,t),o-=g}return a}function Hr(e,t,r){r.bytesFilled+=t}function Qr(e){if(e._queueTotalSize===0&&e._closeRequested)nt(e),Ge(e._controlledReadableByteStream);else ye(e)}function Gt(e){if(e._byobRequest===null)return;e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=null,e._byobRequest=null}function Yt(e){while(e._pendingPullIntos.length>0){if(e._queueTotalSize===0)return;let t=e._pendingPullIntos.peek();if(Ur(e,t))qe(e),Qt(e._controlledReadableByteStream,t)}}function fo(e){let t=e._controlledReadableByteStream._reader;while(t._readRequests.length>0){if(e._queueTotalSize===0)return;let r=t._readRequests.shift();Yr(e,r)}}function co(e,t,r,n){let o=e._controlledReadableByteStream,a=t.constructor,s=lo(a),{byteOffset:d,byteLength:b}=t,y=r*s,g;try{g=K(t.buffer)}catch(P){n._errorSteps(P);return}let w={buffer:g,bufferByteLength:g.byteLength,byteOffset:d,byteLength:b,bytesFilled:0,minimumFill:y,elementSize:s,viewConstructor:a,readerType:"byob"};if(e._pendingPullIntos.length>0){e._pendingPullIntos.push(w),Jr(o,n);return}if(o._state==="closed"){let P=new a(w.buffer,w.byteOffset,0);n._closeSteps(P);return}if(e._queueTotalSize>0){if(Ur(e,w)){let P=$r(w);Qr(e),n._chunkSteps(P);return}if(e._closeRequested){let P=TypeError("Insufficient bytes to fill elements in the given buffer");j(e,P),n._errorSteps(P);return}}e._pendingPullIntos.push(w),Jr(o,n),ye(e)}function ho(e,t){if(t.readerType==="none")qe(e);let r=e._controlledReadableByteStream;if(Xt(r))while(Kr(r)>0){let n=qe(e);Qt(r,n)}}function bo(e,t,r){if(Hr(e,t,r),r.readerType==="none"){Nr(e,r),Yt(e);return}if(r.bytesFilled<r.minimumFill)return;qe(e);let n=r.bytesFilled%r.elementSize;if(n>0){let o=r.byteOffset+r.bytesFilled;Dr(e,r.buffer,o-n,n)}r.bytesFilled-=n,Qt(e._controlledReadableByteStream,r),Yt(e)}function Gr(e,t){let r=e._pendingPullIntos.peek();if(Gt(e),e._controlledReadableByteStream._state==="closed")ho(e,r);else bo(e,t,r);ye(e)}function qe(e){return e._pendingPullIntos.shift()}function mo(e){let t=e._controlledReadableByteStream;if(t._state!=="readable")return!1;if(e._closeRequested)return!1;if(!e._started)return!1;if(qr(t)&&Ke(t)>0)return!0;if(Xt(t)&&Kr(t)>0)return!0;if(xr(e)>0)return!0;return!1}function nt(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0}function $e(e){let t=e._controlledReadableByteStream;if(e._closeRequested||t._state!=="readable")return;if(e._queueTotalSize>0){e._closeRequested=!0;return}if(e._pendingPullIntos.length>0){let r=e._pendingPullIntos.peek();if(r.bytesFilled%r.elementSize!==0){let n=TypeError("Insufficient bytes to fill elements in the given buffer");throw j(e,n),n}}nt(e),Ge(t)}function ot(e,t){let r=e._controlledReadableByteStream;if(e._closeRequested||r._state!=="readable")return;let{buffer:n,byteOffset:o,byteLength:a}=t;if(ue(n))throw TypeError("chunk's buffer is detached and so cannot be enqueued");let s=K(n);if(e._pendingPullIntos.length>0){let d=e._pendingPullIntos.peek();if(ue(d.buffer))throw TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk");if(Gt(e),d.buffer=K(d.buffer),d.readerType==="none")Nr(e,d)}if(qr(r))if(fo(e),Ke(r)===0)rt(e,s,o,a);else{if(e._pendingPullIntos.length>0)qe(e);let d=new Uint8Array(s,o,a);jt(r,d,!1)}else if(Xt(r))rt(e,s,o,a),Yt(e);else rt(e,s,o,a);ye(e)}function j(e,t){let r=e._controlledReadableByteStream;if(r._state!=="readable")return;Lr(e),le(e),nt(e),Pn(r,t)}function Yr(e,t){let r=e._queue.shift();e._queueTotalSize-=r.byteLength,Qr(e);let n=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);t._chunkSteps(n)}function xt(e){if(e._byobRequest===null&&e._pendingPullIntos.length>0){let t=e._pendingPullIntos.peek(),r=new Uint8Array(t.buffer,t.byteOffset+t.bytesFilled,t.byteLength-t.bytesFilled),n=Object.create(fe.prototype);_o(n,e,r),e._byobRequest=n}return e._byobRequest}function xr(e){let t=e._controlledReadableByteStream._state;if(t==="errored")return null;if(t==="closed")return 0;return e._strategyHWM-e._queueTotalSize}function it(e,t){let r=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(t!==0)throw TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(t===0)throw TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(r.bytesFilled+t>r.byteLength)throw RangeError("bytesWritten out of range")}r.buffer=K(r.buffer),Gr(e,t)}function at(e,t){let r=e._pendingPullIntos.peek();if(e._controlledReadableByteStream._state==="closed"){if(t.byteLength!==0)throw TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(t.byteLength===0)throw TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw RangeError("The region specified by view does not match byobRequest");if(r.bufferByteLength!==t.buffer.byteLength)throw RangeError("The buffer of view has different capacity than byobRequest");if(r.bytesFilled+t.byteLength>r.byteLength)throw RangeError("The region specified by view is larger than byobRequest");let o=t.byteLength;r.buffer=K(t.buffer),Gr(e,o)}function Zr(e,t,r,n,o,a,s){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,t._byobRequest=null,t._queue=t._queueTotalSize=void 0,le(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=o,t._autoAllocateChunkSize=s,t._pendingPullIntos=new z,e._readableStreamController=t;let d=r();A(S(d),()=>(t._started=!0,ye(t),null),(b)=>(j(t,b),null))}function po(e,t,r){let n=Object.create(V.prototype),o,a,s;if(t.start!==void 0)o=()=>t.start(n);else o=()=>{return};if(t.pull!==void 0)a=()=>t.pull(n);else a=()=>S(void 0);if(t.cancel!==void 0)s=(b)=>t.cancel(b);else s=()=>S(void 0);let d=t.autoAllocateChunkSize;if(d===0)throw TypeError("autoAllocateChunkSize must be greater than 0");Zr(e,n,o,a,s,r,d)}function _o(e,t,r){e._associatedReadableByteStreamController=t,e._view=r}function Zt(e){return TypeError(`ReadableStreamBYOBRequest.prototype.${e} can only be used on a ReadableStreamBYOBRequest`)}function De(e){return TypeError(`ReadableByteStreamController.prototype.${e} can only be used on a ReadableByteStreamController`)}function yo(e,t){U(e,t);let r=e===null||e===void 0?void 0:e.mode;return{mode:r===void 0?void 0:go(r,`${t} has member 'mode' that`)}}function go(e,t){if(e=`${e}`,e!=="byob")throw TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamReaderMode`);return e}function So(e,t){var r;U(e,t);let n=(r=e===null||e===void 0?void 0:e.min)!==null&&r!==void 0?r:1;return{min:Ot(n,`${t} has member 'min' that`)}}function Xr(e){return new ee(e)}function Jr(e,t){e._reader._readIntoRequests.push(t)}function wo(e,t,r){let o=e._reader._readIntoRequests.shift();if(r)o._closeSteps(t);else o._chunkSteps(t)}function Kr(e){return e._reader._readIntoRequests.length}function Xt(e){let t=e._reader;if(t===void 0)return!1;if(!ge(t))return!1;return!0}class ee{constructor(e){if(X(e,1,"ReadableStreamBYOBReader"),It(e,"First parameter"),ce(e))throw TypeError("This stream has already been locked for exclusive reading by another reader");if(!_e(e._readableStreamController))throw TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");wr(this,e),this._readIntoRequests=new z}get closed(){if(!ge(this))return h(st("closed"));return this._closedPromise}cancel(e=void 0){if(!ge(this))return h(st("cancel"));if(this._ownerReadableStream===void 0)return h(Je("cancel"));return kt(this,e)}read(e,t={}){if(!ge(this))return h(st("read"));if(!ArrayBuffer.isView(e))return h(TypeError("view must be an array buffer view"));if(e.byteLength===0)return h(TypeError("view must have non-zero byteLength"));if(e.buffer.byteLength===0)return h(TypeError("view's buffer must have non-zero byteLength"));if(ue(e.buffer))return h(TypeError("view's buffer has been detached"));let r;try{r=So(t,"options")}catch(b){return h(b)}let n=r.min;if(n===0)return h(TypeError("options.min must be greater than 0"));if(!uo(e)){if(n>e.length)return h(RangeError("options.min must be less than or equal to view's length"))}else if(n>e.byteLength)return h(RangeError("options.min must be less than or equal to view's byteLength"));if(this._ownerReadableStream===void 0)return h(Je("read from"));let o,a,s=q((b,y)=>{o=b,a=y});return en(this,e,n,{_chunkSteps:(b)=>o({value:b,done:!1}),_closeSteps:(b)=>o({value:b,done:!0}),_errorSteps:(b)=>a(b)}),s}releaseLock(){if(!ge(this))throw st("releaseLock");if(this._ownerReadableStream===void 0)return;Ro(this)}}if(Object.defineProperties(ee.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),f(ee.prototype.cancel,"cancel"),f(ee.prototype.read,"read"),f(ee.prototype.releaseLock,"releaseLock"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(ee.prototype,Symbol.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function ge(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests"))return!1;return e instanceof ee}function en(e,t,r,n){let o=e._ownerReadableStream;if(o._disturbed=!0,o._state==="errored")n._errorSteps(o._storedError);else co(o._readableStreamController,t,r,n)}function Ro(e){Z(e);let t=TypeError("Reader was released");tn(e,t)}function tn(e,t){let r=e._readIntoRequests;e._readIntoRequests=new z,r.forEach((n)=>{n._errorSteps(t)})}function st(e){return TypeError(`ReadableStreamBYOBReader.prototype.${e} can only be used on a ReadableStreamBYOBReader`)}function Ne(e,t){let{highWaterMark:r}=e;if(r===void 0)return t;if(Fr(r)||r<0)throw RangeError("Invalid highWaterMark");return r}function ut(e){let{size:t}=e;if(!t)return()=>1;return t}function lt(e,t){U(e,t);let r=e===null||e===void 0?void 0:e.highWaterMark,n=e===null||e===void 0?void 0:e.size;return{highWaterMark:r===void 0?void 0:zt(r),size:n===void 0?void 0:Co(n,`${t} has member 'size' that`)}}function Co(e,t){return I(e,t),(r)=>zt(e(r))}function Po(e,t){U(e,t);let r=e===null||e===void 0?void 0:e.abort,n=e===null||e===void 0?void 0:e.close,o=e===null||e===void 0?void 0:e.start,a=e===null||e===void 0?void 0:e.type,s=e===null||e===void 0?void 0:e.write;return{abort:r===void 0?void 0:To(r,e,`${t} has member 'abort' that`),close:n===void 0?void 0:vo(n,e,`${t} has member 'close' that`),start:o===void 0?void 0:Eo(o,e,`${t} has member 'start' that`),write:s===void 0?void 0:qo(s,e,`${t} has member 'write' that`),type:a}}function To(e,t,r){return I(e,r),(n)=>ae(e,t,[n])}function vo(e,t,r){return I(e,r),()=>ae(e,t,[])}function Eo(e,t,r){return I(e,r),(n)=>pe(e,t,[n])}function qo(e,t,r){return I(e,r),(n,o)=>ae(e,t,[n,o])}function rn(e,t){if(!Ae(e))throw TypeError(`${t} is not a WritableStream.`)}function Ao(e){if(typeof e!=="object"||e===null)return!1;try{return typeof e.aborted==="boolean"}catch(t){return!1}}let ko=typeof AbortController==="function";function Wo(){if(ko)return new AbortController;return}class te{constructor(e={},t={}){if(e===void 0)e=null;else Tr(e,"First parameter");let r=lt(t,"Second parameter"),n=Po(e,"First parameter");if(on(this),n.type!==void 0)throw RangeError("Invalid type is specified");let a=ut(r),s=Ne(r,1);Qo(this,n,s,a)}get locked(){if(!Ae(this))throw mt("locked");return ke(this)}abort(e=void 0){if(!Ae(this))return h(mt("abort"));if(ke(this))return h(TypeError("Cannot abort a stream that already has a writer"));return ft(this,e)}close(){if(!Ae(this))return h(mt("close"));if(ke(this))return h(TypeError("Cannot close a stream that already has a writer"));if(H(this))return h(TypeError("Cannot close an already-closing stream"));return an(this)}getWriter(){if(!Ae(this))throw mt("getWriter");return nn(this)}}if(Object.defineProperties(te.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),f(te.prototype.abort,"abort"),f(te.prototype.close,"close"),f(te.prototype.getWriter,"getWriter"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(te.prototype,Symbol.toStringTag,{value:"WritableStream",configurable:!0});function nn(e){return new Q(e)}function Bo(e,t,r,n,o=1,a=()=>1){let s=Object.create(te.prototype);on(s);let d=Object.create(we.prototype);return cn(s,d,e,t,r,n,o,a),s}function on(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=new z,e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function Ae(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_writableStreamController"))return!1;return e instanceof te}function ke(e){if(e._writer===void 0)return!1;return!0}function ft(e,t){var r;if(e._state==="closed"||e._state==="errored")return S(void 0);e._writableStreamController._abortReason=t,(r=e._writableStreamController._abortController)===null||r===void 0||r.abort(t);let n=e._state;if(n==="closed"||n==="errored")return S(void 0);if(e._pendingAbortRequest!==void 0)return e._pendingAbortRequest._promise;let o=!1;if(n==="erroring")o=!0,t=void 0;let a=q((s,d)=>{e._pendingAbortRequest={_promise:void 0,_resolve:s,_reject:d,_reason:t,_wasAlreadyErroring:o}});if(e._pendingAbortRequest._promise=a,!o)Kt(e,t);return a}function an(e){let t=e._state;if(t==="closed"||t==="errored")return h(TypeError(`The stream (in ${t} state) is not in the writable state and cannot be closed`));let r=q((o,a)=>{let s={_resolve:o,_reject:a};e._closeRequest=s}),n=e._writer;if(n!==void 0&&e._backpressure&&t==="writable")sr(n);return Go(e._writableStreamController),r}function Fo(e){return q((r,n)=>{let o={_resolve:r,_reject:n};e._writeRequests.push(o)})}function Jt(e,t){if(e._state==="writable"){Kt(e,t);return}er(e)}function Kt(e,t){let r=e._writableStreamController;e._state="erroring",e._storedError=t;let n=e._writer;if(n!==void 0)un(n,t);if(!Lo(e)&&r._started)er(e)}function er(e){e._state="errored",e._writableStreamController[Sr]();let t=e._storedError;if(e._writeRequests.forEach((o)=>{o._reject(t)}),e._writeRequests=new z,e._pendingAbortRequest===void 0){dt(e);return}let r=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,r._wasAlreadyErroring){r._reject(t),dt(e);return}let n=e._writableStreamController[gr](r._reason);A(n,()=>(r._resolve(),dt(e),null),(o)=>(r._reject(o),dt(e),null))}function zo(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function Oo(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,Jt(e,t)}function Io(e){if(e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,e._state==="erroring"){if(e._storedError=void 0,e._pendingAbortRequest!==void 0)e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0}e._state="closed";let r=e._writer;if(r!==void 0)pn(r)}function Mo(e,t){if(e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,e._pendingAbortRequest!==void 0)e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0;Jt(e,t)}function H(e){if(e._closeRequest===void 0&&e._inFlightCloseRequest===void 0)return!1;return!0}function Lo(e){if(e._inFlightWriteRequest===void 0&&e._inFlightCloseRequest===void 0)return!1;return!0}function $o(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function Do(e){e._inFlightWriteRequest=e._writeRequests.shift()}function dt(e){if(e._closeRequest!==void 0)e._closeRequest._reject(e._storedError),e._closeRequest=void 0;let t=e._writer;if(t!==void 0)ir(t,e._storedError)}function tr(e,t){let r=e._writer;if(r!==void 0&&t!==e._backpressure)if(t)ei(r);else sr(r);e._backpressure=t}class Q{constructor(e){if(X(e,1,"WritableStreamDefaultWriter"),rn(e,"First parameter"),ke(e))throw TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=e,e._writer=this;let t=e._state;if(t==="writable"){if(!H(e)&&e._backpressure)_t(this);else _n(this);pt(this)}else if(t==="erroring")ar(this,e._storedError),pt(this);else if(t==="closed")_n(this),Jo(this);else{let r=e._storedError;ar(this,r),mn(this,r)}}get closed(){if(!Se(this))return h(Re("closed"));return this._closedPromise}get desiredSize(){if(!Se(this))throw Re("desiredSize");if(this._ownerWritableStream===void 0)throw Ve("desiredSize");return Ho(this)}get ready(){if(!Se(this))return h(Re("ready"));return this._readyPromise}abort(e=void 0){if(!Se(this))return h(Re("abort"));if(this._ownerWritableStream===void 0)return h(Ve("abort"));return No(this,e)}close(){if(!Se(this))return h(Re("close"));let e=this._ownerWritableStream;if(e===void 0)return h(Ve("close"));if(H(e))return h(TypeError("Cannot close an already-closing stream"));return sn(this)}releaseLock(){if(!Se(this))throw Re("releaseLock");if(this._ownerWritableStream===void 0)return;ln(this)}write(e=void 0){if(!Se(this))return h(Re("write"));if(this._ownerWritableStream===void 0)return h(Ve("write to"));return fn(this,e)}}if(Object.defineProperties(Q.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),f(Q.prototype.abort,"abort"),f(Q.prototype.close,"close"),f(Q.prototype.releaseLock,"releaseLock"),f(Q.prototype.write,"write"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Q.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Se(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream"))return!1;return e instanceof Q}function No(e,t){let r=e._ownerWritableStream;return ft(r,t)}function sn(e){let t=e._ownerWritableStream;return an(t)}function Uo(e){let t=e._ownerWritableStream,r=t._state;if(H(t)||r==="closed")return S(void 0);if(r==="errored")return h(t._storedError);return sn(e)}function Vo(e,t){if(e._closedPromiseState==="pending")ir(e,t);else Ko(e,t)}function un(e,t){if(e._readyPromiseState==="pending")yn(e,t);else ti(e,t)}function Ho(e){let t=e._ownerWritableStream,r=t._state;if(r==="errored"||r==="erroring")return null;if(r==="closed")return 0;return hn(t._writableStreamController)}function ln(e){let t=e._ownerWritableStream,r=TypeError("Writer was released and can no longer be used to monitor the stream's closedness");un(e,r),Vo(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function fn(e,t){let r=e._ownerWritableStream,n=r._writableStreamController,o=Yo(n,t);if(r!==e._ownerWritableStream)return h(Ve("write to"));let a=r._state;if(a==="errored")return h(r._storedError);if(H(r)||a==="closed")return h(TypeError("The stream is closing or closed and cannot be written to"));if(a==="erroring")return h(r._storedError);let s=Fo(r);return xo(n,t,o),s}let dn={};class we{constructor(){throw TypeError("Illegal constructor")}get abortReason(){if(!rr(this))throw or("abortReason");return this._abortReason}get signal(){if(!rr(this))throw or("signal");if(this._abortController===void 0)throw TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(e=void 0){if(!rr(this))throw or("error");if(this._controlledWritableStream._state!=="writable")return;bn(this,e)}[gr](e){let t=this._abortAlgorithm(e);return ct(this),t}[Sr](){le(this)}}if(Object.defineProperties(we.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof Symbol.toStringTag==="symbol")Object.defineProperty(we.prototype,Symbol.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function rr(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream"))return!1;return e instanceof we}function cn(e,t,r,n,o,a,s,d){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,le(t),t._abortReason=void 0,t._abortController=Wo(),t._started=!1,t._strategySizeAlgorithm=d,t._strategyHWM=s,t._writeAlgorithm=n,t._closeAlgorithm=o,t._abortAlgorithm=a;let b=nr(t);tr(e,b);let y=r(),g=S(y);A(g,()=>(t._started=!0,ht(t),null),(w)=>(t._started=!0,Jt(e,w),null))}function Qo(e,t,r,n){let o=Object.create(we.prototype),a,s,d,b;if(t.start!==void 0)a=()=>t.start(o);else a=()=>{return};if(t.write!==void 0)s=(y)=>t.write(y,o);else s=()=>S(void 0);if(t.close!==void 0)d=()=>t.close();else d=()=>S(void 0);if(t.abort!==void 0)b=(y)=>t.abort(y);else b=()=>S(void 0);cn(e,o,a,s,d,b,r,n)}function ct(e){e._writeAlgorithm=void 0,e._closeAlgorithm=void 0,e._abortAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Go(e){Vt(e,dn,0),ht(e)}function Yo(e,t){try{return e._strategySizeAlgorithm(t)}catch(r){return Ue(e,r),1}}function hn(e){return e._strategyHWM-e._queueTotalSize}function xo(e,t,r){try{Vt(e,t,r)}catch(o){Ue(e,o);return}let n=e._controlledWritableStream;if(!H(n)&&n._state==="writable"){let o=nr(e);tr(n,o)}ht(e)}function ht(e){let t=e._controlledWritableStream;if(!e._started)return;if(t._inFlightWriteRequest!==void 0)return;if(t._state==="erroring"){er(t);return}if(e._queue.length===0)return;let n=so(e);if(n===dn)Zo(e);else Xo(e,n)}function Ue(e,t){if(e._controlledWritableStream._state==="writable")bn(e,t)}function Zo(e){let t=e._controlledWritableStream;$o(t),Ut(e);let r=e._closeAlgorithm();ct(e),A(r,()=>(Io(t),null),(n)=>(Mo(t,n),null))}function Xo(e,t){let r=e._controlledWritableStream;Do(r);let n=e._writeAlgorithm(t);A(n,()=>{zo(r);let o=r._state;if(Ut(e),!H(r)&&o==="writable"){let a=nr(e);tr(r,a)}return ht(e),null},(o)=>{if(r._state==="writable")ct(e);return Oo(r,o),null})}function nr(e){return hn(e)<=0}function bn(e,t){let r=e._controlledWritableStream;ct(e),Kt(r,t)}function mt(e){return TypeError(`WritableStream.prototype.${e} can only be used on a WritableStream`)}function or(e){return TypeError(`WritableStreamDefaultController.prototype.${e} can only be used on a WritableStreamDefaultController`)}function Re(e){return TypeError(`WritableStreamDefaultWriter.prototype.${e} can only be used on a WritableStreamDefaultWriter`)}function Ve(e){return TypeError("Cannot "+e+" a stream using a released writer")}function pt(e){e._closedPromise=q((t,r)=>{e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"})}function mn(e,t){pt(e),ir(e,t)}function Jo(e){pt(e),pn(e)}function ir(e,t){if(e._closedPromise_reject===void 0)return;ve(e._closedPromise),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function Ko(e,t){mn(e,t)}function pn(e){if(e._closedPromise_resolve===void 0)return;e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}function _t(e){e._readyPromise=q((t,r)=>{e._readyPromise_resolve=t,e._readyPromise_reject=r}),e._readyPromiseState="pending"}function ar(e,t){_t(e),yn(e,t)}function _n(e){_t(e),sr(e)}function yn(e,t){if(e._readyPromise_reject===void 0)return;ve(e._readyPromise),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function ei(e){_t(e)}function ti(e,t){ar(e,t)}function sr(e){if(e._readyPromise_resolve===void 0)return;e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}function ri(){if(typeof globalThis<"u")return globalThis;else if(typeof self<"u")return self;else if(typeof global<"u")return global;return}let ur=ri();function ni(e){if(!(typeof e==="function"||typeof e==="object"))return!1;if(e.name!=="DOMException")return!1;try{return new e,!0}catch(t){return!1}}function oi(){let e=ur===null||ur===void 0?void 0:ur.DOMException;return ni(e)?e:void 0}function ii(){let e=function(r,n){if(this.message=r||"",this.name=n||"Error",Error.captureStackTrace)Error.captureStackTrace(this,this.constructor)};return f(e,"DOMException"),e.prototype=Object.create(Error.prototype),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,configurable:!0}),e}let ai=oi()||ii();function gn(e,t,r,n,o,a){let s=Ee(e),d=nn(t);e._disturbed=!0;let b=!1,y=S(void 0);return q((g,w)=>{let P;if(a!==void 0){if(P=()=>{let _=a.reason!==void 0?a.reason:new ai("Aborted","AbortError"),R=[];if(!n)R.push(()=>{if(t._state==="writable")return ft(t,_);return S(void 0)});if(!o)R.push(()=>{if(e._state==="readable")return D(e,_);return S(void 0)});B(()=>Promise.all(R.map((E)=>E())),!0,_)},a.aborted){P();return}a.addEventListener("abort",P)}function ne(){return q((_,R)=>{function E(O){if(O)_();else F(ze(),E,R)}E(!1)})}function ze(){if(b)return S(!0);return F(d._readyPromise,()=>q((_,R)=>{Me(s,{_chunkSteps:(E)=>{y=F(fn(d,E),void 0,u),_(!1)},_closeSteps:()=>_(!0),_errorSteps:R})}))}if(oe(e,s._closedPromise,(_)=>{if(!n)B(()=>ft(t,_),!0,_);else M(!0,_);return null}),oe(t,d._closedPromise,(_)=>{if(!o)B(()=>D(e,_),!0,_);else M(!0,_);return null}),W(e,s._closedPromise,()=>{if(!r)B(()=>Uo(d));else M();return null}),H(t)||t._state==="closed"){let _=TypeError("the destination writable stream closed before all data could be piped to it");if(!o)B(()=>D(e,_),!0,_);else M(!0,_)}ve(ne());function he(){let _=y;return F(y,()=>_!==y?he():void 0)}function oe(_,R,E){if(_._state==="errored")E(_._storedError);else Y(R,E)}function W(_,R,E){if(_._state==="closed")E();else N(R,E)}function B(_,R,E){if(b)return;if(b=!0,t._state==="writable"&&!H(t))N(he(),O);else O();function O(){return A(_(),()=>ie(R,E),(Oe)=>ie(!0,Oe)),null}}function M(_,R){if(b)return;if(b=!0,t._state==="writable"&&!H(t))N(he(),()=>ie(_,R));else ie(_,R)}function ie(_,R){if(ln(d),Z(s),a!==void 0)a.removeEventListener("abort",P);if(_)w(R);else g(void 0);return null}})}class G{constructor(){throw TypeError("Illegal constructor")}get desiredSize(){if(!yt(this))throw St("desiredSize");return lr(this)}close(){if(!yt(this))throw St("close");if(!Be(this))throw TypeError("The stream is not in a state that permits close");Ce(this)}enqueue(e=void 0){if(!yt(this))throw St("enqueue");if(!Be(this))throw TypeError("The stream is not in a state that permits enqueue");return We(this,e)}error(e=void 0){if(!yt(this))throw St("error");L(this,e)}[Et](e){le(this);let t=this._cancelAlgorithm(e);return gt(this),t}[qt](e){let t=this._controlledReadableStream;if(this._queue.length>0){let r=Ut(this);if(this._closeRequested&&this._queue.length===0)gt(this),Ge(t);else He(this);e._chunkSteps(r)}else Er(t,e),He(this)}[At](){}}if(Object.defineProperties(G.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),f(G.prototype.close,"close"),f(G.prototype.enqueue,"enqueue"),f(G.prototype.error,"error"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(G.prototype,Symbol.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function yt(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream"))return!1;return e instanceof G}function He(e){if(!Sn(e))return;if(e._pulling){e._pullAgain=!0;return}e._pulling=!0;let r=e._pullAlgorithm();A(r,()=>{if(e._pulling=!1,e._pullAgain)e._pullAgain=!1,He(e);return null},(n)=>(L(e,n),null))}function Sn(e){let t=e._controlledReadableStream;if(!Be(e))return!1;if(!e._started)return!1;if(ce(t)&&Ke(t)>0)return!0;if(lr(e)>0)return!0;return!1}function gt(e){e._pullAlgorithm=void 0,e._cancelAlgorithm=void 0,e._strategySizeAlgorithm=void 0}function Ce(e){if(!Be(e))return;let t=e._controlledReadableStream;if(e._closeRequested=!0,e._queue.length===0)gt(e),Ge(t)}function We(e,t){if(!Be(e))return;let r=e._controlledReadableStream;if(ce(r)&&Ke(r)>0)jt(r,t,!1);else{let n;try{n=e._strategySizeAlgorithm(t)}catch(o){throw L(e,o),o}try{Vt(e,t,n)}catch(o){throw L(e,o),o}}He(e)}function L(e,t){let r=e._controlledReadableStream;if(r._state!=="readable")return;le(e),gt(e),Pn(r,t)}function lr(e){let t=e._controlledReadableStream._state;if(t==="errored")return null;if(t==="closed")return 0;return e._strategyHWM-e._queueTotalSize}function si(e){if(Sn(e))return!1;return!0}function Be(e){let t=e._controlledReadableStream._state;if(!e._closeRequested&&t==="readable")return!0;return!1}function wn(e,t,r,n,o,a,s){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,le(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=s,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=o,e._readableStreamController=t;let d=r();A(S(d),()=>(t._started=!0,He(t),null),(b)=>(L(t,b),null))}function ui(e,t,r,n){let o=Object.create(G.prototype),a,s,d;if(t.start!==void 0)a=()=>t.start(o);else a=()=>{return};if(t.pull!==void 0)s=()=>t.pull(o);else s=()=>S(void 0);if(t.cancel!==void 0)d=(b)=>t.cancel(b);else d=()=>S(void 0);wn(e,o,a,s,d,r,n)}function St(e){return TypeError(`ReadableStreamDefaultController.prototype.${e} can only be used on a ReadableStreamDefaultController`)}function li(e,t){if(_e(e._readableStreamController))return di(e);return fi(e)}function fi(e,t){let r=Ee(e),n=!1,o=!1,a=!1,s=!1,d,b,y,g,w,P=q((W)=>{w=W});function ne(){if(n)return o=!0,S(void 0);return n=!0,Me(r,{_chunkSteps:(B)=>{me(()=>{o=!1;let M=B,ie=B;if(!a)We(y._readableStreamController,M);if(!s)We(g._readableStreamController,ie);if(n=!1,o)ne()})},_closeSteps:()=>{if(n=!1,!a)Ce(y._readableStreamController);if(!s)Ce(g._readableStreamController);if(!a||!s)w(void 0)},_errorSteps:()=>{n=!1}}),S(void 0)}function ze(W){if(a=!0,d=W,s){let B=Le([d,b]),M=D(e,B);w(M)}return P}function he(W){if(s=!0,b=W,a){let B=Le([d,b]),M=D(e,B);w(M)}return P}function oe(){}return y=Qe(oe,ne,ze),g=Qe(oe,ne,he),Y(r._closedPromise,(W)=>{if(L(y._readableStreamController,W),L(g._readableStreamController,W),!a||!s)w(void 0);return null}),[y,g]}function di(e){let t=Ee(e),r=!1,n=!1,o=!1,a=!1,s=!1,d,b,y,g,w,P=q((_)=>{w=_});function ne(_){Y(_._closedPromise,(R)=>{if(_!==t)return null;if(j(y._readableStreamController,R),j(g._readableStreamController,R),!a||!s)w(void 0);return null})}function ze(){if(ge(t))Z(t),t=Ee(e),ne(t);Me(t,{_chunkSteps:(R)=>{me(()=>{n=!1,o=!1;let E=R,O=R;if(!a&&!s)try{O=jr(R)}catch(Oe){j(y._readableStreamController,Oe),j(g._readableStreamController,Oe),w(D(e,Oe));return}if(!a)ot(y._readableStreamController,E);if(!s)ot(g._readableStreamController,O);if(r=!1,n)oe();else if(o)W()})},_closeSteps:()=>{if(r=!1,!a)$e(y._readableStreamController);if(!s)$e(g._readableStreamController);if(y._readableStreamController._pendingPullIntos.length>0)it(y._readableStreamController,0);if(g._readableStreamController._pendingPullIntos.length>0)it(g._readableStreamController,0);if(!a||!s)w(void 0)},_errorSteps:()=>{r=!1}})}function he(_,R){if(se(t))Z(t),t=Xr(e),ne(t);let E=R?g:y,O=R?y:g;en(t,_,1,{_chunkSteps:(Ie)=>{me(()=>{n=!1,o=!1;let je=R?s:a;if(!(R?a:s)){let jn;try{jn=jr(Ie)}catch(br){j(E._readableStreamController,br),j(O._readableStreamController,br),w(D(e,br));return}if(!je)at(E._readableStreamController,Ie);ot(O._readableStreamController,jn)}else if(!je)at(E._readableStreamController,Ie);if(r=!1,n)oe();else if(o)W()})},_closeSteps:(Ie)=>{r=!1;let je=R?s:a,Tt=R?a:s;if(!je)$e(E._readableStreamController);if(!Tt)$e(O._readableStreamController);if(Ie!==void 0){if(!je)at(E._readableStreamController,Ie);if(!Tt&&O._readableStreamController._pendingPullIntos.length>0)it(O._readableStreamController,0)}if(!je||!Tt)w(void 0)},_errorSteps:()=>{r=!1}})}function oe(){if(r)return n=!0,S(void 0);r=!0;let _=xt(y._readableStreamController);if(_===null)ze();else he(_._view,!1);return S(void 0)}function W(){if(r)return o=!0,S(void 0);r=!0;let _=xt(g._readableStreamController);if(_===null)ze();else he(_._view,!0);return S(void 0)}function B(_){if(a=!0,d=_,s){let R=Le([d,b]),E=D(e,R);w(E)}return P}function M(_){if(s=!0,b=_,a){let R=Le([d,b]),E=D(e,R);w(E)}return P}function ie(){return}return y=Cn(ie,oe,B),g=Cn(ie,W,M),ne(t),[y,g]}function ci(e){return l(e)&&typeof e.getReader<"u"}function hi(e){if(ci(e))return mi(e.getReader());return bi(e)}function bi(e){let t,r=Ir(e,"async"),n=u;function o(){let s;try{s=no(r)}catch(b){return h(b)}let d=S(s);return x(d,(b)=>{if(!l(b))throw TypeError("The promise returned by the iterator.next() method must fulfill with an object");if(oo(b))Ce(t._readableStreamController);else{let g=io(b);We(t._readableStreamController,g)}})}function a(s){let d=r.iterator,b;try{b=tt(d,"return")}catch(w){return h(w)}if(b===void 0)return S(void 0);let y;try{y=pe(b,d,[s])}catch(w){return h(w)}let g=S(y);return x(g,(w)=>{if(!l(w))throw TypeError("The promise returned by the iterator.return() method must fulfill with an object");return})}return t=Qe(n,o,a,0),t}function mi(e){let t,r=u;function n(){let a;try{a=e.read()}catch(s){return h(s)}return x(a,(s)=>{if(!l(s))throw TypeError("The promise returned by the reader.read() method must fulfill with an object");if(s.done)Ce(t._readableStreamController);else{let d=s.value;We(t._readableStreamController,d)}})}function o(a){try{return S(e.cancel(a))}catch(s){return h(s)}}return t=Qe(r,n,o,0),t}function pi(e,t){U(e,t);let r=e,n=r===null||r===void 0?void 0:r.autoAllocateChunkSize,o=r===null||r===void 0?void 0:r.cancel,a=r===null||r===void 0?void 0:r.pull,s=r===null||r===void 0?void 0:r.start,d=r===null||r===void 0?void 0:r.type;return{autoAllocateChunkSize:n===void 0?void 0:Ot(n,`${t} has member 'autoAllocateChunkSize' that`),cancel:o===void 0?void 0:_i(o,r,`${t} has member 'cancel' that`),pull:a===void 0?void 0:yi(a,r,`${t} has member 'pull' that`),start:s===void 0?void 0:gi(s,r,`${t} has member 'start' that`),type:d===void 0?void 0:Si(d,`${t} has member 'type' that`)}}function _i(e,t,r){return I(e,r),(n)=>ae(e,t,[n])}function yi(e,t,r){return I(e,r),(n)=>ae(e,t,[n])}function gi(e,t,r){return I(e,r),(n)=>pe(e,t,[n])}function Si(e,t){if(e=`${e}`,e!=="bytes")throw TypeError(`${t} '${e}' is not a valid enumeration value for ReadableStreamType`);return e}function wi(e,t){U(e,t);let r=e===null||e===void 0?void 0:e.preventCancel;return{preventCancel:Boolean(r)}}function Rn(e,t){U(e,t);let r=e===null||e===void 0?void 0:e.preventAbort,n=e===null||e===void 0?void 0:e.preventCancel,o=e===null||e===void 0?void 0:e.preventClose,a=e===null||e===void 0?void 0:e.signal;if(a!==void 0)Ri(a,`${t} has member 'signal' that`);return{preventAbort:Boolean(r),preventCancel:Boolean(n),preventClose:Boolean(o),signal:a}}function Ri(e,t){if(!Ao(e))throw TypeError(`${t} is not an AbortSignal.`)}function Ci(e,t){U(e,t);let r=e===null||e===void 0?void 0:e.readable;Ft(r,"readable","ReadableWritablePair"),It(r,`${t} has member 'readable' that`);let n=e===null||e===void 0?void 0:e.writable;return Ft(n,"writable","ReadableWritablePair"),rn(n,`${t} has member 'writable' that`),{readable:r,writable:n}}class k{constructor(e={},t={}){if(e===void 0)e=null;else Tr(e,"First parameter");let r=lt(t,"Second parameter"),n=pi(e,"First parameter");if(fr(this),n.type==="bytes"){if(r.size!==void 0)throw RangeError("The strategy for a byte stream cannot have a size function");let o=Ne(r,0);po(this,n,o)}else{let o=ut(r),a=Ne(r,1);ui(this,n,a,o)}}get locked(){if(!de(this))throw Pe("locked");return ce(this)}cancel(e=void 0){if(!de(this))return h(Pe("cancel"));if(ce(this))return h(TypeError("Cannot cancel a stream that already has a reader"));return D(this,e)}getReader(e=void 0){if(!de(this))throw Pe("getReader");if(yo(e,"First parameter").mode===void 0)return Ee(this);return Xr(this)}pipeThrough(e,t={}){if(!de(this))throw Pe("pipeThrough");X(e,1,"pipeThrough");let r=Ci(e,"First parameter"),n=Rn(t,"Second parameter");if(ce(this))throw TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(ke(r.writable))throw TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let o=gn(this,r.writable,n.preventClose,n.preventAbort,n.preventCancel,n.signal);return ve(o),r.readable}pipeTo(e,t={}){if(!de(this))return h(Pe("pipeTo"));if(e===void 0)return h("Parameter 1 is required in 'pipeTo'.");if(!Ae(e))return h(TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let r;try{r=Rn(t,"Second parameter")}catch(n){return h(n)}if(ce(this))return h(TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"));if(ke(e))return h(TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"));return gn(this,e,r.preventClose,r.preventAbort,r.preventCancel,r.signal)}tee(){if(!de(this))throw Pe("tee");let e=li(this);return Le(e)}values(e=void 0){if(!de(this))throw Pe("values");let t=wi(e,"First parameter");return to(this,t.preventCancel)}[Nt](e){return this.values(e)}static from(e){return hi(e)}}if(Object.defineProperties(k,{from:{enumerable:!0}}),Object.defineProperties(k.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),f(k.from,"from"),f(k.prototype.cancel,"cancel"),f(k.prototype.getReader,"getReader"),f(k.prototype.pipeThrough,"pipeThrough"),f(k.prototype.pipeTo,"pipeTo"),f(k.prototype.tee,"tee"),f(k.prototype.values,"values"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(k.prototype,Symbol.toStringTag,{value:"ReadableStream",configurable:!0});Object.defineProperty(k.prototype,Nt,{value:k.prototype.values,writable:!0,configurable:!0});function Qe(e,t,r,n=1,o=()=>1){let a=Object.create(k.prototype);fr(a);let s=Object.create(G.prototype);return wn(a,s,e,t,r,n,o),a}function Cn(e,t,r){let n=Object.create(k.prototype);fr(n);let o=Object.create(V.prototype);return Zr(n,o,e,t,r,0,void 0),n}function fr(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function de(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_readableStreamController"))return!1;return e instanceof k}function ce(e){if(e._reader===void 0)return!1;return!0}function D(e,t){if(e._disturbed=!0,e._state==="closed")return S(void 0);if(e._state==="errored")return h(e._storedError);Ge(e);let r=e._reader;if(r!==void 0&&ge(r)){let o=r._readIntoRequests;r._readIntoRequests=new z,o.forEach((a)=>{a._closeSteps(void 0)})}let n=e._readableStreamController[Et](t);return x(n,u)}function Ge(e){e._state="closed";let t=e._reader;if(t===void 0)return;if(Cr(t),se(t)){let r=t._readRequests;t._readRequests=new z,r.forEach((n)=>{n._closeSteps()})}}function Pn(e,t){e._state="errored",e._storedError=t;let r=e._reader;if(r===void 0)return;if(Bt(r,t),se(r))Ar(r,t);else tn(r,t)}function Pe(e){return TypeError(`ReadableStream.prototype.${e} can only be used on a ReadableStream`)}function Tn(e,t){U(e,t);let r=e===null||e===void 0?void 0:e.highWaterMark;return Ft(r,"highWaterMark","QueuingStrategyInit"),{highWaterMark:zt(r)}}let vn=(e)=>e.byteLength;f(vn,"size");class Ye{constructor(e){X(e,1,"ByteLengthQueuingStrategy"),e=Tn(e,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!qn(this))throw En("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!qn(this))throw En("size");return vn}}if(Object.defineProperties(Ye.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Ye.prototype,Symbol.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function En(e){return TypeError(`ByteLengthQueuingStrategy.prototype.${e} can only be used on a ByteLengthQueuingStrategy`)}function qn(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_byteLengthQueuingStrategyHighWaterMark"))return!1;return e instanceof Ye}let An=()=>1;f(An,"size");class xe{constructor(e){X(e,1,"CountQueuingStrategy"),e=Tn(e,"First parameter"),this._countQueuingStrategyHighWaterMark=e.highWaterMark}get highWaterMark(){if(!Wn(this))throw kn("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!Wn(this))throw kn("size");return An}}if(Object.defineProperties(xe.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof Symbol.toStringTag==="symbol")Object.defineProperty(xe.prototype,Symbol.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function kn(e){return TypeError(`CountQueuingStrategy.prototype.${e} can only be used on a CountQueuingStrategy`)}function Wn(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_countQueuingStrategyHighWaterMark"))return!1;return e instanceof xe}function Pi(e,t){U(e,t);let r=e===null||e===void 0?void 0:e.cancel,n=e===null||e===void 0?void 0:e.flush,o=e===null||e===void 0?void 0:e.readableType,a=e===null||e===void 0?void 0:e.start,s=e===null||e===void 0?void 0:e.transform,d=e===null||e===void 0?void 0:e.writableType;return{cancel:r===void 0?void 0:qi(r,e,`${t} has member 'cancel' that`),flush:n===void 0?void 0:Ti(n,e,`${t} has member 'flush' that`),readableType:o,start:a===void 0?void 0:vi(a,e,`${t} has member 'start' that`),transform:s===void 0?void 0:Ei(s,e,`${t} has member 'transform' that`),writableType:d}}function Ti(e,t,r){return I(e,r),(n)=>ae(e,t,[n])}function vi(e,t,r){return I(e,r),(n)=>pe(e,t,[n])}function Ei(e,t,r){return I(e,r),(n,o)=>ae(e,t,[n,o])}function qi(e,t,r){return I(e,r),(n)=>ae(e,t,[n])}class Ze{constructor(e={},t={},r={}){if(e===void 0)e=null;let n=lt(t,"Second parameter"),o=lt(r,"Third parameter"),a=Pi(e,"First parameter");if(a.readableType!==void 0)throw RangeError("Invalid readableType specified");if(a.writableType!==void 0)throw RangeError("Invalid writableType specified");let s=Ne(o,0),d=ut(o),b=Ne(n,1),y=ut(n),g,w=q((P)=>{g=P});if(Ai(this,w,b,y,s,d),Wi(this,a),a.start!==void 0)g(a.start(this._transformStreamController));else g(void 0)}get readable(){if(!Bn(this))throw In("readable");return this._readable}get writable(){if(!Bn(this))throw In("writable");return this._writable}}if(Object.defineProperties(Ze.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof Symbol.toStringTag==="symbol")Object.defineProperty(Ze.prototype,Symbol.toStringTag,{value:"TransformStream",configurable:!0});function Ai(e,t,r,n,o,a){function s(){return t}function d(P){return zi(e,P)}function b(P){return Oi(e,P)}function y(){return Ii(e)}e._writable=Bo(s,d,y,b,r,n);function g(){return ji(e)}function w(P){return Mi(e,P)}e._readable=Qe(s,g,w,o,a),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,wt(e,!0),e._transformStreamController=void 0}function Bn(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_transformStreamController"))return!1;return e instanceof Ze}function Fn(e,t){L(e._readable._readableStreamController,t),dr(e,t)}function dr(e,t){Ct(e._transformStreamController),Ue(e._writable._writableStreamController,t),cr(e)}function cr(e){if(e._backpressure)wt(e,!1)}function wt(e,t){if(e._backpressureChangePromise!==void 0)e._backpressureChangePromise_resolve();e._backpressureChangePromise=q((r)=>{e._backpressureChangePromise_resolve=r}),e._backpressure=t}class re{constructor(){throw TypeError("Illegal constructor")}get desiredSize(){if(!Rt(this))throw Pt("desiredSize");let e=this._controlledTransformStream._readable._readableStreamController;return lr(e)}enqueue(e=void 0){if(!Rt(this))throw Pt("enqueue");zn(this,e)}error(e=void 0){if(!Rt(this))throw Pt("error");Bi(this,e)}terminate(){if(!Rt(this))throw Pt("terminate");Fi(this)}}if(Object.defineProperties(re.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),f(re.prototype.enqueue,"enqueue"),f(re.prototype.error,"error"),f(re.prototype.terminate,"terminate"),typeof Symbol.toStringTag==="symbol")Object.defineProperty(re.prototype,Symbol.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function Rt(e){if(!l(e))return!1;if(!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream"))return!1;return e instanceof re}function ki(e,t,r,n,o){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n,t._cancelAlgorithm=o,t._finishPromise=void 0,t._finishPromise_resolve=void 0,t._finishPromise_reject=void 0}function Wi(e,t){let r=Object.create(re.prototype),n,o,a;if(t.transform!==void 0)n=(s)=>t.transform(s,r);else n=(s)=>{try{return zn(r,s),S(void 0)}catch(d){return h(d)}};if(t.flush!==void 0)o=()=>t.flush(r);else o=()=>S(void 0);if(t.cancel!==void 0)a=(s)=>t.cancel(s);else a=()=>S(void 0);ki(e,r,n,o,a)}function Ct(e){e._transformAlgorithm=void 0,e._flushAlgorithm=void 0,e._cancelAlgorithm=void 0}function zn(e,t){let r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!Be(n))throw TypeError("Readable side is not in a state that permits enqueue");try{We(n,t)}catch(a){throw dr(r,a),r._readable._storedError}if(si(n)!==r._backpressure)wt(r,!0)}function Bi(e,t){Fn(e._controlledTransformStream,t)}function On(e,t){let r=e._transformAlgorithm(t);return x(r,void 0,(n)=>{throw Fn(e._controlledTransformStream,n),n})}function Fi(e){let t=e._controlledTransformStream,r=t._readable._readableStreamController;Ce(r);let n=TypeError("TransformStream terminated");dr(t,n)}function zi(e,t){let r=e._transformStreamController;if(e._backpressure){let n=e._backpressureChangePromise;return x(n,()=>{let o=e._writable;if(o._state==="erroring")throw o._storedError;return On(r,t)})}return On(r,t)}function Oi(e,t){let r=e._transformStreamController;if(r._finishPromise!==void 0)return r._finishPromise;let n=e._readable;r._finishPromise=q((a,s)=>{r._finishPromise_resolve=a,r._finishPromise_reject=s});let o=r._cancelAlgorithm(t);return Ct(r),A(o,()=>{if(n._state==="errored")Fe(r,n._storedError);else L(n._readableStreamController,t),hr(r);return null},(a)=>(L(n._readableStreamController,a),Fe(r,a),null)),r._finishPromise}function Ii(e){let t=e._transformStreamController;if(t._finishPromise!==void 0)return t._finishPromise;let r=e._readable;t._finishPromise=q((o,a)=>{t._finishPromise_resolve=o,t._finishPromise_reject=a});let n=t._flushAlgorithm();return Ct(t),A(n,()=>{if(r._state==="errored")Fe(t,r._storedError);else Ce(r._readableStreamController),hr(t);return null},(o)=>(L(r._readableStreamController,o),Fe(t,o),null)),t._finishPromise}function ji(e){return wt(e,!1),e._backpressureChangePromise}function Mi(e,t){let r=e._transformStreamController;if(r._finishPromise!==void 0)return r._finishPromise;let n=e._writable;r._finishPromise=q((a,s)=>{r._finishPromise_resolve=a,r._finishPromise_reject=s});let o=r._cancelAlgorithm(t);return Ct(r),A(o,()=>{if(n._state==="errored")Fe(r,n._storedError);else Ue(n._writableStreamController,t),cr(e),hr(r);return null},(a)=>(Ue(n._writableStreamController,a),cr(e),Fe(r,a),null)),r._finishPromise}function Pt(e){return TypeError(`TransformStreamDefaultController.prototype.${e} can only be used on a TransformStreamDefaultController`)}function hr(e){if(e._finishPromise_resolve===void 0)return;e._finishPromise_resolve(),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0}function Fe(e,t){if(e._finishPromise_reject===void 0)return;ve(e._finishPromise),e._finishPromise_reject(t),e._finishPromise_resolve=void 0,e._finishPromise_reject=void 0}function In(e){return TypeError(`TransformStream.prototype.${e} can only be used on a TransformStream`)}m.ByteLengthQueuingStrategy=Ye,m.CountQueuingStrategy=xe,m.ReadableByteStreamController=V,m.ReadableStream=k,m.ReadableStreamBYOBReader=ee,m.ReadableStreamBYOBRequest=fe,m.ReadableStreamDefaultController=G,m.ReadableStreamDefaultReader=J,m.TransformStream=Ze,m.TransformStreamDefaultController=re,m.WritableStream=te,m.WritableStreamDefaultController=we,m.WritableStreamDefaultWriter=Q})});var $n=i(function(){if(!globalThis.ReadableStream)try{let m=c("node:process"),{emitWarning:u}=m;try{m.emitWarning=()=>{},Object.assign(globalThis,c("node:stream/web")),m.emitWarning=u}catch(l){throw m.emitWarning=u,l}}catch(m){Object.assign(globalThis,Ln())}try{let{Blob:m}=c("buffer");if(m&&!m.prototype.stream)m.prototype.stream=function(l){let p=0,f=this;return new ReadableStream({type:"bytes",async pull(C){let be=await f.slice(p,Math.min(f.size,p+65536)).arrayBuffer();if(p+=be.byteLength,C.enqueue(new Uint8Array(be)),p===f.size)C.close()}})}}catch(m){}});async function*mr(m,u=!0){for(let l of m)if("stream"in l)yield*l.stream();else if(ArrayBuffer.isView(l))if(u){let p=l.byteOffset,f=l.byteOffset+l.byteLength;while(p!==f){let C=Math.min(f-p,Dn),T=l.buffer.slice(p,p+C);p+=T.byteLength,yield new Uint8Array(T)}}else yield l;else{let p=0,f=l;while(p!==f.size){let T=await f.slice(p,Math.min(f.size,p+Dn)).arrayBuffer();p+=T.byteLength,yield new Uint8Array(T)}}}var xi,Dn=65536,Nn,Li,jo;var eu=bt(()=>{xi=v($n(),1);/*! fetch-blob. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */Nn=class m{#e=[];#t="";#r=0;#n="transparent";constructor(u=[],l={}){if(typeof u!=="object"||u===null)throw TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof u[Symbol.iterator]!=="function")throw TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof l!=="object"&&typeof l!=="function")throw TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");if(l===null)l={};let p=new TextEncoder;for(let C of u){let T;if(ArrayBuffer.isView(C))T=new Uint8Array(C.buffer.slice(C.byteOffset,C.byteOffset+C.byteLength));else if(C instanceof ArrayBuffer)T=new Uint8Array(C.slice(0));else if(C instanceof m)T=C;else T=p.encode(`${C}`);this.#r+=ArrayBuffer.isView(T)?T.byteLength:T.size,this.#e.push(T)}this.#n=`${l.endings===void 0?"transparent":l.endings}`;let f=l.type===void 0?"":String(l.type);this.#t=/^[\x20-\x7E]*$/.test(f)?f:""}get size(){return this.#r}get type(){return this.#t}async text(){let u=new TextDecoder,l="";for await(let p of mr(this.#e,!1))l+=u.decode(p,{stream:!0});return l+=u.decode(),l}async arrayBuffer(){let u=new Uint8Array(this.size),l=0;for await(let p of mr(this.#e,!1))u.set(p,l),l+=p.length;return u.buffer}stream(){let u=mr(this.#e,!0);return new globalThis.ReadableStream({type:"bytes",async pull(l){let p=await u.next();p.done?l.close():l.enqueue(p.value)},async cancel(){await u.return()}})}slice(u=0,l=this.size,p=""){let{size:f}=this,C=u<0?Math.max(f+u,0):Math.min(u,f),T=l<0?Math.max(f+l,0):Math.min(l,f),be=Math.max(T-C,0),q=this.#e,S=[],h=0;for(let A of q){if(h>=be)break;let N=ArrayBuffer.isView(A)?A.byteLength:A.size;if(C&&N<=C)C-=N,T-=N;else{let Y;if(ArrayBuffer.isView(A))Y=A.subarray(C,Math.min(N,T)),h+=Y.byteLength;else Y=A.slice(C,Math.min(N,T)),h+=Y.size;T-=N,S.push(Y),C=0}}let F=new m([],{type:String(p).toLowerCase()});return F.#r=be,F.#e=S,F}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](u){return u&&typeof u==="object"&&typeof u.constructor==="function"&&(typeof u.stream==="function"||typeof u.arrayBuffer==="function")&&/^(Blob|File)$/.test(u[Symbol.toStringTag])}};Object.defineProperties(Nn.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});Li=Nn,jo=Li});var $i,Di,tu;var pr=bt(()=>{eu();$i=class extends jo{#e=0;#t="";constructor(u,l,p={}){if(arguments.length<2)throw TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(u,p);if(p===null)p={};let f=p.lastModified===void 0?Date.now():Number(p.lastModified);if(!Number.isNaN(f))this.#e=f;this.#t=String(l)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](u){return!!u&&u instanceof jo&&/^(File)$/.test(u[Symbol.toStringTag])}},Di=$i,tu=Di});function H2(m,u=jo){var l=`${Un()}${Un()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),p=[],f=`--${l}\r
2
+ Content-Disposition: form-data; name="`;return m.forEach((C,T)=>typeof C=="string"?p.push(f+_r(T)+`"\r
3
+ \r
4
+ ${C.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
5
+ `)}\r
6
+ `):p.push(f+_r(T)+`"; filename="${_r(C.name,1)}"\r
7
+ Content-Type: ${C.type||"application/octet-stream"}\r
8
+ \r
9
+ `,C,`\r
10
+ `)),p.push(`--${l}--`),new u(p,{type:"multipart/form-data; boundary="+l})}var Xe,Ni,Ui,Un,Vi,Vn=(m,u,l)=>(m+="",/^(Blob|File)$/.test(u&&u[Xe])?[(l=l!==void 0?l+"":u[Xe]=="File"?u.name:"blob",m),u.name!==l||u[Xe]=="blob"?new tu([u],l,u):u]:[m,u+""]),_r=(m,u)=>(u?m:m.replace(/\r?\n|\r/g,`\r
11
+ `)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),Te=(m,u,l)=>{if(u.length<l)throw TypeError(`Failed to execute '${m}' on 'FormData': ${l} arguments required, but only ${u.length} present.`)},Vr;var iu=bt(()=>{eu();pr();/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */({toStringTag:Xe,iterator:Ni,hasInstance:Ui}=Symbol),Un=Math.random,Vi="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),Vr=class{#e=[];constructor(...u){if(u.length)throw TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[Xe](){return"FormData"}[Ni](){return this.entries()}static[Ui](u){return u&&typeof u==="object"&&u[Xe]==="FormData"&&!Vi.some((l)=>typeof u[l]!="function")}append(...u){Te("append",arguments,2),this.#e.push(Vn(...u))}delete(u){Te("delete",arguments,1),u+="",this.#e=this.#e.filter(([l])=>l!==u)}get(u){Te("get",arguments,1),u+="";for(var l=this.#e,p=l.length,f=0;f<p;f++)if(l[f][0]===u)return l[f][1];return null}getAll(u,l){return Te("getAll",arguments,1),l=[],u+="",this.#e.forEach((p)=>p[0]===u&&l.push(p[1])),l}has(u){return Te("has",arguments,1),u+="",this.#e.some((l)=>l[0]===u)}forEach(u,l){Te("forEach",arguments,1);for(var[p,f]of this)u.call(l,f,p,this)}set(...u){Te("set",arguments,2);var l=[],p=!0;u=Vn(...u),this.#e.forEach((f)=>{f[0]===u[0]?p&&(p=!l.push(u)):l.push(f)}),p&&l.push(u),this.#e=l}*entries(){yield*this.#e}*keys(){for(var[u]of this)yield u}*values(){for(var[,u]of this)yield u}}});var Qn=i(function(ra,Hn){/*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */if(!globalThis.DOMException)try{let{MessageChannel:m}=c("worker_threads"),u=new m().port1,l=new ArrayBuffer;u.postMessage(l,[l,l])}catch(m){m.constructor.name==="DOMException"&&(globalThis.DOMException=m.constructor)}Hn.exports=globalThis.DOMException});import{statSync as oa,createReadStream as ia,promises as Hi}from"node:fs";var Qi,ua;var dd=bt(()=>{pr();eu();Qi=v(Qn(),1),{stat:ua}=Hi});
12
+ export{jo,eu,tu,Vr,H2,iu,dd};