@wormhole-foundation/wormhole-connect 1.1.2-beta.1-development → 1.1.2-beta.2-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.
- package/dist/assets/{ccip-DG5PxfxZ.js → ccip-ugcVXZ-r.js} +1 -1
- package/dist/assets/{evm-CpEqLT_y.js → evm-DQC4xykE.js} +4 -4
- package/dist/assets/{index-CsGdgxew.js → index-B1SC-u2d.js} +1 -1
- package/dist/assets/{index-CDRpv8fM.js → index-ClGMzASA.js} +1 -1
- package/dist/assets/{index-tcDQieq-.js → index-JHRLBcVB.js} +2 -2
- package/dist/assets/{index.es-uOIRXoHK.js → index.es-WG_H7rYm.js} +2 -2
- package/dist/main.js +40 -43
- package/dist/src/icons/Tokens/CELO.d.ts.map +1 -1
- package/lib/{algorand-DZQLtCs3.js → algorand-Bfhml9ow.js} +1 -1
- package/lib/{algorand-Dm6TKWo1.mjs → algorand-Cjxu_rGT.mjs} +3 -3
- package/lib/{aptos-BgGyOa6d.js → aptos-8LK4z3vn.js} +1 -1
- package/lib/{aptos-C2XVzOAY.mjs → aptos-CCPjhoiH.mjs} +1 -1
- package/lib/{aptos-CuJuzlQ4.mjs → aptos-DoD0ybSM.mjs} +3 -3
- package/lib/{aptos-Oi2w7M7g.js → aptos-kknI1DBa.js} +2 -2
- package/lib/{ccip-DpMplNou.js → ccip-DFb-9M3G.js} +1 -1
- package/lib/{ccip-dAqJN7S0.mjs → ccip-DPB6Aeux.mjs} +1 -1
- package/lib/{cosmos-90bGYuhD.js → cosmos-Bpf_4aPg.js} +1 -1
- package/lib/{cosmos-zIwOBV8H.mjs → cosmos-D8oxyfb-.mjs} +5 -5
- package/lib/{cosmwasm-CrtL_ala.js → cosmwasm-B_Hk0_zg.js} +2 -2
- package/lib/{cosmwasm-B90CBMmk.mjs → cosmwasm-C0n2vNoS.mjs} +6 -6
- package/lib/{events-CkXgb0qh.mjs → events-IweKXbqK.mjs} +1 -1
- package/lib/{events-COwefqOt.js → events-wwBkyeeC.js} +1 -1
- package/lib/{evm-BdVnM5pA.js → evm-2R09kBJC.js} +1 -1
- package/lib/{evm-ETVyy1bF.mjs → evm-Bd2pCSsJ.mjs} +7 -7
- package/lib/{evm-DOnB2oR6.mjs → evm-aPO4WIdi.mjs} +5 -5
- package/lib/{evm-BN522EMV.js → evm-fe0Am1O3.js} +4 -4
- package/lib/{index-Oa-p0V5E.mjs → index--4VtoDDS.mjs} +4 -4
- package/lib/{index-B5_WNdeb.js → index-0GB3Vnvc.js} +1 -1
- package/lib/{index-CotIM_QM.js → index-47xrPd7t.js} +1 -1
- package/lib/{index-CAO9VKRh.mjs → index-56vFoolS.mjs} +1 -1
- package/lib/{index-CjaaWCsQ.js → index-B-m4JhhB.js} +4 -7
- package/lib/{index-CUNm43cC.mjs → index-B18omPyI.mjs} +3 -3
- package/lib/{index-D_IvJasJ.mjs → index-BA62NbuM.mjs} +2 -2
- package/lib/{index-B03mlZnU.js → index-BB5T29FD.js} +1 -1
- package/lib/{index-DG4r6BgI.js → index-BDrktTYO.js} +1 -1
- package/lib/{index-_6ORrwJQ.js → index-BKRL-VZ-.js} +1 -1
- package/lib/{index-BK5v6OjI.mjs → index-BNvCSTJM.mjs} +2 -2
- package/lib/{index-Dx54Fq-M.js → index-BWC_CLDn.js} +1 -1
- package/lib/{index-Dv2SHpnV.mjs → index-Bf66m4uH.mjs} +2 -2
- package/lib/{index-SHXZG1qD.js → index-Bm4h_tq9.js} +1 -1
- package/lib/{index-CKK14LS0.js → index-Bw_OvbxM.js} +1 -1
- package/lib/{index-B_6I_1KE.mjs → index-C4F1e3oi.mjs} +6 -6
- package/lib/{index-uEx_Ty6H.mjs → index-C7YoUen_.mjs} +2 -2
- package/lib/{index-S-6g7te9.mjs → index-C9ML4MIb.mjs} +2 -2
- package/lib/{index-DUnWVA2t.js → index-CCHGtHEs.js} +1 -1
- package/lib/{index-DgwozKZn.js → index-CDtHBUln.js} +1 -1
- package/lib/{index-CszotuUi.mjs → index-CFvHFN54.mjs} +3 -3
- package/lib/{index-2r-kWsjk.mjs → index-CHzy6dYb.mjs} +1 -1
- package/lib/{index-CfsjU0i8.mjs → index-CJXTHi_P.mjs} +2 -2
- package/lib/{index-BiEcDoCp.mjs → index-CLOOv5Du.mjs} +3 -3
- package/lib/{index-GIMIwhEX.js → index-CLbtY-pt.js} +1 -1
- package/lib/{index-CngGxdSU.mjs → index-CLwX1P1j.mjs} +3 -3
- package/lib/{index-RBlsEf3k.js → index-CTVkfVib.js} +1 -1
- package/lib/{index-CKEOPl_r.js → index-CgK6uLkd.js} +1 -1
- package/lib/{index-DxTkOnq6.js → index-Cz-8L-Qb.js} +1 -1
- package/lib/{index-t3NbnUgt.mjs → index-D7M_-bS5.mjs} +2 -2
- package/lib/{index-B3rePQFd.mjs → index-DFhYR6id.mjs} +1 -1
- package/lib/{index-Cx4LuiA1.mjs → index-DLDcbGAp.mjs} +2 -2
- package/lib/{index-kIexF0uT.js → index-DNvjoXDi.js} +1 -1
- package/lib/{index-CTVxLNgQ.mjs → index-DOb7A68c.mjs} +4 -4
- package/lib/{index-COovR23o.mjs → index-DQ8BRVa9.mjs} +2 -2
- package/lib/{index-q0kjBXQA.js → index-DdPHRkXV.js} +1 -1
- package/lib/{index-Dnfo149P.js → index-Dh_38iiq.js} +1 -1
- package/lib/{index-Be9Bg4au.js → index-DpzW5j0n.js} +1 -1
- package/lib/{index-CcPZaBV3.js → index-Du-JoS7B.js} +1 -1
- package/lib/{index-C4PiSpuF.js → index-Mmq175PJ.js} +1 -1
- package/lib/{index-DXkh0tUi.js → index-NyUOs86a.js} +1 -1
- package/lib/{index-DCFAlA0r.mjs → index-PezPPmQR.mjs} +32 -57
- package/lib/{index-BUJ1M7Ob.mjs → index-TvJJirn8.mjs} +2 -2
- package/lib/{index-B8U_Gr4R.mjs → index-eOaDp35h.mjs} +1 -1
- package/lib/{index-qCDztmW8.mjs → index-hgDL5OvS.mjs} +1 -1
- package/lib/{index-CVFSCRrp.js → index-xf8W0MMN.js} +1 -1
- package/lib/{index.es-DXLvY_D0.js → index.es-QOrf6vQ0.js} +2 -2
- package/lib/{index.es-DV0FLIto.mjs → index.es-rchXXbeY.mjs} +5 -5
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{keccak-BIz1wVpA.js → keccak-BdDlOEQS.js} +1 -1
- package/lib/{keccak-BUByz5uF.mjs → keccak-DKGShrRL.mjs} +1 -1
- package/lib/{libsodium-wrappers-fP6c9wsa.js → libsodium-wrappers-BadAASPQ.js} +1 -1
- package/lib/{libsodium-wrappers-Cor7IUex.mjs → libsodium-wrappers-C2r7sgV4.mjs} +1 -1
- package/lib/{pako.esm-ZR78Kcp_.mjs → pako.esm-BUTjWIY2.mjs} +2 -2
- package/lib/{pako.esm-CYeKGWZL.js → pako.esm-DAaoySH_.js} +1 -1
- package/lib/{pbkdf2-CtnM_vol.js → pbkdf2-DDUd1MIo.js} +1 -1
- package/lib/{pbkdf2-BXETruEi.mjs → pbkdf2-DpLdYPlz.mjs} +1 -1
- package/lib/{sei-83rTGsK7.mjs → sei-BJXcObS8.mjs} +3 -3
- package/lib/{sei-BVrV8RIX.js → sei-C-M5R_lN.js} +1 -1
- package/lib/{signer-nBgWI7Cp.mjs → signer-D72l6J0o.mjs} +1 -1
- package/lib/{signer-DrIAzvo5.js → signer-nQpU_826.js} +1 -1
- package/lib/{solana-CDYc5Kkf.mjs → solana-B7ycHhCW.mjs} +5 -5
- package/lib/{solana-DfDEsqum.mjs → solana-Cwzan1t4.mjs} +4 -4
- package/lib/{solana-BHhb_iN6.js → solana-D6OY2B-1.js} +1 -1
- package/lib/solana-DEJ3zHI-.js +1 -0
- package/lib/{solanaEmbed.esm-THCQirO0.mjs → solanaEmbed.esm-D9U4HFlG.mjs} +3 -3
- package/lib/{solanaEmbed.esm-NdMQEmdv.js → solanaEmbed.esm-DPWnM67X.js} +1 -1
- package/lib/src/icons/Tokens/CELO.d.ts.map +1 -1
- package/lib/{sui-yf1o5y4o.js → sui-826u9KP_.js} +2 -2
- package/lib/{sui-BCKOTjLA.mjs → sui-CV8X52Ot.mjs} +4 -4
- package/lib/{sui-2OJrRkLv.js → sui-DUASPIkT.js} +1 -1
- package/lib/{sui-DZw78j9M.mjs → sui-sBQX8Jtb.mjs} +1 -1
- package/lib/{unsignedTransaction-BOL13zs_.js → unsignedTransaction-BXkK1pqs.js} +1 -1
- package/lib/{unsignedTransaction-CWcOEDGs.mjs → unsignedTransaction-DkG4Acpk.mjs} +2 -2
- package/package.json +1 -1
- package/lib/solana-BgoFdxcd.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("./index-CjaaWCsQ.js"),cR=require("./events-COwefqOt.js"),lr=require("./keccak-BIz1wVpA.js");var dR=hR;function hR(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,n=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return n=n%t,n++}}const gR=Z.getDefaultExportFromCjs(dR);var oc={exports:{}},pl,Pg;function _R(){if(Pg)return pl;Pg=1;var e=1e3,t=e*60,n=t*60,o=n*24,a=o*7,f=o*365.25;pl=function(_,y){y=y||{};var E=typeof _;if(E==="string"&&_.length>0)return u(_);if(E==="number"&&isFinite(_))return y.long?d(_):g(_);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(_))};function u(_){if(_=String(_),!(_.length>100)){var y=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(_);if(y){var E=parseFloat(y[1]),m=(y[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return E*f;case"weeks":case"week":case"w":return E*a;case"days":case"day":case"d":return E*o;case"hours":case"hour":case"hrs":case"hr":case"h":return E*n;case"minutes":case"minute":case"mins":case"min":case"m":return E*t;case"seconds":case"second":case"secs":case"sec":case"s":return E*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return E;default:return}}}}function g(_){var y=Math.abs(_);return y>=o?Math.round(_/o)+"d":y>=n?Math.round(_/n)+"h":y>=t?Math.round(_/t)+"m":y>=e?Math.round(_/e)+"s":_+"ms"}function d(_){var y=Math.abs(_);return y>=o?h(_,y,o,"day"):y>=n?h(_,y,n,"hour"):y>=t?h(_,y,t,"minute"):y>=e?h(_,y,e,"second"):_+" ms"}function h(_,y,E,m){var N=y>=E*1.5;return Math.round(_/E)+" "+m+(N?"s":"")}return pl}function pR(e){n.debug=n,n.default=n,n.coerce=d,n.disable=f,n.enable=a,n.enabled=u,n.humanize=_R(),n.destroy=h,Object.keys(e).forEach(_=>{n[_]=e[_]}),n.names=[],n.skips=[],n.formatters={};function t(_){let y=0;for(let E=0;E<_.length;E++)y=(y<<5)-y+_.charCodeAt(E),y|=0;return n.colors[Math.abs(y)%n.colors.length]}n.selectColor=t;function n(_){let y,E=null,m,N;function k(...U){if(!k.enabled)return;const G=k,H=Number(new Date),P=H-(y||H);G.diff=P,G.prev=y,G.curr=H,y=H,U[0]=n.coerce(U[0]),typeof U[0]!="string"&&U.unshift("%O");let C=0;U[0]=U[0].replace(/%([a-zA-Z%])/g,(ae,ie)=>{if(ae==="%%")return"%";C++;const _e=n.formatters[ie];if(typeof _e=="function"){const ce=U[C];ae=_e.call(G,ce),U.splice(C,1),C--}return ae}),n.formatArgs.call(G,U),(G.log||n.log).apply(G,U)}return k.namespace=_,k.useColors=n.useColors(),k.color=n.selectColor(_),k.extend=o,k.destroy=n.destroy,Object.defineProperty(k,"enabled",{enumerable:!0,configurable:!1,get:()=>E!==null?E:(m!==n.namespaces&&(m=n.namespaces,N=n.enabled(_)),N),set:U=>{E=U}}),typeof n.init=="function"&&n.init(k),k}function o(_,y){const E=n(this.namespace+(typeof y>"u"?":":y)+_);return E.log=this.log,E}function a(_){n.save(_),n.namespaces=_,n.names=[],n.skips=[];let y;const E=(typeof _=="string"?_:"").split(/[\s,]+/),m=E.length;for(y=0;y<m;y++)E[y]&&(_=E[y].replace(/\*/g,".*?"),_[0]==="-"?n.skips.push(new RegExp("^"+_.slice(1)+"$")):n.names.push(new RegExp("^"+_+"$")))}function f(){const _=[...n.names.map(g),...n.skips.map(g).map(y=>"-"+y)].join(",");return n.enable(""),_}function u(_){if(_[_.length-1]==="*")return!0;let y,E;for(y=0,E=n.skips.length;y<E;y++)if(n.skips[y].test(_))return!1;for(y=0,E=n.names.length;y<E;y++)if(n.names[y].test(_))return!0;return!1}function g(_){return _.toString().substring(2,_.toString().length-2).replace(/\.\*\?$/,"*")}function d(_){return _ instanceof Error?_.stack||_.message:_}function h(){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 n.enable(n.load()),n}var bR=pR;(function(e,t){t.formatArgs=o,t.save=a,t.load=f,t.useColors=n,t.storage=u(),t.destroy=(()=>{let d=!1;return()=>{d||(d=!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 n(){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 d;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&&(d=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(d[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(d){if(d[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+d[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const h="color: "+this.color;d.splice(1,0,h,"color: inherit");let _=0,y=0;d[0].replace(/%[a-zA-Z%]/g,E=>{E!=="%%"&&(_++,E==="%c"&&(y=_))}),d.splice(y,0,h)}t.log=console.debug||console.log||(()=>{});function a(d){try{d?t.storage.setItem("debug",d):t.storage.removeItem("debug")}catch{}}function f(){let d;try{d=t.storage.getItem("debug")}catch{}return!d&&typeof Z.dist.process<"u"&&"env"in Z.dist.process&&(d=Z.dist.process.env.DEBUG),d}function u(){try{return localStorage}catch{}}e.exports=bR(t);const{formatters:g}=e.exports;g.j=function(d){try{return JSON.stringify(d)}catch(h){return"[UnexpectedJSONParseError]: "+h.message}}})(oc,oc.exports);var yR=oc.exports,dr={},hi={},Nc=ps;ps.default=ps;ps.stable=x_;ps.stableStringify=x_;var nf="[...]",B_="[Circular]",Bi=[],Pi=[];function $_(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function ps(e,t,n,o){typeof o>"u"&&(o=$_()),sc(e,"",0,[],void 0,0,o);var a;try{Pi.length===0?a=JSON.stringify(e,t,n):a=JSON.stringify(e,D_(t),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Bi.length!==0;){var f=Bi.pop();f.length===4?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return a}function po(e,t,n,o){var a=Object.getOwnPropertyDescriptor(o,n);a.get!==void 0?a.configurable?(Object.defineProperty(o,n,{value:e}),Bi.push([o,n,t,a])):Pi.push([t,n,e]):(o[n]=e,Bi.push([o,n,t]))}function sc(e,t,n,o,a,f,u){f+=1;var g;if(typeof e=="object"&&e!==null){for(g=0;g<o.length;g++)if(o[g]===e){po(B_,e,t,a);return}if(typeof u.depthLimit<"u"&&f>u.depthLimit){po(nf,e,t,a);return}if(typeof u.edgesLimit<"u"&&n+1>u.edgesLimit){po(nf,e,t,a);return}if(o.push(e),Array.isArray(e))for(g=0;g<e.length;g++)sc(e[g],g,g,o,e,f,u);else{var d=Object.keys(e);for(g=0;g<d.length;g++){var h=d[g];sc(e[h],h,g,o,e,f,u)}}o.pop()}}function wR(e,t){return e<t?-1:e>t?1:0}function x_(e,t,n,o){typeof o>"u"&&(o=$_());var a=ac(e,"",0,[],void 0,0,o)||e,f;try{Pi.length===0?f=JSON.stringify(a,t,n):f=JSON.stringify(a,D_(t),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Bi.length!==0;){var u=Bi.pop();u.length===4?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return f}function ac(e,t,n,o,a,f,u){f+=1;var g;if(typeof e=="object"&&e!==null){for(g=0;g<o.length;g++)if(o[g]===e){po(B_,e,t,a);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof u.depthLimit<"u"&&f>u.depthLimit){po(nf,e,t,a);return}if(typeof u.edgesLimit<"u"&&n+1>u.edgesLimit){po(nf,e,t,a);return}if(o.push(e),Array.isArray(e))for(g=0;g<e.length;g++)ac(e[g],g,g,o,e,f,u);else{var d={},h=Object.keys(e).sort(wR);for(g=0;g<h.length;g++){var _=h[g];ac(e[_],_,g,o,e,f,u),d[_]=e[_]}if(typeof a<"u")Bi.push([a,t,e]),a[t]=d;else return d}o.pop()}}function D_(e){return e=typeof e<"u"?e:function(t,n){return n},function(t,n){if(Pi.length>0)for(var o=0;o<Pi.length;o++){var a=Pi[o];if(a[1]===t&&a[0]===n){n=a[2],Pi.splice(o,1);break}}return e.call(this,t,n)}}const mR=Z.getDefaultExportFromCjs(Nc);Object.defineProperty(hi,"__esModule",{value:!0});hi.EthereumProviderError=hi.EthereumRpcError=void 0;const vR=Nc;class M_ extends Error{constructor(t,n,o){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!n||typeof n!="string")throw new Error('"message" must be a nonempty string.');super(n),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 vR.default(this.serialize(),RR,2)}}hi.EthereumRpcError=M_;let ER=class extends M_{constructor(t,n,o){if(!SR(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,n,o)}};hi.EthereumProviderError=ER;function SR(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function RR(e,t){if(t!=="[Circular]")return t}var Bc={},gi={};Object.defineProperty(gi,"__esModule",{value:!0});gi.errorValues=gi.errorCodes=void 0;gi.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}};gi.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=gi,n=hi,o=t.errorCodes.rpc.internal,a="Unspecified error message. This is a bug, please report it.",f={code:o,message:u(o)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function u(E,m=a){if(Number.isInteger(E)){const N=E.toString();if(y(t.errorValues,N))return t.errorValues[N].message;if(h(E))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return m}e.getMessageFromCode=u;function g(E){if(!Number.isInteger(E))return!1;const m=E.toString();return!!(t.errorValues[m]||h(E))}e.isValidCode=g;function d(E,{fallbackError:m=f,shouldIncludeStack:N=!1}={}){var k,U;if(!m||!Number.isInteger(m.code)||typeof m.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(E instanceof n.EthereumRpcError)return E.serialize();const G={};if(E&&typeof E=="object"&&!Array.isArray(E)&&y(E,"code")&&g(E.code)){const P=E;G.code=P.code,P.message&&typeof P.message=="string"?(G.message=P.message,y(P,"data")&&(G.data=P.data)):(G.message=u(G.code),G.data={originalError:_(E)})}else{G.code=m.code;const P=(k=E)===null||k===void 0?void 0:k.message;G.message=P&&typeof P=="string"?P:m.message,G.data={originalError:_(E)}}const H=(U=E)===null||U===void 0?void 0:U.stack;return N&&E&&H&&typeof H=="string"&&(G.stack=H),G}e.serializeError=d;function h(E){return E>=-32099&&E<=-32e3}function _(E){return E&&typeof E=="object"&&!Array.isArray(E)?Object.assign({},E):E}function y(E,m){return Object.prototype.hasOwnProperty.call(E,m)}})(Bc);var gf={};Object.defineProperty(gf,"__esModule",{value:!0});gf.ethErrors=void 0;const $c=hi,k_=Bc,hn=gi;gf.ethErrors={rpc:{parse:e=>Kn(hn.errorCodes.rpc.parse,e),invalidRequest:e=>Kn(hn.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Kn(hn.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Kn(hn.errorCodes.rpc.methodNotFound,e),internal:e=>Kn(hn.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 Kn(t,e)},invalidInput:e=>Kn(hn.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Kn(hn.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Kn(hn.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Kn(hn.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Kn(hn.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Kn(hn.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>rs(hn.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>rs(hn.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>rs(hn.errorCodes.provider.unsupportedMethod,e),disconnected:e=>rs(hn.errorCodes.provider.disconnected,e),chainDisconnected:e=>rs(hn.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:n,data:o}=e;if(!n||typeof n!="string")throw new Error('"message" must be a nonempty string');return new $c.EthereumProviderError(t,n,o)}}};function Kn(e,t){const[n,o]=F_(t);return new $c.EthereumRpcError(e,n||k_.getMessageFromCode(e),o)}function rs(e,t){const[n,o]=F_(t);return new $c.EthereumProviderError(e,n||k_.getMessageFromCode(e),o)}function F_(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,n]}}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=hi;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const n=Bc;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return n.getMessageFromCode}});const o=gf;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const a=gi;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})})(dr);var AR={exports:{}},bl={exports:{}},qt={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,n){return e.slice(t,n)},Error,FunctionPrototypeCall(e,t,...n){return e.call(t,...n)},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,n){return Object.defineProperty(e,t,n)},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,n){return e.then(t,n)},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,n){return e.slice(t,n)},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,n){return e.set(t,n)},Boolean,Uint8Array},U_={exports:{}},is={exports:{}},Ng;function bs(){if(Ng)return is.exports;Ng=1;const{AbortController:e,AbortSignal:t}=typeof self<"u"?self:typeof window<"u"?window:void 0;return is.exports=e,is.exports.AbortSignal=t,is.exports.default=e,is.exports}(function(e){const t=Z.bufferPolyfill,{kResistStopPropagation:n,SymbolDispose:o}=qt,a=globalThis.AbortSignal||bs().AbortSignal,f=globalThis.AbortController||bs().AbortController,u=Object.getPrototypeOf(async function(){}).constructor,g=globalThis.Blob||t.Blob,d=typeof g<"u"?function(m){return m instanceof g}:function(m){return!1},h=(E,m)=>{if(E!==void 0&&(E===null||typeof E!="object"||!("aborted"in E)))throw new ERR_INVALID_ARG_TYPE(m,"AbortSignal",E)},_=(E,m)=>{if(typeof E!="function")throw new ERR_INVALID_ARG_TYPE(m,"Function",E)};class y extends Error{constructor(m){if(!Array.isArray(m))throw new TypeError(`Expected input to be an Array, got ${typeof m}`);let N="";for(let k=0;k<m.length;k++)N+=` ${m[k].stack}
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("./index-B-m4JhhB.js"),cR=require("./events-wwBkyeeC.js"),lr=require("./keccak-BdDlOEQS.js");var dR=hR;function hR(e){e=e||{};var t=e.max||Number.MAX_SAFE_INTEGER,n=typeof e.start<"u"?e.start:Math.floor(Math.random()*t);return function(){return n=n%t,n++}}const gR=Z.getDefaultExportFromCjs(dR);var oc={exports:{}},pl,Pg;function _R(){if(Pg)return pl;Pg=1;var e=1e3,t=e*60,n=t*60,o=n*24,a=o*7,f=o*365.25;pl=function(_,y){y=y||{};var E=typeof _;if(E==="string"&&_.length>0)return u(_);if(E==="number"&&isFinite(_))return y.long?d(_):g(_);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(_))};function u(_){if(_=String(_),!(_.length>100)){var y=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(_);if(y){var E=parseFloat(y[1]),m=(y[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"yrs":case"yr":case"y":return E*f;case"weeks":case"week":case"w":return E*a;case"days":case"day":case"d":return E*o;case"hours":case"hour":case"hrs":case"hr":case"h":return E*n;case"minutes":case"minute":case"mins":case"min":case"m":return E*t;case"seconds":case"second":case"secs":case"sec":case"s":return E*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return E;default:return}}}}function g(_){var y=Math.abs(_);return y>=o?Math.round(_/o)+"d":y>=n?Math.round(_/n)+"h":y>=t?Math.round(_/t)+"m":y>=e?Math.round(_/e)+"s":_+"ms"}function d(_){var y=Math.abs(_);return y>=o?h(_,y,o,"day"):y>=n?h(_,y,n,"hour"):y>=t?h(_,y,t,"minute"):y>=e?h(_,y,e,"second"):_+" ms"}function h(_,y,E,m){var N=y>=E*1.5;return Math.round(_/E)+" "+m+(N?"s":"")}return pl}function pR(e){n.debug=n,n.default=n,n.coerce=d,n.disable=f,n.enable=a,n.enabled=u,n.humanize=_R(),n.destroy=h,Object.keys(e).forEach(_=>{n[_]=e[_]}),n.names=[],n.skips=[],n.formatters={};function t(_){let y=0;for(let E=0;E<_.length;E++)y=(y<<5)-y+_.charCodeAt(E),y|=0;return n.colors[Math.abs(y)%n.colors.length]}n.selectColor=t;function n(_){let y,E=null,m,N;function k(...U){if(!k.enabled)return;const G=k,H=Number(new Date),P=H-(y||H);G.diff=P,G.prev=y,G.curr=H,y=H,U[0]=n.coerce(U[0]),typeof U[0]!="string"&&U.unshift("%O");let C=0;U[0]=U[0].replace(/%([a-zA-Z%])/g,(ae,ie)=>{if(ae==="%%")return"%";C++;const _e=n.formatters[ie];if(typeof _e=="function"){const ce=U[C];ae=_e.call(G,ce),U.splice(C,1),C--}return ae}),n.formatArgs.call(G,U),(G.log||n.log).apply(G,U)}return k.namespace=_,k.useColors=n.useColors(),k.color=n.selectColor(_),k.extend=o,k.destroy=n.destroy,Object.defineProperty(k,"enabled",{enumerable:!0,configurable:!1,get:()=>E!==null?E:(m!==n.namespaces&&(m=n.namespaces,N=n.enabled(_)),N),set:U=>{E=U}}),typeof n.init=="function"&&n.init(k),k}function o(_,y){const E=n(this.namespace+(typeof y>"u"?":":y)+_);return E.log=this.log,E}function a(_){n.save(_),n.namespaces=_,n.names=[],n.skips=[];let y;const E=(typeof _=="string"?_:"").split(/[\s,]+/),m=E.length;for(y=0;y<m;y++)E[y]&&(_=E[y].replace(/\*/g,".*?"),_[0]==="-"?n.skips.push(new RegExp("^"+_.slice(1)+"$")):n.names.push(new RegExp("^"+_+"$")))}function f(){const _=[...n.names.map(g),...n.skips.map(g).map(y=>"-"+y)].join(",");return n.enable(""),_}function u(_){if(_[_.length-1]==="*")return!0;let y,E;for(y=0,E=n.skips.length;y<E;y++)if(n.skips[y].test(_))return!1;for(y=0,E=n.names.length;y<E;y++)if(n.names[y].test(_))return!0;return!1}function g(_){return _.toString().substring(2,_.toString().length-2).replace(/\.\*\?$/,"*")}function d(_){return _ instanceof Error?_.stack||_.message:_}function h(){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 n.enable(n.load()),n}var bR=pR;(function(e,t){t.formatArgs=o,t.save=a,t.load=f,t.useColors=n,t.storage=u(),t.destroy=(()=>{let d=!1;return()=>{d||(d=!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 n(){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 d;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&&(d=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(d[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function o(d){if(d[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+d[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const h="color: "+this.color;d.splice(1,0,h,"color: inherit");let _=0,y=0;d[0].replace(/%[a-zA-Z%]/g,E=>{E!=="%%"&&(_++,E==="%c"&&(y=_))}),d.splice(y,0,h)}t.log=console.debug||console.log||(()=>{});function a(d){try{d?t.storage.setItem("debug",d):t.storage.removeItem("debug")}catch{}}function f(){let d;try{d=t.storage.getItem("debug")}catch{}return!d&&typeof Z.dist.process<"u"&&"env"in Z.dist.process&&(d=Z.dist.process.env.DEBUG),d}function u(){try{return localStorage}catch{}}e.exports=bR(t);const{formatters:g}=e.exports;g.j=function(d){try{return JSON.stringify(d)}catch(h){return"[UnexpectedJSONParseError]: "+h.message}}})(oc,oc.exports);var yR=oc.exports,dr={},hi={},Nc=ps;ps.default=ps;ps.stable=x_;ps.stableStringify=x_;var nf="[...]",B_="[Circular]",Bi=[],Pi=[];function $_(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function ps(e,t,n,o){typeof o>"u"&&(o=$_()),sc(e,"",0,[],void 0,0,o);var a;try{Pi.length===0?a=JSON.stringify(e,t,n):a=JSON.stringify(e,D_(t),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Bi.length!==0;){var f=Bi.pop();f.length===4?Object.defineProperty(f[0],f[1],f[3]):f[0][f[1]]=f[2]}}return a}function po(e,t,n,o){var a=Object.getOwnPropertyDescriptor(o,n);a.get!==void 0?a.configurable?(Object.defineProperty(o,n,{value:e}),Bi.push([o,n,t,a])):Pi.push([t,n,e]):(o[n]=e,Bi.push([o,n,t]))}function sc(e,t,n,o,a,f,u){f+=1;var g;if(typeof e=="object"&&e!==null){for(g=0;g<o.length;g++)if(o[g]===e){po(B_,e,t,a);return}if(typeof u.depthLimit<"u"&&f>u.depthLimit){po(nf,e,t,a);return}if(typeof u.edgesLimit<"u"&&n+1>u.edgesLimit){po(nf,e,t,a);return}if(o.push(e),Array.isArray(e))for(g=0;g<e.length;g++)sc(e[g],g,g,o,e,f,u);else{var d=Object.keys(e);for(g=0;g<d.length;g++){var h=d[g];sc(e[h],h,g,o,e,f,u)}}o.pop()}}function wR(e,t){return e<t?-1:e>t?1:0}function x_(e,t,n,o){typeof o>"u"&&(o=$_());var a=ac(e,"",0,[],void 0,0,o)||e,f;try{Pi.length===0?f=JSON.stringify(a,t,n):f=JSON.stringify(a,D_(t),n)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;Bi.length!==0;){var u=Bi.pop();u.length===4?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return f}function ac(e,t,n,o,a,f,u){f+=1;var g;if(typeof e=="object"&&e!==null){for(g=0;g<o.length;g++)if(o[g]===e){po(B_,e,t,a);return}try{if(typeof e.toJSON=="function")return}catch{return}if(typeof u.depthLimit<"u"&&f>u.depthLimit){po(nf,e,t,a);return}if(typeof u.edgesLimit<"u"&&n+1>u.edgesLimit){po(nf,e,t,a);return}if(o.push(e),Array.isArray(e))for(g=0;g<e.length;g++)ac(e[g],g,g,o,e,f,u);else{var d={},h=Object.keys(e).sort(wR);for(g=0;g<h.length;g++){var _=h[g];ac(e[_],_,g,o,e,f,u),d[_]=e[_]}if(typeof a<"u")Bi.push([a,t,e]),a[t]=d;else return d}o.pop()}}function D_(e){return e=typeof e<"u"?e:function(t,n){return n},function(t,n){if(Pi.length>0)for(var o=0;o<Pi.length;o++){var a=Pi[o];if(a[1]===t&&a[0]===n){n=a[2],Pi.splice(o,1);break}}return e.call(this,t,n)}}const mR=Z.getDefaultExportFromCjs(Nc);Object.defineProperty(hi,"__esModule",{value:!0});hi.EthereumProviderError=hi.EthereumRpcError=void 0;const vR=Nc;class M_ extends Error{constructor(t,n,o){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!n||typeof n!="string")throw new Error('"message" must be a nonempty string.');super(n),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 vR.default(this.serialize(),RR,2)}}hi.EthereumRpcError=M_;let ER=class extends M_{constructor(t,n,o){if(!SR(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,n,o)}};hi.EthereumProviderError=ER;function SR(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function RR(e,t){if(t!=="[Circular]")return t}var Bc={},gi={};Object.defineProperty(gi,"__esModule",{value:!0});gi.errorValues=gi.errorCodes=void 0;gi.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}};gi.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=gi,n=hi,o=t.errorCodes.rpc.internal,a="Unspecified error message. This is a bug, please report it.",f={code:o,message:u(o)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function u(E,m=a){if(Number.isInteger(E)){const N=E.toString();if(y(t.errorValues,N))return t.errorValues[N].message;if(h(E))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return m}e.getMessageFromCode=u;function g(E){if(!Number.isInteger(E))return!1;const m=E.toString();return!!(t.errorValues[m]||h(E))}e.isValidCode=g;function d(E,{fallbackError:m=f,shouldIncludeStack:N=!1}={}){var k,U;if(!m||!Number.isInteger(m.code)||typeof m.message!="string")throw new Error("Must provide fallback error with integer number code and string message.");if(E instanceof n.EthereumRpcError)return E.serialize();const G={};if(E&&typeof E=="object"&&!Array.isArray(E)&&y(E,"code")&&g(E.code)){const P=E;G.code=P.code,P.message&&typeof P.message=="string"?(G.message=P.message,y(P,"data")&&(G.data=P.data)):(G.message=u(G.code),G.data={originalError:_(E)})}else{G.code=m.code;const P=(k=E)===null||k===void 0?void 0:k.message;G.message=P&&typeof P=="string"?P:m.message,G.data={originalError:_(E)}}const H=(U=E)===null||U===void 0?void 0:U.stack;return N&&E&&H&&typeof H=="string"&&(G.stack=H),G}e.serializeError=d;function h(E){return E>=-32099&&E<=-32e3}function _(E){return E&&typeof E=="object"&&!Array.isArray(E)?Object.assign({},E):E}function y(E,m){return Object.prototype.hasOwnProperty.call(E,m)}})(Bc);var gf={};Object.defineProperty(gf,"__esModule",{value:!0});gf.ethErrors=void 0;const $c=hi,k_=Bc,hn=gi;gf.ethErrors={rpc:{parse:e=>Kn(hn.errorCodes.rpc.parse,e),invalidRequest:e=>Kn(hn.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Kn(hn.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Kn(hn.errorCodes.rpc.methodNotFound,e),internal:e=>Kn(hn.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 Kn(t,e)},invalidInput:e=>Kn(hn.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Kn(hn.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Kn(hn.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Kn(hn.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Kn(hn.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Kn(hn.errorCodes.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>rs(hn.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>rs(hn.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>rs(hn.errorCodes.provider.unsupportedMethod,e),disconnected:e=>rs(hn.errorCodes.provider.disconnected,e),chainDisconnected:e=>rs(hn.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:n,data:o}=e;if(!n||typeof n!="string")throw new Error('"message" must be a nonempty string');return new $c.EthereumProviderError(t,n,o)}}};function Kn(e,t){const[n,o]=F_(t);return new $c.EthereumRpcError(e,n||k_.getMessageFromCode(e),o)}function rs(e,t){const[n,o]=F_(t);return new $c.EthereumProviderError(e,n||k_.getMessageFromCode(e),o)}function F_(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t||void 0,n]}}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=hi;Object.defineProperty(e,"EthereumRpcError",{enumerable:!0,get:function(){return t.EthereumRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});const n=Bc;Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return n.getMessageFromCode}});const o=gf;Object.defineProperty(e,"ethErrors",{enumerable:!0,get:function(){return o.ethErrors}});const a=gi;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})})(dr);var AR={exports:{}},bl={exports:{}},qt={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,n){return e.slice(t,n)},Error,FunctionPrototypeCall(e,t,...n){return e.call(t,...n)},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,n){return Object.defineProperty(e,t,n)},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,n){return e.then(t,n)},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,n){return e.slice(t,n)},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,n){return e.set(t,n)},Boolean,Uint8Array},U_={exports:{}},is={exports:{}},Ng;function bs(){if(Ng)return is.exports;Ng=1;const{AbortController:e,AbortSignal:t}=typeof self<"u"?self:typeof window<"u"?window:void 0;return is.exports=e,is.exports.AbortSignal=t,is.exports.default=e,is.exports}(function(e){const t=Z.bufferPolyfill,{kResistStopPropagation:n,SymbolDispose:o}=qt,a=globalThis.AbortSignal||bs().AbortSignal,f=globalThis.AbortController||bs().AbortController,u=Object.getPrototypeOf(async function(){}).constructor,g=globalThis.Blob||t.Blob,d=typeof g<"u"?function(m){return m instanceof g}:function(m){return!1},h=(E,m)=>{if(E!==void 0&&(E===null||typeof E!="object"||!("aborted"in E)))throw new ERR_INVALID_ARG_TYPE(m,"AbortSignal",E)},_=(E,m)=>{if(typeof E!="function")throw new ERR_INVALID_ARG_TYPE(m,"Function",E)};class y extends Error{constructor(m){if(!Array.isArray(m))throw new TypeError(`Expected input to be an Array, got ${typeof m}`);let N="";for(let k=0;k<m.length;k++)N+=` ${m[k].stack}
|
|
2
2
|
`;super(N),this.name="AggregateError",this.errors=m}}e.exports={AggregateError:y,kEmptyObject:Object.freeze({}),once(E){let m=!1;return function(...N){m||(m=!0,E.apply(this,N))}},createDeferredPromise:function(){let E,m;return{promise:new Promise((k,U)=>{E=k,m=U}),resolve:E,reject:m}},promisify(E){return new Promise((m,N)=>{E((k,...U)=>k?N(k):m(...U))})},debuglog(){return function(){}},format(E,...m){return E.replace(/%([sdifj])/g,function(...[N,k]){const U=m.shift();return k==="f"?U.toFixed(6):k==="j"?JSON.stringify(U):k==="s"&&typeof U=="object"?`${U.constructor!==Object?U.constructor.name:""} {}`.trim():U.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"{}"}},types:{isAsyncFunction(E){return E instanceof u},isArrayBufferView(E){return ArrayBuffer.isView(E)}},isBlob:d,deprecate(E,m){return E},addAbortListener:Z.requireEvents().addAbortListener||function(m,N){if(m===void 0)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",m);h(m,"signal"),_(N,"listener");let k;return m.aborted?queueMicrotask(()=>N()):(m.addEventListener("abort",N,{__proto__:null,once:!0,[n]:!0}),k=()=>{m.removeEventListener("abort",N)}),{__proto__:null,[o](){var U;(U=k)===null||U===void 0||U()}}},AbortSignalAny:a.any||function(m){if(m.length===1)return m[0];const N=new f,k=()=>N.abort();return m.forEach(U=>{h(U,"signals"),U.addEventListener("abort",k,{once:!0})}),N.signal.addEventListener("abort",()=>{m.forEach(U=>U.removeEventListener("abort",k))},{once:!0}),N.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(U_);var En=U_.exports,xc={};const{format:IR,inspect:rf,AggregateError:TR}=En,OR=globalThis.AggregateError||TR,LR=Symbol("kIsNodeError"),CR=["string","function","number","object","Function","Object","boolean","bigint","symbol"],PR=/^([A-Z][a-z0-9]*)+$/,NR="__node_internal_",_f={};function Ni(e,t){if(!e)throw new _f.ERR_INTERNAL_ASSERTION(t)}function Bg(e){let t="",n=e.length;const o=e[0]==="-"?1:0;for(;n>=o+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function BR(e,t,n){if(typeof t=="function")return Ni(t.length<=n.length,`Code: ${e}; The provided arguments length (${n.length}) does not match the required ones (${t.length}).`),t(...n);const o=(t.match(/%[dfijoOs]/g)||[]).length;return Ni(o===n.length,`Code: ${e}; The provided arguments length (${n.length}) does not match the required ones (${o}).`),n.length===0?t:IR(t,...n)}function an(e,t,n){n||(n=Error);class o extends n{constructor(...f){super(BR(e,t,f))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(o.prototype,{name:{value:n.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[LR]=!0,_f[e]=o}function $g(e){const t=NR+e.name;return Object.defineProperty(e,"name",{value:t}),e}function $R(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const n=new OR([t,e],t.message);return n.code=t.code,n}return e||t}let xR=class extends Error{constructor(t="The operation was aborted",n=void 0){if(n!==void 0&&typeof n!="object")throw new _f.ERR_INVALID_ARG_TYPE("options","Object",n);super(t,n),this.code="ABORT_ERR",this.name="AbortError"}};an("ERR_ASSERTION","%s",Error);an("ERR_INVALID_ARG_TYPE",(e,t,n)=>{Ni(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 a=[],f=[],u=[];for(const d of t)Ni(typeof d=="string","All expected entries have to be of type string"),CR.includes(d)?a.push(d.toLowerCase()):PR.test(d)?f.push(d):(Ni(d!=="object",'The value "object" should be written as "Object"'),u.push(d));if(f.length>0){const d=a.indexOf("object");d!==-1&&(a.splice(a,d,1),f.push("Object"))}if(a.length>0){switch(a.length){case 1:o+=`of type ${a[0]}`;break;case 2:o+=`one of type ${a[0]} or ${a[1]}`;break;default:{const d=a.pop();o+=`one of type ${a.join(", ")}, or ${d}`}}(f.length>0||u.length>0)&&(o+=" or ")}if(f.length>0){switch(f.length){case 1:o+=`an instance of ${f[0]}`;break;case 2:o+=`an instance of ${f[0]} or ${f[1]}`;break;default:{const d=f.pop();o+=`an instance of ${f.join(", ")}, or ${d}`}}u.length>0&&(o+=" or ")}switch(u.length){case 0:break;case 1:u[0].toLowerCase()!==u[0]&&(o+="an "),o+=`${u[0]}`;break;case 2:o+=`one of ${u[0]} or ${u[1]}`;break;default:{const d=u.pop();o+=`one of ${u.join(", ")}, or ${d}`}}if(n==null)o+=`. Received ${n}`;else if(typeof n=="function"&&n.name)o+=`. Received function ${n.name}`;else if(typeof n=="object"){var g;if((g=n.constructor)!==null&&g!==void 0&&g.name)o+=`. Received an instance of ${n.constructor.name}`;else{const d=rf(n,{depth:-1});o+=`. Received ${d}`}}else{let d=rf(n,{colors:!1});d.length>25&&(d=`${d.slice(0,25)}...`),o+=`. Received type ${typeof n} (${d})`}return o},TypeError);an("ERR_INVALID_ARG_VALUE",(e,t,n="is invalid")=>{let o=rf(t);return o.length>128&&(o=o.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${n}. Received ${o}`},TypeError);an("ERR_INVALID_RETURN_VALUE",(e,t,n)=>{var o;const a=n!=null&&(o=n.constructor)!==null&&o!==void 0&&o.name?`instance of ${n.constructor.name}`:`type ${typeof n}`;return`Expected ${e} to be returned from the "${t}" function but got ${a}.`},TypeError);an("ERR_MISSING_ARGS",(...e)=>{Ni(e.length>0,"At least one arg needs to be specified");let t;const n=e.length;switch(e=(Array.isArray(e)?e:[e]).map(o=>`"${o}"`).join(" or "),n){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);an("ERR_OUT_OF_RANGE",(e,t,n)=>{Ni(t,'Missing "range" argument');let o;return Number.isInteger(n)&&Math.abs(n)>2**32?o=Bg(String(n)):typeof n=="bigint"?(o=String(n),(n>2n**32n||n<-(2n**32n))&&(o=Bg(o)),o+="n"):o=rf(n),`The value of "${e}" is out of range. It must be ${t}. Received ${o}`},RangeError);an("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);an("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);an("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);an("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);an("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);an("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);an("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);an("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);an("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);an("ERR_STREAM_WRITE_AFTER_END","write after end",Error);an("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);var Ln={AbortError:xR,aggregateTwoErrors:$g($R),hideStackFrames:$g,codes:_f};const{ArrayIsArray:Dc,ArrayPrototypeIncludes:j_,ArrayPrototypeJoin:H_,ArrayPrototypeMap:DR,NumberIsInteger:Mc,NumberIsNaN:MR,NumberMAX_SAFE_INTEGER:kR,NumberMIN_SAFE_INTEGER:FR,NumberParseInt:UR,ObjectPrototypeHasOwnProperty:jR,RegExpPrototypeExec:W_,String:HR,StringPrototypeToUpperCase:WR,StringPrototypeTrim:zR}=qt,{hideStackFrames:tr,codes:{ERR_SOCKET_BAD_PORT:qR,ERR_INVALID_ARG_TYPE:bn,ERR_INVALID_ARG_VALUE:Io,ERR_OUT_OF_RANGE:$i,ERR_UNKNOWN_SIGNAL:xg}}=Ln,{normalizeEncoding:GR}=En,{isAsyncFunction:VR,isArrayBufferView:ZR}=En.types,Dg={};function KR(e){return e===(e|0)}function JR(e){return e===e>>>0}const XR=/^[0-7]+$/,YR="must be a 32-bit unsigned integer or an octal string";function QR(e,t,n){if(typeof e>"u"&&(e=n),typeof e=="string"){if(W_(XR,e)===null)throw new Io(t,e,YR);e=UR(e,8)}return z_(e,t),e}const eA=tr((e,t,n=FR,o=kR)=>{if(typeof e!="number")throw new bn(t,"number",e);if(!Mc(e))throw new $i(t,"an integer",e);if(e<n||e>o)throw new $i(t,`>= ${n} && <= ${o}`,e)}),tA=tr((e,t,n=-2147483648,o=2147483647)=>{if(typeof e!="number")throw new bn(t,"number",e);if(!Mc(e))throw new $i(t,"an integer",e);if(e<n||e>o)throw new $i(t,`>= ${n} && <= ${o}`,e)}),z_=tr((e,t,n=!1)=>{if(typeof e!="number")throw new bn(t,"number",e);if(!Mc(e))throw new $i(t,"an integer",e);const o=n?1:0,a=4294967295;if(e<o||e>a)throw new $i(t,`>= ${o} && <= ${a}`,e)});function kc(e,t){if(typeof e!="string")throw new bn(t,"string",e)}function nA(e,t,n=void 0,o){if(typeof e!="number")throw new bn(t,"number",e);if(n!=null&&e<n||o!=null&&e>o||(n!=null||o!=null)&&MR(e))throw new $i(t,`${n!=null?`>= ${n}`:""}${n!=null&&o!=null?" && ":""}${o!=null?`<= ${o}`:""}`,e)}const rA=tr((e,t,n)=>{if(!j_(n,e)){const a="must be one of: "+H_(DR(n,f=>typeof f=="string"?`'${f}'`:HR(f)),", ");throw new Io(t,e,a)}});function q_(e,t){if(typeof e!="boolean")throw new bn(t,"boolean",e)}function yl(e,t,n){return e==null||!jR(e,t)?n:e[t]}const iA=tr((e,t,n=null)=>{const o=yl(n,"allowArray",!1),a=yl(n,"allowFunction",!1);if(!yl(n,"nullable",!1)&&e===null||!o&&Dc(e)||typeof e!="object"&&(!a||typeof e!="function"))throw new bn(t,"Object",e)}),oA=tr((e,t)=>{if(e!=null&&typeof e!="object"&&typeof e!="function")throw new bn(t,"a dictionary",e)}),pf=tr((e,t,n=0)=>{if(!Dc(e))throw new bn(t,"Array",e);if(e.length<n){const o=`must be longer than ${n}`;throw new Io(t,e,o)}});function sA(e,t){pf(e,t);for(let n=0;n<e.length;n++)kc(e[n],`${t}[${n}]`)}function aA(e,t){pf(e,t);for(let n=0;n<e.length;n++)q_(e[n],`${t}[${n}]`)}function fA(e,t){pf(e,t);for(let n=0;n<e.length;n++){const o=e[n],a=`${t}[${n}]`;if(o==null)throw new bn(a,"AbortSignal",o);G_(o,a)}}function uA(e,t="signal"){if(kc(e,t),Dg[e]===void 0)throw Dg[WR(e)]!==void 0?new xg(e+" (signals must use all capital letters)"):new xg(e)}const lA=tr((e,t="buffer")=>{if(!ZR(e))throw new bn(t,["Buffer","TypedArray","DataView"],e)});function cA(e,t){const n=GR(t),o=e.length;if(n==="hex"&&o%2!==0)throw new Io("encoding",t,`is invalid for data of length ${o}`)}function dA(e,t="Port",n=!0){if(typeof e!="number"&&typeof e!="string"||typeof e=="string"&&zR(e).length===0||+e!==+e>>>0||e>65535||e===0&&!n)throw new qR(t,e,n);return e|0}const G_=tr((e,t)=>{if(e!==void 0&&(e===null||typeof e!="object"||!("aborted"in e)))throw new bn(t,"AbortSignal",e)}),hA=tr((e,t)=>{if(typeof e!="function")throw new bn(t,"Function",e)}),gA=tr((e,t)=>{if(typeof e!="function"||VR(e))throw new bn(t,"Function",e)}),_A=tr((e,t)=>{if(e!==void 0)throw new bn(t,"undefined",e)});function pA(e,t,n){if(!j_(n,e))throw new bn(t,`('${H_(n,"|")}')`,e)}const bA=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function Mg(e,t){if(typeof e>"u"||!W_(bA,e))throw new Io(t,e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}function yA(e){if(typeof e=="string")return Mg(e,"hints"),e;if(Dc(e)){const t=e.length;let n="";if(t===0)return n;for(let o=0;o<t;o++){const a=e[o];Mg(a,"hints"),n+=a,o!==t-1&&(n+=", ")}return n}throw new Io("hints",e,'must be an array or string of format "</styles.css>; rel=preload; as=style"')}var Es={isInt32:KR,isUint32:JR,parseFileMode:QR,validateArray:pf,validateStringArray:sA,validateBooleanArray:aA,validateAbortSignalArray:fA,validateBoolean:q_,validateBuffer:lA,validateDictionary:oA,validateEncoding:cA,validateFunction:hA,validateInt32:tA,validateInteger:eA,validateNumber:nA,validateObject:iA,validateOneOf:rA,validatePlainFunction:gA,validatePort:dA,validateSignalName:uA,validateString:kc,validateUint32:z_,validateUndefined:_A,validateUnion:pA,validateAbortSignal:G_,validateLinkHeaderValue:yA},Fc={exports:{}};const{SymbolAsyncIterator:kg,SymbolIterator:Fg,SymbolFor:Mi}=qt,V_=Mi("nodejs.stream.destroyed"),Z_=Mi("nodejs.stream.errored"),fc=Mi("nodejs.stream.readable"),uc=Mi("nodejs.stream.writable"),K_=Mi("nodejs.stream.disturbed"),wA=Mi("nodejs.webstream.isClosedPromise"),mA=Mi("nodejs.webstream.controllerErrorFunction");function bf(e,t=!1){var n;return!!(e&&typeof e.pipe=="function"&&typeof e.on=="function"&&(!t||typeof e.pause=="function"&&typeof e.resume=="function")&&(!e._writableState||((n=e._readableState)===null||n===void 0?void 0:n.readable)!==!1)&&(!e._writableState||e._readableState))}function yf(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 vA(e){return!!(e&&typeof e.pipe=="function"&&e._readableState&&typeof e.on=="function"&&typeof e.write=="function")}function Lr(e){return e&&(e._readableState||e._writableState||typeof e.write=="function"&&typeof e.on=="function"||typeof e.pipe=="function"&&typeof e.on=="function")}function J_(e){return!!(e&&!Lr(e)&&typeof e.pipeThrough=="function"&&typeof e.getReader=="function"&&typeof e.cancel=="function")}function X_(e){return!!(e&&!Lr(e)&&typeof e.getWriter=="function"&&typeof e.abort=="function")}function Y_(e){return!!(e&&!Lr(e)&&typeof e.readable=="object"&&typeof e.writable=="object")}function EA(e){return J_(e)||X_(e)||Y_(e)}function SA(e,t){return e==null?!1:t===!0?typeof e[kg]=="function":t===!1?typeof e[Fg]=="function":typeof e[kg]=="function"||typeof e[Fg]=="function"}function wf(e){if(!Lr(e))return null;const t=e._writableState,n=e._readableState,o=t||n;return!!(e.destroyed||e[V_]||o!=null&&o.destroyed)}function Q_(e){if(!yf(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 RA(e,t){if(!yf(e))return null;if(e.writableFinished===!0)return!0;const n=e._writableState;return n!=null&&n.errored?!1:typeof(n==null?void 0:n.finished)!="boolean"?null:!!(n.finished||t===!1&&n.ended===!0&&n.length===0)}function AA(e){if(!bf(e))return null;if(e.readableEnded===!0)return!0;const t=e._readableState;return!t||t.errored?!1:typeof(t==null?void 0:t.ended)!="boolean"?null:t.ended}function ep(e,t){if(!bf(e))return null;const n=e._readableState;return n!=null&&n.errored?!1:typeof(n==null?void 0:n.endEmitted)!="boolean"?null:!!(n.endEmitted||t===!1&&n.ended===!0&&n.length===0)}function tp(e){return e&&e[fc]!=null?e[fc]:typeof(e==null?void 0:e.readable)!="boolean"?null:wf(e)?!1:bf(e)&&e.readable&&!ep(e)}function np(e){return e&&e[uc]!=null?e[uc]:typeof(e==null?void 0:e.writable)!="boolean"?null:wf(e)?!1:yf(e)&&e.writable&&!Q_(e)}function IA(e,t){return Lr(e)?wf(e)?!0:!((t==null?void 0:t.readable)!==!1&&tp(e)||(t==null?void 0:t.writable)!==!1&&np(e)):null}function TA(e){var t,n;return Lr(e)?e.writableErrored?e.writableErrored:(t=(n=e._writableState)===null||n===void 0?void 0:n.errored)!==null&&t!==void 0?t:null:null}function OA(e){var t,n;return Lr(e)?e.readableErrored?e.readableErrored:(t=(n=e._readableState)===null||n===void 0?void 0:n.errored)!==null&&t!==void 0?t:null:null}function LA(e){if(!Lr(e))return null;if(typeof e.closed=="boolean")return e.closed;const t=e._writableState,n=e._readableState;return typeof(t==null?void 0:t.closed)=="boolean"||typeof(n==null?void 0:n.closed)=="boolean"?(t==null?void 0:t.closed)||(n==null?void 0:n.closed):typeof e._closed=="boolean"&&rp(e)?e._closed:null}function rp(e){return typeof e._closed=="boolean"&&typeof e._defaultKeepAlive=="boolean"&&typeof e._removedConnection=="boolean"&&typeof e._removedContLen=="boolean"}function ip(e){return typeof e._sent100=="boolean"&&rp(e)}function CA(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 PA(e){if(!Lr(e))return null;const t=e._writableState,n=e._readableState,o=t||n;return!o&&ip(e)||!!(o&&o.autoDestroy&&o.emitClose&&o.closed===!1)}function NA(e){var t;return!!(e&&((t=e[K_])!==null&&t!==void 0?t:e.readableDidRead||e.readableAborted))}function BA(e){var t,n,o,a,f,u,g,d,h,_;return!!(e&&((t=(n=(o=(a=(f=(u=e[Z_])!==null&&u!==void 0?u:e.readableErrored)!==null&&f!==void 0?f:e.writableErrored)!==null&&a!==void 0?a:(g=e._readableState)===null||g===void 0?void 0:g.errorEmitted)!==null&&o!==void 0?o:(d=e._writableState)===null||d===void 0?void 0:d.errorEmitted)!==null&&n!==void 0?n:(h=e._readableState)===null||h===void 0?void 0:h.errored)!==null&&t!==void 0?t:!((_=e._writableState)===null||_===void 0)&&_.errored))}var Kr={isDestroyed:wf,kIsDestroyed:V_,isDisturbed:NA,kIsDisturbed:K_,isErrored:BA,kIsErrored:Z_,isReadable:tp,kIsReadable:fc,kIsClosedPromise:wA,kControllerErrorFunction:mA,kIsWritable:uc,isClosed:LA,isDuplexNodeStream:vA,isFinished:IA,isIterable:SA,isReadableNodeStream:bf,isReadableStream:J_,isReadableEnded:AA,isReadableFinished:ep,isReadableErrored:OA,isNodeStream:Lr,isWebStream:EA,isWritable:np,isWritableNodeStream:yf,isWritableStream:X_,isWritableEnded:Q_,isWritableFinished:RA,isWritableErrored:TA,isServerRequest:CA,isServerResponse:ip,willEmitClose:PA,isTransformStream:Y_};const ui=Z.browserExports,{AbortError:op,codes:$A}=Ln,{ERR_INVALID_ARG_TYPE:xA,ERR_STREAM_PREMATURE_CLOSE:Ug}=$A,{kEmptyObject:lc,once:cc}=En,{validateAbortSignal:DA,validateFunction:MA,validateObject:kA,validateBoolean:FA}=Es,{Promise:UA,PromisePrototypeThen:jA,SymbolDispose:sp}=qt,{isClosed:HA,isReadable:jg,isReadableNodeStream:wl,isReadableStream:WA,isReadableFinished:Hg,isReadableErrored:Wg,isWritable:zg,isWritableNodeStream:qg,isWritableStream:zA,isWritableFinished:Gg,isWritableErrored:Vg,isNodeStream:qA,willEmitClose:GA,kIsClosedPromise:VA}=Kr;let bo;function ZA(e){return e.setHeader&&typeof e.abort=="function"}const dc=()=>{};function ap(e,t,n){var o,a;if(arguments.length===2?(n=t,t=lc):t==null?t=lc:kA(t,"options"),MA(n,"callback"),DA(t.signal,"options.signal"),n=cc(n),WA(e)||zA(e))return KA(e,t,n);if(!qA(e))throw new xA("stream",["ReadableStream","WritableStream","Stream"],e);const f=(o=t.readable)!==null&&o!==void 0?o:wl(e),u=(a=t.writable)!==null&&a!==void 0?a:qg(e),g=e._writableState,d=e._readableState,h=()=>{e.writable||E()};let _=GA(e)&&wl(e)===f&&qg(e)===u,y=Gg(e,!1);const E=()=>{y=!0,e.destroyed&&(_=!1),!(_&&(!e.readable||f))&&(!f||m)&&n.call(e)};let m=Hg(e,!1);const N=()=>{m=!0,e.destroyed&&(_=!1),!(_&&(!e.writable||u))&&(!u||y)&&n.call(e)},k=J=>{n.call(e,J)};let U=HA(e);const G=()=>{U=!0;const J=Vg(e)||Wg(e);if(J&&typeof J!="boolean")return n.call(e,J);if(f&&!m&&wl(e,!0)&&!Hg(e,!1))return n.call(e,new Ug);if(u&&!y&&!Gg(e,!1))return n.call(e,new Ug);n.call(e)},H=()=>{U=!0;const J=Vg(e)||Wg(e);if(J&&typeof J!="boolean")return n.call(e,J);n.call(e)},P=()=>{e.req.on("finish",E)};ZA(e)?(e.on("complete",E),_||e.on("abort",G),e.req?P():e.on("request",P)):u&&!g&&(e.on("end",h),e.on("close",h)),!_&&typeof e.aborted=="boolean"&&e.on("aborted",G),e.on("end",N),e.on("finish",E),t.error!==!1&&e.on("error",k),e.on("close",G),U?ui.nextTick(G):g!=null&&g.errorEmitted||d!=null&&d.errorEmitted?_||ui.nextTick(H):(!f&&(!_||jg(e))&&(y||zg(e)===!1)||!u&&(!_||zg(e))&&(m||jg(e)===!1)||d&&e.req&&e.aborted)&&ui.nextTick(H);const C=()=>{n=dc,e.removeListener("aborted",G),e.removeListener("complete",E),e.removeListener("abort",G),e.removeListener("request",P),e.req&&e.req.removeListener("finish",E),e.removeListener("end",h),e.removeListener("close",h),e.removeListener("finish",E),e.removeListener("end",N),e.removeListener("error",k),e.removeListener("close",G)};if(t.signal&&!U){const J=()=>{const ae=n;C(),ae.call(e,new op(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)ui.nextTick(J);else{bo=bo||En.addAbortListener;const ae=bo(t.signal,J),ie=n;n=cc((..._e)=>{ae[sp](),ie.apply(e,_e)})}}return C}function KA(e,t,n){let o=!1,a=dc;if(t.signal)if(a=()=>{o=!0,n.call(e,new op(void 0,{cause:t.signal.reason}))},t.signal.aborted)ui.nextTick(a);else{bo=bo||En.addAbortListener;const u=bo(t.signal,a),g=n;n=cc((...d)=>{u[sp](),g.apply(e,d)})}const f=(...u)=>{o||ui.nextTick(()=>n.apply(e,u))};return jA(e[VA].promise,f,f),dc}function JA(e,t){var n;let o=!1;return t===null&&(t=lc),(n=t)!==null&&n!==void 0&&n.cleanup&&(FA(t.cleanup,"cleanup"),o=t.cleanup),new UA((a,f)=>{const u=ap(e,t,g=>{o&&u(),g?f(g):a()})})}Fc.exports=ap;Fc.exports.finished=JA;var pi=Fc.exports;const Ir=Z.browserExports,{aggregateTwoErrors:XA,codes:{ERR_MULTIPLE_CALLBACK:YA},AbortError:QA}=Ln,{Symbol:fp}=qt,{kIsDestroyed:eI,isDestroyed:tI,isFinished:nI,isServerRequest:rI}=Kr,up=fp("kDestroy"),hc=fp("kConstruct");function lp(e,t,n){e&&(e.stack,t&&!t.errored&&(t.errored=e),n&&!n.errored&&(n.errored=e))}function iI(e,t){const n=this._readableState,o=this._writableState,a=o||n;return o!=null&&o.destroyed||n!=null&&n.destroyed?(typeof t=="function"&&t(),this):(lp(e,o,n),o&&(o.destroyed=!0),n&&(n.destroyed=!0),a.constructed?Zg(this,e,t):this.once(up,function(f){Zg(this,XA(f,e),t)}),this)}function Zg(e,t,n){let o=!1;function a(f){if(o)return;o=!0;const u=e._readableState,g=e._writableState;lp(f,g,u),g&&(g.closed=!0),u&&(u.closed=!0),typeof n=="function"&&n(f),f?Ir.nextTick(oI,e,f):Ir.nextTick(cp,e)}try{e._destroy(t||null,a)}catch(f){a(f)}}function oI(e,t){gc(e,t),cp(e)}function cp(e){const t=e._readableState,n=e._writableState;n&&(n.closeEmitted=!0),t&&(t.closeEmitted=!0),(n!=null&&n.emitClose||t!=null&&t.emitClose)&&e.emit("close")}function gc(e,t){const n=e._readableState,o=e._writableState;o!=null&&o.errorEmitted||n!=null&&n.errorEmitted||(o&&(o.errorEmitted=!0),n&&(n.errorEmitted=!0),e.emit("error",t))}function sI(){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 _c(e,t,n){const o=e._readableState,a=e._writableState;if(a!=null&&a.destroyed||o!=null&&o.destroyed)return this;o!=null&&o.autoDestroy||a!=null&&a.autoDestroy?e.destroy(t):t&&(t.stack,a&&!a.errored&&(a.errored=t),o&&!o.errored&&(o.errored=t),n?Ir.nextTick(gc,e,t):gc(e,t))}function aI(e,t){if(typeof e._construct!="function")return;const n=e._readableState,o=e._writableState;n&&(n.constructed=!1),o&&(o.constructed=!1),e.once(hc,t),!(e.listenerCount(hc)>1)&&Ir.nextTick(fI,e)}function fI(e){let t=!1;function n(o){if(t){_c(e,o??new YA);return}t=!0;const a=e._readableState,f=e._writableState,u=f||a;a&&(a.constructed=!0),f&&(f.constructed=!0),u.destroyed?e.emit(up,o):o?_c(e,o,!0):Ir.nextTick(uI,e)}try{e._construct(o=>{Ir.nextTick(n,o)})}catch(o){Ir.nextTick(n,o)}}function uI(e){e.emit(hc)}function Kg(e){return(e==null?void 0:e.setHeader)&&typeof e.abort=="function"}function dp(e){e.emit("close")}function lI(e,t){e.emit("error",t),Ir.nextTick(dp,e)}function cI(e,t){!e||tI(e)||(!t&&!nI(e)&&(t=new QA),rI(e)?(e.socket=null,e.destroy(t)):Kg(e)?e.abort():Kg(e.req)?e.req.abort():typeof e.destroy=="function"?e.destroy(t):typeof e.close=="function"?e.close():t?Ir.nextTick(lI,e,t):Ir.nextTick(dp,e),e.destroyed||(e[eI]=!0))}var To={construct:aI,destroyer:cI,destroy:iI,undestroy:sI,errorOrDestroy:_c};const{ArrayIsArray:dI,ObjectSetPrototypeOf:hp}=qt,{EventEmitter:mf}=Z.requireEvents();function vf(e){mf.call(this,e)}hp(vf.prototype,mf.prototype);hp(vf,mf);vf.prototype.pipe=function(e,t){const n=this;function o(_){e.writable&&e.write(_)===!1&&n.pause&&n.pause()}n.on("data",o);function a(){n.readable&&n.resume&&n.resume()}e.on("drain",a),!e._isStdio&&(!t||t.end!==!1)&&(n.on("end",u),n.on("close",g));let f=!1;function u(){f||(f=!0,e.end())}function g(){f||(f=!0,typeof e.destroy=="function"&&e.destroy())}function d(_){h(),mf.listenerCount(this,"error")===0&&this.emit("error",_)}pc(n,"error",d),pc(e,"error",d);function h(){n.removeListener("data",o),e.removeListener("drain",a),n.removeListener("end",u),n.removeListener("close",g),n.removeListener("error",d),e.removeListener("error",d),n.removeListener("end",h),n.removeListener("close",h),e.removeListener("close",h)}return n.on("end",h),n.on("close",h),e.on("close",h),e.emit("pipe",n),e};function pc(e,t,n){if(typeof e.prependListener=="function")return e.prependListener(t,n);!e._events||!e._events[t]?e.on(t,n):dI(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]}var Uc={Stream:vf,prependListener:pc},gp={exports:{}};(function(e){const{SymbolDispose:t}=qt,{AbortError:n,codes:o}=Ln,{isNodeStream:a,isWebStream:f,kControllerErrorFunction:u}=Kr,g=pi,{ERR_INVALID_ARG_TYPE:d}=o;let h;const _=(y,E)=>{if(typeof y!="object"||!("aborted"in y))throw new d(E,"AbortSignal",y)};e.exports.addAbortSignal=function(E,m){if(_(E,"signal"),!a(m)&&!f(m))throw new d("stream",["ReadableStream","WritableStream","Stream"],m);return e.exports.addAbortSignalNoValidate(E,m)},e.exports.addAbortSignalNoValidate=function(y,E){if(typeof y!="object"||!("aborted"in y))return E;const m=a(E)?()=>{E.destroy(new n(void 0,{cause:y.reason}))}:()=>{E[u](new n(void 0,{cause:y.reason}))};if(y.aborted)m();else{h=h||En.addAbortListener;const N=h(y,m);g(E,N[t])}return E}})(gp);var Ef=gp.exports;const{StringPrototypeSlice:Jg,SymbolIterator:hI,TypedArrayPrototypeSet:Fa,Uint8Array:gI}=qt,{Buffer:ml}=Z.bufferPolyfill,{inspect:_I}=En;var pI=class{constructor(){this.head=null,this.tail=null,this.length=0}push(t){const n={data:t,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}unshift(t){const n={data:t,next:this.head};this.length===0&&(this.tail=n),this.head=n,++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 n=this.head,o=""+n.data;for(;(n=n.next)!==null;)o+=t+n.data;return o}concat(t){if(this.length===0)return ml.alloc(0);const n=ml.allocUnsafe(t>>>0);let o=this.head,a=0;for(;o;)Fa(n,o.data,a),a+=o.data.length,o=o.next;return n}consume(t,n){const o=this.head.data;if(t<o.length){const a=o.slice(0,t);return this.head.data=o.slice(t),a}return t===o.length?this.shift():n?this._getString(t):this._getBuffer(t)}first(){return this.head.data}*[hI](){for(let t=this.head;t;t=t.next)yield t.data}_getString(t){let n="",o=this.head,a=0;do{const f=o.data;if(t>f.length)n+=f,t-=f.length;else{t===f.length?(n+=f,++a,o.next?this.head=o.next:this.head=this.tail=null):(n+=Jg(f,0,t),this.head=o,o.data=Jg(f,t));break}++a}while((o=o.next)!==null);return this.length-=a,n}_getBuffer(t){const n=ml.allocUnsafe(t),o=t;let a=this.head,f=0;do{const u=a.data;if(t>u.length)Fa(n,u,o-t),t-=u.length;else{t===u.length?(Fa(n,u,o-t),++f,a.next?this.head=a.next:this.head=this.tail=null):(Fa(n,new gI(u.buffer,u.byteOffset,t),o-t),this.head=a,a.data=u.slice(t));break}++f}while((a=a.next)!==null);return this.length-=f,n}[Symbol.for("nodejs.util.inspect.custom")](t,n){return _I(this,{...n,depth:0,customInspect:!1})}};const{MathFloor:bI,NumberIsInteger:yI}=qt,{validateInteger:wI}=Es,{ERR_INVALID_ARG_VALUE:mI}=Ln.codes;let _p=16*1024,pp=16;function vI(e,t,n){return e.highWaterMark!=null?e.highWaterMark:t?e[n]:null}function bp(e){return e?pp:_p}function EI(e,t){wI(t,"value",0),e?pp=t:_p=t}function SI(e,t,n,o){const a=vI(t,o,n);if(a!=null){if(!yI(a)||a<0){const f=o?`options.${n}`:"options.highWaterMark";throw new mI(f,a)}return bI(a)}return bp(e.objectMode)}var Sf={getHighWaterMark:SI,getDefaultHighWaterMark:bp,setDefaultHighWaterMark:EI};const Xg=Z.browserExports,{PromisePrototypeThen:RI,SymbolAsyncIterator:Yg,SymbolIterator:Qg}=qt,{Buffer:AI}=Z.bufferPolyfill,{ERR_INVALID_ARG_TYPE:II,ERR_STREAM_NULL_VALUES:TI}=Ln.codes;function OI(e,t,n){let o;if(typeof t=="string"||t instanceof AI)return new e({objectMode:!0,...n,read(){this.push(t),this.push(null)}});let a;if(t&&t[Yg])a=!0,o=t[Yg]();else if(t&&t[Qg])a=!1,o=t[Qg]();else throw new II("iterable",["Iterable"],t);const f=new e({objectMode:!0,highWaterMark:1,...n});let u=!1;f._read=function(){u||(u=!0,d())},f._destroy=function(h,_){RI(g(h),()=>Xg.nextTick(_,h),y=>Xg.nextTick(_,y||h))};async function g(h){const _=h!=null,y=typeof o.throw=="function";if(_&&y){const{value:E,done:m}=await o.throw(h);if(await E,m)return}if(typeof o.return=="function"){const{value:E}=await o.return();await E}}async function d(){for(;;){try{const{value:h,done:_}=a?await o.next():o.next();if(_)f.push(null);else{const y=h&&typeof h.then=="function"?await h:h;if(y===null)throw u=!1,new TI;if(f.push(y))continue;u=!1}}catch(h){f.destroy(h)}break}}return f}var yp=OI,vl,e0;function Rf(){if(e0)return vl;e0=1;const e=Z.browserExports,{ArrayPrototypeIndexOf:t,NumberIsInteger:n,NumberIsNaN:o,NumberParseInt:a,ObjectDefineProperties:f,ObjectKeys:u,ObjectSetPrototypeOf:g,Promise:d,SafeSet:h,SymbolAsyncDispose:_,SymbolAsyncIterator:y,Symbol:E}=qt;vl=xe,xe.ReadableState=tt;const{EventEmitter:m}=Z.requireEvents(),{Stream:N,prependListener:k}=Uc,{Buffer:U}=Z.bufferPolyfill,{addAbortSignal:G}=Ef,H=pi;let P=En.debuglog("stream",S=>{P=S});const C=pI,J=To,{getHighWaterMark:ae,getDefaultHighWaterMark:ie}=Sf,{aggregateTwoErrors:_e,codes:{ERR_INVALID_ARG_TYPE:ce,ERR_METHOD_NOT_IMPLEMENTED:Ie,ERR_OUT_OF_RANGE:we,ERR_STREAM_PUSH_AFTER_EOF:p,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:v},AbortError:A}=Ln,{validateObject:B}=Es,W=E("kPaused"),{StringDecoder:D}=Z.requireString_decoder(),X=yp;g(xe.prototype,N.prototype),g(xe,N);const M=()=>{},{errorOrDestroy:q}=J,ne=1,he=2,ee=4,me=8,pe=16,Re=32,Fe=64,Pe=128,$e=256,Qe=512,Ke=1024,We=2048,x=4096,j=8192,re=16384,Te=32768,ye=65536,Ne=1<<17,qe=1<<18;function He(S){return{enumerable:!1,get(){return(this.state&S)!==0},set(L){L?this.state|=S:this.state&=~S}}}f(tt.prototype,{objectMode:He(ne),ended:He(he),endEmitted:He(ee),reading:He(me),constructed:He(pe),sync:He(Re),needReadable:He(Fe),emittedReadable:He(Pe),readableListening:He($e),resumeScheduled:He(Qe),errorEmitted:He(Ke),emitClose:He(We),autoDestroy:He(x),destroyed:He(j),closed:He(re),closeEmitted:He(Te),multiAwaitDrain:He(ye),readingMore:He(Ne),dataEmitted:He(qe)});function tt(S,L,ge){typeof ge!="boolean"&&(ge=L instanceof Gr()),this.state=We|x|pe|Re,S&&S.objectMode&&(this.state|=ne),ge&&S&&S.readableObjectMode&&(this.state|=ne),this.highWaterMark=S?ae(this,S,"readableHighWaterMark",ge):ie(!1),this.buffer=new C,this.length=0,this.pipes=[],this.flowing=null,this[W]=null,S&&S.emitClose===!1&&(this.state&=~We),S&&S.autoDestroy===!1&&(this.state&=~x),this.errored=null,this.defaultEncoding=S&&S.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,S&&S.encoding&&(this.decoder=new D(S.encoding),this.encoding=S.encoding)}function xe(S){if(!(this instanceof xe))return new xe(S);const L=this instanceof Gr();this._readableState=new tt(S,this,L),S&&(typeof S.read=="function"&&(this._read=S.read),typeof S.destroy=="function"&&(this._destroy=S.destroy),typeof S.construct=="function"&&(this._construct=S.construct),S.signal&&!L&&G(S.signal,this)),N.call(this,S),J.construct(this,()=>{this._readableState.needReadable&&T(this,this._readableState)})}xe.prototype.destroy=J.destroy,xe.prototype._undestroy=J.undestroy,xe.prototype._destroy=function(S,L){L(S)},xe.prototype[m.captureRejectionSymbol]=function(S){this.destroy(S)},xe.prototype[_]=function(){let S;return this.destroyed||(S=this.readableEnded?null:new A,this.destroy(S)),new d((L,ge)=>H(this,Ce=>Ce&&Ce!==S?ge(Ce):L(null)))},xe.prototype.push=function(S,L){return at(this,S,L,!1)},xe.prototype.unshift=function(S,L){return at(this,S,L,!0)};function at(S,L,ge,Ce){P("readableAddChunk",L);const Be=S._readableState;let Ve;if(Be.state&ne||(typeof L=="string"?(ge=ge||Be.defaultEncoding,Be.encoding!==ge&&(Ce&&Be.encoding?L=U.from(L,ge).toString(Be.encoding):(L=U.from(L,ge),ge=""))):L instanceof U?ge="":N._isUint8Array(L)?(L=N._uint8ArrayToBuffer(L),ge=""):L!=null&&(Ve=new ce("chunk",["string","Buffer","Uint8Array"],L))),Ve)q(S,Ve);else if(L===null)Be.state&=~me,ut(S,Be);else if(Be.state&ne||L&&L.length>0)if(Ce)if(Be.state&ee)q(S,new v);else{if(Be.destroyed||Be.errored)return!1;Mt(S,Be,L,!0)}else if(Be.ended)q(S,new p);else{if(Be.destroyed||Be.errored)return!1;Be.state&=~me,Be.decoder&&!ge?(L=Be.decoder.write(L),Be.objectMode||L.length!==0?Mt(S,Be,L,!1):T(S,Be)):Mt(S,Be,L,!1)}else Ce||(Be.state&=~me,T(S,Be));return!Be.ended&&(Be.length<Be.highWaterMark||Be.length===0)}function Mt(S,L,ge,Ce){L.flowing&&L.length===0&&!L.sync&&S.listenerCount("data")>0?(L.state&ye?L.awaitDrainWriters.clear():L.awaitDrainWriters=null,L.dataEmitted=!0,S.emit("data",ge)):(L.length+=L.objectMode?1:ge.length,Ce?L.buffer.unshift(ge):L.buffer.push(ge),L.state&Fe&&$t(S)),T(S,L)}xe.prototype.isPaused=function(){const S=this._readableState;return S[W]===!0||S.flowing===!1},xe.prototype.setEncoding=function(S){const L=new D(S);this._readableState.decoder=L,this._readableState.encoding=this._readableState.decoder.encoding;const ge=this._readableState.buffer;let Ce="";for(const Be of ge)Ce+=L.write(Be);return ge.clear(),Ce!==""&&ge.push(Ce),this._readableState.length=Ce.length,this};const _t=1073741824;function fn(S){if(S>_t)throw new we("size","<= 1GiB",S);return S--,S|=S>>>1,S|=S>>>2,S|=S>>>4,S|=S>>>8,S|=S>>>16,S++,S}function Rt(S,L){return S<=0||L.length===0&&L.ended?0:L.state&ne?1:o(S)?L.flowing&&L.length?L.buffer.first().length:L.length:S<=L.length?S:L.ended?L.length:0}xe.prototype.read=function(S){P("read",S),S===void 0?S=NaN:n(S)||(S=a(S,10));const L=this._readableState,ge=S;if(S>L.highWaterMark&&(L.highWaterMark=fn(S)),S!==0&&(L.state&=~Pe),S===0&&L.needReadable&&((L.highWaterMark!==0?L.length>=L.highWaterMark:L.length>0)||L.ended))return P("read: emitReadable",L.length,L.ended),L.length===0&&L.ended?fe(this):$t(this),null;if(S=Rt(S,L),S===0&&L.ended)return L.length===0&&fe(this),null;let Ce=(L.state&Fe)!==0;if(P("need readable",Ce),(L.length===0||L.length-S<L.highWaterMark)&&(Ce=!0,P("length less than watermark",Ce)),L.ended||L.reading||L.destroyed||L.errored||!L.constructed)Ce=!1,P("reading, ended or constructing",Ce);else if(Ce){P("do read"),L.state|=me|Re,L.length===0&&(L.state|=Fe);try{this._read(L.highWaterMark)}catch(Ve){q(this,Ve)}L.state&=~Re,L.reading||(S=Rt(ge,L))}let Be;return S>0?Be=se(S,L):Be=null,Be===null?(L.needReadable=L.length<=L.highWaterMark,S=0):(L.length-=S,L.multiAwaitDrain?L.awaitDrainWriters.clear():L.awaitDrainWriters=null),L.length===0&&(L.ended||(L.needReadable=!0),ge!==S&&L.ended&&fe(this)),Be!==null&&!L.errorEmitted&&!L.closeEmitted&&(L.dataEmitted=!0,this.emit("data",Be)),Be};function ut(S,L){if(P("onEofChunk"),!L.ended){if(L.decoder){const ge=L.decoder.end();ge&&ge.length&&(L.buffer.push(ge),L.length+=L.objectMode?1:ge.length)}L.ended=!0,L.sync?$t(S):(L.needReadable=!1,L.emittedReadable=!0,kt(S))}}function $t(S){const L=S._readableState;P("emitReadable",L.needReadable,L.emittedReadable),L.needReadable=!1,L.emittedReadable||(P("emitReadable",L.flowing),L.emittedReadable=!0,e.nextTick(kt,S))}function kt(S){const L=S._readableState;P("emitReadable_",L.destroyed,L.length,L.ended),!L.destroyed&&!L.errored&&(L.length||L.ended)&&(S.emit("readable"),L.emittedReadable=!1),L.needReadable=!L.flowing&&!L.ended&&L.length<=L.highWaterMark,Ae(S)}function T(S,L){!L.readingMore&&L.constructed&&(L.readingMore=!0,e.nextTick(ve,S,L))}function ve(S,L){for(;!L.reading&&!L.ended&&(L.length<L.highWaterMark||L.flowing&&L.length===0);){const ge=L.length;if(P("maybeReadMore read 0"),S.read(0),ge===L.length)break}L.readingMore=!1}xe.prototype._read=function(S){throw new Ie("_read()")},xe.prototype.pipe=function(S,L){const ge=this,Ce=this._readableState;Ce.pipes.length===1&&(Ce.multiAwaitDrain||(Ce.multiAwaitDrain=!0,Ce.awaitDrainWriters=new h(Ce.awaitDrainWriters?[Ce.awaitDrainWriters]:[]))),Ce.pipes.push(S),P("pipe count=%d opts=%j",Ce.pipes.length,L);const Ve=(!L||L.end!==!1)&&S!==e.stdout&&S!==e.stderr?Ft:jn;Ce.endEmitted?e.nextTick(Ve):ge.once("end",Ve),S.on("unpipe",ft);function ft(rr,Pn){P("onunpipe"),rr===ge&&Pn&&Pn.hasUnpiped===!1&&(Pn.hasUnpiped=!0,_r())}function Ft(){P("onend"),S.end()}let pt,nr=!1;function _r(){P("cleanup"),S.removeListener("close",Ht),S.removeListener("finish",Xt),pt&&S.removeListener("drain",pt),S.removeListener("error",xt),S.removeListener("unpipe",ft),ge.removeListener("end",Ft),ge.removeListener("end",jn),ge.removeListener("data",Jt),nr=!0,pt&&Ce.awaitDrainWriters&&(!S._writableState||S._writableState.needDrain)&&pt()}function At(){nr||(Ce.pipes.length===1&&Ce.pipes[0]===S?(P("false write response, pause",0),Ce.awaitDrainWriters=S,Ce.multiAwaitDrain=!1):Ce.pipes.length>1&&Ce.pipes.includes(S)&&(P("false write response, pause",Ce.awaitDrainWriters.size),Ce.awaitDrainWriters.add(S)),ge.pause()),pt||(pt=Le(ge,S),S.on("drain",pt))}ge.on("data",Jt);function Jt(rr){P("ondata");const Pn=S.write(rr);P("dest.write",Pn),Pn===!1&&At()}function xt(rr){if(P("onerror",rr),jn(),S.removeListener("error",xt),S.listenerCount("error")===0){const Pn=S._writableState||S._readableState;Pn&&!Pn.errorEmitted?q(S,rr):S.emit("error",rr)}}k(S,"error",xt);function Ht(){S.removeListener("finish",Xt),jn()}S.once("close",Ht);function Xt(){P("onfinish"),S.removeListener("close",Ht),jn()}S.once("finish",Xt);function jn(){P("unpipe"),ge.unpipe(S)}return S.emit("pipe",ge),S.writableNeedDrain===!0?At():Ce.flowing||(P("pipe resume"),ge.resume()),S};function Le(S,L){return function(){const Ce=S._readableState;Ce.awaitDrainWriters===L?(P("pipeOnDrain",1),Ce.awaitDrainWriters=null):Ce.multiAwaitDrain&&(P("pipeOnDrain",Ce.awaitDrainWriters.size),Ce.awaitDrainWriters.delete(L)),(!Ce.awaitDrainWriters||Ce.awaitDrainWriters.size===0)&&S.listenerCount("data")&&S.resume()}}xe.prototype.unpipe=function(S){const L=this._readableState,ge={hasUnpiped:!1};if(L.pipes.length===0)return this;if(!S){const Be=L.pipes;L.pipes=[],this.pause();for(let Ve=0;Ve<Be.length;Ve++)Be[Ve].emit("unpipe",this,{hasUnpiped:!1});return this}const Ce=t(L.pipes,S);return Ce===-1?this:(L.pipes.splice(Ce,1),L.pipes.length===0&&this.pause(),S.emit("unpipe",this,ge),this)},xe.prototype.on=function(S,L){const ge=N.prototype.on.call(this,S,L),Ce=this._readableState;return S==="data"?(Ce.readableListening=this.listenerCount("readable")>0,Ce.flowing!==!1&&this.resume()):S==="readable"&&!Ce.endEmitted&&!Ce.readableListening&&(Ce.readableListening=Ce.needReadable=!0,Ce.flowing=!1,Ce.emittedReadable=!1,P("on readable",Ce.length,Ce.reading),Ce.length?$t(this):Ce.reading||e.nextTick(K,this)),ge},xe.prototype.addListener=xe.prototype.on,xe.prototype.removeListener=function(S,L){const ge=N.prototype.removeListener.call(this,S,L);return S==="readable"&&e.nextTick(De,this),ge},xe.prototype.off=xe.prototype.removeListener,xe.prototype.removeAllListeners=function(S){const L=N.prototype.removeAllListeners.apply(this,arguments);return(S==="readable"||S===void 0)&&e.nextTick(De,this),L};function De(S){const L=S._readableState;L.readableListening=S.listenerCount("readable")>0,L.resumeScheduled&&L[W]===!1?L.flowing=!0:S.listenerCount("data")>0?S.resume():L.readableListening||(L.flowing=null)}function K(S){P("readable nexttick read 0"),S.read(0)}xe.prototype.resume=function(){const S=this._readableState;return S.flowing||(P("resume"),S.flowing=!S.readableListening,de(this,S)),S[W]=!1,this};function de(S,L){L.resumeScheduled||(L.resumeScheduled=!0,e.nextTick(w,S,L))}function w(S,L){P("resume",L.reading),L.reading||S.read(0),L.resumeScheduled=!1,S.emit("resume"),Ae(S),L.flowing&&!L.reading&&S.read(0)}xe.prototype.pause=function(){return P("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(P("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[W]=!0,this};function Ae(S){const L=S._readableState;for(P("flow",L.flowing);L.flowing&&S.read()!==null;);}xe.prototype.wrap=function(S){let L=!1;S.on("data",Ce=>{!this.push(Ce)&&S.pause&&(L=!0,S.pause())}),S.on("end",()=>{this.push(null)}),S.on("error",Ce=>{q(this,Ce)}),S.on("close",()=>{this.destroy()}),S.on("destroy",()=>{this.destroy()}),this._read=()=>{L&&S.resume&&(L=!1,S.resume())};const ge=u(S);for(let Ce=1;Ce<ge.length;Ce++){const Be=ge[Ce];this[Be]===void 0&&typeof S[Be]=="function"&&(this[Be]=S[Be].bind(S))}return this},xe.prototype[y]=function(){return Ge(this)},xe.prototype.iterator=function(S){return S!==void 0&&B(S,"options"),Ge(this,S)};function Ge(S,L){typeof S.read!="function"&&(S=xe.wrap(S,{objectMode:!0}));const ge=l(S,L);return ge.stream=S,ge}async function*l(S,L){let ge=M;function Ce(ft){this===S?(ge(),ge=M):ge=ft}S.on("readable",Ce);let Be;const Ve=H(S,{writable:!1},ft=>{Be=ft?_e(Be,ft):null,ge(),ge=M});try{for(;;){const ft=S.destroyed?null:S.read();if(ft!==null)yield ft;else{if(Be)throw Be;if(Be===null)return;await new d(Ce)}}}catch(ft){throw Be=_e(Be,ft),Be}finally{(Be||(L==null?void 0:L.destroyOnReturn)!==!1)&&(Be===void 0||S._readableState.autoDestroy)?J.destroyer(S,null):(S.off("readable",Ce),Ve())}}f(xe.prototype,{readable:{__proto__:null,get(){const S=this._readableState;return!!S&&S.readable!==!1&&!S.destroyed&&!S.errorEmitted&&!S.endEmitted},set(S){this._readableState&&(this._readableState.readable=!!S)}},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(S){this._readableState&&(this._readableState.flowing=S)}},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(S){this._readableState&&(this._readableState.destroyed=S)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),f(tt.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[W]!==!1},set(S){this[W]=!!S}}}),xe._fromList=se;function se(S,L){if(L.length===0)return null;let ge;return L.objectMode?ge=L.buffer.shift():!S||S>=L.length?(L.decoder?ge=L.buffer.join(""):L.buffer.length===1?ge=L.buffer.first():ge=L.buffer.concat(L.length),L.buffer.clear()):ge=L.buffer.consume(S,L.decoder),ge}function fe(S){const L=S._readableState;P("endReadable",L.endEmitted),L.endEmitted||(L.ended=!0,e.nextTick(R,L,S))}function R(S,L){if(P("endReadableNT",S.endEmitted,S.length),!S.errored&&!S.closeEmitted&&!S.endEmitted&&S.length===0){if(S.endEmitted=!0,L.emit("end"),L.writable&&L.allowHalfOpen===!1)e.nextTick(z,L);else if(S.autoDestroy){const ge=L._writableState;(!ge||ge.autoDestroy&&(ge.finished||ge.writable===!1))&&L.destroy()}}}function z(S){S.writable&&!S.writableEnded&&!S.destroyed&&S.end()}xe.from=function(S,L){return X(xe,S,L)};let oe;function Ue(){return oe===void 0&&(oe={}),oe}return xe.fromWeb=function(S,L){return Ue().newStreamReadableFromReadableStream(S,L)},xe.toWeb=function(S,L){return Ue().newReadableStreamFromStreamReadable(S,L)},xe.wrap=function(S,L){var ge,Ce;return new xe({objectMode:(ge=(Ce=S.readableObjectMode)!==null&&Ce!==void 0?Ce:S.objectMode)!==null&&ge!==void 0?ge:!0,...L,destroy(Be,Ve){J.destroyer(S,Be),Ve(Be)}}).wrap(S)},vl}var El,t0;function jc(){if(t0)return El;t0=1;const e=Z.browserExports,{ArrayPrototypeSlice:t,Error:n,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:a,ObjectDefineProperties:f,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:g,Symbol:d,SymbolHasInstance:h}=qt;El=B,B.WritableState=v;const{EventEmitter:_}=Z.requireEvents(),y=Uc.Stream,{Buffer:E}=Z.bufferPolyfill,m=To,{addAbortSignal:N}=Ef,{getHighWaterMark:k,getDefaultHighWaterMark:U}=Sf,{ERR_INVALID_ARG_TYPE:G,ERR_METHOD_NOT_IMPLEMENTED:H,ERR_MULTIPLE_CALLBACK:P,ERR_STREAM_CANNOT_PIPE:C,ERR_STREAM_DESTROYED:J,ERR_STREAM_ALREADY_FINISHED:ae,ERR_STREAM_NULL_VALUES:ie,ERR_STREAM_WRITE_AFTER_END:_e,ERR_UNKNOWN_ENCODING:ce}=Ln.codes,{errorOrDestroy:Ie}=m;u(B.prototype,y.prototype),u(B,y);function we(){}const p=d("kOnFinished");function v(x,j,re){typeof re!="boolean"&&(re=j instanceof Gr()),this.objectMode=!!(x&&x.objectMode),re&&(this.objectMode=this.objectMode||!!(x&&x.writableObjectMode)),this.highWaterMark=x?k(this,x,"writableHighWaterMark",re):U(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const Te=!!(x&&x.decodeStrings===!1);this.decodeStrings=!Te,this.defaultEncoding=x&&x.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=q.bind(void 0,j),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,A(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!x||x.emitClose!==!1,this.autoDestroy=!x||x.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[p]=[]}function A(x){x.buffered=[],x.bufferedIndex=0,x.allBuffers=!0,x.allNoop=!0}v.prototype.getBuffer=function(){return t(this.buffered,this.bufferedIndex)},a(v.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function B(x){const j=this instanceof Gr();if(!j&&!o(B,this))return new B(x);this._writableState=new v(x,this,j),x&&(typeof x.write=="function"&&(this._write=x.write),typeof x.writev=="function"&&(this._writev=x.writev),typeof x.destroy=="function"&&(this._destroy=x.destroy),typeof x.final=="function"&&(this._final=x.final),typeof x.construct=="function"&&(this._construct=x.construct),x.signal&&N(x.signal,this)),y.call(this,x),m.construct(this,()=>{const re=this._writableState;re.writing||me(this,re),Pe(this,re)})}a(B,h,{__proto__:null,value:function(x){return o(this,x)?!0:this!==B?!1:x&&x._writableState instanceof v}}),B.prototype.pipe=function(){Ie(this,new C)};function W(x,j,re,Te){const ye=x._writableState;if(typeof re=="function")Te=re,re=ye.defaultEncoding;else{if(!re)re=ye.defaultEncoding;else if(re!=="buffer"&&!E.isEncoding(re))throw new ce(re);typeof Te!="function"&&(Te=we)}if(j===null)throw new ie;if(!ye.objectMode)if(typeof j=="string")ye.decodeStrings!==!1&&(j=E.from(j,re),re="buffer");else if(j instanceof E)re="buffer";else if(y._isUint8Array(j))j=y._uint8ArrayToBuffer(j),re="buffer";else throw new G("chunk",["string","Buffer","Uint8Array"],j);let Ne;return ye.ending?Ne=new _e:ye.destroyed&&(Ne=new J("write")),Ne?(e.nextTick(Te,Ne),Ie(x,Ne,!0),Ne):(ye.pendingcb++,D(x,ye,j,re,Te))}B.prototype.write=function(x,j,re){return W(this,x,j,re)===!0},B.prototype.cork=function(){this._writableState.corked++},B.prototype.uncork=function(){const x=this._writableState;x.corked&&(x.corked--,x.writing||me(this,x))},B.prototype.setDefaultEncoding=function(j){if(typeof j=="string"&&(j=g(j)),!E.isEncoding(j))throw new ce(j);return this._writableState.defaultEncoding=j,this};function D(x,j,re,Te,ye){const Ne=j.objectMode?1:re.length;j.length+=Ne;const qe=j.length<j.highWaterMark;return qe||(j.needDrain=!0),j.writing||j.corked||j.errored||!j.constructed?(j.buffered.push({chunk:re,encoding:Te,callback:ye}),j.allBuffers&&Te!=="buffer"&&(j.allBuffers=!1),j.allNoop&&ye!==we&&(j.allNoop=!1)):(j.writelen=Ne,j.writecb=ye,j.writing=!0,j.sync=!0,x._write(re,Te,j.onwrite),j.sync=!1),qe&&!j.errored&&!j.destroyed}function X(x,j,re,Te,ye,Ne,qe){j.writelen=Te,j.writecb=qe,j.writing=!0,j.sync=!0,j.destroyed?j.onwrite(new J("write")):re?x._writev(ye,j.onwrite):x._write(ye,Ne,j.onwrite),j.sync=!1}function M(x,j,re,Te){--j.pendingcb,Te(re),ee(j),Ie(x,re)}function q(x,j){const re=x._writableState,Te=re.sync,ye=re.writecb;if(typeof ye!="function"){Ie(x,new P);return}re.writing=!1,re.writecb=null,re.length-=re.writelen,re.writelen=0,j?(j.stack,re.errored||(re.errored=j),x._readableState&&!x._readableState.errored&&(x._readableState.errored=j),Te?e.nextTick(M,x,re,j,ye):M(x,re,j,ye)):(re.buffered.length>re.bufferedIndex&&me(x,re),Te?re.afterWriteTickInfo!==null&&re.afterWriteTickInfo.cb===ye?re.afterWriteTickInfo.count++:(re.afterWriteTickInfo={count:1,cb:ye,stream:x,state:re},e.nextTick(ne,re.afterWriteTickInfo)):he(x,re,1,ye))}function ne({stream:x,state:j,count:re,cb:Te}){return j.afterWriteTickInfo=null,he(x,j,re,Te)}function he(x,j,re,Te){for(!j.ending&&!x.destroyed&&j.length===0&&j.needDrain&&(j.needDrain=!1,x.emit("drain"));re-- >0;)j.pendingcb--,Te();j.destroyed&&ee(j),Pe(x,j)}function ee(x){if(x.writing)return;for(let ye=x.bufferedIndex;ye<x.buffered.length;++ye){var j;const{chunk:Ne,callback:qe}=x.buffered[ye],He=x.objectMode?1:Ne.length;x.length-=He,qe((j=x.errored)!==null&&j!==void 0?j:new J("write"))}const re=x[p].splice(0);for(let ye=0;ye<re.length;ye++){var Te;re[ye]((Te=x.errored)!==null&&Te!==void 0?Te:new J("end"))}A(x)}function me(x,j){if(j.corked||j.bufferProcessing||j.destroyed||!j.constructed)return;const{buffered:re,bufferedIndex:Te,objectMode:ye}=j,Ne=re.length-Te;if(!Ne)return;let qe=Te;if(j.bufferProcessing=!0,Ne>1&&x._writev){j.pendingcb-=Ne-1;const He=j.allNoop?we:xe=>{for(let at=qe;at<re.length;++at)re[at].callback(xe)},tt=j.allNoop&&qe===0?re:t(re,qe);tt.allBuffers=j.allBuffers,X(x,j,!0,j.length,tt,"",He),A(j)}else{do{const{chunk:He,encoding:tt,callback:xe}=re[qe];re[qe++]=null;const at=ye?1:He.length;X(x,j,!1,at,He,tt,xe)}while(qe<re.length&&!j.writing);qe===re.length?A(j):qe>256?(re.splice(0,qe),j.bufferedIndex=0):j.bufferedIndex=qe}j.bufferProcessing=!1}B.prototype._write=function(x,j,re){if(this._writev)this._writev([{chunk:x,encoding:j}],re);else throw new H("_write()")},B.prototype._writev=null,B.prototype.end=function(x,j,re){const Te=this._writableState;typeof x=="function"?(re=x,x=null,j=null):typeof j=="function"&&(re=j,j=null);let ye;if(x!=null){const Ne=W(this,x,j);Ne instanceof n&&(ye=Ne)}return Te.corked&&(Te.corked=1,this.uncork()),ye||(!Te.errored&&!Te.ending?(Te.ending=!0,Pe(this,Te,!0),Te.ended=!0):Te.finished?ye=new ae("end"):Te.destroyed&&(ye=new J("end"))),typeof re=="function"&&(ye||Te.finished?e.nextTick(re,ye):Te[p].push(re)),this};function pe(x){return x.ending&&!x.destroyed&&x.constructed&&x.length===0&&!x.errored&&x.buffered.length===0&&!x.finished&&!x.writing&&!x.errorEmitted&&!x.closeEmitted}function Re(x,j){let re=!1;function Te(ye){if(re){Ie(x,ye??P());return}if(re=!0,j.pendingcb--,ye){const Ne=j[p].splice(0);for(let qe=0;qe<Ne.length;qe++)Ne[qe](ye);Ie(x,ye,j.sync)}else pe(j)&&(j.prefinished=!0,x.emit("prefinish"),j.pendingcb++,e.nextTick($e,x,j))}j.sync=!0,j.pendingcb++;try{x._final(Te)}catch(ye){Te(ye)}j.sync=!1}function Fe(x,j){!j.prefinished&&!j.finalCalled&&(typeof x._final=="function"&&!j.destroyed?(j.finalCalled=!0,Re(x,j)):(j.prefinished=!0,x.emit("prefinish")))}function Pe(x,j,re){pe(j)&&(Fe(x,j),j.pendingcb===0&&(re?(j.pendingcb++,e.nextTick((Te,ye)=>{pe(ye)?$e(Te,ye):ye.pendingcb--},x,j)):pe(j)&&(j.pendingcb++,$e(x,j))))}function $e(x,j){j.pendingcb--,j.finished=!0;const re=j[p].splice(0);for(let Te=0;Te<re.length;Te++)re[Te]();if(x.emit("finish"),j.autoDestroy){const Te=x._readableState;(!Te||Te.autoDestroy&&(Te.endEmitted||Te.readable===!1))&&x.destroy()}}f(B.prototype,{closed:{__proto__:null,get(){return this._writableState?this._writableState.closed:!1}},destroyed:{__proto__:null,get(){return this._writableState?this._writableState.destroyed:!1},set(x){this._writableState&&(this._writableState.destroyed=x)}},writable:{__proto__:null,get(){const x=this._writableState;return!!x&&x.writable!==!1&&!x.destroyed&&!x.errored&&!x.ending&&!x.ended},set(x){this._writableState&&(this._writableState.writable=!!x)}},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 x=this._writableState;return x?!x.destroyed&&!x.ending&&x.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 Qe=m.destroy;B.prototype.destroy=function(x,j){const re=this._writableState;return!re.destroyed&&(re.bufferedIndex<re.buffered.length||re[p].length)&&e.nextTick(ee,re),Qe.call(this,x,j),this},B.prototype._undestroy=m.undestroy,B.prototype._destroy=function(x,j){j(x)},B.prototype[_.captureRejectionSymbol]=function(x){this.destroy(x)};let Ke;function We(){return Ke===void 0&&(Ke={}),Ke}return B.fromWeb=function(x,j){return We().newStreamWritableFromWritableStream(x,j)},B.toWeb=function(x){return We().newWritableStreamFromStreamWritable(x)},El}var Sl,n0;function LI(){if(n0)return Sl;n0=1;const e=Z.browserExports,t=Z.bufferPolyfill,{isReadable:n,isWritable:o,isIterable:a,isNodeStream:f,isReadableNodeStream:u,isWritableNodeStream:g,isDuplexNodeStream:d,isReadableStream:h,isWritableStream:_}=Kr,y=pi,{AbortError:E,codes:{ERR_INVALID_ARG_TYPE:m,ERR_INVALID_RETURN_VALUE:N}}=Ln,{destroyer:k}=To,U=Gr(),G=Rf(),H=jc(),{createDeferredPromise:P}=En,C=yp,J=globalThis.Blob||t.Blob,ae=typeof J<"u"?function(v){return v instanceof J}:function(v){return!1},ie=globalThis.AbortController||bs().AbortController,{FunctionPrototypeCall:_e}=qt;class ce extends U{constructor(v){super(v),(v==null?void 0:v.readable)===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),(v==null?void 0:v.writable)===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}Sl=function p(v,A){if(d(v))return v;if(u(v))return we({readable:v});if(g(v))return we({writable:v});if(f(v))return we({writable:!1,readable:!1});if(h(v))return we({readable:G.fromWeb(v)});if(_(v))return we({writable:H.fromWeb(v)});if(typeof v=="function"){const{value:W,write:D,final:X,destroy:M}=Ie(v);if(a(W))return C(ce,W,{objectMode:!0,write:D,final:X,destroy:M});const q=W==null?void 0:W.then;if(typeof q=="function"){let ne;const he=_e(q,W,ee=>{if(ee!=null)throw new N("nully","body",ee)},ee=>{k(ne,ee)});return ne=new ce({objectMode:!0,readable:!1,write:D,final(ee){X(async()=>{try{await he,e.nextTick(ee,null)}catch(me){e.nextTick(ee,me)}})},destroy:M})}throw new N("Iterable, AsyncIterable or AsyncFunction",A,W)}if(ae(v))return p(v.arrayBuffer());if(a(v))return C(ce,v,{objectMode:!0,writable:!1});if(h(v==null?void 0:v.readable)&&_(v==null?void 0:v.writable))return ce.fromWeb(v);if(typeof(v==null?void 0:v.writable)=="object"||typeof(v==null?void 0:v.readable)=="object"){const W=v!=null&&v.readable?u(v==null?void 0:v.readable)?v==null?void 0:v.readable:p(v.readable):void 0,D=v!=null&&v.writable?g(v==null?void 0:v.writable)?v==null?void 0:v.writable:p(v.writable):void 0;return we({readable:W,writable:D})}const B=v==null?void 0:v.then;if(typeof B=="function"){let W;return _e(B,v,D=>{D!=null&&W.push(D),W.push(null)},D=>{k(W,D)}),W=new ce({objectMode:!0,writable:!1,read(){}})}throw new m(A,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],v)};function Ie(p){let{promise:v,resolve:A}=P();const B=new ie,W=B.signal;return{value:p(async function*(){for(;;){const X=v;v=null;const{chunk:M,done:q,cb:ne}=await X;if(e.nextTick(ne),q)return;if(W.aborted)throw new E(void 0,{cause:W.reason});({promise:v,resolve:A}=P()),yield M}}(),{signal:W}),write(X,M,q){const ne=A;A=null,ne({chunk:X,done:!1,cb:q})},final(X){const M=A;A=null,M({done:!0,cb:X})},destroy(X,M){B.abort(),M(X)}}}function we(p){const v=p.readable&&typeof p.readable.read!="function"?G.wrap(p.readable):p.readable,A=p.writable;let B=!!n(v),W=!!o(A),D,X,M,q,ne;function he(ee){const me=q;q=null,me?me(ee):ee&&ne.destroy(ee)}return ne=new ce({readableObjectMode:!!(v!=null&&v.readableObjectMode),writableObjectMode:!!(A!=null&&A.writableObjectMode),readable:B,writable:W}),W&&(y(A,ee=>{W=!1,ee&&k(v,ee),he(ee)}),ne._write=function(ee,me,pe){A.write(ee,me)?pe():D=pe},ne._final=function(ee){A.end(),X=ee},A.on("drain",function(){if(D){const ee=D;D=null,ee()}}),A.on("finish",function(){if(X){const ee=X;X=null,ee()}})),B&&(y(v,ee=>{B=!1,ee&&k(v,ee),he(ee)}),v.on("readable",function(){if(M){const ee=M;M=null,ee()}}),v.on("end",function(){ne.push(null)}),ne._read=function(){for(;;){const ee=v.read();if(ee===null){M=ne._read;return}if(!ne.push(ee))return}}),ne._destroy=function(ee,me){!ee&&q!==null&&(ee=new E),M=null,D=null,X=null,q===null?me(ee):(q=me,k(A,ee),k(v,ee))},ne}return Sl}var Rl,r0;function Gr(){if(r0)return Rl;r0=1;const{ObjectDefineProperties:e,ObjectGetOwnPropertyDescriptor:t,ObjectKeys:n,ObjectSetPrototypeOf:o}=qt;Rl=u;const a=Rf(),f=jc();o(u.prototype,a.prototype),o(u,a);{const _=n(f.prototype);for(let y=0;y<_.length;y++){const E=_[y];u.prototype[E]||(u.prototype[E]=f.prototype[E])}}function u(_){if(!(this instanceof u))return new u(_);a.call(this,_),f.call(this,_),_?(this.allowHalfOpen=_.allowHalfOpen!==!1,_.readable===!1&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),_.writable===!1&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)):this.allowHalfOpen=!0}e(u.prototype,{writable:{__proto__:null,...t(f.prototype,"writable")},writableHighWaterMark:{__proto__:null,...t(f.prototype,"writableHighWaterMark")},writableObjectMode:{__proto__:null,...t(f.prototype,"writableObjectMode")},writableBuffer:{__proto__:null,...t(f.prototype,"writableBuffer")},writableLength:{__proto__:null,...t(f.prototype,"writableLength")},writableFinished:{__proto__:null,...t(f.prototype,"writableFinished")},writableCorked:{__proto__:null,...t(f.prototype,"writableCorked")},writableEnded:{__proto__:null,...t(f.prototype,"writableEnded")},writableNeedDrain:{__proto__:null,...t(f.prototype,"writableNeedDrain")},destroyed:{__proto__:null,get(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set(_){this._readableState&&this._writableState&&(this._readableState.destroyed=_,this._writableState.destroyed=_)}}});let g;function d(){return g===void 0&&(g={}),g}u.fromWeb=function(_,y){return d().newStreamDuplexFromReadableWritablePair(_,y)},u.toWeb=function(_){return d().newReadableWritablePairFromDuplex(_)};let h;return u.from=function(_){return h||(h=LI()),h(_,"body")},Rl}const{ObjectSetPrototypeOf:wp,Symbol:CI}=qt;var mp=Vr;const{ERR_METHOD_NOT_IMPLEMENTED:PI}=Ln.codes,Hc=Gr(),{getHighWaterMark:NI}=Sf;wp(Vr.prototype,Hc.prototype);wp(Vr,Hc);const hs=CI("kCallback");function Vr(e){if(!(this instanceof Vr))return new Vr(e);const t=e?NI(this,e,"readableHighWaterMark",!0):null;t===0&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),Hc.call(this,e),this._readableState.sync=!1,this[hs]=null,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",BI)}function bc(e){typeof this._flush=="function"&&!this.destroyed?this._flush((t,n)=>{if(t){e?e(t):this.destroy(t);return}n!=null&&this.push(n),this.push(null),e&&e()}):(this.push(null),e&&e())}function BI(){this._final!==bc&&bc.call(this)}Vr.prototype._final=bc;Vr.prototype._transform=function(e,t,n){throw new PI("_transform()")};Vr.prototype._write=function(e,t,n){const o=this._readableState,a=this._writableState,f=o.length;this._transform(e,t,(u,g)=>{if(u){n(u);return}g!=null&&this.push(g),a.ended||f===o.length||o.length<o.highWaterMark?n():this[hs]=n})};Vr.prototype._read=function(){if(this[hs]){const e=this[hs];this[hs]=null,e()}};const{ObjectSetPrototypeOf:vp}=qt;var Ep=mo;const Wc=mp;vp(mo.prototype,Wc.prototype);vp(mo,Wc);function mo(e){if(!(this instanceof mo))return new mo(e);Wc.call(this,e)}mo.prototype._transform=function(e,t,n){n(null,e)};const ds=Z.browserExports,{ArrayIsArray:$I,Promise:xI,SymbolAsyncIterator:DI,SymbolDispose:MI}=qt,of=pi,{once:kI}=En,FI=To,i0=Gr(),{aggregateTwoErrors:UI,codes:{ERR_INVALID_ARG_TYPE:yc,ERR_INVALID_RETURN_VALUE:Al,ERR_MISSING_ARGS:jI,ERR_STREAM_DESTROYED:HI,ERR_STREAM_PREMATURE_CLOSE:WI},AbortError:zI}=Ln,{validateFunction:qI,validateAbortSignal:GI}=Es,{isIterable:Ci,isReadable:Il,isReadableNodeStream:Ya,isNodeStream:o0,isTransformStream:go,isWebStream:VI,isReadableStream:Tl,isReadableFinished:ZI}=Kr,KI=globalThis.AbortController||bs().AbortController;let Ol,Ll,Cl;function s0(e,t,n){let o=!1;e.on("close",()=>{o=!0});const a=of(e,{readable:t,writable:n},f=>{o=!f});return{destroy:f=>{o||(o=!0,FI.destroyer(e,f||new HI("pipe")))},cleanup:a}}function JI(e){return qI(e[e.length-1],"streams[stream.length - 1]"),e.pop()}function Pl(e){if(Ci(e))return e;if(Ya(e))return XI(e);throw new yc("val",["Readable","Iterable","AsyncIterable"],e)}async function*XI(e){Ll||(Ll=Rf()),yield*Ll.prototype[DI].call(e)}async function Ua(e,t,n,{end:o}){let a,f=null;const u=h=>{if(h&&(a=h),f){const _=f;f=null,_()}},g=()=>new xI((h,_)=>{a?_(a):f=()=>{a?_(a):h()}});t.on("drain",u);const d=of(t,{readable:!1},u);try{t.writableNeedDrain&&await g();for await(const h of e)t.write(h)||await g();o&&(t.end(),await g()),n()}catch(h){n(a!==h?UI(a,h):h)}finally{d(),t.off("drain",u)}}async function Nl(e,t,n,{end:o}){go(t)&&(t=t.writable);const a=t.getWriter();try{for await(const f of e)await a.ready,a.write(f).catch(()=>{});await a.ready,o&&await a.close(),n()}catch(f){try{await a.abort(f),n(f)}catch(u){n(u)}}}function YI(...e){return Sp(e,kI(JI(e)))}function Sp(e,t,n){if(e.length===1&&$I(e[0])&&(e=e[0]),e.length<2)throw new jI("streams");const o=new KI,a=o.signal,f=n==null?void 0:n.signal,u=[];GI(f,"options.signal");function g(){N(new zI)}Cl=Cl||En.addAbortListener;let d;f&&(d=Cl(f,g));let h,_;const y=[];let E=0;function m(H){N(H,--E===0)}function N(H,P){var C;if(H&&(!h||h.code==="ERR_STREAM_PREMATURE_CLOSE")&&(h=H),!(!h&&!P)){for(;y.length;)y.shift()(h);(C=d)===null||C===void 0||C[MI](),o.abort(),P&&(h||u.forEach(J=>J()),ds.nextTick(t,h,_))}}let k;for(let H=0;H<e.length;H++){const P=e[H],C=H<e.length-1,J=H>0,ae=C||(n==null?void 0:n.end)!==!1,ie=H===e.length-1;if(o0(P)){let _e=function(ce){ce&&ce.name!=="AbortError"&&ce.code!=="ERR_STREAM_PREMATURE_CLOSE"&&m(ce)};if(ae){const{destroy:ce,cleanup:Ie}=s0(P,C,J);y.push(ce),Il(P)&&ie&&u.push(Ie)}P.on("error",_e),Il(P)&&ie&&u.push(()=>{P.removeListener("error",_e)})}if(H===0)if(typeof P=="function"){if(k=P({signal:a}),!Ci(k))throw new Al("Iterable, AsyncIterable or Stream","source",k)}else Ci(P)||Ya(P)||go(P)?k=P:k=i0.from(P);else if(typeof P=="function"){if(go(k)){var U;k=Pl((U=k)===null||U===void 0?void 0:U.readable)}else k=Pl(k);if(k=P(k,{signal:a}),C){if(!Ci(k,!0))throw new Al("AsyncIterable",`transform[${H-1}]`,k)}else{var G;Ol||(Ol=Ep);const _e=new Ol({objectMode:!0}),ce=(G=k)===null||G===void 0?void 0:G.then;if(typeof ce=="function")E++,ce.call(k,p=>{_=p,p!=null&&_e.write(p),ae&&_e.end(),ds.nextTick(m)},p=>{_e.destroy(p),ds.nextTick(m,p)});else if(Ci(k,!0))E++,Ua(k,_e,m,{end:ae});else if(Tl(k)||go(k)){const p=k.readable||k;E++,Ua(p,_e,m,{end:ae})}else throw new Al("AsyncIterable or Promise","destination",k);k=_e;const{destroy:Ie,cleanup:we}=s0(k,!1,!0);y.push(Ie),ie&&u.push(we)}}else if(o0(P)){if(Ya(k)){E+=2;const _e=QI(k,P,m,{end:ae});Il(P)&&ie&&u.push(_e)}else if(go(k)||Tl(k)){const _e=k.readable||k;E++,Ua(_e,P,m,{end:ae})}else if(Ci(k))E++,Ua(k,P,m,{end:ae});else throw new yc("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],k);k=P}else if(VI(P)){if(Ya(k))E++,Nl(Pl(k),P,m,{end:ae});else if(Tl(k)||Ci(k))E++,Nl(k,P,m,{end:ae});else if(go(k))E++,Nl(k.readable,P,m,{end:ae});else throw new yc("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],k);k=P}else k=i0.from(P)}return(a!=null&&a.aborted||f!=null&&f.aborted)&&ds.nextTick(g),k}function QI(e,t,n,{end:o}){let a=!1;if(t.on("close",()=>{a||n(new WI)}),e.pipe(t,{end:!1}),o){let f=function(){a=!0,t.end()};ZI(e)?ds.nextTick(f):e.once("end",f)}else n();return of(e,{readable:!0,writable:!1},f=>{const u=e._readableState;f&&f.code==="ERR_STREAM_PREMATURE_CLOSE"&&u&&u.ended&&!u.errored&&!u.errorEmitted?e.once("end",n).once("error",n):n(f)}),of(t,{readable:!1,writable:!0},n)}var zc={pipelineImpl:Sp,pipeline:YI};const{pipeline:eT}=zc,ja=Gr(),{destroyer:tT}=To,{isNodeStream:Ha,isReadable:a0,isWritable:f0,isWebStream:Bl,isTransformStream:Oi,isWritableStream:u0,isReadableStream:l0}=Kr,{AbortError:nT,codes:{ERR_INVALID_ARG_VALUE:c0,ERR_MISSING_ARGS:rT}}=Ln,iT=pi;var Rp=function(...t){if(t.length===0)throw new rT("streams");if(t.length===1)return ja.from(t[0]);const n=[...t];if(typeof t[0]=="function"&&(t[0]=ja.from(t[0])),typeof t[t.length-1]=="function"){const m=t.length-1;t[m]=ja.from(t[m])}for(let m=0;m<t.length;++m)if(!(!Ha(t[m])&&!Bl(t[m]))){if(m<t.length-1&&!(a0(t[m])||l0(t[m])||Oi(t[m])))throw new c0(`streams[${m}]`,n[m],"must be readable");if(m>0&&!(f0(t[m])||u0(t[m])||Oi(t[m])))throw new c0(`streams[${m}]`,n[m],"must be writable")}let o,a,f,u,g;function d(m){const N=u;u=null,N?N(m):m?g.destroy(m):!E&&!y&&g.destroy()}const h=t[0],_=eT(t,d),y=!!(f0(h)||u0(h)||Oi(h)),E=!!(a0(_)||l0(_)||Oi(_));if(g=new ja({writableObjectMode:!!(h!=null&&h.writableObjectMode),readableObjectMode:!!(_!=null&&_.readableObjectMode),writable:y,readable:E}),y){if(Ha(h))g._write=function(N,k,U){h.write(N,k)?U():o=U},g._final=function(N){h.end(),a=N},h.on("drain",function(){if(o){const N=o;o=null,N()}});else if(Bl(h)){const k=(Oi(h)?h.writable:h).getWriter();g._write=async function(U,G,H){try{await k.ready,k.write(U).catch(()=>{}),H()}catch(P){H(P)}},g._final=async function(U){try{await k.ready,k.close().catch(()=>{}),a=U}catch(G){U(G)}}}const m=Oi(_)?_.readable:_;iT(m,()=>{if(a){const N=a;a=null,N()}})}if(E){if(Ha(_))_.on("readable",function(){if(f){const m=f;f=null,m()}}),_.on("end",function(){g.push(null)}),g._read=function(){for(;;){const m=_.read();if(m===null){f=g._read;return}if(!g.push(m))return}};else if(Bl(_)){const N=(Oi(_)?_.readable:_).getReader();g._read=async function(){for(;;)try{const{value:k,done:U}=await N.read();if(!g.push(k))return;if(U){g.push(null);return}}catch{return}}}}return g._destroy=function(m,N){!m&&u!==null&&(m=new nT),f=null,o=null,a=null,u===null?N(m):(u=N,Ha(_)&&tT(_,m))},g};const oT=globalThis.AbortController||bs().AbortController,{codes:{ERR_INVALID_ARG_VALUE:sT,ERR_INVALID_ARG_TYPE:Ss,ERR_MISSING_ARGS:aT,ERR_OUT_OF_RANGE:fT},AbortError:Or}=Ln,{validateAbortSignal:ki,validateInteger:d0,validateObject:Fi}=Es,uT=qt.Symbol("kWeak"),lT=qt.Symbol("kResistStopPropagation"),{finished:cT}=pi,dT=Rp,{addAbortSignalNoValidate:hT}=Ef,{isWritable:gT,isNodeStream:_T}=Kr,{deprecate:pT}=En,{ArrayPrototypePush:bT,Boolean:yT,MathFloor:h0,Number:wT,NumberIsNaN:mT,Promise:g0,PromiseReject:_0,PromiseResolve:vT,PromisePrototypeThen:p0,Symbol:Ap}=qt,sf=Ap("kEmpty"),b0=Ap("kEof");function ET(e,t){if(t!=null&&Fi(t,"options"),(t==null?void 0:t.signal)!=null&&ki(t.signal,"options.signal"),_T(e)&&!gT(e))throw new sT("stream",e,"must be writable");const n=dT(this,e);return t!=null&&t.signal&&hT(t.signal,n),n}function Af(e,t){if(typeof e!="function")throw new Ss("fn",["Function","AsyncFunction"],e);t!=null&&Fi(t,"options"),(t==null?void 0:t.signal)!=null&&ki(t.signal,"options.signal");let n=1;(t==null?void 0:t.concurrency)!=null&&(n=h0(t.concurrency));let o=n-1;return(t==null?void 0:t.highWaterMark)!=null&&(o=h0(t.highWaterMark)),d0(n,"options.concurrency",1),d0(o,"options.highWaterMark",0),o+=n,(async function*(){const f=En.AbortSignalAny([t==null?void 0:t.signal].filter(yT)),u=this,g=[],d={signal:f};let h,_,y=!1,E=0;function m(){y=!0,N()}function N(){E-=1,k()}function k(){_&&!y&&E<n&&g.length<o&&(_(),_=null)}async function U(){try{for await(let G of u){if(y)return;if(f.aborted)throw new Or;try{if(G=e(G,d),G===sf)continue;G=vT(G)}catch(H){G=_0(H)}E+=1,p0(G,N,m),g.push(G),h&&(h(),h=null),!y&&(g.length>=o||E>=n)&&await new g0(H=>{_=H})}g.push(b0)}catch(G){const H=_0(G);p0(H,N,m),g.push(H)}finally{y=!0,h&&(h(),h=null)}}U();try{for(;;){for(;g.length>0;){const G=await g[0];if(G===b0)return;if(f.aborted)throw new Or;G!==sf&&(yield G),g.shift(),k()}await new g0(G=>{h=G})}}finally{y=!0,_&&(_(),_=null)}}).call(this)}function ST(e=void 0){return e!=null&&Fi(e,"options"),(e==null?void 0:e.signal)!=null&&ki(e.signal,"options.signal"),(async function*(){let n=0;for await(const a of this){var o;if(e!=null&&(o=e.signal)!==null&&o!==void 0&&o.aborted)throw new Or({cause:e.signal.reason});yield[n++,a]}}).call(this)}async function Ip(e,t=void 0){for await(const n of qc.call(this,e,t))return!0;return!1}async function RT(e,t=void 0){if(typeof e!="function")throw new Ss("fn",["Function","AsyncFunction"],e);return!await Ip.call(this,async(...n)=>!await e(...n),t)}async function AT(e,t){for await(const n of qc.call(this,e,t))return n}async function IT(e,t){if(typeof e!="function")throw new Ss("fn",["Function","AsyncFunction"],e);async function n(o,a){return await e(o,a),sf}for await(const o of Af.call(this,n,t));}function qc(e,t){if(typeof e!="function")throw new Ss("fn",["Function","AsyncFunction"],e);async function n(o,a){return await e(o,a)?o:sf}return Af.call(this,n,t)}class TT extends aT{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function OT(e,t,n){var o;if(typeof e!="function")throw new Ss("reducer",["Function","AsyncFunction"],e);n!=null&&Fi(n,"options"),(n==null?void 0:n.signal)!=null&&ki(n.signal,"options.signal");let a=arguments.length>1;if(n!=null&&(o=n.signal)!==null&&o!==void 0&&o.aborted){const h=new Or(void 0,{cause:n.signal.reason});throw this.once("error",()=>{}),await cT(this.destroy(h)),h}const f=new oT,u=f.signal;if(n!=null&&n.signal){const h={once:!0,[uT]:this,[lT]:!0};n.signal.addEventListener("abort",()=>f.abort(),h)}let g=!1;try{for await(const h of this){var d;if(g=!0,n!=null&&(d=n.signal)!==null&&d!==void 0&&d.aborted)throw new Or;a?t=await e(t,h,{signal:u}):(t=h,a=!0)}if(!g&&!a)throw new TT}finally{f.abort()}return t}async function LT(e){e!=null&&Fi(e,"options"),(e==null?void 0:e.signal)!=null&&ki(e.signal,"options.signal");const t=[];for await(const o of this){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new Or(void 0,{cause:e.signal.reason});bT(t,o)}return t}function CT(e,t){const n=Af.call(this,e,t);return(async function*(){for await(const a of n)yield*a}).call(this)}function Tp(e){if(e=wT(e),mT(e))return 0;if(e<0)throw new fT("number",">= 0",e);return e}function PT(e,t=void 0){return t!=null&&Fi(t,"options"),(t==null?void 0:t.signal)!=null&&ki(t.signal,"options.signal"),e=Tp(e),(async function*(){var o;if(t!=null&&(o=t.signal)!==null&&o!==void 0&&o.aborted)throw new Or;for await(const f of this){var a;if(t!=null&&(a=t.signal)!==null&&a!==void 0&&a.aborted)throw new Or;e--<=0&&(yield f)}}).call(this)}function NT(e,t=void 0){return t!=null&&Fi(t,"options"),(t==null?void 0:t.signal)!=null&&ki(t.signal,"options.signal"),e=Tp(e),(async function*(){var o;if(t!=null&&(o=t.signal)!==null&&o!==void 0&&o.aborted)throw new Or;for await(const f of this){var a;if(t!=null&&(a=t.signal)!==null&&a!==void 0&&a.aborted)throw new Or;if(e-- >0&&(yield f),e<=0)return}}).call(this)}xc.streamReturningOperators={asIndexedPairs:pT(ST,"readable.asIndexedPairs will be removed in a future version."),drop:PT,filter:qc,flatMap:CT,map:Af,take:NT,compose:ET};xc.promiseReturningOperators={every:RT,forEach:IT,reduce:OT,toArray:LT,some:Ip,find:AT};var $l,y0;function Op(){if(y0)return $l;y0=1;const{ArrayPrototypePop:e,Promise:t}=qt,{isIterable:n,isNodeStream:o,isWebStream:a}=Kr,{pipelineImpl:f}=zc,{finished:u}=pi;Lp();function g(...d){return new t((h,_)=>{let y,E;const m=d[d.length-1];if(m&&typeof m=="object"&&!o(m)&&!n(m)&&!a(m)){const N=e(d);y=N.signal,E=N.end}f(d,(N,k)=>{N?_(N):h(k)},{signal:y,end:E})})}return $l={finished:u,pipeline:g},$l}var w0;function Lp(){if(w0)return bl.exports;w0=1;const{Buffer:e}=Z.bufferPolyfill,{ObjectDefineProperty:t,ObjectKeys:n,ReflectApply:o}=qt,{promisify:{custom:a}}=En,{streamReturningOperators:f,promiseReturningOperators:u}=xc,{codes:{ERR_ILLEGAL_CONSTRUCTOR:g}}=Ln,d=Rp,{setDefaultHighWaterMark:h,getDefaultHighWaterMark:_}=Sf,{pipeline:y}=zc,{destroyer:E}=To,m=pi,N=Op(),k=Kr,U=bl.exports=Uc.Stream;U.isDestroyed=k.isDestroyed,U.isDisturbed=k.isDisturbed,U.isErrored=k.isErrored,U.isReadable=k.isReadable,U.isWritable=k.isWritable,U.Readable=Rf();for(const H of n(f)){let C=function(...J){if(new.target)throw g();return U.Readable.from(o(P,this,J))};const P=f[H];t(C,"name",{__proto__:null,value:P.name}),t(C,"length",{__proto__:null,value:P.length}),t(U.Readable.prototype,H,{__proto__:null,value:C,enumerable:!1,configurable:!0,writable:!0})}for(const H of n(u)){let C=function(...J){if(new.target)throw g();return o(P,this,J)};const P=u[H];t(C,"name",{__proto__:null,value:P.name}),t(C,"length",{__proto__:null,value:P.length}),t(U.Readable.prototype,H,{__proto__:null,value:C,enumerable:!1,configurable:!0,writable:!0})}U.Writable=jc(),U.Duplex=Gr(),U.Transform=mp,U.PassThrough=Ep,U.pipeline=y;const{addAbortSignal:G}=Ef;return U.addAbortSignal=G,U.finished=m,U.destroy=E,U.compose=d,U.setDefaultHighWaterMark=h,U.getDefaultHighWaterMark=_,t(U,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return N}}),t(y,a,{__proto__:null,enumerable:!0,get(){return N.pipeline}}),t(m,a,{__proto__:null,enumerable:!0,get(){return N.finished}}),U.Stream=U,U._isUint8Array=function(P){return P instanceof Uint8Array},U._uint8ArrayToBuffer=function(P){return e.from(P.buffer,P.byteOffset,P.byteLength)},bl.exports}(function(e){const t=Lp(),n=Op(),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 n}}),e.exports.Stream=t.Stream,e.exports.default=e.exports})(AR);var BT={},xi={},Gc={},sn={};class Cp extends TypeError{constructor(t,n){let o;const{message:a,explanation:f,...u}=t,{path:g}=t,d=g.length===0?a:`At path: ${g.join(".")} -- ${a}`;super(f??d),f!=null&&(this.cause=d),Object.assign(this,u),this.name=this.constructor.name,this.failures=()=>o??(o=[t,...n()])}}function $T(e){return er(e)&&typeof e[Symbol.iterator]=="function"}function er(e){return typeof e=="object"&&e!=null}function m0(e){if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function tn(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function xT(e){const{done:t,value:n}=e.next();return t?void 0:n}function DT(e,t,n,o){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:a,branch:f}=t,{type:u}=n,{refinement:g,message:d=`Expected a value of type \`${u}\`${g?` with refinement \`${g}\``:""}, but received: \`${tn(o)}\``}=e;return{value:o,type:u,refinement:g,key:a[a.length-1],path:a,branch:f,...e,message:d}}function*wc(e,t,n,o){$T(e)||(e=[e]);for(const a of e){const f=DT(a,t,n,o);f&&(yield f)}}function*Vc(e,t,n={}){const{path:o=[],branch:a=[e],coerce:f=!1,mask:u=!1}=n,g={path:o,branch:a};if(f&&(e=t.coercer(e,g),u&&t.type!=="type"&&er(t.schema)&&er(e)&&!Array.isArray(e)))for(const h in e)t.schema[h]===void 0&&delete e[h];let d="valid";for(const h of t.validator(e,g))h.explanation=n.message,d="not_valid",yield[h,void 0];for(let[h,_,y]of t.entries(e,g)){const E=Vc(_,y,{path:h===void 0?o:[...o,h],branch:h===void 0?a:[...a,_],coerce:f,mask:u,message:n.message});for(const m of E)m[0]?(d=m[0].refinement!=null?"not_refined":"not_valid",yield[m[0],void 0]):f&&(_=m[1],h===void 0?e=_:e instanceof Map?e.set(h,_):e instanceof Set?e.add(_):er(e)&&(_!==void 0||h in e)&&(e[h]=_))}if(d!=="not_valid")for(const h of t.refiner(e,g))h.explanation=n.message,d="not_refined",yield[h,void 0];d==="valid"&&(yield[void 0,e])}class Kt{constructor(t){const{type:n,schema:o,validator:a,refiner:f,coercer:u=d=>d,entries:g=function*(){}}=t;this.type=n,this.schema=o,this.entries=g,this.coercer=u,a?this.validator=(d,h)=>{const _=a(d,h);return wc(_,h,this,d)}:this.validator=()=>[],f?this.refiner=(d,h)=>{const _=f(d,h);return wc(_,h,this,d)}:this.refiner=()=>[]}assert(t,n){return Pp(t,this,n)}create(t,n){return Np(t,this,n)}is(t){return Zc(t,this)}mask(t,n){return Bp(t,this,n)}validate(t,n={}){return Oo(t,this,n)}}function Pp(e,t,n){const o=Oo(e,t,{message:n});if(o[0])throw o[0]}function Np(e,t,n){const o=Oo(e,t,{coerce:!0,message:n});if(o[0])throw o[0];return o[1]}function Bp(e,t,n){const o=Oo(e,t,{coerce:!0,mask:!0,message:n});if(o[0])throw o[0];return o[1]}function Zc(e,t){return!Oo(e,t)[0]}function Oo(e,t,n={}){const o=Vc(e,t,n),a=xT(o);return a[0]?[new Cp(a[0],function*(){for(const u of o)u[0]&&(yield u[0])}),void 0]:[void 0,a[1]]}function MT(...e){const t=e[0].type==="type",n=e.map(a=>a.schema),o=Object.assign({},...n);return t?As(o):Rs(o)}function Cn(e,t){return new Kt({type:e,schema:null,validator:t})}function kT(e,t){return new Kt({...e,refiner:(n,o)=>n===void 0||e.refiner(n,o),validator(n,o){return n===void 0?!0:(t(n,o),e.validator(n,o))}})}function FT(e){return new Kt({type:"dynamic",schema:null,*entries(t,n){yield*e(t,n).entries(t,n)},validator(t,n){return e(t,n).validator(t,n)},coercer(t,n){return e(t,n).coercer(t,n)},refiner(t,n){return e(t,n).refiner(t,n)}})}function UT(e){let t;return new Kt({type:"lazy",schema:null,*entries(n,o){t??(t=e()),yield*t.entries(n,o)},validator(n,o){return t??(t=e()),t.validator(n,o)},coercer(n,o){return t??(t=e()),t.coercer(n,o)},refiner(n,o){return t??(t=e()),t.refiner(n,o)}})}function jT(e,t){const{schema:n}=e,o={...n};for(const a of t)delete o[a];switch(e.type){case"type":return As(o);default:return Rs(o)}}function HT(e){const t=e instanceof Kt,n=t?{...e.schema}:{...e};for(const o in n)n[o]=$p(n[o]);return t&&e.type==="type"?As(n):Rs(n)}function WT(e,t){const{schema:n}=e,o={};for(const a of t)o[a]=n[a];switch(e.type){case"type":return As(o);default:return Rs(o)}}function zT(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),Cn(e,t)}function qT(){return Cn("any",()=>!0)}function GT(e){return new Kt({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,o]of t.entries())yield[n,o,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${tn(t)}`}})}function VT(){return Cn("bigint",e=>typeof e=="bigint")}function ZT(){return Cn("boolean",e=>typeof e=="boolean")}function KT(){return Cn("date",e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${tn(e)}`)}function JT(e){const t={},n=e.map(o=>tn(o)).join();for(const o of e)t[o]=o;return new Kt({type:"enums",schema:t,validator(o){return e.includes(o)||`Expected one of \`${n}\`, but received: ${tn(o)}`}})}function XT(){return Cn("func",e=>typeof e=="function"||`Expected a function, but received: ${tn(e)}`)}function YT(e){return Cn("instance",t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${tn(t)}`)}function QT(){return Cn("integer",e=>typeof e=="number"&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${tn(e)}`)}function e2(e){return new Kt({type:"intersection",schema:null,*entries(t,n){for(const o of e)yield*o.entries(t,n)},*validator(t,n){for(const o of e)yield*o.validator(t,n)},*refiner(t,n){for(const o of e)yield*o.refiner(t,n)}})}function t2(e){const t=tn(e),n=typeof e;return new Kt({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(o){return o===e||`Expected the literal \`${t}\`, but received: ${tn(o)}`}})}function n2(e,t){return new Kt({type:"map",schema:null,*entries(n){if(e&&t&&n instanceof Map)for(const[o,a]of n.entries())yield[o,o,e],yield[o,a,t]},coercer(n){return n instanceof Map?new Map(n):n},validator(n){return n instanceof Map||`Expected a \`Map\` object, but received: ${tn(n)}`}})}function Kc(){return Cn("never",()=>!1)}function r2(e){return new Kt({...e,validator:(t,n)=>t===null||e.validator(t,n),refiner:(t,n)=>t===null||e.refiner(t,n)})}function i2(){return Cn("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${tn(e)}`)}function Rs(e){const t=e?Object.keys(e):[],n=Kc();return new Kt({type:"object",schema:e||null,*entries(o){if(e&&er(o)){const a=new Set(Object.keys(o));for(const f of t)a.delete(f),yield[f,o[f],e[f]];for(const f of a)yield[f,o[f],n]}},validator(o){return er(o)||`Expected an object, but received: ${tn(o)}`},coercer(o){return er(o)?{...o}:o}})}function $p(e){return new Kt({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function o2(e,t){return new Kt({type:"record",schema:null,*entries(n){if(er(n))for(const o in n){const a=n[o];yield[o,o,e],yield[o,a,t]}},validator(n){return er(n)||`Expected an object, but received: ${tn(n)}`}})}function s2(){return Cn("regexp",e=>e instanceof RegExp)}function a2(e){return new Kt({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const n of t)yield[n,n,e]},coercer(t){return t instanceof Set?new Set(t):t},validator(t){return t instanceof Set||`Expected a \`Set\` object, but received: ${tn(t)}`}})}function xp(){return Cn("string",e=>typeof e=="string"||`Expected a string, but received: ${tn(e)}`)}function f2(e){const t=Kc();return new Kt({type:"tuple",schema:null,*entries(n){if(Array.isArray(n)){const o=Math.max(e.length,n.length);for(let a=0;a<o;a++)yield[a,n[a],e[a]||t]}},validator(n){return Array.isArray(n)||`Expected an array, but received: ${tn(n)}`}})}function As(e){const t=Object.keys(e);return new Kt({type:"type",schema:e,*entries(n){if(er(n))for(const o of t)yield[o,n[o],e[o]]},validator(n){return er(n)||`Expected an object, but received: ${tn(n)}`},coercer(n){return er(n)?{...n}:n}})}function u2(e){const t=e.map(n=>n.type).join(" | ");return new Kt({type:"union",schema:null,coercer(n){for(const o of e){const[a,f]=o.validate(n,{coerce:!0});if(!a)return f}return n},validator(n,o){const a=[];for(const f of e){const[...u]=Vc(n,f,o),[g]=u;if(g[0])for(const[d]of u)d&&a.push(d);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${tn(n)}`,...a]}})}function Dp(){return Cn("unknown",()=>!0)}function Jc(e,t,n){return new Kt({...e,coercer:(o,a)=>Zc(o,t)?e.coercer(n(o,a),a):e.coercer(o,a)})}function l2(e,t,n={}){return Jc(e,Dp(),o=>{const a=typeof t=="function"?t():t;if(o===void 0)return a;if(!n.strict&&m0(o)&&m0(a)){const f={...o};let u=!1;for(const g in a)f[g]===void 0&&(f[g]=a[g],u=!0);if(u)return f}return o})}function c2(e){return Jc(e,xp(),t=>t.trim())}function d2(e){return Ui(e,"empty",t=>{const n=Mp(t);return n===0||`Expected an empty ${e.type} but received one with a size of \`${n}\``})}function Mp(e){return e instanceof Map||e instanceof Set?e.size:e.length}function h2(e,t,n={}){const{exclusive:o}=n;return Ui(e,"max",a=>o?a<t:a<=t||`Expected a ${e.type} less than ${o?"":"or equal to "}${t} but received \`${a}\``)}function g2(e,t,n={}){const{exclusive:o}=n;return Ui(e,"min",a=>o?a>t:a>=t||`Expected a ${e.type} greater than ${o?"":"or equal to "}${t} but received \`${a}\``)}function _2(e){return Ui(e,"nonempty",t=>Mp(t)>0||`Expected a nonempty ${e.type} but received an empty one`)}function p2(e,t){return Ui(e,"pattern",n=>t.test(n)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${n}"`)}function b2(e,t,n=t){const o=`Expected a ${e.type}`,a=t===n?`of \`${t}\``:`between \`${t}\` and \`${n}\``;return Ui(e,"size",f=>{if(typeof f=="number"||f instanceof Date)return t<=f&&f<=n||`${o} ${a} but received \`${f}\``;if(f instanceof Map||f instanceof Set){const{size:u}=f;return t<=u&&u<=n||`${o} with a size ${a} but received one with a size of \`${u}\``}else{const{length:u}=f;return t<=u&&u<=n||`${o} with a length ${a} but received one with a length of \`${u}\``}})}function Ui(e,t,n){return new Kt({...e,*refiner(o,a){yield*e.refiner(o,a);const f=n(o,a),u=wc(f,a,e,o);for(const g of u)yield{...g,refinement:t}}})}const y2=Object.freeze(Object.defineProperty({__proto__:null,Struct:Kt,StructError:Cp,any:qT,array:GT,assert:Pp,assign:MT,bigint:VT,boolean:ZT,coerce:Jc,create:Np,date:KT,defaulted:l2,define:Cn,deprecated:kT,dynamic:FT,empty:d2,enums:JT,func:XT,instance:YT,integer:QT,intersection:e2,is:Zc,lazy:UT,literal:t2,map:n2,mask:Bp,max:h2,min:g2,never:Kc,nonempty:_2,nullable:r2,number:i2,object:Rs,omit:jT,optional:$p,partial:HT,pattern:p2,pick:WT,record:o2,refine:Ui,regexp:s2,set:a2,size:b2,string:xp,struct:zT,trimmed:c2,tuple:f2,type:As,union:u2,unknown:Dp,validate:Oo},Symbol.toStringTag,{value:"Module"})),ji=Z.getAugmentedNamespace(y2);Object.defineProperty(sn,"__esModule",{value:!0});sn.assertExhaustive=sn.assertStruct=sn.assert=sn.AssertionError=void 0;const w2=ji;function m2(e){return typeof e=="object"&&e!==null&&"message"in e}function v2(e){var t,n;return typeof((n=(t=e==null?void 0:e.prototype)===null||t===void 0?void 0:t.constructor)===null||n===void 0?void 0:n.name)=="string"}function E2(e){const t=m2(e)?e.message:String(e);return t.endsWith(".")?t.slice(0,-1):t}function kp(e,t){return v2(e)?new e({message:t}):e({message:t})}class Xc extends Error{constructor(t){super(t.message),this.code="ERR_ASSERTION"}}sn.AssertionError=Xc;function S2(e,t="Assertion failed.",n=Xc){if(!e)throw t instanceof Error?t:kp(n,t)}sn.assert=S2;function R2(e,t,n="Assertion failed",o=Xc){try{(0,w2.assert)(e,t)}catch(a){throw kp(o,`${n}: ${E2(a)}.`)}}sn.assertStruct=R2;function A2(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}sn.assertExhaustive=A2;var Is={};Object.defineProperty(Is,"__esModule",{value:!0});Is.base64=void 0;const I2=ji,T2=sn,O2=(e,t={})=>{var n,o;const a=(n=t.paddingRequired)!==null&&n!==void 0?n:!1,f=(o=t.characterSet)!==null&&o!==void 0?o:"base64";let u;f==="base64"?u=String.raw`[A-Za-z0-9+\/]`:((0,T2.assert)(f==="base64url"),u=String.raw`[-_A-Za-z0-9]`);let g;return a?g=new RegExp(`^(?:${u}{4})*(?:${u}{3}=|${u}{2}==)?$`,"u"):g=new RegExp(`^(?:${u}{4})*(?:${u}{2,3}|${u}{3}=|${u}{2}==)?$`,"u"),(0,I2.pattern)(e,g)};Is.base64=O2;var gt={},Ts={};(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=ji,n=sn;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(h){return(0,t.is)(h,e.HexStruct)}e.isHexString=o;function a(h){return(0,t.is)(h,e.StrictHexStruct)}e.isStrictHexString=a;function f(h){(0,n.assert)(o(h),"Value must be a hexadecimal string.")}e.assertIsHexString=f;function u(h){(0,n.assert)(a(h),'Value must be a hexadecimal string, starting with "0x".')}e.assertIsStrictHexString=u;function g(h){return h.startsWith("0x")?h:h.startsWith("0X")?`0x${h.substring(2)}`:`0x${h}`}e.add0x=g;function d(h){return h.startsWith("0x")||h.startsWith("0X")?h.substring(2):h}e.remove0x=d})(Ts);Object.defineProperty(gt,"__esModule",{value:!0});gt.createDataView=gt.concatBytes=gt.valueToBytes=gt.stringToBytes=gt.numberToBytes=gt.signedBigIntToBytes=gt.bigIntToBytes=gt.hexToBytes=gt.bytesToString=gt.bytesToNumber=gt.bytesToSignedBigInt=gt.bytesToBigInt=gt.bytesToHex=gt.assertIsBytes=gt.isBytes=void 0;const Un=sn,mc=Ts,v0=48,E0=58,S0=87;function L2(){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 C2=L2();function Yc(e){return e instanceof Uint8Array}gt.isBytes=Yc;function Lo(e){(0,Un.assert)(Yc(e),"Value must be a Uint8Array.")}gt.assertIsBytes=Lo;function Fp(e){if(Lo(e),e.length===0)return"0x";const t=C2(),n=new Array(e.length);for(let o=0;o<e.length;o++)n[o]=t[e[o]];return(0,mc.add0x)(n.join(""))}gt.bytesToHex=Fp;function Up(e){Lo(e);const t=Fp(e);return BigInt(t)}gt.bytesToBigInt=Up;function P2(e){Lo(e);let t=BigInt(0);for(const n of e)t=(t<<BigInt(8))+BigInt(n);return BigInt.asIntN(e.length*8,t)}gt.bytesToSignedBigInt=P2;function N2(e){Lo(e);const t=Up(e);return(0,Un.assert)(t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)}gt.bytesToNumber=N2;function B2(e){return Lo(e),new TextDecoder().decode(e)}gt.bytesToString=B2;function If(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,mc.assertIsHexString)(e);const n=(0,mc.remove0x)(e).toLowerCase(),o=n.length%2===0?n:`0${n}`,a=new Uint8Array(o.length/2);for(let f=0;f<a.length;f++){const u=o.charCodeAt(f*2),g=o.charCodeAt(f*2+1),d=u-(u<E0?v0:S0),h=g-(g<E0?v0:S0);a[f]=d*16+h}return a}gt.hexToBytes=If;function jp(e){(0,Un.assert)(typeof e=="bigint","Value must be a bigint."),(0,Un.assert)(e>=BigInt(0),"Value must be a non-negative bigint.");const t=e.toString(16);return If(t)}gt.bigIntToBytes=jp;function $2(e,t){(0,Un.assert)(t>0);const n=e>>BigInt(31);return!((~e&n)+(e&~n)>>BigInt(t*8+-1))}function x2(e,t){(0,Un.assert)(typeof e=="bigint","Value must be a bigint."),(0,Un.assert)(typeof t=="number","Byte length must be a number."),(0,Un.assert)(t>0,"Byte length must be greater than 0."),(0,Un.assert)($2(e,t),"Byte length is too small to represent the given value.");let n=e;const o=new Uint8Array(t);for(let a=0;a<o.length;a++)o[a]=Number(BigInt.asUintN(8,n)),n>>=BigInt(8);return o.reverse()}gt.signedBigIntToBytes=x2;function Hp(e){(0,Un.assert)(typeof e=="number","Value must be a number."),(0,Un.assert)(e>=0,"Value must be a non-negative number."),(0,Un.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");const t=e.toString(16);return If(t)}gt.numberToBytes=Hp;function Wp(e){return(0,Un.assert)(typeof e=="string","Value must be a string."),new TextEncoder().encode(e)}gt.stringToBytes=Wp;function zp(e){if(typeof e=="bigint")return jp(e);if(typeof e=="number")return Hp(e);if(typeof e=="string")return e.startsWith("0x")?If(e):Wp(e);if(Yc(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}gt.valueToBytes=zp;function D2(e){const t=new Array(e.length);let n=0;for(let a=0;a<e.length;a++){const f=zp(e[a]);t[a]=f,n+=f.length}const o=new Uint8Array(n);for(let a=0,f=0;a<t.length;a++)o.set(t[a],f),f+=t[a].length;return o}gt.concatBytes=D2;function M2(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)}gt.createDataView=M2;var Tf={};Object.defineProperty(Tf,"__esModule",{value:!0});Tf.ChecksumStruct=void 0;const R0=ji,k2=Is;Tf.ChecksumStruct=(0,R0.size)((0,k2.base64)((0,R0.string)(),{paddingRequired:!0}),44,44);var Er={};Object.defineProperty(Er,"__esModule",{value:!0});Er.createHex=Er.createBytes=Er.createBigInt=Er.createNumber=void 0;const jt=ji,F2=sn,qp=gt,Of=Ts,Gp=(0,jt.union)([(0,jt.number)(),(0,jt.bigint)(),(0,jt.string)(),Of.StrictHexStruct]),U2=(0,jt.coerce)((0,jt.number)(),Gp,Number),j2=(0,jt.coerce)((0,jt.bigint)(),Gp,BigInt);(0,jt.union)([Of.StrictHexStruct,(0,jt.instance)(Uint8Array)]);const H2=(0,jt.coerce)((0,jt.instance)(Uint8Array),(0,jt.union)([Of.StrictHexStruct]),qp.hexToBytes),W2=(0,jt.coerce)(Of.StrictHexStruct,(0,jt.instance)(Uint8Array),qp.bytesToHex);function z2(e){try{const t=(0,jt.create)(e,U2);return(0,F2.assert)(Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){throw t instanceof jt.StructError?new Error(`Expected a number-like value, got "${e}".`):t}}Er.createNumber=z2;function q2(e){try{return(0,jt.create)(e,j2)}catch(t){throw t instanceof jt.StructError?new Error(`Expected a number-like value, got "${String(t.value)}".`):t}}Er.createBigInt=q2;function G2(e){if(typeof e=="string"&&e.toLowerCase()==="0x")return new Uint8Array;try{return(0,jt.create)(e,H2)}catch(t){throw t instanceof jt.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}Er.createBytes=G2;function V2(e){if(e instanceof Uint8Array&&e.length===0||typeof e=="string"&&e.toLowerCase()==="0x")return"0x";try{return(0,jt.create)(e,W2)}catch(t){throw t instanceof jt.StructError?new Error(`Expected a bytes-like value, got "${String(t.value)}".`):t}}Er.createHex=V2;var vo={},Vp=Z.commonjsGlobal&&Z.commonjsGlobal.__classPrivateFieldSet||function(e,t,n,o,a){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?a.call(e,n):a?a.value=n:t.set(e,n),n},vn=Z.commonjsGlobal&&Z.commonjsGlobal.__classPrivateFieldGet||function(e,t,n,o){if(n==="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 n==="m"?o:n==="a"?o.call(e):o?o.value:t.get(e)},fr,wr;Object.defineProperty(vo,"__esModule",{value:!0});vo.FrozenSet=vo.FrozenMap=void 0;class Qc{constructor(t){fr.set(this,void 0),Vp(this,fr,new Map(t),"f"),Object.freeze(this)}get size(){return vn(this,fr,"f").size}[(fr=new WeakMap,Symbol.iterator)](){return vn(this,fr,"f")[Symbol.iterator]()}entries(){return vn(this,fr,"f").entries()}forEach(t,n){return vn(this,fr,"f").forEach((o,a,f)=>t.call(n,o,a,this))}get(t){return vn(this,fr,"f").get(t)}has(t){return vn(this,fr,"f").has(t)}keys(){return vn(this,fr,"f").keys()}values(){return vn(this,fr,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([t,n])=>`${String(t)} => ${String(n)}`).join(", ")} `:""}}`}}vo.FrozenMap=Qc;class ed{constructor(t){wr.set(this,void 0),Vp(this,wr,new Set(t),"f"),Object.freeze(this)}get size(){return vn(this,wr,"f").size}[(wr=new WeakMap,Symbol.iterator)](){return vn(this,wr,"f")[Symbol.iterator]()}entries(){return vn(this,wr,"f").entries()}forEach(t,n){return vn(this,wr,"f").forEach((o,a,f)=>t.call(n,o,a,this))}has(t){return vn(this,wr,"f").has(t)}keys(){return vn(this,wr,"f").keys()}values(){return vn(this,wr,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(t=>String(t)).join(", ")} `:""}}`}}vo.FrozenSet=ed;Object.freeze(Qc);Object.freeze(Qc.prototype);Object.freeze(ed);Object.freeze(ed.prototype);var Zp={};Object.defineProperty(Zp,"__esModule",{value:!0});var Kp={};(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=ji,n=sn,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,ae)=>{function ie(_e,ce){const we=[...ce.validator(_e,ae)];return we.length>0?we:!0}try{const _e=ie(J,e.UnsafeJsonStruct);return _e!==!0?_e:ie(JSON.parse(JSON.stringify(J)),e.UnsafeJsonStruct)}catch(_e){return _e instanceof RangeError?"Circular reference detected":!1}});function a(J){return(0,t.is)(J,e.JsonStruct)}e.isValidJson=a;function f(J){(0,n.assertStruct)(J,e.JsonStruct,"Invalid JSON value");const ae=JSON.stringify(J);return new TextEncoder().encode(ae).byteLength}e.getJsonSize=f,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 u(J){return(0,t.is)(J,e.JsonRpcNotificationStruct)}e.isJsonRpcNotification=u;function g(J,ae){(0,n.assertStruct)(J,e.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",ae)}e.assertIsJsonRpcNotification=g;function d(J){return(0,t.is)(J,e.JsonRpcRequestStruct)}e.isJsonRpcRequest=d;function h(J,ae){(0,n.assertStruct)(J,e.JsonRpcRequestStruct,"Invalid JSON-RPC request",ae)}e.assertIsJsonRpcRequest=h,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 _(J){return(0,t.is)(J,e.PendingJsonRpcResponseStruct)}e.isPendingJsonRpcResponse=_;function y(J,ae){(0,n.assertStruct)(J,e.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",ae)}e.assertIsPendingJsonRpcResponse=y;function E(J){return(0,t.is)(J,e.JsonRpcResponseStruct)}e.isJsonRpcResponse=E;function m(J,ae){(0,n.assertStruct)(J,e.JsonRpcResponseStruct,"Invalid JSON-RPC response",ae)}e.assertIsJsonRpcResponse=m;function N(J){return(0,t.is)(J,e.JsonRpcSuccessStruct)}e.isJsonRpcSuccess=N;function k(J,ae){(0,n.assertStruct)(J,e.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",ae)}e.assertIsJsonRpcSuccess=k;function U(J){return(0,t.is)(J,e.JsonRpcFailureStruct)}e.isJsonRpcFailure=U;function G(J,ae){(0,n.assertStruct)(J,e.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",ae)}e.assertIsJsonRpcFailure=G;function H(J){return(0,t.is)(J,e.JsonRpcErrorStruct)}e.isJsonRpcError=H;function P(J,ae){(0,n.assertStruct)(J,e.JsonRpcErrorStruct,"Invalid JSON-RPC error",ae)}e.assertIsJsonRpcError=P;function C(J){const{permitEmptyString:ae,permitFractions:ie,permitNull:_e}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},J);return Ie=>!!(typeof Ie=="number"&&(ie||Number.isInteger(Ie))||typeof Ie=="string"&&(ae||Ie.length>0)||_e&&Ie===null)}e.getJsonRpcIdValidator=C})(Kp);var Jp={};Object.defineProperty(Jp,"__esModule",{value:!0});var Eo={},Z2=Z.commonjsGlobal&&Z.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Eo,"__esModule",{value:!0});Eo.createModuleLogger=Eo.createProjectLogger=void 0;const K2=Z2(yR),J2=(0,K2.default)("metamask");function X2(e){return J2.extend(e)}Eo.createProjectLogger=X2;function Y2(e,t){return e.extend(t)}Eo.createModuleLogger=Y2;var Xp={};(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(h){return Array.isArray(h)&&h.length>0}e.isNonEmptyArray=t;function n(h){return h==null}e.isNullOrUndefined=n;function o(h){return!!h&&typeof h=="object"&&!Array.isArray(h)}e.isObject=o;const a=(h,_)=>Object.hasOwnProperty.call(h,_);e.hasProperty=a,function(h){h[h.Null=4]="Null",h[h.Comma=1]="Comma",h[h.Wrapper=1]="Wrapper",h[h.True=4]="True",h[h.False=5]="False",h[h.Quote=1]="Quote",h[h.Colon=1]="Colon",h[h.Date=24]="Date"}(e.JsonSize||(e.JsonSize={})),e.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu;function f(h){if(typeof h!="object"||h===null)return!1;try{let _=h;for(;Object.getPrototypeOf(_)!==null;)_=Object.getPrototypeOf(_);return Object.getPrototypeOf(h)===_}catch{return!1}}e.isPlainObject=f;function u(h){return h.charCodeAt(0)<=127}e.isASCII=u;function g(h){var _;return h.split("").reduce((E,m)=>u(m)?E+1:E+2,0)+((_=h.match(e.ESCAPE_CHARACTERS_REGEXP))!==null&&_!==void 0?_:[]).length}e.calculateStringSize=g;function d(h){return h.toString().length}e.calculateNumberSize=d})(Xp);var Sr={};Object.defineProperty(Sr,"__esModule",{value:!0});Sr.hexToBigInt=Sr.hexToNumber=Sr.bigIntToHex=Sr.numberToHex=void 0;const yo=sn,ys=Ts,Q2=e=>((0,yo.assert)(typeof e=="number","Value must be a number."),(0,yo.assert)(e>=0,"Value must be a non-negative number."),(0,yo.assert)(Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,ys.add0x)(e.toString(16)));Sr.numberToHex=Q2;const eO=e=>((0,yo.assert)(typeof e=="bigint","Value must be a bigint."),(0,yo.assert)(e>=0,"Value must be a non-negative bigint."),(0,ys.add0x)(e.toString(16)));Sr.bigIntToHex=eO;const tO=e=>{(0,ys.assertIsHexString)(e);const t=parseInt(e,16);return(0,yo.assert)(Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t};Sr.hexToNumber=tO;const nO=e=>((0,ys.assertIsHexString)(e),BigInt((0,ys.add0x)(e)));Sr.hexToBigInt=nO;var Yp={};Object.defineProperty(Yp,"__esModule",{value:!0});var Qp={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeSince=e.inMilliseconds=e.Duration=void 0,function(f){f[f.Millisecond=1]="Millisecond",f[f.Second=1e3]="Second",f[f.Minute=6e4]="Minute",f[f.Hour=36e5]="Hour",f[f.Day=864e5]="Day",f[f.Week=6048e5]="Week",f[f.Year=31536e6]="Year"}(e.Duration||(e.Duration={}));const t=f=>Number.isInteger(f)&&f>=0,n=(f,u)=>{if(!t(f))throw new Error(`"${u}" must be a non-negative integer. Received: "${f}".`)};function o(f,u){return n(f,"count"),f*u}e.inMilliseconds=o;function a(f){return n(f,"timestamp"),Date.now()-f}e.timeSince=a})(Qp);var eb={};Object.defineProperty(eb,"__esModule",{value:!0});var tb={},vc={exports:{}};const rO="2.0.0",nb=256,iO=Number.MAX_SAFE_INTEGER||9007199254740991,oO=16,sO=nb-6,aO=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var Lf={MAX_LENGTH:nb,MAX_SAFE_COMPONENT_LENGTH:oO,MAX_SAFE_BUILD_LENGTH:sO,MAX_SAFE_INTEGER:iO,RELEASE_TYPES:aO,SEMVER_SPEC_VERSION:rO,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2};const fO=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 Cf=fO;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:a}=Lf,f=Cf;t=e.exports={};const u=t.re=[],g=t.safeRe=[],d=t.src=[],h=t.t={};let _=0;const y="[a-zA-Z0-9-]",E=[["\\s",1],["\\d",a],[y,o]],m=k=>{for(const[U,G]of E)k=k.split(`${U}*`).join(`${U}{0,${G}}`).split(`${U}+`).join(`${U}{1,${G}}`);return k},N=(k,U,G)=>{const H=m(U),P=_++;f(k,P,U),h[k]=P,d[P]=U,u[P]=new RegExp(U,G?"g":void 0),g[P]=new RegExp(H,G?"g":void 0)};N("NUMERICIDENTIFIER","0|[1-9]\\d*"),N("NUMERICIDENTIFIERLOOSE","\\d+"),N("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${y}*`),N("MAINVERSION",`(${d[h.NUMERICIDENTIFIER]})\\.(${d[h.NUMERICIDENTIFIER]})\\.(${d[h.NUMERICIDENTIFIER]})`),N("MAINVERSIONLOOSE",`(${d[h.NUMERICIDENTIFIERLOOSE]})\\.(${d[h.NUMERICIDENTIFIERLOOSE]})\\.(${d[h.NUMERICIDENTIFIERLOOSE]})`),N("PRERELEASEIDENTIFIER",`(?:${d[h.NUMERICIDENTIFIER]}|${d[h.NONNUMERICIDENTIFIER]})`),N("PRERELEASEIDENTIFIERLOOSE",`(?:${d[h.NUMERICIDENTIFIERLOOSE]}|${d[h.NONNUMERICIDENTIFIER]})`),N("PRERELEASE",`(?:-(${d[h.PRERELEASEIDENTIFIER]}(?:\\.${d[h.PRERELEASEIDENTIFIER]})*))`),N("PRERELEASELOOSE",`(?:-?(${d[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${d[h.PRERELEASEIDENTIFIERLOOSE]})*))`),N("BUILDIDENTIFIER",`${y}+`),N("BUILD",`(?:\\+(${d[h.BUILDIDENTIFIER]}(?:\\.${d[h.BUILDIDENTIFIER]})*))`),N("FULLPLAIN",`v?${d[h.MAINVERSION]}${d[h.PRERELEASE]}?${d[h.BUILD]}?`),N("FULL",`^${d[h.FULLPLAIN]}$`),N("LOOSEPLAIN",`[v=\\s]*${d[h.MAINVERSIONLOOSE]}${d[h.PRERELEASELOOSE]}?${d[h.BUILD]}?`),N("LOOSE",`^${d[h.LOOSEPLAIN]}$`),N("GTLT","((?:<|>)?=?)"),N("XRANGEIDENTIFIERLOOSE",`${d[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),N("XRANGEIDENTIFIER",`${d[h.NUMERICIDENTIFIER]}|x|X|\\*`),N("XRANGEPLAIN",`[v=\\s]*(${d[h.XRANGEIDENTIFIER]})(?:\\.(${d[h.XRANGEIDENTIFIER]})(?:\\.(${d[h.XRANGEIDENTIFIER]})(?:${d[h.PRERELEASE]})?${d[h.BUILD]}?)?)?`),N("XRANGEPLAINLOOSE",`[v=\\s]*(${d[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${d[h.XRANGEIDENTIFIERLOOSE]})(?:${d[h.PRERELEASELOOSE]})?${d[h.BUILD]}?)?)?`),N("XRANGE",`^${d[h.GTLT]}\\s*${d[h.XRANGEPLAIN]}$`),N("XRANGELOOSE",`^${d[h.GTLT]}\\s*${d[h.XRANGEPLAINLOOSE]}$`),N("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),N("COERCE",`${d[h.COERCEPLAIN]}(?:$|[^\\d])`),N("COERCEFULL",d[h.COERCEPLAIN]+`(?:${d[h.PRERELEASE]})?(?:${d[h.BUILD]})?(?:$|[^\\d])`),N("COERCERTL",d[h.COERCE],!0),N("COERCERTLFULL",d[h.COERCEFULL],!0),N("LONETILDE","(?:~>?)"),N("TILDETRIM",`(\\s*)${d[h.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",N("TILDE",`^${d[h.LONETILDE]}${d[h.XRANGEPLAIN]}$`),N("TILDELOOSE",`^${d[h.LONETILDE]}${d[h.XRANGEPLAINLOOSE]}$`),N("LONECARET","(?:\\^)"),N("CARETTRIM",`(\\s*)${d[h.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",N("CARET",`^${d[h.LONECARET]}${d[h.XRANGEPLAIN]}$`),N("CARETLOOSE",`^${d[h.LONECARET]}${d[h.XRANGEPLAINLOOSE]}$`),N("COMPARATORLOOSE",`^${d[h.GTLT]}\\s*(${d[h.LOOSEPLAIN]})$|^$`),N("COMPARATOR",`^${d[h.GTLT]}\\s*(${d[h.FULLPLAIN]})$|^$`),N("COMPARATORTRIM",`(\\s*)${d[h.GTLT]}\\s*(${d[h.LOOSEPLAIN]}|${d[h.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",N("HYPHENRANGE",`^\\s*(${d[h.XRANGEPLAIN]})\\s+-\\s+(${d[h.XRANGEPLAIN]})\\s*$`),N("HYPHENRANGELOOSE",`^\\s*(${d[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${d[h.XRANGEPLAINLOOSE]})\\s*$`),N("STAR","(<|>)?=?\\s*\\*"),N("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),N("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(vc,vc.exports);var Os=vc.exports;const uO=Object.freeze({loose:!0}),lO=Object.freeze({}),cO=e=>e?typeof e!="object"?uO:e:lO;var td=cO;const A0=/^[0-9]+$/,rb=(e,t)=>{const n=A0.test(e),o=A0.test(t);return n&&o&&(e=+e,t=+t),e===t?0:n&&!o?-1:o&&!n?1:e<t?-1:1},dO=(e,t)=>rb(t,e);var ib={compareIdentifiers:rb,rcompareIdentifiers:dO};const Wa=Cf,{MAX_LENGTH:I0,MAX_SAFE_INTEGER:za}=Lf,{safeRe:T0,t:O0}=Os,hO=td,{compareIdentifiers:lo}=ib;let gO=class mr{constructor(t,n){if(n=hO(n),t instanceof mr){if(t.loose===!!n.loose&&t.includePrerelease===!!n.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>I0)throw new TypeError(`version is longer than ${I0} characters`);Wa("SemVer",t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const o=t.trim().match(n.loose?T0[O0.LOOSE]:T0[O0.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>za||this.major<0)throw new TypeError("Invalid major version");if(this.minor>za||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>za||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){const f=+a;if(f>=0&&f<za)return f}return a}):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(Wa("SemVer.compare",this.version,this.options,t),!(t instanceof mr)){if(typeof t=="string"&&t===this.version)return 0;t=new mr(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof mr||(t=new mr(t,this.options)),lo(this.major,t.major)||lo(this.minor,t.minor)||lo(this.patch,t.patch)}comparePre(t){if(t instanceof mr||(t=new mr(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 n=0;do{const o=this.prerelease[n],a=t.prerelease[n];if(Wa("prerelease compare",n,o,a),o===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(o===void 0)return-1;if(o===a)continue;return lo(o,a)}while(++n)}compareBuild(t){t instanceof mr||(t=new mr(t,this.options));let n=0;do{const o=this.build[n],a=t.build[n];if(Wa("build compare",n,o,a),o===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(o===void 0)return-1;if(o===a)continue;return lo(o,a)}while(++n)}inc(t,n,o){switch(t){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,o),this.inc("pre",n,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,o),this.inc("pre",n,o);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 a=Number(o)?1:0;if(!n&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[a];else{let f=this.prerelease.length;for(;--f>=0;)typeof this.prerelease[f]=="number"&&(this.prerelease[f]++,f=-2);if(f===-1){if(n===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(n){let f=[n,a];o===!1&&(f=[n]),lo(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=f):this.prerelease=f}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var Sn=gO;const L0=Sn,_O=(e,t,n=!1)=>{if(e instanceof L0)return e;try{return new L0(e,t)}catch(o){if(!n)return null;throw o}};var Co=_O;const pO=Co,bO=(e,t)=>{const n=pO(e,t);return n?n.version:null};var yO=bO;const wO=Co,mO=(e,t)=>{const n=wO(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null};var vO=mO;const C0=Sn,EO=(e,t,n,o,a)=>{typeof n=="string"&&(a=o,o=n,n=void 0);try{return new C0(e instanceof C0?e.version:e,n).inc(t,o,a).version}catch{return null}};var SO=EO;const P0=Co,RO=(e,t)=>{const n=P0(e,null,!0),o=P0(t,null,!0),a=n.compare(o);if(a===0)return null;const f=a>0,u=f?n:o,g=f?o:n,d=!!u.prerelease.length;if(!!g.prerelease.length&&!d)return!g.patch&&!g.minor?"major":u.patch?"patch":u.minor?"minor":"major";const _=d?"pre":"";return n.major!==o.major?_+"major":n.minor!==o.minor?_+"minor":n.patch!==o.patch?_+"patch":"prerelease"};var AO=RO;const IO=Sn,TO=(e,t)=>new IO(e,t).major;var OO=TO;const LO=Sn,CO=(e,t)=>new LO(e,t).minor;var PO=CO;const NO=Sn,BO=(e,t)=>new NO(e,t).patch;var $O=BO;const xO=Co,DO=(e,t)=>{const n=xO(e,t);return n&&n.prerelease.length?n.prerelease:null};var MO=DO;const N0=Sn,kO=(e,t,n)=>new N0(e,n).compare(new N0(t,n));var hr=kO;const FO=hr,UO=(e,t,n)=>FO(t,e,n);var jO=UO;const HO=hr,WO=(e,t)=>HO(e,t,!0);var zO=WO;const B0=Sn,qO=(e,t,n)=>{const o=new B0(e,n),a=new B0(t,n);return o.compare(a)||o.compareBuild(a)};var nd=qO;const GO=nd,VO=(e,t)=>e.sort((n,o)=>GO(n,o,t));var ZO=VO;const KO=nd,JO=(e,t)=>e.sort((n,o)=>KO(o,n,t));var XO=JO;const YO=hr,QO=(e,t,n)=>YO(e,t,n)>0;var Pf=QO;const eL=hr,tL=(e,t,n)=>eL(e,t,n)<0;var rd=tL;const nL=hr,rL=(e,t,n)=>nL(e,t,n)===0;var ob=rL;const iL=hr,oL=(e,t,n)=>iL(e,t,n)!==0;var sb=oL;const sL=hr,aL=(e,t,n)=>sL(e,t,n)>=0;var id=aL;const fL=hr,uL=(e,t,n)=>fL(e,t,n)<=0;var od=uL;const lL=ob,cL=sb,dL=Pf,hL=id,gL=rd,_L=od,pL=(e,t,n,o)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e===n;case"!==":return typeof e=="object"&&(e=e.version),typeof n=="object"&&(n=n.version),e!==n;case"":case"=":case"==":return lL(e,n,o);case"!=":return cL(e,n,o);case">":return dL(e,n,o);case">=":return hL(e,n,o);case"<":return gL(e,n,o);case"<=":return _L(e,n,o);default:throw new TypeError(`Invalid operator: ${t}`)}};var ab=pL;const bL=Sn,yL=Co,{safeRe:qa,t:Ga}=Os,wL=(e,t)=>{if(e instanceof bL)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let n=null;if(!t.rtl)n=e.match(t.includePrerelease?qa[Ga.COERCEFULL]:qa[Ga.COERCE]);else{const d=t.includePrerelease?qa[Ga.COERCERTLFULL]:qa[Ga.COERCERTL];let h;for(;(h=d.exec(e))&&(!n||n.index+n[0].length!==e.length);)(!n||h.index+h[0].length!==n.index+n[0].length)&&(n=h),d.lastIndex=h.index+h[1].length+h[2].length;d.lastIndex=-1}if(n===null)return null;const o=n[2],a=n[3]||"0",f=n[4]||"0",u=t.includePrerelease&&n[5]?`-${n[5]}`:"",g=t.includePrerelease&&n[6]?`+${n[6]}`:"";return yL(`${o}.${a}.${f}${u}${g}`,t)};var mL=wL;class vL{constructor(){this.max=1e3,this.map=new Map}get(t){const n=this.map.get(t);if(n!==void 0)return this.map.delete(t),this.map.set(t,n),n}delete(t){return this.map.delete(t)}set(t,n){if(!this.delete(t)&&n!==void 0){if(this.map.size>=this.max){const a=this.map.keys().next().value;this.delete(a)}this.map.set(t,n)}return this}}var EL=vL,xl,$0;function gr(){if($0)return xl;$0=1;const e=/\s+/g;class t{constructor(B,W){if(W=a(W),B instanceof t)return B.loose===!!W.loose&&B.includePrerelease===!!W.includePrerelease?B:new t(B.raw,W);if(B instanceof f)return this.raw=B.value,this.set=[[B]],this.formatted=void 0,this;if(this.options=W,this.loose=!!W.loose,this.includePrerelease=!!W.includePrerelease,this.raw=B.trim().replace(e," "),this.set=this.raw.split("||").map(D=>this.parseRange(D.trim())).filter(D=>D.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const D=this.set[0];if(this.set=this.set.filter(X=>!k(X[0])),this.set.length===0)this.set=[D];else if(this.set.length>1){for(const X of this.set)if(X.length===1&&U(X[0])){this.set=[X];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let B=0;B<this.set.length;B++){B>0&&(this.formatted+="||");const W=this.set[B];for(let D=0;D<W.length;D++)D>0&&(this.formatted+=" "),this.formatted+=W[D].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(B){const D=((this.options.includePrerelease&&m)|(this.options.loose&&N))+":"+B,X=o.get(D);if(X)return X;const M=this.options.loose,q=M?d[h.HYPHENRANGELOOSE]:d[h.HYPHENRANGE];B=B.replace(q,p(this.options.includePrerelease)),u("hyphen replace",B),B=B.replace(d[h.COMPARATORTRIM],_),u("comparator trim",B),B=B.replace(d[h.TILDETRIM],y),u("tilde trim",B),B=B.replace(d[h.CARETTRIM],E),u("caret trim",B);let ne=B.split(" ").map(pe=>H(pe,this.options)).join(" ").split(/\s+/).map(pe=>we(pe,this.options));M&&(ne=ne.filter(pe=>(u("loose invalid filter",pe,this.options),!!pe.match(d[h.COMPARATORLOOSE])))),u("range list",ne);const he=new Map,ee=ne.map(pe=>new f(pe,this.options));for(const pe of ee){if(k(pe))return[pe];he.set(pe.value,pe)}he.size>1&&he.has("")&&he.delete("");const me=[...he.values()];return o.set(D,me),me}intersects(B,W){if(!(B instanceof t))throw new TypeError("a Range is required");return this.set.some(D=>G(D,W)&&B.set.some(X=>G(X,W)&&D.every(M=>X.every(q=>M.intersects(q,W)))))}test(B){if(!B)return!1;if(typeof B=="string")try{B=new g(B,this.options)}catch{return!1}for(let W=0;W<this.set.length;W++)if(v(this.set[W],B,this.options))return!0;return!1}}xl=t;const n=EL,o=new n,a=td,f=Nf(),u=Cf,g=Sn,{safeRe:d,t:h,comparatorTrimReplace:_,tildeTrimReplace:y,caretTrimReplace:E}=Os,{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:N}=Lf,k=A=>A.value==="<0.0.0-0",U=A=>A.value==="",G=(A,B)=>{let W=!0;const D=A.slice();let X=D.pop();for(;W&&D.length;)W=D.every(M=>X.intersects(M,B)),X=D.pop();return W},H=(A,B)=>(u("comp",A,B),A=ae(A,B),u("caret",A),A=C(A,B),u("tildes",A),A=_e(A,B),u("xrange",A),A=Ie(A,B),u("stars",A),A),P=A=>!A||A.toLowerCase()==="x"||A==="*",C=(A,B)=>A.trim().split(/\s+/).map(W=>J(W,B)).join(" "),J=(A,B)=>{const W=B.loose?d[h.TILDELOOSE]:d[h.TILDE];return A.replace(W,(D,X,M,q,ne)=>{u("tilde",A,D,X,M,q,ne);let he;return P(X)?he="":P(M)?he=`>=${X}.0.0 <${+X+1}.0.0-0`:P(q)?he=`>=${X}.${M}.0 <${X}.${+M+1}.0-0`:ne?(u("replaceTilde pr",ne),he=`>=${X}.${M}.${q}-${ne} <${X}.${+M+1}.0-0`):he=`>=${X}.${M}.${q} <${X}.${+M+1}.0-0`,u("tilde return",he),he})},ae=(A,B)=>A.trim().split(/\s+/).map(W=>ie(W,B)).join(" "),ie=(A,B)=>{u("caret",A,B);const W=B.loose?d[h.CARETLOOSE]:d[h.CARET],D=B.includePrerelease?"-0":"";return A.replace(W,(X,M,q,ne,he)=>{u("caret",A,X,M,q,ne,he);let ee;return P(M)?ee="":P(q)?ee=`>=${M}.0.0${D} <${+M+1}.0.0-0`:P(ne)?M==="0"?ee=`>=${M}.${q}.0${D} <${M}.${+q+1}.0-0`:ee=`>=${M}.${q}.0${D} <${+M+1}.0.0-0`:he?(u("replaceCaret pr",he),M==="0"?q==="0"?ee=`>=${M}.${q}.${ne}-${he} <${M}.${q}.${+ne+1}-0`:ee=`>=${M}.${q}.${ne}-${he} <${M}.${+q+1}.0-0`:ee=`>=${M}.${q}.${ne}-${he} <${+M+1}.0.0-0`):(u("no pr"),M==="0"?q==="0"?ee=`>=${M}.${q}.${ne}${D} <${M}.${q}.${+ne+1}-0`:ee=`>=${M}.${q}.${ne}${D} <${M}.${+q+1}.0-0`:ee=`>=${M}.${q}.${ne} <${+M+1}.0.0-0`),u("caret return",ee),ee})},_e=(A,B)=>(u("replaceXRanges",A,B),A.split(/\s+/).map(W=>ce(W,B)).join(" ")),ce=(A,B)=>{A=A.trim();const W=B.loose?d[h.XRANGELOOSE]:d[h.XRANGE];return A.replace(W,(D,X,M,q,ne,he)=>{u("xRange",A,D,X,M,q,ne,he);const ee=P(M),me=ee||P(q),pe=me||P(ne),Re=pe;return X==="="&&Re&&(X=""),he=B.includePrerelease?"-0":"",ee?X===">"||X==="<"?D="<0.0.0-0":D="*":X&&Re?(me&&(q=0),ne=0,X===">"?(X=">=",me?(M=+M+1,q=0,ne=0):(q=+q+1,ne=0)):X==="<="&&(X="<",me?M=+M+1:q=+q+1),X==="<"&&(he="-0"),D=`${X+M}.${q}.${ne}${he}`):me?D=`>=${M}.0.0${he} <${+M+1}.0.0-0`:pe&&(D=`>=${M}.${q}.0${he} <${M}.${+q+1}.0-0`),u("xRange return",D),D})},Ie=(A,B)=>(u("replaceStars",A,B),A.trim().replace(d[h.STAR],"")),we=(A,B)=>(u("replaceGTE0",A,B),A.trim().replace(d[B.includePrerelease?h.GTE0PRE:h.GTE0],"")),p=A=>(B,W,D,X,M,q,ne,he,ee,me,pe,Re)=>(P(D)?W="":P(X)?W=`>=${D}.0.0${A?"-0":""}`:P(M)?W=`>=${D}.${X}.0${A?"-0":""}`:q?W=`>=${W}`:W=`>=${W}${A?"-0":""}`,P(ee)?he="":P(me)?he=`<${+ee+1}.0.0-0`:P(pe)?he=`<${ee}.${+me+1}.0-0`:Re?he=`<=${ee}.${me}.${pe}-${Re}`:A?he=`<${ee}.${me}.${+pe+1}-0`:he=`<=${he}`,`${W} ${he}`.trim()),v=(A,B,W)=>{for(let D=0;D<A.length;D++)if(!A[D].test(B))return!1;if(B.prerelease.length&&!W.includePrerelease){for(let D=0;D<A.length;D++)if(u(A[D].semver),A[D].semver!==f.ANY&&A[D].semver.prerelease.length>0){const X=A[D].semver;if(X.major===B.major&&X.minor===B.minor&&X.patch===B.patch)return!0}return!1}return!0};return xl}var Dl,x0;function Nf(){if(x0)return Dl;x0=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(_,y){if(y=n(y),_ instanceof t){if(_.loose===!!y.loose)return _;_=_.value}_=_.trim().split(/\s+/).join(" "),u("comparator",_,y),this.options=y,this.loose=!!y.loose,this.parse(_),this.semver===e?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(_){const y=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],E=_.match(y);if(!E)throw new TypeError(`Invalid comparator: ${_}`);this.operator=E[1]!==void 0?E[1]:"",this.operator==="="&&(this.operator=""),E[2]?this.semver=new g(E[2],this.options.loose):this.semver=e}toString(){return this.value}test(_){if(u("Comparator.test",_,this.options.loose),this.semver===e||_===e)return!0;if(typeof _=="string")try{_=new g(_,this.options)}catch{return!1}return f(_,this.operator,this.semver,this.options)}intersects(_,y){if(!(_ instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new d(_.value,y).test(this.value):_.operator===""?_.value===""?!0:new d(this.value,y).test(_.semver):(y=n(y),y.includePrerelease&&(this.value==="<0.0.0-0"||_.value==="<0.0.0-0")||!y.includePrerelease&&(this.value.startsWith("<0.0.0")||_.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&_.operator.startsWith(">")||this.operator.startsWith("<")&&_.operator.startsWith("<")||this.semver.version===_.semver.version&&this.operator.includes("=")&&_.operator.includes("=")||f(this.semver,"<",_.semver,y)&&this.operator.startsWith(">")&&_.operator.startsWith("<")||f(this.semver,">",_.semver,y)&&this.operator.startsWith("<")&&_.operator.startsWith(">")))}}Dl=t;const n=td,{safeRe:o,t:a}=Os,f=ab,u=Cf,g=Sn,d=gr();return Dl}const SL=gr(),RL=(e,t,n)=>{try{t=new SL(t,n)}catch{return!1}return t.test(e)};var Bf=RL;const AL=gr(),IL=(e,t)=>new AL(e,t).set.map(n=>n.map(o=>o.value).join(" ").trim().split(" "));var TL=IL;const OL=Sn,LL=gr(),CL=(e,t,n)=>{let o=null,a=null,f=null;try{f=new LL(t,n)}catch{return null}return e.forEach(u=>{f.test(u)&&(!o||a.compare(u)===-1)&&(o=u,a=new OL(o,n))}),o};var PL=CL;const NL=Sn,BL=gr(),$L=(e,t,n)=>{let o=null,a=null,f=null;try{f=new BL(t,n)}catch{return null}return e.forEach(u=>{f.test(u)&&(!o||a.compare(u)===1)&&(o=u,a=new NL(o,n))}),o};var xL=$L;const Ml=Sn,DL=gr(),D0=Pf,ML=(e,t)=>{e=new DL(e,t);let n=new Ml("0.0.0");if(e.test(n)||(n=new Ml("0.0.0-0"),e.test(n)))return n;n=null;for(let o=0;o<e.set.length;++o){const a=e.set[o];let f=null;a.forEach(u=>{const g=new Ml(u.semver.version);switch(u.operator){case">":g.prerelease.length===0?g.patch++:g.prerelease.push(0),g.raw=g.format();case"":case">=":(!f||D0(g,f))&&(f=g);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),f&&(!n||D0(n,f))&&(n=f)}return n&&e.test(n)?n:null};var kL=ML;const FL=gr(),UL=(e,t)=>{try{return new FL(e,t).range||"*"}catch{return null}};var jL=UL;const HL=Sn,fb=Nf(),{ANY:WL}=fb,zL=gr(),qL=Bf,M0=Pf,k0=rd,GL=od,VL=id,ZL=(e,t,n,o)=>{e=new HL(e,o),t=new zL(t,o);let a,f,u,g,d;switch(n){case">":a=M0,f=GL,u=k0,g=">",d=">=";break;case"<":a=k0,f=VL,u=M0,g="<",d="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(qL(e,t,o))return!1;for(let h=0;h<t.set.length;++h){const _=t.set[h];let y=null,E=null;if(_.forEach(m=>{m.semver===WL&&(m=new fb(">=0.0.0")),y=y||m,E=E||m,a(m.semver,y.semver,o)?y=m:u(m.semver,E.semver,o)&&(E=m)}),y.operator===g||y.operator===d||(!E.operator||E.operator===g)&&f(e,E.semver))return!1;if(E.operator===d&&u(e,E.semver))return!1}return!0};var sd=ZL;const KL=sd,JL=(e,t,n)=>KL(e,t,">",n);var XL=JL;const YL=sd,QL=(e,t,n)=>YL(e,t,"<",n);var eC=QL;const F0=gr(),tC=(e,t,n)=>(e=new F0(e,n),t=new F0(t,n),e.intersects(t,n));var nC=tC;const rC=Bf,iC=hr;var oC=(e,t,n)=>{const o=[];let a=null,f=null;const u=e.sort((_,y)=>iC(_,y,n));for(const _ of u)rC(_,t,n)?(f=_,a||(a=_)):(f&&o.push([a,f]),f=null,a=null);a&&o.push([a,null]);const g=[];for(const[_,y]of o)_===y?g.push(_):!y&&_===u[0]?g.push("*"):y?_===u[0]?g.push(`<=${y}`):g.push(`${_} - ${y}`):g.push(`>=${_}`);const d=g.join(" || "),h=typeof t.raw=="string"?t.raw:String(t);return d.length<h.length?d:t};const U0=gr(),ad=Nf(),{ANY:kl}=ad,os=Bf,fd=hr,sC=(e,t,n={})=>{if(e===t)return!0;e=new U0(e,n),t=new U0(t,n);let o=!1;e:for(const a of e.set){for(const f of t.set){const u=fC(a,f,n);if(o=o||u!==null,u)continue e}if(o)return!1}return!0},aC=[new ad(">=0.0.0-0")],j0=[new ad(">=0.0.0")],fC=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===kl){if(t.length===1&&t[0].semver===kl)return!0;n.includePrerelease?e=aC:e=j0}if(t.length===1&&t[0].semver===kl){if(n.includePrerelease)return!0;t=j0}const o=new Set;let a,f;for(const m of e)m.operator===">"||m.operator===">="?a=H0(a,m,n):m.operator==="<"||m.operator==="<="?f=W0(f,m,n):o.add(m.semver);if(o.size>1)return null;let u;if(a&&f){if(u=fd(a.semver,f.semver,n),u>0)return null;if(u===0&&(a.operator!==">="||f.operator!=="<="))return null}for(const m of o){if(a&&!os(m,String(a),n)||f&&!os(m,String(f),n))return null;for(const N of t)if(!os(m,String(N),n))return!1;return!0}let g,d,h,_,y=f&&!n.includePrerelease&&f.semver.prerelease.length?f.semver:!1,E=a&&!n.includePrerelease&&a.semver.prerelease.length?a.semver:!1;y&&y.prerelease.length===1&&f.operator==="<"&&y.prerelease[0]===0&&(y=!1);for(const m of t){if(_=_||m.operator===">"||m.operator===">=",h=h||m.operator==="<"||m.operator==="<=",a){if(E&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===E.major&&m.semver.minor===E.minor&&m.semver.patch===E.patch&&(E=!1),m.operator===">"||m.operator===">="){if(g=H0(a,m,n),g===m&&g!==a)return!1}else if(a.operator===">="&&!os(a.semver,String(m),n))return!1}if(f){if(y&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===y.major&&m.semver.minor===y.minor&&m.semver.patch===y.patch&&(y=!1),m.operator==="<"||m.operator==="<="){if(d=W0(f,m,n),d===m&&d!==f)return!1}else if(f.operator==="<="&&!os(f.semver,String(m),n))return!1}if(!m.operator&&(f||a)&&u!==0)return!1}return!(a&&h&&!f&&u!==0||f&&_&&!a&&u!==0||E||y)},H0=(e,t,n)=>{if(!e)return t;const o=fd(e.semver,t.semver,n);return o>0?e:o<0||t.operator===">"&&e.operator===">="?t:e},W0=(e,t,n)=>{if(!e)return t;const o=fd(e.semver,t.semver,n);return o<0?e:o>0||t.operator==="<"&&e.operator==="<="?t:e};var uC=sC;const Fl=Os,z0=Lf,lC=Sn,q0=ib,cC=Co,dC=yO,hC=vO,gC=SO,_C=AO,pC=OO,bC=PO,yC=$O,wC=MO,mC=hr,vC=jO,EC=zO,SC=nd,RC=ZO,AC=XO,IC=Pf,TC=rd,OC=ob,LC=sb,CC=id,PC=od,NC=ab,BC=mL,$C=Nf(),xC=gr(),DC=Bf,MC=TL,kC=PL,FC=xL,UC=kL,jC=jL,HC=sd,WC=XL,zC=eC,qC=nC,GC=oC,VC=uC;var ZC={parse:cC,valid:dC,clean:hC,inc:gC,diff:_C,major:pC,minor:bC,patch:yC,prerelease:wC,compare:mC,rcompare:vC,compareLoose:EC,compareBuild:SC,sort:RC,rsort:AC,gt:IC,lt:TC,eq:OC,neq:LC,gte:CC,lte:PC,cmp:NC,coerce:BC,Comparator:$C,Range:xC,satisfies:DC,toComparators:MC,maxSatisfying:kC,minSatisfying:FC,minVersion:UC,validRange:jC,outside:HC,gtr:WC,ltr:zC,intersects:qC,simplifyRange:GC,subset:VC,SemVer:lC,re:Fl.re,src:Fl.src,tokens:Fl.t,SEMVER_SPEC_VERSION:z0.SEMVER_SPEC_VERSION,RELEASE_TYPES:z0.RELEASE_TYPES,compareIdentifiers:q0.compareIdentifiers,rcompareIdentifiers:q0.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=ZC,n=ji,o=sn;e.VersionStruct=(0,n.refine)((0,n.string)(),"Version",y=>(0,t.valid)(y)===null?`Expected SemVer version, got "${y}"`:!0),e.VersionRangeStruct=(0,n.refine)((0,n.string)(),"Version range",y=>(0,t.validRange)(y)===null?`Expected SemVer range, got "${y}"`:!0);function a(y){return(0,n.is)(y,e.VersionStruct)}e.isValidSemVerVersion=a;function f(y){return(0,n.is)(y,e.VersionRangeStruct)}e.isValidSemVerRange=f;function u(y){(0,o.assertStruct)(y,e.VersionStruct)}e.assertIsSemVerVersion=u;function g(y){(0,o.assertStruct)(y,e.VersionRangeStruct)}e.assertIsSemVerRange=g;function d(y,E){return(0,t.gt)(y,E)}e.gtVersion=d;function h(y,E){return(0,t.gtr)(y,E)}e.gtRange=h;function _(y,E){return(0,t.satisfies)(y,E,{includePrerelease:!0})}e.satisfiesVersionRange=_})(tb);(function(e){var t=Z.commonjsGlobal&&Z.commonjsGlobal.__createBinding||(Object.create?function(o,a,f,u){u===void 0&&(u=f);var g=Object.getOwnPropertyDescriptor(a,f);(!g||("get"in g?!a.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return a[f]}}),Object.defineProperty(o,u,g)}:function(o,a,f,u){u===void 0&&(u=f),o[u]=a[f]}),n=Z.commonjsGlobal&&Z.commonjsGlobal.__exportStar||function(o,a){for(var f in o)f!=="default"&&!Object.prototype.hasOwnProperty.call(a,f)&&t(a,o,f)};Object.defineProperty(e,"__esModule",{value:!0}),n(sn,e),n(Is,e),n(gt,e),n(Tf,e),n(Er,e),n(vo,e),n(Zp,e),n(Ts,e),n(Kp,e),n(Jp,e),n(Eo,e),n(Xp,e),n(Sr,e),n(Yp,e),n(Qp,e),n(eb,e),n(tb,e)})(Gc);var $f={},_i={};Object.defineProperty(_i,"__esModule",{value:!0});_i.errorValues=_i.errorCodes=void 0;_i.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}};_i.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=Gc,n=_i,o=n.errorCodes.rpc.internal,a="Unspecified error message. This is a bug, please report it.",f={code:o,message:u(o)};e.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.";function u(m,N=a){if(g(m)){const k=m.toString();if((0,t.hasProperty)(n.errorValues,k))return n.errorValues[k].message;if(_(m))return e.JSON_RPC_SERVER_ERROR_MESSAGE}return N}e.getMessageFromCode=u;function g(m){return Number.isInteger(m)}e.isValidCode=g;function d(m,{fallbackError:N=f,shouldIncludeStack:k=!0}={}){if(!(0,t.isJsonRpcError)(N))throw new Error("Must provide fallback error with integer number code and string message.");const U=h(m,N);return k||delete U.stack,U}e.serializeError=d;function h(m,N){if(m&&typeof m=="object"&&"serialize"in m&&typeof m.serialize=="function")return m.serialize();if((0,t.isJsonRpcError)(m))return m;const k=y(m);return{...N,data:{cause:k}}}function _(m){return m>=-32099&&m<=-32e3}function y(m){return Array.isArray(m)?m.map(N=>(0,t.isValidJson)(N)?N:(0,t.isObject)(N)?E(N):null):(0,t.isObject)(m)?E(m):(0,t.isValidJson)(m)?m:null}e.serializeCause=y;function E(m){return Object.getOwnPropertyNames(m).reduce((N,k)=>{const U=m[k];return(0,t.isValidJson)(U)&&(N[k]=U),N},{})}})($f);var KC=Z.commonjsGlobal&&Z.commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xi,"__esModule",{value:!0});xi.EthereumProviderError=xi.JsonRpcError=void 0;const JC=Gc,XC=KC(Nc),YC=$f;class ub extends Error{constructor(t,n,o){if(!Number.isInteger(t))throw new Error('"code" must be an integer.');if(!n||typeof n!="string")throw new Error('"message" must be a non-empty string.');super(n),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,JC.isPlainObject)(this.data)&&(t.data.cause=(0,YC.serializeCause)(this.data.cause))),this.stack&&(t.stack=this.stack),t}toString(){return(0,XC.default)(this.serialize(),tP,2)}}xi.JsonRpcError=ub;class QC extends ub{constructor(t,n,o){if(!eP(t))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(t,n,o)}}xi.EthereumProviderError=QC;function eP(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}function tP(e,t){if(t!=="[Circular]")return t}var So={};Object.defineProperty(So,"__esModule",{value:!0});So.providerErrors=So.rpcErrors=void 0;const ud=xi,gn=_i,lb=$f;So.rpcErrors={parse:e=>Jn(gn.errorCodes.rpc.parse,e),invalidRequest:e=>Jn(gn.errorCodes.rpc.invalidRequest,e),invalidParams:e=>Jn(gn.errorCodes.rpc.invalidParams,e),methodNotFound:e=>Jn(gn.errorCodes.rpc.methodNotFound,e),internal:e=>Jn(gn.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 Jn(t,e)},invalidInput:e=>Jn(gn.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>Jn(gn.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>Jn(gn.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>Jn(gn.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>Jn(gn.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>Jn(gn.errorCodes.rpc.limitExceeded,e)};So.providerErrors={userRejectedRequest:e=>ss(gn.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>ss(gn.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>ss(gn.errorCodes.provider.unsupportedMethod,e),disconnected:e=>ss(gn.errorCodes.provider.disconnected,e),chainDisconnected:e=>ss(gn.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:n,data:o}=e;if(!n||typeof n!="string")throw new Error('"message" must be a nonempty string');return new ud.EthereumProviderError(t,n,o)}};function Jn(e,t){const[n,o]=cb(t);return new ud.JsonRpcError(e,n??(0,lb.getMessageFromCode)(e),o)}function ss(e,t){const[n,o]=cb(t);return new ud.EthereumProviderError(e,n??(0,lb.getMessageFromCode)(e),o)}function cb(e){if(e){if(typeof e=="string")return[e];if(typeof e=="object"&&!Array.isArray(e)){const{message:t,data:n}=e;if(t&&typeof t!="string")throw new Error("Must specify string message.");return[t??void 0,n]}}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=xi;Object.defineProperty(e,"JsonRpcError",{enumerable:!0,get:function(){return t.JsonRpcError}}),Object.defineProperty(e,"EthereumProviderError",{enumerable:!0,get:function(){return t.EthereumProviderError}});var n=$f;Object.defineProperty(e,"serializeCause",{enumerable:!0,get:function(){return n.serializeCause}}),Object.defineProperty(e,"serializeError",{enumerable:!0,get:function(){return n.serializeError}}),Object.defineProperty(e,"getMessageFromCode",{enumerable:!0,get:function(){return n.getMessageFromCode}});var o=So;Object.defineProperty(e,"rpcErrors",{enumerable:!0,get:function(){return o.rpcErrors}}),Object.defineProperty(e,"providerErrors",{enumerable:!0,get:function(){return o.providerErrors}});var a=_i;Object.defineProperty(e,"errorCodes",{enumerable:!0,get:function(){return a.errorCodes}})})(BT);var ld={exports:{}},nP=db;function db(e,t){if(e&&t)return db(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(o){n[o]=e[o]}),n;function n(){for(var o=new Array(arguments.length),a=0;a<o.length;a++)o[a]=arguments[a];var f=e.apply(this,o),u=o[o.length-1];return typeof f=="function"&&f!==u&&Object.keys(u).forEach(function(g){f[g]=u[g]}),f}}var hb=nP;ld.exports=hb(Qa);ld.exports.strict=hb(gb);Qa.proto=Qa(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return Qa(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return gb(this)},configurable:!0})});function Qa(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function gb(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}var cd=ld.exports;const rP=Z.getDefaultExportFromCjs(cd);var iP=cd,oP=function(){},sP=function(e){return e.setHeader&&typeof e.abort=="function"},aP=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3},_b=function(e,t,n){if(typeof t=="function")return _b(e,null,t);t||(t={}),n=iP(n||oP);var o=e._writableState,a=e._readableState,f=t.readable||t.readable!==!1&&e.readable,u=t.writable||t.writable!==!1&&e.writable,g=!1,d=function(){e.writable||h()},h=function(){u=!1,f||n.call(e)},_=function(){f=!1,u||n.call(e)},y=function(U){n.call(e,U?new Error("exited with error code: "+U):null)},E=function(U){n.call(e,U)},m=function(){Z.dist.process.nextTick(N)},N=function(){if(!g){if(f&&!(a&&a.ended&&!a.destroyed))return n.call(e,new Error("premature close"));if(u&&!(o&&o.ended&&!o.destroyed))return n.call(e,new Error("premature close"))}},k=function(){e.req.on("finish",h)};return sP(e)?(e.on("complete",h),e.on("abort",m),e.req?k():e.on("request",k)):u&&!o&&(e.on("end",d),e.on("close",d)),aP(e)&&e.on("exit",y),e.on("end",_),e.on("finish",h),t.error!==!1&&e.on("error",E),e.on("close",m),function(){g=!0,e.removeListener("complete",h),e.removeListener("abort",m),e.removeListener("request",k),e.req&&e.req.removeListener("finish",h),e.removeListener("end",d),e.removeListener("close",d),e.removeListener("finish",h),e.removeListener("exit",y),e.removeListener("end",_),e.removeListener("error",E),e.removeListener("close",m)}},pb=_b;const G0=Z.getDefaultExportFromCjs(pb);var fP=cd,uP=pb,ef;try{ef=Z.require$$2}catch{}var ws=function(){},lP=/^v?\.0/.test(Z.dist.process.version),xf=function(e){return typeof e=="function"},cP=function(e){return!lP||!ef?!1:(e instanceof(ef.ReadStream||ws)||e instanceof(ef.WriteStream||ws))&&xf(e.close)},dP=function(e){return e.setHeader&&xf(e.abort)},hP=function(e,t,n,o){o=fP(o);var a=!1;e.on("close",function(){a=!0}),uP(e,{readable:t,writable:n},function(u){if(u)return o(u);a=!0,o()});var f=!1;return function(u){if(!a&&!f){if(f=!0,cP(e))return e.close(ws);if(dP(e))return e.abort();if(xf(e.destroy))return e.destroy();o(u||new Error("stream was destroyed"))}}},V0=function(e){e()},gP=function(e,t){return e.pipe(t)},_P=function(){var e=Array.prototype.slice.call(arguments),t=xf(e[e.length-1]||ws)&&e.pop()||ws;if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new Error("pump requires two streams per minimum");var n,o=e.map(function(a,f){var u=f<e.length-1,g=f>0;return hP(a,u,g,function(d){n||(n=d),d&&o.forEach(V0),!u&&(o.forEach(V0),t(n))})});return e.reduce(gP)},pP=_P;const Z0=Z.getDefaultExportFromCjs(pP);var bP={},Df={},Mf={},bb={},Ro={},di={},Zt={};Object.defineProperty(Zt,"__esModule",{value:!0});Zt.output=Zt.exists=Zt.hash=Zt.bytes=Zt.bool=Zt.number=Zt.isBytes=void 0;function af(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}Zt.number=af;function yb(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}Zt.bool=yb;function wb(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}Zt.isBytes=wb;function dd(e,...t){if(!wb(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}`)}Zt.bytes=dd;function mb(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");af(e.outputLen),af(e.blockLen)}Zt.hash=mb;function vb(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")}Zt.exists=vb;function Eb(e,t){dd(e);const n=t.outputLen;if(e.length<n)throw new Error(`digestInto() expects output buffer of length at least ${n}`)}Zt.output=Eb;const yP={number:af,bool:yb,bytes:dd,hash:mb,exists:vb,output:Eb};Zt.default=yP;var Zr={},kf={};Object.defineProperty(kf,"__esModule",{value:!0});kf.crypto=void 0;kf.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=kf,n=Zt;function o(p){return p instanceof Uint8Array||p!=null&&typeof p=="object"&&p.constructor.name==="Uint8Array"}e.isBytes=o;const a=p=>new Uint8Array(p.buffer,p.byteOffset,p.byteLength);e.u8=a;const f=p=>new Uint32Array(p.buffer,p.byteOffset,Math.floor(p.byteLength/4));e.u32=f;const u=p=>new DataView(p.buffer,p.byteOffset,p.byteLength);e.createView=u;const g=(p,v)=>p<<32-v|p>>>v;e.rotr=g;const d=(p,v)=>p<<v|p>>>32-v>>>0;e.rotl=d,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;const h=p=>p<<24&4278190080|p<<8&16711680|p>>>8&65280|p>>>24&255;e.byteSwap=h,e.byteSwapIfBE=e.isLE?p=>p:p=>(0,e.byteSwap)(p);function _(p){for(let v=0;v<p.length;v++)p[v]=(0,e.byteSwap)(p[v])}e.byteSwap32=_;const y=Array.from({length:256},(p,v)=>v.toString(16).padStart(2,"0"));function E(p){(0,n.bytes)(p);let v="";for(let A=0;A<p.length;A++)v+=y[p[A]];return v}e.bytesToHex=E;const m={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function N(p){if(p>=m._0&&p<=m._9)return p-m._0;if(p>=m._A&&p<=m._F)return p-(m._A-10);if(p>=m._a&&p<=m._f)return p-(m._a-10)}function k(p){if(typeof p!="string")throw new Error("hex string expected, got "+typeof p);const v=p.length,A=v/2;if(v%2)throw new Error("padded hex string expected, got unpadded hex of length "+v);const B=new Uint8Array(A);for(let W=0,D=0;W<A;W++,D+=2){const X=N(p.charCodeAt(D)),M=N(p.charCodeAt(D+1));if(X===void 0||M===void 0){const q=p[D]+p[D+1];throw new Error('hex string expected, got non-hex character "'+q+'" at index '+D)}B[W]=X*16+M}return B}e.hexToBytes=k;const U=async()=>{};e.nextTick=U;async function G(p,v,A){let B=Date.now();for(let W=0;W<p;W++){A(W);const D=Date.now()-B;D>=0&&D<v||(await(0,e.nextTick)(),B+=D)}}e.asyncLoop=G;function H(p){if(typeof p!="string")throw new Error(`utf8ToBytes expected string, got ${typeof p}`);return new Uint8Array(new TextEncoder().encode(p))}e.utf8ToBytes=H;function P(p){return typeof p=="string"&&(p=H(p)),(0,n.bytes)(p),p}e.toBytes=P;function C(...p){let v=0;for(let B=0;B<p.length;B++){const W=p[B];(0,n.bytes)(W),v+=W.length}const A=new Uint8Array(v);for(let B=0,W=0;B<p.length;B++){const D=p[B];A.set(D,W),W+=D.length}return A}e.concatBytes=C;class J{clone(){return this._cloneInto()}}e.Hash=J;const ae={}.toString;function ie(p,v){if(v!==void 0&&ae.call(v)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(p,v)}e.checkOpts=ie;function _e(p){const v=B=>p().update(P(B)).digest(),A=p();return v.outputLen=A.outputLen,v.blockLen=A.blockLen,v.create=()=>p(),v}e.wrapConstructor=_e;function ce(p){const v=(B,W)=>p(W).update(P(B)).digest(),A=p({});return v.outputLen=A.outputLen,v.blockLen=A.blockLen,v.create=B=>p(B),v}e.wrapConstructorWithOpts=ce;function Ie(p){const v=(B,W)=>p(W).update(P(B)).digest(),A=p({});return v.outputLen=A.outputLen,v.blockLen=A.blockLen,v.create=B=>p(B),v}e.wrapXOFConstructorWithOpts=Ie;function we(p=32){if(t.crypto&&typeof t.crypto.getRandomValues=="function")return t.crypto.getRandomValues(new Uint8Array(p));throw new Error("crypto.getRandomValues must be defined")}e.randomBytes=we})(Zr);Object.defineProperty(di,"__esModule",{value:!0});di.HashMD=di.Maj=di.Chi=void 0;const Ul=Zt,as=Zr;function wP(e,t,n,o){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,n,o);const a=BigInt(32),f=BigInt(4294967295),u=Number(n>>a&f),g=Number(n&f),d=o?4:0,h=o?0:4;e.setUint32(t+d,u,o),e.setUint32(t+h,g,o)}const mP=(e,t,n)=>e&t^~e&n;di.Chi=mP;const vP=(e,t,n)=>e&t^e&n^t&n;di.Maj=vP;class EP extends as.Hash{constructor(t,n,o,a){super(),this.blockLen=t,this.outputLen=n,this.padOffset=o,this.isLE=a,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,as.createView)(this.buffer)}update(t){(0,Ul.exists)(this);const{view:n,buffer:o,blockLen:a}=this;t=(0,as.toBytes)(t);const f=t.length;for(let u=0;u<f;){const g=Math.min(a-this.pos,f-u);if(g===a){const d=(0,as.createView)(t);for(;a<=f-u;u+=a)this.process(d,u);continue}o.set(t.subarray(u,u+g),this.pos),this.pos+=g,u+=g,this.pos===a&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){(0,Ul.exists)(this),(0,Ul.output)(t,this),this.finished=!0;const{buffer:n,view:o,blockLen:a,isLE:f}=this;let{pos:u}=this;n[u++]=128,this.buffer.subarray(u).fill(0),this.padOffset>a-u&&(this.process(o,0),u=0);for(let y=u;y<a;y++)n[y]=0;wP(o,a-8,BigInt(this.length*8),f),this.process(o,0);const g=(0,as.createView)(t),d=this.outputLen;if(d%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const h=d/4,_=this.get();if(h>_.length)throw new Error("_sha2: outputLen bigger than state");for(let y=0;y<h;y++)g.setUint32(4*y,_[y],f)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const o=t.slice(0,n);return this.destroy(),o}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:n,buffer:o,length:a,finished:f,destroyed:u,pos:g}=this;return t.length=a,t.pos=g,t.finished=f,t.destroyed=u,a%n&&t.buffer.set(o),t}}di.HashMD=EP;Object.defineProperty(Ro,"__esModule",{value:!0});Ro.sha224=Ro.sha256=void 0;const jl=di,Yn=Zr,SP=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]),ai=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),fi=new Uint32Array(64);class Sb extends jl.HashMD{constructor(){super(64,32,8,!1),this.A=ai[0]|0,this.B=ai[1]|0,this.C=ai[2]|0,this.D=ai[3]|0,this.E=ai[4]|0,this.F=ai[5]|0,this.G=ai[6]|0,this.H=ai[7]|0}get(){const{A:t,B:n,C:o,D:a,E:f,F:u,G:g,H:d}=this;return[t,n,o,a,f,u,g,d]}set(t,n,o,a,f,u,g,d){this.A=t|0,this.B=n|0,this.C=o|0,this.D=a|0,this.E=f|0,this.F=u|0,this.G=g|0,this.H=d|0}process(t,n){for(let y=0;y<16;y++,n+=4)fi[y]=t.getUint32(n,!1);for(let y=16;y<64;y++){const E=fi[y-15],m=fi[y-2],N=(0,Yn.rotr)(E,7)^(0,Yn.rotr)(E,18)^E>>>3,k=(0,Yn.rotr)(m,17)^(0,Yn.rotr)(m,19)^m>>>10;fi[y]=k+fi[y-7]+N+fi[y-16]|0}let{A:o,B:a,C:f,D:u,E:g,F:d,G:h,H:_}=this;for(let y=0;y<64;y++){const E=(0,Yn.rotr)(g,6)^(0,Yn.rotr)(g,11)^(0,Yn.rotr)(g,25),m=_+E+(0,jl.Chi)(g,d,h)+SP[y]+fi[y]|0,k=((0,Yn.rotr)(o,2)^(0,Yn.rotr)(o,13)^(0,Yn.rotr)(o,22))+(0,jl.Maj)(o,a,f)|0;_=h,h=d,d=g,g=u+m|0,u=f,f=a,a=o,o=m+k|0}o=o+this.A|0,a=a+this.B|0,f=f+this.C|0,u=u+this.D|0,g=g+this.E|0,d=d+this.F|0,h=h+this.G|0,_=_+this.H|0,this.set(o,a,f,u,g,d,h,_)}roundClean(){fi.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class RP extends Sb{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}}Ro.sha256=(0,Yn.wrapConstructor)(()=>new Sb);Ro.sha224=(0,Yn.wrapConstructor)(()=>new RP);var Ff={},Rb={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=e.HMAC=void 0;const t=Zt,n=Zr;class o extends n.Hash{constructor(u,g){super(),this.finished=!1,this.destroyed=!1,(0,t.hash)(u);const d=(0,n.toBytes)(g);if(this.iHash=u.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 h=this.blockLen,_=new Uint8Array(h);_.set(d.length>h?u.create().update(d).digest():d);for(let y=0;y<_.length;y++)_[y]^=54;this.iHash.update(_),this.oHash=u.create();for(let y=0;y<_.length;y++)_[y]^=106;this.oHash.update(_),_.fill(0)}update(u){return(0,t.exists)(this),this.iHash.update(u),this}digestInto(u){(0,t.exists)(this),(0,t.bytes)(u,this.outputLen),this.finished=!0,this.iHash.digestInto(u),this.oHash.update(u),this.oHash.digestInto(u),this.destroy()}digest(){const u=new Uint8Array(this.oHash.outputLen);return this.digestInto(u),u}_cloneInto(u){u||(u=Object.create(Object.getPrototypeOf(this),{}));const{oHash:g,iHash:d,finished:h,destroyed:_,blockLen:y,outputLen:E}=this;return u=u,u.finished=h,u.destroyed=_,u.blockLen=y,u.outputLen=E,u.oHash=g._cloneInto(u.oHash),u.iHash=d._cloneInto(u.iHash),u}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}e.HMAC=o;const a=(f,u,g)=>new o(f,u).update(g).digest();e.hmac=a,e.hmac.create=(f,u)=>new o(f,u)})(Rb);var hd={},Uf={},Bt={},Et={};Object.defineProperty(Et,"__esModule",{value:!0});Et.bitMask=void 0;Et.isBytes=Hf;Et.abytes=Wf;Et.bytesToHex=gd;Et.numberToHexUnpadded=Ib;Et.hexToNumber=_d;Et.hexToBytes=zf;Et.bytesToNumberBE=TP;Et.bytesToNumberLE=OP;Et.numberToBytesBE=Tb;Et.numberToBytesLE=LP;Et.numberToVarBytesBE=CP;Et.ensureBytes=PP;Et.concatBytes=Ob;Et.equalBytes=NP;Et.utf8ToBytes=BP;Et.bitLen=$P;Et.bitGet=xP;Et.bitSet=DP;Et.createHmacDrbg=kP;Et.validateObject=UP;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ab=BigInt(0),jf=BigInt(1),AP=BigInt(2);function Hf(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Wf(e){if(!Hf(e))throw new Error("Uint8Array expected")}const IP=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function gd(e){Wf(e);let t="";for(let n=0;n<e.length;n++)t+=IP[e[n]];return t}function Ib(e){const t=e.toString(16);return t.length&1?`0${t}`:t}function _d(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return BigInt(e===""?"0":`0x${e}`)}const Hr={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function K0(e){if(e>=Hr._0&&e<=Hr._9)return e-Hr._0;if(e>=Hr._A&&e<=Hr._F)return e-(Hr._A-10);if(e>=Hr._a&&e<=Hr._f)return e-(Hr._a-10)}function zf(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);const t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const o=new Uint8Array(n);for(let a=0,f=0;a<n;a++,f+=2){const u=K0(e.charCodeAt(f)),g=K0(e.charCodeAt(f+1));if(u===void 0||g===void 0){const d=e[f]+e[f+1];throw new Error('hex string expected, got non-hex character "'+d+'" at index '+f)}o[a]=u*16+g}return o}function TP(e){return _d(gd(e))}function OP(e){return Wf(e),_d(gd(Uint8Array.from(e).reverse()))}function Tb(e,t){return zf(e.toString(16).padStart(t*2,"0"))}function LP(e,t){return Tb(e,t).reverse()}function CP(e){return zf(Ib(e))}function PP(e,t,n){let o;if(typeof t=="string")try{o=zf(t)}catch(f){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${f}`)}else if(Hf(t))o=Uint8Array.from(t);else throw new Error(`${e} must be hex string or Uint8Array`);const a=o.length;if(typeof n=="number"&&a!==n)throw new Error(`${e} expected ${n} bytes, got ${a}`);return o}function Ob(...e){let t=0;for(let o=0;o<e.length;o++){const a=e[o];Wf(a),t+=a.length}const n=new Uint8Array(t);for(let o=0,a=0;o<e.length;o++){const f=e[o];n.set(f,a),a+=f.length}return n}function NP(e,t){if(e.length!==t.length)return!1;let n=0;for(let o=0;o<e.length;o++)n|=e[o]^t[o];return n===0}function BP(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function $P(e){let t;for(t=0;e>Ab;e>>=jf,t+=1);return t}function xP(e,t){return e>>BigInt(t)&jf}function DP(e,t,n){return e|(n?jf:Ab)<<BigInt(t)}const MP=e=>(AP<<BigInt(e-1))-jf;Et.bitMask=MP;const Hl=e=>new Uint8Array(e),J0=e=>Uint8Array.from(e);function kP(e,t,n){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 n!="function")throw new Error("hmacFn must be a function");let o=Hl(e),a=Hl(e),f=0;const u=()=>{o.fill(1),a.fill(0),f=0},g=(...y)=>n(a,o,...y),d=(y=Hl())=>{a=g(J0([0]),y),o=g(),y.length!==0&&(a=g(J0([1]),y),o=g())},h=()=>{if(f++>=1e3)throw new Error("drbg: tried 1000 values");let y=0;const E=[];for(;y<t;){o=g();const m=o.slice();E.push(m),y+=o.length}return Ob(...E)};return(y,E)=>{u(),d(y);let m;for(;!(m=E(h()));)d();return u(),m}}const FP={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"||Hf(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 UP(e,t,n={}){const o=(a,f,u)=>{const g=FP[f];if(typeof g!="function")throw new Error(`Invalid validator "${f}", expected function`);const d=e[a];if(!(u&&d===void 0)&&!g(d,e))throw new Error(`Invalid param ${String(a)}=${d} (${typeof d}), expected ${f}`)};for(const[a,f]of Object.entries(t))o(a,f,!1);for(const[a,f]of Object.entries(n))o(a,f,!0);return e}Object.defineProperty(Bt,"__esModule",{value:!0});Bt.isNegativeLE=void 0;Bt.mod=kn;Bt.pow=Lb;Bt.pow2=HP;Bt.invert=ff;Bt.tonelliShanks=Cb;Bt.FpSqrt=Pb;Bt.validateField=qP;Bt.FpPow=Nb;Bt.FpInvertBatch=Bb;Bt.FpDiv=GP;Bt.FpIsSquare=VP;Bt.nLength=pd;Bt.Field=ZP;Bt.FpSqrtOdd=KP;Bt.FpSqrtEven=JP;Bt.hashToPrivateScalar=XP;Bt.getFieldBytesLength=bd;Bt.getMinHashLength=$b;Bt.mapHashToField=YP;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Fn=Et,rn=BigInt(0),Nt=BigInt(1),ci=BigInt(2),jP=BigInt(3),Ec=BigInt(4),X0=BigInt(5),Y0=BigInt(8);BigInt(9);BigInt(16);function kn(e,t){const n=e%t;return n>=rn?n:t+n}function Lb(e,t,n){if(n<=rn||t<rn)throw new Error("Expected power/modulo > 0");if(n===Nt)return rn;let o=Nt;for(;t>rn;)t&Nt&&(o=o*e%n),e=e*e%n,t>>=Nt;return o}function HP(e,t,n){let o=e;for(;t-- >rn;)o*=o,o%=n;return o}function ff(e,t){if(e===rn||t<=rn)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=kn(e,t),o=t,a=rn,f=Nt;for(;n!==rn;){const g=o/n,d=o%n,h=a-f*g;o=n,n=d,a=f,f=h}if(o!==Nt)throw new Error("invert: does not exist");return kn(a,t)}function Cb(e){const t=(e-Nt)/ci;let n,o,a;for(n=e-Nt,o=0;n%ci===rn;n/=ci,o++);for(a=ci;a<e&&Lb(a,t,e)!==e-Nt;a++);if(o===1){const u=(e+Nt)/Ec;return function(d,h){const _=d.pow(h,u);if(!d.eql(d.sqr(_),h))throw new Error("Cannot find square root");return _}}const f=(n+Nt)/ci;return function(g,d){if(g.pow(d,t)===g.neg(g.ONE))throw new Error("Cannot find square root");let h=o,_=g.pow(g.mul(g.ONE,a),n),y=g.pow(d,f),E=g.pow(d,n);for(;!g.eql(E,g.ONE);){if(g.eql(E,g.ZERO))return g.ZERO;let m=1;for(let k=g.sqr(E);m<h&&!g.eql(k,g.ONE);m++)k=g.sqr(k);const N=g.pow(_,Nt<<BigInt(h-m-1));_=g.sqr(N),y=g.mul(y,N),E=g.mul(E,_),h=m}return y}}function Pb(e){if(e%Ec===jP){const t=(e+Nt)/Ec;return function(o,a){const f=o.pow(a,t);if(!o.eql(o.sqr(f),a))throw new Error("Cannot find square root");return f}}if(e%Y0===X0){const t=(e-X0)/Y0;return function(o,a){const f=o.mul(a,ci),u=o.pow(f,t),g=o.mul(a,u),d=o.mul(o.mul(g,ci),u),h=o.mul(g,o.sub(d,o.ONE));if(!o.eql(o.sqr(h),a))throw new Error("Cannot find square root");return h}}return Cb(e)}const WP=(e,t)=>(kn(e,t)&Nt)===Nt;Bt.isNegativeLE=WP;const zP=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function qP(e){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=zP.reduce((o,a)=>(o[a]="function",o),t);return(0,Fn.validateObject)(e,n)}function Nb(e,t,n){if(n<rn)throw new Error("Expected power > 0");if(n===rn)return e.ONE;if(n===Nt)return t;let o=e.ONE,a=t;for(;n>rn;)n&Nt&&(o=e.mul(o,a)),a=e.sqr(a),n>>=Nt;return o}function Bb(e,t){const n=new Array(t.length),o=t.reduce((f,u,g)=>e.is0(u)?f:(n[g]=f,e.mul(f,u)),e.ONE),a=e.inv(o);return t.reduceRight((f,u,g)=>e.is0(u)?f:(n[g]=e.mul(f,n[g]),e.mul(f,u)),a),n}function GP(e,t,n){return e.mul(t,typeof n=="bigint"?ff(n,e.ORDER):e.inv(n))}function VP(e){const t=(e.ORDER-Nt)/ci;return n=>{const o=e.pow(n,t);return e.eql(o,e.ZERO)||e.eql(o,e.ONE)}}function pd(e,t){const n=t!==void 0?t:e.toString(2).length,o=Math.ceil(n/8);return{nBitLength:n,nByteLength:o}}function ZP(e,t,n=!1,o={}){if(e<=rn)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:f}=pd(e,t);if(f>2048)throw new Error("Field lengths over 2048 bytes are not supported");const u=Pb(e),g=Object.freeze({ORDER:e,BITS:a,BYTES:f,MASK:(0,Fn.bitMask)(a),ZERO:rn,ONE:Nt,create:d=>kn(d,e),isValid:d=>{if(typeof d!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof d}`);return rn<=d&&d<e},is0:d=>d===rn,isOdd:d=>(d&Nt)===Nt,neg:d=>kn(-d,e),eql:(d,h)=>d===h,sqr:d=>kn(d*d,e),add:(d,h)=>kn(d+h,e),sub:(d,h)=>kn(d-h,e),mul:(d,h)=>kn(d*h,e),pow:(d,h)=>Nb(g,d,h),div:(d,h)=>kn(d*ff(h,e),e),sqrN:d=>d*d,addN:(d,h)=>d+h,subN:(d,h)=>d-h,mulN:(d,h)=>d*h,inv:d=>ff(d,e),sqrt:o.sqrt||(d=>u(g,d)),invertBatch:d=>Bb(g,d),cmov:(d,h,_)=>_?h:d,toBytes:d=>n?(0,Fn.numberToBytesLE)(d,f):(0,Fn.numberToBytesBE)(d,f),fromBytes:d=>{if(d.length!==f)throw new Error(`Fp.fromBytes: expected ${f}, got ${d.length}`);return n?(0,Fn.bytesToNumberLE)(d):(0,Fn.bytesToNumberBE)(d)}});return Object.freeze(g)}function KP(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?n:e.neg(n)}function JP(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const n=e.sqrt(t);return e.isOdd(n)?e.neg(n):n}function XP(e,t,n=!1){e=(0,Fn.ensureBytes)("privateHash",e);const o=e.length,a=pd(t).nByteLength+8;if(a<24||o<a||o>1024)throw new Error(`hashToPrivateScalar: expected ${a}-1024 bytes of input, got ${o}`);const f=n?(0,Fn.bytesToNumberLE)(e):(0,Fn.bytesToNumberBE)(e);return kn(f,t-Nt)+Nt}function bd(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 $b(e){const t=bd(e);return t+Math.ceil(t/2)}function YP(e,t,n=!1){const o=e.length,a=bd(t),f=$b(t);if(o<16||o<f||o>1024)throw new Error(`expected ${f}-1024 bytes of input, got ${o}`);const u=n?(0,Fn.bytesToNumberBE)(e):(0,Fn.bytesToNumberLE)(e),g=kn(u,t-Nt)+Nt;return n?(0,Fn.numberToBytesLE)(g,a):(0,Fn.numberToBytesBE)(g,a)}Object.defineProperty(Uf,"__esModule",{value:!0});Uf.wNAF=tN;Uf.validateBasic=nN;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Q0=Bt,QP=Et,eN=BigInt(0),Wl=BigInt(1);function tN(e,t){const n=(a,f)=>{const u=f.negate();return a?u:f},o=a=>{const f=Math.ceil(t/a)+1,u=2**(a-1);return{windows:f,windowSize:u}};return{constTimeNegate:n,unsafeLadder(a,f){let u=e.ZERO,g=a;for(;f>eN;)f&Wl&&(u=u.add(g)),g=g.double(),f>>=Wl;return u},precomputeWindow(a,f){const{windows:u,windowSize:g}=o(f),d=[];let h=a,_=h;for(let y=0;y<u;y++){_=h,d.push(_);for(let E=1;E<g;E++)_=_.add(h),d.push(_);h=_.double()}return d},wNAF(a,f,u){const{windows:g,windowSize:d}=o(a);let h=e.ZERO,_=e.BASE;const y=BigInt(2**a-1),E=2**a,m=BigInt(a);for(let N=0;N<g;N++){const k=N*d;let U=Number(u&y);u>>=m,U>d&&(U-=E,u+=Wl);const G=k,H=k+Math.abs(U)-1,P=N%2!==0,C=U<0;U===0?_=_.add(n(P,f[G])):h=h.add(n(C,f[H]))}return{p:h,f:_}},wNAFCached(a,f,u,g){const d=a._WINDOW_SIZE||1;let h=f.get(a);return h||(h=this.precomputeWindow(a,d),d!==1&&f.set(a,g(h))),this.wNAF(d,h,u)}}}function nN(e){return(0,Q0.validateField)(e.Fp),(0,QP.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,Q0.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DER=void 0,e.weierstrassPoints=m,e.weierstrass=k,e.SWUFpSqrtRatio=U,e.mapToCurveSimpleSWU=G;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const t=Uf,n=Bt,o=Et,a=Et;function f(H){const P=(0,t.validateBasic)(H);o.validateObject(P,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:C,Fp:J,a:ae}=P;if(C){if(!J.eql(ae,J.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof C!="object"||typeof C.beta!="bigint"||typeof C.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...P})}const{bytesToNumberBE:u,hexToBytes:g}=o;e.DER={Err:class extends Error{constructor(P=""){super(P)}},_parseInt(H){const{Err:P}=e.DER;if(H.length<2||H[0]!==2)throw new P("Invalid signature integer tag");const C=H[1],J=H.subarray(2,C+2);if(!C||J.length!==C)throw new P("Invalid signature integer: wrong length");if(J[0]&128)throw new P("Invalid signature integer: negative");if(J[0]===0&&!(J[1]&128))throw new P("Invalid signature integer: unnecessary leading zero");return{d:u(J),l:H.subarray(C+2)}},toSig(H){const{Err:P}=e.DER,C=typeof H=="string"?g(H):H;o.abytes(C);let J=C.length;if(J<2||C[0]!=48)throw new P("Invalid signature tag");if(C[1]!==J-2)throw new P("Invalid signature: incorrect length");const{d:ae,l:ie}=e.DER._parseInt(C.subarray(2)),{d:_e,l:ce}=e.DER._parseInt(ie);if(ce.length)throw new P("Invalid signature: left bytes after parsing");return{r:ae,s:_e}},hexFromSig(H){const P=we=>Number.parseInt(we[0],16)&8?"00"+we:we,C=we=>{const p=we.toString(16);return p.length&1?`0${p}`:p},J=P(C(H.s)),ae=P(C(H.r)),ie=J.length/2,_e=ae.length/2,ce=C(ie),Ie=C(_e);return`30${C(_e+ie+4)}02${Ie}${ae}02${ce}${J}`}};const d=BigInt(0),h=BigInt(1),_=BigInt(2),y=BigInt(3),E=BigInt(4);function m(H){const P=f(H),{Fp:C}=P,J=P.toBytes||((W,D,X)=>{const M=D.toAffine();return o.concatBytes(Uint8Array.from([4]),C.toBytes(M.x),C.toBytes(M.y))}),ae=P.fromBytes||(W=>{const D=W.subarray(1),X=C.fromBytes(D.subarray(0,C.BYTES)),M=C.fromBytes(D.subarray(C.BYTES,2*C.BYTES));return{x:X,y:M}});function ie(W){const{a:D,b:X}=P,M=C.sqr(W),q=C.mul(M,W);return C.add(C.add(q,C.mul(W,D)),X)}if(!C.eql(C.sqr(P.Gy),ie(P.Gx)))throw new Error("bad generator point: equation left != right");function _e(W){return typeof W=="bigint"&&d<W&&W<P.n}function ce(W){if(!_e(W))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function Ie(W){const{allowedPrivateKeyLengths:D,nByteLength:X,wrapPrivateKey:M,n:q}=P;if(D&&typeof W!="bigint"){if(o.isBytes(W)&&(W=o.bytesToHex(W)),typeof W!="string"||!D.includes(W.length))throw new Error("Invalid key");W=W.padStart(X*2,"0")}let ne;try{ne=typeof W=="bigint"?W:o.bytesToNumberBE((0,a.ensureBytes)("private key",W,X))}catch{throw new Error(`private key must be ${X} bytes, hex or bigint, not ${typeof W}`)}return M&&(ne=n.mod(ne,q)),ce(ne),ne}const we=new Map;function p(W){if(!(W instanceof v))throw new Error("ProjectivePoint expected")}class v{constructor(D,X,M){if(this.px=D,this.py=X,this.pz=M,D==null||!C.isValid(D))throw new Error("x required");if(X==null||!C.isValid(X))throw new Error("y required");if(M==null||!C.isValid(M))throw new Error("z required")}static fromAffine(D){const{x:X,y:M}=D||{};if(!D||!C.isValid(X)||!C.isValid(M))throw new Error("invalid affine point");if(D instanceof v)throw new Error("projective point not allowed");const q=ne=>C.eql(ne,C.ZERO);return q(X)&&q(M)?v.ZERO:new v(X,M,C.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(D){const X=C.invertBatch(D.map(M=>M.pz));return D.map((M,q)=>M.toAffine(X[q])).map(v.fromAffine)}static fromHex(D){const X=v.fromAffine(ae((0,a.ensureBytes)("pointHex",D)));return X.assertValidity(),X}static fromPrivateKey(D){return v.BASE.multiply(Ie(D))}_setWindowSize(D){this._WINDOW_SIZE=D,we.delete(this)}assertValidity(){if(this.is0()){if(P.allowInfinityPoint&&!C.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:D,y:X}=this.toAffine();if(!C.isValid(D)||!C.isValid(X))throw new Error("bad point: x or y not FE");const M=C.sqr(X),q=ie(D);if(!C.eql(M,q))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:D}=this.toAffine();if(C.isOdd)return!C.isOdd(D);throw new Error("Field doesn't support isOdd")}equals(D){p(D);const{px:X,py:M,pz:q}=this,{px:ne,py:he,pz:ee}=D,me=C.eql(C.mul(X,ee),C.mul(ne,q)),pe=C.eql(C.mul(M,ee),C.mul(he,q));return me&&pe}negate(){return new v(this.px,C.neg(this.py),this.pz)}double(){const{a:D,b:X}=P,M=C.mul(X,y),{px:q,py:ne,pz:he}=this;let ee=C.ZERO,me=C.ZERO,pe=C.ZERO,Re=C.mul(q,q),Fe=C.mul(ne,ne),Pe=C.mul(he,he),$e=C.mul(q,ne);return $e=C.add($e,$e),pe=C.mul(q,he),pe=C.add(pe,pe),ee=C.mul(D,pe),me=C.mul(M,Pe),me=C.add(ee,me),ee=C.sub(Fe,me),me=C.add(Fe,me),me=C.mul(ee,me),ee=C.mul($e,ee),pe=C.mul(M,pe),Pe=C.mul(D,Pe),$e=C.sub(Re,Pe),$e=C.mul(D,$e),$e=C.add($e,pe),pe=C.add(Re,Re),Re=C.add(pe,Re),Re=C.add(Re,Pe),Re=C.mul(Re,$e),me=C.add(me,Re),Pe=C.mul(ne,he),Pe=C.add(Pe,Pe),Re=C.mul(Pe,$e),ee=C.sub(ee,Re),pe=C.mul(Pe,Fe),pe=C.add(pe,pe),pe=C.add(pe,pe),new v(ee,me,pe)}add(D){p(D);const{px:X,py:M,pz:q}=this,{px:ne,py:he,pz:ee}=D;let me=C.ZERO,pe=C.ZERO,Re=C.ZERO;const Fe=P.a,Pe=C.mul(P.b,y);let $e=C.mul(X,ne),Qe=C.mul(M,he),Ke=C.mul(q,ee),We=C.add(X,M),x=C.add(ne,he);We=C.mul(We,x),x=C.add($e,Qe),We=C.sub(We,x),x=C.add(X,q);let j=C.add(ne,ee);return x=C.mul(x,j),j=C.add($e,Ke),x=C.sub(x,j),j=C.add(M,q),me=C.add(he,ee),j=C.mul(j,me),me=C.add(Qe,Ke),j=C.sub(j,me),Re=C.mul(Fe,x),me=C.mul(Pe,Ke),Re=C.add(me,Re),me=C.sub(Qe,Re),Re=C.add(Qe,Re),pe=C.mul(me,Re),Qe=C.add($e,$e),Qe=C.add(Qe,$e),Ke=C.mul(Fe,Ke),x=C.mul(Pe,x),Qe=C.add(Qe,Ke),Ke=C.sub($e,Ke),Ke=C.mul(Fe,Ke),x=C.add(x,Ke),$e=C.mul(Qe,x),pe=C.add(pe,$e),$e=C.mul(j,x),me=C.mul(We,me),me=C.sub(me,$e),$e=C.mul(We,Qe),Re=C.mul(j,Re),Re=C.add(Re,$e),new v(me,pe,Re)}subtract(D){return this.add(D.negate())}is0(){return this.equals(v.ZERO)}wNAF(D){return B.wNAFCached(this,we,D,X=>{const M=C.invertBatch(X.map(q=>q.pz));return X.map((q,ne)=>q.toAffine(M[ne])).map(v.fromAffine)})}multiplyUnsafe(D){const X=v.ZERO;if(D===d)return X;if(ce(D),D===h)return this;const{endo:M}=P;if(!M)return B.unsafeLadder(this,D);let{k1neg:q,k1:ne,k2neg:he,k2:ee}=M.splitScalar(D),me=X,pe=X,Re=this;for(;ne>d||ee>d;)ne&h&&(me=me.add(Re)),ee&h&&(pe=pe.add(Re)),Re=Re.double(),ne>>=h,ee>>=h;return q&&(me=me.negate()),he&&(pe=pe.negate()),pe=new v(C.mul(pe.px,M.beta),pe.py,pe.pz),me.add(pe)}multiply(D){ce(D);let X=D,M,q;const{endo:ne}=P;if(ne){const{k1neg:he,k1:ee,k2neg:me,k2:pe}=ne.splitScalar(X);let{p:Re,f:Fe}=this.wNAF(ee),{p:Pe,f:$e}=this.wNAF(pe);Re=B.constTimeNegate(he,Re),Pe=B.constTimeNegate(me,Pe),Pe=new v(C.mul(Pe.px,ne.beta),Pe.py,Pe.pz),M=Re.add(Pe),q=Fe.add($e)}else{const{p:he,f:ee}=this.wNAF(X);M=he,q=ee}return v.normalizeZ([M,q])[0]}multiplyAndAddUnsafe(D,X,M){const q=v.BASE,ne=(ee,me)=>me===d||me===h||!ee.equals(q)?ee.multiplyUnsafe(me):ee.multiply(me),he=ne(this,X).add(ne(D,M));return he.is0()?void 0:he}toAffine(D){const{px:X,py:M,pz:q}=this,ne=this.is0();D==null&&(D=ne?C.ONE:C.inv(q));const he=C.mul(X,D),ee=C.mul(M,D),me=C.mul(q,D);if(ne)return{x:C.ZERO,y:C.ZERO};if(!C.eql(me,C.ONE))throw new Error("invZ was invalid");return{x:he,y:ee}}isTorsionFree(){const{h:D,isTorsionFree:X}=P;if(D===h)return!0;if(X)return X(v,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:D,clearCofactor:X}=P;return D===h?this:X?X(v,this):this.multiplyUnsafe(P.h)}toRawBytes(D=!0){return this.assertValidity(),J(v,this,D)}toHex(D=!0){return o.bytesToHex(this.toRawBytes(D))}}v.BASE=new v(P.Gx,P.Gy,C.ONE),v.ZERO=new v(C.ZERO,C.ONE,C.ZERO);const A=P.nBitLength,B=(0,t.wNAF)(v,P.endo?Math.ceil(A/2):A);return{CURVE:P,ProjectivePoint:v,normPrivateKeyToScalar:Ie,weierstrassEquation:ie,isWithinCurveOrder:_e}}function N(H){const P=(0,t.validateBasic)(H);return o.validateObject(P,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...P})}function k(H){const P=N(H),{Fp:C,n:J}=P,ae=C.BYTES+1,ie=2*C.BYTES+1;function _e(x){return d<x&&x<C.ORDER}function ce(x){return n.mod(x,J)}function Ie(x){return n.invert(x,J)}const{ProjectivePoint:we,normPrivateKeyToScalar:p,weierstrassEquation:v,isWithinCurveOrder:A}=m({...P,toBytes(x,j,re){const Te=j.toAffine(),ye=C.toBytes(Te.x),Ne=o.concatBytes;return re?Ne(Uint8Array.from([j.hasEvenY()?2:3]),ye):Ne(Uint8Array.from([4]),ye,C.toBytes(Te.y))},fromBytes(x){const j=x.length,re=x[0],Te=x.subarray(1);if(j===ae&&(re===2||re===3)){const ye=o.bytesToNumberBE(Te);if(!_e(ye))throw new Error("Point is not on curve");const Ne=v(ye);let qe;try{qe=C.sqrt(Ne)}catch(xe){const at=xe instanceof Error?": "+xe.message:"";throw new Error("Point is not on curve"+at)}const He=(qe&h)===h;return(re&1)===1!==He&&(qe=C.neg(qe)),{x:ye,y:qe}}else if(j===ie&&re===4){const ye=C.fromBytes(Te.subarray(0,C.BYTES)),Ne=C.fromBytes(Te.subarray(C.BYTES,2*C.BYTES));return{x:ye,y:Ne}}else throw new Error(`Point of length ${j} was invalid. Expected ${ae} compressed bytes or ${ie} uncompressed bytes`)}}),B=x=>o.bytesToHex(o.numberToBytesBE(x,P.nByteLength));function W(x){const j=J>>h;return x>j}function D(x){return W(x)?ce(-x):x}const X=(x,j,re)=>o.bytesToNumberBE(x.slice(j,re));class M{constructor(j,re,Te){this.r=j,this.s=re,this.recovery=Te,this.assertValidity()}static fromCompact(j){const re=P.nByteLength;return j=(0,a.ensureBytes)("compactSignature",j,re*2),new M(X(j,0,re),X(j,re,2*re))}static fromDER(j){const{r:re,s:Te}=e.DER.toSig((0,a.ensureBytes)("DER",j));return new M(re,Te)}assertValidity(){if(!A(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!A(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(j){return new M(this.r,this.s,j)}recoverPublicKey(j){const{r:re,s:Te,recovery:ye}=this,Ne=pe((0,a.ensureBytes)("msgHash",j));if(ye==null||![0,1,2,3].includes(ye))throw new Error("recovery id invalid");const qe=ye===2||ye===3?re+P.n:re;if(qe>=C.ORDER)throw new Error("recovery id 2 or 3 invalid");const He=ye&1?"03":"02",tt=we.fromHex(He+B(qe)),xe=Ie(qe),at=ce(-Ne*xe),Mt=ce(Te*xe),_t=we.BASE.multiplyAndAddUnsafe(tt,at,Mt);if(!_t)throw new Error("point at infinify");return _t.assertValidity(),_t}hasHighS(){return W(this.s)}normalizeS(){return this.hasHighS()?new M(this.r,ce(-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 B(this.r)+B(this.s)}}const q={isValidPrivateKey(x){try{return p(x),!0}catch{return!1}},normPrivateKeyToScalar:p,randomPrivateKey:()=>{const x=n.getMinHashLength(P.n);return n.mapHashToField(P.randomBytes(x),P.n)},precompute(x=8,j=we.BASE){return j._setWindowSize(x),j.multiply(BigInt(3)),j}};function ne(x,j=!0){return we.fromPrivateKey(x).toRawBytes(j)}function he(x){const j=o.isBytes(x),re=typeof x=="string",Te=(j||re)&&x.length;return j?Te===ae||Te===ie:re?Te===2*ae||Te===2*ie:x instanceof we}function ee(x,j,re=!0){if(he(x))throw new Error("first arg must be private key");if(!he(j))throw new Error("second arg must be public key");return we.fromHex(j).multiply(p(x)).toRawBytes(re)}const me=P.bits2int||function(x){const j=o.bytesToNumberBE(x),re=x.length*8-P.nBitLength;return re>0?j>>BigInt(re):j},pe=P.bits2int_modN||function(x){return ce(me(x))},Re=o.bitMask(P.nBitLength);function Fe(x){if(typeof x!="bigint")throw new Error("bigint expected");if(!(d<=x&&x<Re))throw new Error(`bigint expected < 2^${P.nBitLength}`);return o.numberToBytesBE(x,P.nByteLength)}function Pe(x,j,re=$e){if(["recovered","canonical"].some(Rt=>Rt in re))throw new Error("sign() legacy options not supported");const{hash:Te,randomBytes:ye}=P;let{lowS:Ne,prehash:qe,extraEntropy:He}=re;Ne==null&&(Ne=!0),x=(0,a.ensureBytes)("msgHash",x),qe&&(x=(0,a.ensureBytes)("prehashed msgHash",Te(x)));const tt=pe(x),xe=p(j),at=[Fe(xe),Fe(tt)];if(He!=null&&He!==!1){const Rt=He===!0?ye(C.BYTES):He;at.push((0,a.ensureBytes)("extraEntropy",Rt))}const Mt=o.concatBytes(...at),_t=tt;function fn(Rt){const ut=me(Rt);if(!A(ut))return;const $t=Ie(ut),kt=we.BASE.multiply(ut).toAffine(),T=ce(kt.x);if(T===d)return;const ve=ce($t*ce(_t+T*xe));if(ve===d)return;let Le=(kt.x===T?0:2)|Number(kt.y&h),De=ve;return Ne&&W(ve)&&(De=D(ve),Le^=1),new M(T,De,Le)}return{seed:Mt,k2sig:fn}}const $e={lowS:P.lowS,prehash:!1},Qe={lowS:P.lowS,prehash:!1};function Ke(x,j,re=$e){const{seed:Te,k2sig:ye}=Pe(x,j,re),Ne=P;return o.createHmacDrbg(Ne.hash.outputLen,Ne.nByteLength,Ne.hmac)(Te,ye)}we.BASE._setWindowSize(8);function We(x,j,re,Te=Qe){var kt;const ye=x;if(j=(0,a.ensureBytes)("msgHash",j),re=(0,a.ensureBytes)("publicKey",re),"strict"in Te)throw new Error("options.strict was renamed to lowS");const{lowS:Ne,prehash:qe}=Te;let He,tt;try{if(typeof ye=="string"||o.isBytes(ye))try{He=M.fromDER(ye)}catch(T){if(!(T instanceof e.DER.Err))throw T;He=M.fromCompact(ye)}else if(typeof ye=="object"&&typeof ye.r=="bigint"&&typeof ye.s=="bigint"){const{r:T,s:ve}=ye;He=new M(T,ve)}else throw new Error("PARSE");tt=we.fromHex(re)}catch(T){if(T.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(Ne&&He.hasHighS())return!1;qe&&(j=P.hash(j));const{r:xe,s:at}=He,Mt=pe(j),_t=Ie(at),fn=ce(Mt*_t),Rt=ce(xe*_t),ut=(kt=we.BASE.multiplyAndAddUnsafe(tt,fn,Rt))==null?void 0:kt.toAffine();return ut?ce(ut.x)===xe:!1}return{CURVE:P,getPublicKey:ne,getSharedSecret:ee,sign:Ke,verify:We,ProjectivePoint:we,Signature:M,utils:q}}function U(H,P){const C=H.ORDER;let J=d;for(let W=C-h;W%_===d;W/=_)J+=h;const ae=J,ie=_<<ae-h-h,_e=ie*_,ce=(C-h)/_e,Ie=(ce-h)/_,we=_e-h,p=ie,v=H.pow(P,ce),A=H.pow(P,(ce+h)/_);let B=(W,D)=>{let X=v,M=H.pow(D,we),q=H.sqr(M);q=H.mul(q,D);let ne=H.mul(W,q);ne=H.pow(ne,Ie),ne=H.mul(ne,M),M=H.mul(ne,D),q=H.mul(ne,W);let he=H.mul(q,M);ne=H.pow(he,p);let ee=H.eql(ne,H.ONE);M=H.mul(q,A),ne=H.mul(he,X),q=H.cmov(M,q,ee),he=H.cmov(ne,he,ee);for(let me=ae;me>h;me--){let pe=me-_;pe=_<<pe-h;let Re=H.pow(he,pe);const Fe=H.eql(Re,H.ONE);M=H.mul(q,X),X=H.mul(X,X),Re=H.mul(he,X),q=H.cmov(M,q,Fe),he=H.cmov(Re,he,Fe)}return{isValid:ee,value:q}};if(H.ORDER%E===y){const W=(H.ORDER-y)/E,D=H.sqrt(H.neg(P));B=(X,M)=>{let q=H.sqr(M);const ne=H.mul(X,M);q=H.mul(q,ne);let he=H.pow(q,W);he=H.mul(he,ne);const ee=H.mul(he,D),me=H.mul(H.sqr(he),M),pe=H.eql(me,X);let Re=H.cmov(ee,he,pe);return{isValid:pe,value:Re}}}return B}function G(H,P){if(n.validateField(H),!H.isValid(P.A)||!H.isValid(P.B)||!H.isValid(P.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const C=U(H,P.Z);if(!H.isOdd)throw new Error("Fp.isOdd is not implemented!");return J=>{let ae,ie,_e,ce,Ie,we,p,v;ae=H.sqr(J),ae=H.mul(ae,P.Z),ie=H.sqr(ae),ie=H.add(ie,ae),_e=H.add(ie,H.ONE),_e=H.mul(_e,P.B),ce=H.cmov(P.Z,H.neg(ie),!H.eql(ie,H.ZERO)),ce=H.mul(ce,P.A),ie=H.sqr(_e),we=H.sqr(ce),Ie=H.mul(we,P.A),ie=H.add(ie,Ie),ie=H.mul(ie,_e),we=H.mul(we,ce),Ie=H.mul(we,P.B),ie=H.add(ie,Ie),p=H.mul(ae,_e);const{isValid:A,value:B}=C(ie,we);v=H.mul(ae,J),v=H.mul(v,B),p=H.cmov(p,_e,A),v=H.cmov(v,B,A);const W=H.isOdd(J)===H.isOdd(v);return v=H.cmov(H.neg(v),v,W),p=H.div(p,ce),{x:p,y:v}}}})(hd);Object.defineProperty(Ff,"__esModule",{value:!0});Ff.getHash=xb;Ff.createCurve=oN;/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const rN=Rb,e_=Zr,iN=hd;function xb(e){return{hash:e,hmac:(t,...n)=>(0,rN.hmac)(e,t,(0,e_.concatBytes)(...n)),randomBytes:e_.randomBytes}}function oN(e,t){const n=o=>(0,iN.weierstrass)({...e,...xb(o)});return Object.freeze({...n(t),create:n})}var Hi={};Object.defineProperty(Hi,"__esModule",{value:!0});Hi.expand_message_xmd=Db;Hi.expand_message_xof=Mb;Hi.hash_to_field=Sc;Hi.isogenyMap=uN;Hi.createHasher=lN;const sN=Bt,_n=Et,aN=_n.bytesToNumberBE;function li(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const n=Array.from({length:t}).fill(0);for(let o=t-1;o>=0;o--)n[o]=e&255,e>>>=8;return new Uint8Array(n)}function fN(e,t){const n=new Uint8Array(e.length);for(let o=0;o<e.length;o++)n[o]=e[o]^t[o];return n}function yd(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function Db(e,t,n,o){(0,_n.abytes)(e),(0,_n.abytes)(t),yd(n),t.length>255&&(t=o((0,_n.concatBytes)((0,_n.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:a,blockLen:f}=o,u=Math.ceil(n/a);if(u>255)throw new Error("Invalid xmd length");const g=(0,_n.concatBytes)(t,li(t.length,1)),d=li(0,f),h=li(n,2),_=new Array(u),y=o((0,_n.concatBytes)(d,e,h,li(0,1),g));_[0]=o((0,_n.concatBytes)(y,li(1,1),g));for(let m=1;m<=u;m++){const N=[fN(y,_[m-1]),li(m+1,1),g];_[m]=o((0,_n.concatBytes)(...N))}return(0,_n.concatBytes)(..._).slice(0,n)}function Mb(e,t,n,o,a){if((0,_n.abytes)(e),(0,_n.abytes)(t),yd(n),t.length>255){const f=Math.ceil(2*o/8);t=a.create({dkLen:f}).update((0,_n.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(n>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return a.create({dkLen:n}).update(e).update(li(n,2)).update(t).update(li(t.length,1)).digest()}function Sc(e,t,n){(0,_n.validateObject)(n,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:o,k:a,m:f,hash:u,expand:g,DST:d}=n;(0,_n.abytes)(e),yd(t);const h=typeof d=="string"?(0,_n.utf8ToBytes)(d):d,_=o.toString(2).length,y=Math.ceil((_+a)/8),E=t*f*y;let m;if(g==="xmd")m=Db(e,h,E,u);else if(g==="xof")m=Mb(e,h,E,a,u);else if(g==="_internal_pass")m=e;else throw new Error('expand must be "xmd" or "xof"');const N=new Array(t);for(let k=0;k<t;k++){const U=new Array(f);for(let G=0;G<f;G++){const H=y*(G+k*f),P=m.subarray(H,H+y);U[G]=(0,sN.mod)(aN(P),o)}N[k]=U}return N}function uN(e,t){const n=t.map(o=>Array.from(o).reverse());return(o,a)=>{const[f,u,g,d]=n.map(h=>h.reduce((_,y)=>e.add(e.mul(_,o),y)));return o=e.div(f,u),a=e.mul(a,e.div(g,d)),{x:o,y:a}}}function lN(e,t,n){if(typeof t!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(o,a){const f=Sc(o,2,{...n,DST:n.DST,...a}),u=e.fromAffine(t(f[0])),g=e.fromAffine(t(f[1])),d=u.add(g).clearCofactor();return d.assertValidity(),d},encodeToCurve(o,a){const f=Sc(o,1,{...n,DST:n.encodeDST,...a}),u=e.fromAffine(t(f[0])).clearCofactor();return u.assertValidity(),u},mapToCurve(o){if(!Array.isArray(o))throw new Error("mapToCurve: expected array of bigints");for(const f of o)if(typeof f!="bigint")throw new Error(`mapToCurve: expected array of bigints, got ${f} in array`);const a=e.fromAffine(t(o)).clearCofactor();return a.assertValidity(),a}}}(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=Ro,n=Zr,o=Ff,a=Hi,f=Bt,u=Et,g=hd,d=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),h=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),_=BigInt(1),y=BigInt(2),E=(M,q)=>(M+q/y)/q;function m(M){const q=d,ne=BigInt(3),he=BigInt(6),ee=BigInt(11),me=BigInt(22),pe=BigInt(23),Re=BigInt(44),Fe=BigInt(88),Pe=M*M*M%q,$e=Pe*Pe*M%q,Qe=(0,f.pow2)($e,ne,q)*$e%q,Ke=(0,f.pow2)(Qe,ne,q)*$e%q,We=(0,f.pow2)(Ke,y,q)*Pe%q,x=(0,f.pow2)(We,ee,q)*We%q,j=(0,f.pow2)(x,me,q)*x%q,re=(0,f.pow2)(j,Re,q)*j%q,Te=(0,f.pow2)(re,Fe,q)*re%q,ye=(0,f.pow2)(Te,Re,q)*j%q,Ne=(0,f.pow2)(ye,ne,q)*$e%q,qe=(0,f.pow2)(Ne,pe,q)*x%q,He=(0,f.pow2)(qe,he,q)*Pe%q,tt=(0,f.pow2)(He,y,q);if(!N.eql(N.sqr(tt),M))throw new Error("Cannot find square root");return tt}const N=(0,f.Field)(d,void 0,void 0,{sqrt:m});e.secp256k1=(0,o.createCurve)({a:BigInt(0),b:BigInt(7),Fp:N,n:h,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:M=>{const q=h,ne=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),he=-_*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),ee=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),me=ne,pe=BigInt("0x100000000000000000000000000000000"),Re=E(me*M,q),Fe=E(-he*M,q);let Pe=(0,f.mod)(M-Re*ne-Fe*ee,q),$e=(0,f.mod)(-Re*he-Fe*me,q);const Qe=Pe>pe,Ke=$e>pe;if(Qe&&(Pe=q-Pe),Ke&&($e=q-$e),Pe>pe||$e>pe)throw new Error("splitScalar: Endomorphism failed, k="+M);return{k1neg:Qe,k1:Pe,k2neg:Ke,k2:$e}}}},t.sha256);const k=BigInt(0),U=M=>typeof M=="bigint"&&k<M&&M<d,G=M=>typeof M=="bigint"&&k<M&&M<h,H={};function P(M,...q){let ne=H[M];if(ne===void 0){const he=(0,t.sha256)(Uint8Array.from(M,ee=>ee.charCodeAt(0)));ne=(0,u.concatBytes)(he,he),H[M]=ne}return(0,t.sha256)((0,u.concatBytes)(ne,...q))}const C=M=>M.toRawBytes(!0).slice(1),J=M=>(0,u.numberToBytesBE)(M,32),ae=M=>(0,f.mod)(M,d),ie=M=>(0,f.mod)(M,h),_e=e.secp256k1.ProjectivePoint,ce=(M,q,ne)=>_e.BASE.multiplyAndAddUnsafe(M,q,ne);function Ie(M){let q=e.secp256k1.utils.normPrivateKeyToScalar(M),ne=_e.fromPrivateKey(q);return{scalar:ne.hasEvenY()?q:ie(-q),bytes:C(ne)}}function we(M){if(!U(M))throw new Error("bad x: need 0 < x < p");const q=ae(M*M),ne=ae(q*M+BigInt(7));let he=m(ne);he%y!==k&&(he=ae(-he));const ee=new _e(M,he,_);return ee.assertValidity(),ee}function p(...M){return ie((0,u.bytesToNumberBE)(P("BIP0340/challenge",...M)))}function v(M){return Ie(M).bytes}function A(M,q,ne=(0,n.randomBytes)(32)){const he=(0,u.ensureBytes)("message",M),{bytes:ee,scalar:me}=Ie(q),pe=(0,u.ensureBytes)("auxRand",ne,32),Re=J(me^(0,u.bytesToNumberBE)(P("BIP0340/aux",pe))),Fe=P("BIP0340/nonce",Re,ee,he),Pe=ie((0,u.bytesToNumberBE)(Fe));if(Pe===k)throw new Error("sign failed: k is zero");const{bytes:$e,scalar:Qe}=Ie(Pe),Ke=p($e,ee,he),We=new Uint8Array(64);if(We.set($e,0),We.set(J(ie(Qe+Ke*me)),32),!B(We,he,ee))throw new Error("sign: Invalid signature produced");return We}function B(M,q,ne){const he=(0,u.ensureBytes)("signature",M,64),ee=(0,u.ensureBytes)("message",q),me=(0,u.ensureBytes)("publicKey",ne,32);try{const pe=we((0,u.bytesToNumberBE)(me)),Re=(0,u.bytesToNumberBE)(he.subarray(0,32));if(!U(Re))return!1;const Fe=(0,u.bytesToNumberBE)(he.subarray(32,64));if(!G(Fe))return!1;const Pe=p(J(Re),C(pe),ee),$e=ce(pe,Fe,ie(-Pe));return!(!$e||!$e.hasEvenY()||$e.toAffine().x!==Re)}catch{return!1}}e.schnorr={getPublicKey:v,sign:A,verify:B,utils:{randomPrivateKey:e.secp256k1.utils.randomPrivateKey,lift_x:we,pointToBytes:C,numberToBytesBE:u.numberToBytesBE,bytesToNumberBE:u.bytesToNumberBE,taggedHash:P,mod:f.mod}};const W=(0,a.isogenyMap)(N,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(M=>M.map(q=>BigInt(q)))),D=(0,g.mapToCurveSimpleSWU)(N,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:N.create(BigInt("-11"))}),X=(0,a.createHasher)(e.secp256k1.ProjectivePoint,M=>{const{x:q,y:ne}=D(N.create(M[0]));return W(q,ne)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:N.ORDER,m:1,k:128,expand:"xmd",hash:t.sha256});e.hashToCurve=X.hashToCurve,e.encodeToCurve=X.encodeToCurve})(bb);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.secp256k1=void 0;var t=bb;Object.defineProperty(e,"secp256k1",{enumerable:!0,get:function(){return t.secp256k1}})})(Mf);(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,n=Mf;e.MAX_UINT64=BigInt("0xffffffffffffffff"),e.MAX_INTEGER=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),e.MAX_INTEGER_BIGINT=BigInt("115792089237316195423570985008687907853269984665640564039457584007913129639935"),e.SECP256K1_ORDER=n.secp256k1.CURVE.n,e.SECP256K1_ORDER_DIV_2=n.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})(Df);var qf={};Object.defineProperty(qf,"__esModule",{value:!0});qf.GWEI_TO_WEI=void 0;qf.GWEI_TO_WEI=BigInt(1e9);var wd={},Rr={};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.RLP=Rr.utils=Rr.decode=Rr.encode=void 0;function md(e){if(Array.isArray(e)){const n=[];let o=0;for(let a=0;a<e.length;a++){const f=md(e[a]);n.push(f),o+=f.length}return Ac(n_(o,192),...n)}const t=Wb(e);return t.length===1&&t[0]<128?t:Ac(n_(t.length,128),t)}Rr.encode=md;function co(e,t,n){if(n>e.length)throw new Error("invalid RLP (safeSlice): end slice of Uint8Array out-of-bounds");return e.slice(t,n)}function t_(e){if(e[0]===0)throw new Error("invalid RLP: extra zeros");return Ub(Fb(e))}function n_(e,t){if(e<56)return Uint8Array.from([e+t]);const n=Ic(e),o=n.length/2,a=Ic(t+55+o);return Uint8Array.from(uf(a+n))}function kb(e,t=!1){if(typeof e>"u"||e===null||e.length===0)return Uint8Array.from([]);const n=Wb(e),o=Rc(n);if(t)return o;if(o.remainder.length!==0)throw new Error("invalid RLP: remainder must be zero");return o.data}Rr.decode=kb;function Rc(e){let t,n,o,a,f;const u=[],g=e[0];if(g<=127)return{data:e.slice(0,1),remainder:e.slice(1)};if(g<=183){if(t=g-127,g===128?o=Uint8Array.from([]):o=co(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(g<=191){if(n=g-182,e.length-1<n)throw new Error("invalid RLP: not enough bytes for string length");if(t=t_(co(e,1,n)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return o=co(e,n,t+n),{data:o,remainder:e.slice(t+n)}}else if(g<=247){for(t=g-191,a=co(e,1,t);a.length;)f=Rc(a),u.push(f.data),a=f.remainder;return{data:u,remainder:e.slice(t)}}else{if(n=g-246,t=t_(co(e,1,n)),t<56)throw new Error("invalid RLP: encoded list too short");const d=n+t;if(d>e.length)throw new Error("invalid RLP: total length is larger than the data");for(a=co(e,n,d);a.length;)f=Rc(a),u.push(f.data),a=f.remainder;return{data:u,remainder:e.slice(d)}}}const cN=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Fb(e){let t="";for(let n=0;n<e.length;n++)t+=cN[e[n]];return t}function Ub(e){const t=Number.parseInt(e,16);if(Number.isNaN(t))throw new Error("Invalid byte sequence");return t}function uf(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 n=0;n<t.length;n++){const o=n*2;t[n]=Ub(e.slice(o,o+2))}return t}function Ac(...e){if(e.length===1)return e[0];const t=e.reduce((o,a)=>o+a.length,0),n=new Uint8Array(t);for(let o=0,a=0;o<e.length;o++){const f=e[o];n.set(f,a),a+=f.length}return n}function jb(e){return new TextEncoder().encode(e)}function Ic(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 dN(e){return e.length%2?`0${e}`:e}function Hb(e){return e.length>=2&&e[0]==="0"&&e[1]==="x"}function hN(e){return typeof e!="string"?e:Hb(e)?e.slice(2):e}function Wb(e){if(e instanceof Uint8Array)return e;if(typeof e=="string")return Hb(e)?uf(dN(hN(e))):jb(e);if(typeof e=="number"||typeof e=="bigint")return e?uf(Ic(e)):Uint8Array.from([]);if(e==null)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}Rr.utils={bytesToHex:Fb,concatBytes:Ac,hexToBytes:uf,utf8ToBytes:jb};Rr.RLP={encode:md,decode:kb};var cr={},Ct={},et={};Object.defineProperty(et,"__esModule",{value:!0});et.add5L=et.add5H=et.add4H=et.add4L=et.add3H=et.add3L=et.add=et.rotlBL=et.rotlBH=et.rotlSL=et.rotlSH=et.rotr32L=et.rotr32H=et.rotrBL=et.rotrBH=et.rotrSL=et.rotrSH=et.shrSL=et.shrSH=et.toBig=et.split=et.fromBig=void 0;const Va=BigInt(2**32-1),Tc=BigInt(32);function vd(e,t=!1){return t?{h:Number(e&Va),l:Number(e>>Tc&Va)}:{h:Number(e>>Tc&Va)|0,l:Number(e&Va)|0}}et.fromBig=vd;function zb(e,t=!1){let n=new Uint32Array(e.length),o=new Uint32Array(e.length);for(let a=0;a<e.length;a++){const{h:f,l:u}=vd(e[a],t);[n[a],o[a]]=[f,u]}return[n,o]}et.split=zb;const qb=(e,t)=>BigInt(e>>>0)<<Tc|BigInt(t>>>0);et.toBig=qb;const Gb=(e,t,n)=>e>>>n;et.shrSH=Gb;const Vb=(e,t,n)=>e<<32-n|t>>>n;et.shrSL=Vb;const Zb=(e,t,n)=>e>>>n|t<<32-n;et.rotrSH=Zb;const Kb=(e,t,n)=>e<<32-n|t>>>n;et.rotrSL=Kb;const Jb=(e,t,n)=>e<<64-n|t>>>n-32;et.rotrBH=Jb;const Xb=(e,t,n)=>e>>>n-32|t<<64-n;et.rotrBL=Xb;const Yb=(e,t)=>t;et.rotr32H=Yb;const Qb=(e,t)=>e;et.rotr32L=Qb;const ey=(e,t,n)=>e<<n|t>>>32-n;et.rotlSH=ey;const ty=(e,t,n)=>t<<n|e>>>32-n;et.rotlSL=ty;const ny=(e,t,n)=>t<<n-32|e>>>64-n;et.rotlBH=ny;const ry=(e,t,n)=>e<<n-32|t>>>64-n;et.rotlBL=ry;function iy(e,t,n,o){const a=(t>>>0)+(o>>>0);return{h:e+n+(a/2**32|0)|0,l:a|0}}et.add=iy;const oy=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);et.add3L=oy;const sy=(e,t,n,o)=>t+n+o+(e/2**32|0)|0;et.add3H=sy;const ay=(e,t,n,o)=>(e>>>0)+(t>>>0)+(n>>>0)+(o>>>0);et.add4L=ay;const fy=(e,t,n,o,a)=>t+n+o+a+(e/2**32|0)|0;et.add4H=fy;const uy=(e,t,n,o,a)=>(e>>>0)+(t>>>0)+(n>>>0)+(o>>>0)+(a>>>0);et.add5L=uy;const ly=(e,t,n,o,a,f)=>t+n+o+a+f+(e/2**32|0)|0;et.add5H=ly;const gN={fromBig:vd,split:zb,toBig:qb,shrSH:Gb,shrSL:Vb,rotrSH:Zb,rotrSL:Kb,rotrBH:Jb,rotrBL:Xb,rotr32H:Yb,rotr32L:Qb,rotlSH:ey,rotlSL:ty,rotlBH:ny,rotlBL:ry,add:iy,add3L:oy,add3H:sy,add4L:ay,add4H:fy,add5H:ly,add5L:uy};et.default=gN;Object.defineProperty(Ct,"__esModule",{value:!0});Ct.shake256=Ct.shake128=Ct.keccak_512=Ct.keccak_384=Ct.keccak_256=Ct.keccak_224=Ct.sha3_512=Ct.sha3_384=Ct.sha3_256=Ct.sha3_224=Ct.Keccak=Ct.keccakP=void 0;const ho=Zt,ms=et,Wr=Zr,cy=[],dy=[],hy=[],_N=BigInt(0),fs=BigInt(1),pN=BigInt(2),bN=BigInt(7),yN=BigInt(256),wN=BigInt(113);for(let e=0,t=fs,n=1,o=0;e<24;e++){[n,o]=[o,(2*n+3*o)%5],cy.push(2*(5*o+n)),dy.push((e+1)*(e+2)/2%64);let a=_N;for(let f=0;f<7;f++)t=(t<<fs^(t>>bN)*wN)%yN,t&pN&&(a^=fs<<(fs<<BigInt(f))-fs);hy.push(a)}const[mN,vN]=(0,ms.split)(hy,!0),r_=(e,t,n)=>n>32?(0,ms.rotlBH)(e,t,n):(0,ms.rotlSH)(e,t,n),i_=(e,t,n)=>n>32?(0,ms.rotlBL)(e,t,n):(0,ms.rotlSL)(e,t,n);function gy(e,t=24){const n=new Uint32Array(10);for(let o=24-t;o<24;o++){for(let u=0;u<10;u++)n[u]=e[u]^e[u+10]^e[u+20]^e[u+30]^e[u+40];for(let u=0;u<10;u+=2){const g=(u+8)%10,d=(u+2)%10,h=n[d],_=n[d+1],y=r_(h,_,1)^n[g],E=i_(h,_,1)^n[g+1];for(let m=0;m<50;m+=10)e[u+m]^=y,e[u+m+1]^=E}let a=e[2],f=e[3];for(let u=0;u<24;u++){const g=dy[u],d=r_(a,f,g),h=i_(a,f,g),_=cy[u];a=e[_],f=e[_+1],e[_]=d,e[_+1]=h}for(let u=0;u<50;u+=10){for(let g=0;g<10;g++)n[g]=e[u+g];for(let g=0;g<10;g++)e[u+g]^=~n[(g+2)%10]&n[(g+4)%10]}e[0]^=mN[o],e[1]^=vN[o]}n.fill(0)}Ct.keccakP=gy;class Ls extends Wr.Hash{constructor(t,n,o,a=!1,f=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=o,this.enableXOF=a,this.rounds=f,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,ho.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,Wr.u32)(this.state)}keccak(){Wr.isLE||(0,Wr.byteSwap32)(this.state32),gy(this.state32,this.rounds),Wr.isLE||(0,Wr.byteSwap32)(this.state32),this.posOut=0,this.pos=0}update(t){(0,ho.exists)(this);const{blockLen:n,state:o}=this;t=(0,Wr.toBytes)(t);const a=t.length;for(let f=0;f<a;){const u=Math.min(n-this.pos,a-f);for(let g=0;g<u;g++)o[this.pos++]^=t[f++];this.pos===n&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:n,pos:o,blockLen:a}=this;t[o]^=n,n&128&&o===a-1&&this.keccak(),t[a-1]^=128,this.keccak()}writeInto(t){(0,ho.exists)(this,!1),(0,ho.bytes)(t),this.finish();const n=this.state,{blockLen:o}=this;for(let a=0,f=t.length;a<f;){this.posOut>=o&&this.keccak();const u=Math.min(o-this.posOut,f-a);t.set(n.subarray(this.posOut,this.posOut+u),a),this.posOut+=u,a+=u}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,ho.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,ho.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:n,suffix:o,outputLen:a,rounds:f,enableXOF:u}=this;return t||(t=new Ls(n,o,a,u,f)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=f,t.suffix=o,t.outputLen=a,t.enableXOF=u,t.destroyed=this.destroyed,t}}Ct.Keccak=Ls;const bi=(e,t,n)=>(0,Wr.wrapConstructor)(()=>new Ls(t,e,n));Ct.sha3_224=bi(6,144,224/8);Ct.sha3_256=bi(6,136,256/8);Ct.sha3_384=bi(6,104,384/8);Ct.sha3_512=bi(6,72,512/8);Ct.keccak_224=bi(1,144,224/8);Ct.keccak_256=bi(1,136,256/8);Ct.keccak_384=bi(1,104,384/8);Ct.keccak_512=bi(1,72,512/8);const _y=(e,t,n)=>(0,Wr.wrapXOFConstructorWithOpts)((o={})=>new Ls(t,e,o.dkLen===void 0?n:o.dkLen,!0));Ct.shake128=_y(31,168,128/8);Ct.shake256=_y(31,136,256/8);var lf={exports:{}};lf.exports;(function(e,t){var n=Z.commonjsGlobal&&Z.commonjsGlobal.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};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=d,t.hexToBytes=h,t.equalsBytes=_,t.wrapHash=y;const o=n(Zt),a=Zr,f=o.default.bool;t.assertBool=f;const u=o.default.bytes;t.assertBytes=u;var g=Zr;Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return g.bytesToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return g.bytesToHex}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return g.concatBytes}}),Object.defineProperty(t,"createView",{enumerable:!0,get:function(){return g.createView}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return g.utf8ToBytes}});function d(E){if(!(E instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof E}`);return new TextDecoder().decode(E)}function h(E){const m=E.startsWith("0x")?E.substring(2):E;return(0,a.hexToBytes)(m)}function _(E,m){if(E.length!==m.length)return!1;for(let N=0;N<E.length;N++)if(E[N]!==m[N])return!1;return!0}function y(E){return m=>(o.default.bytes(m),E(m))}t.crypto=(()=>{const E=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,m=typeof Z.commonjsRequire=="function"&&Z.commonjsRequire.bind(e);return{node:m&&!E?m("crypto"):void 0,web:E}})()})(lf,lf.exports);var py=lf.exports;Object.defineProperty(cr,"__esModule",{value:!0});cr.keccak512=cr.keccak384=cr.keccak256=cr.keccak224=void 0;const vs=Ct,Gf=py;cr.keccak224=(0,Gf.wrapHash)(vs.keccak_224);cr.keccak256=(()=>{const e=(0,Gf.wrapHash)(vs.keccak_256);return e.create=vs.keccak_256.create,e})();cr.keccak384=(0,Gf.wrapHash)(vs.keccak_384);cr.keccak512=(0,Gf.wrapHash)(vs.keccak_512);var Wi={},Qn={},Pt={};Object.defineProperty(Pt,"__esModule",{value:!0});Pt.isHexString=Pt.getKeys=Pt.fromAscii=Pt.fromUtf8=Pt.toAscii=Pt.arrayContainsArray=Pt.getBinarySize=Pt.padToEven=Pt.stripHexPrefix=Pt.isHexPrefixed=void 0;function by(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"}Pt.isHexPrefixed=by;const EN=e=>{if(typeof e!="string")throw new Error(`[stripHexPrefix] input must be type 'string', received ${typeof e}`);return by(e)?e.slice(2):e};Pt.stripHexPrefix=EN;function yy(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}Pt.padToEven=yy;function SN(e){if(typeof e!="string")throw new Error(`[getBinarySize] method requires input type 'string', received ${typeof e}`);return Z.dist.Buffer.byteLength(e,"utf8")}Pt.getBinarySize=SN;function RN(e,t,n){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[n===!0?"some":"every"](o=>e.indexOf(o)>=0)}Pt.arrayContainsArray=RN;function AN(e){let t="",n=0;const o=e.length;for(e.substring(0,2)==="0x"&&(n=2);n<o;n+=2){const a=parseInt(e.substr(n,2),16);t+=String.fromCharCode(a)}return t}Pt.toAscii=AN;function IN(e){const t=Z.dist.Buffer.from(e,"utf8");return`0x${yy(t.toString("hex")).replace(/^0+|0+$/g,"")}`}Pt.fromUtf8=IN;function TN(e){let t="";for(let n=0;n<e.length;n++){const a=e.charCodeAt(n).toString(16);t+=a.length<2?`0${a}`:a}return`0x${t}`}Pt.fromAscii=TN;function ON(e,t,n){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 a=0;a<e.length;a++){let f=e[a][t];if(n===!0&&!f)f="";else if(typeof f!="string")throw new Error(`invalid abi - expected type 'string', received ${typeof f}`);o.push(f)}return o}Pt.getKeys=ON;function LN(e,t){return!(typeof e!="string"||!e.match(/^0x[0-9A-Fa-f]*$/)||typeof t<"u"&&t>0&&e.length!==2+2*t)}Pt.isHexString=LN;Object.defineProperty(Qn,"__esModule",{value:!0});Qn.assertIsString=Qn.assertIsArray=Qn.assertIsBuffer=Qn.assertIsHexString=void 0;const CN=Pt,PN=function(e){if(!(0,CN.isHexString)(e)){const t=`This method only supports 0x-prefixed hex strings but input was: ${e}`;throw new Error(t)}};Qn.assertIsHexString=PN;const NN=function(e){if(!Z.dist.Buffer.isBuffer(e)){const t=`This method only supports Buffer but input was: ${e}`;throw new Error(t)}};Qn.assertIsBuffer=NN;const BN=function(e){if(!Array.isArray(e)){const t=`This method only supports number arrays but input was: ${e}`;throw new Error(t)}};Qn.assertIsArray=BN;const $N=function(e){if(typeof e!="string"){const t=`This method only supports strings but input was: ${e}`;throw new Error(t)}};Qn.assertIsString=$N;(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=Qn,n=Pt,o=function(A){if(!Number.isSafeInteger(A)||A<0)throw new Error(`Received an invalid integer type: ${A}`);return`0x${A.toString(16)}`};e.intToHex=o;const a=function(A){const B=(0,e.intToHex)(A);return Z.dist.Buffer.from((0,n.padToEven)(B.slice(2)),"hex")};e.intToBuffer=a;const f=function(A){return Z.dist.Buffer.allocUnsafe(A).fill(0)};e.zeros=f;const u=function(A,B,W){const D=(0,e.zeros)(B);return W?A.length<B?(A.copy(D),D):A.slice(0,B):A.length<B?(A.copy(D,B-A.length),D):A.slice(-B)},g=function(A,B){return(0,t.assertIsBuffer)(A),u(A,B,!1)};e.setLengthLeft=g;const d=function(A,B){return(0,t.assertIsBuffer)(A),u(A,B,!0)};e.setLengthRight=d;const h=function(A){let B=A[0];for(;A.length>0&&B.toString()==="0";)A=A.slice(1),B=A[0];return A},_=function(A){return(0,t.assertIsBuffer)(A),h(A)};e.unpadBuffer=_;const y=function(A){return(0,t.assertIsArray)(A),h(A)};e.unpadArray=y;const E=function(A){return(0,t.assertIsHexString)(A),A=(0,n.stripHexPrefix)(A),"0x"+h(A)};e.unpadHexString=E;const m=function(A){if(A==null)return Z.dist.Buffer.allocUnsafe(0);if(Z.dist.Buffer.isBuffer(A)||Array.isArray(A)||A instanceof Uint8Array)return Z.dist.Buffer.from(A);if(typeof A=="string"){if(!(0,n.isHexString)(A))throw new Error(`Cannot convert string to buffer. toBuffer only supports 0x-prefixed hex strings and this string was given: ${A}`);return Z.dist.Buffer.from((0,n.padToEven)((0,n.stripHexPrefix)(A)),"hex")}if(typeof A=="number")return(0,e.intToBuffer)(A);if(typeof A=="bigint"){if(A<BigInt(0))throw new Error(`Cannot convert negative bigint to buffer. Given: ${A}`);let B=A.toString(16);return B.length%2&&(B="0"+B),Z.dist.Buffer.from(B,"hex")}if(A.toArray)return Z.dist.Buffer.from(A.toArray());if(A.toBuffer)return Z.dist.Buffer.from(A.toBuffer());throw new Error("invalid type")};e.toBuffer=m;const N=function(A){return A=(0,e.toBuffer)(A),"0x"+A.toString("hex")};e.bufferToHex=N;function k(A){const B=(0,e.bufferToHex)(A);return BigInt(B==="0x"?0:B)}e.bufferToBigInt=k;function U(A){return(0,e.toBuffer)("0x"+A.toString(16))}e.bigIntToBuffer=U;const G=function(A){const B=Number(k(A));if(!Number.isSafeInteger(B))throw new Error("Number exceeds 53 bits");return B};e.bufferToInt=G;const H=function(A){return BigInt.asIntN(256,k(A))};e.fromSigned=H;const P=function(A){return U(BigInt.asUintN(256,A))};e.toUnsigned=P;const C=function(A){return typeof A!="string"||(0,n.isHexPrefixed)(A)?A:"0x"+A};e.addHexPrefix=C;function J(A,B=50){const W=Z.dist.Buffer.isBuffer(A)?A.toString("hex"):A;return W.length<=B?W:W.slice(0,B)+"…"}e.short=J;const ae=function(A){const B=/^(00)+|(00)+$/g;if(A=(0,n.stripHexPrefix)(A),A.length%2!==0)throw new Error("Invalid non-even hex string input for toUtf8() provided");return Z.dist.Buffer.from(A.replace(B,""),"hex").toString("utf8")};e.toUtf8=ae;const ie=function(A){if(Z.dist.Buffer.isBuffer(A))return`0x${A.toString("hex")}`;if(A instanceof Array){const B=[];for(let W=0;W<A.length;W++)B.push((0,e.baToJSON)(A[W]));return B}};e.baToJSON=ie;const _e=function(A){for(const[B,W]of Object.entries(A))if(W!==void 0&&W.length>0&&W[0]===0)throw new Error(`${B} cannot have leading zeroes, received: ${W.toString("hex")}`)};e.validateNoLeadingZeroes=_e;function ce(A){return Array.isArray(A)?A.map(B=>ce(B)):Z.dist.Buffer.from(A)}e.arrToBufArr=ce;function Ie(A){return Array.isArray(A)?A.map(B=>Ie(B)):Uint8Array.from(A??[])}e.bufArrToArr=Ie;const we=A=>"0x"+A.toString(16);e.bigIntToHex=we;function p(A){return(0,e.unpadBuffer)(U(A))}e.bigIntToUnpaddedBuffer=p;function v(A){return(0,e.unpadBuffer)((0,e.intToBuffer)(A))}e.intToUnpaddedBuffer=v})(Wi);(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=Rr,n=cr,o=Mf,a=py,f=Wi,u=Df,g=Qn,d=Pt,h=BigInt(0);class _{constructor(v=h,A=h,B=u.KECCAK256_RLP,W=u.KECCAK256_NULL){this.nonce=v,this.balance=A,this.storageRoot=B,this.codeHash=W,this._validate()}static fromAccountData(v){const{nonce:A,balance:B,storageRoot:W,codeHash:D}=v;return new _(A!==void 0?(0,f.bufferToBigInt)((0,f.toBuffer)(A)):void 0,B!==void 0?(0,f.bufferToBigInt)((0,f.toBuffer)(B)):void 0,W!==void 0?(0,f.toBuffer)(W):void 0,D!==void 0?(0,f.toBuffer)(D):void 0)}static fromRlpSerializedAccount(v){const A=(0,f.arrToBufArr)(t.RLP.decode(Uint8Array.from(v)));if(!Array.isArray(A))throw new Error("Invalid serialized account input. Must be array");return this.fromValuesArray(A)}static fromValuesArray(v){const[A,B,W,D]=v;return new _((0,f.bufferToBigInt)(A),(0,f.bufferToBigInt)(B),W,D)}_validate(){if(this.nonce<h)throw new Error("nonce must be greater than zero");if(this.balance<h)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,f.bigIntToUnpaddedBuffer)(this.nonce),(0,f.bigIntToUnpaddedBuffer)(this.balance),this.storageRoot,this.codeHash]}serialize(){return Z.dist.Buffer.from(t.RLP.encode((0,f.bufArrToArr)(this.raw())))}isContract(){return!this.codeHash.equals(u.KECCAK256_NULL)}isEmpty(){return this.balance===h&&this.nonce===h&&this.codeHash.equals(u.KECCAK256_NULL)}}e.Account=_;const y=function(p){try{(0,g.assertIsString)(p)}catch{return!1}return/^0x[0-9a-fA-F]{40}$/.test(p)};e.isValidAddress=y;const E=function(p,v){(0,g.assertIsHexString)(p);const A=(0,d.stripHexPrefix)(p).toLowerCase();let B="";v!==void 0&&(B=(0,f.bufferToBigInt)((0,f.toBuffer)(v)).toString()+"0x");const W=Z.dist.Buffer.from(B+A,"utf8"),D=(0,a.bytesToHex)((0,n.keccak256)(W));let X="0x";for(let M=0;M<A.length;M++)parseInt(D[M],16)>=8?X+=A[M].toUpperCase():X+=A[M];return X};e.toChecksumAddress=E;const m=function(p,v){return(0,e.isValidAddress)(p)&&(0,e.toChecksumAddress)(p,v)===p};e.isValidChecksumAddress=m;const N=function(p,v){return(0,g.assertIsBuffer)(p),(0,g.assertIsBuffer)(v),(0,f.bufferToBigInt)(v)===BigInt(0)?Z.dist.Buffer.from((0,n.keccak256)(t.RLP.encode((0,f.bufArrToArr)([p,null])))).slice(-20):Z.dist.Buffer.from((0,n.keccak256)(t.RLP.encode((0,f.bufArrToArr)([p,v])))).slice(-20)};e.generateAddress=N;const k=function(p,v,A){if((0,g.assertIsBuffer)(p),(0,g.assertIsBuffer)(v),(0,g.assertIsBuffer)(A),p.length!==20)throw new Error("Expected from to be of length 20");if(v.length!==32)throw new Error("Expected salt to be of length 32");const B=(0,n.keccak256)(Z.dist.Buffer.concat([Z.dist.Buffer.from("ff","hex"),p,v,(0,n.keccak256)(A)]));return(0,f.toBuffer)(B).slice(-20)};e.generateAddress2=k;const U=function(p){return o.secp256k1.utils.isValidPrivateKey(p)};e.isValidPrivate=U;const G=function(p,v=!1){if((0,g.assertIsBuffer)(p),p.length===64)try{return o.secp256k1.ProjectivePoint.fromHex(Z.dist.Buffer.concat([Z.dist.Buffer.from([4]),p])),!0}catch{return!1}if(!v)return!1;try{return o.secp256k1.ProjectivePoint.fromHex(p),!0}catch{return!1}};e.isValidPublic=G;const H=function(p,v=!1){if((0,g.assertIsBuffer)(p),v&&p.length!==64&&(p=Z.dist.Buffer.from(o.secp256k1.ProjectivePoint.fromHex(p).toRawBytes(!1).slice(1))),p.length!==64)throw new Error("Expected pubKey to be of length 64");return Z.dist.Buffer.from((0,n.keccak256)(p)).slice(-20)};e.pubToAddress=H,e.publicToAddress=e.pubToAddress;const P=function(p){return(0,g.assertIsBuffer)(p),Z.dist.Buffer.from(o.secp256k1.ProjectivePoint.fromPrivateKey(p).toRawBytes(!1).slice(1))};e.privateToPublic=P;const C=function(p){return(0,e.publicToAddress)((0,e.privateToPublic)(p))};e.privateToAddress=C;const J=function(p){return(0,g.assertIsBuffer)(p),p.length!==64&&(p=Z.dist.Buffer.from(o.secp256k1.ProjectivePoint.fromHex(p).toRawBytes(!1).slice(1))),p};e.importPublic=J;const ae=function(){const v=(0,f.zeros)(20);return(0,f.bufferToHex)(v)};e.zeroAddress=ae;const ie=function(p){try{(0,g.assertIsString)(p)}catch{return!1}return(0,e.zeroAddress)()===p};e.isZeroAddress=ie;function _e(p){const[v,A,B,W]=p;return[v,A,(0,f.arrToBufArr)(B).length===0?u.KECCAK256_RLP:B,(0,f.arrToBufArr)(W).length===0?u.KECCAK256_NULL:W]}e.accountBodyFromSlim=_e;const ce=new Uint8Array(0);function Ie(p){const[v,A,B,W]=p;return[v,A,(0,f.arrToBufArr)(B).equals(u.KECCAK256_RLP)?ce:B,(0,f.arrToBufArr)(W).equals(u.KECCAK256_NULL)?ce:W]}e.accountBodyToSlim=Ie;function we(p,v=!0){const A=v?_e(p):p;return(0,f.arrToBufArr)(t.RLP.encode(A))}e.accountBodyToRLP=we})(wd);var Cs={};Object.defineProperty(Cs,"__esModule",{value:!0});Cs.Address=void 0;const us=wd,Za=Wi;class zr{constructor(t){if(t.length!==20)throw new Error("Invalid address length");this.buf=t}static zero(){return new zr((0,Za.zeros)(20))}static fromString(t){if(!(0,us.isValidAddress)(t))throw new Error("Invalid address");return new zr((0,Za.toBuffer)(t))}static fromPublicKey(t){if(!Z.dist.Buffer.isBuffer(t))throw new Error("Public key should be Buffer");const n=(0,us.pubToAddress)(t);return new zr(n)}static fromPrivateKey(t){if(!Z.dist.Buffer.isBuffer(t))throw new Error("Private key should be Buffer");const n=(0,us.privateToAddress)(t);return new zr(n)}static generate(t,n){if(typeof n!="bigint")throw new Error("Expected nonce to be a bigint");return new zr((0,us.generateAddress)(t.buf,(0,Za.bigIntToBuffer)(n)))}static generate2(t,n,o){if(!Z.dist.Buffer.isBuffer(n))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 zr((0,us.generateAddress2)(t.buf,n,o))}equals(t){return this.buf.equals(t.buf)}isZero(){return this.equals(zr.zero())}isPrecompileOrSystemAddress(){const t=(0,Za.bufferToBigInt)(this.buf),n=BigInt(0),o=BigInt("0xffff");return t>=n&&t<=o}toString(){return"0x"+this.buf.toString("hex")}toBuffer(){return Z.dist.Buffer.from(this.buf)}}Cs.Address=zr;var Vf={},Ed={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.toType=e.TypeOutput=void 0;const t=Wi,n=Pt;var o;(function(f){f[f.Number=0]="Number",f[f.BigInt=1]="BigInt",f[f.Buffer=2]="Buffer",f[f.PrefixedHexString=3]="PrefixedHexString"})(o=e.TypeOutput||(e.TypeOutput={}));function a(f,u){if(f===null)return null;if(f===void 0)return;if(typeof f=="string"&&!(0,n.isHexString)(f))throw new Error(`A string must be provided with a 0x-prefix, given: ${f}`);if(typeof f=="number"&&!Number.isSafeInteger(f))throw new Error("The provided number is greater than MAX_SAFE_INTEGER (please use an alternative input type)");const g=(0,t.toBuffer)(f);switch(u){case o.Buffer:return g;case o.BigInt:return(0,t.bufferToBigInt)(g);case o.Number:{const d=(0,t.bufferToBigInt)(g);if(d>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(d)}case o.PrefixedHexString:return(0,t.bufferToHex)(g);default:throw new Error("unknown outputType")}}e.toType=a})(Ed);Object.defineProperty(Vf,"__esModule",{value:!0});Vf.Withdrawal=void 0;const o_=Cs,zl=Wi,zt=Ed;class gs{constructor(t,n,o,a){this.index=t,this.validatorIndex=n,this.address=o,this.amount=a}static fromWithdrawalData(t){const{index:n,validatorIndex:o,address:a,amount:f}=t,u=(0,zt.toType)(n,zt.TypeOutput.BigInt),g=(0,zt.toType)(o,zt.TypeOutput.BigInt),d=new o_.Address((0,zt.toType)(a,zt.TypeOutput.Buffer)),h=(0,zt.toType)(f,zt.TypeOutput.BigInt);return new gs(u,g,d,h)}static fromValuesArray(t){if(t.length!==4)throw Error(`Invalid withdrawalArray length expected=4 actual=${t.length}`);const[n,o,a,f]=t;return gs.fromWithdrawalData({index:n,validatorIndex:o,address:a,amount:f})}static toBufferArray(t){const{index:n,validatorIndex:o,address:a,amount:f}=t,u=(0,zt.toType)(n,zt.TypeOutput.BigInt)===BigInt(0)?Z.dist.Buffer.alloc(0):(0,zt.toType)(n,zt.TypeOutput.Buffer),g=(0,zt.toType)(o,zt.TypeOutput.BigInt)===BigInt(0)?Z.dist.Buffer.alloc(0):(0,zt.toType)(o,zt.TypeOutput.Buffer);let d;a instanceof o_.Address?d=a.buf:d=(0,zt.toType)(a,zt.TypeOutput.Buffer);const h=(0,zt.toType)(f,zt.TypeOutput.BigInt)===BigInt(0)?Z.dist.Buffer.alloc(0):(0,zt.toType)(f,zt.TypeOutput.Buffer);return[u,g,d,h]}raw(){return gs.toBufferArray(this)}toValue(){return{index:this.index,validatorIndex:this.validatorIndex,address:this.address.buf,amount:this.amount}}toJSON(){return{index:(0,zl.bigIntToHex)(this.index),validatorIndex:(0,zl.bigIntToHex)(this.validatorIndex),address:"0x"+this.address.buf.toString("hex"),amount:(0,zl.bigIntToHex)(this.amount)}}}Vf.Withdrawal=gs;var pn={};Object.defineProperty(pn,"__esModule",{value:!0});pn.hashPersonalMessage=pn.isValidSignature=pn.fromRpcSig=pn.toCompactSig=pn.toRpcSig=pn.ecrecover=pn.ecsign=void 0;const xN=cr,wy=Mf,On=Wi,ql=Df,DN=Qn;function MN(e,t,n){const o=wy.secp256k1.sign(e,t),a=o.toCompactRawBytes(),f=Z.dist.Buffer.from(a.slice(0,32)),u=Z.dist.Buffer.from(a.slice(32,64)),g=n===void 0?BigInt(o.recovery+27):BigInt(o.recovery+35)+BigInt(n)*BigInt(2);return{r:f,s:u,v:g}}pn.ecsign=MN;function Zf(e,t){return e===BigInt(0)||e===BigInt(1)?e:t===void 0?e-BigInt(27):e-(t*BigInt(2)+BigInt(35))}function Kf(e){return e===BigInt(0)||e===BigInt(1)}const kN=function(e,t,n,o,a){const f=Z.dist.Buffer.concat([(0,On.setLengthLeft)(n,32),(0,On.setLengthLeft)(o,32)],64),u=Zf(t,a);if(!Kf(u))throw new Error("Invalid signature v value");const d=wy.secp256k1.Signature.fromCompact(f).addRecoveryBit(Number(u)).recoverPublicKey(e);return Z.dist.Buffer.from(d.toRawBytes(!1).slice(1))};pn.ecrecover=kN;const FN=function(e,t,n,o){const a=Zf(e,o);if(!Kf(a))throw new Error("Invalid signature v value");return(0,On.bufferToHex)(Z.dist.Buffer.concat([(0,On.setLengthLeft)(t,32),(0,On.setLengthLeft)(n,32),(0,On.toBuffer)(e)]))};pn.toRpcSig=FN;const UN=function(e,t,n,o){const a=Zf(e,o);if(!Kf(a))throw new Error("Invalid signature v value");let f=n;return(e>BigInt(28)&&e%BigInt(2)===BigInt(1)||e===BigInt(1)||e===BigInt(28))&&(f=Z.dist.Buffer.from(n),f[0]|=128),(0,On.bufferToHex)(Z.dist.Buffer.concat([(0,On.setLengthLeft)(t,32),(0,On.setLengthLeft)(f,32)]))};pn.toCompactSig=UN;const jN=function(e){const t=(0,On.toBuffer)(e);let n,o,a;if(t.length>=65)n=t.slice(0,32),o=t.slice(32,64),a=(0,On.bufferToBigInt)(t.slice(64));else if(t.length===64)n=t.slice(0,32),o=t.slice(32,64),a=BigInt((0,On.bufferToInt)(t.slice(32,33))>>7),o[0]&=127;else throw new Error("Invalid signature length");return a<27&&(a=a+BigInt(27)),{v:a,r:n,s:o}};pn.fromRpcSig=jN;const HN=function(e,t,n,o=!0,a){if(t.length!==32||n.length!==32||!Kf(Zf(e,a)))return!1;const f=(0,On.bufferToBigInt)(t),u=(0,On.bufferToBigInt)(n);return!(f===BigInt(0)||f>=ql.SECP256K1_ORDER||u===BigInt(0)||u>=ql.SECP256K1_ORDER||o&&u>=ql.SECP256K1_ORDER_DIV_2)};pn.isValidSignature=HN;const WN=function(e){(0,DN.assertIsBuffer)(e);const t=Z.dist.Buffer.from(`Ethereum Signed Message:
|
|
3
3
|
${e.length}`,"utf-8");return Z.dist.Buffer.from((0,xN.keccak256)(Z.dist.Buffer.concat([t,e])))};pn.hashPersonalMessage=WN;var my={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.compactBytesToNibbles=e.bytesToNibbles=e.nibblesToCompactBytes=e.nibblesToBytes=e.hasTerminator=void 0;const t=u=>u.length>0&&u[u.length-1]===16;e.hasTerminator=t;const n=(u,g)=>{for(let d=0,h=0;h<u.length;d+=1,h+=2)g[d]=u[h]<<4|u[h+1]};e.nibblesToBytes=n;const o=u=>{let g=0;(0,e.hasTerminator)(u)&&(g=1,u=u.subarray(0,u.length-1));const d=new Uint8Array(u.length/2+1);return d[0]=g<<5,(u.length&1)===1&&(d[0]|=16,d[0]|=u[0],u=u.subarray(1)),(0,e.nibblesToBytes)(u,d.subarray(1)),d};e.nibblesToCompactBytes=o;const a=u=>{const g=u.length*2+1,d=new Uint8Array(g);for(let h=0;h<u.length;h++){const _=u[h];d[h*2]=_/16,d[h*2+1]=_%16}return d[g-1]=16,d};e.bytesToNibbles=a;const f=u=>{if(u.length===0)return u;let g=(0,e.bytesToNibbles)(u);g[0]<2&&(g=g.subarray(0,g.length-1));const d=2-(g[0]&1);return g.subarray(d)};e.compactBytesToNibbles=f})(my);var Jf={};Object.defineProperty(Jf,"__esModule",{value:!0});Jf.AsyncEventEmitter=void 0;const zN=Z.requireEvents();async function qN(e,t,n){let o;for await(const a of t)try{a.length<2?a.call(e,n):await new Promise((f,u)=>{a.call(e,n,g=>{g?u(g):f()})})}catch(f){o=f}if(o)throw o}class GN extends zN.EventEmitter{emit(t,...n){let[o,a]=n;const f=this;let u=f._events[t]??[];return a===void 0&&typeof o=="function"&&(a=o,o=void 0),(t==="newListener"||t==="removeListener")&&(o={event:o,fn:a},a=void 0),u=Array.isArray(u)?u:[u],qN(f,u.slice(),o).then(a).catch(a),f.listenerCount(t)>0}once(t,n){const o=this;let a;if(typeof n!="function")throw new TypeError("listener must be a function");return n.length>=2?a=function(f,u){o.removeListener(t,a),n(f,u)}:a=function(f){o.removeListener(t,a),n(f,a)},o.on(t,a),o}first(t,n){let o=this._events[t]??[];if(typeof n!="function")throw new TypeError("listener must be a function");return Array.isArray(o)||(this._events[t]=o=[o]),o.unshift(n),this}before(t,n,o){return this.beforeOrAfter(t,n,o)}after(t,n,o){return this.beforeOrAfter(t,n,o,"after")}beforeOrAfter(t,n,o,a){let f=this._events[t]??[],u,g;const d=a==="after"?1:0;if(typeof o!="function")throw new TypeError("listener must be a function");if(typeof n!="function")throw new TypeError("target must be a function");for(Array.isArray(f)||(this._events[t]=f=[f]),g=f.length,u=f.length;u--;)if(f[u]===n){g=u+d;break}return f.splice(g,0,o),this}on(t,n){return super.on(t,n)}addListener(t,n){return super.addListener(t,n)}prependListener(t,n){return super.prependListener(t,n)}prependOnceListener(t,n){return super.prependOnceListener(t,n)}removeAllListeners(t){return super.removeAllListeners(t)}removeListener(t,n){return super.removeListener(t,n)}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)}}Jf.AsyncEventEmitter=GN;var Xf={};Object.defineProperty(Xf,"__esModule",{value:!0});Xf.Lock=void 0;class VN{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)}}}Xf.Lock=VN;var Ao={},Di={},Gl={},Vl={},Zl,s_;function ZN(){if(s_)return Zl;s_=1;function e(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}return Zl=e,Zl}var ur={},Kl={},a_;function Yf(){return a_||(a_=1,function(e){var t=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function n(f,u){return Object.prototype.hasOwnProperty.call(f,u)}e.assign=function(f){for(var u=Array.prototype.slice.call(arguments,1);u.length;){var g=u.shift();if(g){if(typeof g!="object")throw new TypeError(g+"must be non-object");for(var d in g)n(g,d)&&(f[d]=g[d])}}return f},e.shrinkBuf=function(f,u){return f.length===u?f:f.subarray?f.subarray(0,u):(f.length=u,f)};var o={arraySet:function(f,u,g,d,h){if(u.subarray&&f.subarray){f.set(u.subarray(g,g+d),h);return}for(var _=0;_<d;_++)f[h+_]=u[g+_]},flattenChunks:function(f){var u,g,d,h,_,y;for(d=0,u=0,g=f.length;u<g;u++)d+=f[u].length;for(y=new Uint8Array(d),h=0,u=0,g=f.length;u<g;u++)_=f[u],y.set(_,h),h+=_.length;return y}},a={arraySet:function(f,u,g,d,h){for(var _=0;_<d;_++)f[h+_]=u[g+_]},flattenChunks:function(f){return[].concat.apply([],f)}};e.setTyped=function(f){f?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,o)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,a))},e.setTyped(t)}(Kl)),Kl}var Li={},f_;function KN(){if(f_)return Li;f_=1;var e=Yf(),t=4,n=0,o=1,a=2;function f(T){for(var ve=T.length;--ve>=0;)T[ve]=0}var u=0,g=1,d=2,h=3,_=258,y=29,E=256,m=E+1+y,N=30,k=19,U=2*m+1,G=15,H=16,P=7,C=256,J=16,ae=17,ie=18,_e=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ce=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],we=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],p=512,v=new Array((m+2)*2);f(v);var A=new Array(N*2);f(A);var B=new Array(p);f(B);var W=new Array(_-h+1);f(W);var D=new Array(y);f(D);var X=new Array(N);f(X);function M(T,ve,Le,De,K){this.static_tree=T,this.extra_bits=ve,this.extra_base=Le,this.elems=De,this.max_length=K,this.has_stree=T&&T.length}var q,ne,he;function ee(T,ve){this.dyn_tree=T,this.max_code=0,this.stat_desc=ve}function me(T){return T<256?B[T]:B[256+(T>>>7)]}function pe(T,ve){T.pending_buf[T.pending++]=ve&255,T.pending_buf[T.pending++]=ve>>>8&255}function Re(T,ve,Le){T.bi_valid>H-Le?(T.bi_buf|=ve<<T.bi_valid&65535,pe(T,T.bi_buf),T.bi_buf=ve>>H-T.bi_valid,T.bi_valid+=Le-H):(T.bi_buf|=ve<<T.bi_valid&65535,T.bi_valid+=Le)}function Fe(T,ve,Le){Re(T,Le[ve*2],Le[ve*2+1])}function Pe(T,ve){var Le=0;do Le|=T&1,T>>>=1,Le<<=1;while(--ve>0);return Le>>>1}function $e(T){T.bi_valid===16?(pe(T,T.bi_buf),T.bi_buf=0,T.bi_valid=0):T.bi_valid>=8&&(T.pending_buf[T.pending++]=T.bi_buf&255,T.bi_buf>>=8,T.bi_valid-=8)}function Qe(T,ve){var Le=ve.dyn_tree,De=ve.max_code,K=ve.stat_desc.static_tree,de=ve.stat_desc.has_stree,w=ve.stat_desc.extra_bits,Ae=ve.stat_desc.extra_base,Ge=ve.stat_desc.max_length,l,se,fe,R,z,oe,Ue=0;for(R=0;R<=G;R++)T.bl_count[R]=0;for(Le[T.heap[T.heap_max]*2+1]=0,l=T.heap_max+1;l<U;l++)se=T.heap[l],R=Le[Le[se*2+1]*2+1]+1,R>Ge&&(R=Ge,Ue++),Le[se*2+1]=R,!(se>De)&&(T.bl_count[R]++,z=0,se>=Ae&&(z=w[se-Ae]),oe=Le[se*2],T.opt_len+=oe*(R+z),de&&(T.static_len+=oe*(K[se*2+1]+z)));if(Ue!==0){do{for(R=Ge-1;T.bl_count[R]===0;)R--;T.bl_count[R]--,T.bl_count[R+1]+=2,T.bl_count[Ge]--,Ue-=2}while(Ue>0);for(R=Ge;R!==0;R--)for(se=T.bl_count[R];se!==0;)fe=T.heap[--l],!(fe>De)&&(Le[fe*2+1]!==R&&(T.opt_len+=(R-Le[fe*2+1])*Le[fe*2],Le[fe*2+1]=R),se--)}}function Ke(T,ve,Le){var De=new Array(G+1),K=0,de,w;for(de=1;de<=G;de++)De[de]=K=K+Le[de-1]<<1;for(w=0;w<=ve;w++){var Ae=T[w*2+1];Ae!==0&&(T[w*2]=Pe(De[Ae]++,Ae))}}function We(){var T,ve,Le,De,K,de=new Array(G+1);for(Le=0,De=0;De<y-1;De++)for(D[De]=Le,T=0;T<1<<_e[De];T++)W[Le++]=De;for(W[Le-1]=De,K=0,De=0;De<16;De++)for(X[De]=K,T=0;T<1<<ce[De];T++)B[K++]=De;for(K>>=7;De<N;De++)for(X[De]=K<<7,T=0;T<1<<ce[De]-7;T++)B[256+K++]=De;for(ve=0;ve<=G;ve++)de[ve]=0;for(T=0;T<=143;)v[T*2+1]=8,T++,de[8]++;for(;T<=255;)v[T*2+1]=9,T++,de[9]++;for(;T<=279;)v[T*2+1]=7,T++,de[7]++;for(;T<=287;)v[T*2+1]=8,T++,de[8]++;for(Ke(v,m+1,de),T=0;T<N;T++)A[T*2+1]=5,A[T*2]=Pe(T,5);q=new M(v,_e,E+1,m,G),ne=new M(A,ce,0,N,G),he=new M(new Array(0),Ie,0,k,P)}function x(T){var ve;for(ve=0;ve<m;ve++)T.dyn_ltree[ve*2]=0;for(ve=0;ve<N;ve++)T.dyn_dtree[ve*2]=0;for(ve=0;ve<k;ve++)T.bl_tree[ve*2]=0;T.dyn_ltree[C*2]=1,T.opt_len=T.static_len=0,T.last_lit=T.matches=0}function j(T){T.bi_valid>8?pe(T,T.bi_buf):T.bi_valid>0&&(T.pending_buf[T.pending++]=T.bi_buf),T.bi_buf=0,T.bi_valid=0}function re(T,ve,Le,De){j(T),pe(T,Le),pe(T,~Le),e.arraySet(T.pending_buf,T.window,ve,Le,T.pending),T.pending+=Le}function Te(T,ve,Le,De){var K=ve*2,de=Le*2;return T[K]<T[de]||T[K]===T[de]&&De[ve]<=De[Le]}function ye(T,ve,Le){for(var De=T.heap[Le],K=Le<<1;K<=T.heap_len&&(K<T.heap_len&&Te(ve,T.heap[K+1],T.heap[K],T.depth)&&K++,!Te(ve,De,T.heap[K],T.depth));)T.heap[Le]=T.heap[K],Le=K,K<<=1;T.heap[Le]=De}function Ne(T,ve,Le){var De,K,de=0,w,Ae;if(T.last_lit!==0)do De=T.pending_buf[T.d_buf+de*2]<<8|T.pending_buf[T.d_buf+de*2+1],K=T.pending_buf[T.l_buf+de],de++,De===0?Fe(T,K,ve):(w=W[K],Fe(T,w+E+1,ve),Ae=_e[w],Ae!==0&&(K-=D[w],Re(T,K,Ae)),De--,w=me(De),Fe(T,w,Le),Ae=ce[w],Ae!==0&&(De-=X[w],Re(T,De,Ae)));while(de<T.last_lit);Fe(T,C,ve)}function qe(T,ve){var Le=ve.dyn_tree,De=ve.stat_desc.static_tree,K=ve.stat_desc.has_stree,de=ve.stat_desc.elems,w,Ae,Ge=-1,l;for(T.heap_len=0,T.heap_max=U,w=0;w<de;w++)Le[w*2]!==0?(T.heap[++T.heap_len]=Ge=w,T.depth[w]=0):Le[w*2+1]=0;for(;T.heap_len<2;)l=T.heap[++T.heap_len]=Ge<2?++Ge:0,Le[l*2]=1,T.depth[l]=0,T.opt_len--,K&&(T.static_len-=De[l*2+1]);for(ve.max_code=Ge,w=T.heap_len>>1;w>=1;w--)ye(T,Le,w);l=de;do w=T.heap[1],T.heap[1]=T.heap[T.heap_len--],ye(T,Le,1),Ae=T.heap[1],T.heap[--T.heap_max]=w,T.heap[--T.heap_max]=Ae,Le[l*2]=Le[w*2]+Le[Ae*2],T.depth[l]=(T.depth[w]>=T.depth[Ae]?T.depth[w]:T.depth[Ae])+1,Le[w*2+1]=Le[Ae*2+1]=l,T.heap[1]=l++,ye(T,Le,1);while(T.heap_len>=2);T.heap[--T.heap_max]=T.heap[1],Qe(T,ve),Ke(Le,Ge,T.bl_count)}function He(T,ve,Le){var De,K=-1,de,w=ve[0*2+1],Ae=0,Ge=7,l=4;for(w===0&&(Ge=138,l=3),ve[(Le+1)*2+1]=65535,De=0;De<=Le;De++)de=w,w=ve[(De+1)*2+1],!(++Ae<Ge&&de===w)&&(Ae<l?T.bl_tree[de*2]+=Ae:de!==0?(de!==K&&T.bl_tree[de*2]++,T.bl_tree[J*2]++):Ae<=10?T.bl_tree[ae*2]++:T.bl_tree[ie*2]++,Ae=0,K=de,w===0?(Ge=138,l=3):de===w?(Ge=6,l=3):(Ge=7,l=4))}function tt(T,ve,Le){var De,K=-1,de,w=ve[0*2+1],Ae=0,Ge=7,l=4;for(w===0&&(Ge=138,l=3),De=0;De<=Le;De++)if(de=w,w=ve[(De+1)*2+1],!(++Ae<Ge&&de===w)){if(Ae<l)do Fe(T,de,T.bl_tree);while(--Ae!==0);else de!==0?(de!==K&&(Fe(T,de,T.bl_tree),Ae--),Fe(T,J,T.bl_tree),Re(T,Ae-3,2)):Ae<=10?(Fe(T,ae,T.bl_tree),Re(T,Ae-3,3)):(Fe(T,ie,T.bl_tree),Re(T,Ae-11,7));Ae=0,K=de,w===0?(Ge=138,l=3):de===w?(Ge=6,l=3):(Ge=7,l=4)}}function xe(T){var ve;for(He(T,T.dyn_ltree,T.l_desc.max_code),He(T,T.dyn_dtree,T.d_desc.max_code),qe(T,T.bl_desc),ve=k-1;ve>=3&&T.bl_tree[we[ve]*2+1]===0;ve--);return T.opt_len+=3*(ve+1)+5+5+4,ve}function at(T,ve,Le,De){var K;for(Re(T,ve-257,5),Re(T,Le-1,5),Re(T,De-4,4),K=0;K<De;K++)Re(T,T.bl_tree[we[K]*2+1],3);tt(T,T.dyn_ltree,ve-1),tt(T,T.dyn_dtree,Le-1)}function Mt(T){var ve=4093624447,Le;for(Le=0;Le<=31;Le++,ve>>>=1)if(ve&1&&T.dyn_ltree[Le*2]!==0)return n;if(T.dyn_ltree[9*2]!==0||T.dyn_ltree[10*2]!==0||T.dyn_ltree[13*2]!==0)return o;for(Le=32;Le<E;Le++)if(T.dyn_ltree[Le*2]!==0)return o;return n}var _t=!1;function fn(T){_t||(We(),_t=!0),T.l_desc=new ee(T.dyn_ltree,q),T.d_desc=new ee(T.dyn_dtree,ne),T.bl_desc=new ee(T.bl_tree,he),T.bi_buf=0,T.bi_valid=0,x(T)}function Rt(T,ve,Le,De){Re(T,(u<<1)+(De?1:0),3),re(T,ve,Le)}function ut(T){Re(T,g<<1,3),Fe(T,C,v),$e(T)}function $t(T,ve,Le,De){var K,de,w=0;T.level>0?(T.strm.data_type===a&&(T.strm.data_type=Mt(T)),qe(T,T.l_desc),qe(T,T.d_desc),w=xe(T),K=T.opt_len+3+7>>>3,de=T.static_len+3+7>>>3,de<=K&&(K=de)):K=de=Le+5,Le+4<=K&&ve!==-1?Rt(T,ve,Le,De):T.strategy===t||de===K?(Re(T,(g<<1)+(De?1:0),3),Ne(T,v,A)):(Re(T,(d<<1)+(De?1:0),3),at(T,T.l_desc.max_code+1,T.d_desc.max_code+1,w+1),Ne(T,T.dyn_ltree,T.dyn_dtree)),x(T),De&&j(T)}function kt(T,ve,Le){return T.pending_buf[T.d_buf+T.last_lit*2]=ve>>>8&255,T.pending_buf[T.d_buf+T.last_lit*2+1]=ve&255,T.pending_buf[T.l_buf+T.last_lit]=Le&255,T.last_lit++,ve===0?T.dyn_ltree[Le*2]++:(T.matches++,ve--,T.dyn_ltree[(W[Le]+E+1)*2]++,T.dyn_dtree[me(ve)*2]++),T.last_lit===T.lit_bufsize-1}return Li._tr_init=fn,Li._tr_stored_block=Rt,Li._tr_flush_block=$t,Li._tr_tally=kt,Li._tr_align=ut,Li}var Jl,u_;function vy(){if(u_)return Jl;u_=1;function e(t,n,o,a){for(var f=t&65535|0,u=t>>>16&65535|0,g=0;o!==0;){g=o>2e3?2e3:o,o-=g;do f=f+n[a++]|0,u=u+f|0;while(--g);f%=65521,u%=65521}return f|u<<16|0}return Jl=e,Jl}var Xl,l_;function Ey(){if(l_)return Xl;l_=1;function e(){for(var o,a=[],f=0;f<256;f++){o=f;for(var u=0;u<8;u++)o=o&1?3988292384^o>>>1:o>>>1;a[f]=o}return a}var t=e();function n(o,a,f,u){var g=t,d=u+f;o^=-1;for(var h=u;h<d;h++)o=o>>>8^g[(o^a[h])&255];return o^-1}return Xl=n,Xl}var Yl,c_;function JN(){return c_||(c_=1,Yl={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}),Yl}var d_;function XN(){if(d_)return ur;d_=1;var e=Yf(),t=KN(),n=vy(),o=Ey(),a=JN(),f=0,u=1,g=3,d=4,h=5,_=0,y=1,E=-2,m=-3,N=-5,k=-1,U=1,G=2,H=3,P=4,C=0,J=2,ae=8,ie=9,_e=15,ce=8,Ie=29,we=256,p=we+1+Ie,v=30,A=19,B=2*p+1,W=15,D=3,X=258,M=X+D+1,q=32,ne=42,he=69,ee=73,me=91,pe=103,Re=113,Fe=666,Pe=1,$e=2,Qe=3,Ke=4,We=3;function x(l,se){return l.msg=a[se],se}function j(l){return(l<<1)-(l>4?9:0)}function re(l){for(var se=l.length;--se>=0;)l[se]=0}function Te(l){var se=l.state,fe=se.pending;fe>l.avail_out&&(fe=l.avail_out),fe!==0&&(e.arraySet(l.output,se.pending_buf,se.pending_out,fe,l.next_out),l.next_out+=fe,se.pending_out+=fe,l.total_out+=fe,l.avail_out-=fe,se.pending-=fe,se.pending===0&&(se.pending_out=0))}function ye(l,se){t._tr_flush_block(l,l.block_start>=0?l.block_start:-1,l.strstart-l.block_start,se),l.block_start=l.strstart,Te(l.strm)}function Ne(l,se){l.pending_buf[l.pending++]=se}function qe(l,se){l.pending_buf[l.pending++]=se>>>8&255,l.pending_buf[l.pending++]=se&255}function He(l,se,fe,R){var z=l.avail_in;return z>R&&(z=R),z===0?0:(l.avail_in-=z,e.arraySet(se,l.input,l.next_in,z,fe),l.state.wrap===1?l.adler=n(l.adler,se,z,fe):l.state.wrap===2&&(l.adler=o(l.adler,se,z,fe)),l.next_in+=z,l.total_in+=z,z)}function tt(l,se){var fe=l.max_chain_length,R=l.strstart,z,oe,Ue=l.prev_length,S=l.nice_match,L=l.strstart>l.w_size-M?l.strstart-(l.w_size-M):0,ge=l.window,Ce=l.w_mask,Be=l.prev,Ve=l.strstart+X,ft=ge[R+Ue-1],Ft=ge[R+Ue];l.prev_length>=l.good_match&&(fe>>=2),S>l.lookahead&&(S=l.lookahead);do if(z=se,!(ge[z+Ue]!==Ft||ge[z+Ue-1]!==ft||ge[z]!==ge[R]||ge[++z]!==ge[R+1])){R+=2,z++;do;while(ge[++R]===ge[++z]&&ge[++R]===ge[++z]&&ge[++R]===ge[++z]&&ge[++R]===ge[++z]&&ge[++R]===ge[++z]&&ge[++R]===ge[++z]&&ge[++R]===ge[++z]&&ge[++R]===ge[++z]&&R<Ve);if(oe=X-(Ve-R),R=Ve-X,oe>Ue){if(l.match_start=se,Ue=oe,oe>=S)break;ft=ge[R+Ue-1],Ft=ge[R+Ue]}}while((se=Be[se&Ce])>L&&--fe!==0);return Ue<=l.lookahead?Ue:l.lookahead}function xe(l){var se=l.w_size,fe,R,z,oe,Ue;do{if(oe=l.window_size-l.lookahead-l.strstart,l.strstart>=se+(se-M)){e.arraySet(l.window,l.window,se,se,0),l.match_start-=se,l.strstart-=se,l.block_start-=se,R=l.hash_size,fe=R;do z=l.head[--fe],l.head[fe]=z>=se?z-se:0;while(--R);R=se,fe=R;do z=l.prev[--fe],l.prev[fe]=z>=se?z-se:0;while(--R);oe+=se}if(l.strm.avail_in===0)break;if(R=He(l.strm,l.window,l.strstart+l.lookahead,oe),l.lookahead+=R,l.lookahead+l.insert>=D)for(Ue=l.strstart-l.insert,l.ins_h=l.window[Ue],l.ins_h=(l.ins_h<<l.hash_shift^l.window[Ue+1])&l.hash_mask;l.insert&&(l.ins_h=(l.ins_h<<l.hash_shift^l.window[Ue+D-1])&l.hash_mask,l.prev[Ue&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=Ue,Ue++,l.insert--,!(l.lookahead+l.insert<D)););}while(l.lookahead<M&&l.strm.avail_in!==0)}function at(l,se){var fe=65535;for(fe>l.pending_buf_size-5&&(fe=l.pending_buf_size-5);;){if(l.lookahead<=1){if(xe(l),l.lookahead===0&&se===f)return Pe;if(l.lookahead===0)break}l.strstart+=l.lookahead,l.lookahead=0;var R=l.block_start+fe;if((l.strstart===0||l.strstart>=R)&&(l.lookahead=l.strstart-R,l.strstart=R,ye(l,!1),l.strm.avail_out===0)||l.strstart-l.block_start>=l.w_size-M&&(ye(l,!1),l.strm.avail_out===0))return Pe}return l.insert=0,se===d?(ye(l,!0),l.strm.avail_out===0?Qe:Ke):(l.strstart>l.block_start&&(ye(l,!1),l.strm.avail_out===0),Pe)}function Mt(l,se){for(var fe,R;;){if(l.lookahead<M){if(xe(l),l.lookahead<M&&se===f)return Pe;if(l.lookahead===0)break}if(fe=0,l.lookahead>=D&&(l.ins_h=(l.ins_h<<l.hash_shift^l.window[l.strstart+D-1])&l.hash_mask,fe=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart),fe!==0&&l.strstart-fe<=l.w_size-M&&(l.match_length=tt(l,fe)),l.match_length>=D)if(R=t._tr_tally(l,l.strstart-l.match_start,l.match_length-D),l.lookahead-=l.match_length,l.match_length<=l.max_lazy_match&&l.lookahead>=D){l.match_length--;do l.strstart++,l.ins_h=(l.ins_h<<l.hash_shift^l.window[l.strstart+D-1])&l.hash_mask,fe=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart;while(--l.match_length!==0);l.strstart++}else l.strstart+=l.match_length,l.match_length=0,l.ins_h=l.window[l.strstart],l.ins_h=(l.ins_h<<l.hash_shift^l.window[l.strstart+1])&l.hash_mask;else R=t._tr_tally(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++;if(R&&(ye(l,!1),l.strm.avail_out===0))return Pe}return l.insert=l.strstart<D-1?l.strstart:D-1,se===d?(ye(l,!0),l.strm.avail_out===0?Qe:Ke):l.last_lit&&(ye(l,!1),l.strm.avail_out===0)?Pe:$e}function _t(l,se){for(var fe,R,z;;){if(l.lookahead<M){if(xe(l),l.lookahead<M&&se===f)return Pe;if(l.lookahead===0)break}if(fe=0,l.lookahead>=D&&(l.ins_h=(l.ins_h<<l.hash_shift^l.window[l.strstart+D-1])&l.hash_mask,fe=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart),l.prev_length=l.match_length,l.prev_match=l.match_start,l.match_length=D-1,fe!==0&&l.prev_length<l.max_lazy_match&&l.strstart-fe<=l.w_size-M&&(l.match_length=tt(l,fe),l.match_length<=5&&(l.strategy===U||l.match_length===D&&l.strstart-l.match_start>4096)&&(l.match_length=D-1)),l.prev_length>=D&&l.match_length<=l.prev_length){z=l.strstart+l.lookahead-D,R=t._tr_tally(l,l.strstart-1-l.prev_match,l.prev_length-D),l.lookahead-=l.prev_length-1,l.prev_length-=2;do++l.strstart<=z&&(l.ins_h=(l.ins_h<<l.hash_shift^l.window[l.strstart+D-1])&l.hash_mask,fe=l.prev[l.strstart&l.w_mask]=l.head[l.ins_h],l.head[l.ins_h]=l.strstart);while(--l.prev_length!==0);if(l.match_available=0,l.match_length=D-1,l.strstart++,R&&(ye(l,!1),l.strm.avail_out===0))return Pe}else if(l.match_available){if(R=t._tr_tally(l,0,l.window[l.strstart-1]),R&&ye(l,!1),l.strstart++,l.lookahead--,l.strm.avail_out===0)return Pe}else l.match_available=1,l.strstart++,l.lookahead--}return l.match_available&&(R=t._tr_tally(l,0,l.window[l.strstart-1]),l.match_available=0),l.insert=l.strstart<D-1?l.strstart:D-1,se===d?(ye(l,!0),l.strm.avail_out===0?Qe:Ke):l.last_lit&&(ye(l,!1),l.strm.avail_out===0)?Pe:$e}function fn(l,se){for(var fe,R,z,oe,Ue=l.window;;){if(l.lookahead<=X){if(xe(l),l.lookahead<=X&&se===f)return Pe;if(l.lookahead===0)break}if(l.match_length=0,l.lookahead>=D&&l.strstart>0&&(z=l.strstart-1,R=Ue[z],R===Ue[++z]&&R===Ue[++z]&&R===Ue[++z])){oe=l.strstart+X;do;while(R===Ue[++z]&&R===Ue[++z]&&R===Ue[++z]&&R===Ue[++z]&&R===Ue[++z]&&R===Ue[++z]&&R===Ue[++z]&&R===Ue[++z]&&z<oe);l.match_length=X-(oe-z),l.match_length>l.lookahead&&(l.match_length=l.lookahead)}if(l.match_length>=D?(fe=t._tr_tally(l,1,l.match_length-D),l.lookahead-=l.match_length,l.strstart+=l.match_length,l.match_length=0):(fe=t._tr_tally(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++),fe&&(ye(l,!1),l.strm.avail_out===0))return Pe}return l.insert=0,se===d?(ye(l,!0),l.strm.avail_out===0?Qe:Ke):l.last_lit&&(ye(l,!1),l.strm.avail_out===0)?Pe:$e}function Rt(l,se){for(var fe;;){if(l.lookahead===0&&(xe(l),l.lookahead===0)){if(se===f)return Pe;break}if(l.match_length=0,fe=t._tr_tally(l,0,l.window[l.strstart]),l.lookahead--,l.strstart++,fe&&(ye(l,!1),l.strm.avail_out===0))return Pe}return l.insert=0,se===d?(ye(l,!0),l.strm.avail_out===0?Qe:Ke):l.last_lit&&(ye(l,!1),l.strm.avail_out===0)?Pe:$e}function ut(l,se,fe,R,z){this.good_length=l,this.max_lazy=se,this.nice_length=fe,this.max_chain=R,this.func=z}var $t;$t=[new ut(0,0,0,0,at),new ut(4,4,8,4,Mt),new ut(4,5,16,8,Mt),new ut(4,6,32,32,Mt),new ut(4,4,16,16,_t),new ut(8,16,32,32,_t),new ut(8,16,128,128,_t),new ut(8,32,128,256,_t),new ut(32,128,258,1024,_t),new ut(32,258,258,4096,_t)];function kt(l){l.window_size=2*l.w_size,re(l.head),l.max_lazy_match=$t[l.level].max_lazy,l.good_match=$t[l.level].good_length,l.nice_match=$t[l.level].nice_length,l.max_chain_length=$t[l.level].max_chain,l.strstart=0,l.block_start=0,l.lookahead=0,l.insert=0,l.match_length=l.prev_length=D-1,l.match_available=0,l.ins_h=0}function T(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ae,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new e.Buf16(B*2),this.dyn_dtree=new e.Buf16((2*v+1)*2),this.bl_tree=new e.Buf16((2*A+1)*2),re(this.dyn_ltree),re(this.dyn_dtree),re(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new e.Buf16(W+1),this.heap=new e.Buf16(2*p+1),re(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new e.Buf16(2*p+1),re(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ve(l){var se;return!l||!l.state?x(l,E):(l.total_in=l.total_out=0,l.data_type=J,se=l.state,se.pending=0,se.pending_out=0,se.wrap<0&&(se.wrap=-se.wrap),se.status=se.wrap?ne:Re,l.adler=se.wrap===2?0:1,se.last_flush=f,t._tr_init(se),_)}function Le(l){var se=ve(l);return se===_&&kt(l.state),se}function De(l,se){return!l||!l.state||l.state.wrap!==2?E:(l.state.gzhead=se,_)}function K(l,se,fe,R,z,oe){if(!l)return E;var Ue=1;if(se===k&&(se=6),R<0?(Ue=0,R=-R):R>15&&(Ue=2,R-=16),z<1||z>ie||fe!==ae||R<8||R>15||se<0||se>9||oe<0||oe>P)return x(l,E);R===8&&(R=9);var S=new T;return l.state=S,S.strm=l,S.wrap=Ue,S.gzhead=null,S.w_bits=R,S.w_size=1<<S.w_bits,S.w_mask=S.w_size-1,S.hash_bits=z+7,S.hash_size=1<<S.hash_bits,S.hash_mask=S.hash_size-1,S.hash_shift=~~((S.hash_bits+D-1)/D),S.window=new e.Buf8(S.w_size*2),S.head=new e.Buf16(S.hash_size),S.prev=new e.Buf16(S.w_size),S.lit_bufsize=1<<z+6,S.pending_buf_size=S.lit_bufsize*4,S.pending_buf=new e.Buf8(S.pending_buf_size),S.d_buf=1*S.lit_bufsize,S.l_buf=3*S.lit_bufsize,S.level=se,S.strategy=oe,S.method=fe,Le(l)}function de(l,se){return K(l,se,ae,_e,ce,C)}function w(l,se){var fe,R,z,oe;if(!l||!l.state||se>h||se<0)return l?x(l,E):E;if(R=l.state,!l.output||!l.input&&l.avail_in!==0||R.status===Fe&&se!==d)return x(l,l.avail_out===0?N:E);if(R.strm=l,fe=R.last_flush,R.last_flush=se,R.status===ne)if(R.wrap===2)l.adler=0,Ne(R,31),Ne(R,139),Ne(R,8),R.gzhead?(Ne(R,(R.gzhead.text?1:0)+(R.gzhead.hcrc?2:0)+(R.gzhead.extra?4:0)+(R.gzhead.name?8:0)+(R.gzhead.comment?16:0)),Ne(R,R.gzhead.time&255),Ne(R,R.gzhead.time>>8&255),Ne(R,R.gzhead.time>>16&255),Ne(R,R.gzhead.time>>24&255),Ne(R,R.level===9?2:R.strategy>=G||R.level<2?4:0),Ne(R,R.gzhead.os&255),R.gzhead.extra&&R.gzhead.extra.length&&(Ne(R,R.gzhead.extra.length&255),Ne(R,R.gzhead.extra.length>>8&255)),R.gzhead.hcrc&&(l.adler=o(l.adler,R.pending_buf,R.pending,0)),R.gzindex=0,R.status=he):(Ne(R,0),Ne(R,0),Ne(R,0),Ne(R,0),Ne(R,0),Ne(R,R.level===9?2:R.strategy>=G||R.level<2?4:0),Ne(R,We),R.status=Re);else{var Ue=ae+(R.w_bits-8<<4)<<8,S=-1;R.strategy>=G||R.level<2?S=0:R.level<6?S=1:R.level===6?S=2:S=3,Ue|=S<<6,R.strstart!==0&&(Ue|=q),Ue+=31-Ue%31,R.status=Re,qe(R,Ue),R.strstart!==0&&(qe(R,l.adler>>>16),qe(R,l.adler&65535)),l.adler=1}if(R.status===he)if(R.gzhead.extra){for(z=R.pending;R.gzindex<(R.gzhead.extra.length&65535)&&!(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>z&&(l.adler=o(l.adler,R.pending_buf,R.pending-z,z)),Te(l),z=R.pending,R.pending===R.pending_buf_size));)Ne(R,R.gzhead.extra[R.gzindex]&255),R.gzindex++;R.gzhead.hcrc&&R.pending>z&&(l.adler=o(l.adler,R.pending_buf,R.pending-z,z)),R.gzindex===R.gzhead.extra.length&&(R.gzindex=0,R.status=ee)}else R.status=ee;if(R.status===ee)if(R.gzhead.name){z=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>z&&(l.adler=o(l.adler,R.pending_buf,R.pending-z,z)),Te(l),z=R.pending,R.pending===R.pending_buf_size)){oe=1;break}R.gzindex<R.gzhead.name.length?oe=R.gzhead.name.charCodeAt(R.gzindex++)&255:oe=0,Ne(R,oe)}while(oe!==0);R.gzhead.hcrc&&R.pending>z&&(l.adler=o(l.adler,R.pending_buf,R.pending-z,z)),oe===0&&(R.gzindex=0,R.status=me)}else R.status=me;if(R.status===me)if(R.gzhead.comment){z=R.pending;do{if(R.pending===R.pending_buf_size&&(R.gzhead.hcrc&&R.pending>z&&(l.adler=o(l.adler,R.pending_buf,R.pending-z,z)),Te(l),z=R.pending,R.pending===R.pending_buf_size)){oe=1;break}R.gzindex<R.gzhead.comment.length?oe=R.gzhead.comment.charCodeAt(R.gzindex++)&255:oe=0,Ne(R,oe)}while(oe!==0);R.gzhead.hcrc&&R.pending>z&&(l.adler=o(l.adler,R.pending_buf,R.pending-z,z)),oe===0&&(R.status=pe)}else R.status=pe;if(R.status===pe&&(R.gzhead.hcrc?(R.pending+2>R.pending_buf_size&&Te(l),R.pending+2<=R.pending_buf_size&&(Ne(R,l.adler&255),Ne(R,l.adler>>8&255),l.adler=0,R.status=Re)):R.status=Re),R.pending!==0){if(Te(l),l.avail_out===0)return R.last_flush=-1,_}else if(l.avail_in===0&&j(se)<=j(fe)&&se!==d)return x(l,N);if(R.status===Fe&&l.avail_in!==0)return x(l,N);if(l.avail_in!==0||R.lookahead!==0||se!==f&&R.status!==Fe){var L=R.strategy===G?Rt(R,se):R.strategy===H?fn(R,se):$t[R.level].func(R,se);if((L===Qe||L===Ke)&&(R.status=Fe),L===Pe||L===Qe)return l.avail_out===0&&(R.last_flush=-1),_;if(L===$e&&(se===u?t._tr_align(R):se!==h&&(t._tr_stored_block(R,0,0,!1),se===g&&(re(R.head),R.lookahead===0&&(R.strstart=0,R.block_start=0,R.insert=0))),Te(l),l.avail_out===0))return R.last_flush=-1,_}return se!==d?_:R.wrap<=0?y:(R.wrap===2?(Ne(R,l.adler&255),Ne(R,l.adler>>8&255),Ne(R,l.adler>>16&255),Ne(R,l.adler>>24&255),Ne(R,l.total_in&255),Ne(R,l.total_in>>8&255),Ne(R,l.total_in>>16&255),Ne(R,l.total_in>>24&255)):(qe(R,l.adler>>>16),qe(R,l.adler&65535)),Te(l),R.wrap>0&&(R.wrap=-R.wrap),R.pending!==0?_:y)}function Ae(l){var se;return!l||!l.state?E:(se=l.state.status,se!==ne&&se!==he&&se!==ee&&se!==me&&se!==pe&&se!==Re&&se!==Fe?x(l,E):(l.state=null,se===Re?x(l,m):_))}function Ge(l,se){var fe=se.length,R,z,oe,Ue,S,L,ge,Ce;if(!l||!l.state||(R=l.state,Ue=R.wrap,Ue===2||Ue===1&&R.status!==ne||R.lookahead))return E;for(Ue===1&&(l.adler=n(l.adler,se,fe,0)),R.wrap=0,fe>=R.w_size&&(Ue===0&&(re(R.head),R.strstart=0,R.block_start=0,R.insert=0),Ce=new e.Buf8(R.w_size),e.arraySet(Ce,se,fe-R.w_size,R.w_size,0),se=Ce,fe=R.w_size),S=l.avail_in,L=l.next_in,ge=l.input,l.avail_in=fe,l.next_in=0,l.input=se,xe(R);R.lookahead>=D;){z=R.strstart,oe=R.lookahead-(D-1);do R.ins_h=(R.ins_h<<R.hash_shift^R.window[z+D-1])&R.hash_mask,R.prev[z&R.w_mask]=R.head[R.ins_h],R.head[R.ins_h]=z,z++;while(--oe);R.strstart=z,R.lookahead=D-1,xe(R)}return R.strstart+=R.lookahead,R.block_start=R.strstart,R.insert=R.lookahead,R.lookahead=0,R.match_length=R.prev_length=D-1,R.match_available=0,l.next_in=L,l.input=ge,l.avail_in=S,R.wrap=Ue,_}return ur.deflateInit=de,ur.deflateInit2=K,ur.deflateReset=Le,ur.deflateResetKeep=ve,ur.deflateSetHeader=De,ur.deflate=w,ur.deflateEnd=Ae,ur.deflateSetDictionary=Ge,ur.deflateInfo="pako deflate (from Nodeca project)",ur}var Xn={},Ql,h_;function YN(){if(h_)return Ql;h_=1;var e=30,t=12;return Ql=function(o,a){var f,u,g,d,h,_,y,E,m,N,k,U,G,H,P,C,J,ae,ie,_e,ce,Ie,we,p,v;f=o.state,u=o.next_in,p=o.input,g=u+(o.avail_in-5),d=o.next_out,v=o.output,h=d-(a-o.avail_out),_=d+(o.avail_out-257),y=f.dmax,E=f.wsize,m=f.whave,N=f.wnext,k=f.window,U=f.hold,G=f.bits,H=f.lencode,P=f.distcode,C=(1<<f.lenbits)-1,J=(1<<f.distbits)-1;e:do{G<15&&(U+=p[u++]<<G,G+=8,U+=p[u++]<<G,G+=8),ae=H[U&C];t:for(;;){if(ie=ae>>>24,U>>>=ie,G-=ie,ie=ae>>>16&255,ie===0)v[d++]=ae&65535;else if(ie&16){_e=ae&65535,ie&=15,ie&&(G<ie&&(U+=p[u++]<<G,G+=8),_e+=U&(1<<ie)-1,U>>>=ie,G-=ie),G<15&&(U+=p[u++]<<G,G+=8,U+=p[u++]<<G,G+=8),ae=P[U&J];n:for(;;){if(ie=ae>>>24,U>>>=ie,G-=ie,ie=ae>>>16&255,ie&16){if(ce=ae&65535,ie&=15,G<ie&&(U+=p[u++]<<G,G+=8,G<ie&&(U+=p[u++]<<G,G+=8)),ce+=U&(1<<ie)-1,ce>y){o.msg="invalid distance too far back",f.mode=e;break e}if(U>>>=ie,G-=ie,ie=d-h,ce>ie){if(ie=ce-ie,ie>m&&f.sane){o.msg="invalid distance too far back",f.mode=e;break e}if(Ie=0,we=k,N===0){if(Ie+=E-ie,ie<_e){_e-=ie;do v[d++]=k[Ie++];while(--ie);Ie=d-ce,we=v}}else if(N<ie){if(Ie+=E+N-ie,ie-=N,ie<_e){_e-=ie;do v[d++]=k[Ie++];while(--ie);if(Ie=0,N<_e){ie=N,_e-=ie;do v[d++]=k[Ie++];while(--ie);Ie=d-ce,we=v}}}else if(Ie+=N-ie,ie<_e){_e-=ie;do v[d++]=k[Ie++];while(--ie);Ie=d-ce,we=v}for(;_e>2;)v[d++]=we[Ie++],v[d++]=we[Ie++],v[d++]=we[Ie++],_e-=3;_e&&(v[d++]=we[Ie++],_e>1&&(v[d++]=we[Ie++]))}else{Ie=d-ce;do v[d++]=v[Ie++],v[d++]=v[Ie++],v[d++]=v[Ie++],_e-=3;while(_e>2);_e&&(v[d++]=v[Ie++],_e>1&&(v[d++]=v[Ie++]))}}else if(ie&64){o.msg="invalid distance code",f.mode=e;break e}else{ae=P[(ae&65535)+(U&(1<<ie)-1)];continue n}break}}else if(ie&64)if(ie&32){f.mode=t;break e}else{o.msg="invalid literal/length code",f.mode=e;break e}else{ae=H[(ae&65535)+(U&(1<<ie)-1)];continue t}break}}while(u<g&&d<_);_e=G>>3,u-=_e,G-=_e<<3,U&=(1<<G)-1,o.next_in=u,o.next_out=d,o.avail_in=u<g?5+(g-u):5-(u-g),o.avail_out=d<_?257+(_-d):257-(d-_),f.hold=U,f.bits=G},Ql}var ec,g_;function QN(){if(g_)return ec;g_=1;var e=Yf(),t=15,n=852,o=592,a=0,f=1,u=2,g=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],d=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],_=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];return ec=function(E,m,N,k,U,G,H,P){var C=P.bits,J=0,ae=0,ie=0,_e=0,ce=0,Ie=0,we=0,p=0,v=0,A=0,B,W,D,X,M,q=null,ne=0,he,ee=new e.Buf16(t+1),me=new e.Buf16(t+1),pe=null,Re=0,Fe,Pe,$e;for(J=0;J<=t;J++)ee[J]=0;for(ae=0;ae<k;ae++)ee[m[N+ae]]++;for(ce=C,_e=t;_e>=1&&ee[_e]===0;_e--);if(ce>_e&&(ce=_e),_e===0)return U[G++]=1<<24|64<<16|0,U[G++]=1<<24|64<<16|0,P.bits=1,0;for(ie=1;ie<_e&&ee[ie]===0;ie++);for(ce<ie&&(ce=ie),p=1,J=1;J<=t;J++)if(p<<=1,p-=ee[J],p<0)return-1;if(p>0&&(E===a||_e!==1))return-1;for(me[1]=0,J=1;J<t;J++)me[J+1]=me[J]+ee[J];for(ae=0;ae<k;ae++)m[N+ae]!==0&&(H[me[m[N+ae]]++]=ae);if(E===a?(q=pe=H,he=19):E===f?(q=g,ne-=257,pe=d,Re-=257,he=256):(q=h,pe=_,he=-1),A=0,ae=0,J=ie,M=G,Ie=ce,we=0,D=-1,v=1<<ce,X=v-1,E===f&&v>n||E===u&&v>o)return 1;for(;;){Fe=J-we,H[ae]<he?(Pe=0,$e=H[ae]):H[ae]>he?(Pe=pe[Re+H[ae]],$e=q[ne+H[ae]]):(Pe=96,$e=0),B=1<<J-we,W=1<<Ie,ie=W;do W-=B,U[M+(A>>we)+W]=Fe<<24|Pe<<16|$e|0;while(W!==0);for(B=1<<J-1;A&B;)B>>=1;if(B!==0?(A&=B-1,A+=B):A=0,ae++,--ee[J]===0){if(J===_e)break;J=m[N+H[ae]]}if(J>ce&&(A&X)!==D){for(we===0&&(we=ce),M+=ie,Ie=J-we,p=1<<Ie;Ie+we<_e&&(p-=ee[Ie+we],!(p<=0));)Ie++,p<<=1;if(v+=1<<Ie,E===f&&v>n||E===u&&v>o)return 1;D=A&X,U[D]=ce<<24|Ie<<16|M-G|0}}return A!==0&&(U[M+A]=J-we<<24|64<<16|0),P.bits=ce,0},ec}var __;function eB(){if(__)return Xn;__=1;var e=Yf(),t=vy(),n=Ey(),o=YN(),a=QN(),f=0,u=1,g=2,d=4,h=5,_=6,y=0,E=1,m=2,N=-2,k=-3,U=-4,G=-5,H=8,P=1,C=2,J=3,ae=4,ie=5,_e=6,ce=7,Ie=8,we=9,p=10,v=11,A=12,B=13,W=14,D=15,X=16,M=17,q=18,ne=19,he=20,ee=21,me=22,pe=23,Re=24,Fe=25,Pe=26,$e=27,Qe=28,Ke=29,We=30,x=31,j=32,re=852,Te=592,ye=15,Ne=ye;function qe(K){return(K>>>24&255)+(K>>>8&65280)+((K&65280)<<8)+((K&255)<<24)}function He(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function tt(K){var de;return!K||!K.state?N:(de=K.state,K.total_in=K.total_out=de.total=0,K.msg="",de.wrap&&(K.adler=de.wrap&1),de.mode=P,de.last=0,de.havedict=0,de.dmax=32768,de.head=null,de.hold=0,de.bits=0,de.lencode=de.lendyn=new e.Buf32(re),de.distcode=de.distdyn=new e.Buf32(Te),de.sane=1,de.back=-1,y)}function xe(K){var de;return!K||!K.state?N:(de=K.state,de.wsize=0,de.whave=0,de.wnext=0,tt(K))}function at(K,de){var w,Ae;return!K||!K.state||(Ae=K.state,de<0?(w=0,de=-de):(w=(de>>4)+1,de<48&&(de&=15)),de&&(de<8||de>15))?N:(Ae.window!==null&&Ae.wbits!==de&&(Ae.window=null),Ae.wrap=w,Ae.wbits=de,xe(K))}function Mt(K,de){var w,Ae;return K?(Ae=new He,K.state=Ae,Ae.window=null,w=at(K,de),w!==y&&(K.state=null),w):N}function _t(K){return Mt(K,Ne)}var fn=!0,Rt,ut;function $t(K){if(fn){var de;for(Rt=new e.Buf32(512),ut=new e.Buf32(32),de=0;de<144;)K.lens[de++]=8;for(;de<256;)K.lens[de++]=9;for(;de<280;)K.lens[de++]=7;for(;de<288;)K.lens[de++]=8;for(a(u,K.lens,0,288,Rt,0,K.work,{bits:9}),de=0;de<32;)K.lens[de++]=5;a(g,K.lens,0,32,ut,0,K.work,{bits:5}),fn=!1}K.lencode=Rt,K.lenbits=9,K.distcode=ut,K.distbits=5}function kt(K,de,w,Ae){var Ge,l=K.state;return l.window===null&&(l.wsize=1<<l.wbits,l.wnext=0,l.whave=0,l.window=new e.Buf8(l.wsize)),Ae>=l.wsize?(e.arraySet(l.window,de,w-l.wsize,l.wsize,0),l.wnext=0,l.whave=l.wsize):(Ge=l.wsize-l.wnext,Ge>Ae&&(Ge=Ae),e.arraySet(l.window,de,w-Ae,Ge,l.wnext),Ae-=Ge,Ae?(e.arraySet(l.window,de,w-Ae,Ae,0),l.wnext=Ae,l.whave=l.wsize):(l.wnext+=Ge,l.wnext===l.wsize&&(l.wnext=0),l.whave<l.wsize&&(l.whave+=Ge))),0}function T(K,de){var w,Ae,Ge,l,se,fe,R,z,oe,Ue,S,L,ge,Ce,Be=0,Ve,ft,Ft,pt,nr,_r,At,Jt,xt=new e.Buf8(4),Ht,Xt,jn=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!K||!K.state||!K.output||!K.input&&K.avail_in!==0)return N;w=K.state,w.mode===A&&(w.mode=B),se=K.next_out,Ge=K.output,R=K.avail_out,l=K.next_in,Ae=K.input,fe=K.avail_in,z=w.hold,oe=w.bits,Ue=fe,S=R,Jt=y;e:for(;;)switch(w.mode){case P:if(w.wrap===0){w.mode=B;break}for(;oe<16;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}if(w.wrap&2&&z===35615){w.check=0,xt[0]=z&255,xt[1]=z>>>8&255,w.check=n(w.check,xt,2,0),z=0,oe=0,w.mode=C;break}if(w.flags=0,w.head&&(w.head.done=!1),!(w.wrap&1)||(((z&255)<<8)+(z>>8))%31){K.msg="incorrect header check",w.mode=We;break}if((z&15)!==H){K.msg="unknown compression method",w.mode=We;break}if(z>>>=4,oe-=4,At=(z&15)+8,w.wbits===0)w.wbits=At;else if(At>w.wbits){K.msg="invalid window size",w.mode=We;break}w.dmax=1<<At,K.adler=w.check=1,w.mode=z&512?p:A,z=0,oe=0;break;case C:for(;oe<16;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}if(w.flags=z,(w.flags&255)!==H){K.msg="unknown compression method",w.mode=We;break}if(w.flags&57344){K.msg="unknown header flags set",w.mode=We;break}w.head&&(w.head.text=z>>8&1),w.flags&512&&(xt[0]=z&255,xt[1]=z>>>8&255,w.check=n(w.check,xt,2,0)),z=0,oe=0,w.mode=J;case J:for(;oe<32;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}w.head&&(w.head.time=z),w.flags&512&&(xt[0]=z&255,xt[1]=z>>>8&255,xt[2]=z>>>16&255,xt[3]=z>>>24&255,w.check=n(w.check,xt,4,0)),z=0,oe=0,w.mode=ae;case ae:for(;oe<16;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}w.head&&(w.head.xflags=z&255,w.head.os=z>>8),w.flags&512&&(xt[0]=z&255,xt[1]=z>>>8&255,w.check=n(w.check,xt,2,0)),z=0,oe=0,w.mode=ie;case ie:if(w.flags&1024){for(;oe<16;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}w.length=z,w.head&&(w.head.extra_len=z),w.flags&512&&(xt[0]=z&255,xt[1]=z>>>8&255,w.check=n(w.check,xt,2,0)),z=0,oe=0}else w.head&&(w.head.extra=null);w.mode=_e;case _e:if(w.flags&1024&&(L=w.length,L>fe&&(L=fe),L&&(w.head&&(At=w.head.extra_len-w.length,w.head.extra||(w.head.extra=new Array(w.head.extra_len)),e.arraySet(w.head.extra,Ae,l,L,At)),w.flags&512&&(w.check=n(w.check,Ae,L,l)),fe-=L,l+=L,w.length-=L),w.length))break e;w.length=0,w.mode=ce;case ce:if(w.flags&2048){if(fe===0)break e;L=0;do At=Ae[l+L++],w.head&&At&&w.length<65536&&(w.head.name+=String.fromCharCode(At));while(At&&L<fe);if(w.flags&512&&(w.check=n(w.check,Ae,L,l)),fe-=L,l+=L,At)break e}else w.head&&(w.head.name=null);w.length=0,w.mode=Ie;case Ie:if(w.flags&4096){if(fe===0)break e;L=0;do At=Ae[l+L++],w.head&&At&&w.length<65536&&(w.head.comment+=String.fromCharCode(At));while(At&&L<fe);if(w.flags&512&&(w.check=n(w.check,Ae,L,l)),fe-=L,l+=L,At)break e}else w.head&&(w.head.comment=null);w.mode=we;case we:if(w.flags&512){for(;oe<16;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}if(z!==(w.check&65535)){K.msg="header crc mismatch",w.mode=We;break}z=0,oe=0}w.head&&(w.head.hcrc=w.flags>>9&1,w.head.done=!0),K.adler=w.check=0,w.mode=A;break;case p:for(;oe<32;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}K.adler=w.check=qe(z),z=0,oe=0,w.mode=v;case v:if(w.havedict===0)return K.next_out=se,K.avail_out=R,K.next_in=l,K.avail_in=fe,w.hold=z,w.bits=oe,m;K.adler=w.check=1,w.mode=A;case A:if(de===h||de===_)break e;case B:if(w.last){z>>>=oe&7,oe-=oe&7,w.mode=$e;break}for(;oe<3;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}switch(w.last=z&1,z>>>=1,oe-=1,z&3){case 0:w.mode=W;break;case 1:if($t(w),w.mode=he,de===_){z>>>=2,oe-=2;break e}break;case 2:w.mode=M;break;case 3:K.msg="invalid block type",w.mode=We}z>>>=2,oe-=2;break;case W:for(z>>>=oe&7,oe-=oe&7;oe<32;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}if((z&65535)!==(z>>>16^65535)){K.msg="invalid stored block lengths",w.mode=We;break}if(w.length=z&65535,z=0,oe=0,w.mode=D,de===_)break e;case D:w.mode=X;case X:if(L=w.length,L){if(L>fe&&(L=fe),L>R&&(L=R),L===0)break e;e.arraySet(Ge,Ae,l,L,se),fe-=L,l+=L,R-=L,se+=L,w.length-=L;break}w.mode=A;break;case M:for(;oe<14;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}if(w.nlen=(z&31)+257,z>>>=5,oe-=5,w.ndist=(z&31)+1,z>>>=5,oe-=5,w.ncode=(z&15)+4,z>>>=4,oe-=4,w.nlen>286||w.ndist>30){K.msg="too many length or distance symbols",w.mode=We;break}w.have=0,w.mode=q;case q:for(;w.have<w.ncode;){for(;oe<3;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}w.lens[jn[w.have++]]=z&7,z>>>=3,oe-=3}for(;w.have<19;)w.lens[jn[w.have++]]=0;if(w.lencode=w.lendyn,w.lenbits=7,Ht={bits:w.lenbits},Jt=a(f,w.lens,0,19,w.lencode,0,w.work,Ht),w.lenbits=Ht.bits,Jt){K.msg="invalid code lengths set",w.mode=We;break}w.have=0,w.mode=ne;case ne:for(;w.have<w.nlen+w.ndist;){for(;Be=w.lencode[z&(1<<w.lenbits)-1],Ve=Be>>>24,ft=Be>>>16&255,Ft=Be&65535,!(Ve<=oe);){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}if(Ft<16)z>>>=Ve,oe-=Ve,w.lens[w.have++]=Ft;else{if(Ft===16){for(Xt=Ve+2;oe<Xt;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}if(z>>>=Ve,oe-=Ve,w.have===0){K.msg="invalid bit length repeat",w.mode=We;break}At=w.lens[w.have-1],L=3+(z&3),z>>>=2,oe-=2}else if(Ft===17){for(Xt=Ve+3;oe<Xt;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}z>>>=Ve,oe-=Ve,At=0,L=3+(z&7),z>>>=3,oe-=3}else{for(Xt=Ve+7;oe<Xt;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}z>>>=Ve,oe-=Ve,At=0,L=11+(z&127),z>>>=7,oe-=7}if(w.have+L>w.nlen+w.ndist){K.msg="invalid bit length repeat",w.mode=We;break}for(;L--;)w.lens[w.have++]=At}}if(w.mode===We)break;if(w.lens[256]===0){K.msg="invalid code -- missing end-of-block",w.mode=We;break}if(w.lenbits=9,Ht={bits:w.lenbits},Jt=a(u,w.lens,0,w.nlen,w.lencode,0,w.work,Ht),w.lenbits=Ht.bits,Jt){K.msg="invalid literal/lengths set",w.mode=We;break}if(w.distbits=6,w.distcode=w.distdyn,Ht={bits:w.distbits},Jt=a(g,w.lens,w.nlen,w.ndist,w.distcode,0,w.work,Ht),w.distbits=Ht.bits,Jt){K.msg="invalid distances set",w.mode=We;break}if(w.mode=he,de===_)break e;case he:w.mode=ee;case ee:if(fe>=6&&R>=258){K.next_out=se,K.avail_out=R,K.next_in=l,K.avail_in=fe,w.hold=z,w.bits=oe,o(K,S),se=K.next_out,Ge=K.output,R=K.avail_out,l=K.next_in,Ae=K.input,fe=K.avail_in,z=w.hold,oe=w.bits,w.mode===A&&(w.back=-1);break}for(w.back=0;Be=w.lencode[z&(1<<w.lenbits)-1],Ve=Be>>>24,ft=Be>>>16&255,Ft=Be&65535,!(Ve<=oe);){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}if(ft&&!(ft&240)){for(pt=Ve,nr=ft,_r=Ft;Be=w.lencode[_r+((z&(1<<pt+nr)-1)>>pt)],Ve=Be>>>24,ft=Be>>>16&255,Ft=Be&65535,!(pt+Ve<=oe);){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}z>>>=pt,oe-=pt,w.back+=pt}if(z>>>=Ve,oe-=Ve,w.back+=Ve,w.length=Ft,ft===0){w.mode=Pe;break}if(ft&32){w.back=-1,w.mode=A;break}if(ft&64){K.msg="invalid literal/length code",w.mode=We;break}w.extra=ft&15,w.mode=me;case me:if(w.extra){for(Xt=w.extra;oe<Xt;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}w.length+=z&(1<<w.extra)-1,z>>>=w.extra,oe-=w.extra,w.back+=w.extra}w.was=w.length,w.mode=pe;case pe:for(;Be=w.distcode[z&(1<<w.distbits)-1],Ve=Be>>>24,ft=Be>>>16&255,Ft=Be&65535,!(Ve<=oe);){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}if(!(ft&240)){for(pt=Ve,nr=ft,_r=Ft;Be=w.distcode[_r+((z&(1<<pt+nr)-1)>>pt)],Ve=Be>>>24,ft=Be>>>16&255,Ft=Be&65535,!(pt+Ve<=oe);){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}z>>>=pt,oe-=pt,w.back+=pt}if(z>>>=Ve,oe-=Ve,w.back+=Ve,ft&64){K.msg="invalid distance code",w.mode=We;break}w.offset=Ft,w.extra=ft&15,w.mode=Re;case Re:if(w.extra){for(Xt=w.extra;oe<Xt;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}w.offset+=z&(1<<w.extra)-1,z>>>=w.extra,oe-=w.extra,w.back+=w.extra}if(w.offset>w.dmax){K.msg="invalid distance too far back",w.mode=We;break}w.mode=Fe;case Fe:if(R===0)break e;if(L=S-R,w.offset>L){if(L=w.offset-L,L>w.whave&&w.sane){K.msg="invalid distance too far back",w.mode=We;break}L>w.wnext?(L-=w.wnext,ge=w.wsize-L):ge=w.wnext-L,L>w.length&&(L=w.length),Ce=w.window}else Ce=Ge,ge=se-w.offset,L=w.length;L>R&&(L=R),R-=L,w.length-=L;do Ge[se++]=Ce[ge++];while(--L);w.length===0&&(w.mode=ee);break;case Pe:if(R===0)break e;Ge[se++]=w.length,R--,w.mode=ee;break;case $e:if(w.wrap){for(;oe<32;){if(fe===0)break e;fe--,z|=Ae[l++]<<oe,oe+=8}if(S-=R,K.total_out+=S,w.total+=S,S&&(K.adler=w.check=w.flags?n(w.check,Ge,S,se-S):t(w.check,Ge,S,se-S)),S=R,(w.flags?z:qe(z))!==w.check){K.msg="incorrect data check",w.mode=We;break}z=0,oe=0}w.mode=Qe;case Qe:if(w.wrap&&w.flags){for(;oe<32;){if(fe===0)break e;fe--,z+=Ae[l++]<<oe,oe+=8}if(z!==(w.total&4294967295)){K.msg="incorrect length check",w.mode=We;break}z=0,oe=0}w.mode=Ke;case Ke:Jt=E;break e;case We:Jt=k;break e;case x:return U;case j:default:return N}return K.next_out=se,K.avail_out=R,K.next_in=l,K.avail_in=fe,w.hold=z,w.bits=oe,(w.wsize||S!==K.avail_out&&w.mode<We&&(w.mode<$e||de!==d))&&kt(K,K.output,K.next_out,S-K.avail_out),Ue-=K.avail_in,S-=K.avail_out,K.total_in+=Ue,K.total_out+=S,w.total+=S,w.wrap&&S&&(K.adler=w.check=w.flags?n(w.check,Ge,S,K.next_out-S):t(w.check,Ge,S,K.next_out-S)),K.data_type=w.bits+(w.last?64:0)+(w.mode===A?128:0)+(w.mode===he||w.mode===D?256:0),(Ue===0&&S===0||de===d)&&Jt===y&&(Jt=G),Jt}function ve(K){if(!K||!K.state)return N;var de=K.state;return de.window&&(de.window=null),K.state=null,y}function Le(K,de){var w;return!K||!K.state||(w=K.state,!(w.wrap&2))?N:(w.head=de,de.done=!1,y)}function De(K,de){var w=de.length,Ae,Ge,l;return!K||!K.state||(Ae=K.state,Ae.wrap!==0&&Ae.mode!==v)?N:Ae.mode===v&&(Ge=1,Ge=t(Ge,de,w,0),Ge!==Ae.check)?k:(l=kt(K,de,w,w),l?(Ae.mode=x,U):(Ae.havedict=1,y))}return Xn.inflateReset=xe,Xn.inflateReset2=at,Xn.inflateResetKeep=tt,Xn.inflateInit=_t,Xn.inflateInit2=Mt,Xn.inflate=T,Xn.inflateEnd=ve,Xn.inflateGetHeader=Le,Xn.inflateSetDictionary=De,Xn.inflateInfo="pako inflate (from Nodeca project)",Xn}var tc,p_;function tB(){return p_||(p_=1,tc={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}),tc}var b_;function nB(){return b_||(b_=1,function(e){var t=lr.requireAssert(),n=ZN(),o=XN(),a=eB(),f=tB();for(var u in f)e[u]=f[u];e.NONE=0,e.DEFLATE=1,e.INFLATE=2,e.GZIP=3,e.GUNZIP=4,e.DEFLATERAW=5,e.INFLATERAW=6,e.UNZIP=7;var g=31,d=139;function h(_){if(typeof _!="number"||_<e.DEFLATE||_>e.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=_,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}h.prototype.close=function(){if(this.write_in_progress){this.pending_close=!0;return}this.pending_close=!1,t(this.init_done,"close before init"),t(this.mode<=e.UNZIP),this.mode===e.DEFLATE||this.mode===e.GZIP||this.mode===e.DEFLATERAW?o.deflateEnd(this.strm):(this.mode===e.INFLATE||this.mode===e.GUNZIP||this.mode===e.INFLATERAW||this.mode===e.UNZIP)&&a.inflateEnd(this.strm),this.mode=e.NONE,this.dictionary=null},h.prototype.write=function(_,y,E,m,N,k,U){return this._write(!0,_,y,E,m,N,k,U)},h.prototype.writeSync=function(_,y,E,m,N,k,U){return this._write(!1,_,y,E,m,N,k,U)},h.prototype._write=function(_,y,E,m,N,k,U,G){if(t.equal(arguments.length,8),t(this.init_done,"write before init"),t(this.mode!==e.NONE,"already finalized"),t.equal(!1,this.write_in_progress,"write already in progress"),t.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,t.equal(!1,y===void 0,"must provide flush value"),this.write_in_progress=!0,y!==e.Z_NO_FLUSH&&y!==e.Z_PARTIAL_FLUSH&&y!==e.Z_SYNC_FLUSH&&y!==e.Z_FULL_FLUSH&&y!==e.Z_FINISH&&y!==e.Z_BLOCK)throw new Error("Invalid flush value");if(E==null&&(E=Z.dist.Buffer.alloc(0),N=0,m=0),this.strm.avail_in=N,this.strm.input=E,this.strm.next_in=m,this.strm.avail_out=G,this.strm.output=k,this.strm.next_out=U,this.flush=y,!_)return this._process(),this._checkError()?this._afterSync():void 0;var H=this;return Z.dist.process.nextTick(function(){H._process(),H._after()}),this},h.prototype._afterSync=function(){var _=this.strm.avail_out,y=this.strm.avail_in;return this.write_in_progress=!1,[y,_]},h.prototype._process=function(){var _=null;switch(this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case e.UNZIP:switch(this.strm.avail_in>0&&(_=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(_===null)break;if(this.strm.input[_]===g){if(this.gzip_id_bytes_read=1,_++,this.strm.avail_in===1)break}else{this.mode=e.INFLATE;break}case 1:if(_===null)break;this.strm.input[_]===d?(this.gzip_id_bytes_read=2,this.mode=e.GUNZIP):this.mode=e.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:for(this.err=a.inflate(this.strm,this.flush),this.err===e.Z_NEED_DICT&&this.dictionary&&(this.err=a.inflateSetDictionary(this.strm,this.dictionary),this.err===e.Z_OK?this.err=a.inflate(this.strm,this.flush):this.err===e.Z_DATA_ERROR&&(this.err=e.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===e.GUNZIP&&this.err===e.Z_STREAM_END&&this.strm.next_in[0]!==0;)this.reset(),this.err=a.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},h.prototype._checkError=function(){switch(this.err){case e.Z_OK:case e.Z_BUF_ERROR:if(this.strm.avail_out!==0&&this.flush===e.Z_FINISH)return this._error("unexpected end of file"),!1;break;case e.Z_STREAM_END:break;case e.Z_NEED_DICT:return this.dictionary==null?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},h.prototype._after=function(){if(this._checkError()){var _=this.strm.avail_out,y=this.strm.avail_in;this.write_in_progress=!1,this.callback(y,_),this.pending_close&&this.close()}},h.prototype._error=function(_){this.strm.msg&&(_=this.strm.msg),this.onerror(_,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},h.prototype.init=function(_,y,E,m,N){t(arguments.length===4||arguments.length===5,"init(windowBits, level, memLevel, strategy, [dictionary])"),t(_>=8&&_<=15,"invalid windowBits"),t(y>=-1&&y<=9,"invalid compression level"),t(E>=1&&E<=9,"invalid memlevel"),t(m===e.Z_FILTERED||m===e.Z_HUFFMAN_ONLY||m===e.Z_RLE||m===e.Z_FIXED||m===e.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(y,_,E,m,N),this._setDictionary()},h.prototype.params=function(){throw new Error("deflateParams Not supported")},h.prototype.reset=function(){this._reset(),this._setDictionary()},h.prototype._init=function(_,y,E,m,N){switch(this.level=_,this.windowBits=y,this.memLevel=E,this.strategy=m,this.flush=e.Z_NO_FLUSH,this.err=e.Z_OK,(this.mode===e.GZIP||this.mode===e.GUNZIP)&&(this.windowBits+=16),this.mode===e.UNZIP&&(this.windowBits+=32),(this.mode===e.DEFLATERAW||this.mode===e.INFLATERAW)&&(this.windowBits=-1*this.windowBits),this.strm=new n,this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=o.deflateInit2(this.strm,this.level,e.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:case e.UNZIP:this.err=a.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==e.Z_OK&&this._error("Init error"),this.dictionary=N,this.write_in_progress=!1,this.init_done=!0},h.prototype._setDictionary=function(){if(this.dictionary!=null){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary);break}this.err!==e.Z_OK&&this._error("Failed to set dictionary")}},h.prototype._reset=function(){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:case e.GZIP:this.err=o.deflateReset(this.strm);break;case e.INFLATE:case e.INFLATERAW:case e.GUNZIP:this.err=a.inflateReset(this.strm);break}this.err!==e.Z_OK&&this._error("Failed to reset stream")},e.Zlib=h}(Vl)),Vl}var y_;function rB(){return y_||(y_=1,function(e){var t=Z.bufferPolyfill.Buffer,n=Z.requireStreamBrowserify().Transform,o=nB(),a=lr.util,f=lr.requireAssert().ok,u=Z.bufferPolyfill.kMaxLength,g="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";o.Z_MIN_WINDOWBITS=8,o.Z_MAX_WINDOWBITS=15,o.Z_DEFAULT_WINDOWBITS=15,o.Z_MIN_CHUNK=64,o.Z_MAX_CHUNK=1/0,o.Z_DEFAULT_CHUNK=16*1024,o.Z_MIN_MEMLEVEL=1,o.Z_MAX_MEMLEVEL=9,o.Z_DEFAULT_MEMLEVEL=8,o.Z_MIN_LEVEL=-1,o.Z_MAX_LEVEL=9,o.Z_DEFAULT_LEVEL=o.Z_DEFAULT_COMPRESSION;for(var d=Object.keys(o),h=0;h<d.length;h++){var _=d[h];_.match(/^Z/)&&Object.defineProperty(e,_,{enumerable:!0,value:o[_],writable:!1})}for(var y={Z_OK:o.Z_OK,Z_STREAM_END:o.Z_STREAM_END,Z_NEED_DICT:o.Z_NEED_DICT,Z_ERRNO:o.Z_ERRNO,Z_STREAM_ERROR:o.Z_STREAM_ERROR,Z_DATA_ERROR:o.Z_DATA_ERROR,Z_MEM_ERROR:o.Z_MEM_ERROR,Z_BUF_ERROR:o.Z_BUF_ERROR,Z_VERSION_ERROR:o.Z_VERSION_ERROR},E=Object.keys(y),m=0;m<E.length;m++){var N=E[m];y[y[N]]=N}Object.defineProperty(e,"codes",{enumerable:!0,value:Object.freeze(y),writable:!1}),e.Deflate=G,e.Inflate=H,e.Gzip=P,e.Gunzip=C,e.DeflateRaw=J,e.InflateRaw=ae,e.Unzip=ie,e.createDeflate=function(p){return new G(p)},e.createInflate=function(p){return new H(p)},e.createDeflateRaw=function(p){return new J(p)},e.createInflateRaw=function(p){return new ae(p)},e.createGzip=function(p){return new P(p)},e.createGunzip=function(p){return new C(p)},e.createUnzip=function(p){return new ie(p)},e.deflate=function(p,v,A){return typeof v=="function"&&(A=v,v={}),k(new G(v),p,A)},e.deflateSync=function(p,v){return U(new G(v),p)},e.gzip=function(p,v,A){return typeof v=="function"&&(A=v,v={}),k(new P(v),p,A)},e.gzipSync=function(p,v){return U(new P(v),p)},e.deflateRaw=function(p,v,A){return typeof v=="function"&&(A=v,v={}),k(new J(v),p,A)},e.deflateRawSync=function(p,v){return U(new J(v),p)},e.unzip=function(p,v,A){return typeof v=="function"&&(A=v,v={}),k(new ie(v),p,A)},e.unzipSync=function(p,v){return U(new ie(v),p)},e.inflate=function(p,v,A){return typeof v=="function"&&(A=v,v={}),k(new H(v),p,A)},e.inflateSync=function(p,v){return U(new H(v),p)},e.gunzip=function(p,v,A){return typeof v=="function"&&(A=v,v={}),k(new C(v),p,A)},e.gunzipSync=function(p,v){return U(new C(v),p)},e.inflateRaw=function(p,v,A){return typeof v=="function"&&(A=v,v={}),k(new ae(v),p,A)},e.inflateRawSync=function(p,v){return U(new ae(v),p)};function k(p,v,A){var B=[],W=0;p.on("error",X),p.on("end",M),p.end(v),D();function D(){for(var q;(q=p.read())!==null;)B.push(q),W+=q.length;p.once("readable",D)}function X(q){p.removeListener("end",M),p.removeListener("readable",D),A(q)}function M(){var q,ne=null;W>=u?ne=new RangeError(g):q=t.concat(B,W),B=[],p.close(),A(ne,q)}}function U(p,v){if(typeof v=="string"&&(v=t.from(v)),!t.isBuffer(v))throw new TypeError("Not a string or buffer");var A=p._finishFlushFlag;return p._processChunk(v,A)}function G(p){if(!(this instanceof G))return new G(p);ce.call(this,p,o.DEFLATE)}function H(p){if(!(this instanceof H))return new H(p);ce.call(this,p,o.INFLATE)}function P(p){if(!(this instanceof P))return new P(p);ce.call(this,p,o.GZIP)}function C(p){if(!(this instanceof C))return new C(p);ce.call(this,p,o.GUNZIP)}function J(p){if(!(this instanceof J))return new J(p);ce.call(this,p,o.DEFLATERAW)}function ae(p){if(!(this instanceof ae))return new ae(p);ce.call(this,p,o.INFLATERAW)}function ie(p){if(!(this instanceof ie))return new ie(p);ce.call(this,p,o.UNZIP)}function _e(p){return p===o.Z_NO_FLUSH||p===o.Z_PARTIAL_FLUSH||p===o.Z_SYNC_FLUSH||p===o.Z_FULL_FLUSH||p===o.Z_FINISH||p===o.Z_BLOCK}function ce(p,v){var A=this;if(this._opts=p=p||{},this._chunkSize=p.chunkSize||e.Z_DEFAULT_CHUNK,n.call(this,p),p.flush&&!_e(p.flush))throw new Error("Invalid flush flag: "+p.flush);if(p.finishFlush&&!_e(p.finishFlush))throw new Error("Invalid flush flag: "+p.finishFlush);if(this._flushFlag=p.flush||o.Z_NO_FLUSH,this._finishFlushFlag=typeof p.finishFlush<"u"?p.finishFlush:o.Z_FINISH,p.chunkSize&&(p.chunkSize<e.Z_MIN_CHUNK||p.chunkSize>e.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+p.chunkSize);if(p.windowBits&&(p.windowBits<e.Z_MIN_WINDOWBITS||p.windowBits>e.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+p.windowBits);if(p.level&&(p.level<e.Z_MIN_LEVEL||p.level>e.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+p.level);if(p.memLevel&&(p.memLevel<e.Z_MIN_MEMLEVEL||p.memLevel>e.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+p.memLevel);if(p.strategy&&p.strategy!=e.Z_FILTERED&&p.strategy!=e.Z_HUFFMAN_ONLY&&p.strategy!=e.Z_RLE&&p.strategy!=e.Z_FIXED&&p.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+p.strategy);if(p.dictionary&&!t.isBuffer(p.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new o.Zlib(v);var B=this;this._hadError=!1,this._handle.onerror=function(X,M){Ie(B),B._hadError=!0;var q=new Error(X);q.errno=M,q.code=e.codes[M],B.emit("error",q)};var W=e.Z_DEFAULT_COMPRESSION;typeof p.level=="number"&&(W=p.level);var D=e.Z_DEFAULT_STRATEGY;typeof p.strategy=="number"&&(D=p.strategy),this._handle.init(p.windowBits||e.Z_DEFAULT_WINDOWBITS,W,p.memLevel||e.Z_DEFAULT_MEMLEVEL,D,p.dictionary),this._buffer=t.allocUnsafe(this._chunkSize),this._offset=0,this._level=W,this._strategy=D,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!A._handle},configurable:!0,enumerable:!0})}a.inherits(ce,n),ce.prototype.params=function(p,v,A){if(p<e.Z_MIN_LEVEL||p>e.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+p);if(v!=e.Z_FILTERED&&v!=e.Z_HUFFMAN_ONLY&&v!=e.Z_RLE&&v!=e.Z_FIXED&&v!=e.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+v);if(this._level!==p||this._strategy!==v){var B=this;this.flush(o.Z_SYNC_FLUSH,function(){f(B._handle,"zlib binding closed"),B._handle.params(p,v),B._hadError||(B._level=p,B._strategy=v,A&&A())})}else Z.dist.process.nextTick(A)},ce.prototype.reset=function(){return f(this._handle,"zlib binding closed"),this._handle.reset()},ce.prototype._flush=function(p){this._transform(t.alloc(0),"",p)},ce.prototype.flush=function(p,v){var A=this,B=this._writableState;(typeof p=="function"||p===void 0&&!v)&&(v=p,p=o.Z_FULL_FLUSH),B.ended?v&&Z.dist.process.nextTick(v):B.ending?v&&this.once("end",v):B.needDrain?v&&this.once("drain",function(){return A.flush(p,v)}):(this._flushFlag=p,this.write(t.alloc(0),"",v))},ce.prototype.close=function(p){Ie(this,p),Z.dist.process.nextTick(we,this)};function Ie(p,v){v&&Z.dist.process.nextTick(v),p._handle&&(p._handle.close(),p._handle=null)}function we(p){p.emit("close")}ce.prototype._transform=function(p,v,A){var B,W=this._writableState,D=W.ending||W.ended,X=D&&(!p||W.length===p.length);if(p!==null&&!t.isBuffer(p))return A(new Error("invalid input"));if(!this._handle)return A(new Error("zlib binding closed"));X?B=this._finishFlushFlag:(B=this._flushFlag,p.length>=W.length&&(this._flushFlag=this._opts.flush||o.Z_NO_FLUSH)),this._processChunk(p,B,A)},ce.prototype._processChunk=function(p,v,A){var B=p&&p.length,W=this._chunkSize-this._offset,D=0,X=this,M=typeof A=="function";if(!M){var q=[],ne=0,he;this.on("error",function(Fe){he=Fe}),f(this._handle,"zlib binding closed");do var ee=this._handle.writeSync(v,p,D,B,this._buffer,this._offset,W);while(!this._hadError&&Re(ee[0],ee[1]));if(this._hadError)throw he;if(ne>=u)throw Ie(this),new RangeError(g);var me=t.concat(q,ne);return Ie(this),me}f(this._handle,"zlib binding closed");var pe=this._handle.write(v,p,D,B,this._buffer,this._offset,W);pe.buffer=p,pe.callback=Re;function Re(Fe,Pe){if(this&&(this.buffer=null,this.callback=null),!X._hadError){var $e=W-Pe;if(f($e>=0,"have should not go down"),$e>0){var Qe=X._buffer.slice(X._offset,X._offset+$e);X._offset+=$e,M?X.push(Qe):(q.push(Qe),ne+=Qe.length)}if((Pe===0||X._offset>=X._chunkSize)&&(W=X._chunkSize,X._offset=0,X._buffer=t.allocUnsafe(X._chunkSize)),Pe===0){if(D+=B-Fe,B=Fe,!M)return!0;var Ke=X._handle.write(v,p,D,B,X._buffer,X._offset,X._chunkSize);Ke.callback=Re,Ke.buffer=p;return}if(!M)return!1;A()}}},a.inherits(G,ce),a.inherits(H,ce),a.inherits(P,ce),a.inherits(C,ce),a.inherits(J,ce),a.inherits(ae,ce),a.inherits(ie,ce)}(Gl)),Gl}Object.defineProperty(Di,"__esModule",{value:!0});Di.InvalidStatusCodeError=Di.InvalidCertError=void 0;const Sy=Object.freeze({redirect:!0,expectStatusCode:200,headers:{},full:!1,keepAlive:!0,cors:!1,referrer:!1,sslAllowSelfSigned:!1,_redirectCount:0});class Oc extends Error{constructor(t,n){super(t),this.fingerprint256=n}}Di.InvalidCertError=Oc;class Sd extends Error{constructor(t){super(`Request Failed. Status Code: ${t}`),this.statusCode=t}}Di.InvalidStatusCodeError=Sd;function Ry(e,t){if(!t||t==="text"||t==="json")try{let n=new TextDecoder("utf8",{fatal:!0}).decode(e);if(t==="text")return n;try{return JSON.parse(n)}catch(o){if(t==="json")throw o;return n}}catch(n){if(t==="text"||t==="json")throw n}return e}let w_={};function Lc(e,t){var E;let n={...Sy,...t};const o=lr.streamHttp,a=lr.httpsBrowserifyExports,f=rB(),{promisify:u}=lr.util,{resolve:g}=lr.urlExports,d=!!/^https/.test(e);let h={method:n.method||"GET",headers:{"Accept-Encoding":"gzip, deflate, br"}};const _=m=>m.replace(/:| /g,"").toLowerCase();if(n.keepAlive){const m={keepAlive:!0,keepAliveMsecs:3e4,maxFreeSockets:1024,maxCachedSessions:1024},N=[d,d&&((E=n.sslPinnedCertificates)==null?void 0:E.map(k=>_(k)).sort())].join();h.agent=w_[N]||(w_[N]=new(d?a:o).Agent(m))}n.type==="json"&&(h.headers["Content-Type"]="application/json"),n.data&&(n.method||(h.method="POST"),h.body=n.type==="json"?JSON.stringify(n.data):n.data),h.headers={...h.headers,...n.headers},n.sslAllowSelfSigned&&(h.rejectUnauthorized=!1);const y=async m=>{const N=m.statusCode;if(n.redirect&&300<=N&&N<400&&m.headers.location){if(n._redirectCount==10)throw new Error("Request failed. Too much redirects.");return n._redirectCount+=1,await Lc(g(e,m.headers.location),n)}if(n.expectStatusCode&&N!==n.expectStatusCode)throw m.resume(),new Sd(N);let k=[];for await(const P of m)k.push(P);let U=Z.dist.Buffer.concat(k);const G=m.headers["content-encoding"];G==="br"&&(U=await u(f.brotliDecompress)(U)),(G==="gzip"||G==="deflate")&&(U=await u(f.unzip)(U));const H=Ry(U,n.type);return n.full?{headers:m.headers,status:N,body:H}:H};return new Promise((m,N)=>{var P;const k=async C=>{if(C&&C.code==="DEPTH_ZERO_SELF_SIGNED_CERT")try{await Lc(e,{...n,sslAllowSelfSigned:!0,sslPinnedCertificates:[]})}catch(J){J&&J.fingerprint256&&(C=new Oc(`Self-signed SSL certificate: ${J.fingerprint256}`,J.fingerprint256))}N(C)},U=(d?a:o).request(e,h,C=>{C.on("error",k),(async()=>{try{m(await y(C))}catch(J){N(J)}})()});U.on("error",k);const G=(P=n.sslPinnedCertificates)==null?void 0:P.map(C=>_(C)),H=C=>{var ae;const J=_(((ae=C.getPeerCertificate())==null?void 0:ae.fingerprint256)||"");if(!(!J&&C.isSessionReused())&&!G.includes(J))return U.emit("error",new Oc(`Invalid SSL certificate: ${J} Expected: ${G}`,J)),U.abort()};n.sslPinnedCertificates&&U.on("socket",C=>{C.listeners("secureConnect").map(ae=>(ae.name||"").replace("bound ","")).includes("mfetchSecureConnect")||C.on("secureConnect",H.bind(null,C))}),n.keepAlive&&U.setNoDelay(!0),h.body&&U.write(h.body),U.end()})}const iB=new Set(["Accept","Accept-Language","Content-Language","Content-Type"].map(e=>e.toLowerCase())),oB=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 sB(e,t){let n={...Sy,...t};const o=new Headers;n.type==="json"&&o.set("Content-Type","application/json");let a=new URL(e);if(a.username){const d=btoa(`${a.username}:${a.password}`);o.set("Authorization",`Basic ${d}`),a.username="",a.password=""}e=""+a;for(let d in n.headers){const h=d.toLowerCase();(iB.has(h)||n.cors&&!oB.has(h))&&o.set(d,n.headers[d])}let f={headers:o,redirect:n.redirect?"follow":"manual"};n.referrer||(f.referrerPolicy="no-referrer"),n.cors&&(f.mode="cors"),n.data&&(n.method||(f.method="POST"),f.body=n.type==="json"?JSON.stringify(n.data):n.data);const u=await fetch(e,f);if(n.expectStatusCode&&u.status!==n.expectStatusCode)throw new Sd(u.status);const g=Ry(new Uint8Array(await u.arrayBuffer()),n.type);return n.full?{headers:Object.fromEntries(u.headers.entries()),status:u.status,body:g}:g}const aB=!!(typeof Z.dist.process=="object"&&Z.dist.process.versions&&Z.dist.process.versions.node&&Z.dist.process.versions.v8);function fB(e,t){return(aB?Lc:sB)(e,t)}Di.default=fB;Object.defineProperty(Ao,"__esModule",{value:!0});Ao.getProvider=Ao.fetchFromProvider=void 0;const uB=Di,lB=async(e,t)=>(await(0,uB.default)(e,{headers:{"content-type":"application/json"},type:"json",data:{method:t.method,params:t.params,jsonrpc:"2.0",id:1}})).result;Ao.fetchFromProvider=lB;const cB=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")};Ao.getProvider=cB;(function(e){var t=Z.commonjsGlobal&&Z.commonjsGlobal.__createBinding||(Object.create?function(a,f,u,g){g===void 0&&(g=u);var d=Object.getOwnPropertyDescriptor(f,u);(!d||("get"in d?!f.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return f[u]}}),Object.defineProperty(a,g,d)}:function(a,f,u,g){g===void 0&&(g=u),a[g]=f[u]}),n=Z.commonjsGlobal&&Z.commonjsGlobal.__exportStar||function(a,f){for(var u in a)u!=="default"&&!Object.prototype.hasOwnProperty.call(f,u)&&t(f,a,u)};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,n(Df,e),n(qf,e),n(wd,e),n(Cs,e),n(Vf,e),n(pn,e),n(Wi,e),n(Ed,e),n(my,e),n(Jf,e);var o=Pt;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}}),n(Xf,e),n(Ao,e)})(bP);var Ay={exports:{}};(function(e){(function(t,n){e.exports?e.exports=n():t.log=n()})(Z.commonjsGlobal,function(){var t=function(){},n="undefined",o=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),a=["trace","debug","info","warn","error"],f={},u=null;function g(k,U){var G=k[U];if(typeof G.bind=="function")return G.bind(k);try{return Function.prototype.bind.call(G,k)}catch{return function(){return Function.prototype.apply.apply(G,[k,arguments])}}}function d(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function h(k){return k==="debug"&&(k="log"),typeof console===n?!1:k==="trace"&&o?d:console[k]!==void 0?g(console,k):console.log!==void 0?g(console,"log"):t}function _(){for(var k=this.getLevel(),U=0;U<a.length;U++){var G=a[U];this[G]=U<k?t:this.methodFactory(G,k,this.name)}if(this.log=this.debug,typeof console===n&&k<this.levels.SILENT)return"No console available for logging"}function y(k){return function(){typeof console!==n&&(_.call(this),this[k].apply(this,arguments))}}function E(k,U,G){return h(k)||y.apply(this,arguments)}function m(k,U){var G=this,H,P,C,J="loglevel";typeof k=="string"?J+=":"+k:typeof k=="symbol"&&(J=void 0);function ae(we){var p=(a[we]||"silent").toUpperCase();if(!(typeof window===n||!J)){try{window.localStorage[J]=p;return}catch{}try{window.document.cookie=encodeURIComponent(J)+"="+p+";"}catch{}}}function ie(){var we;if(!(typeof window===n||!J)){try{we=window.localStorage[J]}catch{}if(typeof we===n)try{var p=window.document.cookie,v=encodeURIComponent(J),A=p.indexOf(v+"=");A!==-1&&(we=/^([^;]+)/.exec(p.slice(A+v.length+1))[1])}catch{}return G.levels[we]===void 0&&(we=void 0),we}}function _e(){if(!(typeof window===n||!J)){try{window.localStorage.removeItem(J)}catch{}try{window.document.cookie=encodeURIComponent(J)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function ce(we){var p=we;if(typeof p=="string"&&G.levels[p.toUpperCase()]!==void 0&&(p=G.levels[p.toUpperCase()]),typeof p=="number"&&p>=0&&p<=G.levels.SILENT)return p;throw new TypeError("log.setLevel() called with invalid level: "+we)}G.name=k,G.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},G.methodFactory=U||E,G.getLevel=function(){return C??P??H},G.setLevel=function(we,p){return C=ce(we),p!==!1&&ae(C),_.call(G)},G.setDefaultLevel=function(we){P=ce(we),ie()||G.setLevel(we,!1)},G.resetLevel=function(){C=null,_e(),_.call(G)},G.enableAll=function(we){G.setLevel(G.levels.TRACE,we)},G.disableAll=function(we){G.setLevel(G.levels.SILENT,we)},G.rebuild=function(){if(u!==G&&(H=ce(u.getLevel())),_.call(G),u===G)for(var we in f)f[we].rebuild()},H=ce(u?u.getLevel():"WARN");var Ie=ie();Ie!=null&&(C=ce(Ie)),_.call(G)}u=new m,u.getLogger=function(U){if(typeof U!="symbol"&&typeof U!="string"||U==="")throw new TypeError("You must supply a name when creating a logger.");var G=f[U];return G||(G=f[U]=new m(U,u.methodFactory)),G};var N=typeof window!==n?window.log:void 0;return u.noConflict=function(){return typeof window!==n&&window.log===u&&(window.log=N),u},u.getLoggers=function(){return f},u.default=u,u})})(Ay);var Iy=Ay.exports;const cf=Z.getDefaultExportFromCjs(Iy);var df={exports:{}};df.exports;(function(e,t){var n=200,o="__lodash_hash_undefined__",a=800,f=16,u=9007199254740991,g="[object Arguments]",d="[object Array]",h="[object AsyncFunction]",_="[object Boolean]",y="[object Date]",E="[object Error]",m="[object Function]",N="[object GeneratorFunction]",k="[object Map]",U="[object Number]",G="[object Null]",H="[object Object]",P="[object Proxy]",C="[object RegExp]",J="[object Set]",ae="[object String]",ie="[object Undefined]",_e="[object WeakMap]",ce="[object ArrayBuffer]",Ie="[object DataView]",we="[object Float32Array]",p="[object Float64Array]",v="[object Int8Array]",A="[object Int16Array]",B="[object Int32Array]",W="[object Uint8Array]",D="[object Uint8ClampedArray]",X="[object Uint16Array]",M="[object Uint32Array]",q=/[\\^$.*+?()[\]{}|]/g,ne=/^\[object .+?Constructor\]$/,he=/^(?:0|[1-9]\d*)$/,ee={};ee[we]=ee[p]=ee[v]=ee[A]=ee[B]=ee[W]=ee[D]=ee[X]=ee[M]=!0,ee[g]=ee[d]=ee[ce]=ee[_]=ee[Ie]=ee[y]=ee[E]=ee[m]=ee[k]=ee[U]=ee[H]=ee[C]=ee[J]=ee[ae]=ee[_e]=!1;var me=typeof Z.commonjsGlobal=="object"&&Z.commonjsGlobal&&Z.commonjsGlobal.Object===Object&&Z.commonjsGlobal,pe=typeof self=="object"&&self&&self.Object===Object&&self,Re=me||pe||Function("return this")(),Fe=t&&!t.nodeType&&t,Pe=Fe&&!0&&e&&!e.nodeType&&e,$e=Pe&&Pe.exports===Fe,Qe=$e&&me.process,Ke=function(){try{var $=Pe&&Pe.require&&Pe.require("util").types;return $||Qe&&Qe.binding&&Qe.binding("util")}catch{}}(),We=Ke&&Ke.isTypedArray;function x($,Y,le){switch(le.length){case 0:return $.call(Y);case 1:return $.call(Y,le[0]);case 2:return $.call(Y,le[0],le[1]);case 3:return $.call(Y,le[0],le[1],le[2])}return $.apply(Y,le)}function j($,Y){for(var le=-1,je=Array($);++le<$;)je[le]=Y(le);return je}function re($){return function(Y){return $(Y)}}function Te($,Y){return $==null?void 0:$[Y]}function ye($,Y){return function(le){return $(Y(le))}}var Ne=Array.prototype,qe=Function.prototype,He=Object.prototype,tt=Re["__core-js_shared__"],xe=qe.toString,at=He.hasOwnProperty,Mt=function(){var $=/[^.]+$/.exec(tt&&tt.keys&&tt.keys.IE_PROTO||"");return $?"Symbol(src)_1."+$:""}(),_t=He.toString,fn=xe.call(Object),Rt=RegExp("^"+xe.call(at).replace(q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ut=$e?Re.Buffer:void 0,$t=Re.Symbol,kt=Re.Uint8Array;ut&&ut.allocUnsafe;var T=ye(Object.getPrototypeOf,Object),ve=Object.create,Le=He.propertyIsEnumerable,De=Ne.splice,K=$t?$t.toStringTag:void 0,de=function(){try{var $=$o(Object,"defineProperty");return $({},"",{}),$}catch{}}(),w=ut?ut.isBuffer:void 0,Ae=Math.max,Ge=Date.now,l=$o(Re,"Map"),se=$o(Object,"create"),fe=function(){function $(){}return function(Y){if(!Cr(Y))return{};if(ve)return ve(Y);$.prototype=Y;var le=new $;return $.prototype=void 0,le}}();function R($){var Y=-1,le=$==null?0:$.length;for(this.clear();++Y<le;){var je=$[Y];this.set(je[0],je[1])}}function z(){this.__data__=se?se(null):{},this.size=0}function oe($){var Y=this.has($)&&delete this.__data__[$];return this.size-=Y?1:0,Y}function Ue($){var Y=this.__data__;if(se){var le=Y[$];return le===o?void 0:le}return at.call(Y,$)?Y[$]:void 0}function S($){var Y=this.__data__;return se?Y[$]!==void 0:at.call(Y,$)}function L($,Y){var le=this.__data__;return this.size+=this.has($)?0:1,le[$]=se&&Y===void 0?o:Y,this}R.prototype.clear=z,R.prototype.delete=oe,R.prototype.get=Ue,R.prototype.has=S,R.prototype.set=L;function ge($){var Y=-1,le=$==null?0:$.length;for(this.clear();++Y<le;){var je=$[Y];this.set(je[0],je[1])}}function Ce(){this.__data__=[],this.size=0}function Be($){var Y=this.__data__,le=qi(Y,$);if(le<0)return!1;var je=Y.length-1;return le==je?Y.pop():De.call(Y,le,1),--this.size,!0}function Ve($){var Y=this.__data__,le=qi(Y,$);return le<0?void 0:Y[le][1]}function ft($){return qi(this.__data__,$)>-1}function Ft($,Y){var le=this.__data__,je=qi(le,$);return je<0?(++this.size,le.push([$,Y])):le[je][1]=Y,this}ge.prototype.clear=Ce,ge.prototype.delete=Be,ge.prototype.get=Ve,ge.prototype.has=ft,ge.prototype.set=Ft;function pt($){var Y=-1,le=$==null?0:$.length;for(this.clear();++Y<le;){var je=$[Y];this.set(je[0],je[1])}}function nr(){this.size=0,this.__data__={hash:new R,map:new(l||ge),string:new R}}function _r($){var Y=yi(this,$).delete($);return this.size-=Y?1:0,Y}function At($){return yi(this,$).get($)}function Jt($){return yi(this,$).has($)}function xt($,Y){var le=yi(this,$),je=le.size;return le.set($,Y),this.size+=le.size==je?0:1,this}pt.prototype.clear=nr,pt.prototype.delete=_r,pt.prototype.get=At,pt.prototype.has=Jt,pt.prototype.set=xt;function Ht($){var Y=this.__data__=new ge($);this.size=Y.size}function Xt(){this.__data__=new ge,this.size=0}function jn($){var Y=this.__data__,le=Y.delete($);return this.size=Y.size,le}function rr($){return this.__data__.get($)}function Pn($){return this.__data__.has($)}function tu($,Y){var le=this.__data__;if(le instanceof ge){var je=le.__data__;if(!l||je.length<n-1)return je.push([$,Y]),this.size=++le.size,this;le=this.__data__=new pt(je)}return le.set($,Y),this.size=le.size,this}Ht.prototype.clear=Xt,Ht.prototype.delete=jn,Ht.prototype.get=rr,Ht.prototype.has=Pn,Ht.prototype.set=tu;function nu($,Y){var le=ko($),je=!le&&Mo($),ct=!le&&!je&&Js($),yt=!le&&!je&&!ct&&Ys($),Lt=le||je||ct||yt,Ye=Lt?j($.length,String):[],St=Ye.length;for(var Yt in $)Lt&&(Yt=="length"||ct&&(Yt=="offset"||Yt=="parent")||yt&&(Yt=="buffer"||Yt=="byteLength"||Yt=="byteOffset")||Zi(Yt,St))||Ye.push(Yt);return Ye}function No($,Y,le){(le!==void 0&&!wi($[Y],le)||le===void 0&&!(Y in $))&&Jr($,Y,le)}function zi($,Y,le){var je=$[Y];(!(at.call($,Y)&&wi(je,le))||le===void 0&&!(Y in $))&&Jr($,Y,le)}function qi($,Y){for(var le=$.length;le--;)if(wi($[le][0],Y))return le;return-1}function Jr($,Y,le){Y=="__proto__"&&de?de($,Y,{configurable:!0,enumerable:!0,value:le,writable:!0}):$[Y]=le}var ru=Vi();function Gi($){return $==null?$===void 0?ie:G:K&&K in Object($)?js($):zs($)}function Ns($){return Pr($)&&Gi($)==g}function Bs($){if(!Cr($)||xo($))return!1;var Y=Uo($)?Rt:ne;return Y.test(Zs($))}function $s($){return Pr($)&&Xs($.length)&&!!ee[Gi($)]}function xs($){if(!Cr($))return Xr($);var Y=Ki($),le=[];for(var je in $)je=="constructor"&&(Y||!at.call($,je))||le.push(je);return le}function Ds($,Y,le,je,ct){$!==Y&&ru(Y,function(yt,Lt){if(ct||(ct=new Ht),Cr(yt))iu($,Y,Lt,le,Ds,je,ct);else{var Ye=je?je(Do($,Lt),yt,Lt+"",$,Y,ct):void 0;Ye===void 0&&(Ye=yt),No($,Lt,Ye)}},Qs)}function iu($,Y,le,je,ct,yt,Lt){var Ye=Do($,le),St=Do(Y,le),Yt=Lt.get(St);if(Yt){No($,le,Yt);return}var un=yt?yt(Ye,St,le+"",$,Y,Lt):void 0,Nr=un===void 0;if(Nr){var ln=ko(St),Ji=!ln&&Js(St),jo=!ln&&!Ji&&Ys(St);un=St,ln||Ji||jo?ko(Ye)?un=Ye:Ks(Ye)?un=Bo(Ye):Ji?(Nr=!1,un=Ms(St)):jo?(Nr=!1,un=Fs(St)):un=[]:uu(St)||Mo(St)?(un=Ye,Mo(Ye)?un=lu(Ye):(!Cr(Ye)||Uo(Ye))&&(un=Hs(St))):Nr=!1}Nr&&(Lt.set(St,un),ct(un,St,je,yt,Lt),Lt.delete(St)),No($,le,un)}function ou($,Y){return Gs(qs($,Y,mt),$+"")}var su=de?function($,Y){return de($,"toString",{configurable:!0,enumerable:!1,value:It(Y),writable:!0})}:mt;function Ms($,Y){return $.slice()}function ks($){var Y=new $.constructor($.byteLength);return new kt(Y).set(new kt($)),Y}function Fs($,Y){var le=ks($.buffer);return new $.constructor(le,$.byteOffset,$.length)}function Bo($,Y){var le=-1,je=$.length;for(Y||(Y=Array(je));++le<je;)Y[le]=$[le];return Y}function au($,Y,le,je){var ct=!le;le||(le={});for(var yt=-1,Lt=Y.length;++yt<Lt;){var Ye=Y[yt],St=void 0;St===void 0&&(St=$[Ye]),ct?Jr(le,Ye,St):zi(le,Ye,St)}return le}function Us($){return ou(function(Y,le){var je=-1,ct=le.length,yt=ct>1?le[ct-1]:void 0,Lt=ct>2?le[2]:void 0;for(yt=$.length>3&&typeof yt=="function"?(ct--,yt):void 0,Lt&&fu(le[0],le[1],Lt)&&(yt=ct<3?void 0:yt,ct=1),Y=Object(Y);++je<ct;){var Ye=le[je];Ye&&$(Y,Ye,je,yt)}return Y})}function Vi($){return function(Y,le,je){for(var ct=-1,yt=Object(Y),Lt=je(Y),Ye=Lt.length;Ye--;){var St=Lt[++ct];if(le(yt[St],St,yt)===!1)break}return Y}}function yi($,Y){var le=$.__data__;return Ws(Y)?le[typeof Y=="string"?"string":"hash"]:le.map}function $o($,Y){var le=Te($,Y);return Bs(le)?le:void 0}function js($){var Y=at.call($,K),le=$[K];try{$[K]=void 0;var je=!0}catch{}var ct=_t.call($);return je&&(Y?$[K]=le:delete $[K]),ct}function Hs($){return typeof $.constructor=="function"&&!Ki($)?fe(T($)):{}}function Zi($,Y){var le=typeof $;return Y=Y??u,!!Y&&(le=="number"||le!="symbol"&&he.test($))&&$>-1&&$%1==0&&$<Y}function fu($,Y,le){if(!Cr(le))return!1;var je=typeof Y;return(je=="number"?Fo(le)&&Zi(Y,le.length):je=="string"&&Y in le)?wi(le[Y],$):!1}function Ws($){var Y=typeof $;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?$!=="__proto__":$===null}function xo($){return!!Mt&&Mt in $}function Ki($){var Y=$&&$.constructor,le=typeof Y=="function"&&Y.prototype||He;return $===le}function Xr($){var Y=[];if($!=null)for(var le in Object($))Y.push(le);return Y}function zs($){return _t.call($)}function qs($,Y,le){return Y=Ae(Y===void 0?$.length-1:Y,0),function(){for(var je=arguments,ct=-1,yt=Ae(je.length-Y,0),Lt=Array(yt);++ct<yt;)Lt[ct]=je[Y+ct];ct=-1;for(var Ye=Array(Y+1);++ct<Y;)Ye[ct]=je[ct];return Ye[Y]=le(Lt),x($,this,Ye)}}function Do($,Y){if(!(Y==="constructor"&&typeof $[Y]=="function")&&Y!="__proto__")return $[Y]}var Gs=Vs(su);function Vs($){var Y=0,le=0;return function(){var je=Ge(),ct=f-(je-le);if(le=je,ct>0){if(++Y>=a)return arguments[0]}else Y=0;return $.apply(void 0,arguments)}}function Zs($){if($!=null){try{return xe.call($)}catch{}try{return $+""}catch{}}return""}function wi($,Y){return $===Y||$!==$&&Y!==Y}var Mo=Ns(function(){return arguments}())?Ns:function($){return Pr($)&&at.call($,"callee")&&!Le.call($,"callee")},ko=Array.isArray;function Fo($){return $!=null&&Xs($.length)&&!Uo($)}function Ks($){return Pr($)&&Fo($)}var Js=w||du;function Uo($){if(!Cr($))return!1;var Y=Gi($);return Y==m||Y==N||Y==h||Y==P}function Xs($){return typeof $=="number"&&$>-1&&$%1==0&&$<=u}function Cr($){var Y=typeof $;return $!=null&&(Y=="object"||Y=="function")}function Pr($){return $!=null&&typeof $=="object"}function uu($){if(!Pr($)||Gi($)!=H)return!1;var Y=T($);if(Y===null)return!0;var le=at.call(Y,"constructor")&&Y.constructor;return typeof le=="function"&&le instanceof le&&xe.call(le)==fn}var Ys=We?re(We):$s;function lu($){return au($,Qs($))}function Qs($){return Fo($)?nu($):xs($)}var cu=Us(function($,Y,le){Ds($,Y,le)});function It($){return function(){return $}}function mt($){return $}function du(){return!1}e.exports=cu})(df,df.exports);df.exports;const dB=cf.getLogger("http-helpers");dB.setLevel(Iy.levels.INFO);var hf={exports:{}};/**
|
|
4
4
|
* @license
|