@wormhole-foundation/wormhole-connect 3.0.0-beta.0-development → 3.0.0-beta.1-development

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 (135) hide show
  1. package/dist/main.js +49 -49
  2. package/dist/src/components/SampleApp/index.d.ts.map +1 -1
  3. package/dist/src/config/index.d.ts.map +1 -1
  4. package/dist/src/config/types.d.ts +2 -0
  5. package/dist/src/config/types.d.ts.map +1 -1
  6. package/dist/src/exports/executor.d.ts +2 -0
  7. package/dist/src/exports/executor.d.ts.map +1 -0
  8. package/dist/src/hooks/useFetchSupportedRoutes.d.ts.map +1 -1
  9. package/dist/src/utils/index.d.ts +1 -0
  10. package/dist/src/utils/index.d.ts.map +1 -1
  11. package/dist/src/utils/sdkv2.d.ts +0 -1
  12. package/dist/src/utils/sdkv2.d.ts.map +1 -1
  13. package/dist/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  14. package/dist/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
  15. package/dist/src/views/v2/Redeem/index.d.ts.map +1 -1
  16. package/lib/account-CKUCmcgT.mjs +30 -0
  17. package/lib/account-QG_Hi4er.js +1 -0
  18. package/lib/address-B-_yHNB2.js +1 -0
  19. package/lib/{address-D74XlMdi.mjs → address-B9anhmbU.mjs} +5 -5
  20. package/lib/address-Cj96wodd.mjs +64 -0
  21. package/lib/{address-DXFbgyJW.mjs → address-Drr_9OcK.mjs} +93 -93
  22. package/lib/aptos-BZ2mcuTd.js +2 -0
  23. package/lib/aptos-DPIwkCrX.mjs +68 -0
  24. package/lib/{aptos-WhWqMfkU.js → aptos-Da6iqpC-.js} +1 -1
  25. package/lib/{aptos-BckWT_Pe.mjs → aptos-Dz4Js3_d.mjs} +3 -3
  26. package/lib/{base64-DPCMLrON.mjs → base64-BcnUThiU.mjs} +1 -1
  27. package/lib/{blake2b-BmQx89Cf.mjs → blake2b-CnkNeJT4.mjs} +1 -1
  28. package/lib/{browser-ponyfill-Zjbs5ehD.mjs → browser-ponyfill-oWZrCgRw.mjs} +1 -1
  29. package/lib/{ccip-DiNEz9KN.js → ccip-Bb-IPrNA.js} +1 -1
  30. package/lib/{ccip-B45dpIhp.mjs → ccip-Ceg_B70t.mjs} +1 -1
  31. package/lib/{chain-DaAd2Ztf.mjs → chain-CNVMEdrk.mjs} +1 -1
  32. package/lib/{chunk-IMTC3J2M-Bn3rs7tb.mjs → chunk-IMTC3J2M-B7fKwIuX.mjs} +3 -3
  33. package/lib/{constants-CbKC2uxb.mjs → constants-Ba9GwEM1.mjs} +1 -1
  34. package/lib/constants-BqqwmYZc.js +1 -0
  35. package/lib/{contract-BI_HDILr.mjs → contract-DANWVftx.mjs} +1 -1
  36. package/lib/{create-CzWSWmF_.mjs → create-B9LwWha4.mjs} +1 -1
  37. package/lib/{evm-DFyxDQ-x.js → evm-1T5rGzcO.js} +3 -3
  38. package/lib/{evm-DgG5biHb.mjs → evm-B552wdhN.mjs} +9 -9
  39. package/lib/{evm-Es3E89UO.mjs → evm-DarNu22s.mjs} +9 -9
  40. package/lib/executor.d.ts +2 -0
  41. package/lib/executor.js +1 -0
  42. package/lib/executor.mjs +828 -0
  43. package/lib/hosted.js +1 -1
  44. package/lib/hosted.mjs +1 -1
  45. package/lib/index-2f5GRlqp.mjs +46 -0
  46. package/lib/{index-Blt9MjZK.mjs → index-B1XGfrNH.mjs} +1 -1
  47. package/lib/{index-DUiyW0v6.js → index-B40ktVOy.js} +1 -1
  48. package/lib/{index-jfL73ugq.mjs → index-B4NYDFvU.mjs} +5 -5
  49. package/lib/{index--QOOnO1S.mjs → index-BAuH_G93.mjs} +5 -5
  50. package/lib/{index-C9ZemP81.mjs → index-BHMN5Px3.mjs} +2 -2
  51. package/lib/{index-CGbZMLbJ.mjs → index-BO0DC-jc.mjs} +3 -3
  52. package/lib/{index-BziywkBj.mjs → index-BQ0RlDhv.mjs} +246 -272
  53. package/lib/{index-Cuu-xM0U.mjs → index-BR4w3fuE.mjs} +5 -5
  54. package/lib/{index-DnOkd5VL.js → index-BTNmmLkb.js} +1 -1
  55. package/lib/{index-BQwsEzas.mjs → index-BlJpOhTM.mjs} +5 -5
  56. package/lib/{index-CjL3WbDp.js → index-Blzzdktm.js} +1 -1
  57. package/lib/{index-Bc7EWiox.js → index-Bn1o04G7.js} +80 -80
  58. package/lib/index-C2Pe6i5V.js +1 -0
  59. package/lib/{index-5xE5bjpW.mjs → index-C9XIIFQK.mjs} +1 -1
  60. package/lib/{index-XFRw6zfV.mjs → index-CCRPy0B_.mjs} +2 -2
  61. package/lib/index-CE0rxdUf.js +1 -0
  62. package/lib/{index-Bu6LLuxH.mjs → index-CEXcD8Mw.mjs} +4 -4
  63. package/lib/{index-BLYjmYmu.mjs → index-CKg04pdA.mjs} +5 -5
  64. package/lib/{index-CxW1HjrT.mjs → index-CM_IP492.mjs} +14 -14
  65. package/lib/{index-pjyIirVB.mjs → index-CT2-qOL1.mjs} +2 -2
  66. package/lib/{index-DFHQnDR7.mjs → index-CYdhveYx.mjs} +6 -6
  67. package/lib/{index-COkWxUoe.mjs → index-Cda4HnP1.mjs} +5 -5
  68. package/lib/{index-BYzONVwG.mjs → index-CfC3_uPF.mjs} +7 -7
  69. package/lib/index-DC1ot7tO.js +1 -0
  70. package/lib/{index-v0MO46Zl.mjs → index-DHAgduQ-.mjs} +4 -4
  71. package/lib/{index-DQjqwKVk.mjs → index-DSSOE7Me.mjs} +2 -2
  72. package/lib/{index-BbCcdl9J.mjs → index-DoFo485M.mjs} +73 -72
  73. package/lib/{index-BNjB0Q50.mjs → index-DvxmZnxH.mjs} +5 -5
  74. package/lib/{index-ju2wtFjy.mjs → index-Dw7INWis.mjs} +7 -7
  75. package/lib/{index-t94-e3qG.js → index-VhcNuaP6.js} +1 -1
  76. package/lib/index-dpkTW-H8.js +1 -0
  77. package/lib/index-f_27F6WX.js +1 -0
  78. package/lib/{index-BkHLwIMc.mjs → index-l0sxQXRT.mjs} +1 -1
  79. package/lib/{index-CdOqWihR.mjs → index-mXHkgOxH.mjs} +4 -4
  80. package/lib/{index-C2jOUiub.mjs → index-pN0Dgjjf.mjs} +5 -5
  81. package/lib/{index-B7U-me-L.mjs → index-pNqQSm4p.mjs} +6628 -6659
  82. package/lib/{index.es-BYLVcsBS.js → index.es-_N4sKEIC.js} +1 -1
  83. package/lib/{index.es-BrgiiIYV.mjs → index.es-rEir51oG.mjs} +7 -7
  84. package/lib/index.js +1 -1
  85. package/lib/index.mjs +5 -5
  86. package/lib/mayan.mjs +10 -10
  87. package/lib/{mint-BjwZUbPm.mjs → mint-DVxIczlI.mjs} +2 -2
  88. package/lib/ntt.js +1 -1
  89. package/lib/ntt.mjs +10 -10
  90. package/lib/{platform-pi9E7cPR.mjs → platform-CbDx4hex.mjs} +4 -4
  91. package/lib/platform-CyTWPtDR.js +1 -0
  92. package/lib/{platform-C-edrCmf.mjs → platform-D-nUFU0e.mjs} +6 -6
  93. package/lib/platform-PaIJsXKV.mjs +118 -0
  94. package/lib/{provider-jsonrpc-BjcoR80W.mjs → provider-jsonrpc-C_IZFSfB.mjs} +2 -2
  95. package/lib/{sha3-B1KxiAa7.mjs → sha3-DQQvDwj1.mjs} +1 -1
  96. package/lib/{signer-CgLO7fBA.mjs → signer-CsMX8mEc.mjs} +6 -6
  97. package/lib/{solana-DA48rYUK.js → solana-BRQmi9BN.js} +1 -1
  98. package/lib/solana-C_0khyJw.mjs +18 -0
  99. package/lib/{solana-Pjpx_PkM.js → solana-CrjSp_Zk.js} +1 -1
  100. package/lib/{solana-CvaeYBIB.mjs → solana-SQhnN3yB.mjs} +6 -6
  101. package/lib/{solanaEmbed.esm-jxAhxZ9V.js → solanaEmbed.esm-B7IRXgnI.js} +1 -1
  102. package/lib/{solanaEmbed.esm-Gti-Nr19.mjs → solanaEmbed.esm-Din0Z51P.mjs} +3 -3
  103. package/lib/src/components/SampleApp/index.d.ts.map +1 -1
  104. package/lib/src/config/index.d.ts.map +1 -1
  105. package/lib/src/config/types.d.ts +2 -0
  106. package/lib/src/config/types.d.ts.map +1 -1
  107. package/lib/src/exports/executor.d.ts +2 -0
  108. package/lib/src/exports/executor.d.ts.map +1 -0
  109. package/lib/src/hooks/useFetchSupportedRoutes.d.ts.map +1 -1
  110. package/lib/src/utils/index.d.ts +1 -0
  111. package/lib/src/utils/index.d.ts.map +1 -1
  112. package/lib/src/utils/sdkv2.d.ts +0 -1
  113. package/lib/src/utils/sdkv2.d.ts.map +1 -1
  114. package/lib/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
  115. package/lib/src/views/v2/Redeem/TransactionDetails/index.d.ts.map +1 -1
  116. package/lib/src/views/v2/Redeem/index.d.ts.map +1 -1
  117. package/lib/{sui-CuwmPzXZ.mjs → sui-BSLo7-bI.mjs} +14 -14
  118. package/lib/{sui-Bi1J0W_P.mjs → sui-BePFnRSc.mjs} +3 -3
  119. package/lib/{sui-uSCH-o_h.js → sui-C7KPm3kD.js} +1 -1
  120. package/lib/{tokens-DcqY0jHv.js → tokens-CChVRIuE.js} +1 -1
  121. package/lib/{tokens-DOx4hiaR.mjs → tokens-CyKAZUN-.mjs} +4 -4
  122. package/lib/{units-YO78Cq5F.mjs → units-DP5zqyxn.mjs} +9 -9
  123. package/lib/{unsignedTransaction-Cj476rGh.mjs → unsignedTransaction-fSrwDjHx.mjs} +9 -9
  124. package/lib/{web3--AtxvLIy.mjs → web3-DCo8oN-v.mjs} +4 -4
  125. package/package.json +16 -1
  126. package/lib/aptos-VwYOwtQy.mjs +0 -179
  127. package/lib/aptos-hc5GrCHO.js +0 -2
  128. package/lib/constants-Cib4VRZO.js +0 -1
  129. package/lib/index-BlzRxQ82.js +0 -1
  130. package/lib/index-CJXmILJz.js +0 -1
  131. package/lib/index-C_dsyQjC.mjs +0 -46
  132. package/lib/index-CpuzvBlL.js +0 -1
  133. package/lib/index-Cxg2C7RE.js +0 -1
  134. package/lib/index-DDAGOrv0.js +0 -1
  135. package/lib/solana-qHqB-cdc.mjs +0 -18
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("./address-RcMobNYE.js"),Ze=require("./index-Bc7EWiox.js"),hs=require("./index-DUiyW0v6.js");function Ts(e){"@babel/helpers - typeof";return Ts=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ts(e)}function x1(e,t){if(Ts(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(Ts(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function D1(e){var t=x1(e,"string");return Ts(t)=="symbol"?t:t+""}var bc={exports:{}},qb=Ze.eventsExports.EventEmitter,Al,kg;function j1(){if(kg)return Al;kg=1;function e(x,v){var C=Object.keys(x);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(x);v&&(B=B.filter(function(P){return Object.getOwnPropertyDescriptor(x,P).enumerable})),C.push.apply(C,B)}return C}function t(x){for(var v=1;v<arguments.length;v++){var C=arguments[v]!=null?arguments[v]:{};v%2?e(Object(C),!0).forEach(function(B){r(x,B,C[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(C)):e(Object(C)).forEach(function(B){Object.defineProperty(x,B,Object.getOwnPropertyDescriptor(C,B))})}return x}function r(x,v,C){return v=f(v),v in x?Object.defineProperty(x,v,{value:C,enumerable:!0,configurable:!0,writable:!0}):x[v]=C,x}function o(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function s(x,v){for(var C=0;C<v.length;C++){var B=v[C];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(x,f(B.key),B)}}function u(x,v,C){return v&&s(x.prototype,v),Object.defineProperty(x,"prototype",{writable:!1}),x}function f(x){var v=h(x,"string");return typeof v=="symbol"?v:String(v)}function h(x,v){if(typeof x!="object"||x===null)return x;var C=x[Symbol.toPrimitive];if(C!==void 0){var B=C.call(x,v);if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(x)}var l=z.bufferPolyfill,p=l.Buffer,b=Ze.require$$3,w=b.inspect,I=w&&w.custom||"inspect";function A(x,v,C){p.prototype.copy.call(x,v,C)}return Al=function(){function x(){o(this,x),this.head=null,this.tail=null,this.length=0}return u(x,[{key:"push",value:function(C){var B={data:C,next:null};this.length>0?this.tail.next=B:this.head=B,this.tail=B,++this.length}},{key:"unshift",value:function(C){var B={data:C,next:this.head};this.length===0&&(this.tail=B),this.head=B,++this.length}},{key:"shift",value:function(){if(this.length!==0){var C=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,C}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(C){if(this.length===0)return"";for(var B=this.head,P=""+B.data;B=B.next;)P+=C+B.data;return P}},{key:"concat",value:function(C){if(this.length===0)return p.alloc(0);for(var B=p.allocUnsafe(C>>>0),P=this.head,S=0;P;)A(P.data,B,S),S+=P.data.length,P=P.next;return B}},{key:"consume",value:function(C,B){var P;return C<this.head.data.length?(P=this.head.data.slice(0,C),this.head.data=this.head.data.slice(C)):C===this.head.data.length?P=this.shift():P=B?this._getString(C):this._getBuffer(C),P}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(C){var B=this.head,P=1,S=B.data;for(C-=S.length;B=B.next;){var m=B.data,j=C>m.length?m.length:C;if(j===m.length?S+=m:S+=m.slice(0,C),C-=j,C===0){j===m.length?(++P,B.next?this.head=B.next:this.head=this.tail=null):(this.head=B,B.data=m.slice(j));break}++P}return this.length-=P,S}},{key:"_getBuffer",value:function(C){var B=p.allocUnsafe(C),P=this.head,S=1;for(P.data.copy(B),C-=P.data.length;P=P.next;){var m=P.data,j=C>m.length?m.length:C;if(m.copy(B,B.length-C,0,j),C-=j,C===0){j===m.length?(++S,P.next?this.head=P.next:this.head=this.tail=null):(this.head=P,P.data=m.slice(j));break}++S}return this.length-=S,B}},{key:I,value:function(C,B){return w(this,t(t({},B),{},{depth:0,customInspect:!1}))}}]),x}(),Al}function U1(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,z.dist.process.nextTick(_c,this,e)):z.dist.process.nextTick(_c,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(u){!t&&u?r._writableState?r._writableState.errorEmitted?z.dist.process.nextTick(uu,r):(r._writableState.errorEmitted=!0,z.dist.process.nextTick(Fg,r,u)):z.dist.process.nextTick(Fg,r,u):t?(z.dist.process.nextTick(uu,r),t(u)):z.dist.process.nextTick(uu,r)}),this)}function Fg(e,t){_c(e,t),uu(e)}function uu(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function k1(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function _c(e,t){e.emit("error",t)}function F1(e,t){var r=e._readableState,o=e._writableState;r&&r.autoDestroy||o&&o.autoDestroy?e.destroy(t):e.emit("error",t)}var Gb={destroy:U1,undestroy:k1,errorOrDestroy:F1},zi={};function H1(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Vb={};function qr(e,t,r){r||(r=Error);function o(u,f,h){return typeof t=="string"?t:t(u,f,h)}var s=function(u){H1(f,u);function f(h,l,p){return u.call(this,o(h,l,p))||this}return f}(r);s.prototype.name=r.name,s.prototype.code=e,Vb[e]=s}function Hg(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(o){return String(o)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function W1(e,t,r){return e.substr(0,t.length)===t}function q1(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function G1(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}qr("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);qr("ERR_INVALID_ARG_TYPE",function(e,t,r){var o;typeof t=="string"&&W1(t,"not ")?(o="must not be",t=t.replace(/^not /,"")):o="must be";var s;if(q1(e," argument"))s="The ".concat(e," ").concat(o," ").concat(Hg(t,"type"));else{var u=G1(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(Hg(t,"type"))}return s+=". Received type ".concat(typeof r),s},TypeError);qr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");qr("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});qr("ERR_STREAM_PREMATURE_CLOSE","Premature close");qr("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});qr("ERR_MULTIPLE_CALLBACK","Callback called multiple times");qr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");qr("ERR_STREAM_WRITE_AFTER_END","write after end");qr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);qr("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);qr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");zi.codes=Vb;var V1=zi.codes.ERR_INVALID_OPT_VALUE;function z1(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function K1(e,t,r,o){var s=z1(t,o,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var u=o?r:"highWaterMark";throw new V1(u,s)}return Math.floor(s)}return e.objectMode?16:16*1024}var zb={getHighWaterMark:K1},Tl,Wg;function Kb(){if(Wg)return Tl;Wg=1,Tl=ue;function e(R){var O=this;this.next=null,this.entry=null,this.finish=function(){be(O,R)}}var t;ue.WritableState=Q;var r={deprecate:Ze.requireBrowser()},o=qb,s=z.bufferPolyfill.Buffer,u=(typeof z.commonjsGlobal<"u"?z.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function f(R){return s.from(R)}function h(R){return s.isBuffer(R)||R instanceof u}var l=Gb,p=zb,b=p.getHighWaterMark,w=zi.codes,I=w.ERR_INVALID_ARG_TYPE,A=w.ERR_METHOD_NOT_IMPLEMENTED,x=w.ERR_MULTIPLE_CALLBACK,v=w.ERR_STREAM_CANNOT_PIPE,C=w.ERR_STREAM_DESTROYED,B=w.ERR_STREAM_NULL_VALUES,P=w.ERR_STREAM_WRITE_AFTER_END,S=w.ERR_UNKNOWN_ENCODING,m=l.errorOrDestroy;Ze.inherits_browserExports(ue,o);function j(){}function Q(R,O,W){t=t||Co(),R=R||{},typeof W!="boolean"&&(W=O instanceof t),this.objectMode=!!R.objectMode,W&&(this.objectMode=this.objectMode||!!R.writableObjectMode),this.highWaterMark=b(this,R,"writableHighWaterMark",W),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var oe=R.decodeStrings===!1;this.decodeStrings=!oe,this.defaultEncoding=R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ye){Y(O,ye)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=R.emitClose!==!1,this.autoDestroy=!!R.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}Q.prototype.getBuffer=function(){for(var O=this.bufferedRequest,W=[];O;)W.push(O),O=O.next;return W},function(){try{Object.defineProperty(Q.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var ce;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ce=Function.prototype[Symbol.hasInstance],Object.defineProperty(ue,Symbol.hasInstance,{value:function(O){return ce.call(this,O)?!0:this!==ue?!1:O&&O._writableState instanceof Q}})):ce=function(O){return O instanceof this};function ue(R){t=t||Co();var O=this instanceof t;if(!O&&!ce.call(ue,this))return new ue(R);this._writableState=new Q(R,this,O),this.writable=!0,R&&(typeof R.write=="function"&&(this._write=R.write),typeof R.writev=="function"&&(this._writev=R.writev),typeof R.destroy=="function"&&(this._destroy=R.destroy),typeof R.final=="function"&&(this._final=R.final)),o.call(this)}ue.prototype.pipe=function(){m(this,new v)};function te(R,O){var W=new P;m(R,W),z.dist.process.nextTick(O,W)}function Se(R,O,W,oe){var ye;return W===null?ye=new B:typeof W!="string"&&!O.objectMode&&(ye=new I("chunk",["string","Buffer"],W)),ye?(m(R,ye),z.dist.process.nextTick(oe,ye),!1):!0}ue.prototype.write=function(R,O,W){var oe=this._writableState,ye=!1,d=!oe.objectMode&&h(R);return d&&!s.isBuffer(R)&&(R=f(R)),typeof O=="function"&&(W=O,O=null),d?O="buffer":O||(O=oe.defaultEncoding),typeof W!="function"&&(W=j),oe.ending?te(this,W):(d||Se(this,oe,R,W))&&(oe.pendingcb++,ye=F(this,oe,d,R,O,W)),ye},ue.prototype.cork=function(){this._writableState.corked++},ue.prototype.uncork=function(){var R=this._writableState;R.corked&&(R.corked--,!R.writing&&!R.corked&&!R.bufferProcessing&&R.bufferedRequest&&H(this,R))},ue.prototype.setDefaultEncoding=function(O){if(typeof O=="string"&&(O=O.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((O+"").toLowerCase())>-1))throw new S(O);return this._writableState.defaultEncoding=O,this},Object.defineProperty(ue.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function me(R,O,W){return!R.objectMode&&R.decodeStrings!==!1&&typeof O=="string"&&(O=s.from(O,W)),O}Object.defineProperty(ue.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function F(R,O,W,oe,ye,d){if(!W){var g=me(O,oe,ye);oe!==g&&(W=!0,ye="buffer",oe=g)}var _=O.objectMode?1:oe.length;O.length+=_;var E=O.length<O.highWaterMark;if(E||(O.needDrain=!0),O.writing||O.corked){var J=O.lastBufferedRequest;O.lastBufferedRequest={chunk:oe,encoding:ye,isBuf:W,callback:d,next:null},J?J.next=O.lastBufferedRequest:O.bufferedRequest=O.lastBufferedRequest,O.bufferedRequestCount+=1}else U(R,O,!1,_,oe,ye,d);return E}function U(R,O,W,oe,ye,d,g){O.writelen=oe,O.writecb=g,O.writing=!0,O.sync=!0,O.destroyed?O.onwrite(new C("write")):W?R._writev(ye,O.onwrite):R._write(ye,d,O.onwrite),O.sync=!1}function $(R,O,W,oe,ye){--O.pendingcb,W?(z.dist.process.nextTick(ye,oe),z.dist.process.nextTick(re,R,O),R._writableState.errorEmitted=!0,m(R,oe)):(ye(oe),R._writableState.errorEmitted=!0,m(R,oe),re(R,O))}function q(R){R.writing=!1,R.writecb=null,R.length-=R.writelen,R.writelen=0}function Y(R,O){var W=R._writableState,oe=W.sync,ye=W.writecb;if(typeof ye!="function")throw new x;if(q(W),O)$(R,W,oe,O,ye);else{var d=K(W)||R.destroyed;!d&&!W.corked&&!W.bufferProcessing&&W.bufferedRequest&&H(R,W),oe?z.dist.process.nextTick(G,R,W,d,ye):G(R,W,d,ye)}}function G(R,O,W,oe){W||ne(R,O),O.pendingcb--,oe(),re(R,O)}function ne(R,O){O.length===0&&O.needDrain&&(O.needDrain=!1,R.emit("drain"))}function H(R,O){O.bufferProcessing=!0;var W=O.bufferedRequest;if(R._writev&&W&&W.next){var oe=O.bufferedRequestCount,ye=new Array(oe),d=O.corkedRequestsFree;d.entry=W;for(var g=0,_=!0;W;)ye[g]=W,W.isBuf||(_=!1),W=W.next,g+=1;ye.allBuffers=_,U(R,O,!0,O.length,ye,"",d.finish),O.pendingcb++,O.lastBufferedRequest=null,d.next?(O.corkedRequestsFree=d.next,d.next=null):O.corkedRequestsFree=new e(O),O.bufferedRequestCount=0}else{for(;W;){var E=W.chunk,J=W.encoding,ie=W.callback,se=O.objectMode?1:E.length;if(U(R,O,!1,se,E,J,ie),W=W.next,O.bufferedRequestCount--,O.writing)break}W===null&&(O.lastBufferedRequest=null)}O.bufferedRequest=W,O.bufferProcessing=!1}ue.prototype._write=function(R,O,W){W(new A("_write()"))},ue.prototype._writev=null,ue.prototype.end=function(R,O,W){var oe=this._writableState;return typeof R=="function"?(W=R,R=null,O=null):typeof O=="function"&&(W=O,O=null),R!=null&&this.write(R,O),oe.corked&&(oe.corked=1,this.uncork()),oe.ending||_e(this,oe,W),this},Object.defineProperty(ue.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function K(R){return R.ending&&R.length===0&&R.bufferedRequest===null&&!R.finished&&!R.writing}function ae(R,O){R._final(function(W){O.pendingcb--,W&&m(R,W),O.prefinished=!0,R.emit("prefinish"),re(R,O)})}function de(R,O){!O.prefinished&&!O.finalCalled&&(typeof R._final=="function"&&!O.destroyed?(O.pendingcb++,O.finalCalled=!0,z.dist.process.nextTick(ae,R,O)):(O.prefinished=!0,R.emit("prefinish")))}function re(R,O){var W=K(O);if(W&&(de(R,O),O.pendingcb===0&&(O.finished=!0,R.emit("finish"),O.autoDestroy))){var oe=R._readableState;(!oe||oe.autoDestroy&&oe.endEmitted)&&R.destroy()}return W}function _e(R,O,W){O.ending=!0,re(R,O),W&&(O.finished?z.dist.process.nextTick(W):R.once("finish",W)),O.ended=!0,R.writable=!1}function be(R,O,W){var oe=R.entry;for(R.entry=null;oe;){var ye=oe.callback;O.pendingcb--,ye(W),oe=oe.next}O.corkedRequestsFree.next=R}return Object.defineProperty(ue.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(O){this._writableState&&(this._writableState.destroyed=O)}}),ue.prototype.destroy=l.destroy,ue.prototype._undestroy=l.undestroy,ue.prototype._destroy=function(R,O){O(R)},Tl}var Il,qg;function Co(){if(qg)return Il;qg=1;var e=Object.keys||function(p){var b=[];for(var w in p)b.push(w);return b};Il=f;var t=Yb(),r=Kb();Ze.inherits_browserExports(f,t);for(var o=e(r.prototype),s=0;s<o.length;s++){var u=o[s];f.prototype[u]||(f.prototype[u]=r.prototype[u])}function f(p){if(!(this instanceof f))return new f(p);t.call(this,p),r.call(this,p),this.allowHalfOpen=!0,p&&(p.readable===!1&&(this.readable=!1),p.writable===!1&&(this.writable=!1),p.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function h(){this._writableState.ended||z.dist.process.nextTick(l,this)}function l(p){p.end()}return Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(b){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=b,this._writableState.destroyed=b)}}),Il}var Gg=zi.codes.ERR_STREAM_PREMATURE_CLOSE;function J1(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];e.apply(this,o)}}}function Y1(){}function X1(e){return e.setHeader&&typeof e.abort=="function"}function Jb(e,t,r){if(typeof t=="function")return Jb(e,null,t);t||(t={}),r=J1(r||Y1);var o=t.readable||t.readable!==!1&&e.readable,s=t.writable||t.writable!==!1&&e.writable,u=function(){e.writable||h()},f=e._writableState&&e._writableState.finished,h=function(){s=!1,f=!0,o||r.call(e)},l=e._readableState&&e._readableState.endEmitted,p=function(){o=!1,l=!0,s||r.call(e)},b=function(x){r.call(e,x)},w=function(){var x;if(o&&!l)return(!e._readableState||!e._readableState.ended)&&(x=new Gg),r.call(e,x);if(s&&!f)return(!e._writableState||!e._writableState.ended)&&(x=new Gg),r.call(e,x)},I=function(){e.req.on("finish",h)};return X1(e)?(e.on("complete",h),e.on("abort",w),e.req?I():e.on("request",I)):s&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",p),e.on("finish",h),t.error!==!1&&e.on("error",b),e.on("close",w),function(){e.removeListener("complete",h),e.removeListener("abort",w),e.removeListener("request",I),e.req&&e.req.removeListener("finish",h),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",h),e.removeListener("end",p),e.removeListener("error",b),e.removeListener("close",w)}}var Gc=Jb,Ol,Vg;function Z1(){if(Vg)return Ol;Vg=1;var e;function t(S,m,j){return m=r(m),m in S?Object.defineProperty(S,m,{value:j,enumerable:!0,configurable:!0,writable:!0}):S[m]=j,S}function r(S){var m=o(S,"string");return typeof m=="symbol"?m:String(m)}function o(S,m){if(typeof S!="object"||S===null)return S;var j=S[Symbol.toPrimitive];if(j!==void 0){var Q=j.call(S,m);if(typeof Q!="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(S)}var s=Gc,u=Symbol("lastResolve"),f=Symbol("lastReject"),h=Symbol("error"),l=Symbol("ended"),p=Symbol("lastPromise"),b=Symbol("handlePromise"),w=Symbol("stream");function I(S,m){return{value:S,done:m}}function A(S){var m=S[u];if(m!==null){var j=S[w].read();j!==null&&(S[p]=null,S[u]=null,S[f]=null,m(I(j,!1)))}}function x(S){z.dist.process.nextTick(A,S)}function v(S,m){return function(j,Q){S.then(function(){if(m[l]){j(I(void 0,!0));return}m[b](j,Q)},Q)}}var C=Object.getPrototypeOf(function(){}),B=Object.setPrototypeOf((e={get stream(){return this[w]},next:function(){var m=this,j=this[h];if(j!==null)return Promise.reject(j);if(this[l])return Promise.resolve(I(void 0,!0));if(this[w].destroyed)return new Promise(function(te,Se){z.dist.process.nextTick(function(){m[h]?Se(m[h]):te(I(void 0,!0))})});var Q=this[p],ce;if(Q)ce=new Promise(v(Q,this));else{var ue=this[w].read();if(ue!==null)return Promise.resolve(I(ue,!1));ce=new Promise(this[b])}return this[p]=ce,ce}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var m=this;return new Promise(function(j,Q){m[w].destroy(null,function(ce){if(ce){Q(ce);return}j(I(void 0,!0))})})}),e),C),P=function(m){var j,Q=Object.create(B,(j={},t(j,w,{value:m,writable:!0}),t(j,u,{value:null,writable:!0}),t(j,f,{value:null,writable:!0}),t(j,h,{value:null,writable:!0}),t(j,l,{value:m._readableState.endEmitted,writable:!0}),t(j,b,{value:function(ue,te){var Se=Q[w].read();Se?(Q[p]=null,Q[u]=null,Q[f]=null,ue(I(Se,!1))):(Q[u]=ue,Q[f]=te)},writable:!0}),j));return Q[p]=null,s(m,function(ce){if(ce&&ce.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ue=Q[f];ue!==null&&(Q[p]=null,Q[u]=null,Q[f]=null,ue(ce)),Q[h]=ce;return}var te=Q[u];te!==null&&(Q[p]=null,Q[u]=null,Q[f]=null,te(I(void 0,!0))),Q[l]=!0}),m.on("readable",x.bind(null,Q)),Q};return Ol=P,Ol}var Cl,zg;function Q1(){return zg||(zg=1,Cl=function(){throw new Error("Readable.from is not available in the browser")}),Cl}var Ll,Kg;function Yb(){if(Kg)return Ll;Kg=1,Ll=te;var e;te.ReadableState=ue,Ze.eventsExports.EventEmitter;var t=function(g,_){return g.listeners(_).length},r=qb,o=z.bufferPolyfill.Buffer,s=(typeof z.commonjsGlobal<"u"?z.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function u(d){return o.from(d)}function f(d){return o.isBuffer(d)||d instanceof s}var h=Ze.require$$3,l;h&&h.debuglog?l=h.debuglog("stream"):l=function(){};var p=j1(),b=Gb,w=zb,I=w.getHighWaterMark,A=zi.codes,x=A.ERR_INVALID_ARG_TYPE,v=A.ERR_STREAM_PUSH_AFTER_EOF,C=A.ERR_METHOD_NOT_IMPLEMENTED,B=A.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,P,S,m;Ze.inherits_browserExports(te,r);var j=b.errorOrDestroy,Q=["error","close","destroy","pause","resume"];function ce(d,g,_){if(typeof d.prependListener=="function")return d.prependListener(g,_);!d._events||!d._events[g]?d.on(g,_):Array.isArray(d._events[g])?d._events[g].unshift(_):d._events[g]=[_,d._events[g]]}function ue(d,g,_){e=e||Co(),d=d||{},typeof _!="boolean"&&(_=g instanceof e),this.objectMode=!!d.objectMode,_&&(this.objectMode=this.objectMode||!!d.readableObjectMode),this.highWaterMark=I(this,d,"readableHighWaterMark",_),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=d.emitClose!==!1,this.autoDestroy=!!d.autoDestroy,this.destroyed=!1,this.defaultEncoding=d.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,d.encoding&&(P||(P=Ze.requireString_decoder().StringDecoder),this.decoder=new P(d.encoding),this.encoding=d.encoding)}function te(d){if(e=e||Co(),!(this instanceof te))return new te(d);var g=this instanceof e;this._readableState=new ue(d,this,g),this.readable=!0,d&&(typeof d.read=="function"&&(this._read=d.read),typeof d.destroy=="function"&&(this._destroy=d.destroy)),r.call(this)}Object.defineProperty(te.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(g){this._readableState&&(this._readableState.destroyed=g)}}),te.prototype.destroy=b.destroy,te.prototype._undestroy=b.undestroy,te.prototype._destroy=function(d,g){g(d)},te.prototype.push=function(d,g){var _=this._readableState,E;return _.objectMode?E=!0:typeof d=="string"&&(g=g||_.defaultEncoding,g!==_.encoding&&(d=o.from(d,g),g=""),E=!0),Se(this,d,g,!1,E)},te.prototype.unshift=function(d){return Se(this,d,null,!0,!1)};function Se(d,g,_,E,J){l("readableAddChunk",g);var ie=d._readableState;if(g===null)ie.reading=!1,Y(d,ie);else{var se;if(J||(se=F(ie,g)),se)j(d,se);else if(ie.objectMode||g&&g.length>0)if(typeof g!="string"&&!ie.objectMode&&Object.getPrototypeOf(g)!==o.prototype&&(g=u(g)),E)ie.endEmitted?j(d,new B):me(d,ie,g,!0);else if(ie.ended)j(d,new v);else{if(ie.destroyed)return!1;ie.reading=!1,ie.decoder&&!_?(g=ie.decoder.write(g),ie.objectMode||g.length!==0?me(d,ie,g,!1):H(d,ie)):me(d,ie,g,!1)}else E||(ie.reading=!1,H(d,ie))}return!ie.ended&&(ie.length<ie.highWaterMark||ie.length===0)}function me(d,g,_,E){g.flowing&&g.length===0&&!g.sync?(g.awaitDrain=0,d.emit("data",_)):(g.length+=g.objectMode?1:_.length,E?g.buffer.unshift(_):g.buffer.push(_),g.needReadable&&G(d)),H(d,g)}function F(d,g){var _;return!f(g)&&typeof g!="string"&&g!==void 0&&!d.objectMode&&(_=new x("chunk",["string","Buffer","Uint8Array"],g)),_}te.prototype.isPaused=function(){return this._readableState.flowing===!1},te.prototype.setEncoding=function(d){P||(P=Ze.requireString_decoder().StringDecoder);var g=new P(d);this._readableState.decoder=g,this._readableState.encoding=this._readableState.decoder.encoding;for(var _=this._readableState.buffer.head,E="";_!==null;)E+=g.write(_.data),_=_.next;return this._readableState.buffer.clear(),E!==""&&this._readableState.buffer.push(E),this._readableState.length=E.length,this};var U=1073741824;function $(d){return d>=U?d=U:(d--,d|=d>>>1,d|=d>>>2,d|=d>>>4,d|=d>>>8,d|=d>>>16,d++),d}function q(d,g){return d<=0||g.length===0&&g.ended?0:g.objectMode?1:d!==d?g.flowing&&g.length?g.buffer.head.data.length:g.length:(d>g.highWaterMark&&(g.highWaterMark=$(d)),d<=g.length?d:g.ended?g.length:(g.needReadable=!0,0))}te.prototype.read=function(d){l("read",d),d=parseInt(d,10);var g=this._readableState,_=d;if(d!==0&&(g.emittedReadable=!1),d===0&&g.needReadable&&((g.highWaterMark!==0?g.length>=g.highWaterMark:g.length>0)||g.ended))return l("read: emitReadable",g.length,g.ended),g.length===0&&g.ended?W(this):G(this),null;if(d=q(d,g),d===0&&g.ended)return g.length===0&&W(this),null;var E=g.needReadable;l("need readable",E),(g.length===0||g.length-d<g.highWaterMark)&&(E=!0,l("length less than watermark",E)),g.ended||g.reading?(E=!1,l("reading or ended",E)):E&&(l("do read"),g.reading=!0,g.sync=!0,g.length===0&&(g.needReadable=!0),this._read(g.highWaterMark),g.sync=!1,g.reading||(d=q(_,g)));var J;return d>0?J=O(d,g):J=null,J===null?(g.needReadable=g.length<=g.highWaterMark,d=0):(g.length-=d,g.awaitDrain=0),g.length===0&&(g.ended||(g.needReadable=!0),_!==d&&g.ended&&W(this)),J!==null&&this.emit("data",J),J};function Y(d,g){if(l("onEofChunk"),!g.ended){if(g.decoder){var _=g.decoder.end();_&&_.length&&(g.buffer.push(_),g.length+=g.objectMode?1:_.length)}g.ended=!0,g.sync?G(d):(g.needReadable=!1,g.emittedReadable||(g.emittedReadable=!0,ne(d)))}}function G(d){var g=d._readableState;l("emitReadable",g.needReadable,g.emittedReadable),g.needReadable=!1,g.emittedReadable||(l("emitReadable",g.flowing),g.emittedReadable=!0,z.dist.process.nextTick(ne,d))}function ne(d){var g=d._readableState;l("emitReadable_",g.destroyed,g.length,g.ended),!g.destroyed&&(g.length||g.ended)&&(d.emit("readable"),g.emittedReadable=!1),g.needReadable=!g.flowing&&!g.ended&&g.length<=g.highWaterMark,R(d)}function H(d,g){g.readingMore||(g.readingMore=!0,z.dist.process.nextTick(K,d,g))}function K(d,g){for(;!g.reading&&!g.ended&&(g.length<g.highWaterMark||g.flowing&&g.length===0);){var _=g.length;if(l("maybeReadMore read 0"),d.read(0),_===g.length)break}g.readingMore=!1}te.prototype._read=function(d){j(this,new C("_read()"))},te.prototype.pipe=function(d,g){var _=this,E=this._readableState;switch(E.pipesCount){case 0:E.pipes=d;break;case 1:E.pipes=[E.pipes,d];break;default:E.pipes.push(d);break}E.pipesCount+=1,l("pipe count=%d opts=%j",E.pipesCount,g);var J=(!g||g.end!==!1)&&d!==z.dist.process.stdout&&d!==z.dist.process.stderr,ie=J?Ie:yt;E.endEmitted?z.dist.process.nextTick(ie):_.once("end",ie),d.on("unpipe",se);function se(Ye,Ve){l("onunpipe"),Ye===_&&Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,Ue())}function Ie(){l("onend"),d.end()}var Be=ae(_);d.on("drain",Be);var Ce=!1;function Ue(){l("cleanup"),d.removeListener("close",_t),d.removeListener("finish",tt),d.removeListener("drain",Be),d.removeListener("error",He),d.removeListener("unpipe",se),_.removeListener("end",Ie),_.removeListener("end",yt),_.removeListener("data",Re),Ce=!0,E.awaitDrain&&(!d._writableState||d._writableState.needDrain)&&Be()}_.on("data",Re);function Re(Ye){l("ondata");var Ve=d.write(Ye);l("dest.write",Ve),Ve===!1&&((E.pipesCount===1&&E.pipes===d||E.pipesCount>1&&ye(E.pipes,d)!==-1)&&!Ce&&(l("false write response, pause",E.awaitDrain),E.awaitDrain++),_.pause())}function He(Ye){l("onerror",Ye),yt(),d.removeListener("error",He),t(d,"error")===0&&j(d,Ye)}ce(d,"error",He);function _t(){d.removeListener("finish",tt),yt()}d.once("close",_t);function tt(){l("onfinish"),d.removeListener("close",_t),yt()}d.once("finish",tt);function yt(){l("unpipe"),_.unpipe(d)}return d.emit("pipe",_),E.flowing||(l("pipe resume"),_.resume()),d};function ae(d){return function(){var _=d._readableState;l("pipeOnDrain",_.awaitDrain),_.awaitDrain&&_.awaitDrain--,_.awaitDrain===0&&t(d,"data")&&(_.flowing=!0,R(d))}}te.prototype.unpipe=function(d){var g=this._readableState,_={hasUnpiped:!1};if(g.pipesCount===0)return this;if(g.pipesCount===1)return d&&d!==g.pipes?this:(d||(d=g.pipes),g.pipes=null,g.pipesCount=0,g.flowing=!1,d&&d.emit("unpipe",this,_),this);if(!d){var E=g.pipes,J=g.pipesCount;g.pipes=null,g.pipesCount=0,g.flowing=!1;for(var ie=0;ie<J;ie++)E[ie].emit("unpipe",this,{hasUnpiped:!1});return this}var se=ye(g.pipes,d);return se===-1?this:(g.pipes.splice(se,1),g.pipesCount-=1,g.pipesCount===1&&(g.pipes=g.pipes[0]),d.emit("unpipe",this,_),this)},te.prototype.on=function(d,g){var _=r.prototype.on.call(this,d,g),E=this._readableState;return d==="data"?(E.readableListening=this.listenerCount("readable")>0,E.flowing!==!1&&this.resume()):d==="readable"&&!E.endEmitted&&!E.readableListening&&(E.readableListening=E.needReadable=!0,E.flowing=!1,E.emittedReadable=!1,l("on readable",E.length,E.reading),E.length?G(this):E.reading||z.dist.process.nextTick(re,this)),_},te.prototype.addListener=te.prototype.on,te.prototype.removeListener=function(d,g){var _=r.prototype.removeListener.call(this,d,g);return d==="readable"&&z.dist.process.nextTick(de,this),_},te.prototype.removeAllListeners=function(d){var g=r.prototype.removeAllListeners.apply(this,arguments);return(d==="readable"||d===void 0)&&z.dist.process.nextTick(de,this),g};function de(d){var g=d._readableState;g.readableListening=d.listenerCount("readable")>0,g.resumeScheduled&&!g.paused?g.flowing=!0:d.listenerCount("data")>0&&d.resume()}function re(d){l("readable nexttick read 0"),d.read(0)}te.prototype.resume=function(){var d=this._readableState;return d.flowing||(l("resume"),d.flowing=!d.readableListening,_e(this,d)),d.paused=!1,this};function _e(d,g){g.resumeScheduled||(g.resumeScheduled=!0,z.dist.process.nextTick(be,d,g))}function be(d,g){l("resume",g.reading),g.reading||d.read(0),g.resumeScheduled=!1,d.emit("resume"),R(d),g.flowing&&!g.reading&&d.read(0)}te.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function R(d){var g=d._readableState;for(l("flow",g.flowing);g.flowing&&d.read()!==null;);}te.prototype.wrap=function(d){var g=this,_=this._readableState,E=!1;d.on("end",function(){if(l("wrapped end"),_.decoder&&!_.ended){var se=_.decoder.end();se&&se.length&&g.push(se)}g.push(null)}),d.on("data",function(se){if(l("wrapped data"),_.decoder&&(se=_.decoder.write(se)),!(_.objectMode&&se==null)&&!(!_.objectMode&&(!se||!se.length))){var Ie=g.push(se);Ie||(E=!0,d.pause())}});for(var J in d)this[J]===void 0&&typeof d[J]=="function"&&(this[J]=function(Ie){return function(){return d[Ie].apply(d,arguments)}}(J));for(var ie=0;ie<Q.length;ie++)d.on(Q[ie],this.emit.bind(this,Q[ie]));return this._read=function(se){l("wrapped _read",se),E&&(E=!1,d.resume())},this},typeof Symbol=="function"&&(te.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=Z1()),S(this)}),Object.defineProperty(te.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(te.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(te.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(g){this._readableState&&(this._readableState.flowing=g)}}),te._fromList=O,Object.defineProperty(te.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function O(d,g){if(g.length===0)return null;var _;return g.objectMode?_=g.buffer.shift():!d||d>=g.length?(g.decoder?_=g.buffer.join(""):g.buffer.length===1?_=g.buffer.first():_=g.buffer.concat(g.length),g.buffer.clear()):_=g.buffer.consume(d,g.decoder),_}function W(d){var g=d._readableState;l("endReadable",g.endEmitted),g.endEmitted||(g.ended=!0,z.dist.process.nextTick(oe,g,d))}function oe(d,g){if(l("endReadableNT",d.endEmitted,d.length),!d.endEmitted&&d.length===0&&(d.endEmitted=!0,g.readable=!1,g.emit("end"),d.autoDestroy)){var _=g._writableState;(!_||_.autoDestroy&&_.finished)&&g.destroy()}}typeof Symbol=="function"&&(te.from=function(d,g){return m===void 0&&(m=Q1()),m(te,d,g)});function ye(d,g){for(var _=0,E=d.length;_<E;_++)if(d[_]===g)return _;return-1}return Ll}var Xb=Yn,Au=zi.codes,eA=Au.ERR_METHOD_NOT_IMPLEMENTED,tA=Au.ERR_MULTIPLE_CALLBACK,rA=Au.ERR_TRANSFORM_ALREADY_TRANSFORMING,nA=Au.ERR_TRANSFORM_WITH_LENGTH_0,Tu=Co();Ze.inherits_browserExports(Yn,Tu);function iA(e,t){var r=this._transformState;r.transforming=!1;var o=r.writecb;if(o===null)return this.emit("error",new tA);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),o(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function Yn(e){if(!(this instanceof Yn))return new Yn(e);Tu.call(this,e),this._transformState={afterTransform:iA.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",oA)}function oA(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){Jg(e,t,r)}):Jg(this,null,null)}Yn.prototype.push=function(e,t){return this._transformState.needTransform=!1,Tu.prototype.push.call(this,e,t)};Yn.prototype._transform=function(e,t,r){r(new eA("_transform()"))};Yn.prototype._write=function(e,t,r){var o=this._transformState;if(o.writecb=r,o.writechunk=e,o.writeencoding=t,!o.transforming){var s=this._readableState;(o.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}};Yn.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};Yn.prototype._destroy=function(e,t){Tu.prototype._destroy.call(this,e,function(r){t(r)})};function Jg(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new nA;if(e._transformState.transforming)throw new rA;return e.push(null)}var sA=Is,Zb=Xb;Ze.inherits_browserExports(Is,Zb);function Is(e){if(!(this instanceof Is))return new Is(e);Zb.call(this,e)}Is.prototype._transform=function(e,t,r){r(null,e)};var Pl;function aA(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var Qb=zi.codes,uA=Qb.ERR_MISSING_ARGS,fA=Qb.ERR_STREAM_DESTROYED;function Yg(e){if(e)throw e}function lA(e){return e.setHeader&&typeof e.abort=="function"}function cA(e,t,r,o){o=aA(o);var s=!1;e.on("close",function(){s=!0}),Pl===void 0&&(Pl=Gc),Pl(e,{readable:t,writable:r},function(f){if(f)return o(f);s=!0,o()});var u=!1;return function(f){if(!s&&!u){if(u=!0,lA(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();o(f||new fA("pipe"))}}}function Xg(e){e()}function dA(e,t){return e.pipe(t)}function hA(e){return!e.length||typeof e[e.length-1]!="function"?Yg:e.pop()}function gA(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o=hA(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new uA("streams");var s,u=t.map(function(f,h){var l=h<t.length-1,p=h>0;return cA(f,l,p,function(b){s||(s=b),b&&u.forEach(Xg),!l&&(u.forEach(Xg),o(s))})});return t.reduce(dA)}var pA=gA;(function(e,t){t=e.exports=Yb(),t.Stream=t,t.Readable=t,t.Writable=Kb(),t.Duplex=Co(),t.Transform=Xb,t.PassThrough=sA,t.finished=Gc,t.pipeline=pA})(bc,bc.exports);var e_=bc.exports;const{Transform:SN}=e_,{Transform:RN}=e_;var t_={};const Zg=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t_.p1600=function(e){for(let t=0;t<24;++t){const r=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],f=e[4]^e[14]^e[24]^e[34]^e[44],h=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],p=e[7]^e[17]^e[27]^e[37]^e[47],b=e[8]^e[18]^e[28]^e[38]^e[48],w=e[9]^e[19]^e[29]^e[39]^e[49];let I=b^(s<<1|u>>>31),A=w^(u<<1|s>>>31);const x=e[0]^I,v=e[1]^A,C=e[10]^I,B=e[11]^A,P=e[20]^I,S=e[21]^A,m=e[30]^I,j=e[31]^A,Q=e[40]^I,ce=e[41]^A;I=r^(f<<1|h>>>31),A=o^(h<<1|f>>>31);const ue=e[2]^I,te=e[3]^A,Se=e[12]^I,me=e[13]^A,F=e[22]^I,U=e[23]^A,$=e[32]^I,q=e[33]^A,Y=e[42]^I,G=e[43]^A;I=s^(l<<1|p>>>31),A=u^(p<<1|l>>>31);const ne=e[4]^I,H=e[5]^A,K=e[14]^I,ae=e[15]^A,de=e[24]^I,re=e[25]^A,_e=e[34]^I,be=e[35]^A,R=e[44]^I,O=e[45]^A;I=f^(b<<1|w>>>31),A=h^(w<<1|b>>>31);const W=e[6]^I,oe=e[7]^A,ye=e[16]^I,d=e[17]^A,g=e[26]^I,_=e[27]^A,E=e[36]^I,J=e[37]^A,ie=e[46]^I,se=e[47]^A;I=l^(r<<1|o>>>31),A=p^(o<<1|r>>>31);const Ie=e[8]^I,Be=e[9]^A,Ce=e[18]^I,Ue=e[19]^A,Re=e[28]^I,He=e[29]^A,_t=e[38]^I,tt=e[39]^A,yt=e[48]^I,Ye=e[49]^A,Ve=x,jt=v,Pt=B<<4|C>>>28,ut=C<<4|B>>>28,Nt=P<<3|S>>>29,lr=S<<3|P>>>29,tr=j<<9|m>>>23,Ft=m<<9|j>>>23,cr=Q<<18|ce>>>14,Kr=ce<<18|Q>>>14,Jr=ue<<1|te>>>31,an=te<<1|ue>>>31,un=me<<12|Se>>>20,rr=Se<<12|me>>>20,Cr=F<<10|U>>>22,nr=U<<10|F>>>22,Pn=q<<13|$>>>19,Yr=$<<13|q>>>19,fn=Y<<2|G>>>30,N=G<<2|Y>>>30,D=H<<30|ne>>>2,Ee=ne<<30|H>>>2,ve=K<<6|ae>>>26,Te=ae<<6|K>>>26,wt=re<<11|de>>>21,Rt=de<<11|re>>>21,ln=_e<<15|be>>>17,Bt=be<<15|_e>>>17,cn=O<<29|R>>>3,Bn=R<<29|O>>>3,dn=W<<28|oe>>>4,hn=oe<<28|W>>>4,Xr=d<<23|ye>>>9,Vt=ye<<23|d>>>9,Lr=g<<25|_>>>7,wr=_<<25|g>>>7,ir=E<<21|J>>>11,Ht=J<<21|E>>>11,Ii=se<<24|ie>>>8,Oi=ie<<24|se>>>8,Nn=Ie<<27|Be>>>5,gn=Be<<27|Ie>>>5,pn=Ce<<20|Ue>>>12,Pr=Ue<<20|Ce>>>12,Ci=He<<7|Re>>>25,bn=Re<<7|He>>>25,ri=_t<<8|tt>>>24,ni=tt<<8|_t>>>24,ii=yt<<14|Ye>>>18,oi=Ye<<14|yt>>>18;e[0]=Ve^~un&wt,e[1]=jt^~rr&Rt,e[10]=dn^~pn&Nt,e[11]=hn^~Pr&lr,e[20]=Jr^~ve&Lr,e[21]=an^~Te&wr,e[30]=Nn^~Pt&Cr,e[31]=gn^~ut&nr,e[40]=D^~Xr&Ci,e[41]=Ee^~Vt&bn,e[2]=un^~wt&ir,e[3]=rr^~Rt&Ht,e[12]=pn^~Nt&Pn,e[13]=Pr^~lr&Yr,e[22]=ve^~Lr&ri,e[23]=Te^~wr&ni,e[32]=Pt^~Cr&ln,e[33]=ut^~nr&Bt,e[42]=Xr^~Ci&tr,e[43]=Vt^~bn&Ft,e[4]=wt^~ir&ii,e[5]=Rt^~Ht&oi,e[14]=Nt^~Pn&cn,e[15]=lr^~Yr&Bn,e[24]=Lr^~ri&cr,e[25]=wr^~ni&Kr,e[34]=Cr^~ln&Ii,e[35]=nr^~Bt&Oi,e[44]=Ci^~tr&fn,e[45]=bn^~Ft&N,e[6]=ir^~ii&Ve,e[7]=Ht^~oi&jt,e[16]=Pn^~cn&dn,e[17]=Yr^~Bn&hn,e[26]=ri^~cr&Jr,e[27]=ni^~Kr&an,e[36]=ln^~Ii&Nn,e[37]=Bt^~Oi&gn,e[46]=tr^~fn&D,e[47]=Ft^~N&Ee,e[8]=ii^~Ve&un,e[9]=oi^~jt&rr,e[18]=cn^~dn&pn,e[19]=Bn^~hn&Pr,e[28]=cr^~Jr&ve,e[29]=Kr^~an&Te,e[38]=Ii^~Nn&Pt,e[39]=Oi^~gn&ut,e[48]=fn^~D&Xr,e[49]=N^~Ee&Vt,e[0]^=Zg[t*2],e[1]^=Zg[t*2+1]}};const hu=t_;function Ms(){this.state=[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],this.blockSize=null,this.count=0,this.squeezing=!1}Ms.prototype.initialize=function(e,t){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1};Ms.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(hu.p1600(this.state),this.count=0)};Ms.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),e&128&&this.count===this.blockSize-1&&hu.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),hu.p1600(this.state),this.count=0,this.squeezing=!0};Ms.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=z.dist.Buffer.alloc(e);for(let r=0;r<e;++r)t[r]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(hu.p1600(this.state),this.count=0);return t};Ms.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing};var bA=_A;function _A(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,r=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return r=r%t,r++}}const yA=z.getDefaultExportFromCjs(bA);var yc={exports:{}},Bl,Qg;function wA(){if(Qg)return Bl;Qg=1;var e=1e3,t=e*60,r=t*60,o=r*24,s=o*7,u=o*365.25;Bl=function(b,w){w=w||{};var I=typeof b;if(I==="string"&&b.length>0)return f(b);if(I==="number"&&isFinite(b))return w.long?l(b):h(b);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(b))};function f(b){if(b=String(b),!(b.length>100)){var w=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(b);if(w){var I=parseFloat(w[1]),A=(w[2]||"ms").toLowerCase();switch(A){case"years":case"year":case"yrs":case"yr":case"y":return I*u;case"weeks":case"week":case"w":return I*s;case"days":case"day":case"d":return I*o;case"hours":case"hour":case"hrs":case"hr":case"h":return I*r;case"minutes":case"minute":case"mins":case"min":case"m":return I*t;case"seconds":case"second":case"secs":case"sec":case"s":return I*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return I;default:return}}}}function h(b){var w=Math.abs(b);return w>=o?Math.round(b/o)+"d":w>=r?Math.round(b/r)+"h":w>=t?Math.round(b/t)+"m":w>=e?Math.round(b/e)+"s":b+"ms"}function l(b){var w=Math.abs(b);return w>=o?p(b,w,o,"day"):w>=r?p(b,w,r,"hour"):w>=t?p(b,w,t,"minute"):w>=e?p(b,w,e,"second"):b+" ms"}function p(b,w,I,A){var x=w>=I*1.5;return Math.round(b/I)+" "+A+(x?"s":"")}return Bl}function mA(e){r.debug=r,r.default=r,r.coerce=l,r.disable=f,r.enable=s,r.enabled=h,r.humanize=wA(),r.destroy=p,Object.keys(e).forEach(b=>{r[b]=e[b]}),r.names=[],r.skips=[],r.formatters={};function t(b){let w=0;for(let I=0;I<b.length;I++)w=(w<<5)-w+b.charCodeAt(I),w|=0;return r.colors[Math.abs(w)%r.colors.length]}r.selectColor=t;function r(b){let w,I=null,A,x;function v(...C){if(!v.enabled)return;const B=v,P=Number(new Date),S=P-(w||P);B.diff=S,B.prev=w,B.curr=P,w=P,C[0]=r.coerce(C[0]),typeof C[0]!="string"&&C.unshift("%O");let m=0;C[0]=C[0].replace(/%([a-zA-Z%])/g,(Q,ce)=>{if(Q==="%%")return"%";m++;const ue=r.formatters[ce];if(typeof ue=="function"){const te=C[m];Q=ue.call(B,te),C.splice(m,1),m--}return Q}),r.formatArgs.call(B,C),(B.log||r.log).apply(B,C)}return v.namespace=b,v.useColors=r.useColors(),v.color=r.selectColor(b),v.extend=o,v.destroy=r.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>I!==null?I:(A!==r.namespaces&&(A=r.namespaces,x=r.enabled(b)),x),set:C=>{I=C}}),typeof r.init=="function"&&r.init(v),v}function o(b,w){const I=r(this.namespace+(typeof w>"u"?":":w)+b);return I.log=this.log,I}function s(b){r.save(b),r.namespaces=b,r.names=[],r.skips=[];const w=(typeof b=="string"?b:"").trim().replace(" ",",").split(",").filter(Boolean);for(const I of w)I[0]==="-"?r.skips.push(I.slice(1)):r.names.push(I)}function u(b,w){let I=0,A=0,x=-1,v=0;for(;I<b.length;)if(A<w.length&&(w[A]===b[I]||w[A]==="*"))w[A]==="*"?(x=A,v=I,A++):(I++,A++);else if(x!==-1)A=x+1,v++,I=v;else return!1;for(;A<w.length&&w[A]==="*";)A++;return A===w.length}function f(){const b=[...r.names,...r.skips.map(w=>"-"+w)].join(",");return r.enable(""),b}function h(b){for(const w of r.skips)if(u(b,w))return!1;for(const w of r.names)if(u(b,w))return!0;return!1}function l(b){return b instanceof Error?b.stack||b.message:b}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}var EA=mA;(function(e,t){t.formatArgs=o,t.save=s,t.load=u,t.useColors=r,t.storage=f(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let l;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(l=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(l[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const p="color: "+this.color;l.splice(1,0,p,"color: inherit");let b=0,w=0;l[0].replace(/%[a-zA-Z%]/g,I=>{I!=="%%"&&(b++,I==="%c"&&(w=b))}),l.splice(w,0,p)}t.log=console.debug||console.log||(()=>{});function s(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function u(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof z.dist.process<"u"&&"env"in z.dist.process&&(l=z.dist.process.env.DEBUG),l}function f(){try{return localStorage}catch{}}e.exports=EA(t);const{formatters:h}=e.exports;h.j=function(l){try{return JSON.stringify(l)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}}})(yc,yc.exports);var vA=yc.exports,on={},vi={},Vc=Os;Os.default=Os;Os.stable=i_;Os.stableStringify=i_;var gu="[...]",r_="[Circular]",qi=[],Hi=[];function n_(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Os(e,t,r,o){typeof o>"u"&&(o=n_()),wc(e,"",0,[],void 0,0,o);var s;try{Hi.length===0?s=JSON.stringify(e,t,r):s=JSON.stringify(e,o_(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;qi.length!==0;){var u=qi.pop();u.length===4?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function Ao(e,t,r,o){var s=Object.getOwnPropertyDescriptor(o,r);s.get!==void 0?s.configurable?(Object.defineProperty(o,r,{value:e}),qi.push([o,r,t,s])):Hi.push([t,r,e]):(o[r]=e,qi.push([o,r,t]))}function wc(e,t,r,o,s,u,f){u+=1;var h;if(typeof e=="object"&&e!==null){for(h=0;h<o.length;h++)if(o[h]===e){Ao(r_,e,t,s);return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){Ao(gu,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){Ao(gu,e,t,s);return}if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)wc(e[h],h,h,o,e,u,f);else{var l=Object.keys(e);for(h=0;h<l.length;h++){var p=l[h];wc(e[p],p,h,o,e,u,f)}}o.pop()}}function SA(e,t){return e<t?-1:e>t?1:0}function i_(e,t,r,o){typeof o>"u"&&(o=n_());var s=mc(e,"",0,[],void 0,0,o)||e,u;try{Hi.length===0?u=JSON.stringify(s,t,r):u=JSON.stringify(s,o_(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;qi.length!==0;){var f=qi.pop();f.length===4?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return u}function mc(e,t,r,o,s,u,f){u+=1;var h;if(typeof e=="object"&&e!==null){for(h=0;h<o.length;h++)if(o[h]===e){Ao(r_,e,t,s);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){Ao(gu,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){Ao(gu,e,t,s);return}if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)mc(e[h],h,h,o,e,u,f);else{var l={},p=Object.keys(e).sort(SA);for(h=0;h<p.length;h++){var b=p[h];mc(e[b],b,h,o,e,u,f),l[b]=e[b]}if(typeof s<"u")qi.push([s,t,e]),s[t]=l;else return l}o.pop()}}function o_(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(Hi.length>0)for(var o=0;o<Hi.length;o++){var s=Hi[o];if(s[1]===t&&s[0]===r){r=s[2],Hi.splice(o,1);break}}return e.call(this,t,r)}}const RA=z.getDefaultExportFromCjs(Vc);Object.defineProperty(vi,"__esModule",{value:!0});vi.EthereumProviderError=vi.EthereumRpcError=void 0;const AA=Vc;class s_ extends Error{constructor(t,r,o){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,o!==void 0&&(this.data=o)}serialize(){const t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return AA.default(this.serialize(),OA,2)}}vi.EthereumRpcError=s_;let TA=class extends s_{constructor(t,r,o){if(!IA(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,o)}};vi.EthereumProviderError=TA;function IA(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function OA(e,t){if(t!=="[Circular]")return t}var zc={},Si={};Object.defineProperty(Si,"__esModule",{value:!0});Si.errorValues=Si.errorCodes=void 0;Si.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};Si.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=Si,r=vi,o=t.errorCodes.rpc.internal,s="Unspecified error message. This is a bug, please report it.",u={code:o,message:f(o)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function f(I,A=s){if(Number.isInteger(I)){const x=I.toString();if(w(t.errorValues,x))return t.errorValues[x].message;if(p(I))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return A}e.getMessageFromCode=f;function h(I){if(!Number.isInteger(I))return!1;const A=I.toString();return!!(t.errorValues[A]||p(I))}e.isValidCode=h;function l(I,{fallbackError:A=u,shouldIncludeStack:x=!1}={}){var v,C;if(!A||!Number.isInteger(A.code)||typeof A.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(I instanceof r.EthereumRpcError)return I.serialize();const B={};if(I&&typeof I=="object"&&!Array.isArray(I)&&w(I,"code")&&h(I.code)){const S=I;B.code=S.code,S.message&&typeof S.message=="string"?(B.message=S.message,w(S,"data")&&(B.data=S.data)):(B.message=f(B.code),B.data={originalError:b(I)})}else{B.code=A.code;const S=(v=I)===null||v===void 0?void 0:v.message;B.message=S&&typeof S=="string"?S:A.message,B.data={originalError:b(I)}}const P=(C=I)===null||C===void 0?void 0:C.stack;return x&&I&&P&&typeof P=="string"&&(B.stack=P),B}e.serializeError=l;function p(I){return I>=-32099&&I<=-32e3}function b(I){return I&&typeof I=="object"&&!Array.isArray(I)?Object.assign({},I):I}function w(I,A){return Object.prototype.hasOwnProperty.call(I,A)}})(zc);var Iu={};Object.defineProperty(Iu,"__esModule",{value:!0});Iu.ethErrors=void 0;const Kc=vi,a_=zc,Xt=Si;Iu.ethErrors={rpc:{parse:e=>Ur(Xt.errorCodes.rpc.parse,e),invalidRequest:e=>Ur(Xt.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Ur(Xt.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Ur(Xt.errorCodes.rpc.methodNotFound,e),internal:e=>Ur(Xt.errorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Ur(t,e)},invalidInput:e=>Ur(Xt.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Ur(Xt.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Ur(Xt.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Ur(Xt.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Ur(Xt.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Ur(Xt.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>gs(Xt.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>gs(Xt.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>gs(Xt.errorCodes.provider.unsupportedMethod,e),disconnected:e=>gs(Xt.errorCodes.provider.disconnected,e),chainDisconnected:e=>gs(Xt.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:o}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new Kc.EthereumProviderError(t,r,o)}}};function Ur(e,t){const[r,o]=u_(t);return new Kc.EthereumRpcError(e,r||a_.getMessageFromCode(e),o)}function gs(e,t){const[r,o]=u_(t);return new Kc.EthereumProviderError(e,r||a_.getMessageFromCode(e),o)}function u_(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=vi;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=zc;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const o=Iu;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=Si;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})})(on);function Ne(e,t,r){return(t=D1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var CA={exports:{}},Nl={exports:{}};let LA=class extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);let r="";for(let o=0;o<t.length;o++)r+=` ${t[o].stack}
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("./address-RcMobNYE.js"),Ze=require("./index-Bn1o04G7.js"),hs=require("./index-B40ktVOy.js");function Ts(e){"@babel/helpers - typeof";return Ts=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ts(e)}function x1(e,t){if(Ts(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t);if(Ts(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function D1(e){var t=x1(e,"string");return Ts(t)=="symbol"?t:t+""}var bc={exports:{}},qb=Ze.eventsExports.EventEmitter,Al,kg;function j1(){if(kg)return Al;kg=1;function e(x,v){var C=Object.keys(x);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(x);v&&(B=B.filter(function(P){return Object.getOwnPropertyDescriptor(x,P).enumerable})),C.push.apply(C,B)}return C}function t(x){for(var v=1;v<arguments.length;v++){var C=arguments[v]!=null?arguments[v]:{};v%2?e(Object(C),!0).forEach(function(B){r(x,B,C[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(C)):e(Object(C)).forEach(function(B){Object.defineProperty(x,B,Object.getOwnPropertyDescriptor(C,B))})}return x}function r(x,v,C){return v=f(v),v in x?Object.defineProperty(x,v,{value:C,enumerable:!0,configurable:!0,writable:!0}):x[v]=C,x}function o(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function s(x,v){for(var C=0;C<v.length;C++){var B=v[C];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(x,f(B.key),B)}}function u(x,v,C){return v&&s(x.prototype,v),Object.defineProperty(x,"prototype",{writable:!1}),x}function f(x){var v=h(x,"string");return typeof v=="symbol"?v:String(v)}function h(x,v){if(typeof x!="object"||x===null)return x;var C=x[Symbol.toPrimitive];if(C!==void 0){var B=C.call(x,v);if(typeof B!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(x)}var l=z.bufferPolyfill,p=l.Buffer,b=Ze.require$$3,w=b.inspect,I=w&&w.custom||"inspect";function A(x,v,C){p.prototype.copy.call(x,v,C)}return Al=function(){function x(){o(this,x),this.head=null,this.tail=null,this.length=0}return u(x,[{key:"push",value:function(C){var B={data:C,next:null};this.length>0?this.tail.next=B:this.head=B,this.tail=B,++this.length}},{key:"unshift",value:function(C){var B={data:C,next:this.head};this.length===0&&(this.tail=B),this.head=B,++this.length}},{key:"shift",value:function(){if(this.length!==0){var C=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,C}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(C){if(this.length===0)return"";for(var B=this.head,P=""+B.data;B=B.next;)P+=C+B.data;return P}},{key:"concat",value:function(C){if(this.length===0)return p.alloc(0);for(var B=p.allocUnsafe(C>>>0),P=this.head,S=0;P;)A(P.data,B,S),S+=P.data.length,P=P.next;return B}},{key:"consume",value:function(C,B){var P;return C<this.head.data.length?(P=this.head.data.slice(0,C),this.head.data=this.head.data.slice(C)):C===this.head.data.length?P=this.shift():P=B?this._getString(C):this._getBuffer(C),P}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(C){var B=this.head,P=1,S=B.data;for(C-=S.length;B=B.next;){var m=B.data,j=C>m.length?m.length:C;if(j===m.length?S+=m:S+=m.slice(0,C),C-=j,C===0){j===m.length?(++P,B.next?this.head=B.next:this.head=this.tail=null):(this.head=B,B.data=m.slice(j));break}++P}return this.length-=P,S}},{key:"_getBuffer",value:function(C){var B=p.allocUnsafe(C),P=this.head,S=1;for(P.data.copy(B),C-=P.data.length;P=P.next;){var m=P.data,j=C>m.length?m.length:C;if(m.copy(B,B.length-C,0,j),C-=j,C===0){j===m.length?(++S,P.next?this.head=P.next:this.head=this.tail=null):(this.head=P,P.data=m.slice(j));break}++S}return this.length-=S,B}},{key:I,value:function(C,B){return w(this,t(t({},B),{},{depth:0,customInspect:!1}))}}]),x}(),Al}function U1(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,z.dist.process.nextTick(_c,this,e)):z.dist.process.nextTick(_c,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(u){!t&&u?r._writableState?r._writableState.errorEmitted?z.dist.process.nextTick(uu,r):(r._writableState.errorEmitted=!0,z.dist.process.nextTick(Fg,r,u)):z.dist.process.nextTick(Fg,r,u):t?(z.dist.process.nextTick(uu,r),t(u)):z.dist.process.nextTick(uu,r)}),this)}function Fg(e,t){_c(e,t),uu(e)}function uu(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function k1(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function _c(e,t){e.emit("error",t)}function F1(e,t){var r=e._readableState,o=e._writableState;r&&r.autoDestroy||o&&o.autoDestroy?e.destroy(t):e.emit("error",t)}var Gb={destroy:U1,undestroy:k1,errorOrDestroy:F1},zi={};function H1(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Vb={};function qr(e,t,r){r||(r=Error);function o(u,f,h){return typeof t=="string"?t:t(u,f,h)}var s=function(u){H1(f,u);function f(h,l,p){return u.call(this,o(h,l,p))||this}return f}(r);s.prototype.name=r.name,s.prototype.code=e,Vb[e]=s}function Hg(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(o){return String(o)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function W1(e,t,r){return e.substr(0,t.length)===t}function q1(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function G1(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}qr("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);qr("ERR_INVALID_ARG_TYPE",function(e,t,r){var o;typeof t=="string"&&W1(t,"not ")?(o="must not be",t=t.replace(/^not /,"")):o="must be";var s;if(q1(e," argument"))s="The ".concat(e," ").concat(o," ").concat(Hg(t,"type"));else{var u=G1(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(u," ").concat(o," ").concat(Hg(t,"type"))}return s+=". Received type ".concat(typeof r),s},TypeError);qr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");qr("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});qr("ERR_STREAM_PREMATURE_CLOSE","Premature close");qr("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});qr("ERR_MULTIPLE_CALLBACK","Callback called multiple times");qr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");qr("ERR_STREAM_WRITE_AFTER_END","write after end");qr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);qr("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);qr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");zi.codes=Vb;var V1=zi.codes.ERR_INVALID_OPT_VALUE;function z1(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function K1(e,t,r,o){var s=z1(t,o,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var u=o?r:"highWaterMark";throw new V1(u,s)}return Math.floor(s)}return e.objectMode?16:16*1024}var zb={getHighWaterMark:K1},Tl,Wg;function Kb(){if(Wg)return Tl;Wg=1,Tl=ue;function e(R){var O=this;this.next=null,this.entry=null,this.finish=function(){be(O,R)}}var t;ue.WritableState=Q;var r={deprecate:Ze.requireBrowser()},o=qb,s=z.bufferPolyfill.Buffer,u=(typeof z.commonjsGlobal<"u"?z.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function f(R){return s.from(R)}function h(R){return s.isBuffer(R)||R instanceof u}var l=Gb,p=zb,b=p.getHighWaterMark,w=zi.codes,I=w.ERR_INVALID_ARG_TYPE,A=w.ERR_METHOD_NOT_IMPLEMENTED,x=w.ERR_MULTIPLE_CALLBACK,v=w.ERR_STREAM_CANNOT_PIPE,C=w.ERR_STREAM_DESTROYED,B=w.ERR_STREAM_NULL_VALUES,P=w.ERR_STREAM_WRITE_AFTER_END,S=w.ERR_UNKNOWN_ENCODING,m=l.errorOrDestroy;Ze.inherits_browserExports(ue,o);function j(){}function Q(R,O,W){t=t||Co(),R=R||{},typeof W!="boolean"&&(W=O instanceof t),this.objectMode=!!R.objectMode,W&&(this.objectMode=this.objectMode||!!R.writableObjectMode),this.highWaterMark=b(this,R,"writableHighWaterMark",W),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var oe=R.decodeStrings===!1;this.decodeStrings=!oe,this.defaultEncoding=R.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ye){Y(O,ye)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=R.emitClose!==!1,this.autoDestroy=!!R.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}Q.prototype.getBuffer=function(){for(var O=this.bufferedRequest,W=[];O;)W.push(O),O=O.next;return W},function(){try{Object.defineProperty(Q.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var ce;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(ce=Function.prototype[Symbol.hasInstance],Object.defineProperty(ue,Symbol.hasInstance,{value:function(O){return ce.call(this,O)?!0:this!==ue?!1:O&&O._writableState instanceof Q}})):ce=function(O){return O instanceof this};function ue(R){t=t||Co();var O=this instanceof t;if(!O&&!ce.call(ue,this))return new ue(R);this._writableState=new Q(R,this,O),this.writable=!0,R&&(typeof R.write=="function"&&(this._write=R.write),typeof R.writev=="function"&&(this._writev=R.writev),typeof R.destroy=="function"&&(this._destroy=R.destroy),typeof R.final=="function"&&(this._final=R.final)),o.call(this)}ue.prototype.pipe=function(){m(this,new v)};function te(R,O){var W=new P;m(R,W),z.dist.process.nextTick(O,W)}function Se(R,O,W,oe){var ye;return W===null?ye=new B:typeof W!="string"&&!O.objectMode&&(ye=new I("chunk",["string","Buffer"],W)),ye?(m(R,ye),z.dist.process.nextTick(oe,ye),!1):!0}ue.prototype.write=function(R,O,W){var oe=this._writableState,ye=!1,d=!oe.objectMode&&h(R);return d&&!s.isBuffer(R)&&(R=f(R)),typeof O=="function"&&(W=O,O=null),d?O="buffer":O||(O=oe.defaultEncoding),typeof W!="function"&&(W=j),oe.ending?te(this,W):(d||Se(this,oe,R,W))&&(oe.pendingcb++,ye=F(this,oe,d,R,O,W)),ye},ue.prototype.cork=function(){this._writableState.corked++},ue.prototype.uncork=function(){var R=this._writableState;R.corked&&(R.corked--,!R.writing&&!R.corked&&!R.bufferProcessing&&R.bufferedRequest&&H(this,R))},ue.prototype.setDefaultEncoding=function(O){if(typeof O=="string"&&(O=O.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((O+"").toLowerCase())>-1))throw new S(O);return this._writableState.defaultEncoding=O,this},Object.defineProperty(ue.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function me(R,O,W){return!R.objectMode&&R.decodeStrings!==!1&&typeof O=="string"&&(O=s.from(O,W)),O}Object.defineProperty(ue.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function F(R,O,W,oe,ye,d){if(!W){var g=me(O,oe,ye);oe!==g&&(W=!0,ye="buffer",oe=g)}var _=O.objectMode?1:oe.length;O.length+=_;var E=O.length<O.highWaterMark;if(E||(O.needDrain=!0),O.writing||O.corked){var J=O.lastBufferedRequest;O.lastBufferedRequest={chunk:oe,encoding:ye,isBuf:W,callback:d,next:null},J?J.next=O.lastBufferedRequest:O.bufferedRequest=O.lastBufferedRequest,O.bufferedRequestCount+=1}else U(R,O,!1,_,oe,ye,d);return E}function U(R,O,W,oe,ye,d,g){O.writelen=oe,O.writecb=g,O.writing=!0,O.sync=!0,O.destroyed?O.onwrite(new C("write")):W?R._writev(ye,O.onwrite):R._write(ye,d,O.onwrite),O.sync=!1}function $(R,O,W,oe,ye){--O.pendingcb,W?(z.dist.process.nextTick(ye,oe),z.dist.process.nextTick(re,R,O),R._writableState.errorEmitted=!0,m(R,oe)):(ye(oe),R._writableState.errorEmitted=!0,m(R,oe),re(R,O))}function q(R){R.writing=!1,R.writecb=null,R.length-=R.writelen,R.writelen=0}function Y(R,O){var W=R._writableState,oe=W.sync,ye=W.writecb;if(typeof ye!="function")throw new x;if(q(W),O)$(R,W,oe,O,ye);else{var d=K(W)||R.destroyed;!d&&!W.corked&&!W.bufferProcessing&&W.bufferedRequest&&H(R,W),oe?z.dist.process.nextTick(G,R,W,d,ye):G(R,W,d,ye)}}function G(R,O,W,oe){W||ne(R,O),O.pendingcb--,oe(),re(R,O)}function ne(R,O){O.length===0&&O.needDrain&&(O.needDrain=!1,R.emit("drain"))}function H(R,O){O.bufferProcessing=!0;var W=O.bufferedRequest;if(R._writev&&W&&W.next){var oe=O.bufferedRequestCount,ye=new Array(oe),d=O.corkedRequestsFree;d.entry=W;for(var g=0,_=!0;W;)ye[g]=W,W.isBuf||(_=!1),W=W.next,g+=1;ye.allBuffers=_,U(R,O,!0,O.length,ye,"",d.finish),O.pendingcb++,O.lastBufferedRequest=null,d.next?(O.corkedRequestsFree=d.next,d.next=null):O.corkedRequestsFree=new e(O),O.bufferedRequestCount=0}else{for(;W;){var E=W.chunk,J=W.encoding,ie=W.callback,se=O.objectMode?1:E.length;if(U(R,O,!1,se,E,J,ie),W=W.next,O.bufferedRequestCount--,O.writing)break}W===null&&(O.lastBufferedRequest=null)}O.bufferedRequest=W,O.bufferProcessing=!1}ue.prototype._write=function(R,O,W){W(new A("_write()"))},ue.prototype._writev=null,ue.prototype.end=function(R,O,W){var oe=this._writableState;return typeof R=="function"?(W=R,R=null,O=null):typeof O=="function"&&(W=O,O=null),R!=null&&this.write(R,O),oe.corked&&(oe.corked=1,this.uncork()),oe.ending||_e(this,oe,W),this},Object.defineProperty(ue.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function K(R){return R.ending&&R.length===0&&R.bufferedRequest===null&&!R.finished&&!R.writing}function ae(R,O){R._final(function(W){O.pendingcb--,W&&m(R,W),O.prefinished=!0,R.emit("prefinish"),re(R,O)})}function de(R,O){!O.prefinished&&!O.finalCalled&&(typeof R._final=="function"&&!O.destroyed?(O.pendingcb++,O.finalCalled=!0,z.dist.process.nextTick(ae,R,O)):(O.prefinished=!0,R.emit("prefinish")))}function re(R,O){var W=K(O);if(W&&(de(R,O),O.pendingcb===0&&(O.finished=!0,R.emit("finish"),O.autoDestroy))){var oe=R._readableState;(!oe||oe.autoDestroy&&oe.endEmitted)&&R.destroy()}return W}function _e(R,O,W){O.ending=!0,re(R,O),W&&(O.finished?z.dist.process.nextTick(W):R.once("finish",W)),O.ended=!0,R.writable=!1}function be(R,O,W){var oe=R.entry;for(R.entry=null;oe;){var ye=oe.callback;O.pendingcb--,ye(W),oe=oe.next}O.corkedRequestsFree.next=R}return Object.defineProperty(ue.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(O){this._writableState&&(this._writableState.destroyed=O)}}),ue.prototype.destroy=l.destroy,ue.prototype._undestroy=l.undestroy,ue.prototype._destroy=function(R,O){O(R)},Tl}var Il,qg;function Co(){if(qg)return Il;qg=1;var e=Object.keys||function(p){var b=[];for(var w in p)b.push(w);return b};Il=f;var t=Yb(),r=Kb();Ze.inherits_browserExports(f,t);for(var o=e(r.prototype),s=0;s<o.length;s++){var u=o[s];f.prototype[u]||(f.prototype[u]=r.prototype[u])}function f(p){if(!(this instanceof f))return new f(p);t.call(this,p),r.call(this,p),this.allowHalfOpen=!0,p&&(p.readable===!1&&(this.readable=!1),p.writable===!1&&(this.writable=!1),p.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",h)))}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function h(){this._writableState.ended||z.dist.process.nextTick(l,this)}function l(p){p.end()}return Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(b){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=b,this._writableState.destroyed=b)}}),Il}var Gg=zi.codes.ERR_STREAM_PREMATURE_CLOSE;function J1(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];e.apply(this,o)}}}function Y1(){}function X1(e){return e.setHeader&&typeof e.abort=="function"}function Jb(e,t,r){if(typeof t=="function")return Jb(e,null,t);t||(t={}),r=J1(r||Y1);var o=t.readable||t.readable!==!1&&e.readable,s=t.writable||t.writable!==!1&&e.writable,u=function(){e.writable||h()},f=e._writableState&&e._writableState.finished,h=function(){s=!1,f=!0,o||r.call(e)},l=e._readableState&&e._readableState.endEmitted,p=function(){o=!1,l=!0,s||r.call(e)},b=function(x){r.call(e,x)},w=function(){var x;if(o&&!l)return(!e._readableState||!e._readableState.ended)&&(x=new Gg),r.call(e,x);if(s&&!f)return(!e._writableState||!e._writableState.ended)&&(x=new Gg),r.call(e,x)},I=function(){e.req.on("finish",h)};return X1(e)?(e.on("complete",h),e.on("abort",w),e.req?I():e.on("request",I)):s&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",p),e.on("finish",h),t.error!==!1&&e.on("error",b),e.on("close",w),function(){e.removeListener("complete",h),e.removeListener("abort",w),e.removeListener("request",I),e.req&&e.req.removeListener("finish",h),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",h),e.removeListener("end",p),e.removeListener("error",b),e.removeListener("close",w)}}var Gc=Jb,Ol,Vg;function Z1(){if(Vg)return Ol;Vg=1;var e;function t(S,m,j){return m=r(m),m in S?Object.defineProperty(S,m,{value:j,enumerable:!0,configurable:!0,writable:!0}):S[m]=j,S}function r(S){var m=o(S,"string");return typeof m=="symbol"?m:String(m)}function o(S,m){if(typeof S!="object"||S===null)return S;var j=S[Symbol.toPrimitive];if(j!==void 0){var Q=j.call(S,m);if(typeof Q!="object")return Q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(S)}var s=Gc,u=Symbol("lastResolve"),f=Symbol("lastReject"),h=Symbol("error"),l=Symbol("ended"),p=Symbol("lastPromise"),b=Symbol("handlePromise"),w=Symbol("stream");function I(S,m){return{value:S,done:m}}function A(S){var m=S[u];if(m!==null){var j=S[w].read();j!==null&&(S[p]=null,S[u]=null,S[f]=null,m(I(j,!1)))}}function x(S){z.dist.process.nextTick(A,S)}function v(S,m){return function(j,Q){S.then(function(){if(m[l]){j(I(void 0,!0));return}m[b](j,Q)},Q)}}var C=Object.getPrototypeOf(function(){}),B=Object.setPrototypeOf((e={get stream(){return this[w]},next:function(){var m=this,j=this[h];if(j!==null)return Promise.reject(j);if(this[l])return Promise.resolve(I(void 0,!0));if(this[w].destroyed)return new Promise(function(te,Se){z.dist.process.nextTick(function(){m[h]?Se(m[h]):te(I(void 0,!0))})});var Q=this[p],ce;if(Q)ce=new Promise(v(Q,this));else{var ue=this[w].read();if(ue!==null)return Promise.resolve(I(ue,!1));ce=new Promise(this[b])}return this[p]=ce,ce}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var m=this;return new Promise(function(j,Q){m[w].destroy(null,function(ce){if(ce){Q(ce);return}j(I(void 0,!0))})})}),e),C),P=function(m){var j,Q=Object.create(B,(j={},t(j,w,{value:m,writable:!0}),t(j,u,{value:null,writable:!0}),t(j,f,{value:null,writable:!0}),t(j,h,{value:null,writable:!0}),t(j,l,{value:m._readableState.endEmitted,writable:!0}),t(j,b,{value:function(ue,te){var Se=Q[w].read();Se?(Q[p]=null,Q[u]=null,Q[f]=null,ue(I(Se,!1))):(Q[u]=ue,Q[f]=te)},writable:!0}),j));return Q[p]=null,s(m,function(ce){if(ce&&ce.code!=="ERR_STREAM_PREMATURE_CLOSE"){var ue=Q[f];ue!==null&&(Q[p]=null,Q[u]=null,Q[f]=null,ue(ce)),Q[h]=ce;return}var te=Q[u];te!==null&&(Q[p]=null,Q[u]=null,Q[f]=null,te(I(void 0,!0))),Q[l]=!0}),m.on("readable",x.bind(null,Q)),Q};return Ol=P,Ol}var Cl,zg;function Q1(){return zg||(zg=1,Cl=function(){throw new Error("Readable.from is not available in the browser")}),Cl}var Ll,Kg;function Yb(){if(Kg)return Ll;Kg=1,Ll=te;var e;te.ReadableState=ue,Ze.eventsExports.EventEmitter;var t=function(g,_){return g.listeners(_).length},r=qb,o=z.bufferPolyfill.Buffer,s=(typeof z.commonjsGlobal<"u"?z.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function u(d){return o.from(d)}function f(d){return o.isBuffer(d)||d instanceof s}var h=Ze.require$$3,l;h&&h.debuglog?l=h.debuglog("stream"):l=function(){};var p=j1(),b=Gb,w=zb,I=w.getHighWaterMark,A=zi.codes,x=A.ERR_INVALID_ARG_TYPE,v=A.ERR_STREAM_PUSH_AFTER_EOF,C=A.ERR_METHOD_NOT_IMPLEMENTED,B=A.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,P,S,m;Ze.inherits_browserExports(te,r);var j=b.errorOrDestroy,Q=["error","close","destroy","pause","resume"];function ce(d,g,_){if(typeof d.prependListener=="function")return d.prependListener(g,_);!d._events||!d._events[g]?d.on(g,_):Array.isArray(d._events[g])?d._events[g].unshift(_):d._events[g]=[_,d._events[g]]}function ue(d,g,_){e=e||Co(),d=d||{},typeof _!="boolean"&&(_=g instanceof e),this.objectMode=!!d.objectMode,_&&(this.objectMode=this.objectMode||!!d.readableObjectMode),this.highWaterMark=I(this,d,"readableHighWaterMark",_),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=d.emitClose!==!1,this.autoDestroy=!!d.autoDestroy,this.destroyed=!1,this.defaultEncoding=d.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,d.encoding&&(P||(P=Ze.requireString_decoder().StringDecoder),this.decoder=new P(d.encoding),this.encoding=d.encoding)}function te(d){if(e=e||Co(),!(this instanceof te))return new te(d);var g=this instanceof e;this._readableState=new ue(d,this,g),this.readable=!0,d&&(typeof d.read=="function"&&(this._read=d.read),typeof d.destroy=="function"&&(this._destroy=d.destroy)),r.call(this)}Object.defineProperty(te.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(g){this._readableState&&(this._readableState.destroyed=g)}}),te.prototype.destroy=b.destroy,te.prototype._undestroy=b.undestroy,te.prototype._destroy=function(d,g){g(d)},te.prototype.push=function(d,g){var _=this._readableState,E;return _.objectMode?E=!0:typeof d=="string"&&(g=g||_.defaultEncoding,g!==_.encoding&&(d=o.from(d,g),g=""),E=!0),Se(this,d,g,!1,E)},te.prototype.unshift=function(d){return Se(this,d,null,!0,!1)};function Se(d,g,_,E,J){l("readableAddChunk",g);var ie=d._readableState;if(g===null)ie.reading=!1,Y(d,ie);else{var se;if(J||(se=F(ie,g)),se)j(d,se);else if(ie.objectMode||g&&g.length>0)if(typeof g!="string"&&!ie.objectMode&&Object.getPrototypeOf(g)!==o.prototype&&(g=u(g)),E)ie.endEmitted?j(d,new B):me(d,ie,g,!0);else if(ie.ended)j(d,new v);else{if(ie.destroyed)return!1;ie.reading=!1,ie.decoder&&!_?(g=ie.decoder.write(g),ie.objectMode||g.length!==0?me(d,ie,g,!1):H(d,ie)):me(d,ie,g,!1)}else E||(ie.reading=!1,H(d,ie))}return!ie.ended&&(ie.length<ie.highWaterMark||ie.length===0)}function me(d,g,_,E){g.flowing&&g.length===0&&!g.sync?(g.awaitDrain=0,d.emit("data",_)):(g.length+=g.objectMode?1:_.length,E?g.buffer.unshift(_):g.buffer.push(_),g.needReadable&&G(d)),H(d,g)}function F(d,g){var _;return!f(g)&&typeof g!="string"&&g!==void 0&&!d.objectMode&&(_=new x("chunk",["string","Buffer","Uint8Array"],g)),_}te.prototype.isPaused=function(){return this._readableState.flowing===!1},te.prototype.setEncoding=function(d){P||(P=Ze.requireString_decoder().StringDecoder);var g=new P(d);this._readableState.decoder=g,this._readableState.encoding=this._readableState.decoder.encoding;for(var _=this._readableState.buffer.head,E="";_!==null;)E+=g.write(_.data),_=_.next;return this._readableState.buffer.clear(),E!==""&&this._readableState.buffer.push(E),this._readableState.length=E.length,this};var U=1073741824;function $(d){return d>=U?d=U:(d--,d|=d>>>1,d|=d>>>2,d|=d>>>4,d|=d>>>8,d|=d>>>16,d++),d}function q(d,g){return d<=0||g.length===0&&g.ended?0:g.objectMode?1:d!==d?g.flowing&&g.length?g.buffer.head.data.length:g.length:(d>g.highWaterMark&&(g.highWaterMark=$(d)),d<=g.length?d:g.ended?g.length:(g.needReadable=!0,0))}te.prototype.read=function(d){l("read",d),d=parseInt(d,10);var g=this._readableState,_=d;if(d!==0&&(g.emittedReadable=!1),d===0&&g.needReadable&&((g.highWaterMark!==0?g.length>=g.highWaterMark:g.length>0)||g.ended))return l("read: emitReadable",g.length,g.ended),g.length===0&&g.ended?W(this):G(this),null;if(d=q(d,g),d===0&&g.ended)return g.length===0&&W(this),null;var E=g.needReadable;l("need readable",E),(g.length===0||g.length-d<g.highWaterMark)&&(E=!0,l("length less than watermark",E)),g.ended||g.reading?(E=!1,l("reading or ended",E)):E&&(l("do read"),g.reading=!0,g.sync=!0,g.length===0&&(g.needReadable=!0),this._read(g.highWaterMark),g.sync=!1,g.reading||(d=q(_,g)));var J;return d>0?J=O(d,g):J=null,J===null?(g.needReadable=g.length<=g.highWaterMark,d=0):(g.length-=d,g.awaitDrain=0),g.length===0&&(g.ended||(g.needReadable=!0),_!==d&&g.ended&&W(this)),J!==null&&this.emit("data",J),J};function Y(d,g){if(l("onEofChunk"),!g.ended){if(g.decoder){var _=g.decoder.end();_&&_.length&&(g.buffer.push(_),g.length+=g.objectMode?1:_.length)}g.ended=!0,g.sync?G(d):(g.needReadable=!1,g.emittedReadable||(g.emittedReadable=!0,ne(d)))}}function G(d){var g=d._readableState;l("emitReadable",g.needReadable,g.emittedReadable),g.needReadable=!1,g.emittedReadable||(l("emitReadable",g.flowing),g.emittedReadable=!0,z.dist.process.nextTick(ne,d))}function ne(d){var g=d._readableState;l("emitReadable_",g.destroyed,g.length,g.ended),!g.destroyed&&(g.length||g.ended)&&(d.emit("readable"),g.emittedReadable=!1),g.needReadable=!g.flowing&&!g.ended&&g.length<=g.highWaterMark,R(d)}function H(d,g){g.readingMore||(g.readingMore=!0,z.dist.process.nextTick(K,d,g))}function K(d,g){for(;!g.reading&&!g.ended&&(g.length<g.highWaterMark||g.flowing&&g.length===0);){var _=g.length;if(l("maybeReadMore read 0"),d.read(0),_===g.length)break}g.readingMore=!1}te.prototype._read=function(d){j(this,new C("_read()"))},te.prototype.pipe=function(d,g){var _=this,E=this._readableState;switch(E.pipesCount){case 0:E.pipes=d;break;case 1:E.pipes=[E.pipes,d];break;default:E.pipes.push(d);break}E.pipesCount+=1,l("pipe count=%d opts=%j",E.pipesCount,g);var J=(!g||g.end!==!1)&&d!==z.dist.process.stdout&&d!==z.dist.process.stderr,ie=J?Ie:yt;E.endEmitted?z.dist.process.nextTick(ie):_.once("end",ie),d.on("unpipe",se);function se(Ye,Ve){l("onunpipe"),Ye===_&&Ve&&Ve.hasUnpiped===!1&&(Ve.hasUnpiped=!0,Ue())}function Ie(){l("onend"),d.end()}var Be=ae(_);d.on("drain",Be);var Ce=!1;function Ue(){l("cleanup"),d.removeListener("close",_t),d.removeListener("finish",tt),d.removeListener("drain",Be),d.removeListener("error",He),d.removeListener("unpipe",se),_.removeListener("end",Ie),_.removeListener("end",yt),_.removeListener("data",Re),Ce=!0,E.awaitDrain&&(!d._writableState||d._writableState.needDrain)&&Be()}_.on("data",Re);function Re(Ye){l("ondata");var Ve=d.write(Ye);l("dest.write",Ve),Ve===!1&&((E.pipesCount===1&&E.pipes===d||E.pipesCount>1&&ye(E.pipes,d)!==-1)&&!Ce&&(l("false write response, pause",E.awaitDrain),E.awaitDrain++),_.pause())}function He(Ye){l("onerror",Ye),yt(),d.removeListener("error",He),t(d,"error")===0&&j(d,Ye)}ce(d,"error",He);function _t(){d.removeListener("finish",tt),yt()}d.once("close",_t);function tt(){l("onfinish"),d.removeListener("close",_t),yt()}d.once("finish",tt);function yt(){l("unpipe"),_.unpipe(d)}return d.emit("pipe",_),E.flowing||(l("pipe resume"),_.resume()),d};function ae(d){return function(){var _=d._readableState;l("pipeOnDrain",_.awaitDrain),_.awaitDrain&&_.awaitDrain--,_.awaitDrain===0&&t(d,"data")&&(_.flowing=!0,R(d))}}te.prototype.unpipe=function(d){var g=this._readableState,_={hasUnpiped:!1};if(g.pipesCount===0)return this;if(g.pipesCount===1)return d&&d!==g.pipes?this:(d||(d=g.pipes),g.pipes=null,g.pipesCount=0,g.flowing=!1,d&&d.emit("unpipe",this,_),this);if(!d){var E=g.pipes,J=g.pipesCount;g.pipes=null,g.pipesCount=0,g.flowing=!1;for(var ie=0;ie<J;ie++)E[ie].emit("unpipe",this,{hasUnpiped:!1});return this}var se=ye(g.pipes,d);return se===-1?this:(g.pipes.splice(se,1),g.pipesCount-=1,g.pipesCount===1&&(g.pipes=g.pipes[0]),d.emit("unpipe",this,_),this)},te.prototype.on=function(d,g){var _=r.prototype.on.call(this,d,g),E=this._readableState;return d==="data"?(E.readableListening=this.listenerCount("readable")>0,E.flowing!==!1&&this.resume()):d==="readable"&&!E.endEmitted&&!E.readableListening&&(E.readableListening=E.needReadable=!0,E.flowing=!1,E.emittedReadable=!1,l("on readable",E.length,E.reading),E.length?G(this):E.reading||z.dist.process.nextTick(re,this)),_},te.prototype.addListener=te.prototype.on,te.prototype.removeListener=function(d,g){var _=r.prototype.removeListener.call(this,d,g);return d==="readable"&&z.dist.process.nextTick(de,this),_},te.prototype.removeAllListeners=function(d){var g=r.prototype.removeAllListeners.apply(this,arguments);return(d==="readable"||d===void 0)&&z.dist.process.nextTick(de,this),g};function de(d){var g=d._readableState;g.readableListening=d.listenerCount("readable")>0,g.resumeScheduled&&!g.paused?g.flowing=!0:d.listenerCount("data")>0&&d.resume()}function re(d){l("readable nexttick read 0"),d.read(0)}te.prototype.resume=function(){var d=this._readableState;return d.flowing||(l("resume"),d.flowing=!d.readableListening,_e(this,d)),d.paused=!1,this};function _e(d,g){g.resumeScheduled||(g.resumeScheduled=!0,z.dist.process.nextTick(be,d,g))}function be(d,g){l("resume",g.reading),g.reading||d.read(0),g.resumeScheduled=!1,d.emit("resume"),R(d),g.flowing&&!g.reading&&d.read(0)}te.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function R(d){var g=d._readableState;for(l("flow",g.flowing);g.flowing&&d.read()!==null;);}te.prototype.wrap=function(d){var g=this,_=this._readableState,E=!1;d.on("end",function(){if(l("wrapped end"),_.decoder&&!_.ended){var se=_.decoder.end();se&&se.length&&g.push(se)}g.push(null)}),d.on("data",function(se){if(l("wrapped data"),_.decoder&&(se=_.decoder.write(se)),!(_.objectMode&&se==null)&&!(!_.objectMode&&(!se||!se.length))){var Ie=g.push(se);Ie||(E=!0,d.pause())}});for(var J in d)this[J]===void 0&&typeof d[J]=="function"&&(this[J]=function(Ie){return function(){return d[Ie].apply(d,arguments)}}(J));for(var ie=0;ie<Q.length;ie++)d.on(Q[ie],this.emit.bind(this,Q[ie]));return this._read=function(se){l("wrapped _read",se),E&&(E=!1,d.resume())},this},typeof Symbol=="function"&&(te.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=Z1()),S(this)}),Object.defineProperty(te.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(te.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(te.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(g){this._readableState&&(this._readableState.flowing=g)}}),te._fromList=O,Object.defineProperty(te.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function O(d,g){if(g.length===0)return null;var _;return g.objectMode?_=g.buffer.shift():!d||d>=g.length?(g.decoder?_=g.buffer.join(""):g.buffer.length===1?_=g.buffer.first():_=g.buffer.concat(g.length),g.buffer.clear()):_=g.buffer.consume(d,g.decoder),_}function W(d){var g=d._readableState;l("endReadable",g.endEmitted),g.endEmitted||(g.ended=!0,z.dist.process.nextTick(oe,g,d))}function oe(d,g){if(l("endReadableNT",d.endEmitted,d.length),!d.endEmitted&&d.length===0&&(d.endEmitted=!0,g.readable=!1,g.emit("end"),d.autoDestroy)){var _=g._writableState;(!_||_.autoDestroy&&_.finished)&&g.destroy()}}typeof Symbol=="function"&&(te.from=function(d,g){return m===void 0&&(m=Q1()),m(te,d,g)});function ye(d,g){for(var _=0,E=d.length;_<E;_++)if(d[_]===g)return _;return-1}return Ll}var Xb=Yn,Au=zi.codes,eA=Au.ERR_METHOD_NOT_IMPLEMENTED,tA=Au.ERR_MULTIPLE_CALLBACK,rA=Au.ERR_TRANSFORM_ALREADY_TRANSFORMING,nA=Au.ERR_TRANSFORM_WITH_LENGTH_0,Tu=Co();Ze.inherits_browserExports(Yn,Tu);function iA(e,t){var r=this._transformState;r.transforming=!1;var o=r.writecb;if(o===null)return this.emit("error",new tA);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),o(e);var s=this._readableState;s.reading=!1,(s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}function Yn(e){if(!(this instanceof Yn))return new Yn(e);Tu.call(this,e),this._transformState={afterTransform:iA.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",oA)}function oA(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){Jg(e,t,r)}):Jg(this,null,null)}Yn.prototype.push=function(e,t){return this._transformState.needTransform=!1,Tu.prototype.push.call(this,e,t)};Yn.prototype._transform=function(e,t,r){r(new eA("_transform()"))};Yn.prototype._write=function(e,t,r){var o=this._transformState;if(o.writecb=r,o.writechunk=e,o.writeencoding=t,!o.transforming){var s=this._readableState;(o.needTransform||s.needReadable||s.length<s.highWaterMark)&&this._read(s.highWaterMark)}};Yn.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};Yn.prototype._destroy=function(e,t){Tu.prototype._destroy.call(this,e,function(r){t(r)})};function Jg(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new nA;if(e._transformState.transforming)throw new rA;return e.push(null)}var sA=Is,Zb=Xb;Ze.inherits_browserExports(Is,Zb);function Is(e){if(!(this instanceof Is))return new Is(e);Zb.call(this,e)}Is.prototype._transform=function(e,t,r){r(null,e)};var Pl;function aA(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var Qb=zi.codes,uA=Qb.ERR_MISSING_ARGS,fA=Qb.ERR_STREAM_DESTROYED;function Yg(e){if(e)throw e}function lA(e){return e.setHeader&&typeof e.abort=="function"}function cA(e,t,r,o){o=aA(o);var s=!1;e.on("close",function(){s=!0}),Pl===void 0&&(Pl=Gc),Pl(e,{readable:t,writable:r},function(f){if(f)return o(f);s=!0,o()});var u=!1;return function(f){if(!s&&!u){if(u=!0,lA(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();o(f||new fA("pipe"))}}}function Xg(e){e()}function dA(e,t){return e.pipe(t)}function hA(e){return!e.length||typeof e[e.length-1]!="function"?Yg:e.pop()}function gA(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var o=hA(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new uA("streams");var s,u=t.map(function(f,h){var l=h<t.length-1,p=h>0;return cA(f,l,p,function(b){s||(s=b),b&&u.forEach(Xg),!l&&(u.forEach(Xg),o(s))})});return t.reduce(dA)}var pA=gA;(function(e,t){t=e.exports=Yb(),t.Stream=t,t.Readable=t,t.Writable=Kb(),t.Duplex=Co(),t.Transform=Xb,t.PassThrough=sA,t.finished=Gc,t.pipeline=pA})(bc,bc.exports);var e_=bc.exports;const{Transform:SN}=e_,{Transform:RN}=e_;var t_={};const Zg=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];t_.p1600=function(e){for(let t=0;t<24;++t){const r=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],f=e[4]^e[14]^e[24]^e[34]^e[44],h=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],p=e[7]^e[17]^e[27]^e[37]^e[47],b=e[8]^e[18]^e[28]^e[38]^e[48],w=e[9]^e[19]^e[29]^e[39]^e[49];let I=b^(s<<1|u>>>31),A=w^(u<<1|s>>>31);const x=e[0]^I,v=e[1]^A,C=e[10]^I,B=e[11]^A,P=e[20]^I,S=e[21]^A,m=e[30]^I,j=e[31]^A,Q=e[40]^I,ce=e[41]^A;I=r^(f<<1|h>>>31),A=o^(h<<1|f>>>31);const ue=e[2]^I,te=e[3]^A,Se=e[12]^I,me=e[13]^A,F=e[22]^I,U=e[23]^A,$=e[32]^I,q=e[33]^A,Y=e[42]^I,G=e[43]^A;I=s^(l<<1|p>>>31),A=u^(p<<1|l>>>31);const ne=e[4]^I,H=e[5]^A,K=e[14]^I,ae=e[15]^A,de=e[24]^I,re=e[25]^A,_e=e[34]^I,be=e[35]^A,R=e[44]^I,O=e[45]^A;I=f^(b<<1|w>>>31),A=h^(w<<1|b>>>31);const W=e[6]^I,oe=e[7]^A,ye=e[16]^I,d=e[17]^A,g=e[26]^I,_=e[27]^A,E=e[36]^I,J=e[37]^A,ie=e[46]^I,se=e[47]^A;I=l^(r<<1|o>>>31),A=p^(o<<1|r>>>31);const Ie=e[8]^I,Be=e[9]^A,Ce=e[18]^I,Ue=e[19]^A,Re=e[28]^I,He=e[29]^A,_t=e[38]^I,tt=e[39]^A,yt=e[48]^I,Ye=e[49]^A,Ve=x,jt=v,Pt=B<<4|C>>>28,ut=C<<4|B>>>28,Nt=P<<3|S>>>29,lr=S<<3|P>>>29,tr=j<<9|m>>>23,Ft=m<<9|j>>>23,cr=Q<<18|ce>>>14,Kr=ce<<18|Q>>>14,Jr=ue<<1|te>>>31,an=te<<1|ue>>>31,un=me<<12|Se>>>20,rr=Se<<12|me>>>20,Cr=F<<10|U>>>22,nr=U<<10|F>>>22,Pn=q<<13|$>>>19,Yr=$<<13|q>>>19,fn=Y<<2|G>>>30,N=G<<2|Y>>>30,D=H<<30|ne>>>2,Ee=ne<<30|H>>>2,ve=K<<6|ae>>>26,Te=ae<<6|K>>>26,wt=re<<11|de>>>21,Rt=de<<11|re>>>21,ln=_e<<15|be>>>17,Bt=be<<15|_e>>>17,cn=O<<29|R>>>3,Bn=R<<29|O>>>3,dn=W<<28|oe>>>4,hn=oe<<28|W>>>4,Xr=d<<23|ye>>>9,Vt=ye<<23|d>>>9,Lr=g<<25|_>>>7,wr=_<<25|g>>>7,ir=E<<21|J>>>11,Ht=J<<21|E>>>11,Ii=se<<24|ie>>>8,Oi=ie<<24|se>>>8,Nn=Ie<<27|Be>>>5,gn=Be<<27|Ie>>>5,pn=Ce<<20|Ue>>>12,Pr=Ue<<20|Ce>>>12,Ci=He<<7|Re>>>25,bn=Re<<7|He>>>25,ri=_t<<8|tt>>>24,ni=tt<<8|_t>>>24,ii=yt<<14|Ye>>>18,oi=Ye<<14|yt>>>18;e[0]=Ve^~un&wt,e[1]=jt^~rr&Rt,e[10]=dn^~pn&Nt,e[11]=hn^~Pr&lr,e[20]=Jr^~ve&Lr,e[21]=an^~Te&wr,e[30]=Nn^~Pt&Cr,e[31]=gn^~ut&nr,e[40]=D^~Xr&Ci,e[41]=Ee^~Vt&bn,e[2]=un^~wt&ir,e[3]=rr^~Rt&Ht,e[12]=pn^~Nt&Pn,e[13]=Pr^~lr&Yr,e[22]=ve^~Lr&ri,e[23]=Te^~wr&ni,e[32]=Pt^~Cr&ln,e[33]=ut^~nr&Bt,e[42]=Xr^~Ci&tr,e[43]=Vt^~bn&Ft,e[4]=wt^~ir&ii,e[5]=Rt^~Ht&oi,e[14]=Nt^~Pn&cn,e[15]=lr^~Yr&Bn,e[24]=Lr^~ri&cr,e[25]=wr^~ni&Kr,e[34]=Cr^~ln&Ii,e[35]=nr^~Bt&Oi,e[44]=Ci^~tr&fn,e[45]=bn^~Ft&N,e[6]=ir^~ii&Ve,e[7]=Ht^~oi&jt,e[16]=Pn^~cn&dn,e[17]=Yr^~Bn&hn,e[26]=ri^~cr&Jr,e[27]=ni^~Kr&an,e[36]=ln^~Ii&Nn,e[37]=Bt^~Oi&gn,e[46]=tr^~fn&D,e[47]=Ft^~N&Ee,e[8]=ii^~Ve&un,e[9]=oi^~jt&rr,e[18]=cn^~dn&pn,e[19]=Bn^~hn&Pr,e[28]=cr^~Jr&ve,e[29]=Kr^~an&Te,e[38]=Ii^~Nn&Pt,e[39]=Oi^~gn&ut,e[48]=fn^~D&Xr,e[49]=N^~Ee&Vt,e[0]^=Zg[t*2],e[1]^=Zg[t*2+1]}};const hu=t_;function Ms(){this.state=[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],this.blockSize=null,this.count=0,this.squeezing=!1}Ms.prototype.initialize=function(e,t){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1};Ms.prototype.absorb=function(e){for(let t=0;t<e.length;++t)this.state[~~(this.count/4)]^=e[t]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(hu.p1600(this.state),this.count=0)};Ms.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),e&128&&this.count===this.blockSize-1&&hu.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),hu.p1600(this.state),this.count=0,this.squeezing=!0};Ms.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const t=z.dist.Buffer.alloc(e);for(let r=0;r<e;++r)t[r]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(hu.p1600(this.state),this.count=0);return t};Ms.prototype.copy=function(e){for(let t=0;t<50;++t)e.state[t]=this.state[t];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing};var bA=_A;function _A(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,r=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return r=r%t,r++}}const yA=z.getDefaultExportFromCjs(bA);var yc={exports:{}},Bl,Qg;function wA(){if(Qg)return Bl;Qg=1;var e=1e3,t=e*60,r=t*60,o=r*24,s=o*7,u=o*365.25;Bl=function(b,w){w=w||{};var I=typeof b;if(I==="string"&&b.length>0)return f(b);if(I==="number"&&isFinite(b))return w.long?l(b):h(b);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(b))};function f(b){if(b=String(b),!(b.length>100)){var w=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(b);if(w){var I=parseFloat(w[1]),A=(w[2]||"ms").toLowerCase();switch(A){case"years":case"year":case"yrs":case"yr":case"y":return I*u;case"weeks":case"week":case"w":return I*s;case"days":case"day":case"d":return I*o;case"hours":case"hour":case"hrs":case"hr":case"h":return I*r;case"minutes":case"minute":case"mins":case"min":case"m":return I*t;case"seconds":case"second":case"secs":case"sec":case"s":return I*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return I;default:return}}}}function h(b){var w=Math.abs(b);return w>=o?Math.round(b/o)+"d":w>=r?Math.round(b/r)+"h":w>=t?Math.round(b/t)+"m":w>=e?Math.round(b/e)+"s":b+"ms"}function l(b){var w=Math.abs(b);return w>=o?p(b,w,o,"day"):w>=r?p(b,w,r,"hour"):w>=t?p(b,w,t,"minute"):w>=e?p(b,w,e,"second"):b+" ms"}function p(b,w,I,A){var x=w>=I*1.5;return Math.round(b/I)+" "+A+(x?"s":"")}return Bl}function mA(e){r.debug=r,r.default=r,r.coerce=l,r.disable=f,r.enable=s,r.enabled=h,r.humanize=wA(),r.destroy=p,Object.keys(e).forEach(b=>{r[b]=e[b]}),r.names=[],r.skips=[],r.formatters={};function t(b){let w=0;for(let I=0;I<b.length;I++)w=(w<<5)-w+b.charCodeAt(I),w|=0;return r.colors[Math.abs(w)%r.colors.length]}r.selectColor=t;function r(b){let w,I=null,A,x;function v(...C){if(!v.enabled)return;const B=v,P=Number(new Date),S=P-(w||P);B.diff=S,B.prev=w,B.curr=P,w=P,C[0]=r.coerce(C[0]),typeof C[0]!="string"&&C.unshift("%O");let m=0;C[0]=C[0].replace(/%([a-zA-Z%])/g,(Q,ce)=>{if(Q==="%%")return"%";m++;const ue=r.formatters[ce];if(typeof ue=="function"){const te=C[m];Q=ue.call(B,te),C.splice(m,1),m--}return Q}),r.formatArgs.call(B,C),(B.log||r.log).apply(B,C)}return v.namespace=b,v.useColors=r.useColors(),v.color=r.selectColor(b),v.extend=o,v.destroy=r.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>I!==null?I:(A!==r.namespaces&&(A=r.namespaces,x=r.enabled(b)),x),set:C=>{I=C}}),typeof r.init=="function"&&r.init(v),v}function o(b,w){const I=r(this.namespace+(typeof w>"u"?":":w)+b);return I.log=this.log,I}function s(b){r.save(b),r.namespaces=b,r.names=[],r.skips=[];const w=(typeof b=="string"?b:"").trim().replace(" ",",").split(",").filter(Boolean);for(const I of w)I[0]==="-"?r.skips.push(I.slice(1)):r.names.push(I)}function u(b,w){let I=0,A=0,x=-1,v=0;for(;I<b.length;)if(A<w.length&&(w[A]===b[I]||w[A]==="*"))w[A]==="*"?(x=A,v=I,A++):(I++,A++);else if(x!==-1)A=x+1,v++,I=v;else return!1;for(;A<w.length&&w[A]==="*";)A++;return A===w.length}function f(){const b=[...r.names,...r.skips.map(w=>"-"+w)].join(",");return r.enable(""),b}function h(b){for(const w of r.skips)if(u(b,w))return!1;for(const w of r.names)if(u(b,w))return!0;return!1}function l(b){return b instanceof Error?b.stack||b.message:b}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}var EA=mA;(function(e,t){t.formatArgs=o,t.save=s,t.load=u,t.useColors=r,t.storage=f(),t.destroy=(()=>{let l=!1;return()=>{l||(l=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let l;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(l=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(l[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(l){if(l[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+l[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const p="color: "+this.color;l.splice(1,0,p,"color: inherit");let b=0,w=0;l[0].replace(/%[a-zA-Z%]/g,I=>{I!=="%%"&&(b++,I==="%c"&&(w=b))}),l.splice(w,0,p)}t.log=console.debug||console.log||(()=>{});function s(l){try{l?t.storage.setItem("debug",l):t.storage.removeItem("debug")}catch{}}function u(){let l;try{l=t.storage.getItem("debug")}catch{}return!l&&typeof z.dist.process<"u"&&"env"in z.dist.process&&(l=z.dist.process.env.DEBUG),l}function f(){try{return localStorage}catch{}}e.exports=EA(t);const{formatters:h}=e.exports;h.j=function(l){try{return JSON.stringify(l)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}}})(yc,yc.exports);var vA=yc.exports,on={},vi={},Vc=Os;Os.default=Os;Os.stable=i_;Os.stableStringify=i_;var gu="[...]",r_="[Circular]",qi=[],Hi=[];function n_(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function Os(e,t,r,o){typeof o>"u"&&(o=n_()),wc(e,"",0,[],void 0,0,o);var s;try{Hi.length===0?s=JSON.stringify(e,t,r):s=JSON.stringify(e,o_(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;qi.length!==0;){var u=qi.pop();u.length===4?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return s}function Ao(e,t,r,o){var s=Object.getOwnPropertyDescriptor(o,r);s.get!==void 0?s.configurable?(Object.defineProperty(o,r,{value:e}),qi.push([o,r,t,s])):Hi.push([t,r,e]):(o[r]=e,qi.push([o,r,t]))}function wc(e,t,r,o,s,u,f){u+=1;var h;if(typeof e=="object"&&e!==null){for(h=0;h<o.length;h++)if(o[h]===e){Ao(r_,e,t,s);return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){Ao(gu,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){Ao(gu,e,t,s);return}if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)wc(e[h],h,h,o,e,u,f);else{var l=Object.keys(e);for(h=0;h<l.length;h++){var p=l[h];wc(e[p],p,h,o,e,u,f)}}o.pop()}}function SA(e,t){return e<t?-1:e>t?1:0}function i_(e,t,r,o){typeof o>"u"&&(o=n_());var s=mc(e,"",0,[],void 0,0,o)||e,u;try{Hi.length===0?u=JSON.stringify(s,t,r):u=JSON.stringify(s,o_(t),r)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;qi.length!==0;){var f=qi.pop();f.length===4?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return u}function mc(e,t,r,o,s,u,f){u+=1;var h;if(typeof e=="object"&&e!==null){for(h=0;h<o.length;h++)if(o[h]===e){Ao(r_,e,t,s);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof f.depthLimit<"u"&&u>f.depthLimit){Ao(gu,e,t,s);return}if(typeof f.edgesLimit<"u"&&r+1>f.edgesLimit){Ao(gu,e,t,s);return}if(o.push(e),Array.isArray(e))for(h=0;h<e.length;h++)mc(e[h],h,h,o,e,u,f);else{var l={},p=Object.keys(e).sort(SA);for(h=0;h<p.length;h++){var b=p[h];mc(e[b],b,h,o,e,u,f),l[b]=e[b]}if(typeof s<"u")qi.push([s,t,e]),s[t]=l;else return l}o.pop()}}function o_(e){return e=typeof e<"u"?e:function(t,r){return r},function(t,r){if(Hi.length>0)for(var o=0;o<Hi.length;o++){var s=Hi[o];if(s[1]===t&&s[0]===r){r=s[2],Hi.splice(o,1);break}}return e.call(this,t,r)}}const RA=z.getDefaultExportFromCjs(Vc);Object.defineProperty(vi,"__esModule",{value:!0});vi.EthereumProviderError=vi.EthereumRpcError=void 0;const AA=Vc;class s_ extends Error{constructor(t,r,o){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string.');super(r),this.code=t,o!==void 0&&(this.data=o)}serialize(){const t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data),this.stack&&(t.stack=this.stack),t}toString(){return AA.default(this.serialize(),OA,2)}}vi.EthereumRpcError=s_;let TA=class extends s_{constructor(t,r,o){if(!IA(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,o)}};vi.EthereumProviderError=TA;function IA(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function OA(e,t){if(t!=="[Circular]")return t}var zc={},Si={};Object.defineProperty(Si,"__esModule",{value:!0});Si.errorValues=Si.errorCodes=void 0;Si.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};Si.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=Si,r=vi,o=t.errorCodes.rpc.internal,s="Unspecified error message. This is a bug, please report it.",u={code:o,message:f(o)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function f(I,A=s){if(Number.isInteger(I)){const x=I.toString();if(w(t.errorValues,x))return t.errorValues[x].message;if(p(I))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return A}e.getMessageFromCode=f;function h(I){if(!Number.isInteger(I))return!1;const A=I.toString();return!!(t.errorValues[A]||p(I))}e.isValidCode=h;function l(I,{fallbackError:A=u,shouldIncludeStack:x=!1}={}){var v,C;if(!A||!Number.isInteger(A.code)||typeof A.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(I instanceof r.EthereumRpcError)return I.serialize();const B={};if(I&&typeof I=="object"&&!Array.isArray(I)&&w(I,"code")&&h(I.code)){const S=I;B.code=S.code,S.message&&typeof S.message=="string"?(B.message=S.message,w(S,"data")&&(B.data=S.data)):(B.message=f(B.code),B.data={originalError:b(I)})}else{B.code=A.code;const S=(v=I)===null||v===void 0?void 0:v.message;B.message=S&&typeof S=="string"?S:A.message,B.data={originalError:b(I)}}const P=(C=I)===null||C===void 0?void 0:C.stack;return x&&I&&P&&typeof P=="string"&&(B.stack=P),B}e.serializeError=l;function p(I){return I>=-32099&&I<=-32e3}function b(I){return I&&typeof I=="object"&&!Array.isArray(I)?Object.assign({},I):I}function w(I,A){return Object.prototype.hasOwnProperty.call(I,A)}})(zc);var Iu={};Object.defineProperty(Iu,"__esModule",{value:!0});Iu.ethErrors=void 0;const Kc=vi,a_=zc,Xt=Si;Iu.ethErrors={rpc:{parse:e=>Ur(Xt.errorCodes.rpc.parse,e),invalidRequest:e=>Ur(Xt.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Ur(Xt.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Ur(Xt.errorCodes.rpc.methodNotFound,e),internal:e=>Ur(Xt.errorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return Ur(t,e)},invalidInput:e=>Ur(Xt.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Ur(Xt.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Ur(Xt.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Ur(Xt.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Ur(Xt.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Ur(Xt.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>gs(Xt.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>gs(Xt.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>gs(Xt.errorCodes.provider.unsupportedMethod,e),disconnected:e=>gs(Xt.errorCodes.provider.disconnected,e),chainDisconnected:e=>gs(Xt.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:o}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new Kc.EthereumProviderError(t,r,o)}}};function Ur(e,t){const[r,o]=u_(t);return new Kc.EthereumRpcError(e,r||a_.getMessageFromCode(e),o)}function gs(e,t){const[r,o]=u_(t);return new Kc.EthereumProviderError(e,r||a_.getMessageFromCode(e),o)}function u_(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,r]}}return[]}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getMessageFromCode=e.serializeError=e.EthereumProviderError=e.EthereumRpcError=e.ethErrors=e.errorCodes=void 0;const t=vi;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const r=zc;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});const o=Iu;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const s=Si;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})})(on);function Ne(e,t,r){return(t=D1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var CA={exports:{}},Nl={exports:{}};let LA=class extends Error{constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);let r="";for(let o=0;o<t.length;o++)r+=` ${t[o].stack}
2
2
  `;super(r),this.name="AggregateError",this.errors=t}};var St={AggregateError:LA,ArrayIsArray(e){return Array.isArray(e)},ArrayPrototypeIncludes(e,t){return e.includes(t)},ArrayPrototypeIndexOf(e,t){return e.indexOf(t)},ArrayPrototypeJoin(e,t){return e.join(t)},ArrayPrototypeMap(e,t){return e.map(t)},ArrayPrototypePop(e,t){return e.pop(t)},ArrayPrototypePush(e,t){return e.push(t)},ArrayPrototypeSlice(e,t,r){return e.slice(t,r)},Error,FunctionPrototypeCall(e,t,...r){return e.call(t,...r)},FunctionPrototypeSymbolHasInstance(e,t){return Function.prototype[Symbol.hasInstance].call(e,t)},MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties(e,t){return Object.defineProperties(e,t)},ObjectDefineProperty(e,t,r){return Object.defineProperty(e,t,r)},ObjectGetOwnPropertyDescriptor(e,t){return Object.getOwnPropertyDescriptor(e,t)},ObjectKeys(e){return Object.keys(e)},ObjectSetPrototypeOf(e,t){return Object.setPrototypeOf(e,t)},Promise,PromisePrototypeCatch(e,t){return e.catch(t)},PromisePrototypeThen(e,t,r){return e.then(t,r)},PromiseReject(e){return Promise.reject(e)},PromiseResolve(e){return Promise.resolve(e)},ReflectApply:Reflect.apply,RegExpPrototypeTest(e,t){return e.test(t)},SafeSet:Set,String,StringPrototypeSlice(e,t,r){return e.slice(t,r)},StringPrototypeToLowerCase(e){return e.toLowerCase()},StringPrototypeToUpperCase(e){return e.toUpperCase()},StringPrototypeTrim(e){return e.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet(e,t,r){return e.set(t,r)},Boolean,Uint8Array},f_={exports:{}},l_={format(e,...t){return e.replace(/%([sdifj])/g,function(...[r,o]){const s=t.shift();return o==="f"?s.toFixed(6):o==="j"?JSON.stringify(s):o==="s"&&typeof s=="object"?`${s.constructor!==Object?s.constructor.name:""} {}`.trim():s.toString()})},inspect(e){switch(typeof e){case"string":if(e.includes("'"))if(e.includes('"')){if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}else return`"${e}"`;return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}}};const{format:PA,inspect:pu}=l_,{AggregateError:BA}=St,NA=globalThis.AggregateError||BA,$A=Symbol("kIsNodeError"),MA=["string","function","number","object","Function","Object","boolean","bigint","symbol"],xA=/^([A-Z][a-z0-9]*)+$/,DA="__node_internal_",Ou={};function Wi(e,t){if(!e)throw new Ou.ERR_INTERNAL_ASSERTION(t)}function ep(e){let t="",r=e.length;const o=e[0]==="-"?1:0;for(;r>=o+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function jA(e,t,r){if(typeof t=="function")return Wi(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const o=(t.match(/%[dfijoOs]/g)||[]).length;return Wi(o===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${o}).`),r.length===0?t:PA(t,...r)}function Gt(e,t,r){r||(r=Error);class o extends r{constructor(...u){super(jA(e,t,u))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(o.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),o.prototype.code=e,o.prototype[$A]=!0,Ou[e]=o}function tp(e){const t=DA+e.name;return Object.defineProperty(e,"name",{value:t}),e}function UA(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new NA([t,e],t.message);return r.code=t.code,r}return e||t}let kA=class extends Error{constructor(t="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new Ou.ERR_INVALID_ARG_TYPE("options","Object",r);super(t,r),this.code="ABORT_ERR",this.name="AbortError"}};Gt("ERR_ASSERTION","%s",Error);Gt("ERR_INVALID_ARG_TYPE",(e,t,r)=>{Wi(typeof e=="string","'name' must be a string"),Array.isArray(t)||(t=[t]);let o="The ";e.endsWith(" argument")?o+=`${e} `:o+=`"${e}" ${e.includes(".")?"property":"argument"} `,o+="must be ";const s=[],u=[],f=[];for(const l of t)Wi(typeof l=="string","All expected entries have to be of type string"),MA.includes(l)?s.push(l.toLowerCase()):xA.test(l)?u.push(l):(Wi(l!=="object",'The value "object" should be written as "Object"'),f.push(l));if(u.length>0){const l=s.indexOf("object");l!==-1&&(s.splice(s,l,1),u.push("Object"))}if(s.length>0){switch(s.length){case 1:o+=`of type ${s[0]}`;break;case 2:o+=`one of type ${s[0]} or ${s[1]}`;break;default:{const l=s.pop();o+=`one of type ${s.join(", ")}, or ${l}`}}(u.length>0||f.length>0)&&(o+=" or ")}if(u.length>0){switch(u.length){case 1:o+=`an instance of ${u[0]}`;break;case 2:o+=`an instance of ${u[0]} or ${u[1]}`;break;default:{const l=u.pop();o+=`an instance of ${u.join(", ")}, or ${l}`}}f.length>0&&(o+=" or ")}switch(f.length){case 0:break;case 1:f[0].toLowerCase()!==f[0]&&(o+="an "),o+=`${f[0]}`;break;case 2:o+=`one of ${f[0]} or ${f[1]}`;break;default:{const l=f.pop();o+=`one of ${f.join(", ")}, or ${l}`}}if(r==null)o+=`. Received ${r}`;else if(typeof r=="function"&&r.name)o+=`. Received function ${r.name}`;else if(typeof r=="object"){var h;if((h=r.constructor)!==null&&h!==void 0&&h.name)o+=`. Received an instance of ${r.constructor.name}`;else{const l=pu(r,{depth:-1});o+=`. Received ${l}`}}else{let l=pu(r,{colors:!1});l.length>25&&(l=`${l.slice(0,25)}...`),o+=`. Received type ${typeof r} (${l})`}return o},TypeError);Gt("ERR_INVALID_ARG_VALUE",(e,t,r="is invalid")=>{let o=pu(t);return o.length>128&&(o=o.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${o}`},TypeError);Gt("ERR_INVALID_RETURN_VALUE",(e,t,r)=>{var o;const s=r!=null&&(o=r.constructor)!==null&&o!==void 0&&o.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return`Expected ${e} to be returned from the "${t}" function but got ${s}.`},TypeError);Gt("ERR_MISSING_ARGS",(...e)=>{Wi(e.length>0,"At least one arg needs to be specified");let t;const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map(o=>`"${o}"`).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const o=e.pop();t+=`The ${e.join(", ")}, and ${o} arguments`}break}return`${t} must be specified`},TypeError);Gt("ERR_OUT_OF_RANGE",(e,t,r)=>{Wi(t,'Missing "range" argument');let o;if(Number.isInteger(r)&&Math.abs(r)>2**32)o=ep(String(r));else if(typeof r=="bigint"){o=String(r);const s=BigInt(2)**BigInt(32);(r>s||r<-s)&&(o=ep(o)),o+="n"}else o=pu(r);return`The value of "${e}" is out of range. It must be ${t}. Received ${o}`},RangeError);Gt("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);Gt("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);Gt("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);Gt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);Gt("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);Gt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Gt("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);Gt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);Gt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);Gt("ERR_STREAM_WRITE_AFTER_END","write after end",Error);Gt("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);var fr={AbortError:kA,aggregateTwoErrors:tp(UA),hideStackFrames:tp,codes:Ou},ps={exports:{}},rp;function Cs(){if(rp)return ps.exports;rp=1;const{AbortController:e,AbortSignal:t}=typeof self<"u"?self:typeof window<"u"?window:void 0;return ps.exports=e,ps.exports.AbortSignal=t,ps.exports.default=e,ps.exports}(function(e){const t=z.bufferPolyfill,{format:r,inspect:o}=l_,{codes:{ERR_INVALID_ARG_TYPE:s}}=fr,{kResistStopPropagation:u,AggregateError:f,SymbolDispose:h}=St,l=globalThis.AbortSignal||Cs().AbortSignal,p=globalThis.AbortController||Cs().AbortController,b=Object.getPrototypeOf(async function(){}).constructor,w=globalThis.Blob||t.Blob,I=typeof w<"u"?function(C){return C instanceof w}:function(C){return!1},A=(v,C)=>{if(v!==void 0&&(v===null||typeof v!="object"||!("aborted"in v)))throw new s(C,"AbortSignal",v)},x=(v,C)=>{if(typeof v!="function")throw new s(C,"Function",v)};e.exports={AggregateError:f,kEmptyObject:Object.freeze({}),once(v){let C=!1;return function(...B){C||(C=!0,v.apply(this,B))}},createDeferredPromise:function(){let v,C;return{promise:new Promise((P,S)=>{v=P,C=S}),resolve:v,reject:C}},promisify(v){return new Promise((C,B)=>{v((P,...S)=>P?B(P):C(...S))})},debuglog(){return function(){}},format:r,inspect:o,types:{isAsyncFunction(v){return v instanceof b},isArrayBufferView(v){return ArrayBuffer.isView(v)}},isBlob:I,deprecate(v,C){return v},addAbortListener:Ze.eventsExports.addAbortListener||function(C,B){if(C===void 0)throw new s("signal","AbortSignal",C);A(C,"signal"),x(B,"listener");let P;return C.aborted?queueMicrotask(()=>B()):(C.addEventListener("abort",B,{__proto__:null,once:!0,[u]:!0}),P=()=>{C.removeEventListener("abort",B)}),{__proto__:null,[h](){var S;(S=P)===null||S===void 0||S()}}},AbortSignalAny:l.any||function(C){if(C.length===1)return C[0];const B=new p,P=()=>B.abort();return C.forEach(S=>{A(S,"signals"),S.addEventListener("abort",P,{once:!0})}),B.signal.addEventListener("abort",()=>{C.forEach(S=>S.removeEventListener("abort",P))},{once:!0}),B.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(f_);var _r=f_.exports,Jc={};const{ArrayIsArray:c_,ArrayPrototypeIncludes:FA,ArrayPrototypeJoin:HA,ArrayPrototypeMap:WA,NumberIsInteger:Yc,NumberIsNaN:ON,NumberMAX_SAFE_INTEGER:qA,NumberMIN_SAFE_INTEGER:GA,NumberParseInt:CN,ObjectPrototypeHasOwnProperty:VA,RegExpPrototypeExec:LN,String:zA,StringPrototypeToUpperCase:PN,StringPrototypeTrim:BN}=St,{hideStackFrames:Gr,codes:{ERR_SOCKET_BAD_PORT:NN,ERR_INVALID_ARG_TYPE:Vr,ERR_INVALID_ARG_VALUE:d_,ERR_OUT_OF_RANGE:Lo,ERR_UNKNOWN_SIGNAL:$N}}=fr,{normalizeEncoding:MN}=_r,{isAsyncFunction:KA,isArrayBufferView:JA}=_r.types,YA=Gr((e,t,r=GA,o=qA)=>{if(typeof e!="number")throw new Vr(t,"number",e);if(!Yc(e))throw new Lo(t,"an integer",e);if(e<r||e>o)throw new Lo(t,`>= ${r} && <= ${o}`,e)});Gr((e,t,r=-2147483648,o=2147483647)=>{if(typeof e!="number")throw new Vr(t,"number",e);if(!Yc(e))throw new Lo(t,"an integer",e);if(e<r||e>o)throw new Lo(t,`>= ${r} && <= ${o}`,e)});Gr((e,t,r=!1)=>{if(typeof e!="number")throw new Vr(t,"number",e);if(!Yc(e))throw new Lo(t,"an integer",e);const o=r?1:0,s=4294967295;if(e<o||e>s)throw new Lo(t,`>= ${o} && <= ${s}`,e)});Gr((e,t,r)=>{if(!FA(r,e)){const s="must be one of: "+HA(WA(r,u=>typeof u=="string"?`'${u}'`:zA(u)),", ");throw new d_(t,e,s)}});function XA(e,t){if(typeof e!="boolean")throw new Vr(t,"boolean",e)}function $l(e,t,r){return e==null||!VA(e,t)?r:e[t]}const ZA=Gr((e,t,r=null)=>{const o=$l(r,"allowArray",!1),s=$l(r,"allowFunction",!1);if(!$l(r,"nullable",!1)&&e===null||!o&&c_(e)||typeof e!="object"&&(!s||typeof e!="function"))throw new Vr(t,"Object",e)});Gr((e,t)=>{if(e!=null&&typeof e!="object"&&typeof e!="function")throw new Vr(t,"a dictionary",e)});Gr((e,t,r=0)=>{if(!c_(e))throw new Vr(t,"Array",e);if(e.length<r){const o=`must be longer than ${r}`;throw new d_(t,e,o)}});Gr((e,t="buffer")=>{if(!JA(e))throw new Vr(t,["Buffer","TypedArray","DataView"],e)});const QA=Gr((e,t)=>{if(e!==void 0&&(e===null||typeof e!="object"||!("aborted"in e)))throw new Vr(t,"AbortSignal",e)}),eT=Gr((e,t)=>{if(typeof e!="function")throw new Vr(t,"Function",e)});Gr((e,t)=>{if(typeof e!="function"||KA(e))throw new Vr(t,"Function",e)});Gr((e,t)=>{if(e!==void 0)throw new Vr(t,"undefined",e)});var xs={validateBoolean:XA,validateFunction:eT,validateInteger:YA,validateObject:ZA,validateAbortSignal:QA},Xc={exports:{}};const{SymbolAsyncIterator:np,SymbolIterator:ip,SymbolFor:Ki}=St,h_=Ki("nodejs.stream.destroyed"),tT=Ki("nodejs.stream.errored"),op=Ki("nodejs.stream.readable"),sp=Ki("nodejs.stream.writable"),rT=Ki("nodejs.stream.disturbed"),nT=Ki("nodejs.webstream.isClosedPromise"),iT=Ki("nodejs.webstream.controllerErrorFunction");function Zc(e,t=!1){var r;return!!(e&&typeof e.pipe=="function"&&typeof e.on=="function"&&(!t||typeof e.pause=="function"&&typeof e.resume=="function")&&(!e._writableState||((r=e._readableState)===null||r===void 0?void 0:r.readable)!==!1)&&(!e._writableState||e._readableState))}function Cu(e){var t;return!!(e&&typeof e.write=="function"&&typeof e.on=="function"&&(!e._readableState||((t=e._writableState)===null||t===void 0?void 0:t.writable)!==!1))}function oT(e){return!!(e&&typeof e.pipe=="function"&&e._readableState&&typeof e.on=="function"&&typeof e.write=="function")}function Ln(e){return e&&(e._readableState||e._writableState||typeof e.write=="function"&&typeof e.on=="function"||typeof e.pipe=="function"&&typeof e.on=="function")}function g_(e){return!!(e&&!Ln(e)&&typeof e.pipeThrough=="function"&&typeof e.getReader=="function"&&typeof e.cancel=="function")}function p_(e){return!!(e&&!Ln(e)&&typeof e.getWriter=="function"&&typeof e.abort=="function")}function b_(e){return!!(e&&!Ln(e)&&typeof e.readable=="object"&&typeof e.writable=="object")}function sT(e){return g_(e)||p_(e)||b_(e)}function aT(e,t){return e==null?!1:t===!0?typeof e[np]=="function":t===!1?typeof e[ip]=="function":typeof e[np]=="function"||typeof e[ip]=="function"}function Lu(e){if(!Ln(e))return null;const t=e._writableState,r=e._readableState,o=t||r;return!!(e.destroyed||e[h_]||o!=null&&o.destroyed)}function uT(e){if(!Cu(e))return null;if(e.writableEnded===!0)return!0;const t=e._writableState;return t!=null&&t.errored?!1:typeof(t==null?void 0:t.ended)!="boolean"?null:t.ended}function fT(e,t){if(!Cu(e))return null;if(e.writableFinished===!0)return!0;const r=e._writableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.finished)!="boolean"?null:!!(r.finished||t===!1&&r.ended===!0&&r.length===0)}function __(e,t){if(!Zc(e))return null;const r=e._readableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.endEmitted)!="boolean"?null:!!(r.endEmitted||t===!1&&r.ended===!0&&r.length===0)}function y_(e){return e&&e[op]!=null?e[op]:typeof(e==null?void 0:e.readable)!="boolean"?null:Lu(e)?!1:Zc(e)&&e.readable&&!__(e)}function w_(e){return e&&e[sp]!=null?e[sp]:typeof(e==null?void 0:e.writable)!="boolean"?null:Lu(e)?!1:Cu(e)&&e.writable&&!uT(e)}function lT(e,t){return Ln(e)?Lu(e)?!0:!((t==null?void 0:t.readable)!==!1&&y_(e)||(t==null?void 0:t.writable)!==!1&&w_(e)):null}function cT(e){var t,r;return Ln(e)?e.writableErrored?e.writableErrored:(t=(r=e._writableState)===null||r===void 0?void 0:r.errored)!==null&&t!==void 0?t:null:null}function dT(e){var t,r;return Ln(e)?e.readableErrored?e.readableErrored:(t=(r=e._readableState)===null||r===void 0?void 0:r.errored)!==null&&t!==void 0?t:null:null}function hT(e){if(!Ln(e))return null;if(typeof e.closed=="boolean")return e.closed;const t=e._writableState,r=e._readableState;return typeof(t==null?void 0:t.closed)=="boolean"||typeof(r==null?void 0:r.closed)=="boolean"?(t==null?void 0:t.closed)||(r==null?void 0:r.closed):typeof e._closed=="boolean"&&m_(e)?e._closed:null}function m_(e){return typeof e._closed=="boolean"&&typeof e._defaultKeepAlive=="boolean"&&typeof e._removedConnection=="boolean"&&typeof e._removedContLen=="boolean"}function gT(e){return typeof e._sent100=="boolean"&&m_(e)}function pT(e){var t;return typeof e._consuming=="boolean"&&typeof e._dumped=="boolean"&&((t=e.req)===null||t===void 0?void 0:t.upgradeOrConnect)===void 0}function bT(e){if(!Ln(e))return null;const t=e._writableState,r=e._readableState,o=t||r;return!o&&gT(e)||!!(o&&o.autoDestroy&&o.emitClose&&o.closed===!1)}function _T(e){var t;return!!(e&&((t=e[rT])!==null&&t!==void 0?t:e.readableDidRead||e.readableAborted))}function yT(e){var t,r,o,s,u,f,h,l,p,b;return!!(e&&((t=(r=(o=(s=(u=(f=e[tT])!==null&&f!==void 0?f:e.readableErrored)!==null&&u!==void 0?u:e.writableErrored)!==null&&s!==void 0?s:(h=e._readableState)===null||h===void 0?void 0:h.errorEmitted)!==null&&o!==void 0?o:(l=e._writableState)===null||l===void 0?void 0:l.errorEmitted)!==null&&r!==void 0?r:(p=e._readableState)===null||p===void 0?void 0:p.errored)!==null&&t!==void 0?t:!((b=e._writableState)===null||b===void 0)&&b.errored))}var ti={isDestroyed:Lu,kIsDestroyed:h_,isDisturbed:_T,isErrored:yT,isReadable:y_,kIsClosedPromise:nT,kControllerErrorFunction:iT,isClosed:hT,isDuplexNodeStream:oT,isFinished:lT,isIterable:aT,isReadableNodeStream:Zc,isReadableStream:g_,isReadableFinished:__,isReadableErrored:dT,isNodeStream:Ln,isWebStream:sT,isWritable:w_,isWritableNodeStream:Cu,isWritableStream:p_,isWritableFinished:fT,isWritableErrored:cT,isServerRequest:pT,willEmitClose:bT,isTransformStream:b_};const yi=z.browserExports,{AbortError:E_,codes:wT}=fr,{ERR_INVALID_ARG_TYPE:mT,ERR_STREAM_PREMATURE_CLOSE:ap}=wT,{kEmptyObject:Ec,once:vc}=_r,{validateAbortSignal:ET,validateFunction:vT,validateObject:ST,validateBoolean:RT}=xs,{Promise:AT,PromisePrototypeThen:TT,SymbolDispose:v_}=St,{isClosed:IT,isReadable:up,isReadableNodeStream:Ml,isReadableStream:OT,isReadableFinished:fp,isReadableErrored:lp,isWritable:cp,isWritableNodeStream:dp,isWritableStream:CT,isWritableFinished:hp,isWritableErrored:gp,isNodeStream:LT,willEmitClose:PT,kIsClosedPromise:BT}=ti;let To;function NT(e){return e.setHeader&&typeof e.abort=="function"}const Sc=()=>{};function S_(e,t,r){var o,s;if(arguments.length===2?(r=t,t=Ec):t==null?t=Ec:ST(t,"options"),vT(r,"callback"),ET(t.signal,"options.signal"),r=vc(r),OT(e)||CT(e))return $T(e,t,r);if(!LT(e))throw new mT("stream",["ReadableStream","WritableStream","Stream"],e);const u=(o=t.readable)!==null&&o!==void 0?o:Ml(e),f=(s=t.writable)!==null&&s!==void 0?s:dp(e),h=e._writableState,l=e._readableState,p=()=>{e.writable||I()};let b=PT(e)&&Ml(e)===u&&dp(e)===f,w=hp(e,!1);const I=()=>{w=!0,e.destroyed&&(b=!1),!(b&&(!e.readable||u))&&(!u||A)&&r.call(e)};let A=fp(e,!1);const x=()=>{A=!0,e.destroyed&&(b=!1),!(b&&(!e.writable||f))&&(!f||w)&&r.call(e)},v=j=>{r.call(e,j)};let C=IT(e);const B=()=>{C=!0;const j=gp(e)||lp(e);if(j&&typeof j!="boolean")return r.call(e,j);if(u&&!A&&Ml(e,!0)&&!fp(e,!1))return r.call(e,new ap);if(f&&!w&&!hp(e,!1))return r.call(e,new ap);r.call(e)},P=()=>{C=!0;const j=gp(e)||lp(e);if(j&&typeof j!="boolean")return r.call(e,j);r.call(e)},S=()=>{e.req.on("finish",I)};NT(e)?(e.on("complete",I),b||e.on("abort",B),e.req?S():e.on("request",S)):f&&!h&&(e.on("end",p),e.on("close",p)),!b&&typeof e.aborted=="boolean"&&e.on("aborted",B),e.on("end",x),e.on("finish",I),t.error!==!1&&e.on("error",v),e.on("close",B),C?yi.nextTick(B):h!=null&&h.errorEmitted||l!=null&&l.errorEmitted?b||yi.nextTick(P):(!u&&(!b||up(e))&&(w||cp(e)===!1)||!f&&(!b||cp(e))&&(A||up(e)===!1)||l&&e.req&&e.aborted)&&yi.nextTick(P);const m=()=>{r=Sc,e.removeListener("aborted",B),e.removeListener("complete",I),e.removeListener("abort",B),e.removeListener("request",S),e.req&&e.req.removeListener("finish",I),e.removeListener("end",p),e.removeListener("close",p),e.removeListener("finish",I),e.removeListener("end",x),e.removeListener("error",v),e.removeListener("close",B)};if(t.signal&&!C){const j=()=>{const Q=r;m(),Q.call(e,new E_(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)yi.nextTick(j);else{To=To||_r.addAbortListener;const Q=To(t.signal,j),ce=r;r=vc((...ue)=>{Q[v_](),ce.apply(e,ue)})}}return m}function $T(e,t,r){let o=!1,s=Sc;if(t.signal)if(s=()=>{o=!0,r.call(e,new E_(void 0,{cause:t.signal.reason}))},t.signal.aborted)yi.nextTick(s);else{To=To||_r.addAbortListener;const f=To(t.signal,s),h=r;r=vc((...l)=>{f[v_](),h.apply(e,l)})}const u=(...f)=>{o||yi.nextTick(()=>r.apply(e,f))};return TT(e[BT].promise,u,u),Sc}function MT(e,t){var r;let o=!1;return t===null&&(t=Ec),(r=t)!==null&&r!==void 0&&r.cleanup&&(RT(t.cleanup,"cleanup"),o=t.cleanup),new AT((s,u)=>{const f=S_(e,t,h=>{o&&f(),h?u(h):s()})})}Xc.exports=S_;Xc.exports.finished=MT;var Ai=Xc.exports;const In=z.browserExports,{aggregateTwoErrors:xT,codes:{ERR_MULTIPLE_CALLBACK:DT},AbortError:jT}=fr,{Symbol:R_}=St,{kIsDestroyed:UT,isDestroyed:kT,isFinished:FT,isServerRequest:HT}=ti,A_=R_("kDestroy"),Rc=R_("kConstruct");function T_(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function WT(e,t){const r=this._readableState,o=this._writableState,s=o||r;return o!=null&&o.destroyed||r!=null&&r.destroyed?(typeof t=="function"&&t(),this):(T_(e,o,r),o&&(o.destroyed=!0),r&&(r.destroyed=!0),s.constructed?pp(this,e,t):this.once(A_,function(u){pp(this,xT(u,e),t)}),this)}function pp(e,t,r){let o=!1;function s(u){if(o)return;o=!0;const f=e._readableState,h=e._writableState;T_(u,h,f),h&&(h.closed=!0),f&&(f.closed=!0),typeof r=="function"&&r(u),u?In.nextTick(qT,e,u):In.nextTick(I_,e)}try{e._destroy(t||null,s)}catch(u){s(u)}}function qT(e,t){Ac(e,t),I_(e)}function I_(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(r!=null&&r.emitClose||t!=null&&t.emitClose)&&e.emit("close")}function Ac(e,t){const r=e._readableState,o=e._writableState;o!=null&&o.errorEmitted||r!=null&&r.errorEmitted||(o&&(o.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function GT(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=e.readable===!1,e.endEmitted=e.readable===!1),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=t.writable===!1,t.ending=t.writable===!1,t.finished=t.writable===!1)}function Tc(e,t,r){const o=e._readableState,s=e._writableState;if(s!=null&&s.destroyed||o!=null&&o.destroyed)return this;o!=null&&o.autoDestroy||s!=null&&s.autoDestroy?e.destroy(t):t&&(t.stack,s&&!s.errored&&(s.errored=t),o&&!o.errored&&(o.errored=t),r?In.nextTick(Ac,e,t):Ac(e,t))}function VT(e,t){if(typeof e._construct!="function")return;const r=e._readableState,o=e._writableState;r&&(r.constructed=!1),o&&(o.constructed=!1),e.once(Rc,t),!(e.listenerCount(Rc)>1)&&In.nextTick(zT,e)}function zT(e){let t=!1;function r(o){if(t){Tc(e,o??new DT);return}t=!0;const s=e._readableState,u=e._writableState,f=u||s;s&&(s.constructed=!0),u&&(u.constructed=!0),f.destroyed?e.emit(A_,o):o?Tc(e,o,!0):In.nextTick(KT,e)}try{e._construct(o=>{In.nextTick(r,o)})}catch(o){In.nextTick(r,o)}}function KT(e){e.emit(Rc)}function bp(e){return(e==null?void 0:e.setHeader)&&typeof e.abort=="function"}function O_(e){e.emit("close")}function JT(e,t){e.emit("error",t),In.nextTick(O_,e)}function YT(e,t){!e||kT(e)||(!t&&!FT(e)&&(t=new jT),HT(e)?(e.socket=null,e.destroy(t)):bp(e)?e.abort():bp(e.req)?e.req.abort():typeof e.destroy=="function"?e.destroy(t):typeof e.close=="function"?e.close():t?In.nextTick(JT,e,t):In.nextTick(O_,e),e.destroyed||(e[UT]=!0))}var jo={construct:VT,destroyer:YT,destroy:WT,undestroy:GT,errorOrDestroy:Tc};const{ArrayIsArray:XT,ObjectSetPrototypeOf:C_}=St,{EventEmitter:Pu}=Ze.eventsExports;function Bu(e){Pu.call(this,e)}C_(Bu.prototype,Pu.prototype);C_(Bu,Pu);Bu.prototype.pipe=function(e,t){const r=this;function o(b){e.writable&&e.write(b)===!1&&r.pause&&r.pause()}r.on("data",o);function s(){r.readable&&r.resume&&r.resume()}e.on("drain",s),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",f),r.on("close",h));let u=!1;function f(){u||(u=!0,e.end())}function h(){u||(u=!0,typeof e.destroy=="function"&&e.destroy())}function l(b){p(),Pu.listenerCount(this,"error")===0&&this.emit("error",b)}Ic(r,"error",l),Ic(e,"error",l);function p(){r.removeListener("data",o),e.removeListener("drain",s),r.removeListener("end",f),r.removeListener("close",h),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",p),r.removeListener("close",p),e.removeListener("close",p)}return r.on("end",p),r.on("close",p),e.on("close",p),e.emit("pipe",r),e};function Ic(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):XT(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}var Qc={Stream:Bu,prependListener:Ic},L_={exports:{}};(function(e){const{SymbolDispose:t}=St,{AbortError:r,codes:o}=fr,{isNodeStream:s,isWebStream:u,kControllerErrorFunction:f}=ti,h=Ai,{ERR_INVALID_ARG_TYPE:l}=o;let p;const b=(w,I)=>{if(typeof w!="object"||!("aborted"in w))throw new l(I,"AbortSignal",w)};e.exports.addAbortSignal=function(I,A){if(b(I,"signal"),!s(A)&&!u(A))throw new l("stream",["ReadableStream","WritableStream","Stream"],A);return e.exports.addAbortSignalNoValidate(I,A)},e.exports.addAbortSignalNoValidate=function(w,I){if(typeof w!="object"||!("aborted"in w))return I;const A=s(I)?()=>{I.destroy(new r(void 0,{cause:w.reason}))}:()=>{I[f](new r(void 0,{cause:w.reason}))};if(w.aborted)A();else{p=p||_r.addAbortListener;const x=p(w,A);h(I,x[t])}return I}})(L_);var Nu=L_.exports;const{StringPrototypeSlice:_p,SymbolIterator:ZT,TypedArrayPrototypeSet:Ya,Uint8Array:QT}=St,{Buffer:xl}=z.bufferPolyfill,{inspect:eI}=_r;var tI=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const r={data:t,next:null};this.length>0?this.tail.next=r:this.head=r,this.tail=r,++this.length}unshift(t){const r={data:t,next:this.head};this.length===0&&(this.tail=r),this.head=r,++this.length}shift(){if(this.length===0)return;const t=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,t}clear(){this.head=this.tail=null,this.length=0}join(t){if(this.length===0)return"";let r=this.head,o=""+r.data;for(;(r=r.next)!==null;)o+=t+r.data;return o}concat(t){if(this.length===0)return xl.alloc(0);const r=xl.allocUnsafe(t>>>0);let o=this.head,s=0;for(;o;)Ya(r,o.data,s),s+=o.data.length,o=o.next;return r}consume(t,r){const o=this.head.data;if(t<o.length){const s=o.slice(0,t);return this.head.data=o.slice(t),s}return t===o.length?this.shift():r?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[ZT](){for(let t=this.head;t;t=t.next)yield t.data}_getString(t){let r="",o=this.head,s=0;do{const u=o.data;if(t>u.length)r+=u,t-=u.length;else{t===u.length?(r+=u,++s,o.next?this.head=o.next:this.head=this.tail=null):(r+=_p(u,0,t),this.head=o,o.data=_p(u,t));break}++s}while((o=o.next)!==null);return this.length-=s,r}_getBuffer(t){const r=xl.allocUnsafe(t),o=t;let s=this.head,u=0;do{const f=s.data;if(t>f.length)Ya(r,f,o-t),t-=f.length;else{t===f.length?(Ya(r,f,o-t),++u,s.next?this.head=s.next:this.head=this.tail=null):(Ya(r,new QT(f.buffer,f.byteOffset,t),o-t),this.head=s,s.data=f.slice(t));break}++u}while((s=s.next)!==null);return this.length-=u,r}[Symbol.for("nodejs.util.inspect.custom")](t,r){return eI(this,{...r,depth:0,customInspect:!1})}};const{MathFloor:rI,NumberIsInteger:nI}=St,{validateInteger:iI}=xs,{ERR_INVALID_ARG_VALUE:oI}=fr.codes;let P_=16*1024,B_=16;function sI(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function N_(e){return e?B_:P_}function aI(e,t){iI(t,"value",0),e?B_=t:P_=t}function uI(e,t,r,o){const s=sI(t,o,r);if(s!=null){if(!nI(s)||s<0){const u=o?`options.${r}`:"options.highWaterMark";throw new oI(u,s)}return rI(s)}return N_(e.objectMode)}var $u={getHighWaterMark:uI,getDefaultHighWaterMark:N_,setDefaultHighWaterMark:aI};const yp=z.browserExports,{PromisePrototypeThen:fI,SymbolAsyncIterator:wp,SymbolIterator:mp}=St,{Buffer:lI}=z.bufferPolyfill,{ERR_INVALID_ARG_TYPE:cI,ERR_STREAM_NULL_VALUES:dI}=fr.codes;function hI(e,t,r){let o;if(typeof t=="string"||t instanceof lI)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});let s;if(t&&t[wp])s=!0,o=t[wp]();else if(t&&t[mp])s=!1,o=t[mp]();else throw new cI("iterable",["Iterable"],t);const u=new e({objectMode:!0,highWaterMark:1,...r});let f=!1;u._read=function(){f||(f=!0,l())},u._destroy=function(p,b){fI(h(p),()=>yp.nextTick(b,p),w=>yp.nextTick(b,w||p))};async function h(p){const b=p!=null,w=typeof o.throw=="function";if(b&&w){const{value:I,done:A}=await o.throw(p);if(await I,A)return}if(typeof o.return=="function"){const{value:I}=await o.return();await I}}async function l(){for(;;){try{const{value:p,done:b}=s?await o.next():o.next();if(b)u.push(null);else{const w=p&&typeof p.then=="function"?await p:p;if(w===null)throw f=!1,new dI;if(u.push(w))continue;f=!1}}catch(p){u.destroy(p)}break}}return u}var $_=hI,Dl,Ep;function Mu(){if(Ep)return Dl;Ep=1;const e=z.browserExports,{ArrayPrototypeIndexOf:t,NumberIsInteger:r,NumberIsNaN:o,NumberParseInt:s,ObjectDefineProperties:u,ObjectKeys:f,ObjectSetPrototypeOf:h,Promise:l,SafeSet:p,SymbolAsyncDispose:b,SymbolAsyncIterator:w,Symbol:I}=St;Dl=Re,Re.ReadableState=Ue;const{EventEmitter:A}=Ze.eventsExports,{Stream:x,prependListener:v}=Qc,{Buffer:C}=z.bufferPolyfill,{addAbortSignal:B}=Nu,P=Ai;let S=_r.debuglog("stream",N=>{S=N});const m=tI,j=jo,{getHighWaterMark:Q,getDefaultHighWaterMark:ce}=$u,{aggregateTwoErrors:ue,codes:{ERR_INVALID_ARG_TYPE:te,ERR_METHOD_NOT_IMPLEMENTED:Se,ERR_OUT_OF_RANGE:me,ERR_STREAM_PUSH_AFTER_EOF:F,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:U},AbortError:$}=fr,{validateObject:q}=xs,Y=I("kPaused"),{StringDecoder:G}=Ze.requireString_decoder(),ne=$_;h(Re.prototype,x.prototype),h(Re,x);const H=()=>{},{errorOrDestroy:K}=j,ae=1,de=2,re=4,_e=8,be=16,R=32,O=64,W=128,oe=256,ye=512,d=1024,g=2048,_=4096,E=8192,J=16384,ie=32768,se=65536,Ie=1<<17,Be=1<<18;function Ce(N){return{enumerable:!1,get(){return(this.state&N)!==0},set(D){D?this.state|=N:this.state&=~N}}}u(Ue.prototype,{objectMode:Ce(ae),ended:Ce(de),endEmitted:Ce(re),reading:Ce(_e),constructed:Ce(be),sync:Ce(R),needReadable:Ce(O),emittedReadable:Ce(W),readableListening:Ce(oe),resumeScheduled:Ce(ye),errorEmitted:Ce(d),emitClose:Ce(g),autoDestroy:Ce(_),destroyed:Ce(E),closed:Ce(J),closeEmitted:Ce(ie),multiAwaitDrain:Ce(se),readingMore:Ce(Ie),dataEmitted:Ce(Be)});function Ue(N,D,Ee){typeof Ee!="boolean"&&(Ee=D instanceof Xn()),this.state=g|_|be|R,N&&N.objectMode&&(this.state|=ae),Ee&&N&&N.readableObjectMode&&(this.state|=ae),this.highWaterMark=N?Q(this,N,"readableHighWaterMark",Ee):ce(!1),this.buffer=new m,this.length=0,this.pipes=[],this.flowing=null,this[Y]=null,N&&N.emitClose===!1&&(this.state&=-2049),N&&N.autoDestroy===!1&&(this.state&=-4097),this.errored=null,this.defaultEncoding=N&&N.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,N&&N.encoding&&(this.decoder=new G(N.encoding),this.encoding=N.encoding)}function Re(N){if(!(this instanceof Re))return new Re(N);const D=this instanceof Xn();this._readableState=new Ue(N,this,D),N&&(typeof N.read=="function"&&(this._read=N.read),typeof N.destroy=="function"&&(this._destroy=N.destroy),typeof N.construct=="function"&&(this._construct=N.construct),N.signal&&!D&&B(N.signal,this)),x.call(this,N),j.construct(this,()=>{this._readableState.needReadable&&ut(this,this._readableState)})}Re.prototype.destroy=j.destroy,Re.prototype._undestroy=j.undestroy,Re.prototype._destroy=function(N,D){D(N)},Re.prototype[A.captureRejectionSymbol]=function(N){this.destroy(N)},Re.prototype[b]=function(){let N;return this.destroyed||(N=this.readableEnded?null:new $,this.destroy(N)),new l((D,Ee)=>P(this,ve=>ve&&ve!==N?Ee(ve):D(null)))},Re.prototype.push=function(N,D){return He(this,N,D,!1)},Re.prototype.unshift=function(N,D){return He(this,N,D,!0)};function He(N,D,Ee,ve){S("readableAddChunk",D);const Te=N._readableState;let wt;if(Te.state&ae||(typeof D=="string"?(Ee=Ee||Te.defaultEncoding,Te.encoding!==Ee&&(ve&&Te.encoding?D=C.from(D,Ee).toString(Te.encoding):(D=C.from(D,Ee),Ee=""))):D instanceof C?Ee="":x._isUint8Array(D)?(D=x._uint8ArrayToBuffer(D),Ee=""):D!=null&&(wt=new te("chunk",["string","Buffer","Uint8Array"],D))),wt)K(N,wt);else if(D===null)Te.state&=-9,Ve(N,Te);else if(Te.state&ae||D&&D.length>0)if(ve)if(Te.state&re)K(N,new U);else{if(Te.destroyed||Te.errored)return!1;_t(N,Te,D,!0)}else if(Te.ended)K(N,new F);else{if(Te.destroyed||Te.errored)return!1;Te.state&=-9,Te.decoder&&!Ee?(D=Te.decoder.write(D),Te.objectMode||D.length!==0?_t(N,Te,D,!1):ut(N,Te)):_t(N,Te,D,!1)}else ve||(Te.state&=-9,ut(N,Te));return!Te.ended&&(Te.length<Te.highWaterMark||Te.length===0)}function _t(N,D,Ee,ve){D.flowing&&D.length===0&&!D.sync&&N.listenerCount("data")>0?(D.state&se?D.awaitDrainWriters.clear():D.awaitDrainWriters=null,D.dataEmitted=!0,N.emit("data",Ee)):(D.length+=D.objectMode?1:Ee.length,ve?D.buffer.unshift(Ee):D.buffer.push(Ee),D.state&O&&jt(N)),ut(N,D)}Re.prototype.isPaused=function(){const N=this._readableState;return N[Y]===!0||N.flowing===!1},Re.prototype.setEncoding=function(N){const D=new G(N);this._readableState.decoder=D,this._readableState.encoding=this._readableState.decoder.encoding;const Ee=this._readableState.buffer;let ve="";for(const Te of Ee)ve+=D.write(Te);return Ee.clear(),ve!==""&&Ee.push(ve),this._readableState.length=ve.length,this};const tt=1073741824;function yt(N){if(N>tt)throw new me("size","<= 1GiB",N);return N--,N|=N>>>1,N|=N>>>2,N|=N>>>4,N|=N>>>8,N|=N>>>16,N++,N}function Ye(N,D){return N<=0||D.length===0&&D.ended?0:D.state&ae?1:o(N)?D.flowing&&D.length?D.buffer.first().length:D.length:N<=D.length?N:D.ended?D.length:0}Re.prototype.read=function(N){S("read",N),N===void 0?N=NaN:r(N)||(N=s(N,10));const D=this._readableState,Ee=N;if(N>D.highWaterMark&&(D.highWaterMark=yt(N)),N!==0&&(D.state&=-129),N===0&&D.needReadable&&((D.highWaterMark!==0?D.length>=D.highWaterMark:D.length>0)||D.ended))return S("read: emitReadable",D.length,D.ended),D.length===0&&D.ended?Cr(this):jt(this),null;if(N=Ye(N,D),N===0&&D.ended)return D.length===0&&Cr(this),null;let ve=(D.state&O)!==0;if(S("need readable",ve),(D.length===0||D.length-N<D.highWaterMark)&&(ve=!0,S("length less than watermark",ve)),D.ended||D.reading||D.destroyed||D.errored||!D.constructed)ve=!1,S("reading, ended or constructing",ve);else if(ve){S("do read"),D.state|=_e|R,D.length===0&&(D.state|=O);try{this._read(D.highWaterMark)}catch(wt){K(this,wt)}D.state&=-33,D.reading||(N=Ye(Ee,D))}let Te;return N>0?Te=rr(N,D):Te=null,Te===null?(D.needReadable=D.length<=D.highWaterMark,N=0):(D.length-=N,D.multiAwaitDrain?D.awaitDrainWriters.clear():D.awaitDrainWriters=null),D.length===0&&(D.ended||(D.needReadable=!0),Ee!==N&&D.ended&&Cr(this)),Te!==null&&!D.errorEmitted&&!D.closeEmitted&&(D.dataEmitted=!0,this.emit("data",Te)),Te};function Ve(N,D){if(S("onEofChunk"),!D.ended){if(D.decoder){const Ee=D.decoder.end();Ee&&Ee.length&&(D.buffer.push(Ee),D.length+=D.objectMode?1:Ee.length)}D.ended=!0,D.sync?jt(N):(D.needReadable=!1,D.emittedReadable=!0,Pt(N))}}function jt(N){const D=N._readableState;S("emitReadable",D.needReadable,D.emittedReadable),D.needReadable=!1,D.emittedReadable||(S("emitReadable",D.flowing),D.emittedReadable=!0,e.nextTick(Pt,N))}function Pt(N){const D=N._readableState;S("emitReadable_",D.destroyed,D.length,D.ended),!D.destroyed&&!D.errored&&(D.length||D.ended)&&(N.emit("readable"),D.emittedReadable=!1),D.needReadable=!D.flowing&&!D.ended&&D.length<=D.highWaterMark,Jr(N)}function ut(N,D){!D.readingMore&&D.constructed&&(D.readingMore=!0,e.nextTick(Nt,N,D))}function Nt(N,D){for(;!D.reading&&!D.ended&&(D.length<D.highWaterMark||D.flowing&&D.length===0);){const Ee=D.length;if(S("maybeReadMore read 0"),N.read(0),Ee===D.length)break}D.readingMore=!1}Re.prototype._read=function(N){throw new Se("_read()")},Re.prototype.pipe=function(N,D){const Ee=this,ve=this._readableState;ve.pipes.length===1&&(ve.multiAwaitDrain||(ve.multiAwaitDrain=!0,ve.awaitDrainWriters=new p(ve.awaitDrainWriters?[ve.awaitDrainWriters]:[]))),ve.pipes.push(N),S("pipe count=%d opts=%j",ve.pipes.length,D);const wt=(!D||D.end!==!1)&&N!==e.stdout&&N!==e.stderr?ln:wr;ve.endEmitted?e.nextTick(wt):Ee.once("end",wt),N.on("unpipe",Rt);function Rt(ir,Ht){S("onunpipe"),ir===Ee&&Ht&&Ht.hasUnpiped===!1&&(Ht.hasUnpiped=!0,Bn())}function ln(){S("onend"),N.end()}let Bt,cn=!1;function Bn(){S("cleanup"),N.removeListener("close",Vt),N.removeListener("finish",Lr),Bt&&N.removeListener("drain",Bt),N.removeListener("error",Xr),N.removeListener("unpipe",Rt),Ee.removeListener("end",ln),Ee.removeListener("end",wr),Ee.removeListener("data",hn),cn=!0,Bt&&ve.awaitDrainWriters&&(!N._writableState||N._writableState.needDrain)&&Bt()}function dn(){cn||(ve.pipes.length===1&&ve.pipes[0]===N?(S("false write response, pause",0),ve.awaitDrainWriters=N,ve.multiAwaitDrain=!1):ve.pipes.length>1&&ve.pipes.includes(N)&&(S("false write response, pause",ve.awaitDrainWriters.size),ve.awaitDrainWriters.add(N)),Ee.pause()),Bt||(Bt=lr(Ee,N),N.on("drain",Bt))}Ee.on("data",hn);function hn(ir){S("ondata");const Ht=N.write(ir);S("dest.write",Ht),Ht===!1&&dn()}function Xr(ir){if(S("onerror",ir),wr(),N.removeListener("error",Xr),N.listenerCount("error")===0){const Ht=N._writableState||N._readableState;Ht&&!Ht.errorEmitted?K(N,ir):N.emit("error",ir)}}v(N,"error",Xr);function Vt(){N.removeListener("finish",Lr),wr()}N.once("close",Vt);function Lr(){S("onfinish"),N.removeListener("close",Vt),wr()}N.once("finish",Lr);function wr(){S("unpipe"),Ee.unpipe(N)}return N.emit("pipe",Ee),N.writableNeedDrain===!0?dn():ve.flowing||(S("pipe resume"),Ee.resume()),N};function lr(N,D){return function(){const ve=N._readableState;ve.awaitDrainWriters===D?(S("pipeOnDrain",1),ve.awaitDrainWriters=null):ve.multiAwaitDrain&&(S("pipeOnDrain",ve.awaitDrainWriters.size),ve.awaitDrainWriters.delete(D)),(!ve.awaitDrainWriters||ve.awaitDrainWriters.size===0)&&N.listenerCount("data")&&N.resume()}}Re.prototype.unpipe=function(N){const D=this._readableState,Ee={hasUnpiped:!1};if(D.pipes.length===0)return this;if(!N){const Te=D.pipes;D.pipes=[],this.pause();for(let wt=0;wt<Te.length;wt++)Te[wt].emit("unpipe",this,{hasUnpiped:!1});return this}const ve=t(D.pipes,N);return ve===-1?this:(D.pipes.splice(ve,1),D.pipes.length===0&&this.pause(),N.emit("unpipe",this,Ee),this)},Re.prototype.on=function(N,D){const Ee=x.prototype.on.call(this,N,D),ve=this._readableState;return N==="data"?(ve.readableListening=this.listenerCount("readable")>0,ve.flowing!==!1&&this.resume()):N==="readable"&&!ve.endEmitted&&!ve.readableListening&&(ve.readableListening=ve.needReadable=!0,ve.flowing=!1,ve.emittedReadable=!1,S("on readable",ve.length,ve.reading),ve.length?jt(this):ve.reading||e.nextTick(Ft,this)),Ee},Re.prototype.addListener=Re.prototype.on,Re.prototype.removeListener=function(N,D){const Ee=x.prototype.removeListener.call(this,N,D);return N==="readable"&&e.nextTick(tr,this),Ee},Re.prototype.off=Re.prototype.removeListener,Re.prototype.removeAllListeners=function(N){const D=x.prototype.removeAllListeners.apply(this,arguments);return(N==="readable"||N===void 0)&&e.nextTick(tr,this),D};function tr(N){const D=N._readableState;D.readableListening=N.listenerCount("readable")>0,D.resumeScheduled&&D[Y]===!1?D.flowing=!0:N.listenerCount("data")>0?N.resume():D.readableListening||(D.flowing=null)}function Ft(N){S("readable nexttick read 0"),N.read(0)}Re.prototype.resume=function(){const N=this._readableState;return N.flowing||(S("resume"),N.flowing=!N.readableListening,cr(this,N)),N[Y]=!1,this};function cr(N,D){D.resumeScheduled||(D.resumeScheduled=!0,e.nextTick(Kr,N,D))}function Kr(N,D){S("resume",D.reading),D.reading||N.read(0),D.resumeScheduled=!1,N.emit("resume"),Jr(N),D.flowing&&!D.reading&&N.read(0)}Re.prototype.pause=function(){return S("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(S("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[Y]=!0,this};function Jr(N){const D=N._readableState;for(S("flow",D.flowing);D.flowing&&N.read()!==null;);}Re.prototype.wrap=function(N){let D=!1;N.on("data",ve=>{!this.push(ve)&&N.pause&&(D=!0,N.pause())}),N.on("end",()=>{this.push(null)}),N.on("error",ve=>{K(this,ve)}),N.on("close",()=>{this.destroy()}),N.on("destroy",()=>{this.destroy()}),this._read=()=>{D&&N.resume&&(D=!1,N.resume())};const Ee=f(N);for(let ve=1;ve<Ee.length;ve++){const Te=Ee[ve];this[Te]===void 0&&typeof N[Te]=="function"&&(this[Te]=N[Te].bind(N))}return this},Re.prototype[w]=function(){return an(this)},Re.prototype.iterator=function(N){return N!==void 0&&q(N,"options"),an(this,N)};function an(N,D){typeof N.read!="function"&&(N=Re.wrap(N,{objectMode:!0}));const Ee=un(N,D);return Ee.stream=N,Ee}async function*un(N,D){let Ee=H;function ve(Rt){this===N?(Ee(),Ee=H):Ee=Rt}N.on("readable",ve);let Te;const wt=P(N,{writable:!1},Rt=>{Te=Rt?ue(Te,Rt):null,Ee(),Ee=H});try{for(;;){const Rt=N.destroyed?null:N.read();if(Rt!==null)yield Rt;else{if(Te)throw Te;if(Te===null)return;await new l(ve)}}}catch(Rt){throw Te=ue(Te,Rt),Te}finally{(Te||(D==null?void 0:D.destroyOnReturn)!==!1)&&(Te===void 0||N._readableState.autoDestroy)?j.destroyer(N,null):(N.off("readable",ve),wt())}}u(Re.prototype,{readable:{__proto__:null,get(){const N=this._readableState;return!!N&&N.readable!==!1&&!N.destroyed&&!N.errorEmitted&&!N.endEmitted},set(N){this._readableState&&(this._readableState.readable=!!N)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(N){this._readableState&&(this._readableState.flowing=N)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(N){this._readableState&&(this._readableState.destroyed=N)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),u(Ue.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[Y]!==!1},set(N){this[Y]=!!N}}}),Re._fromList=rr;function rr(N,D){if(D.length===0)return null;let Ee;return D.objectMode?Ee=D.buffer.shift():!N||N>=D.length?(D.decoder?Ee=D.buffer.join(""):D.buffer.length===1?Ee=D.buffer.first():Ee=D.buffer.concat(D.length),D.buffer.clear()):Ee=D.buffer.consume(N,D.decoder),Ee}function Cr(N){const D=N._readableState;S("endReadable",D.endEmitted),D.endEmitted||(D.ended=!0,e.nextTick(nr,D,N))}function nr(N,D){if(S("endReadableNT",N.endEmitted,N.length),!N.errored&&!N.closeEmitted&&!N.endEmitted&&N.length===0){if(N.endEmitted=!0,D.emit("end"),D.writable&&D.allowHalfOpen===!1)e.nextTick(Pn,D);else if(N.autoDestroy){const Ee=D._writableState;(!Ee||Ee.autoDestroy&&(Ee.finished||Ee.writable===!1))&&D.destroy()}}}function Pn(N){N.writable&&!N.writableEnded&&!N.destroyed&&N.end()}Re.from=function(N,D){return ne(Re,N,D)};let Yr;function fn(){return Yr===void 0&&(Yr={}),Yr}return Re.fromWeb=function(N,D){return fn().newStreamReadableFromReadableStream(N,D)},Re.toWeb=function(N,D){return fn().newReadableStreamFromStreamReadable(N,D)},Re.wrap=function(N,D){var Ee,ve;return new Re({objectMode:(Ee=(ve=N.readableObjectMode)!==null&&ve!==void 0?ve:N.objectMode)!==null&&Ee!==void 0?Ee:!0,...D,destroy(Te,wt){j.destroyer(N,Te),wt(Te)}}).wrap(N)},Dl}var jl,vp;function ed(){if(vp)return jl;vp=1;const e=z.browserExports,{ArrayPrototypeSlice:t,Error:r,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:s,ObjectDefineProperties:u,ObjectSetPrototypeOf:f,StringPrototypeToLowerCase:h,Symbol:l,SymbolHasInstance:p}=St;jl=q,q.WritableState=U;const{EventEmitter:b}=Ze.eventsExports,w=Qc.Stream,{Buffer:I}=z.bufferPolyfill,A=jo,{addAbortSignal:x}=Nu,{getHighWaterMark:v,getDefaultHighWaterMark:C}=$u,{ERR_INVALID_ARG_TYPE:B,ERR_METHOD_NOT_IMPLEMENTED:P,ERR_MULTIPLE_CALLBACK:S,ERR_STREAM_CANNOT_PIPE:m,ERR_STREAM_DESTROYED:j,ERR_STREAM_ALREADY_FINISHED:Q,ERR_STREAM_NULL_VALUES:ce,ERR_STREAM_WRITE_AFTER_END:ue,ERR_UNKNOWN_ENCODING:te}=fr.codes,{errorOrDestroy:Se}=A;f(q.prototype,w.prototype),f(q,w);function me(){}const F=l("kOnFinished");function U(_,E,J){typeof J!="boolean"&&(J=E instanceof Xn()),this.objectMode=!!(_&&_.objectMode),J&&(this.objectMode=this.objectMode||!!(_&&_.writableObjectMode)),this.highWaterMark=_?v(this,_,"writableHighWaterMark",J):C(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const ie=!!(_&&_.decodeStrings===!1);this.decodeStrings=!ie,this.defaultEncoding=_&&_.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=K.bind(void 0,E),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,$(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!_||_.emitClose!==!1,this.autoDestroy=!_||_.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[F]=[]}function $(_){_.buffered=[],_.bufferedIndex=0,_.allBuffers=!0,_.allNoop=!0}U.prototype.getBuffer=function(){return t(this.buffered,this.bufferedIndex)},s(U.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function q(_){const E=this instanceof Xn();if(!E&&!o(q,this))return new q(_);this._writableState=new U(_,this,E),_&&(typeof _.write=="function"&&(this._write=_.write),typeof _.writev=="function"&&(this._writev=_.writev),typeof _.destroy=="function"&&(this._destroy=_.destroy),typeof _.final=="function"&&(this._final=_.final),typeof _.construct=="function"&&(this._construct=_.construct),_.signal&&x(_.signal,this)),w.call(this,_),A.construct(this,()=>{const J=this._writableState;J.writing||_e(this,J),W(this,J)})}s(q,p,{__proto__:null,value:function(_){return o(this,_)?!0:this!==q?!1:_&&_._writableState instanceof U}}),q.prototype.pipe=function(){Se(this,new m)};function Y(_,E,J,ie){const se=_._writableState;if(typeof J=="function")ie=J,J=se.defaultEncoding;else{if(!J)J=se.defaultEncoding;else if(J!=="buffer"&&!I.isEncoding(J))throw new te(J);typeof ie!="function"&&(ie=me)}if(E===null)throw new ce;if(!se.objectMode)if(typeof E=="string")se.decodeStrings!==!1&&(E=I.from(E,J),J="buffer");else if(E instanceof I)J="buffer";else if(w._isUint8Array(E))E=w._uint8ArrayToBuffer(E),J="buffer";else throw new B("chunk",["string","Buffer","Uint8Array"],E);let Ie;return se.ending?Ie=new ue:se.destroyed&&(Ie=new j("write")),Ie?(e.nextTick(ie,Ie),Se(_,Ie,!0),Ie):(se.pendingcb++,G(_,se,E,J,ie))}q.prototype.write=function(_,E,J){return Y(this,_,E,J)===!0},q.prototype.cork=function(){this._writableState.corked++},q.prototype.uncork=function(){const _=this._writableState;_.corked&&(_.corked--,_.writing||_e(this,_))},q.prototype.setDefaultEncoding=function(E){if(typeof E=="string"&&(E=h(E)),!I.isEncoding(E))throw new te(E);return this._writableState.defaultEncoding=E,this};function G(_,E,J,ie,se){const Ie=E.objectMode?1:J.length;E.length+=Ie;const Be=E.length<E.highWaterMark;return Be||(E.needDrain=!0),E.writing||E.corked||E.errored||!E.constructed?(E.buffered.push({chunk:J,encoding:ie,callback:se}),E.allBuffers&&ie!=="buffer"&&(E.allBuffers=!1),E.allNoop&&se!==me&&(E.allNoop=!1)):(E.writelen=Ie,E.writecb=se,E.writing=!0,E.sync=!0,_._write(J,ie,E.onwrite),E.sync=!1),Be&&!E.errored&&!E.destroyed}function ne(_,E,J,ie,se,Ie,Be){E.writelen=ie,E.writecb=Be,E.writing=!0,E.sync=!0,E.destroyed?E.onwrite(new j("write")):J?_._writev(se,E.onwrite):_._write(se,Ie,E.onwrite),E.sync=!1}function H(_,E,J,ie){--E.pendingcb,ie(J),re(E),Se(_,J)}function K(_,E){const J=_._writableState,ie=J.sync,se=J.writecb;if(typeof se!="function"){Se(_,new S);return}J.writing=!1,J.writecb=null,J.length-=J.writelen,J.writelen=0,E?(E.stack,J.errored||(J.errored=E),_._readableState&&!_._readableState.errored&&(_._readableState.errored=E),ie?e.nextTick(H,_,J,E,se):H(_,J,E,se)):(J.buffered.length>J.bufferedIndex&&_e(_,J),ie?J.afterWriteTickInfo!==null&&J.afterWriteTickInfo.cb===se?J.afterWriteTickInfo.count++:(J.afterWriteTickInfo={count:1,cb:se,stream:_,state:J},e.nextTick(ae,J.afterWriteTickInfo)):de(_,J,1,se))}function ae({stream:_,state:E,count:J,cb:ie}){return E.afterWriteTickInfo=null,de(_,E,J,ie)}function de(_,E,J,ie){for(!E.ending&&!_.destroyed&&E.length===0&&E.needDrain&&(E.needDrain=!1,_.emit("drain"));J-- >0;)E.pendingcb--,ie();E.destroyed&&re(E),W(_,E)}function re(_){if(_.writing)return;for(let se=_.bufferedIndex;se<_.buffered.length;++se){var E;const{chunk:Ie,callback:Be}=_.buffered[se],Ce=_.objectMode?1:Ie.length;_.length-=Ce,Be((E=_.errored)!==null&&E!==void 0?E:new j("write"))}const J=_[F].splice(0);for(let se=0;se<J.length;se++){var ie;J[se]((ie=_.errored)!==null&&ie!==void 0?ie:new j("end"))}$(_)}function _e(_,E){if(E.corked||E.bufferProcessing||E.destroyed||!E.constructed)return;const{buffered:J,bufferedIndex:ie,objectMode:se}=E,Ie=J.length-ie;if(!Ie)return;let Be=ie;if(E.bufferProcessing=!0,Ie>1&&_._writev){E.pendingcb-=Ie-1;const Ce=E.allNoop?me:Re=>{for(let He=Be;He<J.length;++He)J[He].callback(Re)},Ue=E.allNoop&&Be===0?J:t(J,Be);Ue.allBuffers=E.allBuffers,ne(_,E,!0,E.length,Ue,"",Ce),$(E)}else{do{const{chunk:Ce,encoding:Ue,callback:Re}=J[Be];J[Be++]=null;const He=se?1:Ce.length;ne(_,E,!1,He,Ce,Ue,Re)}while(Be<J.length&&!E.writing);Be===J.length?$(E):Be>256?(J.splice(0,Be),E.bufferedIndex=0):E.bufferedIndex=Be}E.bufferProcessing=!1}q.prototype._write=function(_,E,J){if(this._writev)this._writev([{chunk:_,encoding:E}],J);else throw new P("_write()")},q.prototype._writev=null,q.prototype.end=function(_,E,J){const ie=this._writableState;typeof _=="function"?(J=_,_=null,E=null):typeof E=="function"&&(J=E,E=null);let se;if(_!=null){const Ie=Y(this,_,E);Ie instanceof r&&(se=Ie)}return ie.corked&&(ie.corked=1,this.uncork()),se||(!ie.errored&&!ie.ending?(ie.ending=!0,W(this,ie,!0),ie.ended=!0):ie.finished?se=new Q("end"):ie.destroyed&&(se=new j("end"))),typeof J=="function"&&(se||ie.finished?e.nextTick(J,se):ie[F].push(J)),this};function be(_){return _.ending&&!_.destroyed&&_.constructed&&_.length===0&&!_.errored&&_.buffered.length===0&&!_.finished&&!_.writing&&!_.errorEmitted&&!_.closeEmitted}function R(_,E){let J=!1;function ie(se){if(J){Se(_,se??S());return}if(J=!0,E.pendingcb--,se){const Ie=E[F].splice(0);for(let Be=0;Be<Ie.length;Be++)Ie[Be](se);Se(_,se,E.sync)}else be(E)&&(E.prefinished=!0,_.emit("prefinish"),E.pendingcb++,e.nextTick(oe,_,E))}E.sync=!0,E.pendingcb++;try{_._final(ie)}catch(se){ie(se)}E.sync=!1}function O(_,E){!E.prefinished&&!E.finalCalled&&(typeof _._final=="function"&&!E.destroyed?(E.finalCalled=!0,R(_,E)):(E.prefinished=!0,_.emit("prefinish")))}function W(_,E,J){be(E)&&(O(_,E),E.pendingcb===0&&(J?(E.pendingcb++,e.nextTick((ie,se)=>{be(se)?oe(ie,se):se.pendingcb--},_,E)):be(E)&&(E.pendingcb++,oe(_,E))))}function oe(_,E){E.pendingcb--,E.finished=!0;const J=E[F].splice(0);for(let ie=0;ie<J.length;ie++)J[ie]();if(_.emit("finish"),E.autoDestroy){const ie=_._readableState;(!ie||ie.autoDestroy&&(ie.endEmitted||ie.readable===!1))&&_.destroy()}}u(q.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(_){this._writableState&&(this._writableState.destroyed=_)}},writable:{__proto__:null,get(){const _=this._writableState;return!!_&&_.writable!==!1&&!_.destroyed&&!_.errored&&!_.ending&&!_.ended},set(_){this._writableState&&(this._writableState.writable=!!_)}},writableFinished:{__proto__:null,get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{__proto__:null,get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{__proto__:null,get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{__proto__:null,get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{__proto__:null,get(){const _=this._writableState;return _?!_.destroyed&&!_.ending&&_.needDrain:!1}},writableHighWaterMark:{__proto__:null,get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{__proto__:null,get(){return this._writableState?this._writableState.corked:0}},writableLength:{__proto__:null,get(){return this._writableState&&this._writableState.length}},errored:{__proto__:null,enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});const ye=A.destroy;q.prototype.destroy=function(_,E){const J=this._writableState;return!J.destroyed&&(J.bufferedIndex<J.buffered.length||J[F].length)&&e.nextTick(re,J),ye.call(this,_,E),this},q.prototype._undestroy=A.undestroy,q.prototype._destroy=function(_,E){E(_)},q.prototype[b.captureRejectionSymbol]=function(_){this.destroy(_)};let d;function g(){return d===void 0&&(d={}),d}return q.fromWeb=function(_,E){return g().newStreamWritableFromWritableStream(_,E)},q.toWeb=function(_){return g().newWritableStreamFromStreamWritable(_)},jl}var Ul,Sp;function gI(){if(Sp)return Ul;Sp=1;const e=z.browserExports,t=z.bufferPolyfill,{isReadable:r,isWritable:o,isIterable:s,isNodeStream:u,isReadableNodeStream:f,isWritableNodeStream:h,isDuplexNodeStream:l,isReadableStream:p,isWritableStream:b}=ti,w=Ai,{AbortError:I,codes:{ERR_INVALID_ARG_TYPE:A,ERR_INVALID_RETURN_VALUE:x}}=fr,{destroyer:v}=jo,C=Xn(),B=Mu(),P=ed(),{createDeferredPromise:S}=_r,m=$_,j=globalThis.Blob||t.Blob,Q=typeof j<"u"?function(U){return U instanceof j}:function(U){return!1},ce=globalThis.AbortController||Cs().AbortController,{FunctionPrototypeCall:ue}=St;class te extends C{constructor(U){super(U),(U==null?void 0:U.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(U==null?void 0:U.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}Ul=function F(U,$){if(l(U))return U;if(f(U))return me({readable:U});if(h(U))return me({writable:U});if(u(U))return me({writable:!1,readable:!1});if(p(U))return me({readable:B.fromWeb(U)});if(b(U))return me({writable:P.fromWeb(U)});if(typeof U=="function"){const{value:Y,write:G,final:ne,destroy:H}=Se(U);if(s(Y))return m(te,Y,{objectMode:!0,write:G,final:ne,destroy:H});const K=Y==null?void 0:Y.then;if(typeof K=="function"){let ae;const de=ue(K,Y,re=>{if(re!=null)throw new x("nully","body",re)},re=>{v(ae,re)});return ae=new te({objectMode:!0,readable:!1,write:G,final(re){ne(async()=>{try{await de,e.nextTick(re,null)}catch(_e){e.nextTick(re,_e)}})},destroy:H})}throw new x("Iterable, AsyncIterable or AsyncFunction",$,Y)}if(Q(U))return F(U.arrayBuffer());if(s(U))return m(te,U,{objectMode:!0,writable:!1});if(p(U==null?void 0:U.readable)&&b(U==null?void 0:U.writable))return te.fromWeb(U);if(typeof(U==null?void 0:U.writable)=="object"||typeof(U==null?void 0:U.readable)=="object"){const Y=U!=null&&U.readable?f(U==null?void 0:U.readable)?U==null?void 0:U.readable:F(U.readable):void 0,G=U!=null&&U.writable?h(U==null?void 0:U.writable)?U==null?void 0:U.writable:F(U.writable):void 0;return me({readable:Y,writable:G})}const q=U==null?void 0:U.then;if(typeof q=="function"){let Y;return ue(q,U,G=>{G!=null&&Y.push(G),Y.push(null)},G=>{v(Y,G)}),Y=new te({objectMode:!0,writable:!1,read(){}})}throw new A($,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],U)};function Se(F){let{promise:U,resolve:$}=S();const q=new ce,Y=q.signal;return{value:F(async function*(){for(;;){const ne=U;U=null;const{chunk:H,done:K,cb:ae}=await ne;if(e.nextTick(ae),K)return;if(Y.aborted)throw new I(void 0,{cause:Y.reason});({promise:U,resolve:$}=S()),yield H}}(),{signal:Y}),write(ne,H,K){const ae=$;$=null,ae({chunk:ne,done:!1,cb:K})},final(ne){const H=$;$=null,H({done:!0,cb:ne})},destroy(ne,H){q.abort(),H(ne)}}}function me(F){const U=F.readable&&typeof F.readable.read!="function"?B.wrap(F.readable):F.readable,$=F.writable;let q=!!r(U),Y=!!o($),G,ne,H,K,ae;function de(re){const _e=K;K=null,_e?_e(re):re&&ae.destroy(re)}return ae=new te({readableObjectMode:!!(U!=null&&U.readableObjectMode),writableObjectMode:!!($!=null&&$.writableObjectMode),readable:q,writable:Y}),Y&&(w($,re=>{Y=!1,re&&v(U,re),de(re)}),ae._write=function(re,_e,be){$.write(re,_e)?be():G=be},ae._final=function(re){$.end(),ne=re},$.on("drain",function(){if(G){const re=G;G=null,re()}}),$.on("finish",function(){if(ne){const re=ne;ne=null,re()}})),q&&(w(U,re=>{q=!1,re&&v(U,re),de(re)}),U.on("readable",function(){if(H){const re=H;H=null,re()}}),U.on("end",function(){ae.push(null)}),ae._read=function(){for(;;){const re=U.read();if(re===null){H=ae._read;return}if(!ae.push(re))return}}),ae._destroy=function(re,_e){!re&&K!==null&&(re=new I),H=null,G=null,ne=null,K===null?_e(re):(K=_e,v($,re),v(U,re))},ae}return Ul}var kl,Rp;function Xn(){if(Rp)return kl;Rp=1;const{ObjectDefineProperties:e,ObjectGetOwnPropertyDescriptor:t,ObjectKeys:r,ObjectSetPrototypeOf:o}=St;kl=f;const s=Mu(),u=ed();o(f.prototype,s.prototype),o(f,s);{const b=r(u.prototype);for(let w=0;w<b.length;w++){const I=b[w];f.prototype[I]||(f.prototype[I]=u.prototype[I])}}function f(b){if(!(this instanceof f))return new f(b);s.call(this,b),u.call(this,b),b?(this.allowHalfOpen=b.allowHalfOpen!==!1,b.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),b.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}e(f.prototype,{writable:{__proto__:null,...t(u.prototype,"writable")},writableHighWaterMark:{__proto__:null,...t(u.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...t(u.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...t(u.prototype,"writableBuffer")},writableLength:{__proto__:null,...t(u.prototype,"writableLength")},writableFinished:{__proto__:null,...t(u.prototype,"writableFinished")},writableCorked:{__proto__:null,...t(u.prototype,"writableCorked")},writableEnded:{__proto__:null,...t(u.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...t(u.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(b){this._readableState&&this._writableState&&(this._readableState.destroyed=b,this._writableState.destroyed=b)}}});let h;function l(){return h===void 0&&(h={}),h}f.fromWeb=function(b,w){return l().newStreamDuplexFromReadableWritablePair(b,w)},f.toWeb=function(b){return l().newReadableWritablePairFromDuplex(b)};let p;return f.from=function(b){return p||(p=gI()),p(b,"body")},kl}const{ObjectSetPrototypeOf:M_,Symbol:pI}=St;var x_=Zn;const{ERR_METHOD_NOT_IMPLEMENTED:bI}=fr.codes,td=Xn(),{getHighWaterMark:_I}=$u;M_(Zn.prototype,td.prototype);M_(Zn,td);const Ss=pI("kCallback");function Zn(e){if(!(this instanceof Zn))return new Zn(e);const t=e?_I(this,e,"readableHighWaterMark",!0):null;t===0&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),td.call(this,e),this._readableState.sync=!1,this[Ss]=null,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",yI)}function Oc(e){typeof this._flush=="function"&&!this.destroyed?this._flush((t,r)=>{if(t){e?e(t):this.destroy(t);return}r!=null&&this.push(r),this.push(null),e&&e()}):(this.push(null),e&&e())}function yI(){this._final!==Oc&&Oc.call(this)}Zn.prototype._final=Oc;Zn.prototype._transform=function(e,t,r){throw new bI("_transform()")};Zn.prototype._write=function(e,t,r){const o=this._readableState,s=this._writableState,u=o.length;this._transform(e,t,(f,h)=>{if(f){r(f);return}h!=null&&this.push(h),s.ended||u===o.length||o.length<o.highWaterMark?r():this[Ss]=r})};Zn.prototype._read=function(){if(this[Ss]){const e=this[Ss];this[Ss]=null,e()}};const{ObjectSetPrototypeOf:D_}=St;var j_=Po;const rd=x_;D_(Po.prototype,rd.prototype);D_(Po,rd);function Po(e){if(!(this instanceof Po))return new Po(e);rd.call(this,e)}Po.prototype._transform=function(e,t,r){r(null,e)};const vs=z.browserExports,{ArrayIsArray:wI,Promise:mI,SymbolAsyncIterator:EI,SymbolDispose:vI}=St,bu=Ai,{once:SI}=_r,RI=jo,Ap=Xn(),{aggregateTwoErrors:AI,codes:{ERR_INVALID_ARG_TYPE:Cc,ERR_INVALID_RETURN_VALUE:Fl,ERR_MISSING_ARGS:TI,ERR_STREAM_DESTROYED:II,ERR_STREAM_PREMATURE_CLOSE:OI},AbortError:CI}=fr,{validateFunction:LI,validateAbortSignal:PI}=xs,{isIterable:Fi,isReadable:Hl,isReadableNodeStream:fu,isNodeStream:Tp,isTransformStream:So,isWebStream:BI,isReadableStream:Wl,isReadableFinished:NI}=ti,$I=globalThis.AbortController||Cs().AbortController;let ql,Gl,Vl;function Ip(e,t,r){let o=!1;e.on("close",()=>{o=!0});const s=bu(e,{readable:t,writable:r},u=>{o=!u});return{destroy:u=>{o||(o=!0,RI.destroyer(e,u||new II("pipe")))},cleanup:s}}function MI(e){return LI(e[e.length-1],"streams[stream.length - 1]"),e.pop()}function zl(e){if(Fi(e))return e;if(fu(e))return xI(e);throw new Cc("val",["Readable","Iterable","AsyncIterable"],e)}async function*xI(e){Gl||(Gl=Mu()),yield*Gl.prototype[EI].call(e)}async function Xa(e,t,r,{end:o}){let s,u=null;const f=p=>{if(p&&(s=p),u){const b=u;u=null,b()}},h=()=>new mI((p,b)=>{s?b(s):u=()=>{s?b(s):p()}});t.on("drain",f);const l=bu(t,{readable:!1},f);try{t.writableNeedDrain&&await h();for await(const p of e)t.write(p)||await h();o&&(t.end(),await h()),r()}catch(p){r(s!==p?AI(s,p):p)}finally{l(),t.off("drain",f)}}async function Kl(e,t,r,{end:o}){So(t)&&(t=t.writable);const s=t.getWriter();try{for await(const u of e)await s.ready,s.write(u).catch(()=>{});await s.ready,o&&await s.close(),r()}catch(u){try{await s.abort(u),r(u)}catch(f){r(f)}}}function DI(...e){return U_(e,SI(MI(e)))}function U_(e,t,r){if(e.length===1&&wI(e[0])&&(e=e[0]),e.length<2)throw new TI("streams");const o=new $I,s=o.signal,u=r==null?void 0:r.signal,f=[];PI(u,"options.signal");function h(){x(new CI)}Vl=Vl||_r.addAbortListener;let l;u&&(l=Vl(u,h));let p,b;const w=[];let I=0;function A(P){x(P,--I===0)}function x(P,S){var m;if(P&&(!p||p.code==="ERR_STREAM_PREMATURE_CLOSE")&&(p=P),!(!p&&!S)){for(;w.length;)w.shift()(p);(m=l)===null||m===void 0||m[vI](),o.abort(),S&&(p||f.forEach(j=>j()),vs.nextTick(t,p,b))}}let v;for(let P=0;P<e.length;P++){const S=e[P],m=P<e.length-1,j=P>0,Q=m||(r==null?void 0:r.end)!==!1,ce=P===e.length-1;if(Tp(S)){let ue=function(te){te&&te.name!=="AbortError"&&te.code!=="ERR_STREAM_PREMATURE_CLOSE"&&A(te)};if(Q){const{destroy:te,cleanup:Se}=Ip(S,m,j);w.push(te),Hl(S)&&ce&&f.push(Se)}S.on("error",ue),Hl(S)&&ce&&f.push(()=>{S.removeListener("error",ue)})}if(P===0)if(typeof S=="function"){if(v=S({signal:s}),!Fi(v))throw new Fl("Iterable, AsyncIterable or Stream","source",v)}else Fi(S)||fu(S)||So(S)?v=S:v=Ap.from(S);else if(typeof S=="function"){if(So(v)){var C;v=zl((C=v)===null||C===void 0?void 0:C.readable)}else v=zl(v);if(v=S(v,{signal:s}),m){if(!Fi(v,!0))throw new Fl("AsyncIterable",`transform[${P-1}]`,v)}else{var B;ql||(ql=j_);const ue=new ql({objectMode:!0}),te=(B=v)===null||B===void 0?void 0:B.then;if(typeof te=="function")I++,te.call(v,F=>{b=F,F!=null&&ue.write(F),Q&&ue.end(),vs.nextTick(A)},F=>{ue.destroy(F),vs.nextTick(A,F)});else if(Fi(v,!0))I++,Xa(v,ue,A,{end:Q});else if(Wl(v)||So(v)){const F=v.readable||v;I++,Xa(F,ue,A,{end:Q})}else throw new Fl("AsyncIterable or Promise","destination",v);v=ue;const{destroy:Se,cleanup:me}=Ip(v,!1,!0);w.push(Se),ce&&f.push(me)}}else if(Tp(S)){if(fu(v)){I+=2;const ue=jI(v,S,A,{end:Q});Hl(S)&&ce&&f.push(ue)}else if(So(v)||Wl(v)){const ue=v.readable||v;I++,Xa(ue,S,A,{end:Q})}else if(Fi(v))I++,Xa(v,S,A,{end:Q});else throw new Cc("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],v);v=S}else if(BI(S)){if(fu(v))I++,Kl(zl(v),S,A,{end:Q});else if(Wl(v)||Fi(v))I++,Kl(v,S,A,{end:Q});else if(So(v))I++,Kl(v.readable,S,A,{end:Q});else throw new Cc("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],v);v=S}else v=Ap.from(S)}return(s!=null&&s.aborted||u!=null&&u.aborted)&&vs.nextTick(h),v}function jI(e,t,r,{end:o}){let s=!1;if(t.on("close",()=>{s||r(new OI)}),e.pipe(t,{end:!1}),o){let u=function(){s=!0,t.end()};NI(e)?vs.nextTick(u):e.once("end",u)}else r();return bu(e,{readable:!0,writable:!1},u=>{const f=e._readableState;u&&u.code==="ERR_STREAM_PREMATURE_CLOSE"&&f&&f.ended&&!f.errored&&!f.errorEmitted?e.once("end",r).once("error",r):r(u)}),bu(t,{readable:!1,writable:!0},r)}var nd={pipelineImpl:U_,pipeline:DI};const{pipeline:UI}=nd,Za=Xn(),{destroyer:kI}=jo,{isNodeStream:Qa,isReadable:Op,isWritable:Cp,isWebStream:Jl,isTransformStream:ki,isWritableStream:Lp,isReadableStream:Pp}=ti,{AbortError:FI,codes:{ERR_INVALID_ARG_VALUE:Bp,ERR_MISSING_ARGS:HI}}=fr,WI=Ai;var k_=function(...t){if(t.length===0)throw new HI("streams");if(t.length===1)return Za.from(t[0]);const r=[...t];if(typeof t[0]=="function"&&(t[0]=Za.from(t[0])),typeof t[t.length-1]=="function"){const A=t.length-1;t[A]=Za.from(t[A])}for(let A=0;A<t.length;++A)if(!(!Qa(t[A])&&!Jl(t[A]))){if(A<t.length-1&&!(Op(t[A])||Pp(t[A])||ki(t[A])))throw new Bp(`streams[${A}]`,r[A],"must be readable");if(A>0&&!(Cp(t[A])||Lp(t[A])||ki(t[A])))throw new Bp(`streams[${A}]`,r[A],"must be writable")}let o,s,u,f,h;function l(A){const x=f;f=null,x?x(A):A?h.destroy(A):!I&&!w&&h.destroy()}const p=t[0],b=UI(t,l),w=!!(Cp(p)||Lp(p)||ki(p)),I=!!(Op(b)||Pp(b)||ki(b));if(h=new Za({writableObjectMode:!!(p!=null&&p.writableObjectMode),readableObjectMode:!!(b!=null&&b.readableObjectMode),writable:w,readable:I}),w){if(Qa(p))h._write=function(x,v,C){p.write(x,v)?C():o=C},h._final=function(x){p.end(),s=x},p.on("drain",function(){if(o){const x=o;o=null,x()}});else if(Jl(p)){const v=(ki(p)?p.writable:p).getWriter();h._write=async function(C,B,P){try{await v.ready,v.write(C).catch(()=>{}),P()}catch(S){P(S)}},h._final=async function(C){try{await v.ready,v.close().catch(()=>{}),s=C}catch(B){C(B)}}}const A=ki(b)?b.readable:b;WI(A,()=>{if(s){const x=s;s=null,x()}})}if(I){if(Qa(b))b.on("readable",function(){if(u){const A=u;u=null,A()}}),b.on("end",function(){h.push(null)}),h._read=function(){for(;;){const A=b.read();if(A===null){u=h._read;return}if(!h.push(A))return}};else if(Jl(b)){const x=(ki(b)?b.readable:b).getReader();h._read=async function(){for(;;)try{const{value:v,done:C}=await x.read();if(!h.push(v))return;if(C){h.push(null);return}}catch{return}}}}return h._destroy=function(A,x){!A&&f!==null&&(A=new FI),u=null,o=null,s=null,f===null?x(A):(f=x,Qa(b)&&kI(b,A))},h};const qI=globalThis.AbortController||Cs().AbortController,{codes:{ERR_INVALID_ARG_VALUE:GI,ERR_INVALID_ARG_TYPE:Ds,ERR_MISSING_ARGS:VI,ERR_OUT_OF_RANGE:zI},AbortError:Cn}=fr,{validateAbortSignal:Ji,validateInteger:Np,validateObject:Yi}=xs,KI=St.Symbol("kWeak"),JI=St.Symbol("kResistStopPropagation"),{finished:YI}=Ai,XI=k_,{addAbortSignalNoValidate:ZI}=Nu,{isWritable:QI,isNodeStream:eO}=ti,{deprecate:tO}=_r,{ArrayPrototypePush:rO,Boolean:nO,MathFloor:$p,Number:iO,NumberIsNaN:oO,Promise:Mp,PromiseReject:xp,PromiseResolve:sO,PromisePrototypeThen:Dp,Symbol:F_}=St,_u=F_("kEmpty"),jp=F_("kEof");function aO(e,t){if(t!=null&&Yi(t,"options"),(t==null?void 0:t.signal)!=null&&Ji(t.signal,"options.signal"),eO(e)&&!QI(e))throw new GI("stream",e,"must be writable");const r=XI(this,e);return t!=null&&t.signal&&ZI(t.signal,r),r}function xu(e,t){if(typeof e!="function")throw new Ds("fn",["Function","AsyncFunction"],e);t!=null&&Yi(t,"options"),(t==null?void 0:t.signal)!=null&&Ji(t.signal,"options.signal");let r=1;(t==null?void 0:t.concurrency)!=null&&(r=$p(t.concurrency));let o=r-1;return(t==null?void 0:t.highWaterMark)!=null&&(o=$p(t.highWaterMark)),Np(r,"options.concurrency",1),Np(o,"options.highWaterMark",0),o+=r,(async function*(){const u=_r.AbortSignalAny([t==null?void 0:t.signal].filter(nO)),f=this,h=[],l={signal:u};let p,b,w=!1,I=0;function A(){w=!0,x()}function x(){I-=1,v()}function v(){b&&!w&&I<r&&h.length<o&&(b(),b=null)}async function C(){try{for await(let B of f){if(w)return;if(u.aborted)throw new Cn;try{if(B=e(B,l),B===_u)continue;B=sO(B)}catch(P){B=xp(P)}I+=1,Dp(B,x,A),h.push(B),p&&(p(),p=null),!w&&(h.length>=o||I>=r)&&await new Mp(P=>{b=P})}h.push(jp)}catch(B){const P=xp(B);Dp(P,x,A),h.push(P)}finally{w=!0,p&&(p(),p=null)}}C();try{for(;;){for(;h.length>0;){const B=await h[0];if(B===jp)return;if(u.aborted)throw new Cn;B!==_u&&(yield B),h.shift(),v()}await new Mp(B=>{p=B})}}finally{w=!0,b&&(b(),b=null)}}).call(this)}function uO(e=void 0){return e!=null&&Yi(e,"options"),(e==null?void 0:e.signal)!=null&&Ji(e.signal,"options.signal"),(async function*(){let r=0;for await(const s of this){var o;if(e!=null&&(o=e.signal)!==null&&o!==void 0&&o.aborted)throw new Cn({cause:e.signal.reason});yield[r++,s]}}).call(this)}async function H_(e,t=void 0){for await(const r of id.call(this,e,t))return!0;return!1}async function fO(e,t=void 0){if(typeof e!="function")throw new Ds("fn",["Function","AsyncFunction"],e);return!await H_.call(this,async(...r)=>!await e(...r),t)}async function lO(e,t){for await(const r of id.call(this,e,t))return r}async function cO(e,t){if(typeof e!="function")throw new Ds("fn",["Function","AsyncFunction"],e);async function r(o,s){return await e(o,s),_u}for await(const o of xu.call(this,r,t));}function id(e,t){if(typeof e!="function")throw new Ds("fn",["Function","AsyncFunction"],e);async function r(o,s){return await e(o,s)?o:_u}return xu.call(this,r,t)}class dO extends VI{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function hO(e,t,r){var o;if(typeof e!="function")throw new Ds("reducer",["Function","AsyncFunction"],e);r!=null&&Yi(r,"options"),(r==null?void 0:r.signal)!=null&&Ji(r.signal,"options.signal");let s=arguments.length>1;if(r!=null&&(o=r.signal)!==null&&o!==void 0&&o.aborted){const p=new Cn(void 0,{cause:r.signal.reason});throw this.once("error",()=>{}),await YI(this.destroy(p)),p}const u=new qI,f=u.signal;if(r!=null&&r.signal){const p={once:!0,[KI]:this,[JI]:!0};r.signal.addEventListener("abort",()=>u.abort(),p)}let h=!1;try{for await(const p of this){var l;if(h=!0,r!=null&&(l=r.signal)!==null&&l!==void 0&&l.aborted)throw new Cn;s?t=await e(t,p,{signal:f}):(t=p,s=!0)}if(!h&&!s)throw new dO}finally{u.abort()}return t}async function gO(e){e!=null&&Yi(e,"options"),(e==null?void 0:e.signal)!=null&&Ji(e.signal,"options.signal");const t=[];for await(const o of this){var r;if(e!=null&&(r=e.signal)!==null&&r!==void 0&&r.aborted)throw new Cn(void 0,{cause:e.signal.reason});rO(t,o)}return t}function pO(e,t){const r=xu.call(this,e,t);return(async function*(){for await(const s of r)yield*s}).call(this)}function W_(e){if(e=iO(e),oO(e))return 0;if(e<0)throw new zI("number",">= 0",e);return e}function bO(e,t=void 0){return t!=null&&Yi(t,"options"),(t==null?void 0:t.signal)!=null&&Ji(t.signal,"options.signal"),e=W_(e),(async function*(){var o;if(t!=null&&(o=t.signal)!==null&&o!==void 0&&o.aborted)throw new Cn;for await(const u of this){var s;if(t!=null&&(s=t.signal)!==null&&s!==void 0&&s.aborted)throw new Cn;e--<=0&&(yield u)}}).call(this)}function _O(e,t=void 0){return t!=null&&Yi(t,"options"),(t==null?void 0:t.signal)!=null&&Ji(t.signal,"options.signal"),e=W_(e),(async function*(){var o;if(t!=null&&(o=t.signal)!==null&&o!==void 0&&o.aborted)throw new Cn;for await(const u of this){var s;if(t!=null&&(s=t.signal)!==null&&s!==void 0&&s.aborted)throw new Cn;if(e-- >0&&(yield u),e<=0)return}}).call(this)}Jc.streamReturningOperators={asIndexedPairs:tO(uO,"readable.asIndexedPairs will be removed in a future version."),drop:bO,filter:id,flatMap:pO,map:xu,take:_O,compose:aO};Jc.promiseReturningOperators={every:fO,forEach:cO,reduce:hO,toArray:gO,some:H_,find:lO};var Yl,Up;function q_(){if(Up)return Yl;Up=1;const{ArrayPrototypePop:e,Promise:t}=St,{isIterable:r,isNodeStream:o,isWebStream:s}=ti,{pipelineImpl:u}=nd,{finished:f}=Ai;G_();function h(...l){return new t((p,b)=>{let w,I;const A=l[l.length-1];if(A&&typeof A=="object"&&!o(A)&&!r(A)&&!s(A)){const x=e(l);w=x.signal,I=x.end}u(l,(x,v)=>{x?b(x):p(v)},{signal:w,end:I})})}return Yl={finished:f,pipeline:h},Yl}var kp;function G_(){if(kp)return Nl.exports;kp=1;const{Buffer:e}=z.bufferPolyfill,{ObjectDefineProperty:t,ObjectKeys:r,ReflectApply:o}=St,{promisify:{custom:s}}=_r,{streamReturningOperators:u,promiseReturningOperators:f}=Jc,{codes:{ERR_ILLEGAL_CONSTRUCTOR:h}}=fr,l=k_,{setDefaultHighWaterMark:p,getDefaultHighWaterMark:b}=$u,{pipeline:w}=nd,{destroyer:I}=jo,A=Ai,x=q_(),v=ti,C=Nl.exports=Qc.Stream;C.isDestroyed=v.isDestroyed,C.isDisturbed=v.isDisturbed,C.isErrored=v.isErrored,C.isReadable=v.isReadable,C.isWritable=v.isWritable,C.Readable=Mu();for(const P of r(u)){let m=function(...j){if(new.target)throw h();return C.Readable.from(o(S,this,j))};const S=u[P];t(m,"name",{__proto__:null,value:S.name}),t(m,"length",{__proto__:null,value:S.length}),t(C.Readable.prototype,P,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}for(const P of r(f)){let m=function(...j){if(new.target)throw h();return o(S,this,j)};const S=f[P];t(m,"name",{__proto__:null,value:S.name}),t(m,"length",{__proto__:null,value:S.length}),t(C.Readable.prototype,P,{__proto__:null,value:m,enumerable:!1,configurable:!0,writable:!0})}C.Writable=ed(),C.Duplex=Xn(),C.Transform=x_,C.PassThrough=j_,C.pipeline=w;const{addAbortSignal:B}=Nu;return C.addAbortSignal=B,C.finished=A,C.destroy=I,C.compose=l,C.setDefaultHighWaterMark=p,C.getDefaultHighWaterMark=b,t(C,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return x}}),t(w,s,{__proto__:null,enumerable:!0,get(){return x.pipeline}}),t(A,s,{__proto__:null,enumerable:!0,get(){return x.finished}}),C.Stream=C,C._isUint8Array=function(S){return S instanceof Uint8Array},C._uint8ArrayToBuffer=function(S){return e.from(S.buffer,S.byteOffset,S.byteLength)},Nl.exports}(function(e){const t=G_(),r=q_(),o=t.Readable.destroy;e.exports=t.Readable,e.exports._uint8ArrayToBuffer=t._uint8ArrayToBuffer,e.exports._isUint8Array=t._isUint8Array,e.exports.isDisturbed=t.isDisturbed,e.exports.isErrored=t.isErrored,e.exports.isReadable=t.isReadable,e.exports.Readable=t.Readable,e.exports.Writable=t.Writable,e.exports.Duplex=t.Duplex,e.exports.Transform=t.Transform,e.exports.PassThrough=t.PassThrough,e.exports.addAbortSignal=t.addAbortSignal,e.exports.finished=t.finished,e.exports.destroy=t.destroy,e.exports.destroy=o,e.exports.pipeline=t.pipeline,e.exports.compose=t.compose,Object.defineProperty(t,"promises",{configurable:!0,enumerable:!0,get(){return r}}),e.exports.Stream=t.Stream,e.exports.default=e.exports})(CA);var yO={},Gi={},od={},qt={};class V_ extends TypeError{constructor(t,r){let o;const{message:s,explanation:u,...f}=t,{path:h}=t,l=h.length===0?s:`At path: ${h.join(".")} -- ${s}`;super(u??l),u!=null&&(this.cause=l),Object.assign(this,f),this.name=this.constructor.name,this.failures=()=>o??(o=[t,...r()])}}function wO(e){return Wr(e)&&typeof e[Symbol.iterator]=="function"}function Wr(e){return typeof e=="object"&&e!=null}function Fp(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Dt(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function mO(e){const{done:t,value:r}=e.next();return t?void 0:r}function EO(e,t,r,o){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:s,branch:u}=t,{type:f}=r,{refinement:h,message:l=`Expected a value of type \`${f}\`${h?` with refinement \`${h}\``:""}, but received: \`${Dt(o)}\``}=e;return{value:o,type:f,refinement:h,key:s[s.length-1],path:s,branch:u,...e,message:l}}function*Lc(e,t,r,o){wO(e)||(e=[e]);for(const s of e){const u=EO(s,t,r,o);u&&(yield u)}}function*sd(e,t,r={}){const{path:o=[],branch:s=[e],coerce:u=!1,mask:f=!1}=r,h={path:o,branch:s};if(u&&(e=t.coercer(e,h),f&&t.type!=="type"&&Wr(t.schema)&&Wr(e)&&!Array.isArray(e)))for(const p in e)t.schema[p]===void 0&&delete e[p];let l="valid";for(const p of t.validator(e,h))p.explanation=r.message,l="not_valid",yield[p,void 0];for(let[p,b,w]of t.entries(e,h)){const I=sd(b,w,{path:p===void 0?o:[...o,p],branch:p===void 0?s:[...s,b],coerce:u,mask:f,message:r.message});for(const A of I)A[0]?(l=A[0].refinement!=null?"not_refined":"not_valid",yield[A[0],void 0]):u&&(b=A[1],p===void 0?e=b:e instanceof Map?e.set(p,b):e instanceof Set?e.add(b):Wr(e)&&(b!==void 0||p in e)&&(e[p]=b))}if(l!=="not_valid")for(const p of t.refiner(e,h))p.explanation=r.message,l="not_refined",yield[p,void 0];l==="valid"&&(yield[void 0,e])}class Lt{constructor(t){const{type:r,schema:o,validator:s,refiner:u,coercer:f=l=>l,entries:h=function*(){}}=t;this.type=r,this.schema=o,this.entries=h,this.coercer=f,s?this.validator=(l,p)=>{const b=s(l,p);return Lc(b,p,this,l)}:this.validator=()=>[],u?this.refiner=(l,p)=>{const b=u(l,p);return Lc(b,p,this,l)}:this.refiner=()=>[]}assert(t,r){return z_(t,this,r)}create(t,r){return K_(t,this,r)}is(t){return ad(t,this)}mask(t,r){return J_(t,this,r)}validate(t,r={}){return Uo(t,this,r)}}function z_(e,t,r){const o=Uo(e,t,{message:r});if(o[0])throw o[0]}function K_(e,t,r){const o=Uo(e,t,{coerce:!0,message:r});if(o[0])throw o[0];return o[1]}function J_(e,t,r){const o=Uo(e,t,{coerce:!0,mask:!0,message:r});if(o[0])throw o[0];return o[1]}function ad(e,t){return!Uo(e,t)[0]}function Uo(e,t,r={}){const o=sd(e,t,r),s=mO(o);return s[0]?[new V_(s[0],function*(){for(const f of o)f[0]&&(yield f[0])}),void 0]:[void 0,s[1]]}function vO(...e){const t=e[0].type==="type",r=e.map(s=>s.schema),o=Object.assign({},...r);return t?Us(o):js(o)}function yr(e,t){return new Lt({type:e,schema:null,validator:t})}function SO(e,t){return new Lt({...e,refiner:(r,o)=>r===void 0||e.refiner(r,o),validator(r,o){return r===void 0?!0:(t(r,o),e.validator(r,o))}})}function RO(e){return new Lt({type:"dynamic",schema:null,*entries(t,r){yield*e(t,r).entries(t,r)},validator(t,r){return e(t,r).validator(t,r)},coercer(t,r){return e(t,r).coercer(t,r)},refiner(t,r){return e(t,r).refiner(t,r)}})}function AO(e){let t;return new Lt({type:"lazy",schema:null,*entries(r,o){t??(t=e()),yield*t.entries(r,o)},validator(r,o){return t??(t=e()),t.validator(r,o)},coercer(r,o){return t??(t=e()),t.coercer(r,o)},refiner(r,o){return t??(t=e()),t.refiner(r,o)}})}function TO(e,t){const{schema:r}=e,o={...r};for(const s of t)delete o[s];switch(e.type){case"type":return Us(o);default:return js(o)}}function IO(e){const t=e instanceof Lt,r=t?{...e.schema}:{...e};for(const o in r)r[o]=Y_(r[o]);return t&&e.type==="type"?Us(r):js(r)}function OO(e,t){const{schema:r}=e,o={};for(const s of t)o[s]=r[s];switch(e.type){case"type":return Us(o);default:return js(o)}}function CO(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),yr(e,t)}function LO(){return yr("any",()=>!0)}function PO(e){return new Lt({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,o]of t.entries())yield[r,o,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${Dt(t)}`}})}function BO(){return yr("bigint",e=>typeof e=="bigint")}function NO(){return yr("boolean",e=>typeof e=="boolean")}function $O(){return yr("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${Dt(e)}`)}function MO(e){const t={},r=e.map(o=>Dt(o)).join();for(const o of e)t[o]=o;return new Lt({type:"enums",schema:t,validator(o){return e.includes(o)||`Expected one of \`${r}\`, but received: ${Dt(o)}`}})}function xO(){return yr("func",e=>typeof e=="function"||`Expected a function, but received: ${Dt(e)}`)}function DO(e){return yr("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${Dt(t)}`)}function jO(){return yr("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${Dt(e)}`)}function UO(e){return new Lt({type:"intersection",schema:null,*entries(t,r){for(const o of e)yield*o.entries(t,r)},*validator(t,r){for(const o of e)yield*o.validator(t,r)},*refiner(t,r){for(const o of e)yield*o.refiner(t,r)}})}function kO(e){const t=Dt(e),r=typeof e;return new Lt({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(o){return o===e||`Expected the literal \`${t}\`, but received: ${Dt(o)}`}})}function FO(e,t){return new Lt({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[o,s]of r.entries())yield[o,o,e],yield[o,s,t]},coercer(r){return r instanceof Map?new Map(r):r},validator(r){return r instanceof Map||`Expected a \`Map\` object, but received: ${Dt(r)}`}})}function ud(){return yr("never",()=>!1)}function HO(e){return new Lt({...e,validator:(t,r)=>t===null||e.validator(t,r),refiner:(t,r)=>t===null||e.refiner(t,r)})}function WO(){return yr("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${Dt(e)}`)}function js(e){const t=e?Object.keys(e):[],r=ud();return new Lt({type:"object",schema:e||null,*entries(o){if(e&&Wr(o)){const s=new Set(Object.keys(o));for(const u of t)s.delete(u),yield[u,o[u],e[u]];for(const u of s)yield[u,o[u],r]}},validator(o){return Wr(o)||`Expected an object, but received: ${Dt(o)}`},coercer(o){return Wr(o)?{...o}:o}})}function Y_(e){return new Lt({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function qO(e,t){return new Lt({type:"record",schema:null,*entries(r){if(Wr(r))for(const o in r){const s=r[o];yield[o,o,e],yield[o,s,t]}},validator(r){return Wr(r)||`Expected an object, but received: ${Dt(r)}`}})}function GO(){return yr("regexp",e=>e instanceof RegExp)}function VO(e){return new Lt({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer(t){return t instanceof Set?new Set(t):t},validator(t){return t instanceof Set||`Expected a \`Set\` object, but received: ${Dt(t)}`}})}function X_(){return yr("string",e=>typeof e=="string"||`Expected a string, but received: ${Dt(e)}`)}function zO(e){const t=ud();return new Lt({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const o=Math.max(e.length,r.length);for(let s=0;s<o;s++)yield[s,r[s],e[s]||t]}},validator(r){return Array.isArray(r)||`Expected an array, but received: ${Dt(r)}`}})}function Us(e){const t=Object.keys(e);return new Lt({type:"type",schema:e,*entries(r){if(Wr(r))for(const o of t)yield[o,r[o],e[o]]},validator(r){return Wr(r)||`Expected an object, but received: ${Dt(r)}`},coercer(r){return Wr(r)?{...r}:r}})}function KO(e){const t=e.map(r=>r.type).join(" | ");return new Lt({type:"union",schema:null,coercer(r){for(const o of e){const[s,u]=o.validate(r,{coerce:!0});if(!s)return u}return r},validator(r,o){const s=[];for(const u of e){const[...f]=sd(r,u,o),[h]=f;if(h[0])for(const[l]of f)l&&s.push(l);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${Dt(r)}`,...s]}})}function Z_(){return yr("unknown",()=>!0)}function fd(e,t,r){return new Lt({...e,coercer:(o,s)=>ad(o,t)?e.coercer(r(o,s),s):e.coercer(o,s)})}function JO(e,t,r={}){return fd(e,Z_(),o=>{const s=typeof t=="function"?t():t;if(o===void 0)return s;if(!r.strict&&Fp(o)&&Fp(s)){const u={...o};let f=!1;for(const h in s)u[h]===void 0&&(u[h]=s[h],f=!0);if(f)return u}return o})}function YO(e){return fd(e,X_(),t=>t.trim())}function XO(e){return Xi(e,"empty",t=>{const r=Q_(t);return r===0||`Expected an empty ${e.type} but received one with a size of \`${r}\``})}function Q_(e){return e instanceof Map||e instanceof Set?e.size:e.length}function ZO(e,t,r={}){const{exclusive:o}=r;return Xi(e,"max",s=>o?s<t:s<=t||`Expected a ${e.type} less than ${o?"":"or equal to "}${t} but received \`${s}\``)}function QO(e,t,r={}){const{exclusive:o}=r;return Xi(e,"min",s=>o?s>t:s>=t||`Expected a ${e.type} greater than ${o?"":"or equal to "}${t} but received \`${s}\``)}function e2(e){return Xi(e,"nonempty",t=>Q_(t)>0||`Expected a nonempty ${e.type} but received an empty one`)}function t2(e,t){return Xi(e,"pattern",r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`)}function r2(e,t,r=t){const o=`Expected a ${e.type}`,s=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return Xi(e,"size",u=>{if(typeof u=="number"||u instanceof Date)return t<=u&&u<=r||`${o} ${s} but received \`${u}\``;if(u instanceof Map||u instanceof Set){const{size:f}=u;return t<=f&&f<=r||`${o} with a size ${s} but received one with a size of \`${f}\``}else{const{length:f}=u;return t<=f&&f<=r||`${o} with a length ${s} but received one with a length of \`${f}\``}})}function Xi(e,t,r){return new Lt({...e,*refiner(o,s){yield*e.refiner(o,s);const u=r(o,s),f=Lc(u,s,e,o);for(const h of f)yield{...h,refinement:t}}})}const n2=Object.freeze(Object.defineProperty({__proto__:null,Struct:Lt,StructError:V_,any:LO,array:PO,assert:z_,assign:vO,bigint:BO,boolean:NO,coerce:fd,create:K_,date:$O,defaulted:JO,define:yr,deprecated:SO,dynamic:RO,empty:XO,enums:MO,func:xO,instance:DO,integer:jO,intersection:UO,is:ad,lazy:AO,literal:kO,map:FO,mask:J_,max:ZO,min:QO,never:ud,nonempty:e2,nullable:HO,number:WO,object:js,omit:TO,optional:Y_,partial:IO,pattern:t2,pick:OO,record:qO,refine:Xi,regexp:GO,set:VO,size:r2,string:X_,struct:CO,trimmed:YO,tuple:zO,type:Us,union:KO,unknown:Z_,validate:Uo},Symbol.toStringTag,{value:"Module"})),Zi=z.getAugmentedNamespace(n2);Object.defineProperty(qt,"__esModule",{value:!0});qt.assertExhaustive=qt.assertStruct=qt.assert=qt.AssertionError=void 0;const i2=Zi;function o2(e){return typeof e=="object"&&e!==null&&"message"in e}function s2(e){var t,r;return typeof((r=(t=e==null?void 0:e.prototype)===null||t===void 0?void 0:t.constructor)===null||r===void 0?void 0:r.name)=="string"}function a2(e){const t=o2(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}function ey(e,t){return s2(e)?new e({message:t}):e({message:t})}class ld extends Error{constructor(t){super(t.message),this.code="ERR_ASSERTION"}}qt.AssertionError=ld;function u2(e,t="Assertion failed.",r=ld){if(!e)throw t instanceof Error?t:ey(r,t)}qt.assert=u2;function f2(e,t,r="Assertion failed",o=ld){try{(0,i2.assert)(e,t)}catch(s){throw ey(o,`${r}: ${a2(s)}.`)}}qt.assertStruct=f2;function l2(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}qt.assertExhaustive=l2;var ks={};Object.defineProperty(ks,"__esModule",{value:!0});ks.base64=void 0;const c2=Zi,d2=qt,h2=(e,t={})=>{var r,o;const s=(r=t.paddingRequired)!==null&&r!==void 0?r:!1,u=(o=t.characterSet)!==null&&o!==void 0?o:"base64";let f;u==="base64"?f=String.raw`[A-Za-z0-9+\/]`:((0,d2.assert)(u==="base64url"),f=String.raw`[-_A-Za-z0-9]`);let h;return s?h=new RegExp(`^(?:${f}{4})*(?:${f}{3}=|${f}{2}==)?$`,"u"):h=new RegExp(`^(?:${f}{4})*(?:${f}{2,3}|${f}{3}=|${f}{2}==)?$`,"u"),(0,c2.pattern)(e,h)};ks.base64=h2;var Qe={},Fs={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.remove0x=e.add0x=e.assertIsStrictHexString=e.assertIsHexString=e.isStrictHexString=e.isHexString=e.StrictHexStruct=e.HexStruct=void 0;const t=Zi,r=qt;e.HexStruct=(0,t.pattern)((0,t.string)(),/^(?:0x)?[0-9a-f]+$/iu),e.StrictHexStruct=(0,t.pattern)((0,t.string)(),/^0x[0-9a-f]+$/iu);function o(p){return(0,t.is)(p,e.HexStruct)}e.isHexString=o;function s(p){return(0,t.is)(p,e.StrictHexStruct)}e.isStrictHexString=s;function u(p){(0,r.assert)(o(p),"Value must be a hexadecimal string.")}e.assertIsHexString=u;function f(p){(0,r.assert)(s(p),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=f;function h(p){return p.startsWith("0x")?p:p.startsWith("0X")?`0x${p.substring(2)}`:`0x${p}`}e.add0x=h;function l(p){return p.startsWith("0x")||p.startsWith("0X")?p.substring(2):p}e.remove0x=l})(Fs);Object.defineProperty(Qe,"__esModule",{value:!0});Qe.createDataView=Qe.concatBytes=Qe.valueToBytes=Qe.stringToBytes=Qe.numberToBytes=Qe.signedBigIntToBytes=Qe.bigIntToBytes=Qe.hexToBytes=Qe.bytesToString=Qe.bytesToNumber=Qe.bytesToSignedBigInt=Qe.bytesToBigInt=Qe.bytesToHex=Qe.assertIsBytes=Qe.isBytes=void 0;const Or=qt,Pc=Fs,Hp=48,Wp=58,qp=87;function g2(){const e=[];return()=>{if(e.length===0)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}const p2=g2();function cd(e){return e instanceof Uint8Array}Qe.isBytes=cd;function ko(e){(0,Or.assert)(cd(e),"Value must be a Uint8Array.")}Qe.assertIsBytes=ko;function ty(e){if(ko(e),e.length===0)return"0x";const t=p2(),r=new Array(e.length);for(let o=0;o<e.length;o++)r[o]=t[e[o]];return(0,Pc.add0x)(r.join(""))}Qe.bytesToHex=ty;function ry(e){ko(e);const t=ty(e);return BigInt(t)}Qe.bytesToBigInt=ry;function b2(e){ko(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(e.length*8,t)}Qe.bytesToSignedBigInt=b2;function _2(e){ko(e);const t=ry(e);return(0,Or.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)}Qe.bytesToNumber=_2;function y2(e){return ko(e),new TextDecoder().decode(e)}Qe.bytesToString=y2;function Du(e){var t;if(((t=e==null?void 0:e.toLowerCase)===null||t===void 0?void 0:t.call(e))==="0x")return new Uint8Array;(0,Pc.assertIsHexString)(e);const r=(0,Pc.remove0x)(e).toLowerCase(),o=r.length%2===0?r:`0${r}`,s=new Uint8Array(o.length/2);for(let u=0;u<s.length;u++){const f=o.charCodeAt(u*2),h=o.charCodeAt(u*2+1),l=f-(f<Wp?Hp:qp),p=h-(h<Wp?Hp:qp);s[u]=l*16+p}return s}Qe.hexToBytes=Du;function ny(e){(0,Or.assert)(typeof e=="bigint","Value must be a bigint."),(0,Or.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");const t=e.toString(16);return Du(t)}Qe.bigIntToBytes=ny;function w2(e,t){(0,Or.assert)(t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(t*8+-1))}function m2(e,t){(0,Or.assert)(typeof e=="bigint","Value must be a bigint."),(0,Or.assert)(typeof t=="number","Byte length must be a number."),(0,Or.assert)(t>0,"Byte length must be greater than 0."),(0,Or.assert)(w2(e,t),"Byte length is too small to represent the given value.");let r=e;const o=new Uint8Array(t);for(let s=0;s<o.length;s++)o[s]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return o.reverse()}Qe.signedBigIntToBytes=m2;function iy(e){(0,Or.assert)(typeof e=="number","Value must be a number."),(0,Or.assert)(e>=0,"Value must be a non-negative number."),(0,Or.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");const t=e.toString(16);return Du(t)}Qe.numberToBytes=iy;function oy(e){return(0,Or.assert)(typeof e=="string","Value must be a string."),new TextEncoder().encode(e)}Qe.stringToBytes=oy;function sy(e){if(typeof e=="bigint")return ny(e);if(typeof e=="number")return iy(e);if(typeof e=="string")return e.startsWith("0x")?Du(e):oy(e);if(cd(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}Qe.valueToBytes=sy;function E2(e){const t=new Array(e.length);let r=0;for(let s=0;s<e.length;s++){const u=sy(e[s]);t[s]=u,r+=u.length}const o=new Uint8Array(r);for(let s=0,u=0;s<t.length;s++)o.set(t[s],u),u+=t[s].length;return o}Qe.concatBytes=E2;function v2(e){if(typeof z.dist.Buffer<"u"&&e instanceof z.dist.Buffer){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}Qe.createDataView=v2;var ju={};Object.defineProperty(ju,"__esModule",{value:!0});ju.ChecksumStruct=void 0;const Gp=Zi,S2=ks;ju.ChecksumStruct=(0,Gp.size)((0,S2.base64)((0,Gp.string)(),{paddingRequired:!0}),44,44);var Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.createHex=Sn.createBytes=Sn.createBigInt=Sn.createNumber=void 0;const vt=Zi,R2=qt,ay=Qe,Uu=Fs,uy=(0,vt.union)([(0,vt.number)(),(0,vt.bigint)(),(0,vt.string)(),Uu.StrictHexStruct]),A2=(0,vt.coerce)((0,vt.number)(),uy,Number),T2=(0,vt.coerce)((0,vt.bigint)(),uy,BigInt);(0,vt.union)([Uu.StrictHexStruct,(0,vt.instance)(Uint8Array)]);const I2=(0,vt.coerce)((0,vt.instance)(Uint8Array),(0,vt.union)([Uu.StrictHexStruct]),ay.hexToBytes),O2=(0,vt.coerce)(Uu.StrictHexStruct,(0,vt.instance)(Uint8Array),ay.bytesToHex);function C2(e){try{const t=(0,vt.create)(e,A2);return(0,R2.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){throw t instanceof vt.StructError?new Error(`Expected a number-like value, got "${e}".`):t}}Sn.createNumber=C2;function L2(e){try{return(0,vt.create)(e,T2)}catch(t){throw t instanceof vt.StructError?new Error(`Expected a number-like value, got "${String(t.value)}".`):t}}Sn.createBigInt=L2;function P2(e){if(typeof e=="string"&&e.toLowerCase()==="0x")return new Uint8Array;try{return(0,vt.create)(e,I2)}catch(t){throw t instanceof vt.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}Sn.createBytes=P2;function B2(e){if(e instanceof Uint8Array&&e.length===0||typeof e=="string"&&e.toLowerCase()==="0x")return"0x";try{return(0,vt.create)(e,O2)}catch(t){throw t instanceof vt.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}Sn.createHex=B2;var Bo={},fy=z.commonjsGlobal&&z.commonjsGlobal.__classPrivateFieldSet||function(e,t,r,o,s){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r},ur=z.commonjsGlobal&&z.commonjsGlobal.__classPrivateFieldGet||function(e,t,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(e):o?o.value:t.get(e)},rn,mn;Object.defineProperty(Bo,"__esModule",{value:!0});Bo.FrozenSet=Bo.FrozenMap=void 0;class dd{constructor(t){rn.set(this,void 0),fy(this,rn,new Map(t),"f"),Object.freeze(this)}get size(){return ur(this,rn,"f").size}[(rn=new WeakMap,Symbol.iterator)](){return ur(this,rn,"f")[Symbol.iterator]()}entries(){return ur(this,rn,"f").entries()}forEach(t,r){return ur(this,rn,"f").forEach((o,s,u)=>t.call(r,o,s,this))}get(t){return ur(this,rn,"f").get(t)}has(t){return ur(this,rn,"f").has(t)}keys(){return ur(this,rn,"f").keys()}values(){return ur(this,rn,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([t,r])=>`${String(t)} => ${String(r)}`).join(", ")} `:""}}`}}Bo.FrozenMap=dd;class hd{constructor(t){mn.set(this,void 0),fy(this,mn,new Set(t),"f"),Object.freeze(this)}get size(){return ur(this,mn,"f").size}[(mn=new WeakMap,Symbol.iterator)](){return ur(this,mn,"f")[Symbol.iterator]()}entries(){return ur(this,mn,"f").entries()}forEach(t,r){return ur(this,mn,"f").forEach((o,s,u)=>t.call(r,o,s,this))}has(t){return ur(this,mn,"f").has(t)}keys(){return ur(this,mn,"f").keys()}values(){return ur(this,mn,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(t=>String(t)).join(", ")} `:""}}`}}Bo.FrozenSet=hd;Object.freeze(dd);Object.freeze(dd.prototype);Object.freeze(hd);Object.freeze(hd.prototype);var ly={};Object.defineProperty(ly,"__esModule",{value:!0});var cy={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getJsonRpcIdValidator=e.assertIsJsonRpcError=e.isJsonRpcError=e.assertIsJsonRpcFailure=e.isJsonRpcFailure=e.assertIsJsonRpcSuccess=e.isJsonRpcSuccess=e.assertIsJsonRpcResponse=e.isJsonRpcResponse=e.assertIsPendingJsonRpcResponse=e.isPendingJsonRpcResponse=e.JsonRpcResponseStruct=e.JsonRpcFailureStruct=e.JsonRpcSuccessStruct=e.PendingJsonRpcResponseStruct=e.assertIsJsonRpcRequest=e.isJsonRpcRequest=e.assertIsJsonRpcNotification=e.isJsonRpcNotification=e.JsonRpcNotificationStruct=e.JsonRpcRequestStruct=e.JsonRpcParamsStruct=e.JsonRpcErrorStruct=e.JsonRpcIdStruct=e.JsonRpcVersionStruct=e.jsonrpc2=e.getJsonSize=e.isValidJson=e.JsonStruct=e.UnsafeJsonStruct=void 0;const t=Zi,r=qt,o=()=>(0,t.define)("finite number",j=>(0,t.is)(j,(0,t.number)())&&Number.isFinite(j));e.UnsafeJsonStruct=(0,t.union)([(0,t.literal)(null),(0,t.boolean)(),o(),(0,t.string)(),(0,t.array)((0,t.lazy)(()=>e.UnsafeJsonStruct)),(0,t.record)((0,t.string)(),(0,t.lazy)(()=>e.UnsafeJsonStruct))]),e.JsonStruct=(0,t.define)("Json",(j,Q)=>{function ce(ue,te){const me=[...te.validator(ue,Q)];return me.length>0?me:!0}try{const ue=ce(j,e.UnsafeJsonStruct);return ue!==!0?ue:ce(JSON.parse(JSON.stringify(j)),e.UnsafeJsonStruct)}catch(ue){return ue instanceof RangeError?"Circular reference detected":!1}});function s(j){return(0,t.is)(j,e.JsonStruct)}e.isValidJson=s;function u(j){(0,r.assertStruct)(j,e.JsonStruct,"Invalid JSON value");const Q=JSON.stringify(j);return new TextEncoder().encode(Q).byteLength}e.getJsonSize=u,e.jsonrpc2="2.0",e.JsonRpcVersionStruct=(0,t.literal)(e.jsonrpc2),e.JsonRpcIdStruct=(0,t.nullable)((0,t.union)([(0,t.number)(),(0,t.string)()])),e.JsonRpcErrorStruct=(0,t.object)({code:(0,t.integer)(),message:(0,t.string)(),data:(0,t.optional)(e.JsonStruct),stack:(0,t.optional)((0,t.string)())}),e.JsonRpcParamsStruct=(0,t.optional)((0,t.union)([(0,t.record)((0,t.string)(),e.JsonStruct),(0,t.array)(e.JsonStruct)])),e.JsonRpcRequestStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,method:(0,t.string)(),params:e.JsonRpcParamsStruct}),e.JsonRpcNotificationStruct=(0,t.omit)(e.JsonRpcRequestStruct,["id"]);function f(j){return(0,t.is)(j,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=f;function h(j,Q){(0,r.assertStruct)(j,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",Q)}e.assertIsJsonRpcNotification=h;function l(j){return(0,t.is)(j,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=l;function p(j,Q){(0,r.assertStruct)(j,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",Q)}e.assertIsJsonRpcRequest=p,e.PendingJsonRpcResponseStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:(0,t.optional)((0,t.unknown)()),error:(0,t.optional)(e.JsonRpcErrorStruct)}),e.JsonRpcSuccessStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,result:e.JsonStruct}),e.JsonRpcFailureStruct=(0,t.object)({id:e.JsonRpcIdStruct,jsonrpc:e.JsonRpcVersionStruct,error:e.JsonRpcErrorStruct}),e.JsonRpcResponseStruct=(0,t.union)([e.JsonRpcSuccessStruct,e.JsonRpcFailureStruct]);function b(j){return(0,t.is)(j,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=b;function w(j,Q){(0,r.assertStruct)(j,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",Q)}e.assertIsPendingJsonRpcResponse=w;function I(j){return(0,t.is)(j,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=I;function A(j,Q){(0,r.assertStruct)(j,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",Q)}e.assertIsJsonRpcResponse=A;function x(j){return(0,t.is)(j,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=x;function v(j,Q){(0,r.assertStruct)(j,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",Q)}e.assertIsJsonRpcSuccess=v;function C(j){return(0,t.is)(j,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=C;function B(j,Q){(0,r.assertStruct)(j,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",Q)}e.assertIsJsonRpcFailure=B;function P(j){return(0,t.is)(j,e.JsonRpcErrorStruct)}e.isJsonRpcError=P;function S(j,Q){(0,r.assertStruct)(j,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",Q)}e.assertIsJsonRpcError=S;function m(j){const{permitEmptyString:Q,permitFractions:ce,permitNull:ue}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},j);return Se=>!!(typeof Se=="number"&&(ce||Number.isInteger(Se))||typeof Se=="string"&&(Q||Se.length>0)||ue&&Se===null)}e.getJsonRpcIdValidator=m})(cy);var dy={};Object.defineProperty(dy,"__esModule",{value:!0});var No={},N2=z.commonjsGlobal&&z.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(No,"__esModule",{value:!0});No.createModuleLogger=No.createProjectLogger=void 0;const $2=N2(vA),M2=(0,$2.default)("metamask");function x2(e){return M2.extend(e)}No.createProjectLogger=x2;function D2(e,t){return e.extend(t)}No.createModuleLogger=D2;var hy={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateNumberSize=e.calculateStringSize=e.isASCII=e.isPlainObject=e.ESCAPE_CHARACTERS_REGEXP=e.JsonSize=e.hasProperty=e.isObject=e.isNullOrUndefined=e.isNonEmptyArray=void 0;function t(p){return Array.isArray(p)&&p.length>0}e.isNonEmptyArray=t;function r(p){return p==null}e.isNullOrUndefined=r;function o(p){return!!p&&typeof p=="object"&&!Array.isArray(p)}e.isObject=o;const s=(p,b)=>Object.hasOwnProperty.call(p,b);e.hasProperty=s,function(p){p[p.Null=4]="Null",p[p.Comma=1]="Comma",p[p.Wrapper=1]="Wrapper",p[p.True=4]="True",p[p.False=5]="False",p[p.Quote=1]="Quote",p[p.Colon=1]="Colon",p[p.Date=24]="Date"}(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function u(p){if(typeof p!="object"||p===null)return!1;try{let b=p;for(;Object.getPrototypeOf(b)!==null;)b=Object.getPrototypeOf(b);return Object.getPrototypeOf(p)===b}catch{return!1}}e.isPlainObject=u;function f(p){return p.charCodeAt(0)<=127}e.isASCII=f;function h(p){var b;return p.split("").reduce((I,A)=>f(A)?I+1:I+2,0)+((b=p.match(e.ESCAPE_CHARACTERS_REGEXP))!==null&&b!==void 0?b:[]).length}e.calculateStringSize=h;function l(p){return p.toString().length}e.calculateNumberSize=l})(hy);var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.hexToBigInt=Rn.hexToNumber=Rn.bigIntToHex=Rn.numberToHex=void 0;const Io=qt,Ls=Fs,j2=e=>((0,Io.assert)(typeof e=="number","Value must be a number."),(0,Io.assert)(e>=0,"Value must be a non-negative number."),(0,Io.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,Ls.add0x)(e.toString(16)));Rn.numberToHex=j2;const U2=e=>((0,Io.assert)(typeof e=="bigint","Value must be a bigint."),(0,Io.assert)(e>=0,"Value must be a non-negative bigint."),(0,Ls.add0x)(e.toString(16)));Rn.bigIntToHex=U2;const k2=e=>{(0,Ls.assertIsHexString)(e);const t=parseInt(e,16);return(0,Io.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};Rn.hexToNumber=k2;const F2=e=>((0,Ls.assertIsHexString)(e),BigInt((0,Ls.add0x)(e)));Rn.hexToBigInt=F2;var gy={};Object.defineProperty(gy,"__esModule",{value:!0});var py={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,function(u){u[u.Millisecond=1]="Millisecond",u[u.Second=1e3]="Second",u[u.Minute=6e4]="Minute",u[u.Hour=36e5]="Hour",u[u.Day=864e5]="Day",u[u.Week=6048e5]="Week",u[u.Year=31536e6]="Year"}(e.Duration||(e.Duration={}));const t=u=>Number.isInteger(u)&&u>=0,r=(u,f)=>{if(!t(u))throw new Error(`"${f}" must be a non-negative integer. Received: "${u}".`)};function o(u,f){return r(u,"count"),u*f}e.inMilliseconds=o;function s(u){return r(u,"timestamp"),Date.now()-u}e.timeSince=s})(py);var by={};Object.defineProperty(by,"__esModule",{value:!0});var _y={},Bc={exports:{}};const H2="2.0.0",yy=256,W2=Number.MAX_SAFE_INTEGER||9007199254740991,q2=16,G2=yy-6,V2=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var ku={MAX_LENGTH:yy,MAX_SAFE_COMPONENT_LENGTH:q2,MAX_SAFE_BUILD_LENGTH:G2,MAX_SAFE_INTEGER:W2,RELEASE_TYPES:V2,SEMVER_SPEC_VERSION:H2,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const z2=typeof z.dist.process=="object"&&z.dist.process.env&&z.dist.process.env.NODE_DEBUG&&/\bsemver\b/i.test(z.dist.process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Fu=z2;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:s}=ku,u=Fu;t=e.exports={};const f=t.re=[],h=t.safeRe=[],l=t.src=[],p=t.safeSrc=[],b=t.t={};let w=0;const I="[a-zA-Z0-9-]",A=[["\\s",1],["\\d",s],[I,o]],x=C=>{for(const[B,P]of A)C=C.split(`${B}*`).join(`${B}{0,${P}}`).split(`${B}+`).join(`${B}{1,${P}}`);return C},v=(C,B,P)=>{const S=x(B),m=w++;u(C,m,B),b[C]=m,l[m]=B,p[m]=S,f[m]=new RegExp(B,P?"g":void 0),h[m]=new RegExp(S,P?"g":void 0)};v("NUMERICIDENTIFIER","0|[1-9]\\d*"),v("NUMERICIDENTIFIERLOOSE","\\d+"),v("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${I}*`),v("MAINVERSION",`(${l[b.NUMERICIDENTIFIER]})\\.(${l[b.NUMERICIDENTIFIER]})\\.(${l[b.NUMERICIDENTIFIER]})`),v("MAINVERSIONLOOSE",`(${l[b.NUMERICIDENTIFIERLOOSE]})\\.(${l[b.NUMERICIDENTIFIERLOOSE]})\\.(${l[b.NUMERICIDENTIFIERLOOSE]})`),v("PRERELEASEIDENTIFIER",`(?:${l[b.NUMERICIDENTIFIER]}|${l[b.NONNUMERICIDENTIFIER]})`),v("PRERELEASEIDENTIFIERLOOSE",`(?:${l[b.NUMERICIDENTIFIERLOOSE]}|${l[b.NONNUMERICIDENTIFIER]})`),v("PRERELEASE",`(?:-(${l[b.PRERELEASEIDENTIFIER]}(?:\\.${l[b.PRERELEASEIDENTIFIER]})*))`),v("PRERELEASELOOSE",`(?:-?(${l[b.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[b.PRERELEASEIDENTIFIERLOOSE]})*))`),v("BUILDIDENTIFIER",`${I}+`),v("BUILD",`(?:\\+(${l[b.BUILDIDENTIFIER]}(?:\\.${l[b.BUILDIDENTIFIER]})*))`),v("FULLPLAIN",`v?${l[b.MAINVERSION]}${l[b.PRERELEASE]}?${l[b.BUILD]}?`),v("FULL",`^${l[b.FULLPLAIN]}$`),v("LOOSEPLAIN",`[v=\\s]*${l[b.MAINVERSIONLOOSE]}${l[b.PRERELEASELOOSE]}?${l[b.BUILD]}?`),v("LOOSE",`^${l[b.LOOSEPLAIN]}$`),v("GTLT","((?:<|>)?=?)"),v("XRANGEIDENTIFIERLOOSE",`${l[b.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),v("XRANGEIDENTIFIER",`${l[b.NUMERICIDENTIFIER]}|x|X|\\*`),v("XRANGEPLAIN",`[v=\\s]*(${l[b.XRANGEIDENTIFIER]})(?:\\.(${l[b.XRANGEIDENTIFIER]})(?:\\.(${l[b.XRANGEIDENTIFIER]})(?:${l[b.PRERELEASE]})?${l[b.BUILD]}?)?)?`),v("XRANGEPLAINLOOSE",`[v=\\s]*(${l[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[b.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[b.XRANGEIDENTIFIERLOOSE]})(?:${l[b.PRERELEASELOOSE]})?${l[b.BUILD]}?)?)?`),v("XRANGE",`^${l[b.GTLT]}\\s*${l[b.XRANGEPLAIN]}$`),v("XRANGELOOSE",`^${l[b.GTLT]}\\s*${l[b.XRANGEPLAINLOOSE]}$`),v("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),v("COERCE",`${l[b.COERCEPLAIN]}(?:$|[^\\d])`),v("COERCEFULL",l[b.COERCEPLAIN]+`(?:${l[b.PRERELEASE]})?(?:${l[b.BUILD]})?(?:$|[^\\d])`),v("COERCERTL",l[b.COERCE],!0),v("COERCERTLFULL",l[b.COERCEFULL],!0),v("LONETILDE","(?:~>?)"),v("TILDETRIM",`(\\s*)${l[b.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",v("TILDE",`^${l[b.LONETILDE]}${l[b.XRANGEPLAIN]}$`),v("TILDELOOSE",`^${l[b.LONETILDE]}${l[b.XRANGEPLAINLOOSE]}$`),v("LONECARET","(?:\\^)"),v("CARETTRIM",`(\\s*)${l[b.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",v("CARET",`^${l[b.LONECARET]}${l[b.XRANGEPLAIN]}$`),v("CARETLOOSE",`^${l[b.LONECARET]}${l[b.XRANGEPLAINLOOSE]}$`),v("COMPARATORLOOSE",`^${l[b.GTLT]}\\s*(${l[b.LOOSEPLAIN]})$|^$`),v("COMPARATOR",`^${l[b.GTLT]}\\s*(${l[b.FULLPLAIN]})$|^$`),v("COMPARATORTRIM",`(\\s*)${l[b.GTLT]}\\s*(${l[b.LOOSEPLAIN]}|${l[b.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",v("HYPHENRANGE",`^\\s*(${l[b.XRANGEPLAIN]})\\s+-\\s+(${l[b.XRANGEPLAIN]})\\s*$`),v("HYPHENRANGELOOSE",`^\\s*(${l[b.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[b.XRANGEPLAINLOOSE]})\\s*$`),v("STAR","(<|>)?=?\\s*\\*"),v("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),v("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Bc,Bc.exports);var Hs=Bc.exports;const K2=Object.freeze({loose:!0}),J2=Object.freeze({}),Y2=e=>e?typeof e!="object"?K2:e:J2;var gd=Y2;const Vp=/^[0-9]+$/,wy=(e,t)=>{const r=Vp.test(e),o=Vp.test(t);return r&&o&&(e=+e,t=+t),e===t?0:r&&!o?-1:o&&!r?1:e<t?-1:1},X2=(e,t)=>wy(t,e);var my={compareIdentifiers:wy,rcompareIdentifiers:X2};const eu=Fu,{MAX_LENGTH:zp,MAX_SAFE_INTEGER:tu}=ku,{safeRe:Kp,safeSrc:Jp,t:ru}=Hs,Z2=gd,{compareIdentifiers:mo}=my;let Q2=class En{constructor(t,r){if(r=Z2(r),t instanceof En){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>zp)throw new TypeError(`version is longer than ${zp} characters`);eu("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const o=t.trim().match(r.loose?Kp[ru.LOOSE]:Kp[ru.FULL]);if(!o)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>tu||this.major<0)throw new TypeError("Invalid major version");if(this.minor>tu||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>tu||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const u=+s;if(u>=0&&u<tu)return u}return s}):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(eu("SemVer.compare",this.version,this.options,t),!(t instanceof En)){if(typeof t=="string"&&t===this.version)return 0;t=new En(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof En||(t=new En(t,this.options)),mo(this.major,t.major)||mo(this.minor,t.minor)||mo(this.patch,t.patch)}comparePre(t){if(t instanceof En||(t=new En(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{const o=this.prerelease[r],s=t.prerelease[r];if(eu("prerelease compare",r,o,s),o===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(o===void 0)return-1;if(o===s)continue;return mo(o,s)}while(++r)}compareBuild(t){t instanceof En||(t=new En(t,this.options));let r=0;do{const o=this.build[r],s=t.build[r];if(eu("build compare",r,o,s),o===void 0&&s===void 0)return 0;if(s===void 0)return 1;if(o===void 0)return-1;if(o===s)continue;return mo(o,s)}while(++r)}inc(t,r,o){if(t.startsWith("pre")){if(!r&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(r){const s=new RegExp(`^${this.options.loose?Jp[ru.PRERELEASELOOSE]:Jp[ru.PRERELEASE]}$`),u=`-${r}`.match(s);if(!u||u[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,o),this.inc("pre",r,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,o),this.inc("pre",r,o);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const s=Number(o)?1:0;if(this.prerelease.length===0)this.prerelease=[s];else{let u=this.prerelease.length;for(;--u>=0;)typeof this.prerelease[u]=="number"&&(this.prerelease[u]++,u=-2);if(u===-1){if(r===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let u=[r,s];o===!1&&(u=[r]),mo(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=u):this.prerelease=u}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var Ws=Q2;const Yp=Ws,eC=(e,t,r=!1)=>{if(e instanceof Yp)return e;try{return new Yp(e,t)}catch(o){if(!r)return null;throw o}};var tC=eC;const rC=tC,nC=(e,t)=>{const r=rC(e,t);return r?r.version:null};var iC=nC;const Xp=Ws,oC=(e,t,r)=>new Xp(e,r).compare(new Xp(t,r));var Fo=oC;const sC=Fo,aC=(e,t,r)=>sC(e,t,r)>0;var pd=aC;const uC=Fo,fC=(e,t,r)=>uC(e,t,r)<0;var Ey=fC;const lC=Fo,cC=(e,t,r)=>lC(e,t,r)===0;var dC=cC;const hC=Fo,gC=(e,t,r)=>hC(e,t,r)!==0;var pC=gC;const bC=Fo,_C=(e,t,r)=>bC(e,t,r)>=0;var vy=_C;const yC=Fo,wC=(e,t,r)=>yC(e,t,r)<=0;var Sy=wC;const mC=dC,EC=pC,vC=pd,SC=vy,RC=Ey,AC=Sy,TC=(e,t,r,o)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return mC(e,r,o);case"!=":return EC(e,r,o);case">":return vC(e,r,o);case">=":return SC(e,r,o);case"<":return RC(e,r,o);case"<=":return AC(e,r,o);default:throw new TypeError(`Invalid operator: ${t}`)}};var IC=TC;const{safeRe:DN,t:jN}=Hs;class OC{constructor(){this.max=1e3,this.map=new Map}get(t){const r=this.map.get(t);if(r!==void 0)return this.map.delete(t),this.map.set(t,r),r}delete(t){return this.map.delete(t)}set(t,r){if(!this.delete(t)&&r!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(t,r)}return this}}var CC=OC,Xl,Zp;function sn(){if(Zp)return Xl;Zp=1;const e=/\s+/g;class t{constructor(q,Y){if(Y=s(Y),q instanceof t)return q.loose===!!Y.loose&&q.includePrerelease===!!Y.includePrerelease?q:new t(q.raw,Y);if(q instanceof u)return this.raw=q.value,this.set=[[q]],this.formatted=void 0,this;if(this.options=Y,this.loose=!!Y.loose,this.includePrerelease=!!Y.includePrerelease,this.raw=q.trim().replace(e," "),this.set=this.raw.split("||").map(G=>this.parseRange(G.trim())).filter(G=>G.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const G=this.set[0];if(this.set=this.set.filter(ne=>!v(ne[0])),this.set.length===0)this.set=[G];else if(this.set.length>1){for(const ne of this.set)if(ne.length===1&&C(ne[0])){this.set=[ne];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let q=0;q<this.set.length;q++){q>0&&(this.formatted+="||");const Y=this.set[q];for(let G=0;G<Y.length;G++)G>0&&(this.formatted+=" "),this.formatted+=Y[G].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(q){const G=((this.options.includePrerelease&&A)|(this.options.loose&&x))+":"+q,ne=o.get(G);if(ne)return ne;const H=this.options.loose,K=H?l[p.HYPHENRANGELOOSE]:l[p.HYPHENRANGE];q=q.replace(K,F(this.options.includePrerelease)),f("hyphen replace",q),q=q.replace(l[p.COMPARATORTRIM],b),f("comparator trim",q),q=q.replace(l[p.TILDETRIM],w),f("tilde trim",q),q=q.replace(l[p.CARETTRIM],I),f("caret trim",q);let ae=q.split(" ").map(be=>P(be,this.options)).join(" ").split(/\s+/).map(be=>me(be,this.options));H&&(ae=ae.filter(be=>(f("loose invalid filter",be,this.options),!!be.match(l[p.COMPARATORLOOSE])))),f("range list",ae);const de=new Map,re=ae.map(be=>new u(be,this.options));for(const be of re){if(v(be))return[be];de.set(be.value,be)}de.size>1&&de.has("")&&de.delete("");const _e=[...de.values()];return o.set(G,_e),_e}intersects(q,Y){if(!(q instanceof t))throw new TypeError("a Range is required");return this.set.some(G=>B(G,Y)&&q.set.some(ne=>B(ne,Y)&&G.every(H=>ne.every(K=>H.intersects(K,Y)))))}test(q){if(!q)return!1;if(typeof q=="string")try{q=new h(q,this.options)}catch{return!1}for(let Y=0;Y<this.set.length;Y++)if(U(this.set[Y],q,this.options))return!0;return!1}}Xl=t;const r=CC,o=new r,s=gd,u=Hu(),f=Fu,h=Ws,{safeRe:l,t:p,comparatorTrimReplace:b,tildeTrimReplace:w,caretTrimReplace:I}=Hs,{FLAG_INCLUDE_PRERELEASE:A,FLAG_LOOSE:x}=ku,v=$=>$.value==="<0.0.0-0",C=$=>$.value==="",B=($,q)=>{let Y=!0;const G=$.slice();let ne=G.pop();for(;Y&&G.length;)Y=G.every(H=>ne.intersects(H,q)),ne=G.pop();return Y},P=($,q)=>(f("comp",$,q),$=Q($,q),f("caret",$),$=m($,q),f("tildes",$),$=ue($,q),f("xrange",$),$=Se($,q),f("stars",$),$),S=$=>!$||$.toLowerCase()==="x"||$==="*",m=($,q)=>$.trim().split(/\s+/).map(Y=>j(Y,q)).join(" "),j=($,q)=>{const Y=q.loose?l[p.TILDELOOSE]:l[p.TILDE];return $.replace(Y,(G,ne,H,K,ae)=>{f("tilde",$,G,ne,H,K,ae);let de;return S(ne)?de="":S(H)?de=`>=${ne}.0.0 <${+ne+1}.0.0-0`:S(K)?de=`>=${ne}.${H}.0 <${ne}.${+H+1}.0-0`:ae?(f("replaceTilde pr",ae),de=`>=${ne}.${H}.${K}-${ae} <${ne}.${+H+1}.0-0`):de=`>=${ne}.${H}.${K} <${ne}.${+H+1}.0-0`,f("tilde return",de),de})},Q=($,q)=>$.trim().split(/\s+/).map(Y=>ce(Y,q)).join(" "),ce=($,q)=>{f("caret",$,q);const Y=q.loose?l[p.CARETLOOSE]:l[p.CARET],G=q.includePrerelease?"-0":"";return $.replace(Y,(ne,H,K,ae,de)=>{f("caret",$,ne,H,K,ae,de);let re;return S(H)?re="":S(K)?re=`>=${H}.0.0${G} <${+H+1}.0.0-0`:S(ae)?H==="0"?re=`>=${H}.${K}.0${G} <${H}.${+K+1}.0-0`:re=`>=${H}.${K}.0${G} <${+H+1}.0.0-0`:de?(f("replaceCaret pr",de),H==="0"?K==="0"?re=`>=${H}.${K}.${ae}-${de} <${H}.${K}.${+ae+1}-0`:re=`>=${H}.${K}.${ae}-${de} <${H}.${+K+1}.0-0`:re=`>=${H}.${K}.${ae}-${de} <${+H+1}.0.0-0`):(f("no pr"),H==="0"?K==="0"?re=`>=${H}.${K}.${ae}${G} <${H}.${K}.${+ae+1}-0`:re=`>=${H}.${K}.${ae}${G} <${H}.${+K+1}.0-0`:re=`>=${H}.${K}.${ae} <${+H+1}.0.0-0`),f("caret return",re),re})},ue=($,q)=>(f("replaceXRanges",$,q),$.split(/\s+/).map(Y=>te(Y,q)).join(" ")),te=($,q)=>{$=$.trim();const Y=q.loose?l[p.XRANGELOOSE]:l[p.XRANGE];return $.replace(Y,(G,ne,H,K,ae,de)=>{f("xRange",$,G,ne,H,K,ae,de);const re=S(H),_e=re||S(K),be=_e||S(ae),R=be;return ne==="="&&R&&(ne=""),de=q.includePrerelease?"-0":"",re?ne===">"||ne==="<"?G="<0.0.0-0":G="*":ne&&R?(_e&&(K=0),ae=0,ne===">"?(ne=">=",_e?(H=+H+1,K=0,ae=0):(K=+K+1,ae=0)):ne==="<="&&(ne="<",_e?H=+H+1:K=+K+1),ne==="<"&&(de="-0"),G=`${ne+H}.${K}.${ae}${de}`):_e?G=`>=${H}.0.0${de} <${+H+1}.0.0-0`:be&&(G=`>=${H}.${K}.0${de} <${H}.${+K+1}.0-0`),f("xRange return",G),G})},Se=($,q)=>(f("replaceStars",$,q),$.trim().replace(l[p.STAR],"")),me=($,q)=>(f("replaceGTE0",$,q),$.trim().replace(l[q.includePrerelease?p.GTE0PRE:p.GTE0],"")),F=$=>(q,Y,G,ne,H,K,ae,de,re,_e,be,R)=>(S(G)?Y="":S(ne)?Y=`>=${G}.0.0${$?"-0":""}`:S(H)?Y=`>=${G}.${ne}.0${$?"-0":""}`:K?Y=`>=${Y}`:Y=`>=${Y}${$?"-0":""}`,S(re)?de="":S(_e)?de=`<${+re+1}.0.0-0`:S(be)?de=`<${re}.${+_e+1}.0-0`:R?de=`<=${re}.${_e}.${be}-${R}`:$?de=`<${re}.${_e}.${+be+1}-0`:de=`<=${de}`,`${Y} ${de}`.trim()),U=($,q,Y)=>{for(let G=0;G<$.length;G++)if(!$[G].test(q))return!1;if(q.prerelease.length&&!Y.includePrerelease){for(let G=0;G<$.length;G++)if(f($[G].semver),$[G].semver!==u.ANY&&$[G].semver.prerelease.length>0){const ne=$[G].semver;if(ne.major===q.major&&ne.minor===q.minor&&ne.patch===q.patch)return!0}return!1}return!0};return Xl}var Zl,Qp;function Hu(){if(Qp)return Zl;Qp=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(b,w){if(w=r(w),b instanceof t){if(b.loose===!!w.loose)return b;b=b.value}b=b.trim().split(/\s+/).join(" "),f("comparator",b,w),this.options=w,this.loose=!!w.loose,this.parse(b),this.semver===e?this.value="":this.value=this.operator+this.semver.version,f("comp",this)}parse(b){const w=this.options.loose?o[s.COMPARATORLOOSE]:o[s.COMPARATOR],I=b.match(w);if(!I)throw new TypeError(`Invalid comparator: ${b}`);this.operator=I[1]!==void 0?I[1]:"",this.operator==="="&&(this.operator=""),I[2]?this.semver=new h(I[2],this.options.loose):this.semver=e}toString(){return this.value}test(b){if(f("Comparator.test",b,this.options.loose),this.semver===e||b===e)return!0;if(typeof b=="string")try{b=new h(b,this.options)}catch{return!1}return u(b,this.operator,this.semver,this.options)}intersects(b,w){if(!(b instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(b.value,w).test(this.value):b.operator===""?b.value===""?!0:new l(this.value,w).test(b.semver):(w=r(w),w.includePrerelease&&(this.value==="<0.0.0-0"||b.value==="<0.0.0-0")||!w.includePrerelease&&(this.value.startsWith("<0.0.0")||b.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&b.operator.startsWith(">")||this.operator.startsWith("<")&&b.operator.startsWith("<")||this.semver.version===b.semver.version&&this.operator.includes("=")&&b.operator.includes("=")||u(this.semver,"<",b.semver,w)&&this.operator.startsWith(">")&&b.operator.startsWith("<")||u(this.semver,">",b.semver,w)&&this.operator.startsWith("<")&&b.operator.startsWith(">")))}}Zl=t;const r=gd,{safeRe:o,t:s}=Hs,u=IC,f=Fu,h=Ws,l=sn();return Zl}const LC=sn(),PC=(e,t,r)=>{try{t=new LC(t,r)}catch{return!1}return t.test(e)};var Ry=PC;sn();sn();sn();sn();const BC=sn(),NC=(e,t)=>{try{return new BC(e,t).range||"*"}catch{return null}};var $C=NC;const MC=Ws,Ay=Hu(),{ANY:xC}=Ay,DC=sn(),jC=Ry,eb=pd,tb=Ey,UC=Sy,kC=vy,FC=(e,t,r,o)=>{e=new MC(e,o),t=new DC(t,o);let s,u,f,h,l;switch(r){case">":s=eb,u=UC,f=tb,h=">",l=">=";break;case"<":s=tb,u=kC,f=eb,h="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(jC(e,t,o))return!1;for(let p=0;p<t.set.length;++p){const b=t.set[p];let w=null,I=null;if(b.forEach(A=>{A.semver===xC&&(A=new Ay(">=0.0.0")),w=w||A,I=I||A,s(A.semver,w.semver,o)?w=A:f(A.semver,I.semver,o)&&(I=A)}),w.operator===h||w.operator===l||(!I.operator||I.operator===h)&&u(e,I.semver))return!1;if(I.operator===l&&f(e,I.semver))return!1}return!0};var HC=FC;const WC=HC,qC=(e,t,r)=>WC(e,t,">",r);var GC=qC;sn();sn();const bd=Hu(),{ANY:UN}=bd;new bd(">=0.0.0-0");new bd(">=0.0.0");const Ql=Hs,rb=ku,nb=my,VC=iC,zC=pd;Hu();sn();const KC=Ry,JC=$C,YC=GC;var XC={valid:VC,gt:zC,satisfies:KC,validRange:JC,gtr:YC,re:Ql.re,src:Ql.src,tokens:Ql.t,SEMVER_SPEC_VERSION:rb.SEMVER_SPEC_VERSION,RELEASE_TYPES:rb.RELEASE_TYPES,compareIdentifiers:nb.compareIdentifiers,rcompareIdentifiers:nb.rcompareIdentifiers};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.satisfiesVersionRange=e.gtRange=e.gtVersion=e.assertIsSemVerRange=e.assertIsSemVerVersion=e.isValidSemVerRange=e.isValidSemVerVersion=e.VersionRangeStruct=e.VersionStruct=void 0;const t=XC,r=Zi,o=qt;e.VersionStruct=(0,r.refine)((0,r.string)(),"Version",w=>(0,t.valid)(w)===null?`Expected SemVer version, got "${w}"`:!0),e.VersionRangeStruct=(0,r.refine)((0,r.string)(),"Version range",w=>(0,t.validRange)(w)===null?`Expected SemVer range, got "${w}"`:!0);function s(w){return(0,r.is)(w,e.VersionStruct)}e.isValidSemVerVersion=s;function u(w){return(0,r.is)(w,e.VersionRangeStruct)}e.isValidSemVerRange=u;function f(w){(0,o.assertStruct)(w,e.VersionStruct)}e.assertIsSemVerVersion=f;function h(w){(0,o.assertStruct)(w,e.VersionRangeStruct)}e.assertIsSemVerRange=h;function l(w,I){return(0,t.gt)(w,I)}e.gtVersion=l;function p(w,I){return(0,t.gtr)(w,I)}e.gtRange=p;function b(w,I){return(0,t.satisfies)(w,I,{includePrerelease:!0})}e.satisfiesVersionRange=b})(_y);(function(e){var t=z.commonjsGlobal&&z.commonjsGlobal.__createBinding||(Object.create?function(o,s,u,f){f===void 0&&(f=u);var h=Object.getOwnPropertyDescriptor(s,u);(!h||("get"in h?!s.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return s[u]}}),Object.defineProperty(o,f,h)}:function(o,s,u,f){f===void 0&&(f=u),o[f]=s[u]}),r=z.commonjsGlobal&&z.commonjsGlobal.__exportStar||function(o,s){for(var u in o)u!=="default"&&!Object.prototype.hasOwnProperty.call(s,u)&&t(s,o,u)};Object.defineProperty(e,"__esModule",{value:!0}),r(qt,e),r(ks,e),r(Qe,e),r(ju,e),r(Sn,e),r(Bo,e),r(ly,e),r(Fs,e),r(cy,e),r(dy,e),r(No,e),r(hy,e),r(Rn,e),r(gy,e),r(py,e),r(by,e),r(_y,e)})(od);var Wu={},Ri={};Object.defineProperty(Ri,"__esModule",{value:!0});Ri.errorValues=Ri.errorCodes=void 0;Ri.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}};Ri.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeCause=e.serializeError=e.isValidCode=e.getMessageFromCode=e.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const t=od,r=Ri,o=r.errorCodes.rpc.internal,s="Unspecified error message. This is a bug, please report it.",u={code:o,message:f(o)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function f(A,x=s){if(h(A)){const v=A.toString();if((0,t.hasProperty)(r.errorValues,v))return r.errorValues[v].message;if(b(A))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return x}e.getMessageFromCode=f;function h(A){return Number.isInteger(A)}e.isValidCode=h;function l(A,{fallbackError:x=u,shouldIncludeStack:v=!0}={}){if(!(0,t.isJsonRpcError)(x))throw new Error("Must provide fallback error with integer number code and string message.");const C=p(A,x);return v||delete C.stack,C}e.serializeError=l;function p(A,x){if(A&&typeof A=="object"&&"serialize"in A&&typeof A.serialize=="function")return A.serialize();if((0,t.isJsonRpcError)(A))return A;const v=w(A);return{...x,data:{cause:v}}}function b(A){return A>=-32099&&A<=-32e3}function w(A){return Array.isArray(A)?A.map(x=>(0,t.isValidJson)(x)?x:(0,t.isObject)(x)?I(x):null):(0,t.isObject)(A)?I(A):(0,t.isValidJson)(A)?A:null}e.serializeCause=w;function I(A){return Object.getOwnPropertyNames(A).reduce((x,v)=>{const C=A[v];return(0,t.isValidJson)(C)&&(x[v]=C),x},{})}})(Wu);var ZC=z.commonjsGlobal&&z.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gi,"__esModule",{value:!0});Gi.EthereumProviderError=Gi.JsonRpcError=void 0;const QC=od,eL=ZC(Vc),tL=Wu;class Ty extends Error{constructor(t,r,o){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!r||typeof r!="string")throw new Error('"message" must be a non-empty string.');super(r),this.code=t,o!==void 0&&(this.data=o)}serialize(){const t={code:this.code,message:this.message};return this.data!==void 0&&(t.data=this.data,(0,QC.isPlainObject)(this.data)&&(t.data.cause=(0,tL.serializeCause)(this.data.cause))),this.stack&&(t.stack=this.stack),t}toString(){return(0,eL.default)(this.serialize(),iL,2)}}Gi.JsonRpcError=Ty;class rL extends Ty{constructor(t,r,o){if(!nL(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,r,o)}}Gi.EthereumProviderError=rL;function nL(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function iL(e,t){if(t!=="[Circular]")return t}var $o={};Object.defineProperty($o,"__esModule",{value:!0});$o.providerErrors=$o.rpcErrors=void 0;const _d=Gi,Zt=Ri,Iy=Wu;$o.rpcErrors={parse:e=>kr(Zt.errorCodes.rpc.parse,e),invalidRequest:e=>kr(Zt.errorCodes.rpc.invalidRequest,e),invalidParams:e=>kr(Zt.errorCodes.rpc.invalidParams,e),methodNotFound:e=>kr(Zt.errorCodes.rpc.methodNotFound,e),internal:e=>kr(Zt.errorCodes.rpc.internal,e),server:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return kr(t,e)},invalidInput:e=>kr(Zt.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>kr(Zt.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>kr(Zt.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>kr(Zt.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>kr(Zt.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>kr(Zt.errorCodes.rpc.limitExceeded,e)};$o.providerErrors={userRejectedRequest:e=>bs(Zt.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>bs(Zt.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>bs(Zt.errorCodes.provider.unsupportedMethod,e),disconnected:e=>bs(Zt.errorCodes.provider.disconnected,e),chainDisconnected:e=>bs(Zt.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||typeof e!="object"||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:o}=e;if(!r||typeof r!="string")throw new Error('"message" must be a nonempty string');return new _d.EthereumProviderError(t,r,o)}};function kr(e,t){const[r,o]=Oy(t);return new _d.JsonRpcError(e,r??(0,Iy.getMessageFromCode)(e),o)}function bs(e,t){const[r,o]=Oy(t);return new _d.EthereumProviderError(e,r??(0,Iy.getMessageFromCode)(e),o)}function Oy(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t??void 0,r]}}return[]}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.errorCodes=e.providerErrors=e.rpcErrors=e.getMessageFromCode=e.serializeError=e.serializeCause=e.EthereumProviderError=e.JsonRpcError=void 0;var t=Gi;Object.defineProperty(e,"JsonRpcError",{enumerable:!0,get:function(){return t.JsonRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});var r=Wu;Object.defineProperty(e,"serializeCause",{enumerable:!0,get:function(){return r.serializeCause}}),Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return r.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return r.getMessageFromCode}});var o=$o;Object.defineProperty(e,"rpcErrors",{enumerable:!0,get:function(){return o.rpcErrors}}),Object.defineProperty(e,"providerErrors",{enumerable:!0,get:function(){return o.providerErrors}});var s=Ri;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return s.errorCodes}})})(yO);var yd={exports:{}},oL=Cy;function Cy(e,t){if(e&&t)return Cy(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(o){r[o]=e[o]}),r;function r(){for(var o=new Array(arguments.length),s=0;s<o.length;s++)o[s]=arguments[s];var u=e.apply(this,o),f=o[o.length-1];return typeof u=="function"&&u!==f&&Object.keys(f).forEach(function(h){u[h]=f[h]}),u}}var Ly=oL;yd.exports=Ly(lu);yd.exports.strict=Ly(Py);lu.proto=lu(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return lu(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return Py(this)},configurable:!0})});function lu(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function Py(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}var wd=yd.exports;const sL=z.getDefaultExportFromCjs(wd);var aL=wd,uL=function(){},fL=function(e){return e.setHeader&&typeof e.abort=="function"},lL=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},By=function(e,t,r){if(typeof t=="function")return By(e,null,t);t||(t={}),r=aL(r||uL);var o=e._writableState,s=e._readableState,u=t.readable||t.readable!==!1&&e.readable,f=t.writable||t.writable!==!1&&e.writable,h=!1,l=function(){e.writable||p()},p=function(){f=!1,u||r.call(e)},b=function(){u=!1,f||r.call(e)},w=function(C){r.call(e,C?new Error("exited with error code: "+C):null)},I=function(C){r.call(e,C)},A=function(){z.dist.process.nextTick(x)},x=function(){if(!h){if(u&&!(s&&s.ended&&!s.destroyed))return r.call(e,new Error("premature close"));if(f&&!(o&&o.ended&&!o.destroyed))return r.call(e,new Error("premature close"))}},v=function(){e.req.on("finish",p)};return fL(e)?(e.on("complete",p),e.on("abort",A),e.req?v():e.on("request",v)):f&&!o&&(e.on("end",l),e.on("close",l)),lL(e)&&e.on("exit",w),e.on("end",b),e.on("finish",p),t.error!==!1&&e.on("error",I),e.on("close",A),function(){h=!0,e.removeListener("complete",p),e.removeListener("abort",A),e.removeListener("request",v),e.req&&e.req.removeListener("finish",p),e.removeListener("end",l),e.removeListener("close",l),e.removeListener("finish",p),e.removeListener("exit",w),e.removeListener("end",b),e.removeListener("error",I),e.removeListener("close",A)}},Ny=By;const ib=z.getDefaultExportFromCjs(Ny);var cL=wd,dL=Ny,cu;try{cu=Ze.require$$3}catch{}var Ps=function(){},hL=/^v?\.0/.test(z.dist.process.version),qu=function(e){return typeof e=="function"},gL=function(e){return!hL||!cu?!1:(e instanceof(cu.ReadStream||Ps)||e instanceof(cu.WriteStream||Ps))&&qu(e.close)},pL=function(e){return e.setHeader&&qu(e.abort)},bL=function(e,t,r,o){o=cL(o);var s=!1;e.on("close",function(){s=!0}),dL(e,{readable:t,writable:r},function(f){if(f)return o(f);s=!0,o()});var u=!1;return function(f){if(!s&&!u){if(u=!0,gL(e))return e.close(Ps);if(pL(e))return e.abort();if(qu(e.destroy))return e.destroy();o(f||new Error("stream was destroyed"))}}},ob=function(e){e()},_L=function(e,t){return e.pipe(t)},yL=function(){var e=Array.prototype.slice.call(arguments),t=qu(e[e.length-1]||Ps)&&e.pop()||Ps;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var r,o=e.map(function(s,u){var f=u<e.length-1,h=u>0;return bL(s,f,h,function(l){r||(r=l),l&&o.forEach(ob),!f&&(o.forEach(ob),t(r))})});return e.reduce(_L)},wL=yL;const sb=z.getDefaultExportFromCjs(wL);var mL={},Gu={},Vu={},$y={},Mo={},Ei={},Ct={};Object.defineProperty(Ct,"__esModule",{value:!0});Ct.output=Ct.exists=Ct.hash=Ct.bytes=Ct.bool=Ct.number=Ct.isBytes=void 0;function yu(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}Ct.number=yu;function My(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}Ct.bool=My;function xy(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}Ct.isBytes=xy;function md(e,...t){if(!xy(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}Ct.bytes=md;function Dy(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");yu(e.outputLen),yu(e.blockLen)}Ct.hash=Dy;function jy(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}Ct.exists=jy;function Uy(e,t){md(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Ct.output=Uy;const EL={number:yu,bool:My,bytes:md,hash:Dy,exists:jy,output:Uy};Ct.default=EL;var Qn={},zu={};Object.defineProperty(zu,"__esModule",{value:!0});zu.crypto=void 0;zu.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;(function(e){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapXOFConstructorWithOpts=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.byteSwap32=e.byteSwapIfBE=e.byteSwap=e.isLE=e.rotl=e.rotr=e.createView=e.u32=e.u8=e.isBytes=void 0;const t=zu,r=Ct;function o(F){return F instanceof Uint8Array||F!=null&&typeof F=="object"&&F.constructor.name==="Uint8Array"}e.isBytes=o;const s=F=>new Uint8Array(F.buffer,F.byteOffset,F.byteLength);e.u8=s;const u=F=>new Uint32Array(F.buffer,F.byteOffset,Math.floor(F.byteLength/4));e.u32=u;const f=F=>new DataView(F.buffer,F.byteOffset,F.byteLength);e.createView=f;const h=(F,U)=>F<<32-U|F>>>U;e.rotr=h;const l=(F,U)=>F<<U|F>>>32-U>>>0;e.rotl=l,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const p=F=>F<<24&4278190080|F<<8&16711680|F>>>8&65280|F>>>24&255;e.byteSwap=p,e.byteSwapIfBE=e.isLE?F=>F:F=>(0,e.byteSwap)(F);function b(F){for(let U=0;U<F.length;U++)F[U]=(0,e.byteSwap)(F[U])}e.byteSwap32=b;const w=Array.from({length:256},(F,U)=>U.toString(16).padStart(2,"0"));function I(F){(0,r.bytes)(F);let U="";for(let $=0;$<F.length;$++)U+=w[F[$]];return U}e.bytesToHex=I;const A={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function x(F){if(F>=A._0&&F<=A._9)return F-A._0;if(F>=A._A&&F<=A._F)return F-(A._A-10);if(F>=A._a&&F<=A._f)return F-(A._a-10)}function v(F){if(typeof F!="string")throw new Error("hex string expected, got "+typeof F);const U=F.length,$=U/2;if(U%2)throw new Error("padded hex string expected, got unpadded hex of length "+U);const q=new Uint8Array($);for(let Y=0,G=0;Y<$;Y++,G+=2){const ne=x(F.charCodeAt(G)),H=x(F.charCodeAt(G+1));if(ne===void 0||H===void 0){const K=F[G]+F[G+1];throw new Error('hex string expected, got non-hex character "'+K+'" at index '+G)}q[Y]=ne*16+H}return q}e.hexToBytes=v;const C=async()=>{};e.nextTick=C;async function B(F,U,$){let q=Date.now();for(let Y=0;Y<F;Y++){$(Y);const G=Date.now()-q;G>=0&&G<U||(await(0,e.nextTick)(),q+=G)}}e.asyncLoop=B;function P(F){if(typeof F!="string")throw new Error(`utf8ToBytes expected string, got ${typeof F}`);return new Uint8Array(new TextEncoder().encode(F))}e.utf8ToBytes=P;function S(F){return typeof F=="string"&&(F=P(F)),(0,r.bytes)(F),F}e.toBytes=S;function m(...F){let U=0;for(let q=0;q<F.length;q++){const Y=F[q];(0,r.bytes)(Y),U+=Y.length}const $=new Uint8Array(U);for(let q=0,Y=0;q<F.length;q++){const G=F[q];$.set(G,Y),Y+=G.length}return $}e.concatBytes=m;class j{clone(){return this._cloneInto()}}e.Hash=j;const Q={}.toString;function ce(F,U){if(U!==void 0&&Q.call(U)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(F,U)}e.checkOpts=ce;function ue(F){const U=q=>F().update(S(q)).digest(),$=F();return U.outputLen=$.outputLen,U.blockLen=$.blockLen,U.create=()=>F(),U}e.wrapConstructor=ue;function te(F){const U=(q,Y)=>F(Y).update(S(q)).digest(),$=F({});return U.outputLen=$.outputLen,U.blockLen=$.blockLen,U.create=q=>F(q),U}e.wrapConstructorWithOpts=te;function Se(F){const U=(q,Y)=>F(Y).update(S(q)).digest(),$=F({});return U.outputLen=$.outputLen,U.blockLen=$.blockLen,U.create=q=>F(q),U}e.wrapXOFConstructorWithOpts=Se;function me(F=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(F));throw new Error("crypto.getRandomValues must be defined")}e.randomBytes=me})(Qn);Object.defineProperty(Ei,"__esModule",{value:!0});Ei.HashMD=Ei.Maj=Ei.Chi=void 0;const ec=Ct,_s=Qn;function vL(e,t,r,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,o);const s=BigInt(32),u=BigInt(4294967295),f=Number(r>>s&u),h=Number(r&u),l=o?4:0,p=o?0:4;e.setUint32(t+l,f,o),e.setUint32(t+p,h,o)}const SL=(e,t,r)=>e&t^~e&r;Ei.Chi=SL;const RL=(e,t,r)=>e&t^e&r^t&r;Ei.Maj=RL;class AL extends _s.Hash{constructor(t,r,o,s){super(),this.blockLen=t,this.outputLen=r,this.padOffset=o,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,_s.createView)(this.buffer)}update(t){(0,ec.exists)(this);const{view:r,buffer:o,blockLen:s}=this;t=(0,_s.toBytes)(t);const u=t.length;for(let f=0;f<u;){const h=Math.min(s-this.pos,u-f);if(h===s){const l=(0,_s.createView)(t);for(;s<=u-f;f+=s)this.process(l,f);continue}o.set(t.subarray(f,f+h),this.pos),this.pos+=h,f+=h,this.pos===s&&(this.process(r,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,ec.exists)(this),(0,ec.output)(t,this),this.finished=!0;const{buffer:r,view:o,blockLen:s,isLE:u}=this;let{pos:f}=this;r[f++]=128,this.buffer.subarray(f).fill(0),this.padOffset>s-f&&(this.process(o,0),f=0);for(let w=f;w<s;w++)r[w]=0;vL(o,s-8,BigInt(this.length*8),u),this.process(o,0);const h=(0,_s.createView)(t),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const p=l/4,b=this.get();if(p>b.length)throw new Error("_sha2: outputLen bigger than state");for(let w=0;w<p;w++)h.setUint32(4*w,b[w],u)}digest(){const{buffer:t,outputLen:r}=this;this.digestInto(t);const o=t.slice(0,r);return this.destroy(),o}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:r,buffer:o,length:s,finished:u,destroyed:f,pos:h}=this;return t.length=s,t.pos=h,t.finished=u,t.destroyed=f,s%r&&t.buffer.set(o),t}}Ei.HashMD=AL;Object.defineProperty(Mo,"__esModule",{value:!0});Mo.sha224=Mo.sha256=void 0;const tc=Ei,Fr=Qn,TL=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),bi=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),_i=new Uint32Array(64);class ky extends tc.HashMD{constructor(){super(64,32,8,!1),this.A=bi[0]|0,this.B=bi[1]|0,this.C=bi[2]|0,this.D=bi[3]|0,this.E=bi[4]|0,this.F=bi[5]|0,this.G=bi[6]|0,this.H=bi[7]|0}get(){const{A:t,B:r,C:o,D:s,E:u,F:f,G:h,H:l}=this;return[t,r,o,s,u,f,h,l]}set(t,r,o,s,u,f,h,l){this.A=t|0,this.B=r|0,this.C=o|0,this.D=s|0,this.E=u|0,this.F=f|0,this.G=h|0,this.H=l|0}process(t,r){for(let w=0;w<16;w++,r+=4)_i[w]=t.getUint32(r,!1);for(let w=16;w<64;w++){const I=_i[w-15],A=_i[w-2],x=(0,Fr.rotr)(I,7)^(0,Fr.rotr)(I,18)^I>>>3,v=(0,Fr.rotr)(A,17)^(0,Fr.rotr)(A,19)^A>>>10;_i[w]=v+_i[w-7]+x+_i[w-16]|0}let{A:o,B:s,C:u,D:f,E:h,F:l,G:p,H:b}=this;for(let w=0;w<64;w++){const I=(0,Fr.rotr)(h,6)^(0,Fr.rotr)(h,11)^(0,Fr.rotr)(h,25),A=b+I+(0,tc.Chi)(h,l,p)+TL[w]+_i[w]|0,v=((0,Fr.rotr)(o,2)^(0,Fr.rotr)(o,13)^(0,Fr.rotr)(o,22))+(0,tc.Maj)(o,s,u)|0;b=p,p=l,l=h,h=f+A|0,f=u,u=s,s=o,o=A+v|0}o=o+this.A|0,s=s+this.B|0,u=u+this.C|0,f=f+this.D|0,h=h+this.E|0,l=l+this.F|0,p=p+this.G|0,b=b+this.H|0,this.set(o,s,u,f,h,l,p,b)}roundClean(){_i.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class IL extends ky{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}Mo.sha256=(0,Fr.wrapConstructor)(()=>new ky);Mo.sha224=(0,Fr.wrapConstructor)(()=>new IL);var Ku={},Fy={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const t=Ct,r=Qn;class o extends r.Hash{constructor(f,h){super(),this.finished=!1,this.destroyed=!1,(0,t.hash)(f);const l=(0,r.toBytes)(h);if(this.iHash=f.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const p=this.blockLen,b=new Uint8Array(p);b.set(l.length>p?f.create().update(l).digest():l);for(let w=0;w<b.length;w++)b[w]^=54;this.iHash.update(b),this.oHash=f.create();for(let w=0;w<b.length;w++)b[w]^=106;this.oHash.update(b),b.fill(0)}update(f){return(0,t.exists)(this),this.iHash.update(f),this}digestInto(f){(0,t.exists)(this),(0,t.bytes)(f,this.outputLen),this.finished=!0,this.iHash.digestInto(f),this.oHash.update(f),this.oHash.digestInto(f),this.destroy()}digest(){const f=new Uint8Array(this.oHash.outputLen);return this.digestInto(f),f}_cloneInto(f){f||(f=Object.create(Object.getPrototypeOf(this),{}));const{oHash:h,iHash:l,finished:p,destroyed:b,blockLen:w,outputLen:I}=this;return f=f,f.finished=p,f.destroyed=b,f.blockLen=w,f.outputLen=I,f.oHash=h._cloneInto(f.oHash),f.iHash=l._cloneInto(f.iHash),f}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=o;const s=(u,f,h)=>new o(u,f).update(h).digest();e.hmac=s,e.hmac.create=(u,f)=>new o(u,f)})(Fy);var Ed={},Ju={},bt={},st={};Object.defineProperty(st,"__esModule",{value:!0});st.bitMask=void 0;st.isBytes=Xu;st.abytes=Zu;st.bytesToHex=vd;st.numberToHexUnpadded=Wy;st.hexToNumber=Sd;st.hexToBytes=Qu;st.bytesToNumberBE=LL;st.bytesToNumberLE=PL;st.numberToBytesBE=qy;st.numberToBytesLE=BL;st.numberToVarBytesBE=NL;st.ensureBytes=$L;st.concatBytes=Gy;st.equalBytes=ML;st.utf8ToBytes=xL;st.bitLen=DL;st.bitGet=jL;st.bitSet=UL;st.createHmacDrbg=FL;st.validateObject=WL;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Hy=BigInt(0),Yu=BigInt(1),OL=BigInt(2);function Xu(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Zu(e){if(!Xu(e))throw new Error("Uint8Array expected")}const CL=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function vd(e){Zu(e);let t="";for(let r=0;r<e.length;r++)t+=CL[e[r]];return t}function Wy(e){const t=e.toString(16);return t.length&1?`0${t}`:t}function Sd(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return BigInt(e===""?"0":`0x${e}`)}const Vn={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function ab(e){if(e>=Vn._0&&e<=Vn._9)return e-Vn._0;if(e>=Vn._A&&e<=Vn._F)return e-(Vn._A-10);if(e>=Vn._a&&e<=Vn._f)return e-(Vn._a-10)}function Qu(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const o=new Uint8Array(r);for(let s=0,u=0;s<r;s++,u+=2){const f=ab(e.charCodeAt(u)),h=ab(e.charCodeAt(u+1));if(f===void 0||h===void 0){const l=e[u]+e[u+1];throw new Error('hex string expected, got non-hex character "'+l+'" at index '+u)}o[s]=f*16+h}return o}function LL(e){return Sd(vd(e))}function PL(e){return Zu(e),Sd(vd(Uint8Array.from(e).reverse()))}function qy(e,t){return Qu(e.toString(16).padStart(t*2,"0"))}function BL(e,t){return qy(e,t).reverse()}function NL(e){return Qu(Wy(e))}function $L(e,t,r){let o;if(typeof t=="string")try{o=Qu(t)}catch(u){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${u}`)}else if(Xu(t))o=Uint8Array.from(t);else throw new Error(`${e} must be hex string or Uint8Array`);const s=o.length;if(typeof r=="number"&&s!==r)throw new Error(`${e} expected ${r} bytes, got ${s}`);return o}function Gy(...e){let t=0;for(let o=0;o<e.length;o++){const s=e[o];Zu(s),t+=s.length}const r=new Uint8Array(t);for(let o=0,s=0;o<e.length;o++){const u=e[o];r.set(u,s),s+=u.length}return r}function ML(e,t){if(e.length!==t.length)return!1;let r=0;for(let o=0;o<e.length;o++)r|=e[o]^t[o];return r===0}function xL(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function DL(e){let t;for(t=0;e>Hy;e>>=Yu,t+=1);return t}function jL(e,t){return e>>BigInt(t)&Yu}function UL(e,t,r){return e|(r?Yu:Hy)<<BigInt(t)}const kL=e=>(OL<<BigInt(e-1))-Yu;st.bitMask=kL;const rc=e=>new Uint8Array(e),ub=e=>Uint8Array.from(e);function FL(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let o=rc(e),s=rc(e),u=0;const f=()=>{o.fill(1),s.fill(0),u=0},h=(...w)=>r(s,o,...w),l=(w=rc())=>{s=h(ub([0]),w),o=h(),w.length!==0&&(s=h(ub([1]),w),o=h())},p=()=>{if(u++>=1e3)throw new Error("drbg: tried 1000 values");let w=0;const I=[];for(;w<t;){o=h();const A=o.slice();I.push(A),w+=o.length}return Gy(...I)};return(w,I)=>{f(),l(w);let A;for(;!(A=I(p()));)l();return f(),A}}const HL={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Xu(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function WL(e,t,r={}){const o=(s,u,f)=>{const h=HL[u];if(typeof h!="function")throw new Error(`Invalid validator "${u}", expected function`);const l=e[s];if(!(f&&l===void 0)&&!h(l,e))throw new Error(`Invalid param ${String(s)}=${l} (${typeof l}), expected ${u}`)};for(const[s,u]of Object.entries(t))o(s,u,!1);for(const[s,u]of Object.entries(r))o(s,u,!0);return e}Object.defineProperty(bt,"__esModule",{value:!0});bt.isNegativeLE=void 0;bt.mod=Tr;bt.pow=Vy;bt.pow2=GL;bt.invert=wu;bt.tonelliShanks=zy;bt.FpSqrt=Ky;bt.validateField=KL;bt.FpPow=Jy;bt.FpInvertBatch=Yy;bt.FpDiv=JL;bt.FpIsSquare=YL;bt.nLength=Rd;bt.Field=XL;bt.FpSqrtOdd=ZL;bt.FpSqrtEven=QL;bt.hashToPrivateScalar=eP;bt.getFieldBytesLength=Ad;bt.getMinHashLength=Xy;bt.mapHashToField=tP;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ir=st,kt=BigInt(0),pt=BigInt(1),mi=BigInt(2),qL=BigInt(3),Nc=BigInt(4),fb=BigInt(5),lb=BigInt(8);BigInt(9);BigInt(16);function Tr(e,t){const r=e%t;return r>=kt?r:t+r}function Vy(e,t,r){if(r<=kt||t<kt)throw new Error("Expected power/modulo > 0");if(r===pt)return kt;let o=pt;for(;t>kt;)t&pt&&(o=o*e%r),e=e*e%r,t>>=pt;return o}function GL(e,t,r){let o=e;for(;t-- >kt;)o*=o,o%=r;return o}function wu(e,t){if(e===kt||t<=kt)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=Tr(e,t),o=t,s=kt,u=pt;for(;r!==kt;){const h=o/r,l=o%r,p=s-u*h;o=r,r=l,s=u,u=p}if(o!==pt)throw new Error("invert: does not exist");return Tr(s,t)}function zy(e){const t=(e-pt)/mi;let r,o,s;for(r=e-pt,o=0;r%mi===kt;r/=mi,o++);for(s=mi;s<e&&Vy(s,t,e)!==e-pt;s++);if(o===1){const f=(e+pt)/Nc;return function(l,p){const b=l.pow(p,f);if(!l.eql(l.sqr(b),p))throw new Error("Cannot find square root");return b}}const u=(r+pt)/mi;return function(h,l){if(h.pow(l,t)===h.neg(h.ONE))throw new Error("Cannot find square root");let p=o,b=h.pow(h.mul(h.ONE,s),r),w=h.pow(l,u),I=h.pow(l,r);for(;!h.eql(I,h.ONE);){if(h.eql(I,h.ZERO))return h.ZERO;let A=1;for(let v=h.sqr(I);A<p&&!h.eql(v,h.ONE);A++)v=h.sqr(v);const x=h.pow(b,pt<<BigInt(p-A-1));b=h.sqr(x),w=h.mul(w,x),I=h.mul(I,b),p=A}return w}}function Ky(e){if(e%Nc===qL){const t=(e+pt)/Nc;return function(o,s){const u=o.pow(s,t);if(!o.eql(o.sqr(u),s))throw new Error("Cannot find square root");return u}}if(e%lb===fb){const t=(e-fb)/lb;return function(o,s){const u=o.mul(s,mi),f=o.pow(u,t),h=o.mul(s,f),l=o.mul(o.mul(h,mi),f),p=o.mul(h,o.sub(l,o.ONE));if(!o.eql(o.sqr(p),s))throw new Error("Cannot find square root");return p}}return zy(e)}const VL=(e,t)=>(Tr(e,t)&pt)===pt;bt.isNegativeLE=VL;const zL=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function KL(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},r=zL.reduce((o,s)=>(o[s]="function",o),t);return(0,Ir.validateObject)(e,r)}function Jy(e,t,r){if(r<kt)throw new Error("Expected power > 0");if(r===kt)return e.ONE;if(r===pt)return t;let o=e.ONE,s=t;for(;r>kt;)r&pt&&(o=e.mul(o,s)),s=e.sqr(s),r>>=pt;return o}function Yy(e,t){const r=new Array(t.length),o=t.reduce((u,f,h)=>e.is0(f)?u:(r[h]=u,e.mul(u,f)),e.ONE),s=e.inv(o);return t.reduceRight((u,f,h)=>e.is0(f)?u:(r[h]=e.mul(u,r[h]),e.mul(u,f)),s),r}function JL(e,t,r){return e.mul(t,typeof r=="bigint"?wu(r,e.ORDER):e.inv(r))}function YL(e){const t=(e.ORDER-pt)/mi;return r=>{const o=e.pow(r,t);return e.eql(o,e.ZERO)||e.eql(o,e.ONE)}}function Rd(e,t){const r=t!==void 0?t:e.toString(2).length,o=Math.ceil(r/8);return{nBitLength:r,nByteLength:o}}function XL(e,t,r=!1,o={}){if(e<=kt)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:s,nByteLength:u}=Rd(e,t);if(u>2048)throw new Error("Field lengths over 2048 bytes are not supported");const f=Ky(e),h=Object.freeze({ORDER:e,BITS:s,BYTES:u,MASK:(0,Ir.bitMask)(s),ZERO:kt,ONE:pt,create:l=>Tr(l,e),isValid:l=>{if(typeof l!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof l}`);return kt<=l&&l<e},is0:l=>l===kt,isOdd:l=>(l&pt)===pt,neg:l=>Tr(-l,e),eql:(l,p)=>l===p,sqr:l=>Tr(l*l,e),add:(l,p)=>Tr(l+p,e),sub:(l,p)=>Tr(l-p,e),mul:(l,p)=>Tr(l*p,e),pow:(l,p)=>Jy(h,l,p),div:(l,p)=>Tr(l*wu(p,e),e),sqrN:l=>l*l,addN:(l,p)=>l+p,subN:(l,p)=>l-p,mulN:(l,p)=>l*p,inv:l=>wu(l,e),sqrt:o.sqrt||(l=>f(h,l)),invertBatch:l=>Yy(h,l),cmov:(l,p,b)=>b?p:l,toBytes:l=>r?(0,Ir.numberToBytesLE)(l,u):(0,Ir.numberToBytesBE)(l,u),fromBytes:l=>{if(l.length!==u)throw new Error(`Fp.fromBytes: expected ${u}, got ${l.length}`);return r?(0,Ir.bytesToNumberLE)(l):(0,Ir.bytesToNumberBE)(l)}});return Object.freeze(h)}function ZL(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)}function QL(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r}function eP(e,t,r=!1){e=(0,Ir.ensureBytes)("privateHash",e);const o=e.length,s=Rd(t).nByteLength+8;if(s<24||o<s||o>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${o}`);const u=r?(0,Ir.bytesToNumberLE)(e):(0,Ir.bytesToNumberBE)(e);return Tr(u,t-pt)+pt}function Ad(e){if(typeof e!="bigint")throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function Xy(e){const t=Ad(e);return t+Math.ceil(t/2)}function tP(e,t,r=!1){const o=e.length,s=Ad(t),u=Xy(t);if(o<16||o<u||o>1024)throw new Error(`expected ${u}-1024 bytes of input, got ${o}`);const f=r?(0,Ir.bytesToNumberBE)(e):(0,Ir.bytesToNumberLE)(e),h=Tr(f,t-pt)+pt;return r?(0,Ir.numberToBytesLE)(h,s):(0,Ir.numberToBytesBE)(h,s)}Object.defineProperty(Ju,"__esModule",{value:!0});Ju.wNAF=iP;Ju.validateBasic=oP;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const cb=bt,rP=st,nP=BigInt(0),nc=BigInt(1);function iP(e,t){const r=(s,u)=>{const f=u.negate();return s?f:u},o=s=>{const u=Math.ceil(t/s)+1,f=2**(s-1);return{windows:u,windowSize:f}};return{constTimeNegate:r,unsafeLadder(s,u){let f=e.ZERO,h=s;for(;u>nP;)u&nc&&(f=f.add(h)),h=h.double(),u>>=nc;return f},precomputeWindow(s,u){const{windows:f,windowSize:h}=o(u),l=[];let p=s,b=p;for(let w=0;w<f;w++){b=p,l.push(b);for(let I=1;I<h;I++)b=b.add(p),l.push(b);p=b.double()}return l},wNAF(s,u,f){const{windows:h,windowSize:l}=o(s);let p=e.ZERO,b=e.BASE;const w=BigInt(2**s-1),I=2**s,A=BigInt(s);for(let x=0;x<h;x++){const v=x*l;let C=Number(f&w);f>>=A,C>l&&(C-=I,f+=nc);const B=v,P=v+Math.abs(C)-1,S=x%2!==0,m=C<0;C===0?b=b.add(r(S,u[B])):p=p.add(r(m,u[P]))}return{p,f:b}},wNAFCached(s,u,f,h){const l=s._WINDOW_SIZE||1;let p=u.get(s);return p||(p=this.precomputeWindow(s,l),l!==1&&u.set(s,h(p))),this.wNAF(l,p,f)}}}function oP(e){return(0,cb.validateField)(e.Fp),(0,rP.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,cb.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=void 0,e.weierstrassPoints=A,e.weierstrass=v,e.SWUFpSqrtRatio=C,e.mapToCurveSimpleSWU=B;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=Ju,r=bt,o=st,s=st;function u(P){const S=(0,t.validateBasic)(P);o.validateObject(S,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:m,Fp:j,a:Q}=S;if(m){if(!j.eql(Q,j.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof m!="object"||typeof m.beta!="bigint"||typeof m.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...S})}const{bytesToNumberBE:f,hexToBytes:h}=o;e.DER={Err:class extends Error{constructor(S=""){super(S)}},_parseInt(P){const{Err:S}=e.DER;if(P.length<2||P[0]!==2)throw new S("Invalid signature integer tag");const m=P[1],j=P.subarray(2,m+2);if(!m||j.length!==m)throw new S("Invalid signature integer: wrong length");if(j[0]&128)throw new S("Invalid signature integer: negative");if(j[0]===0&&!(j[1]&128))throw new S("Invalid signature integer: unnecessary leading zero");return{d:f(j),l:P.subarray(m+2)}},toSig(P){const{Err:S}=e.DER,m=typeof P=="string"?h(P):P;o.abytes(m);let j=m.length;if(j<2||m[0]!=48)throw new S("Invalid signature tag");if(m[1]!==j-2)throw new S("Invalid signature: incorrect length");const{d:Q,l:ce}=e.DER._parseInt(m.subarray(2)),{d:ue,l:te}=e.DER._parseInt(ce);if(te.length)throw new S("Invalid signature: left bytes after parsing");return{r:Q,s:ue}},hexFromSig(P){const S=me=>Number.parseInt(me[0],16)&8?"00"+me:me,m=me=>{const F=me.toString(16);return F.length&1?`0${F}`:F},j=S(m(P.s)),Q=S(m(P.r)),ce=j.length/2,ue=Q.length/2,te=m(ce),Se=m(ue);return`30${m(ue+ce+4)}02${Se}${Q}02${te}${j}`}};const l=BigInt(0),p=BigInt(1),b=BigInt(2),w=BigInt(3),I=BigInt(4);function A(P){const S=u(P),{Fp:m}=S,j=S.toBytes||((Y,G,ne)=>{const H=G.toAffine();return o.concatBytes(Uint8Array.from([4]),m.toBytes(H.x),m.toBytes(H.y))}),Q=S.fromBytes||(Y=>{const G=Y.subarray(1),ne=m.fromBytes(G.subarray(0,m.BYTES)),H=m.fromBytes(G.subarray(m.BYTES,2*m.BYTES));return{x:ne,y:H}});function ce(Y){const{a:G,b:ne}=S,H=m.sqr(Y),K=m.mul(H,Y);return m.add(m.add(K,m.mul(Y,G)),ne)}if(!m.eql(m.sqr(S.Gy),ce(S.Gx)))throw new Error("bad generator point: equation left != right");function ue(Y){return typeof Y=="bigint"&&l<Y&&Y<S.n}function te(Y){if(!ue(Y))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function Se(Y){const{allowedPrivateKeyLengths:G,nByteLength:ne,wrapPrivateKey:H,n:K}=S;if(G&&typeof Y!="bigint"){if(o.isBytes(Y)&&(Y=o.bytesToHex(Y)),typeof Y!="string"||!G.includes(Y.length))throw new Error("Invalid key");Y=Y.padStart(ne*2,"0")}let ae;try{ae=typeof Y=="bigint"?Y:o.bytesToNumberBE((0,s.ensureBytes)("private key",Y,ne))}catch{throw new Error(`private key must be ${ne} bytes, hex or bigint, not ${typeof Y}`)}return H&&(ae=r.mod(ae,K)),te(ae),ae}const me=new Map;function F(Y){if(!(Y instanceof U))throw new Error("ProjectivePoint expected")}class U{constructor(G,ne,H){if(this.px=G,this.py=ne,this.pz=H,G==null||!m.isValid(G))throw new Error("x required");if(ne==null||!m.isValid(ne))throw new Error("y required");if(H==null||!m.isValid(H))throw new Error("z required")}static fromAffine(G){const{x:ne,y:H}=G||{};if(!G||!m.isValid(ne)||!m.isValid(H))throw new Error("invalid affine point");if(G instanceof U)throw new Error("projective point not allowed");const K=ae=>m.eql(ae,m.ZERO);return K(ne)&&K(H)?U.ZERO:new U(ne,H,m.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(G){const ne=m.invertBatch(G.map(H=>H.pz));return G.map((H,K)=>H.toAffine(ne[K])).map(U.fromAffine)}static fromHex(G){const ne=U.fromAffine(Q((0,s.ensureBytes)("pointHex",G)));return ne.assertValidity(),ne}static fromPrivateKey(G){return U.BASE.multiply(Se(G))}_setWindowSize(G){this._WINDOW_SIZE=G,me.delete(this)}assertValidity(){if(this.is0()){if(S.allowInfinityPoint&&!m.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:G,y:ne}=this.toAffine();if(!m.isValid(G)||!m.isValid(ne))throw new Error("bad point: x or y not FE");const H=m.sqr(ne),K=ce(G);if(!m.eql(H,K))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:G}=this.toAffine();if(m.isOdd)return!m.isOdd(G);throw new Error("Field doesn't support isOdd")}equals(G){F(G);const{px:ne,py:H,pz:K}=this,{px:ae,py:de,pz:re}=G,_e=m.eql(m.mul(ne,re),m.mul(ae,K)),be=m.eql(m.mul(H,re),m.mul(de,K));return _e&&be}negate(){return new U(this.px,m.neg(this.py),this.pz)}double(){const{a:G,b:ne}=S,H=m.mul(ne,w),{px:K,py:ae,pz:de}=this;let re=m.ZERO,_e=m.ZERO,be=m.ZERO,R=m.mul(K,K),O=m.mul(ae,ae),W=m.mul(de,de),oe=m.mul(K,ae);return oe=m.add(oe,oe),be=m.mul(K,de),be=m.add(be,be),re=m.mul(G,be),_e=m.mul(H,W),_e=m.add(re,_e),re=m.sub(O,_e),_e=m.add(O,_e),_e=m.mul(re,_e),re=m.mul(oe,re),be=m.mul(H,be),W=m.mul(G,W),oe=m.sub(R,W),oe=m.mul(G,oe),oe=m.add(oe,be),be=m.add(R,R),R=m.add(be,R),R=m.add(R,W),R=m.mul(R,oe),_e=m.add(_e,R),W=m.mul(ae,de),W=m.add(W,W),R=m.mul(W,oe),re=m.sub(re,R),be=m.mul(W,O),be=m.add(be,be),be=m.add(be,be),new U(re,_e,be)}add(G){F(G);const{px:ne,py:H,pz:K}=this,{px:ae,py:de,pz:re}=G;let _e=m.ZERO,be=m.ZERO,R=m.ZERO;const O=S.a,W=m.mul(S.b,w);let oe=m.mul(ne,ae),ye=m.mul(H,de),d=m.mul(K,re),g=m.add(ne,H),_=m.add(ae,de);g=m.mul(g,_),_=m.add(oe,ye),g=m.sub(g,_),_=m.add(ne,K);let E=m.add(ae,re);return _=m.mul(_,E),E=m.add(oe,d),_=m.sub(_,E),E=m.add(H,K),_e=m.add(de,re),E=m.mul(E,_e),_e=m.add(ye,d),E=m.sub(E,_e),R=m.mul(O,_),_e=m.mul(W,d),R=m.add(_e,R),_e=m.sub(ye,R),R=m.add(ye,R),be=m.mul(_e,R),ye=m.add(oe,oe),ye=m.add(ye,oe),d=m.mul(O,d),_=m.mul(W,_),ye=m.add(ye,d),d=m.sub(oe,d),d=m.mul(O,d),_=m.add(_,d),oe=m.mul(ye,_),be=m.add(be,oe),oe=m.mul(E,_),_e=m.mul(g,_e),_e=m.sub(_e,oe),oe=m.mul(g,ye),R=m.mul(E,R),R=m.add(R,oe),new U(_e,be,R)}subtract(G){return this.add(G.negate())}is0(){return this.equals(U.ZERO)}wNAF(G){return q.wNAFCached(this,me,G,ne=>{const H=m.invertBatch(ne.map(K=>K.pz));return ne.map((K,ae)=>K.toAffine(H[ae])).map(U.fromAffine)})}multiplyUnsafe(G){const ne=U.ZERO;if(G===l)return ne;if(te(G),G===p)return this;const{endo:H}=S;if(!H)return q.unsafeLadder(this,G);let{k1neg:K,k1:ae,k2neg:de,k2:re}=H.splitScalar(G),_e=ne,be=ne,R=this;for(;ae>l||re>l;)ae&p&&(_e=_e.add(R)),re&p&&(be=be.add(R)),R=R.double(),ae>>=p,re>>=p;return K&&(_e=_e.negate()),de&&(be=be.negate()),be=new U(m.mul(be.px,H.beta),be.py,be.pz),_e.add(be)}multiply(G){te(G);let ne=G,H,K;const{endo:ae}=S;if(ae){const{k1neg:de,k1:re,k2neg:_e,k2:be}=ae.splitScalar(ne);let{p:R,f:O}=this.wNAF(re),{p:W,f:oe}=this.wNAF(be);R=q.constTimeNegate(de,R),W=q.constTimeNegate(_e,W),W=new U(m.mul(W.px,ae.beta),W.py,W.pz),H=R.add(W),K=O.add(oe)}else{const{p:de,f:re}=this.wNAF(ne);H=de,K=re}return U.normalizeZ([H,K])[0]}multiplyAndAddUnsafe(G,ne,H){const K=U.BASE,ae=(re,_e)=>_e===l||_e===p||!re.equals(K)?re.multiplyUnsafe(_e):re.multiply(_e),de=ae(this,ne).add(ae(G,H));return de.is0()?void 0:de}toAffine(G){const{px:ne,py:H,pz:K}=this,ae=this.is0();G==null&&(G=ae?m.ONE:m.inv(K));const de=m.mul(ne,G),re=m.mul(H,G),_e=m.mul(K,G);if(ae)return{x:m.ZERO,y:m.ZERO};if(!m.eql(_e,m.ONE))throw new Error("invZ was invalid");return{x:de,y:re}}isTorsionFree(){const{h:G,isTorsionFree:ne}=S;if(G===p)return!0;if(ne)return ne(U,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:G,clearCofactor:ne}=S;return G===p?this:ne?ne(U,this):this.multiplyUnsafe(S.h)}toRawBytes(G=!0){return this.assertValidity(),j(U,this,G)}toHex(G=!0){return o.bytesToHex(this.toRawBytes(G))}}U.BASE=new U(S.Gx,S.Gy,m.ONE),U.ZERO=new U(m.ZERO,m.ONE,m.ZERO);const $=S.nBitLength,q=(0,t.wNAF)(U,S.endo?Math.ceil($/2):$);return{CURVE:S,ProjectivePoint:U,normPrivateKeyToScalar:Se,weierstrassEquation:ce,isWithinCurveOrder:ue}}function x(P){const S=(0,t.validateBasic)(P);return o.validateObject(S,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...S})}function v(P){const S=x(P),{Fp:m,n:j}=S,Q=m.BYTES+1,ce=2*m.BYTES+1;function ue(_){return l<_&&_<m.ORDER}function te(_){return r.mod(_,j)}function Se(_){return r.invert(_,j)}const{ProjectivePoint:me,normPrivateKeyToScalar:F,weierstrassEquation:U,isWithinCurveOrder:$}=A({...S,toBytes(_,E,J){const ie=E.toAffine(),se=m.toBytes(ie.x),Ie=o.concatBytes;return J?Ie(Uint8Array.from([E.hasEvenY()?2:3]),se):Ie(Uint8Array.from([4]),se,m.toBytes(ie.y))},fromBytes(_){const E=_.length,J=_[0],ie=_.subarray(1);if(E===Q&&(J===2||J===3)){const se=o.bytesToNumberBE(ie);if(!ue(se))throw new Error("Point is not on curve");const Ie=U(se);let Be;try{Be=m.sqrt(Ie)}catch(Re){const He=Re instanceof Error?": "+Re.message:"";throw new Error("Point is not on curve"+He)}const Ce=(Be&p)===p;return(J&1)===1!==Ce&&(Be=m.neg(Be)),{x:se,y:Be}}else if(E===ce&&J===4){const se=m.fromBytes(ie.subarray(0,m.BYTES)),Ie=m.fromBytes(ie.subarray(m.BYTES,2*m.BYTES));return{x:se,y:Ie}}else throw new Error(`Point of length ${E} was invalid. Expected ${Q} compressed bytes or ${ce} uncompressed bytes`)}}),q=_=>o.bytesToHex(o.numberToBytesBE(_,S.nByteLength));function Y(_){const E=j>>p;return _>E}function G(_){return Y(_)?te(-_):_}const ne=(_,E,J)=>o.bytesToNumberBE(_.slice(E,J));class H{constructor(E,J,ie){this.r=E,this.s=J,this.recovery=ie,this.assertValidity()}static fromCompact(E){const J=S.nByteLength;return E=(0,s.ensureBytes)("compactSignature",E,J*2),new H(ne(E,0,J),ne(E,J,2*J))}static fromDER(E){const{r:J,s:ie}=e.DER.toSig((0,s.ensureBytes)("DER",E));return new H(J,ie)}assertValidity(){if(!$(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!$(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(E){return new H(this.r,this.s,E)}recoverPublicKey(E){const{r:J,s:ie,recovery:se}=this,Ie=be((0,s.ensureBytes)("msgHash",E));if(se==null||![0,1,2,3].includes(se))throw new Error("recovery id invalid");const Be=se===2||se===3?J+S.n:J;if(Be>=m.ORDER)throw new Error("recovery id 2 or 3 invalid");const Ce=se&1?"03":"02",Ue=me.fromHex(Ce+q(Be)),Re=Se(Be),He=te(-Ie*Re),_t=te(ie*Re),tt=me.BASE.multiplyAndAddUnsafe(Ue,He,_t);if(!tt)throw new Error("point at infinify");return tt.assertValidity(),tt}hasHighS(){return Y(this.s)}normalizeS(){return this.hasHighS()?new H(this.r,te(-this.s),this.recovery):this}toDERRawBytes(){return o.hexToBytes(this.toDERHex())}toDERHex(){return e.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.hexToBytes(this.toCompactHex())}toCompactHex(){return q(this.r)+q(this.s)}}const K={isValidPrivateKey(_){try{return F(_),!0}catch{return!1}},normPrivateKeyToScalar:F,randomPrivateKey:()=>{const _=r.getMinHashLength(S.n);return r.mapHashToField(S.randomBytes(_),S.n)},precompute(_=8,E=me.BASE){return E._setWindowSize(_),E.multiply(BigInt(3)),E}};function ae(_,E=!0){return me.fromPrivateKey(_).toRawBytes(E)}function de(_){const E=o.isBytes(_),J=typeof _=="string",ie=(E||J)&&_.length;return E?ie===Q||ie===ce:J?ie===2*Q||ie===2*ce:_ instanceof me}function re(_,E,J=!0){if(de(_))throw new Error("first arg must be private key");if(!de(E))throw new Error("second arg must be public key");return me.fromHex(E).multiply(F(_)).toRawBytes(J)}const _e=S.bits2int||function(_){const E=o.bytesToNumberBE(_),J=_.length*8-S.nBitLength;return J>0?E>>BigInt(J):E},be=S.bits2int_modN||function(_){return te(_e(_))},R=o.bitMask(S.nBitLength);function O(_){if(typeof _!="bigint")throw new Error("bigint expected");if(!(l<=_&&_<R))throw new Error(`bigint expected < 2^${S.nBitLength}`);return o.numberToBytesBE(_,S.nByteLength)}function W(_,E,J=oe){if(["recovered","canonical"].some(Ye=>Ye in J))throw new Error("sign() legacy options not supported");const{hash:ie,randomBytes:se}=S;let{lowS:Ie,prehash:Be,extraEntropy:Ce}=J;Ie==null&&(Ie=!0),_=(0,s.ensureBytes)("msgHash",_),Be&&(_=(0,s.ensureBytes)("prehashed msgHash",ie(_)));const Ue=be(_),Re=F(E),He=[O(Re),O(Ue)];if(Ce!=null&&Ce!==!1){const Ye=Ce===!0?se(m.BYTES):Ce;He.push((0,s.ensureBytes)("extraEntropy",Ye))}const _t=o.concatBytes(...He),tt=Ue;function yt(Ye){const Ve=_e(Ye);if(!$(Ve))return;const jt=Se(Ve),Pt=me.BASE.multiply(Ve).toAffine(),ut=te(Pt.x);if(ut===l)return;const Nt=te(jt*te(tt+ut*Re));if(Nt===l)return;let lr=(Pt.x===ut?0:2)|Number(Pt.y&p),tr=Nt;return Ie&&Y(Nt)&&(tr=G(Nt),lr^=1),new H(ut,tr,lr)}return{seed:_t,k2sig:yt}}const oe={lowS:S.lowS,prehash:!1},ye={lowS:S.lowS,prehash:!1};function d(_,E,J=oe){const{seed:ie,k2sig:se}=W(_,E,J),Ie=S;return o.createHmacDrbg(Ie.hash.outputLen,Ie.nByteLength,Ie.hmac)(ie,se)}me.BASE._setWindowSize(8);function g(_,E,J,ie=ye){var Pt;const se=_;if(E=(0,s.ensureBytes)("msgHash",E),J=(0,s.ensureBytes)("publicKey",J),"strict"in ie)throw new Error("options.strict was renamed to lowS");const{lowS:Ie,prehash:Be}=ie;let Ce,Ue;try{if(typeof se=="string"||o.isBytes(se))try{Ce=H.fromDER(se)}catch(ut){if(!(ut instanceof e.DER.Err))throw ut;Ce=H.fromCompact(se)}else if(typeof se=="object"&&typeof se.r=="bigint"&&typeof se.s=="bigint"){const{r:ut,s:Nt}=se;Ce=new H(ut,Nt)}else throw new Error("PARSE");Ue=me.fromHex(J)}catch(ut){if(ut.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(Ie&&Ce.hasHighS())return!1;Be&&(E=S.hash(E));const{r:Re,s:He}=Ce,_t=be(E),tt=Se(He),yt=te(_t*tt),Ye=te(Re*tt),Ve=(Pt=me.BASE.multiplyAndAddUnsafe(Ue,yt,Ye))==null?void 0:Pt.toAffine();return Ve?te(Ve.x)===Re:!1}return{CURVE:S,getPublicKey:ae,getSharedSecret:re,sign:d,verify:g,ProjectivePoint:me,Signature:H,utils:K}}function C(P,S){const m=P.ORDER;let j=l;for(let Y=m-p;Y%b===l;Y/=b)j+=p;const Q=j,ce=b<<Q-p-p,ue=ce*b,te=(m-p)/ue,Se=(te-p)/b,me=ue-p,F=ce,U=P.pow(S,te),$=P.pow(S,(te+p)/b);let q=(Y,G)=>{let ne=U,H=P.pow(G,me),K=P.sqr(H);K=P.mul(K,G);let ae=P.mul(Y,K);ae=P.pow(ae,Se),ae=P.mul(ae,H),H=P.mul(ae,G),K=P.mul(ae,Y);let de=P.mul(K,H);ae=P.pow(de,F);let re=P.eql(ae,P.ONE);H=P.mul(K,$),ae=P.mul(de,ne),K=P.cmov(H,K,re),de=P.cmov(ae,de,re);for(let _e=Q;_e>p;_e--){let be=_e-b;be=b<<be-p;let R=P.pow(de,be);const O=P.eql(R,P.ONE);H=P.mul(K,ne),ne=P.mul(ne,ne),R=P.mul(de,ne),K=P.cmov(H,K,O),de=P.cmov(R,de,O)}return{isValid:re,value:K}};if(P.ORDER%I===w){const Y=(P.ORDER-w)/I,G=P.sqrt(P.neg(S));q=(ne,H)=>{let K=P.sqr(H);const ae=P.mul(ne,H);K=P.mul(K,ae);let de=P.pow(K,Y);de=P.mul(de,ae);const re=P.mul(de,G),_e=P.mul(P.sqr(de),H),be=P.eql(_e,ne);let R=P.cmov(re,de,be);return{isValid:be,value:R}}}return q}function B(P,S){if(r.validateField(P),!P.isValid(S.A)||!P.isValid(S.B)||!P.isValid(S.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const m=C(P,S.Z);if(!P.isOdd)throw new Error("Fp.isOdd is not implemented!");return j=>{let Q,ce,ue,te,Se,me,F,U;Q=P.sqr(j),Q=P.mul(Q,S.Z),ce=P.sqr(Q),ce=P.add(ce,Q),ue=P.add(ce,P.ONE),ue=P.mul(ue,S.B),te=P.cmov(S.Z,P.neg(ce),!P.eql(ce,P.ZERO)),te=P.mul(te,S.A),ce=P.sqr(ue),me=P.sqr(te),Se=P.mul(me,S.A),ce=P.add(ce,Se),ce=P.mul(ce,ue),me=P.mul(me,te),Se=P.mul(me,S.B),ce=P.add(ce,Se),F=P.mul(Q,ue);const{isValid:$,value:q}=m(ce,me);U=P.mul(Q,j),U=P.mul(U,q),F=P.cmov(F,ue,$),U=P.cmov(U,q,$);const Y=P.isOdd(j)===P.isOdd(U);return U=P.cmov(P.neg(U),U,Y),F=P.div(F,te),{x:F,y:U}}}})(Ed);Object.defineProperty(Ku,"__esModule",{value:!0});Ku.getHash=Zy;Ku.createCurve=uP;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const sP=Fy,db=Qn,aP=Ed;function Zy(e){return{hash:e,hmac:(t,...r)=>(0,sP.hmac)(e,t,(0,db.concatBytes)(...r)),randomBytes:db.randomBytes}}function uP(e,t){const r=o=>(0,aP.weierstrass)({...e,...Zy(o)});return Object.freeze({...r(t),create:r})}var Qi={};Object.defineProperty(Qi,"__esModule",{value:!0});Qi.expand_message_xmd=Qy;Qi.expand_message_xof=e0;Qi.hash_to_field=$c;Qi.isogenyMap=dP;Qi.createHasher=hP;const fP=bt,Qt=st,lP=Qt.bytesToNumberBE;function wi(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let o=t-1;o>=0;o--)r[o]=e&255,e>>>=8;return new Uint8Array(r)}function cP(e,t){const r=new Uint8Array(e.length);for(let o=0;o<e.length;o++)r[o]=e[o]^t[o];return r}function Td(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function Qy(e,t,r,o){(0,Qt.abytes)(e),(0,Qt.abytes)(t),Td(r),t.length>255&&(t=o((0,Qt.concatBytes)((0,Qt.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:s,blockLen:u}=o,f=Math.ceil(r/s);if(f>255)throw new Error("Invalid xmd length");const h=(0,Qt.concatBytes)(t,wi(t.length,1)),l=wi(0,u),p=wi(r,2),b=new Array(f),w=o((0,Qt.concatBytes)(l,e,p,wi(0,1),h));b[0]=o((0,Qt.concatBytes)(w,wi(1,1),h));for(let A=1;A<=f;A++){const x=[cP(w,b[A-1]),wi(A+1,1),h];b[A]=o((0,Qt.concatBytes)(...x))}return(0,Qt.concatBytes)(...b).slice(0,r)}function e0(e,t,r,o,s){if((0,Qt.abytes)(e),(0,Qt.abytes)(t),Td(r),t.length>255){const u=Math.ceil(2*o/8);t=s.create({dkLen:u}).update((0,Qt.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return s.create({dkLen:r}).update(e).update(wi(r,2)).update(t).update(wi(t.length,1)).digest()}function $c(e,t,r){(0,Qt.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:o,k:s,m:u,hash:f,expand:h,DST:l}=r;(0,Qt.abytes)(e),Td(t);const p=typeof l=="string"?(0,Qt.utf8ToBytes)(l):l,b=o.toString(2).length,w=Math.ceil((b+s)/8),I=t*u*w;let A;if(h==="xmd")A=Qy(e,p,I,f);else if(h==="xof")A=e0(e,p,I,s,f);else if(h==="_internal_pass")A=e;else throw new Error('expand must be "xmd" or "xof"');const x=new Array(t);for(let v=0;v<t;v++){const C=new Array(u);for(let B=0;B<u;B++){const P=w*(B+v*u),S=A.subarray(P,P+w);C[B]=(0,fP.mod)(lP(S),o)}x[v]=C}return x}function dP(e,t){const r=t.map(o=>Array.from(o).reverse());return(o,s)=>{const[u,f,h,l]=r.map(p=>p.reduce((b,w)=>e.add(e.mul(b,o),w)));return o=e.div(u,f),s=e.mul(s,e.div(h,l)),{x:o,y:s}}}function hP(e,t,r){if(typeof t!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(o,s){const u=$c(o,2,{...r,DST:r.DST,...s}),f=e.fromAffine(t(u[0])),h=e.fromAffine(t(u[1])),l=f.add(h).clearCofactor();return l.assertValidity(),l},encodeToCurve(o,s){const u=$c(o,1,{...r,DST:r.encodeDST,...s}),f=e.fromAffine(t(u[0])).clearCofactor();return f.assertValidity(),f},mapToCurve(o){if(!Array.isArray(o))throw new Error("mapToCurve: expected array of bigints");for(const u of o)if(typeof u!="bigint")throw new Error(`mapToCurve: expected array of bigints, got ${u} in array`);const s=e.fromAffine(t(o)).clearCofactor();return s.assertValidity(),s}}}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.encodeToCurve=e.hashToCurve=e.schnorr=e.secp256k1=void 0;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=Mo,r=Qn,o=Ku,s=Qi,u=bt,f=st,h=Ed,l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),p=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),b=BigInt(1),w=BigInt(2),I=(H,K)=>(H+K/w)/K;function A(H){const K=l,ae=BigInt(3),de=BigInt(6),re=BigInt(11),_e=BigInt(22),be=BigInt(23),R=BigInt(44),O=BigInt(88),W=H*H*H%K,oe=W*W*H%K,ye=(0,u.pow2)(oe,ae,K)*oe%K,d=(0,u.pow2)(ye,ae,K)*oe%K,g=(0,u.pow2)(d,w,K)*W%K,_=(0,u.pow2)(g,re,K)*g%K,E=(0,u.pow2)(_,_e,K)*_%K,J=(0,u.pow2)(E,R,K)*E%K,ie=(0,u.pow2)(J,O,K)*J%K,se=(0,u.pow2)(ie,R,K)*E%K,Ie=(0,u.pow2)(se,ae,K)*oe%K,Be=(0,u.pow2)(Ie,be,K)*_%K,Ce=(0,u.pow2)(Be,de,K)*W%K,Ue=(0,u.pow2)(Ce,w,K);if(!x.eql(x.sqr(Ue),H))throw new Error("Cannot find square root");return Ue}const x=(0,u.Field)(l,void 0,void 0,{sqrt:A});e.secp256k1=(0,o.createCurve)({a:BigInt(0),b:BigInt(7),Fp:x,n:p,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:H=>{const K=p,ae=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),de=-b*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),re=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),_e=ae,be=BigInt("0x100000000000000000000000000000000"),R=I(_e*H,K),O=I(-de*H,K);let W=(0,u.mod)(H-R*ae-O*re,K),oe=(0,u.mod)(-R*de-O*_e,K);const ye=W>be,d=oe>be;if(ye&&(W=K-W),d&&(oe=K-oe),W>be||oe>be)throw new Error("splitScalar: Endomorphism failed, k="+H);return{k1neg:ye,k1:W,k2neg:d,k2:oe}}}},t.sha256);const v=BigInt(0),C=H=>typeof H=="bigint"&&v<H&&H<l,B=H=>typeof H=="bigint"&&v<H&&H<p,P={};function S(H,...K){let ae=P[H];if(ae===void 0){const de=(0,t.sha256)(Uint8Array.from(H,re=>re.charCodeAt(0)));ae=(0,f.concatBytes)(de,de),P[H]=ae}return(0,t.sha256)((0,f.concatBytes)(ae,...K))}const m=H=>H.toRawBytes(!0).slice(1),j=H=>(0,f.numberToBytesBE)(H,32),Q=H=>(0,u.mod)(H,l),ce=H=>(0,u.mod)(H,p),ue=e.secp256k1.ProjectivePoint,te=(H,K,ae)=>ue.BASE.multiplyAndAddUnsafe(H,K,ae);function Se(H){let K=e.secp256k1.utils.normPrivateKeyToScalar(H),ae=ue.fromPrivateKey(K);return{scalar:ae.hasEvenY()?K:ce(-K),bytes:m(ae)}}function me(H){if(!C(H))throw new Error("bad x: need 0 < x < p");const K=Q(H*H),ae=Q(K*H+BigInt(7));let de=A(ae);de%w!==v&&(de=Q(-de));const re=new ue(H,de,b);return re.assertValidity(),re}function F(...H){return ce((0,f.bytesToNumberBE)(S("BIP0340/challenge",...H)))}function U(H){return Se(H).bytes}function $(H,K,ae=(0,r.randomBytes)(32)){const de=(0,f.ensureBytes)("message",H),{bytes:re,scalar:_e}=Se(K),be=(0,f.ensureBytes)("auxRand",ae,32),R=j(_e^(0,f.bytesToNumberBE)(S("BIP0340/aux",be))),O=S("BIP0340/nonce",R,re,de),W=ce((0,f.bytesToNumberBE)(O));if(W===v)throw new Error("sign failed: k is zero");const{bytes:oe,scalar:ye}=Se(W),d=F(oe,re,de),g=new Uint8Array(64);if(g.set(oe,0),g.set(j(ce(ye+d*_e)),32),!q(g,de,re))throw new Error("sign: Invalid signature produced");return g}function q(H,K,ae){const de=(0,f.ensureBytes)("signature",H,64),re=(0,f.ensureBytes)("message",K),_e=(0,f.ensureBytes)("publicKey",ae,32);try{const be=me((0,f.bytesToNumberBE)(_e)),R=(0,f.bytesToNumberBE)(de.subarray(0,32));if(!C(R))return!1;const O=(0,f.bytesToNumberBE)(de.subarray(32,64));if(!B(O))return!1;const W=F(j(R),m(be),re),oe=te(be,O,ce(-W));return!(!oe||!oe.hasEvenY()||oe.toAffine().x!==R)}catch{return!1}}e.schnorr={getPublicKey:U,sign:$,verify:q,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:me,pointToBytes:m,numberToBytesBE:f.numberToBytesBE,bytesToNumberBE:f.bytesToNumberBE,taggedHash:S,mod:u.mod}};const Y=(0,s.isogenyMap)(x,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(H=>H.map(K=>BigInt(K)))),G=(0,h.mapToCurveSimpleSWU)(x,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:x.create(BigInt("-11"))}),ne=(0,s.createHasher)(e.secp256k1.ProjectivePoint,H=>{const{x:K,y:ae}=G(x.create(H[0]));return Y(K,ae)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:x.ORDER,m:1,k:128,expand:"xmd",hash:t.sha256});e.hashToCurve=ne.hashToCurve,e.encodeToCurve=ne.encodeToCurve})($y);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=void 0;var t=$y;Object.defineProperty(e,"secp256k1",{enumerable:!0,get:function(){return t.secp256k1}})})(Vu);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MAX_WITHDRAWALS_PER_PAYLOAD=e.RLP_EMPTY_STRING=e.KECCAK256_RLP=e.KECCAK256_RLP_S=e.KECCAK256_RLP_ARRAY=e.KECCAK256_RLP_ARRAY_S=e.KECCAK256_NULL=e.KECCAK256_NULL_S=e.TWO_POW256=e.SECP256K1_ORDER_DIV_2=e.SECP256K1_ORDER=e.MAX_INTEGER_BIGINT=e.MAX_INTEGER=e.MAX_UINT64=void 0;const t=z.bufferPolyfill,r=Vu;e.MAX_UINT64=BigInt("0xffffffffffffffff"),e.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),e.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),e.SECP256K1_ORDER=r.secp256k1.CURVE.n,e.SECP256K1_ORDER_DIV_2=r.secp256k1.CURVE.n/BigInt(2),e.TWO_POW256=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),e.KECCAK256_NULL_S="c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",e.KECCAK256_NULL=t.Buffer.from(e.KECCAK256_NULL_S,"hex"),e.KECCAK256_RLP_ARRAY_S="1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",e.KECCAK256_RLP_ARRAY=t.Buffer.from(e.KECCAK256_RLP_ARRAY_S,"hex"),e.KECCAK256_RLP_S="56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",e.KECCAK256_RLP=t.Buffer.from(e.KECCAK256_RLP_S,"hex"),e.RLP_EMPTY_STRING=t.Buffer.from([128]),e.MAX_WITHDRAWALS_PER_PAYLOAD=16})(Gu);var ef={};Object.defineProperty(ef,"__esModule",{value:!0});ef.GWEI_TO_WEI=void 0;ef.GWEI_TO_WEI=BigInt(1e9);var Id={},An={};Object.defineProperty(An,"__esModule",{value:!0});An.RLP=An.utils=An.decode=An.encode=void 0;function Od(e){if(Array.isArray(e)){const r=[];let o=0;for(let s=0;s<e.length;s++){const u=Od(e[s]);r.push(u),o+=u.length}return xc(gb(o,192),...r)}const t=s0(e);return t.length===1&&t[0]<128?t:xc(gb(t.length,128),t)}An.encode=Od;function Eo(e,t,r){if(r>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,r)}function hb(e){if(e[0]===0)throw new Error("invalid RLP: extra zeros");return n0(r0(e))}function gb(e,t){if(e<56)return Uint8Array.from([e+t]);const r=Dc(e),o=r.length/2,s=Dc(t+55+o);return Uint8Array.from(mu(s+r))}function t0(e,t=!1){if(typeof e>"u"||e===null||e.length===0)return Uint8Array.from([]);const r=s0(e),o=Mc(r);if(t)return o;if(o.remainder.length!==0)throw new Error("invalid RLP: remainder must be zero");return o.data}An.decode=t0;function Mc(e){let t,r,o,s,u;const f=[],h=e[0];if(h<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(h<=183){if(t=h-127,h===128?o=Uint8Array.from([]):o=Eo(e,1,t),t===2&&o[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:o,remainder:e.slice(t)}}else if(h<=191){if(r=h-182,e.length-1<r)throw new Error("invalid RLP: not enough bytes for string length");if(t=hb(Eo(e,1,r)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return o=Eo(e,r,t+r),{data:o,remainder:e.slice(t+r)}}else if(h<=247){for(t=h-191,s=Eo(e,1,t);s.length;)u=Mc(s),f.push(u.data),s=u.remainder;return{data:f,remainder:e.slice(t)}}else{if(r=h-246,t=hb(Eo(e,1,r)),t<56)throw new Error("invalid RLP: encoded list too short");const l=r+t;if(l>e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=Eo(e,r,l);s.length;)u=Mc(s),f.push(u.data),s=u.remainder;return{data:f,remainder:e.slice(l)}}}const gP=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function r0(e){let t="";for(let r=0;r<e.length;r++)t+=gP[e[r]];return t}function n0(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function mu(e){if(typeof e!="string")throw new TypeError("hexToBytes: expected string, got "+typeof e);if(e.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++){const o=r*2;t[r]=n0(e.slice(o,o+2))}return t}function xc(...e){if(e.length===1)return e[0];const t=e.reduce((o,s)=>o+s.length,0),r=new Uint8Array(t);for(let o=0,s=0;o<e.length;o++){const u=e[o];r.set(u,s),s+=u.length}return r}function i0(e){return new TextEncoder().encode(e)}function Dc(e){if(e<0)throw new Error("Invalid integer as argument, must be unsigned!");const t=e.toString(16);return t.length%2?`0${t}`:t}function pP(e){return e.length%2?`0${e}`:e}function o0(e){return e.length>=2&&e[0]==="0"&&e[1]==="x"}function bP(e){return typeof e!="string"?e:o0(e)?e.slice(2):e}function s0(e){if(e instanceof Uint8Array)return e;if(typeof e=="string")return o0(e)?mu(pP(bP(e))):i0(e);if(typeof e=="number"||typeof e=="bigint")return e?mu(Dc(e)):Uint8Array.from([]);if(e==null)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}An.utils={bytesToHex:r0,concatBytes:xc,hexToBytes:mu,utf8ToBytes:i0};An.RLP={encode:Od,decode:t0};var nn={},ht={},je={};Object.defineProperty(je,"__esModule",{value:!0});je.add5L=je.add5H=je.add4H=je.add4L=je.add3H=je.add3L=je.add=je.rotlBL=je.rotlBH=je.rotlSL=je.rotlSH=je.rotr32L=je.rotr32H=je.rotrBL=je.rotrBH=je.rotrSL=je.rotrSH=je.shrSL=je.shrSH=je.toBig=je.split=je.fromBig=void 0;const nu=BigInt(2**32-1),jc=BigInt(32);function Cd(e,t=!1){return t?{h:Number(e&nu),l:Number(e>>jc&nu)}:{h:Number(e>>jc&nu)|0,l:Number(e&nu)|0}}je.fromBig=Cd;function a0(e,t=!1){let r=new Uint32Array(e.length),o=new Uint32Array(e.length);for(let s=0;s<e.length;s++){const{h:u,l:f}=Cd(e[s],t);[r[s],o[s]]=[u,f]}return[r,o]}je.split=a0;const u0=(e,t)=>BigInt(e>>>0)<<jc|BigInt(t>>>0);je.toBig=u0;const f0=(e,t,r)=>e>>>r;je.shrSH=f0;const l0=(e,t,r)=>e<<32-r|t>>>r;je.shrSL=l0;const c0=(e,t,r)=>e>>>r|t<<32-r;je.rotrSH=c0;const d0=(e,t,r)=>e<<32-r|t>>>r;je.rotrSL=d0;const h0=(e,t,r)=>e<<64-r|t>>>r-32;je.rotrBH=h0;const g0=(e,t,r)=>e>>>r-32|t<<64-r;je.rotrBL=g0;const p0=(e,t)=>t;je.rotr32H=p0;const b0=(e,t)=>e;je.rotr32L=b0;const _0=(e,t,r)=>e<<r|t>>>32-r;je.rotlSH=_0;const y0=(e,t,r)=>t<<r|e>>>32-r;je.rotlSL=y0;const w0=(e,t,r)=>t<<r-32|e>>>64-r;je.rotlBH=w0;const m0=(e,t,r)=>e<<r-32|t>>>64-r;je.rotlBL=m0;function E0(e,t,r,o){const s=(t>>>0)+(o>>>0);return{h:e+r+(s/2**32|0)|0,l:s|0}}je.add=E0;const v0=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);je.add3L=v0;const S0=(e,t,r,o)=>t+r+o+(e/2**32|0)|0;je.add3H=S0;const R0=(e,t,r,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0);je.add4L=R0;const A0=(e,t,r,o,s)=>t+r+o+s+(e/2**32|0)|0;je.add4H=A0;const T0=(e,t,r,o,s)=>(e>>>0)+(t>>>0)+(r>>>0)+(o>>>0)+(s>>>0);je.add5L=T0;const I0=(e,t,r,o,s,u)=>t+r+o+s+u+(e/2**32|0)|0;je.add5H=I0;const _P={fromBig:Cd,split:a0,toBig:u0,shrSH:f0,shrSL:l0,rotrSH:c0,rotrSL:d0,rotrBH:h0,rotrBL:g0,rotr32H:p0,rotr32L:b0,rotlSH:_0,rotlSL:y0,rotlBH:w0,rotlBL:m0,add:E0,add3L:v0,add3H:S0,add4L:R0,add4H:A0,add5H:I0,add5L:T0};je.default=_P;Object.defineProperty(ht,"__esModule",{value:!0});ht.shake256=ht.shake128=ht.keccak_512=ht.keccak_384=ht.keccak_256=ht.keccak_224=ht.sha3_512=ht.sha3_384=ht.sha3_256=ht.sha3_224=ht.Keccak=ht.keccakP=void 0;const vo=Ct,Bs=je,zn=Qn,O0=[],C0=[],L0=[],yP=BigInt(0),ys=BigInt(1),wP=BigInt(2),mP=BigInt(7),EP=BigInt(256),vP=BigInt(113);for(let e=0,t=ys,r=1,o=0;e<24;e++){[r,o]=[o,(2*r+3*o)%5],O0.push(2*(5*o+r)),C0.push((e+1)*(e+2)/2%64);let s=yP;for(let u=0;u<7;u++)t=(t<<ys^(t>>mP)*vP)%EP,t&wP&&(s^=ys<<(ys<<BigInt(u))-ys);L0.push(s)}const[SP,RP]=(0,Bs.split)(L0,!0),pb=(e,t,r)=>r>32?(0,Bs.rotlBH)(e,t,r):(0,Bs.rotlSH)(e,t,r),bb=(e,t,r)=>r>32?(0,Bs.rotlBL)(e,t,r):(0,Bs.rotlSL)(e,t,r);function P0(e,t=24){const r=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let f=0;f<10;f++)r[f]=e[f]^e[f+10]^e[f+20]^e[f+30]^e[f+40];for(let f=0;f<10;f+=2){const h=(f+8)%10,l=(f+2)%10,p=r[l],b=r[l+1],w=pb(p,b,1)^r[h],I=bb(p,b,1)^r[h+1];for(let A=0;A<50;A+=10)e[f+A]^=w,e[f+A+1]^=I}let s=e[2],u=e[3];for(let f=0;f<24;f++){const h=C0[f],l=pb(s,u,h),p=bb(s,u,h),b=O0[f];s=e[b],u=e[b+1],e[b]=l,e[b+1]=p}for(let f=0;f<50;f+=10){for(let h=0;h<10;h++)r[h]=e[f+h];for(let h=0;h<10;h++)e[f+h]^=~r[(h+2)%10]&r[(h+4)%10]}e[0]^=SP[o],e[1]^=RP[o]}r.fill(0)}ht.keccakP=P0;class qs extends zn.Hash{constructor(t,r,o,s=!1,u=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=o,this.enableXOF=s,this.rounds=u,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,vo.number)(o),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,zn.u32)(this.state)}keccak(){zn.isLE||(0,zn.byteSwap32)(this.state32),P0(this.state32,this.rounds),zn.isLE||(0,zn.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,vo.exists)(this);const{blockLen:r,state:o}=this;t=(0,zn.toBytes)(t);const s=t.length;for(let u=0;u<s;){const f=Math.min(r-this.pos,s-u);for(let h=0;h<f;h++)o[this.pos++]^=t[u++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:r,pos:o,blockLen:s}=this;t[o]^=r,r&128&&o===s-1&&this.keccak(),t[s-1]^=128,this.keccak()}writeInto(t){(0,vo.exists)(this,!1),(0,vo.bytes)(t),this.finish();const r=this.state,{blockLen:o}=this;for(let s=0,u=t.length;s<u;){this.posOut>=o&&this.keccak();const f=Math.min(o-this.posOut,u-s);t.set(r.subarray(this.posOut,this.posOut+f),s),this.posOut+=f,s+=f}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,vo.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,vo.output)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:r,suffix:o,outputLen:s,rounds:u,enableXOF:f}=this;return t||(t=new qs(r,o,s,f,u)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=u,t.suffix=o,t.outputLen=s,t.enableXOF=f,t.destroyed=this.destroyed,t}}ht.Keccak=qs;const Ti=(e,t,r)=>(0,zn.wrapConstructor)(()=>new qs(t,e,r));ht.sha3_224=Ti(6,144,224/8);ht.sha3_256=Ti(6,136,256/8);ht.sha3_384=Ti(6,104,384/8);ht.sha3_512=Ti(6,72,512/8);ht.keccak_224=Ti(1,144,224/8);ht.keccak_256=Ti(1,136,256/8);ht.keccak_384=Ti(1,104,384/8);ht.keccak_512=Ti(1,72,512/8);const B0=(e,t,r)=>(0,zn.wrapXOFConstructorWithOpts)((o={})=>new qs(t,e,o.dkLen===void 0?r:o.dkLen,!0));ht.shake128=B0(31,168,128/8);ht.shake256=B0(31,136,256/8);var Eu={exports:{}};Eu.exports;(function(e,t){var r=z.commonjsGlobal&&z.commonjsGlobal.__importDefault||function(I){return I&&I.__esModule?I:{default:I}};Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=t.utf8ToBytes=t.createView=t.concatBytes=t.toHex=t.bytesToHex=t.assertBytes=t.assertBool=void 0,t.bytesToUtf8=l,t.hexToBytes=p,t.equalsBytes=b,t.wrapHash=w;const o=r(Ct),s=Qn,u=o.default.bool;t.assertBool=u;const f=o.default.bytes;t.assertBytes=f;var h=Qn;Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return h.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return h.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return h.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return h.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return h.utf8ToBytes}});function l(I){if(!(I instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof I}`);return new TextDecoder().decode(I)}function p(I){const A=I.startsWith("0x")?I.substring(2):I;return(0,s.hexToBytes)(A)}function b(I,A){if(I.length!==A.length)return!1;for(let x=0;x<I.length;x++)if(I[x]!==A[x])return!1;return!0}function w(I){return A=>(o.default.bytes(A),I(A))}t.crypto=(()=>{const I=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,A=typeof Ze.commonjsRequire=="function"&&Ze.commonjsRequire.bind(e);return{node:A&&!I?A("crypto"):void 0,web:I}})()})(Eu,Eu.exports);var N0=Eu.exports;Object.defineProperty(nn,"__esModule",{value:!0});nn.keccak512=nn.keccak384=nn.keccak256=nn.keccak224=void 0;const Ns=ht,tf=N0;nn.keccak224=(0,tf.wrapHash)(Ns.keccak_224);nn.keccak256=(()=>{const e=(0,tf.wrapHash)(Ns.keccak_256);return e.create=Ns.keccak_256.create,e})();nn.keccak384=(0,tf.wrapHash)(Ns.keccak_384);nn.keccak512=(0,tf.wrapHash)(Ns.keccak_512);var eo={},Hr={},gt={};Object.defineProperty(gt,"__esModule",{value:!0});gt.isHexString=gt.getKeys=gt.fromAscii=gt.fromUtf8=gt.toAscii=gt.arrayContainsArray=gt.getBinarySize=gt.padToEven=gt.stripHexPrefix=gt.isHexPrefixed=void 0;function $0(e){if(typeof e!="string")throw new Error(`[isHexPrefixed] input must be type 'string', received type ${typeof e}`);return e[0]==="0"&&e[1]==="x"}gt.isHexPrefixed=$0;const AP=e=>{if(typeof e!="string")throw new Error(`[stripHexPrefix] input must be type 'string', received ${typeof e}`);return $0(e)?e.slice(2):e};gt.stripHexPrefix=AP;function M0(e){let t=e;if(typeof t!="string")throw new Error(`[padToEven] value must be type 'string', received ${typeof t}`);return t.length%2&&(t=`0${t}`),t}gt.padToEven=M0;function TP(e){if(typeof e!="string")throw new Error(`[getBinarySize] method requires input type 'string', received ${typeof e}`);return z.dist.Buffer.byteLength(e,"utf8")}gt.getBinarySize=TP;function IP(e,t,r){if(Array.isArray(e)!==!0)throw new Error(`[arrayContainsArray] method requires input 'superset' to be an array, got type '${typeof e}'`);if(Array.isArray(t)!==!0)throw new Error(`[arrayContainsArray] method requires input 'subset' to be an array, got type '${typeof t}'`);return t[r===!0?"some":"every"](o=>e.indexOf(o)>=0)}gt.arrayContainsArray=IP;function OP(e){let t="",r=0;const o=e.length;for(e.substring(0,2)==="0x"&&(r=2);r<o;r+=2){const s=parseInt(e.substr(r,2),16);t+=String.fromCharCode(s)}return t}gt.toAscii=OP;function CP(e){const t=z.dist.Buffer.from(e,"utf8");return`0x${M0(t.toString("hex")).replace(/^0+|0+$/g,"")}`}gt.fromUtf8=CP;function LP(e){let t="";for(let r=0;r<e.length;r++){const s=e.charCodeAt(r).toString(16);t+=s.length<2?`0${s}`:s}return`0x${t}`}gt.fromAscii=LP;function PP(e,t,r){if(!Array.isArray(e))throw new Error(`[getKeys] method expects input 'params' to be an array, got ${typeof e}`);if(typeof t!="string")throw new Error(`[getKeys] method expects input 'key' to be type 'string', got ${typeof e}`);const o=[];for(let s=0;s<e.length;s++){let u=e[s][t];if(r===!0&&!u)u="";else if(typeof u!="string")throw new Error(`invalid abi - expected type 'string', received ${typeof u}`);o.push(u)}return o}gt.getKeys=PP;function BP(e,t){return!(typeof e!="string"||!e.match(/^0x[0-9A-Fa-f]*$/)||typeof t<"u"&&t>0&&e.length!==2+2*t)}gt.isHexString=BP;Object.defineProperty(Hr,"__esModule",{value:!0});Hr.assertIsString=Hr.assertIsArray=Hr.assertIsBuffer=Hr.assertIsHexString=void 0;const NP=gt,$P=function(e){if(!(0,NP.isHexString)(e)){const t=`This method only supports 0x-prefixed hex strings but input was: ${e}`;throw new Error(t)}};Hr.assertIsHexString=$P;const MP=function(e){if(!z.dist.Buffer.isBuffer(e)){const t=`This method only supports Buffer but input was: ${e}`;throw new Error(t)}};Hr.assertIsBuffer=MP;const xP=function(e){if(!Array.isArray(e)){const t=`This method only supports number arrays but input was: ${e}`;throw new Error(t)}};Hr.assertIsArray=xP;const DP=function(e){if(typeof e!="string"){const t=`This method only supports strings but input was: ${e}`;throw new Error(t)}};Hr.assertIsString=DP;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.intToUnpaddedBuffer=e.bigIntToUnpaddedBuffer=e.bigIntToHex=e.bufArrToArr=e.arrToBufArr=e.validateNoLeadingZeroes=e.baToJSON=e.toUtf8=e.short=e.addHexPrefix=e.toUnsigned=e.fromSigned=e.bufferToInt=e.bigIntToBuffer=e.bufferToBigInt=e.bufferToHex=e.toBuffer=e.unpadHexString=e.unpadArray=e.unpadBuffer=e.setLengthRight=e.setLengthLeft=e.zeros=e.intToBuffer=e.intToHex=void 0;const t=Hr,r=gt,o=function($){if(!Number.isSafeInteger($)||$<0)throw new Error(`Received an invalid integer type: ${$}`);return`0x${$.toString(16)}`};e.intToHex=o;const s=function($){const q=(0,e.intToHex)($);return z.dist.Buffer.from((0,r.padToEven)(q.slice(2)),"hex")};e.intToBuffer=s;const u=function($){return z.dist.Buffer.allocUnsafe($).fill(0)};e.zeros=u;const f=function($,q,Y){const G=(0,e.zeros)(q);return Y?$.length<q?($.copy(G),G):$.slice(0,q):$.length<q?($.copy(G,q-$.length),G):$.slice(-q)},h=function($,q){return(0,t.assertIsBuffer)($),f($,q,!1)};e.setLengthLeft=h;const l=function($,q){return(0,t.assertIsBuffer)($),f($,q,!0)};e.setLengthRight=l;const p=function($){let q=$[0];for(;$.length>0&&q.toString()==="0";)$=$.slice(1),q=$[0];return $},b=function($){return(0,t.assertIsBuffer)($),p($)};e.unpadBuffer=b;const w=function($){return(0,t.assertIsArray)($),p($)};e.unpadArray=w;const I=function($){return(0,t.assertIsHexString)($),$=(0,r.stripHexPrefix)($),"0x"+p($)};e.unpadHexString=I;const A=function($){if($==null)return z.dist.Buffer.allocUnsafe(0);if(z.dist.Buffer.isBuffer($)||Array.isArray($)||$ instanceof Uint8Array)return z.dist.Buffer.from($);if(typeof $=="string"){if(!(0,r.isHexString)($))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${$}`);return z.dist.Buffer.from((0,r.padToEven)((0,r.stripHexPrefix)($)),"hex")}if(typeof $=="number")return(0,e.intToBuffer)($);if(typeof $=="bigint"){if($<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${$}`);let q=$.toString(16);return q.length%2&&(q="0"+q),z.dist.Buffer.from(q,"hex")}if($.toArray)return z.dist.Buffer.from($.toArray());if($.toBuffer)return z.dist.Buffer.from($.toBuffer());throw new Error("invalid type")};e.toBuffer=A;const x=function($){return $=(0,e.toBuffer)($),"0x"+$.toString("hex")};e.bufferToHex=x;function v($){const q=(0,e.bufferToHex)($);return BigInt(q==="0x"?0:q)}e.bufferToBigInt=v;function C($){return(0,e.toBuffer)("0x"+$.toString(16))}e.bigIntToBuffer=C;const B=function($){const q=Number(v($));if(!Number.isSafeInteger(q))throw new Error("Number exceeds 53 bits");return q};e.bufferToInt=B;const P=function($){return BigInt.asIntN(256,v($))};e.fromSigned=P;const S=function($){return C(BigInt.asUintN(256,$))};e.toUnsigned=S;const m=function($){return typeof $!="string"||(0,r.isHexPrefixed)($)?$:"0x"+$};e.addHexPrefix=m;function j($,q=50){const Y=z.dist.Buffer.isBuffer($)?$.toString("hex"):$;return Y.length<=q?Y:Y.slice(0,q)+"…"}e.short=j;const Q=function($){const q=/^(00)+|(00)+$/g;if($=(0,r.stripHexPrefix)($),$.length%2!==0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return z.dist.Buffer.from($.replace(q,""),"hex").toString("utf8")};e.toUtf8=Q;const ce=function($){if(z.dist.Buffer.isBuffer($))return`0x${$.toString("hex")}`;if($ instanceof Array){const q=[];for(let Y=0;Y<$.length;Y++)q.push((0,e.baToJSON)($[Y]));return q}};e.baToJSON=ce;const ue=function($){for(const[q,Y]of Object.entries($))if(Y!==void 0&&Y.length>0&&Y[0]===0)throw new Error(`${q} cannot have leading zeroes, received: ${Y.toString("hex")}`)};e.validateNoLeadingZeroes=ue;function te($){return Array.isArray($)?$.map(q=>te(q)):z.dist.Buffer.from($)}e.arrToBufArr=te;function Se($){return Array.isArray($)?$.map(q=>Se(q)):Uint8Array.from($??[])}e.bufArrToArr=Se;const me=$=>"0x"+$.toString(16);e.bigIntToHex=me;function F($){return(0,e.unpadBuffer)(C($))}e.bigIntToUnpaddedBuffer=F;function U($){return(0,e.unpadBuffer)((0,e.intToBuffer)($))}e.intToUnpaddedBuffer=U})(eo);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.accountBodyToRLP=e.accountBodyToSlim=e.accountBodyFromSlim=e.isZeroAddress=e.zeroAddress=e.importPublic=e.privateToAddress=e.privateToPublic=e.publicToAddress=e.pubToAddress=e.isValidPublic=e.isValidPrivate=e.generateAddress2=e.generateAddress=e.isValidChecksumAddress=e.toChecksumAddress=e.isValidAddress=e.Account=void 0;const t=An,r=nn,o=Vu,s=N0,u=eo,f=Gu,h=Hr,l=gt,p=BigInt(0);class b{constructor(U=p,$=p,q=f.KECCAK256_RLP,Y=f.KECCAK256_NULL){this.nonce=U,this.balance=$,this.storageRoot=q,this.codeHash=Y,this._validate()}static fromAccountData(U){const{nonce:$,balance:q,storageRoot:Y,codeHash:G}=U;return new b($!==void 0?(0,u.bufferToBigInt)((0,u.toBuffer)($)):void 0,q!==void 0?(0,u.bufferToBigInt)((0,u.toBuffer)(q)):void 0,Y!==void 0?(0,u.toBuffer)(Y):void 0,G!==void 0?(0,u.toBuffer)(G):void 0)}static fromRlpSerializedAccount(U){const $=(0,u.arrToBufArr)(t.RLP.decode(Uint8Array.from(U)));if(!Array.isArray($))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray($)}static fromValuesArray(U){const[$,q,Y,G]=U;return new b((0,u.bufferToBigInt)($),(0,u.bufferToBigInt)(q),Y,G)}_validate(){if(this.nonce<p)throw new Error("nonce must be greater than zero");if(this.balance<p)throw new Error("balance must be greater than zero");if(this.storageRoot.length!==32)throw new Error("storageRoot must have a length of 32");if(this.codeHash.length!==32)throw new Error("codeHash must have a length of 32")}raw(){return[(0,u.bigIntToUnpaddedBuffer)(this.nonce),(0,u.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return z.dist.Buffer.from(t.RLP.encode((0,u.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(f.KECCAK256_NULL)}isEmpty(){return this.balance===p&&this.nonce===p&&this.codeHash.equals(f.KECCAK256_NULL)}}e.Account=b;const w=function(F){try{(0,h.assertIsString)(F)}catch{return!1}return/^0x[0-9a-fA-F]{40}$/.test(F)};e.isValidAddress=w;const I=function(F,U){(0,h.assertIsHexString)(F);const $=(0,l.stripHexPrefix)(F).toLowerCase();let q="";U!==void 0&&(q=(0,u.bufferToBigInt)((0,u.toBuffer)(U)).toString()+"0x");const Y=z.dist.Buffer.from(q+$,"utf8"),G=(0,s.bytesToHex)((0,r.keccak256)(Y));let ne="0x";for(let H=0;H<$.length;H++)parseInt(G[H],16)>=8?ne+=$[H].toUpperCase():ne+=$[H];return ne};e.toChecksumAddress=I;const A=function(F,U){return(0,e.isValidAddress)(F)&&(0,e.toChecksumAddress)(F,U)===F};e.isValidChecksumAddress=A;const x=function(F,U){return(0,h.assertIsBuffer)(F),(0,h.assertIsBuffer)(U),(0,u.bufferToBigInt)(U)===BigInt(0)?z.dist.Buffer.from((0,r.keccak256)(t.RLP.encode((0,u.bufArrToArr)([F,null])))).slice(-20):z.dist.Buffer.from((0,r.keccak256)(t.RLP.encode((0,u.bufArrToArr)([F,U])))).slice(-20)};e.generateAddress=x;const v=function(F,U,$){if((0,h.assertIsBuffer)(F),(0,h.assertIsBuffer)(U),(0,h.assertIsBuffer)($),F.length!==20)throw new Error("Expected from to be of length 20");if(U.length!==32)throw new Error("Expected salt to be of length 32");const q=(0,r.keccak256)(z.dist.Buffer.concat([z.dist.Buffer.from("ff","hex"),F,U,(0,r.keccak256)($)]));return(0,u.toBuffer)(q).slice(-20)};e.generateAddress2=v;const C=function(F){return o.secp256k1.utils.isValidPrivateKey(F)};e.isValidPrivate=C;const B=function(F,U=!1){if((0,h.assertIsBuffer)(F),F.length===64)try{return o.secp256k1.ProjectivePoint.fromHex(z.dist.Buffer.concat([z.dist.Buffer.from([4]),F])),!0}catch{return!1}if(!U)return!1;try{return o.secp256k1.ProjectivePoint.fromHex(F),!0}catch{return!1}};e.isValidPublic=B;const P=function(F,U=!1){if((0,h.assertIsBuffer)(F),U&&F.length!==64&&(F=z.dist.Buffer.from(o.secp256k1.ProjectivePoint.fromHex(F).toRawBytes(!1).slice(1))),F.length!==64)throw new Error("Expected pubKey to be of length 64");return z.dist.Buffer.from((0,r.keccak256)(F)).slice(-20)};e.pubToAddress=P,e.publicToAddress=e.pubToAddress;const S=function(F){return(0,h.assertIsBuffer)(F),z.dist.Buffer.from(o.secp256k1.ProjectivePoint.fromPrivateKey(F).toRawBytes(!1).slice(1))};e.privateToPublic=S;const m=function(F){return(0,e.publicToAddress)((0,e.privateToPublic)(F))};e.privateToAddress=m;const j=function(F){return(0,h.assertIsBuffer)(F),F.length!==64&&(F=z.dist.Buffer.from(o.secp256k1.ProjectivePoint.fromHex(F).toRawBytes(!1).slice(1))),F};e.importPublic=j;const Q=function(){const U=(0,u.zeros)(20);return(0,u.bufferToHex)(U)};e.zeroAddress=Q;const ce=function(F){try{(0,h.assertIsString)(F)}catch{return!1}return(0,e.zeroAddress)()===F};e.isZeroAddress=ce;function ue(F){const[U,$,q,Y]=F;return[U,$,(0,u.arrToBufArr)(q).length===0?f.KECCAK256_RLP:q,(0,u.arrToBufArr)(Y).length===0?f.KECCAK256_NULL:Y]}e.accountBodyFromSlim=ue;const te=new Uint8Array(0);function Se(F){const[U,$,q,Y]=F;return[U,$,(0,u.arrToBufArr)(q).equals(f.KECCAK256_RLP)?te:q,(0,u.arrToBufArr)(Y).equals(f.KECCAK256_NULL)?te:Y]}e.accountBodyToSlim=Se;function me(F,U=!0){const $=U?ue(F):F;return(0,u.arrToBufArr)(t.RLP.encode($))}e.accountBodyToRLP=me})(Id);var Gs={};Object.defineProperty(Gs,"__esModule",{value:!0});Gs.Address=void 0;const ws=Id,iu=eo;class Kn{constructor(t){if(t.length!==20)throw new Error("Invalid address length");this.buf=t}static zero(){return new Kn((0,iu.zeros)(20))}static fromString(t){if(!(0,ws.isValidAddress)(t))throw new Error("Invalid address");return new Kn((0,iu.toBuffer)(t))}static fromPublicKey(t){if(!z.dist.Buffer.isBuffer(t))throw new Error("Public key should be Buffer");const r=(0,ws.pubToAddress)(t);return new Kn(r)}static fromPrivateKey(t){if(!z.dist.Buffer.isBuffer(t))throw new Error("Private key should be Buffer");const r=(0,ws.privateToAddress)(t);return new Kn(r)}static generate(t,r){if(typeof r!="bigint")throw new Error("Expected nonce to be a bigint");return new Kn((0,ws.generateAddress)(t.buf,(0,iu.bigIntToBuffer)(r)))}static generate2(t,r,o){if(!z.dist.Buffer.isBuffer(r))throw new Error("Expected salt to be a Buffer");if(!z.dist.Buffer.isBuffer(o))throw new Error("Expected initCode to be a Buffer");return new Kn((0,ws.generateAddress2)(t.buf,r,o))}equals(t){return this.buf.equals(t.buf)}isZero(){return this.equals(Kn.zero())}isPrecompileOrSystemAddress(){const t=(0,iu.bufferToBigInt)(this.buf),r=BigInt(0),o=BigInt("0xffff");return t>=r&&t<=o}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return z.dist.Buffer.from(this.buf)}}Gs.Address=Kn;var rf={},Ld={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toType=e.TypeOutput=void 0;const t=eo,r=gt;var o;(function(u){u[u.Number=0]="Number",u[u.BigInt=1]="BigInt",u[u.Buffer=2]="Buffer",u[u.PrefixedHexString=3]="PrefixedHexString"})(o=e.TypeOutput||(e.TypeOutput={}));function s(u,f){if(u===null)return null;if(u===void 0)return;if(typeof u=="string"&&!(0,r.isHexString)(u))throw new Error(`A string must be provided with a 0x-prefix, given: ${u}`);if(typeof u=="number"&&!Number.isSafeInteger(u))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const h=(0,t.toBuffer)(u);switch(f){case o.Buffer:return h;case o.BigInt:return(0,t.bufferToBigInt)(h);case o.Number:{const l=(0,t.bufferToBigInt)(h);if(l>BigInt(Number.MAX_SAFE_INTEGER))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative output type)");return Number(l)}case o.PrefixedHexString:return(0,t.bufferToHex)(h);default:throw new Error("unknown outputType")}}e.toType=s})(Ld);Object.defineProperty(rf,"__esModule",{value:!0});rf.Withdrawal=void 0;const _b=Gs,ic=eo,Tt=Ld;class Rs{constructor(t,r,o,s){this.index=t,this.validatorIndex=r,this.address=o,this.amount=s}static fromWithdrawalData(t){const{index:r,validatorIndex:o,address:s,amount:u}=t,f=(0,Tt.toType)(r,Tt.TypeOutput.BigInt),h=(0,Tt.toType)(o,Tt.TypeOutput.BigInt),l=new _b.Address((0,Tt.toType)(s,Tt.TypeOutput.Buffer)),p=(0,Tt.toType)(u,Tt.TypeOutput.BigInt);return new Rs(f,h,l,p)}static fromValuesArray(t){if(t.length!==4)throw Error(`Invalid withdrawalArray length expected=4 actual=${t.length}`);const[r,o,s,u]=t;return Rs.fromWithdrawalData({index:r,validatorIndex:o,address:s,amount:u})}static toBufferArray(t){const{index:r,validatorIndex:o,address:s,amount:u}=t,f=(0,Tt.toType)(r,Tt.TypeOutput.BigInt)===BigInt(0)?z.dist.Buffer.alloc(0):(0,Tt.toType)(r,Tt.TypeOutput.Buffer),h=(0,Tt.toType)(o,Tt.TypeOutput.BigInt)===BigInt(0)?z.dist.Buffer.alloc(0):(0,Tt.toType)(o,Tt.TypeOutput.Buffer);let l;s instanceof _b.Address?l=s.buf:l=(0,Tt.toType)(s,Tt.TypeOutput.Buffer);const p=(0,Tt.toType)(u,Tt.TypeOutput.BigInt)===BigInt(0)?z.dist.Buffer.alloc(0):(0,Tt.toType)(u,Tt.TypeOutput.Buffer);return[f,h,l,p]}raw(){return Rs.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,ic.bigIntToHex)(this.index),validatorIndex:(0,ic.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,ic.bigIntToHex)(this.amount)}}}rf.Withdrawal=Rs;var er={};Object.defineProperty(er,"__esModule",{value:!0});er.hashPersonalMessage=er.isValidSignature=er.fromRpcSig=er.toCompactSig=er.toRpcSig=er.ecrecover=er.ecsign=void 0;const jP=nn,x0=Vu,br=eo,oc=Gu,UP=Hr;function kP(e,t,r){const o=x0.secp256k1.sign(e,t),s=o.toCompactRawBytes(),u=z.dist.Buffer.from(s.slice(0,32)),f=z.dist.Buffer.from(s.slice(32,64)),h=r===void 0?BigInt(o.recovery+27):BigInt(o.recovery+35)+BigInt(r)*BigInt(2);return{r:u,s:f,v:h}}er.ecsign=kP;function nf(e,t){return e===BigInt(0)||e===BigInt(1)?e:t===void 0?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function of(e){return e===BigInt(0)||e===BigInt(1)}const FP=function(e,t,r,o,s){const u=z.dist.Buffer.concat([(0,br.setLengthLeft)(r,32),(0,br.setLengthLeft)(o,32)],64),f=nf(t,s);if(!of(f))throw new Error("Invalid signature v value");const l=x0.secp256k1.Signature.fromCompact(u).addRecoveryBit(Number(f)).recoverPublicKey(e);return z.dist.Buffer.from(l.toRawBytes(!1).slice(1))};er.ecrecover=FP;const HP=function(e,t,r,o){const s=nf(e,o);if(!of(s))throw new Error("Invalid signature v value");return(0,br.bufferToHex)(z.dist.Buffer.concat([(0,br.setLengthLeft)(t,32),(0,br.setLengthLeft)(r,32),(0,br.toBuffer)(e)]))};er.toRpcSig=HP;const WP=function(e,t,r,o){const s=nf(e,o);if(!of(s))throw new Error("Invalid signature v value");let u=r;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(u=z.dist.Buffer.from(r),u[0]|=128),(0,br.bufferToHex)(z.dist.Buffer.concat([(0,br.setLengthLeft)(t,32),(0,br.setLengthLeft)(u,32)]))};er.toCompactSig=WP;const qP=function(e){const t=(0,br.toBuffer)(e);let r,o,s;if(t.length>=65)r=t.slice(0,32),o=t.slice(32,64),s=(0,br.bufferToBigInt)(t.slice(64));else if(t.length===64)r=t.slice(0,32),o=t.slice(32,64),s=BigInt((0,br.bufferToInt)(t.slice(32,33))>>7),o[0]&=127;else throw new Error("Invalid signature length");return s<27&&(s=s+BigInt(27)),{v:s,r,s:o}};er.fromRpcSig=qP;const GP=function(e,t,r,o=!0,s){if(t.length!==32||r.length!==32||!of(nf(e,s)))return!1;const u=(0,br.bufferToBigInt)(t),f=(0,br.bufferToBigInt)(r);return!(u===BigInt(0)||u>=oc.SECP256K1_ORDER||f===BigInt(0)||f>=oc.SECP256K1_ORDER||o&&f>=oc.SECP256K1_ORDER_DIV_2)};er.isValidSignature=GP;const VP=function(e){(0,UP.assertIsBuffer)(e);const t=z.dist.Buffer.from(`Ethereum Signed Message:
3
3
  ${e.length}`,"utf-8");return z.dist.Buffer.from((0,jP.keccak256)(z.dist.Buffer.concat([t,e])))};er.hashPersonalMessage=VP;var D0={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.compactBytesToNibbles=e.bytesToNibbles=e.nibblesToCompactBytes=e.nibblesToBytes=e.hasTerminator=void 0;const t=f=>f.length>0&&f[f.length-1]===16;e.hasTerminator=t;const r=(f,h)=>{for(let l=0,p=0;p<f.length;l+=1,p+=2)h[l]=f[p]<<4|f[p+1]};e.nibblesToBytes=r;const o=f=>{let h=0;(0,e.hasTerminator)(f)&&(h=1,f=f.subarray(0,f.length-1));const l=new Uint8Array(f.length/2+1);return l[0]=h<<5,(f.length&1)===1&&(l[0]|=16,l[0]|=f[0],f=f.subarray(1)),(0,e.nibblesToBytes)(f,l.subarray(1)),l};e.nibblesToCompactBytes=o;const s=f=>{const h=f.length*2+1,l=new Uint8Array(h);for(let p=0;p<f.length;p++){const b=f[p];l[p*2]=b/16,l[p*2+1]=b%16}return l[h-1]=16,l};e.bytesToNibbles=s;const u=f=>{if(f.length===0)return f;let h=(0,e.bytesToNibbles)(f);h[0]<2&&(h=h.subarray(0,h.length-1));const l=2-(h[0]&1);return h.subarray(l)};e.compactBytesToNibbles=u})(D0);var sf={};Object.defineProperty(sf,"__esModule",{value:!0});sf.AsyncEventEmitter=void 0;const zP=Ze.eventsExports;async function KP(e,t,r){let o;for await(const s of t)try{s.length<2?s.call(e,r):await new Promise((u,f)=>{s.call(e,r,h=>{h?f(h):u()})})}catch(u){o=u}if(o)throw o}class JP extends zP.EventEmitter{emit(t,...r){let[o,s]=r;const u=this;let f=u._events[t]??[];return s===void 0&&typeof o=="function"&&(s=o,o=void 0),(t==="newListener"||t==="removeListener")&&(o={event:o,fn:s},s=void 0),f=Array.isArray(f)?f:[f],KP(u,f.slice(),o).then(s).catch(s),u.listenerCount(t)>0}once(t,r){const o=this;let s;if(typeof r!="function")throw new TypeError("listener must be a function");return r.length>=2?s=function(u,f){o.removeListener(t,s),r(u,f)}:s=function(u){o.removeListener(t,s),r(u,s)},o.on(t,s),o}first(t,r){let o=this._events[t]??[];if(typeof r!="function")throw new TypeError("listener must be a function");return Array.isArray(o)||(this._events[t]=o=[o]),o.unshift(r),this}before(t,r,o){return this.beforeOrAfter(t,r,o)}after(t,r,o){return this.beforeOrAfter(t,r,o,"after")}beforeOrAfter(t,r,o,s){let u=this._events[t]??[],f,h;const l=s==="after"?1:0;if(typeof o!="function")throw new TypeError("listener must be a function");if(typeof r!="function")throw new TypeError("target must be a function");for(Array.isArray(u)||(this._events[t]=u=[u]),h=u.length,f=u.length;f--;)if(u[f]===r){h=f+l;break}return u.splice(h,0,o),this}on(t,r){return super.on(t,r)}addListener(t,r){return super.addListener(t,r)}prependListener(t,r){return super.prependListener(t,r)}prependOnceListener(t,r){return super.prependOnceListener(t,r)}removeAllListeners(t){return super.removeAllListeners(t)}removeListener(t,r){return super.removeListener(t,r)}eventNames(){return super.eventNames()}listeners(t){return super.listeners(t)}listenerCount(t){return super.listenerCount(t)}getMaxListeners(){return super.getMaxListeners()}setMaxListeners(t){return super.setMaxListeners(t)}}sf.AsyncEventEmitter=JP;var af={};Object.defineProperty(af,"__esModule",{value:!0});af.Lock=void 0;class YP{constructor(){this.permits=1,this.promiseResolverQueue=[]}async acquire(){return this.permits>0?(this.permits-=1,Promise.resolve(!0)):new Promise(t=>this.promiseResolverQueue.push(t))}release(){if(this.permits+=1,this.permits>1&&this.promiseResolverQueue.length>0)console.warn("Lock.permits should never be > 0 when there is someone waiting.");else if(this.permits===1&&this.promiseResolverQueue.length>0){this.permits-=1;const t=this.promiseResolverQueue.shift();t&&t(!0)}}}af.Lock=YP;var xo={},Vi={};Object.defineProperty(Vi,"__esModule",{value:!0});Vi.InvalidStatusCodeError=Vi.InvalidCertError=void 0;const j0=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class Uc extends Error{constructor(t,r){super(t),this.fingerprint256=r}}Vi.InvalidCertError=Uc;class Pd extends Error{constructor(t){super(`Request Failed. Status Code: ${t}`),this.statusCode=t}}Vi.InvalidStatusCodeError=Pd;function U0(e,t){if(!t||t==="text"||t==="json")try{let r=new TextDecoder("utf8",{fatal:!0}).decode(e);if(t==="text")return r;try{return JSON.parse(r)}catch(o){if(t==="json")throw o;return r}}catch(r){if(t==="text"||t==="json")throw r}return e}let yb={};function kc(e,t){var I;let r={...j0,...t};const o=hs.streamHttp,s=hs.httpsBrowserifyExports,u=hs.lib,{promisify:f}=hs.util,{resolve:h}=hs.urlExports,l=!!/^https/.test(e);let p={method:r.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}};const b=A=>A.replace(/:| /g,"").toLowerCase();if(r.keepAlive){const A={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},x=[l,l&&((I=r.sslPinnedCertificates)==null?void 0:I.map(v=>b(v)).sort())].join();p.agent=yb[x]||(yb[x]=new(l?s:o).Agent(A))}r.type==="json"&&(p.headers["Content-Type"]="application/json"),r.data&&(r.method||(p.method="POST"),p.body=r.type==="json"?JSON.stringify(r.data):r.data),p.headers={...p.headers,...r.headers},r.sslAllowSelfSigned&&(p.rejectUnauthorized=!1);const w=async A=>{const x=A.statusCode;if(r.redirect&&300<=x&&x<400&&A.headers.location){if(r._redirectCount==10)throw new Error("Request failed. Too much redirects.");return r._redirectCount+=1,await kc(h(e,A.headers.location),r)}if(r.expectStatusCode&&x!==r.expectStatusCode)throw A.resume(),new Pd(x);let v=[];for await(const S of A)v.push(S);let C=z.dist.Buffer.concat(v);const B=A.headers["content-encoding"];B==="br"&&(C=await f(u.brotliDecompress)(C)),(B==="gzip"||B==="deflate")&&(C=await f(u.unzip)(C));const P=U0(C,r.type);return r.full?{headers:A.headers,status:x,body:P}:P};return new Promise((A,x)=>{var S;const v=async m=>{if(m&&m.code==="DEPTH_ZERO_SELF_SIGNED_CERT")try{await kc(e,{...r,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(j){j&&j.fingerprint256&&(m=new Uc(`Self-signed SSL certificate: ${j.fingerprint256}`,j.fingerprint256))}x(m)},C=(l?s:o).request(e,p,m=>{m.on("error",v),(async()=>{try{A(await w(m))}catch(j){x(j)}})()});C.on("error",v);const B=(S=r.sslPinnedCertificates)==null?void 0:S.map(m=>b(m)),P=m=>{var Q;const j=b(((Q=m.getPeerCertificate())==null?void 0:Q.fingerprint256)||"");if(!(!j&&m.isSessionReused())&&!B.includes(j))return C.emit("error",new Uc(`Invalid SSL certificate: ${j} Expected: ${B}`,j)),C.abort()};r.sslPinnedCertificates&&C.on("socket",m=>{m.listeners("secureConnect").map(Q=>(Q.name||"").replace("bound ","")).includes("mfetchSecureConnect")||m.on("secureConnect",P.bind(null,m))}),r.keepAlive&&C.setNoDelay(!0),p.body&&C.write(p.body),C.end()})}const XP=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map(e=>e.toLowerCase())),ZP=new Set(["Accept-Charset","Accept-Encoding","Access-Control-Request-Headers","Access-Control-Request-Method","Connection","Content-Length","Cookie","Cookie2","Date","DNT","Expect","Host","Keep-Alive","Origin","Referer","TE","Trailer","Transfer-Encoding","Upgrade","Via"].map(e=>e.toLowerCase()));async function QP(e,t){let r={...j0,...t};const o=new Headers;r.type==="json"&&o.set("Content-Type","application/json");let s=new URL(e);if(s.username){const l=btoa(`${s.username}:${s.password}`);o.set("Authorization",`Basic ${l}`),s.username="",s.password=""}e=""+s;for(let l in r.headers){const p=l.toLowerCase();(XP.has(p)||r.cors&&!ZP.has(p))&&o.set(l,r.headers[l])}let u={headers:o,redirect:r.redirect?"follow":"manual"};r.referrer||(u.referrerPolicy="no-referrer"),r.cors&&(u.mode="cors"),r.data&&(r.method||(u.method="POST"),u.body=r.type==="json"?JSON.stringify(r.data):r.data);const f=await fetch(e,u);if(r.expectStatusCode&&f.status!==r.expectStatusCode)throw new Pd(f.status);const h=U0(new Uint8Array(await f.arrayBuffer()),r.type);return r.full?{headers:Object.fromEntries(f.headers.entries()),status:f.status,body:h}:h}const eB=!!(typeof z.dist.process=="object"&&z.dist.process.versions&&z.dist.process.versions.node&&z.dist.process.versions.v8);function tB(e,t){return(eB?kc:QP)(e,t)}Vi.default=tB;Object.defineProperty(xo,"__esModule",{value:!0});xo.getProvider=xo.fetchFromProvider=void 0;const rB=Vi,nB=async(e,t)=>(await(0,rB.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result;xo.fetchFromProvider=nB;const iB=e=>{var t;if(typeof e=="string")return e;if(((t=e==null?void 0:e.connection)==null?void 0:t.url)!==void 0)return e.connection.url;throw new Error("Must provide valid provider URL or Web3Provider")};xo.getProvider=iB;(function(e){var t=z.commonjsGlobal&&z.commonjsGlobal.__createBinding||(Object.create?function(s,u,f,h){h===void 0&&(h=f);var l=Object.getOwnPropertyDescriptor(u,f);(!l||("get"in l?!u.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return u[f]}}),Object.defineProperty(s,h,l)}:function(s,u,f,h){h===void 0&&(h=f),s[h]=u[f]}),r=z.commonjsGlobal&&z.commonjsGlobal.__exportStar||function(s,u){for(var f in s)f!=="default"&&!Object.prototype.hasOwnProperty.call(u,f)&&t(u,s,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.toAscii=e.stripHexPrefix=e.padToEven=e.isHexString=e.isHexPrefixed=e.getKeys=e.getBinarySize=e.fromUtf8=e.fromAscii=e.arrayContainsArray=void 0,r(Gu,e),r(ef,e),r(Id,e),r(Gs,e),r(rf,e),r(er,e),r(eo,e),r(Ld,e),r(D0,e),r(sf,e);var o=gt;Object.defineProperty(e,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(e,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(e,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(e,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(e,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(e,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(e,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(e,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(e,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(e,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),r(af,e),r(xo,e)})(mL);var k0={exports:{}};(function(e){(function(t,r){e.exports?e.exports=r():t.log=r()})(z.commonjsGlobal,function(){var t=function(){},r="undefined",o=typeof window!==r&&typeof window.navigator!==r&&/Trident\/|MSIE /.test(window.navigator.userAgent),s=["trace","debug","info","warn","error"],u={},f=null;function h(v,C){var B=v[C];if(typeof B.bind=="function")return B.bind(v);try{return Function.prototype.bind.call(B,v)}catch{return function(){return Function.prototype.apply.apply(B,[v,arguments])}}}function l(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function p(v){return v==="debug"&&(v="log"),typeof console===r?!1:v==="trace"&&o?l:console[v]!==void 0?h(console,v):console.log!==void 0?h(console,"log"):t}function b(){for(var v=this.getLevel(),C=0;C<s.length;C++){var B=s[C];this[B]=C<v?t:this.methodFactory(B,v,this.name)}if(this.log=this.debug,typeof console===r&&v<this.levels.SILENT)return"No console available for logging"}function w(v){return function(){typeof console!==r&&(b.call(this),this[v].apply(this,arguments))}}function I(v,C,B){return p(v)||w.apply(this,arguments)}function A(v,C){var B=this,P,S,m,j="loglevel";typeof v=="string"?j+=":"+v:typeof v=="symbol"&&(j=void 0);function Q(me){var F=(s[me]||"silent").toUpperCase();if(!(typeof window===r||!j)){try{window.localStorage[j]=F;return}catch{}try{window.document.cookie=encodeURIComponent(j)+"="+F+";"}catch{}}}function ce(){var me;if(!(typeof window===r||!j)){try{me=window.localStorage[j]}catch{}if(typeof me===r)try{var F=window.document.cookie,U=encodeURIComponent(j),$=F.indexOf(U+"=");$!==-1&&(me=/^([^;]+)/.exec(F.slice($+U.length+1))[1])}catch{}return B.levels[me]===void 0&&(me=void 0),me}}function ue(){if(!(typeof window===r||!j)){try{window.localStorage.removeItem(j)}catch{}try{window.document.cookie=encodeURIComponent(j)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function te(me){var F=me;if(typeof F=="string"&&B.levels[F.toUpperCase()]!==void 0&&(F=B.levels[F.toUpperCase()]),typeof F=="number"&&F>=0&&F<=B.levels.SILENT)return F;throw new TypeError("log.setLevel() called with invalid level: "+me)}B.name=v,B.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},B.methodFactory=C||I,B.getLevel=function(){return m??S??P},B.setLevel=function(me,F){return m=te(me),F!==!1&&Q(m),b.call(B)},B.setDefaultLevel=function(me){S=te(me),ce()||B.setLevel(me,!1)},B.resetLevel=function(){m=null,ue(),b.call(B)},B.enableAll=function(me){B.setLevel(B.levels.TRACE,me)},B.disableAll=function(me){B.setLevel(B.levels.SILENT,me)},B.rebuild=function(){if(f!==B&&(P=te(f.getLevel())),b.call(B),f===B)for(var me in u)u[me].rebuild()},P=te(f?f.getLevel():"WARN");var Se=ce();Se!=null&&(m=te(Se)),b.call(B)}f=new A,f.getLogger=function(C){if(typeof C!="symbol"&&typeof C!="string"||C==="")throw new TypeError("You must supply a name when creating a logger.");var B=u[C];return B||(B=u[C]=new A(C,f.methodFactory)),B};var x=typeof window!==r?window.log:void 0;return f.noConflict=function(){return typeof window!==r&&window.log===f&&(window.log=x),f},f.getLoggers=function(){return u},f.default=f,f})})(k0);var F0=k0.exports;const vu=z.getDefaultExportFromCjs(F0);var Su={exports:{}};Su.exports;(function(e,t){var r=200,o="__lodash_hash_undefined__",s=800,u=16,f=9007199254740991,h="[object Arguments]",l="[object Array]",p="[object AsyncFunction]",b="[object Boolean]",w="[object Date]",I="[object Error]",A="[object Function]",x="[object GeneratorFunction]",v="[object Map]",C="[object Number]",B="[object Null]",P="[object Object]",S="[object Proxy]",m="[object RegExp]",j="[object Set]",Q="[object String]",ce="[object Undefined]",ue="[object WeakMap]",te="[object ArrayBuffer]",Se="[object DataView]",me="[object Float32Array]",F="[object Float64Array]",U="[object Int8Array]",$="[object Int16Array]",q="[object Int32Array]",Y="[object Uint8Array]",G="[object Uint8ClampedArray]",ne="[object Uint16Array]",H="[object Uint32Array]",K=/[\\^$.*+?()[\]{}|]/g,ae=/^\[object .+?Constructor\]$/,de=/^(?:0|[1-9]\d*)$/,re={};re[me]=re[F]=re[U]=re[$]=re[q]=re[Y]=re[G]=re[ne]=re[H]=!0,re[h]=re[l]=re[te]=re[b]=re[Se]=re[w]=re[I]=re[A]=re[v]=re[C]=re[P]=re[m]=re[j]=re[Q]=re[ue]=!1;var _e=typeof z.commonjsGlobal=="object"&&z.commonjsGlobal&&z.commonjsGlobal.Object===Object&&z.commonjsGlobal,be=typeof self=="object"&&self&&self.Object===Object&&self,R=_e||be||Function("return this")(),O=t&&!t.nodeType&&t,W=O&&!0&&e&&!e.nodeType&&e,oe=W&&W.exports===O,ye=oe&&_e.process,d=function(){try{var M=W&&W.require&&W.require("util").types;return M||ye&&ye.binding&&ye.binding("util")}catch{}}(),g=d&&d.isTypedArray;function _(M,X,le){switch(le.length){case 0:return M.call(X);case 1:return M.call(X,le[0]);case 2:return M.call(X,le[0],le[1]);case 3:return M.call(X,le[0],le[1],le[2])}return M.apply(X,le)}function E(M,X){for(var le=-1,Le=Array(M);++le<M;)Le[le]=X(le);return Le}function J(M){return function(X){return M(X)}}function ie(M,X){return M==null?void 0:M[X]}function se(M,X){return function(le){return M(X(le))}}var Ie=Array.prototype,Be=Function.prototype,Ce=Object.prototype,Ue=R["__core-js_shared__"],Re=Be.toString,He=Ce.hasOwnProperty,_t=function(){var M=/[^.]+$/.exec(Ue&&Ue.keys&&Ue.keys.IE_PROTO||"");return M?"Symbol(src)_1."+M:""}(),tt=Ce.toString,yt=Re.call(Object),Ye=RegExp("^"+Re.call(He).replace(K,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=oe?R.Buffer:void 0,jt=R.Symbol,Pt=R.Uint8Array;Ve&&Ve.allocUnsafe;var ut=se(Object.getPrototypeOf,Object),Nt=Object.create,lr=Ce.propertyIsEnumerable,tr=Ie.splice,Ft=jt?jt.toStringTag:void 0,cr=function(){try{var M=qo(Object,"defineProperty");return M({},"",{}),M}catch{}}(),Kr=Ve?Ve.isBuffer:void 0,Jr=Math.max,an=Date.now,un=qo(R,"Map"),rr=qo(Object,"create"),Cr=function(){function M(){}return function(X){if(!$n(X))return{};if(Nt)return Nt(X);M.prototype=X;var le=new M;return M.prototype=void 0,le}}();function nr(M){var X=-1,le=M==null?0:M.length;for(this.clear();++X<le;){var Le=M[X];this.set(Le[0],Le[1])}}function Pn(){this.__data__=rr?rr(null):{},this.size=0}function Yr(M){var X=this.has(M)&&delete this.__data__[M];return this.size-=X?1:0,X}function fn(M){var X=this.__data__;if(rr){var le=X[M];return le===o?void 0:le}return He.call(X,M)?X[M]:void 0}function N(M){var X=this.__data__;return rr?X[M]!==void 0:He.call(X,M)}function D(M,X){var le=this.__data__;return this.size+=this.has(M)?0:1,le[M]=rr&&X===void 0?o:X,this}nr.prototype.clear=Pn,nr.prototype.delete=Yr,nr.prototype.get=fn,nr.prototype.has=N,nr.prototype.set=D;function Ee(M){var X=-1,le=M==null?0:M.length;for(this.clear();++X<le;){var Le=M[X];this.set(Le[0],Le[1])}}function ve(){this.__data__=[],this.size=0}function Te(M){var X=this.__data__,le=pn(X,M);if(le<0)return!1;var Le=X.length-1;return le==Le?X.pop():tr.call(X,le,1),--this.size,!0}function wt(M){var X=this.__data__,le=pn(X,M);return le<0?void 0:X[le][1]}function Rt(M){return pn(this.__data__,M)>-1}function ln(M,X){var le=this.__data__,Le=pn(le,M);return Le<0?(++this.size,le.push([M,X])):le[Le][1]=X,this}Ee.prototype.clear=ve,Ee.prototype.delete=Te,Ee.prototype.get=wt,Ee.prototype.has=Rt,Ee.prototype.set=ln;function Bt(M){var X=-1,le=M==null?0:M.length;for(this.clear();++X<le;){var Le=M[X];this.set(Le[0],Le[1])}}function cn(){this.size=0,this.__data__={hash:new nr,map:new(un||Ee),string:new nr}}function Bn(M){var X=Li(this,M).delete(M);return this.size-=X?1:0,X}function dn(M){return Li(this,M).get(M)}function hn(M){return Li(this,M).has(M)}function Xr(M,X){var le=Li(this,M),Le=le.size;return le.set(M,X),this.size+=le.size==Le?0:1,this}Bt.prototype.clear=cn,Bt.prototype.delete=Bn,Bt.prototype.get=dn,Bt.prototype.has=hn,Bt.prototype.set=Xr;function Vt(M){var X=this.__data__=new Ee(M);this.size=X.size}function Lr(){this.__data__=new Ee,this.size=0}function wr(M){var X=this.__data__,le=X.delete(M);return this.size=X.size,le}function ir(M){return this.__data__.get(M)}function Ht(M){return this.__data__.has(M)}function Ii(M,X){var le=this.__data__;if(le instanceof Ee){var Le=le.__data__;if(!un||Le.length<r-1)return Le.push([M,X]),this.size=++le.size,this;le=this.__data__=new Bt(Le)}return le.set(M,X),this.size=le.size,this}Vt.prototype.clear=Lr,Vt.prototype.delete=wr,Vt.prototype.get=ir,Vt.prototype.has=Ht,Vt.prototype.set=Ii;function Oi(M,X){var le=Ko(M),Le=!le&&zo(M),Ke=!le&&!Le&&aa(M),rt=!le&&!Le&&!Ke&&fa(M),dt=le||Le||Ke||rt,De=dt?E(M.length,String):[],at=De.length;for(var $t in M)dt&&($t=="length"||Ke&&($t=="offset"||$t=="parent")||rt&&($t=="buffer"||$t=="byteLength"||$t=="byteOffset")||no($t,at))||De.push($t);return De}function Nn(M,X,le){(le!==void 0&&!Pi(M[X],le)||le===void 0&&!(X in M))&&Pr(M,X,le)}function gn(M,X,le){var Le=M[X];(!(He.call(M,X)&&Pi(Le,le))||le===void 0&&!(X in M))&&Pr(M,X,le)}function pn(M,X){for(var le=M.length;le--;)if(Pi(M[le][0],X))return le;return-1}function Pr(M,X,le){X=="__proto__"&&cr?cr(M,X,{configurable:!0,enumerable:!0,value:le,writable:!0}):M[X]=le}var Ci=ro();function bn(M){return M==null?M===void 0?ce:B:Ft&&Ft in Object(M)?Zs(M):ta(M)}function ri(M){return Mn(M)&&bn(M)==h}function ni(M){if(!$n(M)||Go(M))return!1;var X=Yo(M)?Ye:ae;return X.test(oa(M))}function ii(M){return Mn(M)&&ua(M.length)&&!!re[bn(M)]}function oi(M){if(!$n(M))return si(M);var X=io(M),le=[];for(var Le in M)Le=="constructor"&&(X||!He.call(M,Le))||le.push(Le);return le}function zs(M,X,le,Le,Ke){M!==X&&Ci(X,function(rt,dt){if(Ke||(Ke=new Vt),$n(rt))hf(M,X,dt,le,zs,Le,Ke);else{var De=Le?Le(Vo(M,dt),rt,dt+"",M,X,Ke):void 0;De===void 0&&(De=rt),Nn(M,dt,De)}},la)}function hf(M,X,le,Le,Ke,rt,dt){var De=Vo(M,le),at=Vo(X,le),$t=dt.get(at);if($t){Nn(M,le,$t);return}var zt=rt?rt(De,at,le+"",M,X,dt):void 0,xn=zt===void 0;if(xn){var Kt=Ko(at),oo=!Kt&&aa(at),Xo=!Kt&&!oo&&fa(at);zt=at,Kt||oo||Xo?Ko(De)?zt=De:sa(De)?zt=Wo(De):oo?(xn=!1,zt=Ks(at)):Xo?(xn=!1,zt=Ys(at)):zt=[]:yf(at)||zo(at)?(zt=De,zo(De)?zt=wf(De):(!$n(De)||Yo(De))&&(zt=Qs(at))):xn=!1}xn&&(dt.set(at,zt),Ke(zt,at,Le,rt,dt),dt.delete(at)),Nn(M,le,zt)}function gf(M,X){return na(ra(M,X,it),M+"")}var pf=cr?function(M,X){return cr(M,"toString",{configurable:!0,enumerable:!1,value:ft(X),writable:!0})}:it;function Ks(M,X){return M.slice()}function Js(M){var X=new M.constructor(M.byteLength);return new Pt(X).set(new Pt(M)),X}function Ys(M,X){var le=Js(M.buffer);return new M.constructor(le,M.byteOffset,M.length)}function Wo(M,X){var le=-1,Le=M.length;for(X||(X=Array(Le));++le<Le;)X[le]=M[le];return X}function bf(M,X,le,Le){var Ke=!le;le||(le={});for(var rt=-1,dt=X.length;++rt<dt;){var De=X[rt],at=void 0;at===void 0&&(at=M[De]),Ke?Pr(le,De,at):gn(le,De,at)}return le}function Xs(M){return gf(function(X,le){var Le=-1,Ke=le.length,rt=Ke>1?le[Ke-1]:void 0,dt=Ke>2?le[2]:void 0;for(rt=M.length>3&&typeof rt=="function"?(Ke--,rt):void 0,dt&&_f(le[0],le[1],dt)&&(rt=Ke<3?void 0:rt,Ke=1),X=Object(X);++Le<Ke;){var De=le[Le];De&&M(X,De,Le,rt)}return X})}function ro(M){return function(X,le,Le){for(var Ke=-1,rt=Object(X),dt=Le(X),De=dt.length;De--;){var at=dt[++Ke];if(le(rt[at],at,rt)===!1)break}return X}}function Li(M,X){var le=M.__data__;return ea(X)?le[typeof X=="string"?"string":"hash"]:le.map}function qo(M,X){var le=ie(M,X);return ni(le)?le:void 0}function Zs(M){var X=He.call(M,Ft),le=M[Ft];try{M[Ft]=void 0;var Le=!0}catch{}var Ke=tt.call(M);return Le&&(X?M[Ft]=le:delete M[Ft]),Ke}function Qs(M){return typeof M.constructor=="function"&&!io(M)?Cr(ut(M)):{}}function no(M,X){var le=typeof M;return X=X??f,!!X&&(le=="number"||le!="symbol"&&de.test(M))&&M>-1&&M%1==0&&M<X}function _f(M,X,le){if(!$n(le))return!1;var Le=typeof X;return(Le=="number"?Jo(le)&&no(X,le.length):Le=="string"&&X in le)?Pi(le[X],M):!1}function ea(M){var X=typeof M;return X=="string"||X=="number"||X=="symbol"||X=="boolean"?M!=="__proto__":M===null}function Go(M){return!!_t&&_t in M}function io(M){var X=M&&M.constructor,le=typeof X=="function"&&X.prototype||Ce;return M===le}function si(M){var X=[];if(M!=null)for(var le in Object(M))X.push(le);return X}function ta(M){return tt.call(M)}function ra(M,X,le){return X=Jr(X===void 0?M.length-1:X,0),function(){for(var Le=arguments,Ke=-1,rt=Jr(Le.length-X,0),dt=Array(rt);++Ke<rt;)dt[Ke]=Le[X+Ke];Ke=-1;for(var De=Array(X+1);++Ke<X;)De[Ke]=Le[Ke];return De[X]=le(dt),_(M,this,De)}}function Vo(M,X){if(!(X==="constructor"&&typeof M[X]=="function")&&X!="__proto__")return M[X]}var na=ia(pf);function ia(M){var X=0,le=0;return function(){var Le=an(),Ke=u-(Le-le);if(le=Le,Ke>0){if(++X>=s)return arguments[0]}else X=0;return M.apply(void 0,arguments)}}function oa(M){if(M!=null){try{return Re.call(M)}catch{}try{return M+""}catch{}}return""}function Pi(M,X){return M===X||M!==M&&X!==X}var zo=ri(function(){return arguments}())?ri:function(M){return Mn(M)&&He.call(M,"callee")&&!lr.call(M,"callee")},Ko=Array.isArray;function Jo(M){return M!=null&&ua(M.length)&&!Yo(M)}function sa(M){return Mn(M)&&Jo(M)}var aa=Kr||Ef;function Yo(M){if(!$n(M))return!1;var X=bn(M);return X==A||X==x||X==p||X==S}function ua(M){return typeof M=="number"&&M>-1&&M%1==0&&M<=f}function $n(M){var X=typeof M;return M!=null&&(X=="object"||X=="function")}function Mn(M){return M!=null&&typeof M=="object"}function yf(M){if(!Mn(M)||bn(M)!=P)return!1;var X=ut(M);if(X===null)return!0;var le=He.call(X,"constructor")&&X.constructor;return typeof le=="function"&&le instanceof le&&Re.call(le)==yt}var fa=g?J(g):ii;function wf(M){return bf(M,la(M))}function la(M){return Jo(M)?Oi(M):oi(M)}var mf=Xs(function(M,X,le){zs(M,X,le)});function ft(M){return function(){return M}}function it(M){return M}function Ef(){return!1}e.exports=mf})(Su,Su.exports);Su.exports;const oB=vu.getLogger("http-helpers");oB.setLevel(F0.levels.INFO);var Ru={exports:{}};/**
4
4
  * @license