@multiplechain/bitcoin 0.4.15 → 0.4.20

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/index.cjs CHANGED
@@ -1,41 +1,41 @@
1
- "use strict";var j7=Object.create;var Up=Object.defineProperty;var V7=Object.getOwnPropertyDescriptor;var W7=Object.getOwnPropertyNames;var K7=Object.getPrototypeOf,G7=Object.prototype.hasOwnProperty;var V=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Na=(e,t)=>{for(var r in t)Up(e,r,{get:t[r],enumerable:!0})},V_=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of W7(t))!G7.call(e,n)&&n!==r&&Up(e,n,{get:()=>t[n],enumerable:!(i=V7(t,n))||i.enumerable});return e};var yr=(e,t,r)=>(r=e!=null?j7(K7(e)):{},V_(t||!e||!e.__esModule?Up(r,"default",{value:e,enumerable:!0}):r,e)),$7=e=>V_(Up({},"__esModule",{value:!0}),e);var vt=V((Lc,uf)=>{(function(){var e,t="4.17.21",r=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",n="Expected a function",a="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",h=500,b="__lodash_placeholder__",w=1,T=2,I=4,B=1,M=2,P=1,L=2,X=4,W=8,q=16,ee=32,fe=64,_e=128,Te=256,be=512,O=30,E="...",f=800,c=16,p=1,v=2,g=3,x=1/0,S=9007199254740991,_=17976931348623157e292,l=NaN,m=4294967295,A=m-1,U=m>>>1,j=[["ary",_e],["bind",P],["bindKey",L],["curry",W],["curryRight",q],["flip",be],["partial",ee],["partialRight",fe],["rearg",Te]],Z="[object Arguments]",se="[object Array]",ae="[object AsyncFunction]",he="[object Boolean]",Ee="[object Date]",me="[object DOMException]",dt="[object Error]",St="[object Function]",Oe="[object GeneratorFunction]",st="[object Map]",rt="[object Number]",Re="[object Null]",Ae="[object Object]",Kt="[object Promise]",We="[object Proxy]",At="[object RegExp]",bt="[object Set]",De="[object String]",Pt="[object Symbol]",Qt="[object Undefined]",Ue="[object WeakMap]",er="[object WeakSet]",Ot="[object ArrayBuffer]",Le="[object DataView]",Ct="[object Float32Array]",Lt="[object Float64Array]",qe="[object Int8Array]",Dt="[object Int16Array]",Ut="[object Int32Array]",Fe="[object Uint8Array]",qt="[object Uint8ClampedArray]",Ft="[object Uint16Array]",He="[object Uint32Array]",tr=/\b__p \+= '';/g,rr=/\b(__p \+=) '' \+/g,Ke=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Gt=/&(?:amp|lt|gt|quot|#39);/g,$t=/[&<>"']/g,Ge=RegExp(Gt.source),ir=RegExp($t.source),nr=/<%-([\s\S]+?)%>/g,$e=/<%([\s\S]+?)%>/g,Xt=/<%=([\s\S]+?)%>/g,sr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xe=/^\w*$/,ar=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ht=/[\\^$.*+?()[\]{}|]/g,Ye=RegExp(Ht.source),zt=/^\s+/,or=/\s/,Ze=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,cr=/\{\n\/\* \[wrapped with (.+)\] \*/,ur=/,? & /,Je=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fr=/[()=,{}\[\]\/\s]/,lr=/\\(\\)?/g,Qe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,jt=/\w*$/,Rs=/^[-+]0x[0-9a-f]+$/i,As=/^0b[01]+$/i,Os=/^\[object .+?Constructor\]$/,ks=/^0o[0-7]+$/i,Ns=/^(?:0|[1-9]\d*)$/,Ps=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,sn=/($^)/,Bs=/['\n\r\u2028\u2029\\]/g,an="\\ud800-\\udfff",Ms="\\u0300-\\u036f",Cs="\\ufe20-\\ufe2f",Ls="\\u20d0-\\u20ff",is=Ms+Cs+Ls,ns="\\u2700-\\u27bf",ss="a-z\\xdf-\\xf6\\xf8-\\xff",Ds="\\xac\\xb1\\xd7\\xf7",Us="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",qs="\\u2000-\\u206f",Ku=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",wx="A-Z\\xc0-\\xd6\\xd8-\\xde",Sx="\\ufe0e\\ufe0f",Ex=Ds+Us+qs+Ku,r0="['\u2019]",jT="["+an+"]",Tx="["+Ex+"]",Jl="["+is+"]",Ix="\\d+",VT="["+ns+"]",Rx="["+ss+"]",Ax="[^"+an+Ex+Ix+ns+ss+wx+"]",i0="\\ud83c[\\udffb-\\udfff]",WT="(?:"+Jl+"|"+i0+")",Ox="[^"+an+"]",n0="(?:\\ud83c[\\udde6-\\uddff]){2}",s0="[\\ud800-\\udbff][\\udc00-\\udfff]",Sc="["+wx+"]",kx="\\u200d",Nx="(?:"+Rx+"|"+Ax+")",KT="(?:"+Sc+"|"+Ax+")",Px="(?:"+r0+"(?:d|ll|m|re|s|t|ve))?",Bx="(?:"+r0+"(?:D|LL|M|RE|S|T|VE))?",Mx=WT+"?",Cx="["+Sx+"]?",GT="(?:"+kx+"(?:"+[Ox,n0,s0].join("|")+")"+Cx+Mx+")*",$T="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",XT="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Lx=Cx+Mx+GT,YT="(?:"+[VT,n0,s0].join("|")+")"+Lx,ZT="(?:"+[Ox+Jl+"?",Jl,n0,s0,jT].join("|")+")",JT=RegExp(r0,"g"),QT=RegExp(Jl,"g"),a0=RegExp(i0+"(?="+i0+")|"+ZT+Lx,"g"),eI=RegExp([Sc+"?"+Rx+"+"+Px+"(?="+[Tx,Sc,"$"].join("|")+")",KT+"+"+Bx+"(?="+[Tx,Sc+Nx,"$"].join("|")+")",Sc+"?"+Nx+"+"+Px,Sc+"+"+Bx,XT,$T,Ix,YT].join("|"),"g"),tI=RegExp("["+kx+an+is+Sx+"]"),rI=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,iI=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nI=-1,pr={};pr[Ct]=pr[Lt]=pr[qe]=pr[Dt]=pr[Ut]=pr[Fe]=pr[qt]=pr[Ft]=pr[He]=!0,pr[Z]=pr[se]=pr[Ot]=pr[he]=pr[Le]=pr[Ee]=pr[dt]=pr[St]=pr[st]=pr[rt]=pr[Ae]=pr[At]=pr[bt]=pr[De]=pr[Ue]=!1;var Yt={};Yt[Z]=Yt[se]=Yt[Ot]=Yt[Le]=Yt[he]=Yt[Ee]=Yt[Ct]=Yt[Lt]=Yt[qe]=Yt[Dt]=Yt[Ut]=Yt[st]=Yt[rt]=Yt[Ae]=Yt[At]=Yt[bt]=Yt[De]=Yt[Pt]=Yt[Fe]=Yt[qt]=Yt[Ft]=Yt[He]=!0,Yt[dt]=Yt[St]=Yt[Ue]=!1;var sI={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},aI={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},oI={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},cI={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},uI=parseFloat,fI=parseInt,Dx=typeof global=="object"&&global&&global.Object===Object&&global,lI=typeof self=="object"&&self&&self.Object===Object&&self,Xr=Dx||lI||Function("return this")(),o0=typeof Lc=="object"&&Lc&&!Lc.nodeType&&Lc,bo=o0&&typeof uf=="object"&&uf&&!uf.nodeType&&uf,Ux=bo&&bo.exports===o0,c0=Ux&&Dx.process,on=function(){try{var F=bo&&bo.require&&bo.require("util").types;return F||c0&&c0.binding&&c0.binding("util")}catch{}}(),qx=on&&on.isArrayBuffer,Fx=on&&on.isDate,Hx=on&&on.isMap,zx=on&&on.isRegExp,jx=on&&on.isSet,Vx=on&&on.isTypedArray;function Vi(F,Q,$){switch($.length){case 0:return F.call(Q);case 1:return F.call(Q,$[0]);case 2:return F.call(Q,$[0],$[1]);case 3:return F.call(Q,$[0],$[1],$[2])}return F.apply(Q,$)}function pI(F,Q,$,ye){for(var ze=-1,Tt=F==null?0:F.length;++ze<Tt;){var zr=F[ze];Q(ye,zr,$(zr),F)}return ye}function cn(F,Q){for(var $=-1,ye=F==null?0:F.length;++$<ye&&Q(F[$],$,F)!==!1;);return F}function hI(F,Q){for(var $=F==null?0:F.length;$--&&Q(F[$],$,F)!==!1;);return F}function Wx(F,Q){for(var $=-1,ye=F==null?0:F.length;++$<ye;)if(!Q(F[$],$,F))return!1;return!0}function ya(F,Q){for(var $=-1,ye=F==null?0:F.length,ze=0,Tt=[];++$<ye;){var zr=F[$];Q(zr,$,F)&&(Tt[ze++]=zr)}return Tt}function Ql(F,Q){var $=F==null?0:F.length;return!!$&&Ec(F,Q,0)>-1}function u0(F,Q,$){for(var ye=-1,ze=F==null?0:F.length;++ye<ze;)if($(Q,F[ye]))return!0;return!1}function vr(F,Q){for(var $=-1,ye=F==null?0:F.length,ze=Array(ye);++$<ye;)ze[$]=Q(F[$],$,F);return ze}function wa(F,Q){for(var $=-1,ye=Q.length,ze=F.length;++$<ye;)F[ze+$]=Q[$];return F}function f0(F,Q,$,ye){var ze=-1,Tt=F==null?0:F.length;for(ye&&Tt&&($=F[++ze]);++ze<Tt;)$=Q($,F[ze],ze,F);return $}function dI(F,Q,$,ye){var ze=F==null?0:F.length;for(ye&&ze&&($=F[--ze]);ze--;)$=Q($,F[ze],ze,F);return $}function l0(F,Q){for(var $=-1,ye=F==null?0:F.length;++$<ye;)if(Q(F[$],$,F))return!0;return!1}var mI=p0("length");function vI(F){return F.split("")}function gI(F){return F.match(Je)||[]}function Kx(F,Q,$){var ye;return $(F,function(ze,Tt,zr){if(Q(ze,Tt,zr))return ye=Tt,!1}),ye}function ep(F,Q,$,ye){for(var ze=F.length,Tt=$+(ye?1:-1);ye?Tt--:++Tt<ze;)if(Q(F[Tt],Tt,F))return Tt;return-1}function Ec(F,Q,$){return Q===Q?OI(F,Q,$):ep(F,Gx,$)}function bI(F,Q,$,ye){for(var ze=$-1,Tt=F.length;++ze<Tt;)if(ye(F[ze],Q))return ze;return-1}function Gx(F){return F!==F}function $x(F,Q){var $=F==null?0:F.length;return $?d0(F,Q)/$:l}function p0(F){return function(Q){return Q==null?e:Q[F]}}function h0(F){return function(Q){return F==null?e:F[Q]}}function Xx(F,Q,$,ye,ze){return ze(F,function(Tt,zr,Vt){$=ye?(ye=!1,Tt):Q($,Tt,zr,Vt)}),$}function xI(F,Q){var $=F.length;for(F.sort(Q);$--;)F[$]=F[$].value;return F}function d0(F,Q){for(var $,ye=-1,ze=F.length;++ye<ze;){var Tt=Q(F[ye]);Tt!==e&&($=$===e?Tt:$+Tt)}return $}function m0(F,Q){for(var $=-1,ye=Array(F);++$<F;)ye[$]=Q($);return ye}function _I(F,Q){return vr(Q,function($){return[$,F[$]]})}function Yx(F){return F&&F.slice(0,e1(F)+1).replace(zt,"")}function Wi(F){return function(Q){return F(Q)}}function v0(F,Q){return vr(Q,function($){return F[$]})}function Gu(F,Q){return F.has(Q)}function Zx(F,Q){for(var $=-1,ye=F.length;++$<ye&&Ec(Q,F[$],0)>-1;);return $}function Jx(F,Q){for(var $=F.length;$--&&Ec(Q,F[$],0)>-1;);return $}function yI(F,Q){for(var $=F.length,ye=0;$--;)F[$]===Q&&++ye;return ye}var wI=h0(sI),SI=h0(aI);function EI(F){return"\\"+cI[F]}function TI(F,Q){return F==null?e:F[Q]}function Tc(F){return tI.test(F)}function II(F){return rI.test(F)}function RI(F){for(var Q,$=[];!(Q=F.next()).done;)$.push(Q.value);return $}function g0(F){var Q=-1,$=Array(F.size);return F.forEach(function(ye,ze){$[++Q]=[ze,ye]}),$}function Qx(F,Q){return function($){return F(Q($))}}function Sa(F,Q){for(var $=-1,ye=F.length,ze=0,Tt=[];++$<ye;){var zr=F[$];(zr===Q||zr===b)&&(F[$]=b,Tt[ze++]=$)}return Tt}function tp(F){var Q=-1,$=Array(F.size);return F.forEach(function(ye){$[++Q]=ye}),$}function AI(F){var Q=-1,$=Array(F.size);return F.forEach(function(ye){$[++Q]=[ye,ye]}),$}function OI(F,Q,$){for(var ye=$-1,ze=F.length;++ye<ze;)if(F[ye]===Q)return ye;return-1}function kI(F,Q,$){for(var ye=$+1;ye--;)if(F[ye]===Q)return ye;return ye}function Ic(F){return Tc(F)?PI(F):mI(F)}function Bn(F){return Tc(F)?BI(F):vI(F)}function e1(F){for(var Q=F.length;Q--&&or.test(F.charAt(Q)););return Q}var NI=h0(oI);function PI(F){for(var Q=a0.lastIndex=0;a0.test(F);)++Q;return Q}function BI(F){return F.match(a0)||[]}function MI(F){return F.match(eI)||[]}var CI=function F(Q){Q=Q==null?Xr:Ea.defaults(Xr.Object(),Q,Ea.pick(Xr,iI));var $=Q.Array,ye=Q.Date,ze=Q.Error,Tt=Q.Function,zr=Q.Math,Vt=Q.Object,b0=Q.RegExp,LI=Q.String,un=Q.TypeError,rp=$.prototype,DI=Tt.prototype,Rc=Vt.prototype,ip=Q["__core-js_shared__"],np=DI.toString,kt=Rc.hasOwnProperty,UI=0,t1=function(){var s=/[^.]+$/.exec(ip&&ip.keys&&ip.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),sp=Rc.toString,qI=np.call(Vt),FI=Xr._,HI=b0("^"+np.call(kt).replace(Ht,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ap=Ux?Q.Buffer:e,Ta=Q.Symbol,op=Q.Uint8Array,r1=ap?ap.allocUnsafe:e,cp=Qx(Vt.getPrototypeOf,Vt),i1=Vt.create,n1=Rc.propertyIsEnumerable,up=rp.splice,s1=Ta?Ta.isConcatSpreadable:e,$u=Ta?Ta.iterator:e,xo=Ta?Ta.toStringTag:e,fp=function(){try{var s=Eo(Vt,"defineProperty");return s({},"",{}),s}catch{}}(),zI=Q.clearTimeout!==Xr.clearTimeout&&Q.clearTimeout,jI=ye&&ye.now!==Xr.Date.now&&ye.now,VI=Q.setTimeout!==Xr.setTimeout&&Q.setTimeout,lp=zr.ceil,pp=zr.floor,x0=Vt.getOwnPropertySymbols,WI=ap?ap.isBuffer:e,a1=Q.isFinite,KI=rp.join,GI=Qx(Vt.keys,Vt),jr=zr.max,ui=zr.min,$I=ye.now,XI=Q.parseInt,o1=zr.random,YI=rp.reverse,_0=Eo(Q,"DataView"),Xu=Eo(Q,"Map"),y0=Eo(Q,"Promise"),Ac=Eo(Q,"Set"),Yu=Eo(Q,"WeakMap"),Zu=Eo(Vt,"create"),hp=Yu&&new Yu,Oc={},ZI=To(_0),JI=To(Xu),QI=To(y0),eR=To(Ac),tR=To(Yu),dp=Ta?Ta.prototype:e,Ju=dp?dp.valueOf:e,c1=dp?dp.toString:e;function k(s){if(_r(s)&&!et(s)&&!(s instanceof mt)){if(s instanceof fn)return s;if(kt.call(s,"__wrapped__"))return u_(s)}return new fn(s)}var kc=function(){function s(){}return function(o){if(!br(o))return{};if(i1)return i1(o);s.prototype=o;var d=new s;return s.prototype=e,d}}();function mp(){}function fn(s,o){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=e}k.templateSettings={escape:nr,evaluate:$e,interpolate:Xt,variable:"",imports:{_:k}},k.prototype=mp.prototype,k.prototype.constructor=k,fn.prototype=kc(mp.prototype),fn.prototype.constructor=fn;function mt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function rR(){var s=new mt(this.__wrapped__);return s.__actions__=Ti(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Ti(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Ti(this.__views__),s}function iR(){if(this.__filtered__){var s=new mt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function nR(){var s=this.__wrapped__.value(),o=this.__dir__,d=et(s),y=o<0,R=d?s.length:0,N=vA(0,R,this.__views__),C=N.start,D=N.end,H=D-C,te=y?D:C-1,re=this.__iteratees__,oe=re.length,de=0,Ie=ui(H,this.__takeCount__);if(!d||!y&&R==H&&Ie==H)return P1(s,this.__actions__);var Be=[];e:for(;H--&&de<Ie;){te+=o;for(var ft=-1,Me=s[te];++ft<oe;){var ht=re[ft],xt=ht.iteratee,$i=ht.type,xi=xt(Me);if($i==v)Me=xi;else if(!xi){if($i==p)continue e;break e}}Be[de++]=Me}return Be}mt.prototype=kc(mp.prototype),mt.prototype.constructor=mt;function _o(s){var o=-1,d=s==null?0:s.length;for(this.clear();++o<d;){var y=s[o];this.set(y[0],y[1])}}function sR(){this.__data__=Zu?Zu(null):{},this.size=0}function aR(s){var o=this.has(s)&&delete this.__data__[s];return this.size-=o?1:0,o}function oR(s){var o=this.__data__;if(Zu){var d=o[s];return d===u?e:d}return kt.call(o,s)?o[s]:e}function cR(s){var o=this.__data__;return Zu?o[s]!==e:kt.call(o,s)}function uR(s,o){var d=this.__data__;return this.size+=this.has(s)?0:1,d[s]=Zu&&o===e?u:o,this}_o.prototype.clear=sR,_o.prototype.delete=aR,_o.prototype.get=oR,_o.prototype.has=cR,_o.prototype.set=uR;function Fs(s){var o=-1,d=s==null?0:s.length;for(this.clear();++o<d;){var y=s[o];this.set(y[0],y[1])}}function fR(){this.__data__=[],this.size=0}function lR(s){var o=this.__data__,d=vp(o,s);if(d<0)return!1;var y=o.length-1;return d==y?o.pop():up.call(o,d,1),--this.size,!0}function pR(s){var o=this.__data__,d=vp(o,s);return d<0?e:o[d][1]}function hR(s){return vp(this.__data__,s)>-1}function dR(s,o){var d=this.__data__,y=vp(d,s);return y<0?(++this.size,d.push([s,o])):d[y][1]=o,this}Fs.prototype.clear=fR,Fs.prototype.delete=lR,Fs.prototype.get=pR,Fs.prototype.has=hR,Fs.prototype.set=dR;function Hs(s){var o=-1,d=s==null?0:s.length;for(this.clear();++o<d;){var y=s[o];this.set(y[0],y[1])}}function mR(){this.size=0,this.__data__={hash:new _o,map:new(Xu||Fs),string:new _o}}function vR(s){var o=Ap(this,s).delete(s);return this.size-=o?1:0,o}function gR(s){return Ap(this,s).get(s)}function bR(s){return Ap(this,s).has(s)}function xR(s,o){var d=Ap(this,s),y=d.size;return d.set(s,o),this.size+=d.size==y?0:1,this}Hs.prototype.clear=mR,Hs.prototype.delete=vR,Hs.prototype.get=gR,Hs.prototype.has=bR,Hs.prototype.set=xR;function yo(s){var o=-1,d=s==null?0:s.length;for(this.__data__=new Hs;++o<d;)this.add(s[o])}function _R(s){return this.__data__.set(s,u),this}function yR(s){return this.__data__.has(s)}yo.prototype.add=yo.prototype.push=_R,yo.prototype.has=yR;function Mn(s){var o=this.__data__=new Fs(s);this.size=o.size}function wR(){this.__data__=new Fs,this.size=0}function SR(s){var o=this.__data__,d=o.delete(s);return this.size=o.size,d}function ER(s){return this.__data__.get(s)}function TR(s){return this.__data__.has(s)}function IR(s,o){var d=this.__data__;if(d instanceof Fs){var y=d.__data__;if(!Xu||y.length<r-1)return y.push([s,o]),this.size=++d.size,this;d=this.__data__=new Hs(y)}return d.set(s,o),this.size=d.size,this}Mn.prototype.clear=wR,Mn.prototype.delete=SR,Mn.prototype.get=ER,Mn.prototype.has=TR,Mn.prototype.set=IR;function u1(s,o){var d=et(s),y=!d&&Io(s),R=!d&&!y&&ka(s),N=!d&&!y&&!R&&Mc(s),C=d||y||R||N,D=C?m0(s.length,LI):[],H=D.length;for(var te in s)(o||kt.call(s,te))&&!(C&&(te=="length"||R&&(te=="offset"||te=="parent")||N&&(te=="buffer"||te=="byteLength"||te=="byteOffset")||Ws(te,H)))&&D.push(te);return D}function f1(s){var o=s.length;return o?s[P0(0,o-1)]:e}function RR(s,o){return Op(Ti(s),wo(o,0,s.length))}function AR(s){return Op(Ti(s))}function w0(s,o,d){(d!==e&&!Cn(s[o],d)||d===e&&!(o in s))&&zs(s,o,d)}function Qu(s,o,d){var y=s[o];(!(kt.call(s,o)&&Cn(y,d))||d===e&&!(o in s))&&zs(s,o,d)}function vp(s,o){for(var d=s.length;d--;)if(Cn(s[d][0],o))return d;return-1}function OR(s,o,d,y){return Ia(s,function(R,N,C){o(y,R,d(R),C)}),y}function l1(s,o){return s&&os(o,Yr(o),s)}function kR(s,o){return s&&os(o,Ri(o),s)}function zs(s,o,d){o=="__proto__"&&fp?fp(s,o,{configurable:!0,enumerable:!0,value:d,writable:!0}):s[o]=d}function S0(s,o){for(var d=-1,y=o.length,R=$(y),N=s==null;++d<y;)R[d]=N?e:im(s,o[d]);return R}function wo(s,o,d){return s===s&&(d!==e&&(s=s<=d?s:d),o!==e&&(s=s>=o?s:o)),s}function ln(s,o,d,y,R,N){var C,D=o&w,H=o&T,te=o&I;if(d&&(C=R?d(s,y,R,N):d(s)),C!==e)return C;if(!br(s))return s;var re=et(s);if(re){if(C=bA(s),!D)return Ti(s,C)}else{var oe=fi(s),de=oe==St||oe==Oe;if(ka(s))return C1(s,D);if(oe==Ae||oe==Z||de&&!R){if(C=H||de?{}:e_(s),!D)return H?oA(s,kR(C,s)):aA(s,l1(C,s))}else{if(!Yt[oe])return R?s:{};C=xA(s,oe,D)}}N||(N=new Mn);var Ie=N.get(s);if(Ie)return Ie;N.set(s,C),O_(s)?s.forEach(function(Me){C.add(ln(Me,o,d,Me,s,N))}):R_(s)&&s.forEach(function(Me,ht){C.set(ht,ln(Me,o,d,ht,s,N))});var Be=te?H?j0:z0:H?Ri:Yr,ft=re?e:Be(s);return cn(ft||s,function(Me,ht){ft&&(ht=Me,Me=s[ht]),Qu(C,ht,ln(Me,o,d,ht,s,N))}),C}function NR(s){var o=Yr(s);return function(d){return p1(d,s,o)}}function p1(s,o,d){var y=d.length;if(s==null)return!y;for(s=Vt(s);y--;){var R=d[y],N=o[R],C=s[R];if(C===e&&!(R in s)||!N(C))return!1}return!0}function h1(s,o,d){if(typeof s!="function")throw new un(n);return of(function(){s.apply(e,d)},o)}function ef(s,o,d,y){var R=-1,N=Ql,C=!0,D=s.length,H=[],te=o.length;if(!D)return H;d&&(o=vr(o,Wi(d))),y?(N=u0,C=!1):o.length>=r&&(N=Gu,C=!1,o=new yo(o));e:for(;++R<D;){var re=s[R],oe=d==null?re:d(re);if(re=y||re!==0?re:0,C&&oe===oe){for(var de=te;de--;)if(o[de]===oe)continue e;H.push(re)}else N(o,oe,y)||H.push(re)}return H}var Ia=F1(as),d1=F1(T0,!0);function PR(s,o){var d=!0;return Ia(s,function(y,R,N){return d=!!o(y,R,N),d}),d}function gp(s,o,d){for(var y=-1,R=s.length;++y<R;){var N=s[y],C=o(N);if(C!=null&&(D===e?C===C&&!Gi(C):d(C,D)))var D=C,H=N}return H}function BR(s,o,d,y){var R=s.length;for(d=at(d),d<0&&(d=-d>R?0:R+d),y=y===e||y>R?R:at(y),y<0&&(y+=R),y=d>y?0:N_(y);d<y;)s[d++]=o;return s}function m1(s,o){var d=[];return Ia(s,function(y,R,N){o(y,R,N)&&d.push(y)}),d}function ii(s,o,d,y,R){var N=-1,C=s.length;for(d||(d=yA),R||(R=[]);++N<C;){var D=s[N];o>0&&d(D)?o>1?ii(D,o-1,d,y,R):wa(R,D):y||(R[R.length]=D)}return R}var E0=H1(),v1=H1(!0);function as(s,o){return s&&E0(s,o,Yr)}function T0(s,o){return s&&v1(s,o,Yr)}function bp(s,o){return ya(o,function(d){return Ks(s[d])})}function So(s,o){o=Aa(o,s);for(var d=0,y=o.length;s!=null&&d<y;)s=s[cs(o[d++])];return d&&d==y?s:e}function g1(s,o,d){var y=o(s);return et(s)?y:wa(y,d(s))}function gi(s){return s==null?s===e?Qt:Re:xo&&xo in Vt(s)?mA(s):AA(s)}function I0(s,o){return s>o}function MR(s,o){return s!=null&&kt.call(s,o)}function CR(s,o){return s!=null&&o in Vt(s)}function LR(s,o,d){return s>=ui(o,d)&&s<jr(o,d)}function R0(s,o,d){for(var y=d?u0:Ql,R=s[0].length,N=s.length,C=N,D=$(N),H=1/0,te=[];C--;){var re=s[C];C&&o&&(re=vr(re,Wi(o))),H=ui(re.length,H),D[C]=!d&&(o||R>=120&&re.length>=120)?new yo(C&&re):e}re=s[0];var oe=-1,de=D[0];e:for(;++oe<R&&te.length<H;){var Ie=re[oe],Be=o?o(Ie):Ie;if(Ie=d||Ie!==0?Ie:0,!(de?Gu(de,Be):y(te,Be,d))){for(C=N;--C;){var ft=D[C];if(!(ft?Gu(ft,Be):y(s[C],Be,d)))continue e}de&&de.push(Be),te.push(Ie)}}return te}function DR(s,o,d,y){return as(s,function(R,N,C){o(y,d(R),N,C)}),y}function tf(s,o,d){o=Aa(o,s),s=n_(s,o);var y=s==null?s:s[cs(hn(o))];return y==null?e:Vi(y,s,d)}function b1(s){return _r(s)&&gi(s)==Z}function UR(s){return _r(s)&&gi(s)==Ot}function qR(s){return _r(s)&&gi(s)==Ee}function rf(s,o,d,y,R){return s===o?!0:s==null||o==null||!_r(s)&&!_r(o)?s!==s&&o!==o:FR(s,o,d,y,rf,R)}function FR(s,o,d,y,R,N){var C=et(s),D=et(o),H=C?se:fi(s),te=D?se:fi(o);H=H==Z?Ae:H,te=te==Z?Ae:te;var re=H==Ae,oe=te==Ae,de=H==te;if(de&&ka(s)){if(!ka(o))return!1;C=!0,re=!1}if(de&&!re)return N||(N=new Mn),C||Mc(s)?Z1(s,o,d,y,R,N):hA(s,o,H,d,y,R,N);if(!(d&B)){var Ie=re&&kt.call(s,"__wrapped__"),Be=oe&&kt.call(o,"__wrapped__");if(Ie||Be){var ft=Ie?s.value():s,Me=Be?o.value():o;return N||(N=new Mn),R(ft,Me,d,y,N)}}return de?(N||(N=new Mn),dA(s,o,d,y,R,N)):!1}function HR(s){return _r(s)&&fi(s)==st}function A0(s,o,d,y){var R=d.length,N=R,C=!y;if(s==null)return!N;for(s=Vt(s);R--;){var D=d[R];if(C&&D[2]?D[1]!==s[D[0]]:!(D[0]in s))return!1}for(;++R<N;){D=d[R];var H=D[0],te=s[H],re=D[1];if(C&&D[2]){if(te===e&&!(H in s))return!1}else{var oe=new Mn;if(y)var de=y(te,re,H,s,o,oe);if(!(de===e?rf(re,te,B|M,y,oe):de))return!1}}return!0}function x1(s){if(!br(s)||SA(s))return!1;var o=Ks(s)?HI:Os;return o.test(To(s))}function zR(s){return _r(s)&&gi(s)==At}function jR(s){return _r(s)&&fi(s)==bt}function VR(s){return _r(s)&&Cp(s.length)&&!!pr[gi(s)]}function _1(s){return typeof s=="function"?s:s==null?Ai:typeof s=="object"?et(s)?S1(s[0],s[1]):w1(s):z_(s)}function O0(s){if(!af(s))return GI(s);var o=[];for(var d in Vt(s))kt.call(s,d)&&d!="constructor"&&o.push(d);return o}function WR(s){if(!br(s))return RA(s);var o=af(s),d=[];for(var y in s)y=="constructor"&&(o||!kt.call(s,y))||d.push(y);return d}function k0(s,o){return s<o}function y1(s,o){var d=-1,y=Ii(s)?$(s.length):[];return Ia(s,function(R,N,C){y[++d]=o(R,N,C)}),y}function w1(s){var o=W0(s);return o.length==1&&o[0][2]?r_(o[0][0],o[0][1]):function(d){return d===s||A0(d,s,o)}}function S1(s,o){return G0(s)&&t_(o)?r_(cs(s),o):function(d){var y=im(d,s);return y===e&&y===o?nm(d,s):rf(o,y,B|M)}}function xp(s,o,d,y,R){s!==o&&E0(o,function(N,C){if(R||(R=new Mn),br(N))KR(s,o,C,d,xp,y,R);else{var D=y?y(X0(s,C),N,C+"",s,o,R):e;D===e&&(D=N),w0(s,C,D)}},Ri)}function KR(s,o,d,y,R,N,C){var D=X0(s,d),H=X0(o,d),te=C.get(H);if(te){w0(s,d,te);return}var re=N?N(D,H,d+"",s,o,C):e,oe=re===e;if(oe){var de=et(H),Ie=!de&&ka(H),Be=!de&&!Ie&&Mc(H);re=H,de||Ie||Be?et(D)?re=D:Tr(D)?re=Ti(D):Ie?(oe=!1,re=C1(H,!0)):Be?(oe=!1,re=L1(H,!0)):re=[]:cf(H)||Io(H)?(re=D,Io(D)?re=P_(D):(!br(D)||Ks(D))&&(re=e_(H))):oe=!1}oe&&(C.set(H,re),R(re,H,y,N,C),C.delete(H)),w0(s,d,re)}function E1(s,o){var d=s.length;if(d)return o+=o<0?d:0,Ws(o,d)?s[o]:e}function T1(s,o,d){o.length?o=vr(o,function(N){return et(N)?function(C){return So(C,N.length===1?N[0]:N)}:N}):o=[Ai];var y=-1;o=vr(o,Wi(Ne()));var R=y1(s,function(N,C,D){var H=vr(o,function(te){return te(N)});return{criteria:H,index:++y,value:N}});return xI(R,function(N,C){return sA(N,C,d)})}function GR(s,o){return I1(s,o,function(d,y){return nm(s,y)})}function I1(s,o,d){for(var y=-1,R=o.length,N={};++y<R;){var C=o[y],D=So(s,C);d(D,C)&&nf(N,Aa(C,s),D)}return N}function $R(s){return function(o){return So(o,s)}}function N0(s,o,d,y){var R=y?bI:Ec,N=-1,C=o.length,D=s;for(s===o&&(o=Ti(o)),d&&(D=vr(s,Wi(d)));++N<C;)for(var H=0,te=o[N],re=d?d(te):te;(H=R(D,re,H,y))>-1;)D!==s&&up.call(D,H,1),up.call(s,H,1);return s}function R1(s,o){for(var d=s?o.length:0,y=d-1;d--;){var R=o[d];if(d==y||R!==N){var N=R;Ws(R)?up.call(s,R,1):C0(s,R)}}return s}function P0(s,o){return s+pp(o1()*(o-s+1))}function XR(s,o,d,y){for(var R=-1,N=jr(lp((o-s)/(d||1)),0),C=$(N);N--;)C[y?N:++R]=s,s+=d;return C}function B0(s,o){var d="";if(!s||o<1||o>S)return d;do o%2&&(d+=s),o=pp(o/2),o&&(s+=s);while(o);return d}function lt(s,o){return Y0(i_(s,o,Ai),s+"")}function YR(s){return f1(Cc(s))}function ZR(s,o){var d=Cc(s);return Op(d,wo(o,0,d.length))}function nf(s,o,d,y){if(!br(s))return s;o=Aa(o,s);for(var R=-1,N=o.length,C=N-1,D=s;D!=null&&++R<N;){var H=cs(o[R]),te=d;if(H==="__proto__"||H==="constructor"||H==="prototype")return s;if(R!=C){var re=D[H];te=y?y(re,H,D):e,te===e&&(te=br(re)?re:Ws(o[R+1])?[]:{})}Qu(D,H,te),D=D[H]}return s}var A1=hp?function(s,o){return hp.set(s,o),s}:Ai,JR=fp?function(s,o){return fp(s,"toString",{configurable:!0,enumerable:!1,value:am(o),writable:!0})}:Ai;function QR(s){return Op(Cc(s))}function pn(s,o,d){var y=-1,R=s.length;o<0&&(o=-o>R?0:R+o),d=d>R?R:d,d<0&&(d+=R),R=o>d?0:d-o>>>0,o>>>=0;for(var N=$(R);++y<R;)N[y]=s[y+o];return N}function eA(s,o){var d;return Ia(s,function(y,R,N){return d=o(y,R,N),!d}),!!d}function _p(s,o,d){var y=0,R=s==null?y:s.length;if(typeof o=="number"&&o===o&&R<=U){for(;y<R;){var N=y+R>>>1,C=s[N];C!==null&&!Gi(C)&&(d?C<=o:C<o)?y=N+1:R=N}return R}return M0(s,o,Ai,d)}function M0(s,o,d,y){var R=0,N=s==null?0:s.length;if(N===0)return 0;o=d(o);for(var C=o!==o,D=o===null,H=Gi(o),te=o===e;R<N;){var re=pp((R+N)/2),oe=d(s[re]),de=oe!==e,Ie=oe===null,Be=oe===oe,ft=Gi(oe);if(C)var Me=y||Be;else te?Me=Be&&(y||de):D?Me=Be&&de&&(y||!Ie):H?Me=Be&&de&&!Ie&&(y||!ft):Ie||ft?Me=!1:Me=y?oe<=o:oe<o;Me?R=re+1:N=re}return ui(N,A)}function O1(s,o){for(var d=-1,y=s.length,R=0,N=[];++d<y;){var C=s[d],D=o?o(C):C;if(!d||!Cn(D,H)){var H=D;N[R++]=C===0?0:C}}return N}function k1(s){return typeof s=="number"?s:Gi(s)?l:+s}function Ki(s){if(typeof s=="string")return s;if(et(s))return vr(s,Ki)+"";if(Gi(s))return c1?c1.call(s):"";var o=s+"";return o=="0"&&1/s==-x?"-0":o}function Ra(s,o,d){var y=-1,R=Ql,N=s.length,C=!0,D=[],H=D;if(d)C=!1,R=u0;else if(N>=r){var te=o?null:lA(s);if(te)return tp(te);C=!1,R=Gu,H=new yo}else H=o?[]:D;e:for(;++y<N;){var re=s[y],oe=o?o(re):re;if(re=d||re!==0?re:0,C&&oe===oe){for(var de=H.length;de--;)if(H[de]===oe)continue e;o&&H.push(oe),D.push(re)}else R(H,oe,d)||(H!==D&&H.push(oe),D.push(re))}return D}function C0(s,o){return o=Aa(o,s),s=n_(s,o),s==null||delete s[cs(hn(o))]}function N1(s,o,d,y){return nf(s,o,d(So(s,o)),y)}function yp(s,o,d,y){for(var R=s.length,N=y?R:-1;(y?N--:++N<R)&&o(s[N],N,s););return d?pn(s,y?0:N,y?N+1:R):pn(s,y?N+1:0,y?R:N)}function P1(s,o){var d=s;return d instanceof mt&&(d=d.value()),f0(o,function(y,R){return R.func.apply(R.thisArg,wa([y],R.args))},d)}function L0(s,o,d){var y=s.length;if(y<2)return y?Ra(s[0]):[];for(var R=-1,N=$(y);++R<y;)for(var C=s[R],D=-1;++D<y;)D!=R&&(N[R]=ef(N[R]||C,s[D],o,d));return Ra(ii(N,1),o,d)}function B1(s,o,d){for(var y=-1,R=s.length,N=o.length,C={};++y<R;){var D=y<N?o[y]:e;d(C,s[y],D)}return C}function D0(s){return Tr(s)?s:[]}function U0(s){return typeof s=="function"?s:Ai}function Aa(s,o){return et(s)?s:G0(s,o)?[s]:c_(Rt(s))}var tA=lt;function Oa(s,o,d){var y=s.length;return d=d===e?y:d,!o&&d>=y?s:pn(s,o,d)}var M1=zI||function(s){return Xr.clearTimeout(s)};function C1(s,o){if(o)return s.slice();var d=s.length,y=r1?r1(d):new s.constructor(d);return s.copy(y),y}function q0(s){var o=new s.constructor(s.byteLength);return new op(o).set(new op(s)),o}function rA(s,o){var d=o?q0(s.buffer):s.buffer;return new s.constructor(d,s.byteOffset,s.byteLength)}function iA(s){var o=new s.constructor(s.source,jt.exec(s));return o.lastIndex=s.lastIndex,o}function nA(s){return Ju?Vt(Ju.call(s)):{}}function L1(s,o){var d=o?q0(s.buffer):s.buffer;return new s.constructor(d,s.byteOffset,s.length)}function D1(s,o){if(s!==o){var d=s!==e,y=s===null,R=s===s,N=Gi(s),C=o!==e,D=o===null,H=o===o,te=Gi(o);if(!D&&!te&&!N&&s>o||N&&C&&H&&!D&&!te||y&&C&&H||!d&&H||!R)return 1;if(!y&&!N&&!te&&s<o||te&&d&&R&&!y&&!N||D&&d&&R||!C&&R||!H)return-1}return 0}function sA(s,o,d){for(var y=-1,R=s.criteria,N=o.criteria,C=R.length,D=d.length;++y<C;){var H=D1(R[y],N[y]);if(H){if(y>=D)return H;var te=d[y];return H*(te=="desc"?-1:1)}}return s.index-o.index}function U1(s,o,d,y){for(var R=-1,N=s.length,C=d.length,D=-1,H=o.length,te=jr(N-C,0),re=$(H+te),oe=!y;++D<H;)re[D]=o[D];for(;++R<C;)(oe||R<N)&&(re[d[R]]=s[R]);for(;te--;)re[D++]=s[R++];return re}function q1(s,o,d,y){for(var R=-1,N=s.length,C=-1,D=d.length,H=-1,te=o.length,re=jr(N-D,0),oe=$(re+te),de=!y;++R<re;)oe[R]=s[R];for(var Ie=R;++H<te;)oe[Ie+H]=o[H];for(;++C<D;)(de||R<N)&&(oe[Ie+d[C]]=s[R++]);return oe}function Ti(s,o){var d=-1,y=s.length;for(o||(o=$(y));++d<y;)o[d]=s[d];return o}function os(s,o,d,y){var R=!d;d||(d={});for(var N=-1,C=o.length;++N<C;){var D=o[N],H=y?y(d[D],s[D],D,d,s):e;H===e&&(H=s[D]),R?zs(d,D,H):Qu(d,D,H)}return d}function aA(s,o){return os(s,K0(s),o)}function oA(s,o){return os(s,J1(s),o)}function wp(s,o){return function(d,y){var R=et(d)?pI:OR,N=o?o():{};return R(d,s,Ne(y,2),N)}}function Nc(s){return lt(function(o,d){var y=-1,R=d.length,N=R>1?d[R-1]:e,C=R>2?d[2]:e;for(N=s.length>3&&typeof N=="function"?(R--,N):e,C&&bi(d[0],d[1],C)&&(N=R<3?e:N,R=1),o=Vt(o);++y<R;){var D=d[y];D&&s(o,D,y,N)}return o})}function F1(s,o){return function(d,y){if(d==null)return d;if(!Ii(d))return s(d,y);for(var R=d.length,N=o?R:-1,C=Vt(d);(o?N--:++N<R)&&y(C[N],N,C)!==!1;);return d}}function H1(s){return function(o,d,y){for(var R=-1,N=Vt(o),C=y(o),D=C.length;D--;){var H=C[s?D:++R];if(d(N[H],H,N)===!1)break}return o}}function cA(s,o,d){var y=o&P,R=sf(s);function N(){var C=this&&this!==Xr&&this instanceof N?R:s;return C.apply(y?d:this,arguments)}return N}function z1(s){return function(o){o=Rt(o);var d=Tc(o)?Bn(o):e,y=d?d[0]:o.charAt(0),R=d?Oa(d,1).join(""):o.slice(1);return y[s]()+R}}function Pc(s){return function(o){return f0(F_(q_(o).replace(JT,"")),s,"")}}function sf(s){return function(){var o=arguments;switch(o.length){case 0:return new s;case 1:return new s(o[0]);case 2:return new s(o[0],o[1]);case 3:return new s(o[0],o[1],o[2]);case 4:return new s(o[0],o[1],o[2],o[3]);case 5:return new s(o[0],o[1],o[2],o[3],o[4]);case 6:return new s(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new s(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var d=kc(s.prototype),y=s.apply(d,o);return br(y)?y:d}}function uA(s,o,d){var y=sf(s);function R(){for(var N=arguments.length,C=$(N),D=N,H=Bc(R);D--;)C[D]=arguments[D];var te=N<3&&C[0]!==H&&C[N-1]!==H?[]:Sa(C,H);if(N-=te.length,N<d)return G1(s,o,Sp,R.placeholder,e,C,te,e,e,d-N);var re=this&&this!==Xr&&this instanceof R?y:s;return Vi(re,this,C)}return R}function j1(s){return function(o,d,y){var R=Vt(o);if(!Ii(o)){var N=Ne(d,3);o=Yr(o),d=function(D){return N(R[D],D,R)}}var C=s(o,d,y);return C>-1?R[N?o[C]:C]:e}}function V1(s){return Vs(function(o){var d=o.length,y=d,R=fn.prototype.thru;for(s&&o.reverse();y--;){var N=o[y];if(typeof N!="function")throw new un(n);if(R&&!C&&Rp(N)=="wrapper")var C=new fn([],!0)}for(y=C?y:d;++y<d;){N=o[y];var D=Rp(N),H=D=="wrapper"?V0(N):e;H&&$0(H[0])&&H[1]==(_e|W|ee|Te)&&!H[4].length&&H[9]==1?C=C[Rp(H[0])].apply(C,H[3]):C=N.length==1&&$0(N)?C[D]():C.thru(N)}return function(){var te=arguments,re=te[0];if(C&&te.length==1&&et(re))return C.plant(re).value();for(var oe=0,de=d?o[oe].apply(this,te):re;++oe<d;)de=o[oe].call(this,de);return de}})}function Sp(s,o,d,y,R,N,C,D,H,te){var re=o&_e,oe=o&P,de=o&L,Ie=o&(W|q),Be=o&be,ft=de?e:sf(s);function Me(){for(var ht=arguments.length,xt=$(ht),$i=ht;$i--;)xt[$i]=arguments[$i];if(Ie)var xi=Bc(Me),Xi=yI(xt,xi);if(y&&(xt=U1(xt,y,R,Ie)),N&&(xt=q1(xt,N,C,Ie)),ht-=Xi,Ie&&ht<te){var Ir=Sa(xt,xi);return G1(s,o,Sp,Me.placeholder,d,xt,Ir,D,H,te-ht)}var Ln=oe?d:this,$s=de?Ln[s]:s;return ht=xt.length,D?xt=OA(xt,D):Be&&ht>1&&xt.reverse(),re&&H<ht&&(xt.length=H),this&&this!==Xr&&this instanceof Me&&($s=ft||sf($s)),$s.apply(Ln,xt)}return Me}function W1(s,o){return function(d,y){return DR(d,s,o(y),{})}}function Ep(s,o){return function(d,y){var R;if(d===e&&y===e)return o;if(d!==e&&(R=d),y!==e){if(R===e)return y;typeof d=="string"||typeof y=="string"?(d=Ki(d),y=Ki(y)):(d=k1(d),y=k1(y)),R=s(d,y)}return R}}function F0(s){return Vs(function(o){return o=vr(o,Wi(Ne())),lt(function(d){var y=this;return s(o,function(R){return Vi(R,y,d)})})})}function Tp(s,o){o=o===e?" ":Ki(o);var d=o.length;if(d<2)return d?B0(o,s):o;var y=B0(o,lp(s/Ic(o)));return Tc(o)?Oa(Bn(y),0,s).join(""):y.slice(0,s)}function fA(s,o,d,y){var R=o&P,N=sf(s);function C(){for(var D=-1,H=arguments.length,te=-1,re=y.length,oe=$(re+H),de=this&&this!==Xr&&this instanceof C?N:s;++te<re;)oe[te]=y[te];for(;H--;)oe[te++]=arguments[++D];return Vi(de,R?d:this,oe)}return C}function K1(s){return function(o,d,y){return y&&typeof y!="number"&&bi(o,d,y)&&(d=y=e),o=Gs(o),d===e?(d=o,o=0):d=Gs(d),y=y===e?o<d?1:-1:Gs(y),XR(o,d,y,s)}}function Ip(s){return function(o,d){return typeof o=="string"&&typeof d=="string"||(o=dn(o),d=dn(d)),s(o,d)}}function G1(s,o,d,y,R,N,C,D,H,te){var re=o&W,oe=re?C:e,de=re?e:C,Ie=re?N:e,Be=re?e:N;o|=re?ee:fe,o&=~(re?fe:ee),o&X||(o&=~(P|L));var ft=[s,o,R,Ie,oe,Be,de,D,H,te],Me=d.apply(e,ft);return $0(s)&&s_(Me,ft),Me.placeholder=y,a_(Me,s,o)}function H0(s){var o=zr[s];return function(d,y){if(d=dn(d),y=y==null?0:ui(at(y),292),y&&a1(d)){var R=(Rt(d)+"e").split("e"),N=o(R[0]+"e"+(+R[1]+y));return R=(Rt(N)+"e").split("e"),+(R[0]+"e"+(+R[1]-y))}return o(d)}}var lA=Ac&&1/tp(new Ac([,-0]))[1]==x?function(s){return new Ac(s)}:um;function $1(s){return function(o){var d=fi(o);return d==st?g0(o):d==bt?AI(o):_I(o,s(o))}}function js(s,o,d,y,R,N,C,D){var H=o&L;if(!H&&typeof s!="function")throw new un(n);var te=y?y.length:0;if(te||(o&=~(ee|fe),y=R=e),C=C===e?C:jr(at(C),0),D=D===e?D:at(D),te-=R?R.length:0,o&fe){var re=y,oe=R;y=R=e}var de=H?e:V0(s),Ie=[s,o,d,y,R,re,oe,N,C,D];if(de&&IA(Ie,de),s=Ie[0],o=Ie[1],d=Ie[2],y=Ie[3],R=Ie[4],D=Ie[9]=Ie[9]===e?H?0:s.length:jr(Ie[9]-te,0),!D&&o&(W|q)&&(o&=~(W|q)),!o||o==P)var Be=cA(s,o,d);else o==W||o==q?Be=uA(s,o,D):(o==ee||o==(P|ee))&&!R.length?Be=fA(s,o,d,y):Be=Sp.apply(e,Ie);var ft=de?A1:s_;return a_(ft(Be,Ie),s,o)}function X1(s,o,d,y){return s===e||Cn(s,Rc[d])&&!kt.call(y,d)?o:s}function Y1(s,o,d,y,R,N){return br(s)&&br(o)&&(N.set(o,s),xp(s,o,e,Y1,N),N.delete(o)),s}function pA(s){return cf(s)?e:s}function Z1(s,o,d,y,R,N){var C=d&B,D=s.length,H=o.length;if(D!=H&&!(C&&H>D))return!1;var te=N.get(s),re=N.get(o);if(te&&re)return te==o&&re==s;var oe=-1,de=!0,Ie=d&M?new yo:e;for(N.set(s,o),N.set(o,s);++oe<D;){var Be=s[oe],ft=o[oe];if(y)var Me=C?y(ft,Be,oe,o,s,N):y(Be,ft,oe,s,o,N);if(Me!==e){if(Me)continue;de=!1;break}if(Ie){if(!l0(o,function(ht,xt){if(!Gu(Ie,xt)&&(Be===ht||R(Be,ht,d,y,N)))return Ie.push(xt)})){de=!1;break}}else if(!(Be===ft||R(Be,ft,d,y,N))){de=!1;break}}return N.delete(s),N.delete(o),de}function hA(s,o,d,y,R,N,C){switch(d){case Le:if(s.byteLength!=o.byteLength||s.byteOffset!=o.byteOffset)return!1;s=s.buffer,o=o.buffer;case Ot:return!(s.byteLength!=o.byteLength||!N(new op(s),new op(o)));case he:case Ee:case rt:return Cn(+s,+o);case dt:return s.name==o.name&&s.message==o.message;case At:case De:return s==o+"";case st:var D=g0;case bt:var H=y&B;if(D||(D=tp),s.size!=o.size&&!H)return!1;var te=C.get(s);if(te)return te==o;y|=M,C.set(s,o);var re=Z1(D(s),D(o),y,R,N,C);return C.delete(s),re;case Pt:if(Ju)return Ju.call(s)==Ju.call(o)}return!1}function dA(s,o,d,y,R,N){var C=d&B,D=z0(s),H=D.length,te=z0(o),re=te.length;if(H!=re&&!C)return!1;for(var oe=H;oe--;){var de=D[oe];if(!(C?de in o:kt.call(o,de)))return!1}var Ie=N.get(s),Be=N.get(o);if(Ie&&Be)return Ie==o&&Be==s;var ft=!0;N.set(s,o),N.set(o,s);for(var Me=C;++oe<H;){de=D[oe];var ht=s[de],xt=o[de];if(y)var $i=C?y(xt,ht,de,o,s,N):y(ht,xt,de,s,o,N);if(!($i===e?ht===xt||R(ht,xt,d,y,N):$i)){ft=!1;break}Me||(Me=de=="constructor")}if(ft&&!Me){var xi=s.constructor,Xi=o.constructor;xi!=Xi&&"constructor"in s&&"constructor"in o&&!(typeof xi=="function"&&xi instanceof xi&&typeof Xi=="function"&&Xi instanceof Xi)&&(ft=!1)}return N.delete(s),N.delete(o),ft}function Vs(s){return Y0(i_(s,e,p_),s+"")}function z0(s){return g1(s,Yr,K0)}function j0(s){return g1(s,Ri,J1)}var V0=hp?function(s){return hp.get(s)}:um;function Rp(s){for(var o=s.name+"",d=Oc[o],y=kt.call(Oc,o)?d.length:0;y--;){var R=d[y],N=R.func;if(N==null||N==s)return R.name}return o}function Bc(s){var o=kt.call(k,"placeholder")?k:s;return o.placeholder}function Ne(){var s=k.iteratee||om;return s=s===om?_1:s,arguments.length?s(arguments[0],arguments[1]):s}function Ap(s,o){var d=s.__data__;return wA(o)?d[typeof o=="string"?"string":"hash"]:d.map}function W0(s){for(var o=Yr(s),d=o.length;d--;){var y=o[d],R=s[y];o[d]=[y,R,t_(R)]}return o}function Eo(s,o){var d=TI(s,o);return x1(d)?d:e}function mA(s){var o=kt.call(s,xo),d=s[xo];try{s[xo]=e;var y=!0}catch{}var R=sp.call(s);return y&&(o?s[xo]=d:delete s[xo]),R}var K0=x0?function(s){return s==null?[]:(s=Vt(s),ya(x0(s),function(o){return n1.call(s,o)}))}:fm,J1=x0?function(s){for(var o=[];s;)wa(o,K0(s)),s=cp(s);return o}:fm,fi=gi;(_0&&fi(new _0(new ArrayBuffer(1)))!=Le||Xu&&fi(new Xu)!=st||y0&&fi(y0.resolve())!=Kt||Ac&&fi(new Ac)!=bt||Yu&&fi(new Yu)!=Ue)&&(fi=function(s){var o=gi(s),d=o==Ae?s.constructor:e,y=d?To(d):"";if(y)switch(y){case ZI:return Le;case JI:return st;case QI:return Kt;case eR:return bt;case tR:return Ue}return o});function vA(s,o,d){for(var y=-1,R=d.length;++y<R;){var N=d[y],C=N.size;switch(N.type){case"drop":s+=C;break;case"dropRight":o-=C;break;case"take":o=ui(o,s+C);break;case"takeRight":s=jr(s,o-C);break}}return{start:s,end:o}}function gA(s){var o=s.match(cr);return o?o[1].split(ur):[]}function Q1(s,o,d){o=Aa(o,s);for(var y=-1,R=o.length,N=!1;++y<R;){var C=cs(o[y]);if(!(N=s!=null&&d(s,C)))break;s=s[C]}return N||++y!=R?N:(R=s==null?0:s.length,!!R&&Cp(R)&&Ws(C,R)&&(et(s)||Io(s)))}function bA(s){var o=s.length,d=new s.constructor(o);return o&&typeof s[0]=="string"&&kt.call(s,"index")&&(d.index=s.index,d.input=s.input),d}function e_(s){return typeof s.constructor=="function"&&!af(s)?kc(cp(s)):{}}function xA(s,o,d){var y=s.constructor;switch(o){case Ot:return q0(s);case he:case Ee:return new y(+s);case Le:return rA(s,d);case Ct:case Lt:case qe:case Dt:case Ut:case Fe:case qt:case Ft:case He:return L1(s,d);case st:return new y;case rt:case De:return new y(s);case At:return iA(s);case bt:return new y;case Pt:return nA(s)}}function _A(s,o){var d=o.length;if(!d)return s;var y=d-1;return o[y]=(d>1?"& ":"")+o[y],o=o.join(d>2?", ":" "),s.replace(Ze,`{
2
- /* [wrapped with `+o+`] */
3
- `)}function yA(s){return et(s)||Io(s)||!!(s1&&s&&s[s1])}function Ws(s,o){var d=typeof s;return o=o??S,!!o&&(d=="number"||d!="symbol"&&Ns.test(s))&&s>-1&&s%1==0&&s<o}function bi(s,o,d){if(!br(d))return!1;var y=typeof o;return(y=="number"?Ii(d)&&Ws(o,d.length):y=="string"&&o in d)?Cn(d[o],s):!1}function G0(s,o){if(et(s))return!1;var d=typeof s;return d=="number"||d=="symbol"||d=="boolean"||s==null||Gi(s)?!0:Xe.test(s)||!sr.test(s)||o!=null&&s in Vt(o)}function wA(s){var o=typeof s;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?s!=="__proto__":s===null}function $0(s){var o=Rp(s),d=k[o];if(typeof d!="function"||!(o in mt.prototype))return!1;if(s===d)return!0;var y=V0(d);return!!y&&s===y[0]}function SA(s){return!!t1&&t1 in s}var EA=ip?Ks:lm;function af(s){var o=s&&s.constructor,d=typeof o=="function"&&o.prototype||Rc;return s===d}function t_(s){return s===s&&!br(s)}function r_(s,o){return function(d){return d==null?!1:d[s]===o&&(o!==e||s in Vt(d))}}function TA(s){var o=Bp(s,function(y){return d.size===h&&d.clear(),y}),d=o.cache;return o}function IA(s,o){var d=s[1],y=o[1],R=d|y,N=R<(P|L|_e),C=y==_e&&d==W||y==_e&&d==Te&&s[7].length<=o[8]||y==(_e|Te)&&o[7].length<=o[8]&&d==W;if(!(N||C))return s;y&P&&(s[2]=o[2],R|=d&P?0:X);var D=o[3];if(D){var H=s[3];s[3]=H?U1(H,D,o[4]):D,s[4]=H?Sa(s[3],b):o[4]}return D=o[5],D&&(H=s[5],s[5]=H?q1(H,D,o[6]):D,s[6]=H?Sa(s[5],b):o[6]),D=o[7],D&&(s[7]=D),y&_e&&(s[8]=s[8]==null?o[8]:ui(s[8],o[8])),s[9]==null&&(s[9]=o[9]),s[0]=o[0],s[1]=R,s}function RA(s){var o=[];if(s!=null)for(var d in Vt(s))o.push(d);return o}function AA(s){return sp.call(s)}function i_(s,o,d){return o=jr(o===e?s.length-1:o,0),function(){for(var y=arguments,R=-1,N=jr(y.length-o,0),C=$(N);++R<N;)C[R]=y[o+R];R=-1;for(var D=$(o+1);++R<o;)D[R]=y[R];return D[o]=d(C),Vi(s,this,D)}}function n_(s,o){return o.length<2?s:So(s,pn(o,0,-1))}function OA(s,o){for(var d=s.length,y=ui(o.length,d),R=Ti(s);y--;){var N=o[y];s[y]=Ws(N,d)?R[N]:e}return s}function X0(s,o){if(!(o==="constructor"&&typeof s[o]=="function")&&o!="__proto__")return s[o]}var s_=o_(A1),of=VI||function(s,o){return Xr.setTimeout(s,o)},Y0=o_(JR);function a_(s,o,d){var y=o+"";return Y0(s,_A(y,kA(gA(y),d)))}function o_(s){var o=0,d=0;return function(){var y=$I(),R=c-(y-d);if(d=y,R>0){if(++o>=f)return arguments[0]}else o=0;return s.apply(e,arguments)}}function Op(s,o){var d=-1,y=s.length,R=y-1;for(o=o===e?y:o;++d<o;){var N=P0(d,R),C=s[N];s[N]=s[d],s[d]=C}return s.length=o,s}var c_=TA(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(ar,function(d,y,R,N){o.push(R?N.replace(lr,"$1"):y||d)}),o});function cs(s){if(typeof s=="string"||Gi(s))return s;var o=s+"";return o=="0"&&1/s==-x?"-0":o}function To(s){if(s!=null){try{return np.call(s)}catch{}try{return s+""}catch{}}return""}function kA(s,o){return cn(j,function(d){var y="_."+d[0];o&d[1]&&!Ql(s,y)&&s.push(y)}),s.sort()}function u_(s){if(s instanceof mt)return s.clone();var o=new fn(s.__wrapped__,s.__chain__);return o.__actions__=Ti(s.__actions__),o.__index__=s.__index__,o.__values__=s.__values__,o}function NA(s,o,d){(d?bi(s,o,d):o===e)?o=1:o=jr(at(o),0);var y=s==null?0:s.length;if(!y||o<1)return[];for(var R=0,N=0,C=$(lp(y/o));R<y;)C[N++]=pn(s,R,R+=o);return C}function PA(s){for(var o=-1,d=s==null?0:s.length,y=0,R=[];++o<d;){var N=s[o];N&&(R[y++]=N)}return R}function BA(){var s=arguments.length;if(!s)return[];for(var o=$(s-1),d=arguments[0],y=s;y--;)o[y-1]=arguments[y];return wa(et(d)?Ti(d):[d],ii(o,1))}var MA=lt(function(s,o){return Tr(s)?ef(s,ii(o,1,Tr,!0)):[]}),CA=lt(function(s,o){var d=hn(o);return Tr(d)&&(d=e),Tr(s)?ef(s,ii(o,1,Tr,!0),Ne(d,2)):[]}),LA=lt(function(s,o){var d=hn(o);return Tr(d)&&(d=e),Tr(s)?ef(s,ii(o,1,Tr,!0),e,d):[]});function DA(s,o,d){var y=s==null?0:s.length;return y?(o=d||o===e?1:at(o),pn(s,o<0?0:o,y)):[]}function UA(s,o,d){var y=s==null?0:s.length;return y?(o=d||o===e?1:at(o),o=y-o,pn(s,0,o<0?0:o)):[]}function qA(s,o){return s&&s.length?yp(s,Ne(o,3),!0,!0):[]}function FA(s,o){return s&&s.length?yp(s,Ne(o,3),!0):[]}function HA(s,o,d,y){var R=s==null?0:s.length;return R?(d&&typeof d!="number"&&bi(s,o,d)&&(d=0,y=R),BR(s,o,d,y)):[]}function f_(s,o,d){var y=s==null?0:s.length;if(!y)return-1;var R=d==null?0:at(d);return R<0&&(R=jr(y+R,0)),ep(s,Ne(o,3),R)}function l_(s,o,d){var y=s==null?0:s.length;if(!y)return-1;var R=y-1;return d!==e&&(R=at(d),R=d<0?jr(y+R,0):ui(R,y-1)),ep(s,Ne(o,3),R,!0)}function p_(s){var o=s==null?0:s.length;return o?ii(s,1):[]}function zA(s){var o=s==null?0:s.length;return o?ii(s,x):[]}function jA(s,o){var d=s==null?0:s.length;return d?(o=o===e?1:at(o),ii(s,o)):[]}function VA(s){for(var o=-1,d=s==null?0:s.length,y={};++o<d;){var R=s[o];y[R[0]]=R[1]}return y}function h_(s){return s&&s.length?s[0]:e}function WA(s,o,d){var y=s==null?0:s.length;if(!y)return-1;var R=d==null?0:at(d);return R<0&&(R=jr(y+R,0)),Ec(s,o,R)}function KA(s){var o=s==null?0:s.length;return o?pn(s,0,-1):[]}var GA=lt(function(s){var o=vr(s,D0);return o.length&&o[0]===s[0]?R0(o):[]}),$A=lt(function(s){var o=hn(s),d=vr(s,D0);return o===hn(d)?o=e:d.pop(),d.length&&d[0]===s[0]?R0(d,Ne(o,2)):[]}),XA=lt(function(s){var o=hn(s),d=vr(s,D0);return o=typeof o=="function"?o:e,o&&d.pop(),d.length&&d[0]===s[0]?R0(d,e,o):[]});function YA(s,o){return s==null?"":KI.call(s,o)}function hn(s){var o=s==null?0:s.length;return o?s[o-1]:e}function ZA(s,o,d){var y=s==null?0:s.length;if(!y)return-1;var R=y;return d!==e&&(R=at(d),R=R<0?jr(y+R,0):ui(R,y-1)),o===o?kI(s,o,R):ep(s,Gx,R,!0)}function JA(s,o){return s&&s.length?E1(s,at(o)):e}var QA=lt(d_);function d_(s,o){return s&&s.length&&o&&o.length?N0(s,o):s}function e8(s,o,d){return s&&s.length&&o&&o.length?N0(s,o,Ne(d,2)):s}function t8(s,o,d){return s&&s.length&&o&&o.length?N0(s,o,e,d):s}var r8=Vs(function(s,o){var d=s==null?0:s.length,y=S0(s,o);return R1(s,vr(o,function(R){return Ws(R,d)?+R:R}).sort(D1)),y});function i8(s,o){var d=[];if(!(s&&s.length))return d;var y=-1,R=[],N=s.length;for(o=Ne(o,3);++y<N;){var C=s[y];o(C,y,s)&&(d.push(C),R.push(y))}return R1(s,R),d}function Z0(s){return s==null?s:YI.call(s)}function n8(s,o,d){var y=s==null?0:s.length;return y?(d&&typeof d!="number"&&bi(s,o,d)?(o=0,d=y):(o=o==null?0:at(o),d=d===e?y:at(d)),pn(s,o,d)):[]}function s8(s,o){return _p(s,o)}function a8(s,o,d){return M0(s,o,Ne(d,2))}function o8(s,o){var d=s==null?0:s.length;if(d){var y=_p(s,o);if(y<d&&Cn(s[y],o))return y}return-1}function c8(s,o){return _p(s,o,!0)}function u8(s,o,d){return M0(s,o,Ne(d,2),!0)}function f8(s,o){var d=s==null?0:s.length;if(d){var y=_p(s,o,!0)-1;if(Cn(s[y],o))return y}return-1}function l8(s){return s&&s.length?O1(s):[]}function p8(s,o){return s&&s.length?O1(s,Ne(o,2)):[]}function h8(s){var o=s==null?0:s.length;return o?pn(s,1,o):[]}function d8(s,o,d){return s&&s.length?(o=d||o===e?1:at(o),pn(s,0,o<0?0:o)):[]}function m8(s,o,d){var y=s==null?0:s.length;return y?(o=d||o===e?1:at(o),o=y-o,pn(s,o<0?0:o,y)):[]}function v8(s,o){return s&&s.length?yp(s,Ne(o,3),!1,!0):[]}function g8(s,o){return s&&s.length?yp(s,Ne(o,3)):[]}var b8=lt(function(s){return Ra(ii(s,1,Tr,!0))}),x8=lt(function(s){var o=hn(s);return Tr(o)&&(o=e),Ra(ii(s,1,Tr,!0),Ne(o,2))}),_8=lt(function(s){var o=hn(s);return o=typeof o=="function"?o:e,Ra(ii(s,1,Tr,!0),e,o)});function y8(s){return s&&s.length?Ra(s):[]}function w8(s,o){return s&&s.length?Ra(s,Ne(o,2)):[]}function S8(s,o){return o=typeof o=="function"?o:e,s&&s.length?Ra(s,e,o):[]}function J0(s){if(!(s&&s.length))return[];var o=0;return s=ya(s,function(d){if(Tr(d))return o=jr(d.length,o),!0}),m0(o,function(d){return vr(s,p0(d))})}function m_(s,o){if(!(s&&s.length))return[];var d=J0(s);return o==null?d:vr(d,function(y){return Vi(o,e,y)})}var E8=lt(function(s,o){return Tr(s)?ef(s,o):[]}),T8=lt(function(s){return L0(ya(s,Tr))}),I8=lt(function(s){var o=hn(s);return Tr(o)&&(o=e),L0(ya(s,Tr),Ne(o,2))}),R8=lt(function(s){var o=hn(s);return o=typeof o=="function"?o:e,L0(ya(s,Tr),e,o)}),A8=lt(J0);function O8(s,o){return B1(s||[],o||[],Qu)}function k8(s,o){return B1(s||[],o||[],nf)}var N8=lt(function(s){var o=s.length,d=o>1?s[o-1]:e;return d=typeof d=="function"?(s.pop(),d):e,m_(s,d)});function v_(s){var o=k(s);return o.__chain__=!0,o}function P8(s,o){return o(s),s}function kp(s,o){return o(s)}var B8=Vs(function(s){var o=s.length,d=o?s[0]:0,y=this.__wrapped__,R=function(N){return S0(N,s)};return o>1||this.__actions__.length||!(y instanceof mt)||!Ws(d)?this.thru(R):(y=y.slice(d,+d+(o?1:0)),y.__actions__.push({func:kp,args:[R],thisArg:e}),new fn(y,this.__chain__).thru(function(N){return o&&!N.length&&N.push(e),N}))});function M8(){return v_(this)}function C8(){return new fn(this.value(),this.__chain__)}function L8(){this.__values__===e&&(this.__values__=k_(this.value()));var s=this.__index__>=this.__values__.length,o=s?e:this.__values__[this.__index__++];return{done:s,value:o}}function D8(){return this}function U8(s){for(var o,d=this;d instanceof mp;){var y=u_(d);y.__index__=0,y.__values__=e,o?R.__wrapped__=y:o=y;var R=y;d=d.__wrapped__}return R.__wrapped__=s,o}function q8(){var s=this.__wrapped__;if(s instanceof mt){var o=s;return this.__actions__.length&&(o=new mt(this)),o=o.reverse(),o.__actions__.push({func:kp,args:[Z0],thisArg:e}),new fn(o,this.__chain__)}return this.thru(Z0)}function F8(){return P1(this.__wrapped__,this.__actions__)}var H8=wp(function(s,o,d){kt.call(s,d)?++s[d]:zs(s,d,1)});function z8(s,o,d){var y=et(s)?Wx:PR;return d&&bi(s,o,d)&&(o=e),y(s,Ne(o,3))}function j8(s,o){var d=et(s)?ya:m1;return d(s,Ne(o,3))}var V8=j1(f_),W8=j1(l_);function K8(s,o){return ii(Np(s,o),1)}function G8(s,o){return ii(Np(s,o),x)}function $8(s,o,d){return d=d===e?1:at(d),ii(Np(s,o),d)}function g_(s,o){var d=et(s)?cn:Ia;return d(s,Ne(o,3))}function b_(s,o){var d=et(s)?hI:d1;return d(s,Ne(o,3))}var X8=wp(function(s,o,d){kt.call(s,d)?s[d].push(o):zs(s,d,[o])});function Y8(s,o,d,y){s=Ii(s)?s:Cc(s),d=d&&!y?at(d):0;var R=s.length;return d<0&&(d=jr(R+d,0)),Lp(s)?d<=R&&s.indexOf(o,d)>-1:!!R&&Ec(s,o,d)>-1}var Z8=lt(function(s,o,d){var y=-1,R=typeof o=="function",N=Ii(s)?$(s.length):[];return Ia(s,function(C){N[++y]=R?Vi(o,C,d):tf(C,o,d)}),N}),J8=wp(function(s,o,d){zs(s,d,o)});function Np(s,o){var d=et(s)?vr:y1;return d(s,Ne(o,3))}function Q8(s,o,d,y){return s==null?[]:(et(o)||(o=o==null?[]:[o]),d=y?e:d,et(d)||(d=d==null?[]:[d]),T1(s,o,d))}var e5=wp(function(s,o,d){s[d?0:1].push(o)},function(){return[[],[]]});function t5(s,o,d){var y=et(s)?f0:Xx,R=arguments.length<3;return y(s,Ne(o,4),d,R,Ia)}function r5(s,o,d){var y=et(s)?dI:Xx,R=arguments.length<3;return y(s,Ne(o,4),d,R,d1)}function i5(s,o){var d=et(s)?ya:m1;return d(s,Mp(Ne(o,3)))}function n5(s){var o=et(s)?f1:YR;return o(s)}function s5(s,o,d){(d?bi(s,o,d):o===e)?o=1:o=at(o);var y=et(s)?RR:ZR;return y(s,o)}function a5(s){var o=et(s)?AR:QR;return o(s)}function o5(s){if(s==null)return 0;if(Ii(s))return Lp(s)?Ic(s):s.length;var o=fi(s);return o==st||o==bt?s.size:O0(s).length}function c5(s,o,d){var y=et(s)?l0:eA;return d&&bi(s,o,d)&&(o=e),y(s,Ne(o,3))}var u5=lt(function(s,o){if(s==null)return[];var d=o.length;return d>1&&bi(s,o[0],o[1])?o=[]:d>2&&bi(o[0],o[1],o[2])&&(o=[o[0]]),T1(s,ii(o,1),[])}),Pp=jI||function(){return Xr.Date.now()};function f5(s,o){if(typeof o!="function")throw new un(n);return s=at(s),function(){if(--s<1)return o.apply(this,arguments)}}function x_(s,o,d){return o=d?e:o,o=s&&o==null?s.length:o,js(s,_e,e,e,e,e,o)}function __(s,o){var d;if(typeof o!="function")throw new un(n);return s=at(s),function(){return--s>0&&(d=o.apply(this,arguments)),s<=1&&(o=e),d}}var Q0=lt(function(s,o,d){var y=P;if(d.length){var R=Sa(d,Bc(Q0));y|=ee}return js(s,y,o,d,R)}),y_=lt(function(s,o,d){var y=P|L;if(d.length){var R=Sa(d,Bc(y_));y|=ee}return js(o,y,s,d,R)});function w_(s,o,d){o=d?e:o;var y=js(s,W,e,e,e,e,e,o);return y.placeholder=w_.placeholder,y}function S_(s,o,d){o=d?e:o;var y=js(s,q,e,e,e,e,e,o);return y.placeholder=S_.placeholder,y}function E_(s,o,d){var y,R,N,C,D,H,te=0,re=!1,oe=!1,de=!0;if(typeof s!="function")throw new un(n);o=dn(o)||0,br(d)&&(re=!!d.leading,oe="maxWait"in d,N=oe?jr(dn(d.maxWait)||0,o):N,de="trailing"in d?!!d.trailing:de);function Ie(Ir){var Ln=y,$s=R;return y=R=e,te=Ir,C=s.apply($s,Ln),C}function Be(Ir){return te=Ir,D=of(ht,o),re?Ie(Ir):C}function ft(Ir){var Ln=Ir-H,$s=Ir-te,j_=o-Ln;return oe?ui(j_,N-$s):j_}function Me(Ir){var Ln=Ir-H,$s=Ir-te;return H===e||Ln>=o||Ln<0||oe&&$s>=N}function ht(){var Ir=Pp();if(Me(Ir))return xt(Ir);D=of(ht,ft(Ir))}function xt(Ir){return D=e,de&&y?Ie(Ir):(y=R=e,C)}function $i(){D!==e&&M1(D),te=0,y=H=R=D=e}function xi(){return D===e?C:xt(Pp())}function Xi(){var Ir=Pp(),Ln=Me(Ir);if(y=arguments,R=this,H=Ir,Ln){if(D===e)return Be(H);if(oe)return M1(D),D=of(ht,o),Ie(H)}return D===e&&(D=of(ht,o)),C}return Xi.cancel=$i,Xi.flush=xi,Xi}var l5=lt(function(s,o){return h1(s,1,o)}),p5=lt(function(s,o,d){return h1(s,dn(o)||0,d)});function h5(s){return js(s,be)}function Bp(s,o){if(typeof s!="function"||o!=null&&typeof o!="function")throw new un(n);var d=function(){var y=arguments,R=o?o.apply(this,y):y[0],N=d.cache;if(N.has(R))return N.get(R);var C=s.apply(this,y);return d.cache=N.set(R,C)||N,C};return d.cache=new(Bp.Cache||Hs),d}Bp.Cache=Hs;function Mp(s){if(typeof s!="function")throw new un(n);return function(){var o=arguments;switch(o.length){case 0:return!s.call(this);case 1:return!s.call(this,o[0]);case 2:return!s.call(this,o[0],o[1]);case 3:return!s.call(this,o[0],o[1],o[2])}return!s.apply(this,o)}}function d5(s){return __(2,s)}var m5=tA(function(s,o){o=o.length==1&&et(o[0])?vr(o[0],Wi(Ne())):vr(ii(o,1),Wi(Ne()));var d=o.length;return lt(function(y){for(var R=-1,N=ui(y.length,d);++R<N;)y[R]=o[R].call(this,y[R]);return Vi(s,this,y)})}),em=lt(function(s,o){var d=Sa(o,Bc(em));return js(s,ee,e,o,d)}),T_=lt(function(s,o){var d=Sa(o,Bc(T_));return js(s,fe,e,o,d)}),v5=Vs(function(s,o){return js(s,Te,e,e,e,o)});function g5(s,o){if(typeof s!="function")throw new un(n);return o=o===e?o:at(o),lt(s,o)}function b5(s,o){if(typeof s!="function")throw new un(n);return o=o==null?0:jr(at(o),0),lt(function(d){var y=d[o],R=Oa(d,0,o);return y&&wa(R,y),Vi(s,this,R)})}function x5(s,o,d){var y=!0,R=!0;if(typeof s!="function")throw new un(n);return br(d)&&(y="leading"in d?!!d.leading:y,R="trailing"in d?!!d.trailing:R),E_(s,o,{leading:y,maxWait:o,trailing:R})}function _5(s){return x_(s,1)}function y5(s,o){return em(U0(o),s)}function w5(){if(!arguments.length)return[];var s=arguments[0];return et(s)?s:[s]}function S5(s){return ln(s,I)}function E5(s,o){return o=typeof o=="function"?o:e,ln(s,I,o)}function T5(s){return ln(s,w|I)}function I5(s,o){return o=typeof o=="function"?o:e,ln(s,w|I,o)}function R5(s,o){return o==null||p1(s,o,Yr(o))}function Cn(s,o){return s===o||s!==s&&o!==o}var A5=Ip(I0),O5=Ip(function(s,o){return s>=o}),Io=b1(function(){return arguments}())?b1:function(s){return _r(s)&&kt.call(s,"callee")&&!n1.call(s,"callee")},et=$.isArray,k5=qx?Wi(qx):UR;function Ii(s){return s!=null&&Cp(s.length)&&!Ks(s)}function Tr(s){return _r(s)&&Ii(s)}function N5(s){return s===!0||s===!1||_r(s)&&gi(s)==he}var ka=WI||lm,P5=Fx?Wi(Fx):qR;function B5(s){return _r(s)&&s.nodeType===1&&!cf(s)}function M5(s){if(s==null)return!0;if(Ii(s)&&(et(s)||typeof s=="string"||typeof s.splice=="function"||ka(s)||Mc(s)||Io(s)))return!s.length;var o=fi(s);if(o==st||o==bt)return!s.size;if(af(s))return!O0(s).length;for(var d in s)if(kt.call(s,d))return!1;return!0}function C5(s,o){return rf(s,o)}function L5(s,o,d){d=typeof d=="function"?d:e;var y=d?d(s,o):e;return y===e?rf(s,o,e,d):!!y}function tm(s){if(!_r(s))return!1;var o=gi(s);return o==dt||o==me||typeof s.message=="string"&&typeof s.name=="string"&&!cf(s)}function D5(s){return typeof s=="number"&&a1(s)}function Ks(s){if(!br(s))return!1;var o=gi(s);return o==St||o==Oe||o==ae||o==We}function I_(s){return typeof s=="number"&&s==at(s)}function Cp(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=S}function br(s){var o=typeof s;return s!=null&&(o=="object"||o=="function")}function _r(s){return s!=null&&typeof s=="object"}var R_=Hx?Wi(Hx):HR;function U5(s,o){return s===o||A0(s,o,W0(o))}function q5(s,o,d){return d=typeof d=="function"?d:e,A0(s,o,W0(o),d)}function F5(s){return A_(s)&&s!=+s}function H5(s){if(EA(s))throw new ze(i);return x1(s)}function z5(s){return s===null}function j5(s){return s==null}function A_(s){return typeof s=="number"||_r(s)&&gi(s)==rt}function cf(s){if(!_r(s)||gi(s)!=Ae)return!1;var o=cp(s);if(o===null)return!0;var d=kt.call(o,"constructor")&&o.constructor;return typeof d=="function"&&d instanceof d&&np.call(d)==qI}var rm=zx?Wi(zx):zR;function V5(s){return I_(s)&&s>=-S&&s<=S}var O_=jx?Wi(jx):jR;function Lp(s){return typeof s=="string"||!et(s)&&_r(s)&&gi(s)==De}function Gi(s){return typeof s=="symbol"||_r(s)&&gi(s)==Pt}var Mc=Vx?Wi(Vx):VR;function W5(s){return s===e}function K5(s){return _r(s)&&fi(s)==Ue}function G5(s){return _r(s)&&gi(s)==er}var $5=Ip(k0),X5=Ip(function(s,o){return s<=o});function k_(s){if(!s)return[];if(Ii(s))return Lp(s)?Bn(s):Ti(s);if($u&&s[$u])return RI(s[$u]());var o=fi(s),d=o==st?g0:o==bt?tp:Cc;return d(s)}function Gs(s){if(!s)return s===0?s:0;if(s=dn(s),s===x||s===-x){var o=s<0?-1:1;return o*_}return s===s?s:0}function at(s){var o=Gs(s),d=o%1;return o===o?d?o-d:o:0}function N_(s){return s?wo(at(s),0,m):0}function dn(s){if(typeof s=="number")return s;if(Gi(s))return l;if(br(s)){var o=typeof s.valueOf=="function"?s.valueOf():s;s=br(o)?o+"":o}if(typeof s!="string")return s===0?s:+s;s=Yx(s);var d=As.test(s);return d||ks.test(s)?fI(s.slice(2),d?2:8):Rs.test(s)?l:+s}function P_(s){return os(s,Ri(s))}function Y5(s){return s?wo(at(s),-S,S):s===0?s:0}function Rt(s){return s==null?"":Ki(s)}var Z5=Nc(function(s,o){if(af(o)||Ii(o)){os(o,Yr(o),s);return}for(var d in o)kt.call(o,d)&&Qu(s,d,o[d])}),B_=Nc(function(s,o){os(o,Ri(o),s)}),Dp=Nc(function(s,o,d,y){os(o,Ri(o),s,y)}),J5=Nc(function(s,o,d,y){os(o,Yr(o),s,y)}),Q5=Vs(S0);function eO(s,o){var d=kc(s);return o==null?d:l1(d,o)}var tO=lt(function(s,o){s=Vt(s);var d=-1,y=o.length,R=y>2?o[2]:e;for(R&&bi(o[0],o[1],R)&&(y=1);++d<y;)for(var N=o[d],C=Ri(N),D=-1,H=C.length;++D<H;){var te=C[D],re=s[te];(re===e||Cn(re,Rc[te])&&!kt.call(s,te))&&(s[te]=N[te])}return s}),rO=lt(function(s){return s.push(e,Y1),Vi(M_,e,s)});function iO(s,o){return Kx(s,Ne(o,3),as)}function nO(s,o){return Kx(s,Ne(o,3),T0)}function sO(s,o){return s==null?s:E0(s,Ne(o,3),Ri)}function aO(s,o){return s==null?s:v1(s,Ne(o,3),Ri)}function oO(s,o){return s&&as(s,Ne(o,3))}function cO(s,o){return s&&T0(s,Ne(o,3))}function uO(s){return s==null?[]:bp(s,Yr(s))}function fO(s){return s==null?[]:bp(s,Ri(s))}function im(s,o,d){var y=s==null?e:So(s,o);return y===e?d:y}function lO(s,o){return s!=null&&Q1(s,o,MR)}function nm(s,o){return s!=null&&Q1(s,o,CR)}var pO=W1(function(s,o,d){o!=null&&typeof o.toString!="function"&&(o=sp.call(o)),s[o]=d},am(Ai)),hO=W1(function(s,o,d){o!=null&&typeof o.toString!="function"&&(o=sp.call(o)),kt.call(s,o)?s[o].push(d):s[o]=[d]},Ne),dO=lt(tf);function Yr(s){return Ii(s)?u1(s):O0(s)}function Ri(s){return Ii(s)?u1(s,!0):WR(s)}function mO(s,o){var d={};return o=Ne(o,3),as(s,function(y,R,N){zs(d,o(y,R,N),y)}),d}function vO(s,o){var d={};return o=Ne(o,3),as(s,function(y,R,N){zs(d,R,o(y,R,N))}),d}var gO=Nc(function(s,o,d){xp(s,o,d)}),M_=Nc(function(s,o,d,y){xp(s,o,d,y)}),bO=Vs(function(s,o){var d={};if(s==null)return d;var y=!1;o=vr(o,function(N){return N=Aa(N,s),y||(y=N.length>1),N}),os(s,j0(s),d),y&&(d=ln(d,w|T|I,pA));for(var R=o.length;R--;)C0(d,o[R]);return d});function xO(s,o){return C_(s,Mp(Ne(o)))}var _O=Vs(function(s,o){return s==null?{}:GR(s,o)});function C_(s,o){if(s==null)return{};var d=vr(j0(s),function(y){return[y]});return o=Ne(o),I1(s,d,function(y,R){return o(y,R[0])})}function yO(s,o,d){o=Aa(o,s);var y=-1,R=o.length;for(R||(R=1,s=e);++y<R;){var N=s==null?e:s[cs(o[y])];N===e&&(y=R,N=d),s=Ks(N)?N.call(s):N}return s}function wO(s,o,d){return s==null?s:nf(s,o,d)}function SO(s,o,d,y){return y=typeof y=="function"?y:e,s==null?s:nf(s,o,d,y)}var L_=$1(Yr),D_=$1(Ri);function EO(s,o,d){var y=et(s),R=y||ka(s)||Mc(s);if(o=Ne(o,4),d==null){var N=s&&s.constructor;R?d=y?new N:[]:br(s)?d=Ks(N)?kc(cp(s)):{}:d={}}return(R?cn:as)(s,function(C,D,H){return o(d,C,D,H)}),d}function TO(s,o){return s==null?!0:C0(s,o)}function IO(s,o,d){return s==null?s:N1(s,o,U0(d))}function RO(s,o,d,y){return y=typeof y=="function"?y:e,s==null?s:N1(s,o,U0(d),y)}function Cc(s){return s==null?[]:v0(s,Yr(s))}function AO(s){return s==null?[]:v0(s,Ri(s))}function OO(s,o,d){return d===e&&(d=o,o=e),d!==e&&(d=dn(d),d=d===d?d:0),o!==e&&(o=dn(o),o=o===o?o:0),wo(dn(s),o,d)}function kO(s,o,d){return o=Gs(o),d===e?(d=o,o=0):d=Gs(d),s=dn(s),LR(s,o,d)}function NO(s,o,d){if(d&&typeof d!="boolean"&&bi(s,o,d)&&(o=d=e),d===e&&(typeof o=="boolean"?(d=o,o=e):typeof s=="boolean"&&(d=s,s=e)),s===e&&o===e?(s=0,o=1):(s=Gs(s),o===e?(o=s,s=0):o=Gs(o)),s>o){var y=s;s=o,o=y}if(d||s%1||o%1){var R=o1();return ui(s+R*(o-s+uI("1e-"+((R+"").length-1))),o)}return P0(s,o)}var PO=Pc(function(s,o,d){return o=o.toLowerCase(),s+(d?U_(o):o)});function U_(s){return sm(Rt(s).toLowerCase())}function q_(s){return s=Rt(s),s&&s.replace(Ps,wI).replace(QT,"")}function BO(s,o,d){s=Rt(s),o=Ki(o);var y=s.length;d=d===e?y:wo(at(d),0,y);var R=d;return d-=o.length,d>=0&&s.slice(d,R)==o}function MO(s){return s=Rt(s),s&&ir.test(s)?s.replace($t,SI):s}function CO(s){return s=Rt(s),s&&Ye.test(s)?s.replace(Ht,"\\$&"):s}var LO=Pc(function(s,o,d){return s+(d?"-":"")+o.toLowerCase()}),DO=Pc(function(s,o,d){return s+(d?" ":"")+o.toLowerCase()}),UO=z1("toLowerCase");function qO(s,o,d){s=Rt(s),o=at(o);var y=o?Ic(s):0;if(!o||y>=o)return s;var R=(o-y)/2;return Tp(pp(R),d)+s+Tp(lp(R),d)}function FO(s,o,d){s=Rt(s),o=at(o);var y=o?Ic(s):0;return o&&y<o?s+Tp(o-y,d):s}function HO(s,o,d){s=Rt(s),o=at(o);var y=o?Ic(s):0;return o&&y<o?Tp(o-y,d)+s:s}function zO(s,o,d){return d||o==null?o=0:o&&(o=+o),XI(Rt(s).replace(zt,""),o||0)}function jO(s,o,d){return(d?bi(s,o,d):o===e)?o=1:o=at(o),B0(Rt(s),o)}function VO(){var s=arguments,o=Rt(s[0]);return s.length<3?o:o.replace(s[1],s[2])}var WO=Pc(function(s,o,d){return s+(d?"_":"")+o.toLowerCase()});function KO(s,o,d){return d&&typeof d!="number"&&bi(s,o,d)&&(o=d=e),d=d===e?m:d>>>0,d?(s=Rt(s),s&&(typeof o=="string"||o!=null&&!rm(o))&&(o=Ki(o),!o&&Tc(s))?Oa(Bn(s),0,d):s.split(o,d)):[]}var GO=Pc(function(s,o,d){return s+(d?" ":"")+sm(o)});function $O(s,o,d){return s=Rt(s),d=d==null?0:wo(at(d),0,s.length),o=Ki(o),s.slice(d,d+o.length)==o}function XO(s,o,d){var y=k.templateSettings;d&&bi(s,o,d)&&(o=e),s=Rt(s),o=Dp({},o,y,X1);var R=Dp({},o.imports,y.imports,X1),N=Yr(R),C=v0(R,N),D,H,te=0,re=o.interpolate||sn,oe="__p += '",de=b0((o.escape||sn).source+"|"+re.source+"|"+(re===Xt?Qe:sn).source+"|"+(o.evaluate||sn).source+"|$","g"),Ie="//# sourceURL="+(kt.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nI+"]")+`
4
- `;s.replace(de,function(Me,ht,xt,$i,xi,Xi){return xt||(xt=$i),oe+=s.slice(te,Xi).replace(Bs,EI),ht&&(D=!0,oe+=`' +
5
- __e(`+ht+`) +
6
- '`),xi&&(H=!0,oe+=`';
1
+ "use strict";var k5=Object.create;var mp=Object.defineProperty;var P5=Object.getOwnPropertyDescriptor;var N5=Object.getOwnPropertyNames;var B5=Object.getPrototypeOf,M5=Object.prototype.hasOwnProperty;var X=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Oa=(e,t)=>{for(var r in t)mp(e,r,{get:t[r],enumerable:!0})},n1=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of N5(t))!M5.call(e,n)&&n!==r&&mp(e,n,{get:()=>t[n],enumerable:!(i=P5(t,n))||i.enumerable});return e};var _r=(e,t,r)=>(r=e!=null?k5(B5(e)):{},n1(t||!e||!e.__esModule?mp(r,"default",{value:e,enumerable:!0}):r,e)),C5=e=>n1(mp({},"__esModule",{value:!0}),e);var yt=X((Bc,Yu)=>{(function(){var e,t="4.17.21",r=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",n="Expected a function",o="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",m=500,_="__lodash_placeholder__",w=1,I=2,T=4,N=1,C=2,B=1,U=2,Z=4,$=8,H=16,ee=32,ce=64,ge=128,Se=256,me=512,O=30,E="...",f=800,c=16,p=1,v=2,g=3,x=1/0,S=9007199254740991,b=17976931348623157e292,l=NaN,d=4294967295,A=d-1,D=d>>>1,V=[["ary",ge],["bind",B],["bindKey",U],["curry",$],["curryRight",H],["flip",me],["partial",ee],["partialRight",ce],["rearg",Se]],Y="[object Arguments]",se="[object Array]",ae="[object AsyncFunction]",pe="[object Boolean]",ye="[object Date]",de="[object DOMException]",ht="[object Error]",St="[object Function]",Re="[object GeneratorFunction]",st="[object Map]",et="[object Number]",Ie="[object Null]",Te="[object Object]",jt="[object Promise]",Ve="[object Proxy]",Rt="[object RegExp]",vt="[object Set]",Me="[object String]",Pt="[object Symbol]",Qt="[object Undefined]",Ce="[object WeakMap]",er="[object WeakSet]",At="[object ArrayBuffer]",Be="[object DataView]",Bt="[object Float32Array]",Mt="[object Float64Array]",Ue="[object Int8Array]",Ct="[object Int16Array]",Lt="[object Int32Array]",De="[object Uint8Array]",Ut="[object Uint8ClampedArray]",Dt="[object Uint16Array]",qe="[object Uint32Array]",tr=/\b__p \+= '';/g,rr=/\b(__p \+=) '' \+/g,je=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Wt=/&(?:amp|lt|gt|quot|#39);/g,Kt=/[&<>"']/g,We=RegExp(Wt.source),ir=RegExp(Kt.source),nr=/<%-([\s\S]+?)%>/g,Ke=/<%([\s\S]+?)%>/g,Gt=/<%=([\s\S]+?)%>/g,sr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ge=/^\w*$/,ar=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qt=/[\\^$.*+?()[\]{}|]/g,$e=RegExp(qt.source),Ft=/^\s+/,or=/\s/,Ye=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,cr=/\{\n\/\* \[wrapped with (.+)\] \*/,ur=/,? & /,Ze=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fr=/[()=,{}\[\]\/\s]/,lr=/\\(\\)?/g,Xe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ht=/\w*$/,ys=/^[-+]0x[0-9a-f]+$/i,ws=/^0b[01]+$/i,Ss=/^\[object .+?Constructor\]$/,Es=/^0o[0-7]+$/i,Is=/^(?:0|[1-9]\d*)$/,Ts=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qi=/($^)/,Rs=/['\n\r\u2028\u2029\\]/g,en="\\ud800-\\udfff",As="\\u0300-\\u036f",Os="\\ufe20-\\ufe2f",ks="\\u20d0-\\u20ff",Zn=As+Os+ks,Xn="\\u2700-\\u27bf",Jn="a-z\\xdf-\\xf6\\xf8-\\xff",Ps="\\xac\\xb1\\xd7\\xf7",Ns="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Bs="\\u2000-\\u206f",Bu=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lx="A-Z\\xc0-\\xd6\\xd8-\\xde",Ux="\\ufe0e\\ufe0f",Dx=Ps+Ns+Bs+Bu,Bd="['\u2019]",kT="["+en+"]",qx="["+Dx+"]",Ol="["+Zn+"]",Fx="\\d+",PT="["+Xn+"]",Hx="["+Jn+"]",zx="[^"+en+Dx+Fx+Xn+Jn+Lx+"]",Md="\\ud83c[\\udffb-\\udfff]",NT="(?:"+Ol+"|"+Md+")",Vx="[^"+en+"]",Cd="(?:\\ud83c[\\udde6-\\uddff]){2}",Ld="[\\ud800-\\udbff][\\udc00-\\udfff]",_c="["+Lx+"]",jx="\\u200d",Wx="(?:"+Hx+"|"+zx+")",BT="(?:"+_c+"|"+zx+")",Kx="(?:"+Bd+"(?:d|ll|m|re|s|t|ve))?",Gx="(?:"+Bd+"(?:D|LL|M|RE|S|T|VE))?",$x=NT+"?",Yx="["+Ux+"]?",MT="(?:"+jx+"(?:"+[Vx,Cd,Ld].join("|")+")"+Yx+$x+")*",CT="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",LT="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Zx=Yx+$x+MT,UT="(?:"+[PT,Cd,Ld].join("|")+")"+Zx,DT="(?:"+[Vx+Ol+"?",Ol,Cd,Ld,kT].join("|")+")",qT=RegExp(Bd,"g"),FT=RegExp(Ol,"g"),Ud=RegExp(Md+"(?="+Md+")|"+DT+Zx,"g"),HT=RegExp([_c+"?"+Hx+"+"+Kx+"(?="+[qx,_c,"$"].join("|")+")",BT+"+"+Gx+"(?="+[qx,_c+Wx,"$"].join("|")+")",_c+"?"+Wx+"+"+Kx,_c+"+"+Gx,LT,CT,Fx,UT].join("|"),"g"),zT=RegExp("["+jx+en+Zn+Ux+"]"),VT=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jT=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],WT=-1,pr={};pr[Bt]=pr[Mt]=pr[Ue]=pr[Ct]=pr[Lt]=pr[De]=pr[Ut]=pr[Dt]=pr[qe]=!0,pr[Y]=pr[se]=pr[At]=pr[pe]=pr[Be]=pr[ye]=pr[ht]=pr[St]=pr[st]=pr[et]=pr[Te]=pr[Rt]=pr[vt]=pr[Me]=pr[Ce]=!1;var $t={};$t[Y]=$t[se]=$t[At]=$t[Be]=$t[pe]=$t[ye]=$t[Bt]=$t[Mt]=$t[Ue]=$t[Ct]=$t[Lt]=$t[st]=$t[et]=$t[Te]=$t[Rt]=$t[vt]=$t[Me]=$t[Pt]=$t[De]=$t[Ut]=$t[Dt]=$t[qe]=!0,$t[ht]=$t[St]=$t[Ce]=!1;var KT={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},GT={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$T={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},YT={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ZT=parseFloat,XT=parseInt,Xx=typeof global=="object"&&global&&global.Object===Object&&global,JT=typeof self=="object"&&self&&self.Object===Object&&self,$r=Xx||JT||Function("return this")(),Dd=typeof Bc=="object"&&Bc&&!Bc.nodeType&&Bc,vo=Dd&&typeof Yu=="object"&&Yu&&!Yu.nodeType&&Yu,Jx=vo&&vo.exports===Dd,qd=Jx&&Xx.process,tn=function(){try{var q=vo&&vo.require&&vo.require("util").types;return q||qd&&qd.binding&&qd.binding("util")}catch{}}(),Qx=tn&&tn.isArrayBuffer,eb=tn&&tn.isDate,tb=tn&&tn.isMap,rb=tn&&tn.isRegExp,ib=tn&&tn.isSet,nb=tn&&tn.isTypedArray;function Di(q,Q,G){switch(G.length){case 0:return q.call(Q);case 1:return q.call(Q,G[0]);case 2:return q.call(Q,G[0],G[1]);case 3:return q.call(Q,G[0],G[1],G[2])}return q.apply(Q,G)}function QT(q,Q,G,xe){for(var He=-1,It=q==null?0:q.length;++He<It;){var Hr=q[He];Q(xe,Hr,G(Hr),q)}return xe}function rn(q,Q){for(var G=-1,xe=q==null?0:q.length;++G<xe&&Q(q[G],G,q)!==!1;);return q}function eR(q,Q){for(var G=q==null?0:q.length;G--&&Q(q[G],G,q)!==!1;);return q}function sb(q,Q){for(var G=-1,xe=q==null?0:q.length;++G<xe;)if(!Q(q[G],G,q))return!1;return!0}function ba(q,Q){for(var G=-1,xe=q==null?0:q.length,He=0,It=[];++G<xe;){var Hr=q[G];Q(Hr,G,q)&&(It[He++]=Hr)}return It}function kl(q,Q){var G=q==null?0:q.length;return!!G&&yc(q,Q,0)>-1}function Fd(q,Q,G){for(var xe=-1,He=q==null?0:q.length;++xe<He;)if(G(Q,q[xe]))return!0;return!1}function mr(q,Q){for(var G=-1,xe=q==null?0:q.length,He=Array(xe);++G<xe;)He[G]=Q(q[G],G,q);return He}function _a(q,Q){for(var G=-1,xe=Q.length,He=q.length;++G<xe;)q[He+G]=Q[G];return q}function Hd(q,Q,G,xe){var He=-1,It=q==null?0:q.length;for(xe&&It&&(G=q[++He]);++He<It;)G=Q(G,q[He],He,q);return G}function tR(q,Q,G,xe){var He=q==null?0:q.length;for(xe&&He&&(G=q[--He]);He--;)G=Q(G,q[He],He,q);return G}function zd(q,Q){for(var G=-1,xe=q==null?0:q.length;++G<xe;)if(Q(q[G],G,q))return!0;return!1}var rR=Vd("length");function iR(q){return q.split("")}function nR(q){return q.match(Ze)||[]}function ab(q,Q,G){var xe;return G(q,function(He,It,Hr){if(Q(He,It,Hr))return xe=It,!1}),xe}function Pl(q,Q,G,xe){for(var He=q.length,It=G+(xe?1:-1);xe?It--:++It<He;)if(Q(q[It],It,q))return It;return-1}function yc(q,Q,G){return Q===Q?vR(q,Q,G):Pl(q,ob,G)}function sR(q,Q,G,xe){for(var He=G-1,It=q.length;++He<It;)if(xe(q[He],Q))return He;return-1}function ob(q){return q!==q}function cb(q,Q){var G=q==null?0:q.length;return G?Wd(q,Q)/G:l}function Vd(q){return function(Q){return Q==null?e:Q[q]}}function jd(q){return function(Q){return q==null?e:q[Q]}}function ub(q,Q,G,xe,He){return He(q,function(It,Hr,zt){G=xe?(xe=!1,It):Q(G,It,Hr,zt)}),G}function aR(q,Q){var G=q.length;for(q.sort(Q);G--;)q[G]=q[G].value;return q}function Wd(q,Q){for(var G,xe=-1,He=q.length;++xe<He;){var It=Q(q[xe]);It!==e&&(G=G===e?It:G+It)}return G}function Kd(q,Q){for(var G=-1,xe=Array(q);++G<q;)xe[G]=Q(G);return xe}function oR(q,Q){return mr(Q,function(G){return[G,q[G]]})}function fb(q){return q&&q.slice(0,db(q)+1).replace(Ft,"")}function qi(q){return function(Q){return q(Q)}}function Gd(q,Q){return mr(Q,function(G){return q[G]})}function Mu(q,Q){return q.has(Q)}function lb(q,Q){for(var G=-1,xe=q.length;++G<xe&&yc(Q,q[G],0)>-1;);return G}function pb(q,Q){for(var G=q.length;G--&&yc(Q,q[G],0)>-1;);return G}function cR(q,Q){for(var G=q.length,xe=0;G--;)q[G]===Q&&++xe;return xe}var uR=jd(KT),fR=jd(GT);function lR(q){return"\\"+YT[q]}function pR(q,Q){return q==null?e:q[Q]}function wc(q){return zT.test(q)}function hR(q){return VT.test(q)}function dR(q){for(var Q,G=[];!(Q=q.next()).done;)G.push(Q.value);return G}function $d(q){var Q=-1,G=Array(q.size);return q.forEach(function(xe,He){G[++Q]=[He,xe]}),G}function hb(q,Q){return function(G){return q(Q(G))}}function ya(q,Q){for(var G=-1,xe=q.length,He=0,It=[];++G<xe;){var Hr=q[G];(Hr===Q||Hr===_)&&(q[G]=_,It[He++]=G)}return It}function Nl(q){var Q=-1,G=Array(q.size);return q.forEach(function(xe){G[++Q]=xe}),G}function mR(q){var Q=-1,G=Array(q.size);return q.forEach(function(xe){G[++Q]=[xe,xe]}),G}function vR(q,Q,G){for(var xe=G-1,He=q.length;++xe<He;)if(q[xe]===Q)return xe;return-1}function gR(q,Q,G){for(var xe=G+1;xe--;)if(q[xe]===Q)return xe;return xe}function Sc(q){return wc(q)?bR(q):rR(q)}function En(q){return wc(q)?_R(q):iR(q)}function db(q){for(var Q=q.length;Q--&&or.test(q.charAt(Q)););return Q}var xR=jd($T);function bR(q){for(var Q=Ud.lastIndex=0;Ud.test(q);)++Q;return Q}function _R(q){return q.match(Ud)||[]}function yR(q){return q.match(HT)||[]}var wR=function q(Q){Q=Q==null?$r:wa.defaults($r.Object(),Q,wa.pick($r,jT));var G=Q.Array,xe=Q.Date,He=Q.Error,It=Q.Function,Hr=Q.Math,zt=Q.Object,Yd=Q.RegExp,SR=Q.String,nn=Q.TypeError,Bl=G.prototype,ER=It.prototype,Ec=zt.prototype,Ml=Q["__core-js_shared__"],Cl=ER.toString,Ot=Ec.hasOwnProperty,IR=0,mb=function(){var s=/[^.]+$/.exec(Ml&&Ml.keys&&Ml.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),Ll=Ec.toString,TR=Cl.call(zt),RR=$r._,AR=Yd("^"+Cl.call(Ot).replace(qt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ul=Jx?Q.Buffer:e,Sa=Q.Symbol,Dl=Q.Uint8Array,vb=Ul?Ul.allocUnsafe:e,ql=hb(zt.getPrototypeOf,zt),gb=zt.create,xb=Ec.propertyIsEnumerable,Fl=Bl.splice,bb=Sa?Sa.isConcatSpreadable:e,Cu=Sa?Sa.iterator:e,go=Sa?Sa.toStringTag:e,Hl=function(){try{var s=wo(zt,"defineProperty");return s({},"",{}),s}catch{}}(),OR=Q.clearTimeout!==$r.clearTimeout&&Q.clearTimeout,kR=xe&&xe.now!==$r.Date.now&&xe.now,PR=Q.setTimeout!==$r.setTimeout&&Q.setTimeout,zl=Hr.ceil,Vl=Hr.floor,Zd=zt.getOwnPropertySymbols,NR=Ul?Ul.isBuffer:e,_b=Q.isFinite,BR=Bl.join,MR=hb(zt.keys,zt),zr=Hr.max,oi=Hr.min,CR=xe.now,LR=Q.parseInt,yb=Hr.random,UR=Bl.reverse,Xd=wo(Q,"DataView"),Lu=wo(Q,"Map"),Jd=wo(Q,"Promise"),Ic=wo(Q,"Set"),Uu=wo(Q,"WeakMap"),Du=wo(zt,"create"),jl=Uu&&new Uu,Tc={},DR=So(Xd),qR=So(Lu),FR=So(Jd),HR=So(Ic),zR=So(Uu),Wl=Sa?Sa.prototype:e,qu=Wl?Wl.valueOf:e,wb=Wl?Wl.toString:e;function k(s){if(br(s)&&!Je(s)&&!(s instanceof dt)){if(s instanceof sn)return s;if(Ot.call(s,"__wrapped__"))return S_(s)}return new sn(s)}var Rc=function(){function s(){}return function(a){if(!gr(a))return{};if(gb)return gb(a);s.prototype=a;var h=new s;return s.prototype=e,h}}();function Kl(){}function sn(s,a){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=e}k.templateSettings={escape:nr,evaluate:Ke,interpolate:Gt,variable:"",imports:{_:k}},k.prototype=Kl.prototype,k.prototype.constructor=k,sn.prototype=Rc(Kl.prototype),sn.prototype.constructor=sn;function dt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function VR(){var s=new dt(this.__wrapped__);return s.__actions__=Si(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Si(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Si(this.__views__),s}function jR(){if(this.__filtered__){var s=new dt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function WR(){var s=this.__wrapped__.value(),a=this.__dir__,h=Je(s),y=a<0,R=h?s.length:0,P=i6(0,R,this.__views__),M=P.start,L=P.end,F=L-M,te=y?L:M-1,re=this.__iteratees__,oe=re.length,he=0,Ee=oi(F,this.__takeCount__);if(!h||!y&&R==F&&Ee==F)return Kb(s,this.__actions__);var ke=[];e:for(;F--&&he<Ee;){te+=a;for(var ct=-1,Pe=s[te];++ct<oe;){var pt=re[ct],gt=pt.iteratee,zi=pt.type,xi=gt(Pe);if(zi==v)Pe=xi;else if(!xi){if(zi==p)continue e;break e}}ke[he++]=Pe}return ke}dt.prototype=Rc(Kl.prototype),dt.prototype.constructor=dt;function xo(s){var a=-1,h=s==null?0:s.length;for(this.clear();++a<h;){var y=s[a];this.set(y[0],y[1])}}function KR(){this.__data__=Du?Du(null):{},this.size=0}function GR(s){var a=this.has(s)&&delete this.__data__[s];return this.size-=a?1:0,a}function $R(s){var a=this.__data__;if(Du){var h=a[s];return h===u?e:h}return Ot.call(a,s)?a[s]:e}function YR(s){var a=this.__data__;return Du?a[s]!==e:Ot.call(a,s)}function ZR(s,a){var h=this.__data__;return this.size+=this.has(s)?0:1,h[s]=Du&&a===e?u:a,this}xo.prototype.clear=KR,xo.prototype.delete=GR,xo.prototype.get=$R,xo.prototype.has=YR,xo.prototype.set=ZR;function Ms(s){var a=-1,h=s==null?0:s.length;for(this.clear();++a<h;){var y=s[a];this.set(y[0],y[1])}}function XR(){this.__data__=[],this.size=0}function JR(s){var a=this.__data__,h=Gl(a,s);if(h<0)return!1;var y=a.length-1;return h==y?a.pop():Fl.call(a,h,1),--this.size,!0}function QR(s){var a=this.__data__,h=Gl(a,s);return h<0?e:a[h][1]}function eA(s){return Gl(this.__data__,s)>-1}function tA(s,a){var h=this.__data__,y=Gl(h,s);return y<0?(++this.size,h.push([s,a])):h[y][1]=a,this}Ms.prototype.clear=XR,Ms.prototype.delete=JR,Ms.prototype.get=QR,Ms.prototype.has=eA,Ms.prototype.set=tA;function Cs(s){var a=-1,h=s==null?0:s.length;for(this.clear();++a<h;){var y=s[a];this.set(y[0],y[1])}}function rA(){this.size=0,this.__data__={hash:new xo,map:new(Lu||Ms),string:new xo}}function iA(s){var a=sp(this,s).delete(s);return this.size-=a?1:0,a}function nA(s){return sp(this,s).get(s)}function sA(s){return sp(this,s).has(s)}function aA(s,a){var h=sp(this,s),y=h.size;return h.set(s,a),this.size+=h.size==y?0:1,this}Cs.prototype.clear=rA,Cs.prototype.delete=iA,Cs.prototype.get=nA,Cs.prototype.has=sA,Cs.prototype.set=aA;function bo(s){var a=-1,h=s==null?0:s.length;for(this.__data__=new Cs;++a<h;)this.add(s[a])}function oA(s){return this.__data__.set(s,u),this}function cA(s){return this.__data__.has(s)}bo.prototype.add=bo.prototype.push=oA,bo.prototype.has=cA;function In(s){var a=this.__data__=new Ms(s);this.size=a.size}function uA(){this.__data__=new Ms,this.size=0}function fA(s){var a=this.__data__,h=a.delete(s);return this.size=a.size,h}function lA(s){return this.__data__.get(s)}function pA(s){return this.__data__.has(s)}function hA(s,a){var h=this.__data__;if(h instanceof Ms){var y=h.__data__;if(!Lu||y.length<r-1)return y.push([s,a]),this.size=++h.size,this;h=this.__data__=new Cs(y)}return h.set(s,a),this.size=h.size,this}In.prototype.clear=uA,In.prototype.delete=fA,In.prototype.get=lA,In.prototype.has=pA,In.prototype.set=hA;function Sb(s,a){var h=Je(s),y=!h&&Eo(s),R=!h&&!y&&Aa(s),P=!h&&!y&&!R&&Pc(s),M=h||y||R||P,L=M?Kd(s.length,SR):[],F=L.length;for(var te in s)(a||Ot.call(s,te))&&!(M&&(te=="length"||R&&(te=="offset"||te=="parent")||P&&(te=="buffer"||te=="byteLength"||te=="byteOffset")||qs(te,F)))&&L.push(te);return L}function Eb(s){var a=s.length;return a?s[u0(0,a-1)]:e}function dA(s,a){return ap(Si(s),_o(a,0,s.length))}function mA(s){return ap(Si(s))}function Qd(s,a,h){(h!==e&&!Tn(s[a],h)||h===e&&!(a in s))&&Ls(s,a,h)}function Fu(s,a,h){var y=s[a];(!(Ot.call(s,a)&&Tn(y,h))||h===e&&!(a in s))&&Ls(s,a,h)}function Gl(s,a){for(var h=s.length;h--;)if(Tn(s[h][0],a))return h;return-1}function vA(s,a,h,y){return Ea(s,function(R,P,M){a(y,R,h(R),M)}),y}function Ib(s,a){return s&&es(a,Yr(a),s)}function gA(s,a){return s&&es(a,Ii(a),s)}function Ls(s,a,h){a=="__proto__"&&Hl?Hl(s,a,{configurable:!0,enumerable:!0,value:h,writable:!0}):s[a]=h}function e0(s,a){for(var h=-1,y=a.length,R=G(y),P=s==null;++h<y;)R[h]=P?e:M0(s,a[h]);return R}function _o(s,a,h){return s===s&&(h!==e&&(s=s<=h?s:h),a!==e&&(s=s>=a?s:a)),s}function an(s,a,h,y,R,P){var M,L=a&w,F=a&I,te=a&T;if(h&&(M=R?h(s,y,R,P):h(s)),M!==e)return M;if(!gr(s))return s;var re=Je(s);if(re){if(M=s6(s),!L)return Si(s,M)}else{var oe=ci(s),he=oe==St||oe==Re;if(Aa(s))return Yb(s,L);if(oe==Te||oe==Y||he&&!R){if(M=F||he?{}:d_(s),!L)return F?$A(s,gA(M,s)):GA(s,Ib(M,s))}else{if(!$t[oe])return R?s:{};M=a6(s,oe,L)}}P||(P=new In);var Ee=P.get(s);if(Ee)return Ee;P.set(s,M),V_(s)?s.forEach(function(Pe){M.add(an(Pe,a,h,Pe,s,P))}):H_(s)&&s.forEach(function(Pe,pt){M.set(pt,an(Pe,a,h,pt,s,P))});var ke=te?F?_0:b0:F?Ii:Yr,ct=re?e:ke(s);return rn(ct||s,function(Pe,pt){ct&&(pt=Pe,Pe=s[pt]),Fu(M,pt,an(Pe,a,h,pt,s,P))}),M}function xA(s){var a=Yr(s);return function(h){return Tb(h,s,a)}}function Tb(s,a,h){var y=h.length;if(s==null)return!y;for(s=zt(s);y--;){var R=h[y],P=a[R],M=s[R];if(M===e&&!(R in s)||!P(M))return!1}return!0}function Rb(s,a,h){if(typeof s!="function")throw new nn(n);return Gu(function(){s.apply(e,h)},a)}function Hu(s,a,h,y){var R=-1,P=kl,M=!0,L=s.length,F=[],te=a.length;if(!L)return F;h&&(a=mr(a,qi(h))),y?(P=Fd,M=!1):a.length>=r&&(P=Mu,M=!1,a=new bo(a));e:for(;++R<L;){var re=s[R],oe=h==null?re:h(re);if(re=y||re!==0?re:0,M&&oe===oe){for(var he=te;he--;)if(a[he]===oe)continue e;F.push(re)}else P(a,oe,y)||F.push(re)}return F}var Ea=e_(Qn),Ab=e_(r0,!0);function bA(s,a){var h=!0;return Ea(s,function(y,R,P){return h=!!a(y,R,P),h}),h}function $l(s,a,h){for(var y=-1,R=s.length;++y<R;){var P=s[y],M=a(P);if(M!=null&&(L===e?M===M&&!Hi(M):h(M,L)))var L=M,F=P}return F}function _A(s,a,h,y){var R=s.length;for(h=at(h),h<0&&(h=-h>R?0:R+h),y=y===e||y>R?R:at(y),y<0&&(y+=R),y=h>y?0:W_(y);h<y;)s[h++]=a;return s}function Ob(s,a){var h=[];return Ea(s,function(y,R,P){a(y,R,P)&&h.push(y)}),h}function ii(s,a,h,y,R){var P=-1,M=s.length;for(h||(h=c6),R||(R=[]);++P<M;){var L=s[P];a>0&&h(L)?a>1?ii(L,a-1,h,y,R):_a(R,L):y||(R[R.length]=L)}return R}var t0=t_(),kb=t_(!0);function Qn(s,a){return s&&t0(s,a,Yr)}function r0(s,a){return s&&kb(s,a,Yr)}function Yl(s,a){return ba(a,function(h){return Fs(s[h])})}function yo(s,a){a=Ta(a,s);for(var h=0,y=a.length;s!=null&&h<y;)s=s[ts(a[h++])];return h&&h==y?s:e}function Pb(s,a,h){var y=a(s);return Je(s)?y:_a(y,h(s))}function vi(s){return s==null?s===e?Qt:Ie:go&&go in zt(s)?r6(s):m6(s)}function i0(s,a){return s>a}function yA(s,a){return s!=null&&Ot.call(s,a)}function wA(s,a){return s!=null&&a in zt(s)}function SA(s,a,h){return s>=oi(a,h)&&s<zr(a,h)}function n0(s,a,h){for(var y=h?Fd:kl,R=s[0].length,P=s.length,M=P,L=G(P),F=1/0,te=[];M--;){var re=s[M];M&&a&&(re=mr(re,qi(a))),F=oi(re.length,F),L[M]=!h&&(a||R>=120&&re.length>=120)?new bo(M&&re):e}re=s[0];var oe=-1,he=L[0];e:for(;++oe<R&&te.length<F;){var Ee=re[oe],ke=a?a(Ee):Ee;if(Ee=h||Ee!==0?Ee:0,!(he?Mu(he,ke):y(te,ke,h))){for(M=P;--M;){var ct=L[M];if(!(ct?Mu(ct,ke):y(s[M],ke,h)))continue e}he&&he.push(ke),te.push(Ee)}}return te}function EA(s,a,h,y){return Qn(s,function(R,P,M){a(y,h(R),P,M)}),y}function zu(s,a,h){a=Ta(a,s),s=x_(s,a);var y=s==null?s:s[ts(cn(a))];return y==null?e:Di(y,s,h)}function Nb(s){return br(s)&&vi(s)==Y}function IA(s){return br(s)&&vi(s)==At}function TA(s){return br(s)&&vi(s)==ye}function Vu(s,a,h,y,R){return s===a?!0:s==null||a==null||!br(s)&&!br(a)?s!==s&&a!==a:RA(s,a,h,y,Vu,R)}function RA(s,a,h,y,R,P){var M=Je(s),L=Je(a),F=M?se:ci(s),te=L?se:ci(a);F=F==Y?Te:F,te=te==Y?Te:te;var re=F==Te,oe=te==Te,he=F==te;if(he&&Aa(s)){if(!Aa(a))return!1;M=!0,re=!1}if(he&&!re)return P||(P=new In),M||Pc(s)?l_(s,a,h,y,R,P):e6(s,a,F,h,y,R,P);if(!(h&N)){var Ee=re&&Ot.call(s,"__wrapped__"),ke=oe&&Ot.call(a,"__wrapped__");if(Ee||ke){var ct=Ee?s.value():s,Pe=ke?a.value():a;return P||(P=new In),R(ct,Pe,h,y,P)}}return he?(P||(P=new In),t6(s,a,h,y,R,P)):!1}function AA(s){return br(s)&&ci(s)==st}function s0(s,a,h,y){var R=h.length,P=R,M=!y;if(s==null)return!P;for(s=zt(s);R--;){var L=h[R];if(M&&L[2]?L[1]!==s[L[0]]:!(L[0]in s))return!1}for(;++R<P;){L=h[R];var F=L[0],te=s[F],re=L[1];if(M&&L[2]){if(te===e&&!(F in s))return!1}else{var oe=new In;if(y)var he=y(te,re,F,s,a,oe);if(!(he===e?Vu(re,te,N|C,y,oe):he))return!1}}return!0}function Bb(s){if(!gr(s)||f6(s))return!1;var a=Fs(s)?AR:Ss;return a.test(So(s))}function OA(s){return br(s)&&vi(s)==Rt}function kA(s){return br(s)&&ci(s)==vt}function PA(s){return br(s)&&pp(s.length)&&!!pr[vi(s)]}function Mb(s){return typeof s=="function"?s:s==null?Ti:typeof s=="object"?Je(s)?Ub(s[0],s[1]):Lb(s):r1(s)}function a0(s){if(!Ku(s))return MR(s);var a=[];for(var h in zt(s))Ot.call(s,h)&&h!="constructor"&&a.push(h);return a}function NA(s){if(!gr(s))return d6(s);var a=Ku(s),h=[];for(var y in s)y=="constructor"&&(a||!Ot.call(s,y))||h.push(y);return h}function o0(s,a){return s<a}function Cb(s,a){var h=-1,y=Ei(s)?G(s.length):[];return Ea(s,function(R,P,M){y[++h]=a(R,P,M)}),y}function Lb(s){var a=w0(s);return a.length==1&&a[0][2]?v_(a[0][0],a[0][1]):function(h){return h===s||s0(h,s,a)}}function Ub(s,a){return E0(s)&&m_(a)?v_(ts(s),a):function(h){var y=M0(h,s);return y===e&&y===a?C0(h,s):Vu(a,y,N|C)}}function Zl(s,a,h,y,R){s!==a&&t0(a,function(P,M){if(R||(R=new In),gr(P))BA(s,a,M,h,Zl,y,R);else{var L=y?y(T0(s,M),P,M+"",s,a,R):e;L===e&&(L=P),Qd(s,M,L)}},Ii)}function BA(s,a,h,y,R,P,M){var L=T0(s,h),F=T0(a,h),te=M.get(F);if(te){Qd(s,h,te);return}var re=P?P(L,F,h+"",s,a,M):e,oe=re===e;if(oe){var he=Je(F),Ee=!he&&Aa(F),ke=!he&&!Ee&&Pc(F);re=F,he||Ee||ke?Je(L)?re=L:Ir(L)?re=Si(L):Ee?(oe=!1,re=Yb(F,!0)):ke?(oe=!1,re=Zb(F,!0)):re=[]:$u(F)||Eo(F)?(re=L,Eo(L)?re=K_(L):(!gr(L)||Fs(L))&&(re=d_(F))):oe=!1}oe&&(M.set(F,re),R(re,F,y,P,M),M.delete(F)),Qd(s,h,re)}function Db(s,a){var h=s.length;if(h)return a+=a<0?h:0,qs(a,h)?s[a]:e}function qb(s,a,h){a.length?a=mr(a,function(P){return Je(P)?function(M){return yo(M,P.length===1?P[0]:P)}:P}):a=[Ti];var y=-1;a=mr(a,qi(Oe()));var R=Cb(s,function(P,M,L){var F=mr(a,function(te){return te(P)});return{criteria:F,index:++y,value:P}});return aR(R,function(P,M){return KA(P,M,h)})}function MA(s,a){return Fb(s,a,function(h,y){return C0(s,y)})}function Fb(s,a,h){for(var y=-1,R=a.length,P={};++y<R;){var M=a[y],L=yo(s,M);h(L,M)&&ju(P,Ta(M,s),L)}return P}function CA(s){return function(a){return yo(a,s)}}function c0(s,a,h,y){var R=y?sR:yc,P=-1,M=a.length,L=s;for(s===a&&(a=Si(a)),h&&(L=mr(s,qi(h)));++P<M;)for(var F=0,te=a[P],re=h?h(te):te;(F=R(L,re,F,y))>-1;)L!==s&&Fl.call(L,F,1),Fl.call(s,F,1);return s}function Hb(s,a){for(var h=s?a.length:0,y=h-1;h--;){var R=a[h];if(h==y||R!==P){var P=R;qs(R)?Fl.call(s,R,1):p0(s,R)}}return s}function u0(s,a){return s+Vl(yb()*(a-s+1))}function LA(s,a,h,y){for(var R=-1,P=zr(zl((a-s)/(h||1)),0),M=G(P);P--;)M[y?P:++R]=s,s+=h;return M}function f0(s,a){var h="";if(!s||a<1||a>S)return h;do a%2&&(h+=s),a=Vl(a/2),a&&(s+=s);while(a);return h}function ft(s,a){return R0(g_(s,a,Ti),s+"")}function UA(s){return Eb(Nc(s))}function DA(s,a){var h=Nc(s);return ap(h,_o(a,0,h.length))}function ju(s,a,h,y){if(!gr(s))return s;a=Ta(a,s);for(var R=-1,P=a.length,M=P-1,L=s;L!=null&&++R<P;){var F=ts(a[R]),te=h;if(F==="__proto__"||F==="constructor"||F==="prototype")return s;if(R!=M){var re=L[F];te=y?y(re,F,L):e,te===e&&(te=gr(re)?re:qs(a[R+1])?[]:{})}Fu(L,F,te),L=L[F]}return s}var zb=jl?function(s,a){return jl.set(s,a),s}:Ti,qA=Hl?function(s,a){return Hl(s,"toString",{configurable:!0,enumerable:!1,value:U0(a),writable:!0})}:Ti;function FA(s){return ap(Nc(s))}function on(s,a,h){var y=-1,R=s.length;a<0&&(a=-a>R?0:R+a),h=h>R?R:h,h<0&&(h+=R),R=a>h?0:h-a>>>0,a>>>=0;for(var P=G(R);++y<R;)P[y]=s[y+a];return P}function HA(s,a){var h;return Ea(s,function(y,R,P){return h=a(y,R,P),!h}),!!h}function Xl(s,a,h){var y=0,R=s==null?y:s.length;if(typeof a=="number"&&a===a&&R<=D){for(;y<R;){var P=y+R>>>1,M=s[P];M!==null&&!Hi(M)&&(h?M<=a:M<a)?y=P+1:R=P}return R}return l0(s,a,Ti,h)}function l0(s,a,h,y){var R=0,P=s==null?0:s.length;if(P===0)return 0;a=h(a);for(var M=a!==a,L=a===null,F=Hi(a),te=a===e;R<P;){var re=Vl((R+P)/2),oe=h(s[re]),he=oe!==e,Ee=oe===null,ke=oe===oe,ct=Hi(oe);if(M)var Pe=y||ke;else te?Pe=ke&&(y||he):L?Pe=ke&&he&&(y||!Ee):F?Pe=ke&&he&&!Ee&&(y||!ct):Ee||ct?Pe=!1:Pe=y?oe<=a:oe<a;Pe?R=re+1:P=re}return oi(P,A)}function Vb(s,a){for(var h=-1,y=s.length,R=0,P=[];++h<y;){var M=s[h],L=a?a(M):M;if(!h||!Tn(L,F)){var F=L;P[R++]=M===0?0:M}}return P}function jb(s){return typeof s=="number"?s:Hi(s)?l:+s}function Fi(s){if(typeof s=="string")return s;if(Je(s))return mr(s,Fi)+"";if(Hi(s))return wb?wb.call(s):"";var a=s+"";return a=="0"&&1/s==-x?"-0":a}function Ia(s,a,h){var y=-1,R=kl,P=s.length,M=!0,L=[],F=L;if(h)M=!1,R=Fd;else if(P>=r){var te=a?null:JA(s);if(te)return Nl(te);M=!1,R=Mu,F=new bo}else F=a?[]:L;e:for(;++y<P;){var re=s[y],oe=a?a(re):re;if(re=h||re!==0?re:0,M&&oe===oe){for(var he=F.length;he--;)if(F[he]===oe)continue e;a&&F.push(oe),L.push(re)}else R(F,oe,h)||(F!==L&&F.push(oe),L.push(re))}return L}function p0(s,a){return a=Ta(a,s),s=x_(s,a),s==null||delete s[ts(cn(a))]}function Wb(s,a,h,y){return ju(s,a,h(yo(s,a)),y)}function Jl(s,a,h,y){for(var R=s.length,P=y?R:-1;(y?P--:++P<R)&&a(s[P],P,s););return h?on(s,y?0:P,y?P+1:R):on(s,y?P+1:0,y?R:P)}function Kb(s,a){var h=s;return h instanceof dt&&(h=h.value()),Hd(a,function(y,R){return R.func.apply(R.thisArg,_a([y],R.args))},h)}function h0(s,a,h){var y=s.length;if(y<2)return y?Ia(s[0]):[];for(var R=-1,P=G(y);++R<y;)for(var M=s[R],L=-1;++L<y;)L!=R&&(P[R]=Hu(P[R]||M,s[L],a,h));return Ia(ii(P,1),a,h)}function Gb(s,a,h){for(var y=-1,R=s.length,P=a.length,M={};++y<R;){var L=y<P?a[y]:e;h(M,s[y],L)}return M}function d0(s){return Ir(s)?s:[]}function m0(s){return typeof s=="function"?s:Ti}function Ta(s,a){return Je(s)?s:E0(s,a)?[s]:w_(Tt(s))}var zA=ft;function Ra(s,a,h){var y=s.length;return h=h===e?y:h,!a&&h>=y?s:on(s,a,h)}var $b=OR||function(s){return $r.clearTimeout(s)};function Yb(s,a){if(a)return s.slice();var h=s.length,y=vb?vb(h):new s.constructor(h);return s.copy(y),y}function v0(s){var a=new s.constructor(s.byteLength);return new Dl(a).set(new Dl(s)),a}function VA(s,a){var h=a?v0(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.byteLength)}function jA(s){var a=new s.constructor(s.source,Ht.exec(s));return a.lastIndex=s.lastIndex,a}function WA(s){return qu?zt(qu.call(s)):{}}function Zb(s,a){var h=a?v0(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.length)}function Xb(s,a){if(s!==a){var h=s!==e,y=s===null,R=s===s,P=Hi(s),M=a!==e,L=a===null,F=a===a,te=Hi(a);if(!L&&!te&&!P&&s>a||P&&M&&F&&!L&&!te||y&&M&&F||!h&&F||!R)return 1;if(!y&&!P&&!te&&s<a||te&&h&&R&&!y&&!P||L&&h&&R||!M&&R||!F)return-1}return 0}function KA(s,a,h){for(var y=-1,R=s.criteria,P=a.criteria,M=R.length,L=h.length;++y<M;){var F=Xb(R[y],P[y]);if(F){if(y>=L)return F;var te=h[y];return F*(te=="desc"?-1:1)}}return s.index-a.index}function Jb(s,a,h,y){for(var R=-1,P=s.length,M=h.length,L=-1,F=a.length,te=zr(P-M,0),re=G(F+te),oe=!y;++L<F;)re[L]=a[L];for(;++R<M;)(oe||R<P)&&(re[h[R]]=s[R]);for(;te--;)re[L++]=s[R++];return re}function Qb(s,a,h,y){for(var R=-1,P=s.length,M=-1,L=h.length,F=-1,te=a.length,re=zr(P-L,0),oe=G(re+te),he=!y;++R<re;)oe[R]=s[R];for(var Ee=R;++F<te;)oe[Ee+F]=a[F];for(;++M<L;)(he||R<P)&&(oe[Ee+h[M]]=s[R++]);return oe}function Si(s,a){var h=-1,y=s.length;for(a||(a=G(y));++h<y;)a[h]=s[h];return a}function es(s,a,h,y){var R=!h;h||(h={});for(var P=-1,M=a.length;++P<M;){var L=a[P],F=y?y(h[L],s[L],L,h,s):e;F===e&&(F=s[L]),R?Ls(h,L,F):Fu(h,L,F)}return h}function GA(s,a){return es(s,S0(s),a)}function $A(s,a){return es(s,p_(s),a)}function Ql(s,a){return function(h,y){var R=Je(h)?QT:vA,P=a?a():{};return R(h,s,Oe(y,2),P)}}function Ac(s){return ft(function(a,h){var y=-1,R=h.length,P=R>1?h[R-1]:e,M=R>2?h[2]:e;for(P=s.length>3&&typeof P=="function"?(R--,P):e,M&&gi(h[0],h[1],M)&&(P=R<3?e:P,R=1),a=zt(a);++y<R;){var L=h[y];L&&s(a,L,y,P)}return a})}function e_(s,a){return function(h,y){if(h==null)return h;if(!Ei(h))return s(h,y);for(var R=h.length,P=a?R:-1,M=zt(h);(a?P--:++P<R)&&y(M[P],P,M)!==!1;);return h}}function t_(s){return function(a,h,y){for(var R=-1,P=zt(a),M=y(a),L=M.length;L--;){var F=M[s?L:++R];if(h(P[F],F,P)===!1)break}return a}}function YA(s,a,h){var y=a&B,R=Wu(s);function P(){var M=this&&this!==$r&&this instanceof P?R:s;return M.apply(y?h:this,arguments)}return P}function r_(s){return function(a){a=Tt(a);var h=wc(a)?En(a):e,y=h?h[0]:a.charAt(0),R=h?Ra(h,1).join(""):a.slice(1);return y[s]()+R}}function Oc(s){return function(a){return Hd(e1(Q_(a).replace(qT,"")),s,"")}}function Wu(s){return function(){var a=arguments;switch(a.length){case 0:return new s;case 1:return new s(a[0]);case 2:return new s(a[0],a[1]);case 3:return new s(a[0],a[1],a[2]);case 4:return new s(a[0],a[1],a[2],a[3]);case 5:return new s(a[0],a[1],a[2],a[3],a[4]);case 6:return new s(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new s(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var h=Rc(s.prototype),y=s.apply(h,a);return gr(y)?y:h}}function ZA(s,a,h){var y=Wu(s);function R(){for(var P=arguments.length,M=G(P),L=P,F=kc(R);L--;)M[L]=arguments[L];var te=P<3&&M[0]!==F&&M[P-1]!==F?[]:ya(M,F);if(P-=te.length,P<h)return o_(s,a,ep,R.placeholder,e,M,te,e,e,h-P);var re=this&&this!==$r&&this instanceof R?y:s;return Di(re,this,M)}return R}function i_(s){return function(a,h,y){var R=zt(a);if(!Ei(a)){var P=Oe(h,3);a=Yr(a),h=function(L){return P(R[L],L,R)}}var M=s(a,h,y);return M>-1?R[P?a[M]:M]:e}}function n_(s){return Ds(function(a){var h=a.length,y=h,R=sn.prototype.thru;for(s&&a.reverse();y--;){var P=a[y];if(typeof P!="function")throw new nn(n);if(R&&!M&&np(P)=="wrapper")var M=new sn([],!0)}for(y=M?y:h;++y<h;){P=a[y];var L=np(P),F=L=="wrapper"?y0(P):e;F&&I0(F[0])&&F[1]==(ge|$|ee|Se)&&!F[4].length&&F[9]==1?M=M[np(F[0])].apply(M,F[3]):M=P.length==1&&I0(P)?M[L]():M.thru(P)}return function(){var te=arguments,re=te[0];if(M&&te.length==1&&Je(re))return M.plant(re).value();for(var oe=0,he=h?a[oe].apply(this,te):re;++oe<h;)he=a[oe].call(this,he);return he}})}function ep(s,a,h,y,R,P,M,L,F,te){var re=a&ge,oe=a&B,he=a&U,Ee=a&($|H),ke=a&me,ct=he?e:Wu(s);function Pe(){for(var pt=arguments.length,gt=G(pt),zi=pt;zi--;)gt[zi]=arguments[zi];if(Ee)var xi=kc(Pe),Vi=cR(gt,xi);if(y&&(gt=Jb(gt,y,R,Ee)),P&&(gt=Qb(gt,P,M,Ee)),pt-=Vi,Ee&&pt<te){var Tr=ya(gt,xi);return o_(s,a,ep,Pe.placeholder,h,gt,Tr,L,F,te-pt)}var Rn=oe?h:this,zs=he?Rn[s]:s;return pt=gt.length,L?gt=v6(gt,L):ke&&pt>1&&gt.reverse(),re&&F<pt&&(gt.length=F),this&&this!==$r&&this instanceof Pe&&(zs=ct||Wu(zs)),zs.apply(Rn,gt)}return Pe}function s_(s,a){return function(h,y){return EA(h,s,a(y),{})}}function tp(s,a){return function(h,y){var R;if(h===e&&y===e)return a;if(h!==e&&(R=h),y!==e){if(R===e)return y;typeof h=="string"||typeof y=="string"?(h=Fi(h),y=Fi(y)):(h=jb(h),y=jb(y)),R=s(h,y)}return R}}function g0(s){return Ds(function(a){return a=mr(a,qi(Oe())),ft(function(h){var y=this;return s(a,function(R){return Di(R,y,h)})})})}function rp(s,a){a=a===e?" ":Fi(a);var h=a.length;if(h<2)return h?f0(a,s):a;var y=f0(a,zl(s/Sc(a)));return wc(a)?Ra(En(y),0,s).join(""):y.slice(0,s)}function XA(s,a,h,y){var R=a&B,P=Wu(s);function M(){for(var L=-1,F=arguments.length,te=-1,re=y.length,oe=G(re+F),he=this&&this!==$r&&this instanceof M?P:s;++te<re;)oe[te]=y[te];for(;F--;)oe[te++]=arguments[++L];return Di(he,R?h:this,oe)}return M}function a_(s){return function(a,h,y){return y&&typeof y!="number"&&gi(a,h,y)&&(h=y=e),a=Hs(a),h===e?(h=a,a=0):h=Hs(h),y=y===e?a<h?1:-1:Hs(y),LA(a,h,y,s)}}function ip(s){return function(a,h){return typeof a=="string"&&typeof h=="string"||(a=un(a),h=un(h)),s(a,h)}}function o_(s,a,h,y,R,P,M,L,F,te){var re=a&$,oe=re?M:e,he=re?e:M,Ee=re?P:e,ke=re?e:P;a|=re?ee:ce,a&=~(re?ce:ee),a&Z||(a&=~(B|U));var ct=[s,a,R,Ee,oe,ke,he,L,F,te],Pe=h.apply(e,ct);return I0(s)&&b_(Pe,ct),Pe.placeholder=y,__(Pe,s,a)}function x0(s){var a=Hr[s];return function(h,y){if(h=un(h),y=y==null?0:oi(at(y),292),y&&_b(h)){var R=(Tt(h)+"e").split("e"),P=a(R[0]+"e"+(+R[1]+y));return R=(Tt(P)+"e").split("e"),+(R[0]+"e"+(+R[1]-y))}return a(h)}}var JA=Ic&&1/Nl(new Ic([,-0]))[1]==x?function(s){return new Ic(s)}:F0;function c_(s){return function(a){var h=ci(a);return h==st?$d(a):h==vt?mR(a):oR(a,s(a))}}function Us(s,a,h,y,R,P,M,L){var F=a&U;if(!F&&typeof s!="function")throw new nn(n);var te=y?y.length:0;if(te||(a&=~(ee|ce),y=R=e),M=M===e?M:zr(at(M),0),L=L===e?L:at(L),te-=R?R.length:0,a&ce){var re=y,oe=R;y=R=e}var he=F?e:y0(s),Ee=[s,a,h,y,R,re,oe,P,M,L];if(he&&h6(Ee,he),s=Ee[0],a=Ee[1],h=Ee[2],y=Ee[3],R=Ee[4],L=Ee[9]=Ee[9]===e?F?0:s.length:zr(Ee[9]-te,0),!L&&a&($|H)&&(a&=~($|H)),!a||a==B)var ke=YA(s,a,h);else a==$||a==H?ke=ZA(s,a,L):(a==ee||a==(B|ee))&&!R.length?ke=XA(s,a,h,y):ke=ep.apply(e,Ee);var ct=he?zb:b_;return __(ct(ke,Ee),s,a)}function u_(s,a,h,y){return s===e||Tn(s,Ec[h])&&!Ot.call(y,h)?a:s}function f_(s,a,h,y,R,P){return gr(s)&&gr(a)&&(P.set(a,s),Zl(s,a,e,f_,P),P.delete(a)),s}function QA(s){return $u(s)?e:s}function l_(s,a,h,y,R,P){var M=h&N,L=s.length,F=a.length;if(L!=F&&!(M&&F>L))return!1;var te=P.get(s),re=P.get(a);if(te&&re)return te==a&&re==s;var oe=-1,he=!0,Ee=h&C?new bo:e;for(P.set(s,a),P.set(a,s);++oe<L;){var ke=s[oe],ct=a[oe];if(y)var Pe=M?y(ct,ke,oe,a,s,P):y(ke,ct,oe,s,a,P);if(Pe!==e){if(Pe)continue;he=!1;break}if(Ee){if(!zd(a,function(pt,gt){if(!Mu(Ee,gt)&&(ke===pt||R(ke,pt,h,y,P)))return Ee.push(gt)})){he=!1;break}}else if(!(ke===ct||R(ke,ct,h,y,P))){he=!1;break}}return P.delete(s),P.delete(a),he}function e6(s,a,h,y,R,P,M){switch(h){case Be:if(s.byteLength!=a.byteLength||s.byteOffset!=a.byteOffset)return!1;s=s.buffer,a=a.buffer;case At:return!(s.byteLength!=a.byteLength||!P(new Dl(s),new Dl(a)));case pe:case ye:case et:return Tn(+s,+a);case ht:return s.name==a.name&&s.message==a.message;case Rt:case Me:return s==a+"";case st:var L=$d;case vt:var F=y&N;if(L||(L=Nl),s.size!=a.size&&!F)return!1;var te=M.get(s);if(te)return te==a;y|=C,M.set(s,a);var re=l_(L(s),L(a),y,R,P,M);return M.delete(s),re;case Pt:if(qu)return qu.call(s)==qu.call(a)}return!1}function t6(s,a,h,y,R,P){var M=h&N,L=b0(s),F=L.length,te=b0(a),re=te.length;if(F!=re&&!M)return!1;for(var oe=F;oe--;){var he=L[oe];if(!(M?he in a:Ot.call(a,he)))return!1}var Ee=P.get(s),ke=P.get(a);if(Ee&&ke)return Ee==a&&ke==s;var ct=!0;P.set(s,a),P.set(a,s);for(var Pe=M;++oe<F;){he=L[oe];var pt=s[he],gt=a[he];if(y)var zi=M?y(gt,pt,he,a,s,P):y(pt,gt,he,s,a,P);if(!(zi===e?pt===gt||R(pt,gt,h,y,P):zi)){ct=!1;break}Pe||(Pe=he=="constructor")}if(ct&&!Pe){var xi=s.constructor,Vi=a.constructor;xi!=Vi&&"constructor"in s&&"constructor"in a&&!(typeof xi=="function"&&xi instanceof xi&&typeof Vi=="function"&&Vi instanceof Vi)&&(ct=!1)}return P.delete(s),P.delete(a),ct}function Ds(s){return R0(g_(s,e,T_),s+"")}function b0(s){return Pb(s,Yr,S0)}function _0(s){return Pb(s,Ii,p_)}var y0=jl?function(s){return jl.get(s)}:F0;function np(s){for(var a=s.name+"",h=Tc[a],y=Ot.call(Tc,a)?h.length:0;y--;){var R=h[y],P=R.func;if(P==null||P==s)return R.name}return a}function kc(s){var a=Ot.call(k,"placeholder")?k:s;return a.placeholder}function Oe(){var s=k.iteratee||D0;return s=s===D0?Mb:s,arguments.length?s(arguments[0],arguments[1]):s}function sp(s,a){var h=s.__data__;return u6(a)?h[typeof a=="string"?"string":"hash"]:h.map}function w0(s){for(var a=Yr(s),h=a.length;h--;){var y=a[h],R=s[y];a[h]=[y,R,m_(R)]}return a}function wo(s,a){var h=pR(s,a);return Bb(h)?h:e}function r6(s){var a=Ot.call(s,go),h=s[go];try{s[go]=e;var y=!0}catch{}var R=Ll.call(s);return y&&(a?s[go]=h:delete s[go]),R}var S0=Zd?function(s){return s==null?[]:(s=zt(s),ba(Zd(s),function(a){return xb.call(s,a)}))}:H0,p_=Zd?function(s){for(var a=[];s;)_a(a,S0(s)),s=ql(s);return a}:H0,ci=vi;(Xd&&ci(new Xd(new ArrayBuffer(1)))!=Be||Lu&&ci(new Lu)!=st||Jd&&ci(Jd.resolve())!=jt||Ic&&ci(new Ic)!=vt||Uu&&ci(new Uu)!=Ce)&&(ci=function(s){var a=vi(s),h=a==Te?s.constructor:e,y=h?So(h):"";if(y)switch(y){case DR:return Be;case qR:return st;case FR:return jt;case HR:return vt;case zR:return Ce}return a});function i6(s,a,h){for(var y=-1,R=h.length;++y<R;){var P=h[y],M=P.size;switch(P.type){case"drop":s+=M;break;case"dropRight":a-=M;break;case"take":a=oi(a,s+M);break;case"takeRight":s=zr(s,a-M);break}}return{start:s,end:a}}function n6(s){var a=s.match(cr);return a?a[1].split(ur):[]}function h_(s,a,h){a=Ta(a,s);for(var y=-1,R=a.length,P=!1;++y<R;){var M=ts(a[y]);if(!(P=s!=null&&h(s,M)))break;s=s[M]}return P||++y!=R?P:(R=s==null?0:s.length,!!R&&pp(R)&&qs(M,R)&&(Je(s)||Eo(s)))}function s6(s){var a=s.length,h=new s.constructor(a);return a&&typeof s[0]=="string"&&Ot.call(s,"index")&&(h.index=s.index,h.input=s.input),h}function d_(s){return typeof s.constructor=="function"&&!Ku(s)?Rc(ql(s)):{}}function a6(s,a,h){var y=s.constructor;switch(a){case At:return v0(s);case pe:case ye:return new y(+s);case Be:return VA(s,h);case Bt:case Mt:case Ue:case Ct:case Lt:case De:case Ut:case Dt:case qe:return Zb(s,h);case st:return new y;case et:case Me:return new y(s);case Rt:return jA(s);case vt:return new y;case Pt:return WA(s)}}function o6(s,a){var h=a.length;if(!h)return s;var y=h-1;return a[y]=(h>1?"& ":"")+a[y],a=a.join(h>2?", ":" "),s.replace(Ye,`{
2
+ /* [wrapped with `+a+`] */
3
+ `)}function c6(s){return Je(s)||Eo(s)||!!(bb&&s&&s[bb])}function qs(s,a){var h=typeof s;return a=a??S,!!a&&(h=="number"||h!="symbol"&&Is.test(s))&&s>-1&&s%1==0&&s<a}function gi(s,a,h){if(!gr(h))return!1;var y=typeof a;return(y=="number"?Ei(h)&&qs(a,h.length):y=="string"&&a in h)?Tn(h[a],s):!1}function E0(s,a){if(Je(s))return!1;var h=typeof s;return h=="number"||h=="symbol"||h=="boolean"||s==null||Hi(s)?!0:Ge.test(s)||!sr.test(s)||a!=null&&s in zt(a)}function u6(s){var a=typeof s;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?s!=="__proto__":s===null}function I0(s){var a=np(s),h=k[a];if(typeof h!="function"||!(a in dt.prototype))return!1;if(s===h)return!0;var y=y0(h);return!!y&&s===y[0]}function f6(s){return!!mb&&mb in s}var l6=Ml?Fs:z0;function Ku(s){var a=s&&s.constructor,h=typeof a=="function"&&a.prototype||Ec;return s===h}function m_(s){return s===s&&!gr(s)}function v_(s,a){return function(h){return h==null?!1:h[s]===a&&(a!==e||s in zt(h))}}function p6(s){var a=fp(s,function(y){return h.size===m&&h.clear(),y}),h=a.cache;return a}function h6(s,a){var h=s[1],y=a[1],R=h|y,P=R<(B|U|ge),M=y==ge&&h==$||y==ge&&h==Se&&s[7].length<=a[8]||y==(ge|Se)&&a[7].length<=a[8]&&h==$;if(!(P||M))return s;y&B&&(s[2]=a[2],R|=h&B?0:Z);var L=a[3];if(L){var F=s[3];s[3]=F?Jb(F,L,a[4]):L,s[4]=F?ya(s[3],_):a[4]}return L=a[5],L&&(F=s[5],s[5]=F?Qb(F,L,a[6]):L,s[6]=F?ya(s[5],_):a[6]),L=a[7],L&&(s[7]=L),y&ge&&(s[8]=s[8]==null?a[8]:oi(s[8],a[8])),s[9]==null&&(s[9]=a[9]),s[0]=a[0],s[1]=R,s}function d6(s){var a=[];if(s!=null)for(var h in zt(s))a.push(h);return a}function m6(s){return Ll.call(s)}function g_(s,a,h){return a=zr(a===e?s.length-1:a,0),function(){for(var y=arguments,R=-1,P=zr(y.length-a,0),M=G(P);++R<P;)M[R]=y[a+R];R=-1;for(var L=G(a+1);++R<a;)L[R]=y[R];return L[a]=h(M),Di(s,this,L)}}function x_(s,a){return a.length<2?s:yo(s,on(a,0,-1))}function v6(s,a){for(var h=s.length,y=oi(a.length,h),R=Si(s);y--;){var P=a[y];s[y]=qs(P,h)?R[P]:e}return s}function T0(s,a){if(!(a==="constructor"&&typeof s[a]=="function")&&a!="__proto__")return s[a]}var b_=y_(zb),Gu=PR||function(s,a){return $r.setTimeout(s,a)},R0=y_(qA);function __(s,a,h){var y=a+"";return R0(s,o6(y,g6(n6(y),h)))}function y_(s){var a=0,h=0;return function(){var y=CR(),R=c-(y-h);if(h=y,R>0){if(++a>=f)return arguments[0]}else a=0;return s.apply(e,arguments)}}function ap(s,a){var h=-1,y=s.length,R=y-1;for(a=a===e?y:a;++h<a;){var P=u0(h,R),M=s[P];s[P]=s[h],s[h]=M}return s.length=a,s}var w_=p6(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(ar,function(h,y,R,P){a.push(R?P.replace(lr,"$1"):y||h)}),a});function ts(s){if(typeof s=="string"||Hi(s))return s;var a=s+"";return a=="0"&&1/s==-x?"-0":a}function So(s){if(s!=null){try{return Cl.call(s)}catch{}try{return s+""}catch{}}return""}function g6(s,a){return rn(V,function(h){var y="_."+h[0];a&h[1]&&!kl(s,y)&&s.push(y)}),s.sort()}function S_(s){if(s instanceof dt)return s.clone();var a=new sn(s.__wrapped__,s.__chain__);return a.__actions__=Si(s.__actions__),a.__index__=s.__index__,a.__values__=s.__values__,a}function x6(s,a,h){(h?gi(s,a,h):a===e)?a=1:a=zr(at(a),0);var y=s==null?0:s.length;if(!y||a<1)return[];for(var R=0,P=0,M=G(zl(y/a));R<y;)M[P++]=on(s,R,R+=a);return M}function b6(s){for(var a=-1,h=s==null?0:s.length,y=0,R=[];++a<h;){var P=s[a];P&&(R[y++]=P)}return R}function _6(){var s=arguments.length;if(!s)return[];for(var a=G(s-1),h=arguments[0],y=s;y--;)a[y-1]=arguments[y];return _a(Je(h)?Si(h):[h],ii(a,1))}var y6=ft(function(s,a){return Ir(s)?Hu(s,ii(a,1,Ir,!0)):[]}),w6=ft(function(s,a){var h=cn(a);return Ir(h)&&(h=e),Ir(s)?Hu(s,ii(a,1,Ir,!0),Oe(h,2)):[]}),S6=ft(function(s,a){var h=cn(a);return Ir(h)&&(h=e),Ir(s)?Hu(s,ii(a,1,Ir,!0),e,h):[]});function E6(s,a,h){var y=s==null?0:s.length;return y?(a=h||a===e?1:at(a),on(s,a<0?0:a,y)):[]}function I6(s,a,h){var y=s==null?0:s.length;return y?(a=h||a===e?1:at(a),a=y-a,on(s,0,a<0?0:a)):[]}function T6(s,a){return s&&s.length?Jl(s,Oe(a,3),!0,!0):[]}function R6(s,a){return s&&s.length?Jl(s,Oe(a,3),!0):[]}function A6(s,a,h,y){var R=s==null?0:s.length;return R?(h&&typeof h!="number"&&gi(s,a,h)&&(h=0,y=R),_A(s,a,h,y)):[]}function E_(s,a,h){var y=s==null?0:s.length;if(!y)return-1;var R=h==null?0:at(h);return R<0&&(R=zr(y+R,0)),Pl(s,Oe(a,3),R)}function I_(s,a,h){var y=s==null?0:s.length;if(!y)return-1;var R=y-1;return h!==e&&(R=at(h),R=h<0?zr(y+R,0):oi(R,y-1)),Pl(s,Oe(a,3),R,!0)}function T_(s){var a=s==null?0:s.length;return a?ii(s,1):[]}function O6(s){var a=s==null?0:s.length;return a?ii(s,x):[]}function k6(s,a){var h=s==null?0:s.length;return h?(a=a===e?1:at(a),ii(s,a)):[]}function P6(s){for(var a=-1,h=s==null?0:s.length,y={};++a<h;){var R=s[a];y[R[0]]=R[1]}return y}function R_(s){return s&&s.length?s[0]:e}function N6(s,a,h){var y=s==null?0:s.length;if(!y)return-1;var R=h==null?0:at(h);return R<0&&(R=zr(y+R,0)),yc(s,a,R)}function B6(s){var a=s==null?0:s.length;return a?on(s,0,-1):[]}var M6=ft(function(s){var a=mr(s,d0);return a.length&&a[0]===s[0]?n0(a):[]}),C6=ft(function(s){var a=cn(s),h=mr(s,d0);return a===cn(h)?a=e:h.pop(),h.length&&h[0]===s[0]?n0(h,Oe(a,2)):[]}),L6=ft(function(s){var a=cn(s),h=mr(s,d0);return a=typeof a=="function"?a:e,a&&h.pop(),h.length&&h[0]===s[0]?n0(h,e,a):[]});function U6(s,a){return s==null?"":BR.call(s,a)}function cn(s){var a=s==null?0:s.length;return a?s[a-1]:e}function D6(s,a,h){var y=s==null?0:s.length;if(!y)return-1;var R=y;return h!==e&&(R=at(h),R=R<0?zr(y+R,0):oi(R,y-1)),a===a?gR(s,a,R):Pl(s,ob,R,!0)}function q6(s,a){return s&&s.length?Db(s,at(a)):e}var F6=ft(A_);function A_(s,a){return s&&s.length&&a&&a.length?c0(s,a):s}function H6(s,a,h){return s&&s.length&&a&&a.length?c0(s,a,Oe(h,2)):s}function z6(s,a,h){return s&&s.length&&a&&a.length?c0(s,a,e,h):s}var V6=Ds(function(s,a){var h=s==null?0:s.length,y=e0(s,a);return Hb(s,mr(a,function(R){return qs(R,h)?+R:R}).sort(Xb)),y});function j6(s,a){var h=[];if(!(s&&s.length))return h;var y=-1,R=[],P=s.length;for(a=Oe(a,3);++y<P;){var M=s[y];a(M,y,s)&&(h.push(M),R.push(y))}return Hb(s,R),h}function A0(s){return s==null?s:UR.call(s)}function W6(s,a,h){var y=s==null?0:s.length;return y?(h&&typeof h!="number"&&gi(s,a,h)?(a=0,h=y):(a=a==null?0:at(a),h=h===e?y:at(h)),on(s,a,h)):[]}function K6(s,a){return Xl(s,a)}function G6(s,a,h){return l0(s,a,Oe(h,2))}function $6(s,a){var h=s==null?0:s.length;if(h){var y=Xl(s,a);if(y<h&&Tn(s[y],a))return y}return-1}function Y6(s,a){return Xl(s,a,!0)}function Z6(s,a,h){return l0(s,a,Oe(h,2),!0)}function X6(s,a){var h=s==null?0:s.length;if(h){var y=Xl(s,a,!0)-1;if(Tn(s[y],a))return y}return-1}function J6(s){return s&&s.length?Vb(s):[]}function Q6(s,a){return s&&s.length?Vb(s,Oe(a,2)):[]}function e4(s){var a=s==null?0:s.length;return a?on(s,1,a):[]}function t4(s,a,h){return s&&s.length?(a=h||a===e?1:at(a),on(s,0,a<0?0:a)):[]}function r4(s,a,h){var y=s==null?0:s.length;return y?(a=h||a===e?1:at(a),a=y-a,on(s,a<0?0:a,y)):[]}function i4(s,a){return s&&s.length?Jl(s,Oe(a,3),!1,!0):[]}function n4(s,a){return s&&s.length?Jl(s,Oe(a,3)):[]}var s4=ft(function(s){return Ia(ii(s,1,Ir,!0))}),a4=ft(function(s){var a=cn(s);return Ir(a)&&(a=e),Ia(ii(s,1,Ir,!0),Oe(a,2))}),o4=ft(function(s){var a=cn(s);return a=typeof a=="function"?a:e,Ia(ii(s,1,Ir,!0),e,a)});function c4(s){return s&&s.length?Ia(s):[]}function u4(s,a){return s&&s.length?Ia(s,Oe(a,2)):[]}function f4(s,a){return a=typeof a=="function"?a:e,s&&s.length?Ia(s,e,a):[]}function O0(s){if(!(s&&s.length))return[];var a=0;return s=ba(s,function(h){if(Ir(h))return a=zr(h.length,a),!0}),Kd(a,function(h){return mr(s,Vd(h))})}function O_(s,a){if(!(s&&s.length))return[];var h=O0(s);return a==null?h:mr(h,function(y){return Di(a,e,y)})}var l4=ft(function(s,a){return Ir(s)?Hu(s,a):[]}),p4=ft(function(s){return h0(ba(s,Ir))}),h4=ft(function(s){var a=cn(s);return Ir(a)&&(a=e),h0(ba(s,Ir),Oe(a,2))}),d4=ft(function(s){var a=cn(s);return a=typeof a=="function"?a:e,h0(ba(s,Ir),e,a)}),m4=ft(O0);function v4(s,a){return Gb(s||[],a||[],Fu)}function g4(s,a){return Gb(s||[],a||[],ju)}var x4=ft(function(s){var a=s.length,h=a>1?s[a-1]:e;return h=typeof h=="function"?(s.pop(),h):e,O_(s,h)});function k_(s){var a=k(s);return a.__chain__=!0,a}function b4(s,a){return a(s),s}function op(s,a){return a(s)}var _4=Ds(function(s){var a=s.length,h=a?s[0]:0,y=this.__wrapped__,R=function(P){return e0(P,s)};return a>1||this.__actions__.length||!(y instanceof dt)||!qs(h)?this.thru(R):(y=y.slice(h,+h+(a?1:0)),y.__actions__.push({func:op,args:[R],thisArg:e}),new sn(y,this.__chain__).thru(function(P){return a&&!P.length&&P.push(e),P}))});function y4(){return k_(this)}function w4(){return new sn(this.value(),this.__chain__)}function S4(){this.__values__===e&&(this.__values__=j_(this.value()));var s=this.__index__>=this.__values__.length,a=s?e:this.__values__[this.__index__++];return{done:s,value:a}}function E4(){return this}function I4(s){for(var a,h=this;h instanceof Kl;){var y=S_(h);y.__index__=0,y.__values__=e,a?R.__wrapped__=y:a=y;var R=y;h=h.__wrapped__}return R.__wrapped__=s,a}function T4(){var s=this.__wrapped__;if(s instanceof dt){var a=s;return this.__actions__.length&&(a=new dt(this)),a=a.reverse(),a.__actions__.push({func:op,args:[A0],thisArg:e}),new sn(a,this.__chain__)}return this.thru(A0)}function R4(){return Kb(this.__wrapped__,this.__actions__)}var A4=Ql(function(s,a,h){Ot.call(s,h)?++s[h]:Ls(s,h,1)});function O4(s,a,h){var y=Je(s)?sb:bA;return h&&gi(s,a,h)&&(a=e),y(s,Oe(a,3))}function k4(s,a){var h=Je(s)?ba:Ob;return h(s,Oe(a,3))}var P4=i_(E_),N4=i_(I_);function B4(s,a){return ii(cp(s,a),1)}function M4(s,a){return ii(cp(s,a),x)}function C4(s,a,h){return h=h===e?1:at(h),ii(cp(s,a),h)}function P_(s,a){var h=Je(s)?rn:Ea;return h(s,Oe(a,3))}function N_(s,a){var h=Je(s)?eR:Ab;return h(s,Oe(a,3))}var L4=Ql(function(s,a,h){Ot.call(s,h)?s[h].push(a):Ls(s,h,[a])});function U4(s,a,h,y){s=Ei(s)?s:Nc(s),h=h&&!y?at(h):0;var R=s.length;return h<0&&(h=zr(R+h,0)),hp(s)?h<=R&&s.indexOf(a,h)>-1:!!R&&yc(s,a,h)>-1}var D4=ft(function(s,a,h){var y=-1,R=typeof a=="function",P=Ei(s)?G(s.length):[];return Ea(s,function(M){P[++y]=R?Di(a,M,h):zu(M,a,h)}),P}),q4=Ql(function(s,a,h){Ls(s,h,a)});function cp(s,a){var h=Je(s)?mr:Cb;return h(s,Oe(a,3))}function F4(s,a,h,y){return s==null?[]:(Je(a)||(a=a==null?[]:[a]),h=y?e:h,Je(h)||(h=h==null?[]:[h]),qb(s,a,h))}var H4=Ql(function(s,a,h){s[h?0:1].push(a)},function(){return[[],[]]});function z4(s,a,h){var y=Je(s)?Hd:ub,R=arguments.length<3;return y(s,Oe(a,4),h,R,Ea)}function V4(s,a,h){var y=Je(s)?tR:ub,R=arguments.length<3;return y(s,Oe(a,4),h,R,Ab)}function j4(s,a){var h=Je(s)?ba:Ob;return h(s,lp(Oe(a,3)))}function W4(s){var a=Je(s)?Eb:UA;return a(s)}function K4(s,a,h){(h?gi(s,a,h):a===e)?a=1:a=at(a);var y=Je(s)?dA:DA;return y(s,a)}function G4(s){var a=Je(s)?mA:FA;return a(s)}function $4(s){if(s==null)return 0;if(Ei(s))return hp(s)?Sc(s):s.length;var a=ci(s);return a==st||a==vt?s.size:a0(s).length}function Y4(s,a,h){var y=Je(s)?zd:HA;return h&&gi(s,a,h)&&(a=e),y(s,Oe(a,3))}var Z4=ft(function(s,a){if(s==null)return[];var h=a.length;return h>1&&gi(s,a[0],a[1])?a=[]:h>2&&gi(a[0],a[1],a[2])&&(a=[a[0]]),qb(s,ii(a,1),[])}),up=kR||function(){return $r.Date.now()};function X4(s,a){if(typeof a!="function")throw new nn(n);return s=at(s),function(){if(--s<1)return a.apply(this,arguments)}}function B_(s,a,h){return a=h?e:a,a=s&&a==null?s.length:a,Us(s,ge,e,e,e,e,a)}function M_(s,a){var h;if(typeof a!="function")throw new nn(n);return s=at(s),function(){return--s>0&&(h=a.apply(this,arguments)),s<=1&&(a=e),h}}var k0=ft(function(s,a,h){var y=B;if(h.length){var R=ya(h,kc(k0));y|=ee}return Us(s,y,a,h,R)}),C_=ft(function(s,a,h){var y=B|U;if(h.length){var R=ya(h,kc(C_));y|=ee}return Us(a,y,s,h,R)});function L_(s,a,h){a=h?e:a;var y=Us(s,$,e,e,e,e,e,a);return y.placeholder=L_.placeholder,y}function U_(s,a,h){a=h?e:a;var y=Us(s,H,e,e,e,e,e,a);return y.placeholder=U_.placeholder,y}function D_(s,a,h){var y,R,P,M,L,F,te=0,re=!1,oe=!1,he=!0;if(typeof s!="function")throw new nn(n);a=un(a)||0,gr(h)&&(re=!!h.leading,oe="maxWait"in h,P=oe?zr(un(h.maxWait)||0,a):P,he="trailing"in h?!!h.trailing:he);function Ee(Tr){var Rn=y,zs=R;return y=R=e,te=Tr,M=s.apply(zs,Rn),M}function ke(Tr){return te=Tr,L=Gu(pt,a),re?Ee(Tr):M}function ct(Tr){var Rn=Tr-F,zs=Tr-te,i1=a-Rn;return oe?oi(i1,P-zs):i1}function Pe(Tr){var Rn=Tr-F,zs=Tr-te;return F===e||Rn>=a||Rn<0||oe&&zs>=P}function pt(){var Tr=up();if(Pe(Tr))return gt(Tr);L=Gu(pt,ct(Tr))}function gt(Tr){return L=e,he&&y?Ee(Tr):(y=R=e,M)}function zi(){L!==e&&$b(L),te=0,y=F=R=L=e}function xi(){return L===e?M:gt(up())}function Vi(){var Tr=up(),Rn=Pe(Tr);if(y=arguments,R=this,F=Tr,Rn){if(L===e)return ke(F);if(oe)return $b(L),L=Gu(pt,a),Ee(F)}return L===e&&(L=Gu(pt,a)),M}return Vi.cancel=zi,Vi.flush=xi,Vi}var J4=ft(function(s,a){return Rb(s,1,a)}),Q4=ft(function(s,a,h){return Rb(s,un(a)||0,h)});function eO(s){return Us(s,me)}function fp(s,a){if(typeof s!="function"||a!=null&&typeof a!="function")throw new nn(n);var h=function(){var y=arguments,R=a?a.apply(this,y):y[0],P=h.cache;if(P.has(R))return P.get(R);var M=s.apply(this,y);return h.cache=P.set(R,M)||P,M};return h.cache=new(fp.Cache||Cs),h}fp.Cache=Cs;function lp(s){if(typeof s!="function")throw new nn(n);return function(){var a=arguments;switch(a.length){case 0:return!s.call(this);case 1:return!s.call(this,a[0]);case 2:return!s.call(this,a[0],a[1]);case 3:return!s.call(this,a[0],a[1],a[2])}return!s.apply(this,a)}}function tO(s){return M_(2,s)}var rO=zA(function(s,a){a=a.length==1&&Je(a[0])?mr(a[0],qi(Oe())):mr(ii(a,1),qi(Oe()));var h=a.length;return ft(function(y){for(var R=-1,P=oi(y.length,h);++R<P;)y[R]=a[R].call(this,y[R]);return Di(s,this,y)})}),P0=ft(function(s,a){var h=ya(a,kc(P0));return Us(s,ee,e,a,h)}),q_=ft(function(s,a){var h=ya(a,kc(q_));return Us(s,ce,e,a,h)}),iO=Ds(function(s,a){return Us(s,Se,e,e,e,a)});function nO(s,a){if(typeof s!="function")throw new nn(n);return a=a===e?a:at(a),ft(s,a)}function sO(s,a){if(typeof s!="function")throw new nn(n);return a=a==null?0:zr(at(a),0),ft(function(h){var y=h[a],R=Ra(h,0,a);return y&&_a(R,y),Di(s,this,R)})}function aO(s,a,h){var y=!0,R=!0;if(typeof s!="function")throw new nn(n);return gr(h)&&(y="leading"in h?!!h.leading:y,R="trailing"in h?!!h.trailing:R),D_(s,a,{leading:y,maxWait:a,trailing:R})}function oO(s){return B_(s,1)}function cO(s,a){return P0(m0(a),s)}function uO(){if(!arguments.length)return[];var s=arguments[0];return Je(s)?s:[s]}function fO(s){return an(s,T)}function lO(s,a){return a=typeof a=="function"?a:e,an(s,T,a)}function pO(s){return an(s,w|T)}function hO(s,a){return a=typeof a=="function"?a:e,an(s,w|T,a)}function dO(s,a){return a==null||Tb(s,a,Yr(a))}function Tn(s,a){return s===a||s!==s&&a!==a}var mO=ip(i0),vO=ip(function(s,a){return s>=a}),Eo=Nb(function(){return arguments}())?Nb:function(s){return br(s)&&Ot.call(s,"callee")&&!xb.call(s,"callee")},Je=G.isArray,gO=Qx?qi(Qx):IA;function Ei(s){return s!=null&&pp(s.length)&&!Fs(s)}function Ir(s){return br(s)&&Ei(s)}function xO(s){return s===!0||s===!1||br(s)&&vi(s)==pe}var Aa=NR||z0,bO=eb?qi(eb):TA;function _O(s){return br(s)&&s.nodeType===1&&!$u(s)}function yO(s){if(s==null)return!0;if(Ei(s)&&(Je(s)||typeof s=="string"||typeof s.splice=="function"||Aa(s)||Pc(s)||Eo(s)))return!s.length;var a=ci(s);if(a==st||a==vt)return!s.size;if(Ku(s))return!a0(s).length;for(var h in s)if(Ot.call(s,h))return!1;return!0}function wO(s,a){return Vu(s,a)}function SO(s,a,h){h=typeof h=="function"?h:e;var y=h?h(s,a):e;return y===e?Vu(s,a,e,h):!!y}function N0(s){if(!br(s))return!1;var a=vi(s);return a==ht||a==de||typeof s.message=="string"&&typeof s.name=="string"&&!$u(s)}function EO(s){return typeof s=="number"&&_b(s)}function Fs(s){if(!gr(s))return!1;var a=vi(s);return a==St||a==Re||a==ae||a==Ve}function F_(s){return typeof s=="number"&&s==at(s)}function pp(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=S}function gr(s){var a=typeof s;return s!=null&&(a=="object"||a=="function")}function br(s){return s!=null&&typeof s=="object"}var H_=tb?qi(tb):AA;function IO(s,a){return s===a||s0(s,a,w0(a))}function TO(s,a,h){return h=typeof h=="function"?h:e,s0(s,a,w0(a),h)}function RO(s){return z_(s)&&s!=+s}function AO(s){if(l6(s))throw new He(i);return Bb(s)}function OO(s){return s===null}function kO(s){return s==null}function z_(s){return typeof s=="number"||br(s)&&vi(s)==et}function $u(s){if(!br(s)||vi(s)!=Te)return!1;var a=ql(s);if(a===null)return!0;var h=Ot.call(a,"constructor")&&a.constructor;return typeof h=="function"&&h instanceof h&&Cl.call(h)==TR}var B0=rb?qi(rb):OA;function PO(s){return F_(s)&&s>=-S&&s<=S}var V_=ib?qi(ib):kA;function hp(s){return typeof s=="string"||!Je(s)&&br(s)&&vi(s)==Me}function Hi(s){return typeof s=="symbol"||br(s)&&vi(s)==Pt}var Pc=nb?qi(nb):PA;function NO(s){return s===e}function BO(s){return br(s)&&ci(s)==Ce}function MO(s){return br(s)&&vi(s)==er}var CO=ip(o0),LO=ip(function(s,a){return s<=a});function j_(s){if(!s)return[];if(Ei(s))return hp(s)?En(s):Si(s);if(Cu&&s[Cu])return dR(s[Cu]());var a=ci(s),h=a==st?$d:a==vt?Nl:Nc;return h(s)}function Hs(s){if(!s)return s===0?s:0;if(s=un(s),s===x||s===-x){var a=s<0?-1:1;return a*b}return s===s?s:0}function at(s){var a=Hs(s),h=a%1;return a===a?h?a-h:a:0}function W_(s){return s?_o(at(s),0,d):0}function un(s){if(typeof s=="number")return s;if(Hi(s))return l;if(gr(s)){var a=typeof s.valueOf=="function"?s.valueOf():s;s=gr(a)?a+"":a}if(typeof s!="string")return s===0?s:+s;s=fb(s);var h=ws.test(s);return h||Es.test(s)?XT(s.slice(2),h?2:8):ys.test(s)?l:+s}function K_(s){return es(s,Ii(s))}function UO(s){return s?_o(at(s),-S,S):s===0?s:0}function Tt(s){return s==null?"":Fi(s)}var DO=Ac(function(s,a){if(Ku(a)||Ei(a)){es(a,Yr(a),s);return}for(var h in a)Ot.call(a,h)&&Fu(s,h,a[h])}),G_=Ac(function(s,a){es(a,Ii(a),s)}),dp=Ac(function(s,a,h,y){es(a,Ii(a),s,y)}),qO=Ac(function(s,a,h,y){es(a,Yr(a),s,y)}),FO=Ds(e0);function HO(s,a){var h=Rc(s);return a==null?h:Ib(h,a)}var zO=ft(function(s,a){s=zt(s);var h=-1,y=a.length,R=y>2?a[2]:e;for(R&&gi(a[0],a[1],R)&&(y=1);++h<y;)for(var P=a[h],M=Ii(P),L=-1,F=M.length;++L<F;){var te=M[L],re=s[te];(re===e||Tn(re,Ec[te])&&!Ot.call(s,te))&&(s[te]=P[te])}return s}),VO=ft(function(s){return s.push(e,f_),Di($_,e,s)});function jO(s,a){return ab(s,Oe(a,3),Qn)}function WO(s,a){return ab(s,Oe(a,3),r0)}function KO(s,a){return s==null?s:t0(s,Oe(a,3),Ii)}function GO(s,a){return s==null?s:kb(s,Oe(a,3),Ii)}function $O(s,a){return s&&Qn(s,Oe(a,3))}function YO(s,a){return s&&r0(s,Oe(a,3))}function ZO(s){return s==null?[]:Yl(s,Yr(s))}function XO(s){return s==null?[]:Yl(s,Ii(s))}function M0(s,a,h){var y=s==null?e:yo(s,a);return y===e?h:y}function JO(s,a){return s!=null&&h_(s,a,yA)}function C0(s,a){return s!=null&&h_(s,a,wA)}var QO=s_(function(s,a,h){a!=null&&typeof a.toString!="function"&&(a=Ll.call(a)),s[a]=h},U0(Ti)),e8=s_(function(s,a,h){a!=null&&typeof a.toString!="function"&&(a=Ll.call(a)),Ot.call(s,a)?s[a].push(h):s[a]=[h]},Oe),t8=ft(zu);function Yr(s){return Ei(s)?Sb(s):a0(s)}function Ii(s){return Ei(s)?Sb(s,!0):NA(s)}function r8(s,a){var h={};return a=Oe(a,3),Qn(s,function(y,R,P){Ls(h,a(y,R,P),y)}),h}function i8(s,a){var h={};return a=Oe(a,3),Qn(s,function(y,R,P){Ls(h,R,a(y,R,P))}),h}var n8=Ac(function(s,a,h){Zl(s,a,h)}),$_=Ac(function(s,a,h,y){Zl(s,a,h,y)}),s8=Ds(function(s,a){var h={};if(s==null)return h;var y=!1;a=mr(a,function(P){return P=Ta(P,s),y||(y=P.length>1),P}),es(s,_0(s),h),y&&(h=an(h,w|I|T,QA));for(var R=a.length;R--;)p0(h,a[R]);return h});function a8(s,a){return Y_(s,lp(Oe(a)))}var o8=Ds(function(s,a){return s==null?{}:MA(s,a)});function Y_(s,a){if(s==null)return{};var h=mr(_0(s),function(y){return[y]});return a=Oe(a),Fb(s,h,function(y,R){return a(y,R[0])})}function c8(s,a,h){a=Ta(a,s);var y=-1,R=a.length;for(R||(R=1,s=e);++y<R;){var P=s==null?e:s[ts(a[y])];P===e&&(y=R,P=h),s=Fs(P)?P.call(s):P}return s}function u8(s,a,h){return s==null?s:ju(s,a,h)}function f8(s,a,h,y){return y=typeof y=="function"?y:e,s==null?s:ju(s,a,h,y)}var Z_=c_(Yr),X_=c_(Ii);function l8(s,a,h){var y=Je(s),R=y||Aa(s)||Pc(s);if(a=Oe(a,4),h==null){var P=s&&s.constructor;R?h=y?new P:[]:gr(s)?h=Fs(P)?Rc(ql(s)):{}:h={}}return(R?rn:Qn)(s,function(M,L,F){return a(h,M,L,F)}),h}function p8(s,a){return s==null?!0:p0(s,a)}function h8(s,a,h){return s==null?s:Wb(s,a,m0(h))}function d8(s,a,h,y){return y=typeof y=="function"?y:e,s==null?s:Wb(s,a,m0(h),y)}function Nc(s){return s==null?[]:Gd(s,Yr(s))}function m8(s){return s==null?[]:Gd(s,Ii(s))}function v8(s,a,h){return h===e&&(h=a,a=e),h!==e&&(h=un(h),h=h===h?h:0),a!==e&&(a=un(a),a=a===a?a:0),_o(un(s),a,h)}function g8(s,a,h){return a=Hs(a),h===e?(h=a,a=0):h=Hs(h),s=un(s),SA(s,a,h)}function x8(s,a,h){if(h&&typeof h!="boolean"&&gi(s,a,h)&&(a=h=e),h===e&&(typeof a=="boolean"?(h=a,a=e):typeof s=="boolean"&&(h=s,s=e)),s===e&&a===e?(s=0,a=1):(s=Hs(s),a===e?(a=s,s=0):a=Hs(a)),s>a){var y=s;s=a,a=y}if(h||s%1||a%1){var R=yb();return oi(s+R*(a-s+ZT("1e-"+((R+"").length-1))),a)}return u0(s,a)}var b8=Oc(function(s,a,h){return a=a.toLowerCase(),s+(h?J_(a):a)});function J_(s){return L0(Tt(s).toLowerCase())}function Q_(s){return s=Tt(s),s&&s.replace(Ts,uR).replace(FT,"")}function _8(s,a,h){s=Tt(s),a=Fi(a);var y=s.length;h=h===e?y:_o(at(h),0,y);var R=h;return h-=a.length,h>=0&&s.slice(h,R)==a}function y8(s){return s=Tt(s),s&&ir.test(s)?s.replace(Kt,fR):s}function w8(s){return s=Tt(s),s&&$e.test(s)?s.replace(qt,"\\$&"):s}var S8=Oc(function(s,a,h){return s+(h?"-":"")+a.toLowerCase()}),E8=Oc(function(s,a,h){return s+(h?" ":"")+a.toLowerCase()}),I8=r_("toLowerCase");function T8(s,a,h){s=Tt(s),a=at(a);var y=a?Sc(s):0;if(!a||y>=a)return s;var R=(a-y)/2;return rp(Vl(R),h)+s+rp(zl(R),h)}function R8(s,a,h){s=Tt(s),a=at(a);var y=a?Sc(s):0;return a&&y<a?s+rp(a-y,h):s}function A8(s,a,h){s=Tt(s),a=at(a);var y=a?Sc(s):0;return a&&y<a?rp(a-y,h)+s:s}function O8(s,a,h){return h||a==null?a=0:a&&(a=+a),LR(Tt(s).replace(Ft,""),a||0)}function k8(s,a,h){return(h?gi(s,a,h):a===e)?a=1:a=at(a),f0(Tt(s),a)}function P8(){var s=arguments,a=Tt(s[0]);return s.length<3?a:a.replace(s[1],s[2])}var N8=Oc(function(s,a,h){return s+(h?"_":"")+a.toLowerCase()});function B8(s,a,h){return h&&typeof h!="number"&&gi(s,a,h)&&(a=h=e),h=h===e?d:h>>>0,h?(s=Tt(s),s&&(typeof a=="string"||a!=null&&!B0(a))&&(a=Fi(a),!a&&wc(s))?Ra(En(s),0,h):s.split(a,h)):[]}var M8=Oc(function(s,a,h){return s+(h?" ":"")+L0(a)});function C8(s,a,h){return s=Tt(s),h=h==null?0:_o(at(h),0,s.length),a=Fi(a),s.slice(h,h+a.length)==a}function L8(s,a,h){var y=k.templateSettings;h&&gi(s,a,h)&&(a=e),s=Tt(s),a=dp({},a,y,u_);var R=dp({},a.imports,y.imports,u_),P=Yr(R),M=Gd(R,P),L,F,te=0,re=a.interpolate||Qi,oe="__p += '",he=Yd((a.escape||Qi).source+"|"+re.source+"|"+(re===Gt?Xe:Qi).source+"|"+(a.evaluate||Qi).source+"|$","g"),Ee="//# sourceURL="+(Ot.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++WT+"]")+`
4
+ `;s.replace(he,function(Pe,pt,gt,zi,xi,Vi){return gt||(gt=zi),oe+=s.slice(te,Vi).replace(Rs,lR),pt&&(L=!0,oe+=`' +
5
+ __e(`+pt+`) +
6
+ '`),xi&&(F=!0,oe+=`';
7
7
  `+xi+`;
8
- __p += '`),xt&&(oe+=`' +
9
- ((__t = (`+xt+`)) == null ? '' : __t) +
10
- '`),te=Xi+Me.length,Me}),oe+=`';
11
- `;var Be=kt.call(o,"variable")&&o.variable;if(!Be)oe=`with (obj) {
8
+ __p += '`),gt&&(oe+=`' +
9
+ ((__t = (`+gt+`)) == null ? '' : __t) +
10
+ '`),te=Vi+Pe.length,Pe}),oe+=`';
11
+ `;var ke=Ot.call(a,"variable")&&a.variable;if(!ke)oe=`with (obj) {
12
12
  `+oe+`
13
13
  }
14
- `;else if(fr.test(Be))throw new ze(a);oe=(H?oe.replace(tr,""):oe).replace(rr,"$1").replace(Ke,"$1;"),oe="function("+(Be||"obj")+`) {
15
- `+(Be?"":`obj || (obj = {});
16
- `)+"var __t, __p = ''"+(D?", __e = _.escape":"")+(H?`, __j = Array.prototype.join;
14
+ `;else if(fr.test(ke))throw new He(o);oe=(F?oe.replace(tr,""):oe).replace(rr,"$1").replace(je,"$1;"),oe="function("+(ke||"obj")+`) {
15
+ `+(ke?"":`obj || (obj = {});
16
+ `)+"var __t, __p = ''"+(L?", __e = _.escape":"")+(F?`, __j = Array.prototype.join;
17
17
  function print() { __p += __j.call(arguments, '') }
18
18
  `:`;
19
19
  `)+oe+`return __p
20
- }`;var ft=H_(function(){return Tt(N,Ie+"return "+oe).apply(e,C)});if(ft.source=oe,tm(ft))throw ft;return ft}function YO(s){return Rt(s).toLowerCase()}function ZO(s){return Rt(s).toUpperCase()}function JO(s,o,d){if(s=Rt(s),s&&(d||o===e))return Yx(s);if(!s||!(o=Ki(o)))return s;var y=Bn(s),R=Bn(o),N=Zx(y,R),C=Jx(y,R)+1;return Oa(y,N,C).join("")}function QO(s,o,d){if(s=Rt(s),s&&(d||o===e))return s.slice(0,e1(s)+1);if(!s||!(o=Ki(o)))return s;var y=Bn(s),R=Jx(y,Bn(o))+1;return Oa(y,0,R).join("")}function e7(s,o,d){if(s=Rt(s),s&&(d||o===e))return s.replace(zt,"");if(!s||!(o=Ki(o)))return s;var y=Bn(s),R=Zx(y,Bn(o));return Oa(y,R).join("")}function t7(s,o){var d=O,y=E;if(br(o)){var R="separator"in o?o.separator:R;d="length"in o?at(o.length):d,y="omission"in o?Ki(o.omission):y}s=Rt(s);var N=s.length;if(Tc(s)){var C=Bn(s);N=C.length}if(d>=N)return s;var D=d-Ic(y);if(D<1)return y;var H=C?Oa(C,0,D).join(""):s.slice(0,D);if(R===e)return H+y;if(C&&(D+=H.length-D),rm(R)){if(s.slice(D).search(R)){var te,re=H;for(R.global||(R=b0(R.source,Rt(jt.exec(R))+"g")),R.lastIndex=0;te=R.exec(re);)var oe=te.index;H=H.slice(0,oe===e?D:oe)}}else if(s.indexOf(Ki(R),D)!=D){var de=H.lastIndexOf(R);de>-1&&(H=H.slice(0,de))}return H+y}function r7(s){return s=Rt(s),s&&Ge.test(s)?s.replace(Gt,NI):s}var i7=Pc(function(s,o,d){return s+(d?" ":"")+o.toUpperCase()}),sm=z1("toUpperCase");function F_(s,o,d){return s=Rt(s),o=d?e:o,o===e?II(s)?MI(s):gI(s):s.match(o)||[]}var H_=lt(function(s,o){try{return Vi(s,e,o)}catch(d){return tm(d)?d:new ze(d)}}),n7=Vs(function(s,o){return cn(o,function(d){d=cs(d),zs(s,d,Q0(s[d],s))}),s});function s7(s){var o=s==null?0:s.length,d=Ne();return s=o?vr(s,function(y){if(typeof y[1]!="function")throw new un(n);return[d(y[0]),y[1]]}):[],lt(function(y){for(var R=-1;++R<o;){var N=s[R];if(Vi(N[0],this,y))return Vi(N[1],this,y)}})}function a7(s){return NR(ln(s,w))}function am(s){return function(){return s}}function o7(s,o){return s==null||s!==s?o:s}var c7=V1(),u7=V1(!0);function Ai(s){return s}function om(s){return _1(typeof s=="function"?s:ln(s,w))}function f7(s){return w1(ln(s,w))}function l7(s,o){return S1(s,ln(o,w))}var p7=lt(function(s,o){return function(d){return tf(d,s,o)}}),h7=lt(function(s,o){return function(d){return tf(s,d,o)}});function cm(s,o,d){var y=Yr(o),R=bp(o,y);d==null&&!(br(o)&&(R.length||!y.length))&&(d=o,o=s,s=this,R=bp(o,Yr(o)));var N=!(br(d)&&"chain"in d)||!!d.chain,C=Ks(s);return cn(R,function(D){var H=o[D];s[D]=H,C&&(s.prototype[D]=function(){var te=this.__chain__;if(N||te){var re=s(this.__wrapped__),oe=re.__actions__=Ti(this.__actions__);return oe.push({func:H,args:arguments,thisArg:s}),re.__chain__=te,re}return H.apply(s,wa([this.value()],arguments))})}),s}function d7(){return Xr._===this&&(Xr._=FI),this}function um(){}function m7(s){return s=at(s),lt(function(o){return E1(o,s)})}var v7=F0(vr),g7=F0(Wx),b7=F0(l0);function z_(s){return G0(s)?p0(cs(s)):$R(s)}function x7(s){return function(o){return s==null?e:So(s,o)}}var _7=K1(),y7=K1(!0);function fm(){return[]}function lm(){return!1}function w7(){return{}}function S7(){return""}function E7(){return!0}function T7(s,o){if(s=at(s),s<1||s>S)return[];var d=m,y=ui(s,m);o=Ne(o),s-=m;for(var R=m0(y,o);++d<s;)o(d);return R}function I7(s){return et(s)?vr(s,cs):Gi(s)?[s]:Ti(c_(Rt(s)))}function R7(s){var o=++UI;return Rt(s)+o}var A7=Ep(function(s,o){return s+o},0),O7=H0("ceil"),k7=Ep(function(s,o){return s/o},1),N7=H0("floor");function P7(s){return s&&s.length?gp(s,Ai,I0):e}function B7(s,o){return s&&s.length?gp(s,Ne(o,2),I0):e}function M7(s){return $x(s,Ai)}function C7(s,o){return $x(s,Ne(o,2))}function L7(s){return s&&s.length?gp(s,Ai,k0):e}function D7(s,o){return s&&s.length?gp(s,Ne(o,2),k0):e}var U7=Ep(function(s,o){return s*o},1),q7=H0("round"),F7=Ep(function(s,o){return s-o},0);function H7(s){return s&&s.length?d0(s,Ai):0}function z7(s,o){return s&&s.length?d0(s,Ne(o,2)):0}return k.after=f5,k.ary=x_,k.assign=Z5,k.assignIn=B_,k.assignInWith=Dp,k.assignWith=J5,k.at=Q5,k.before=__,k.bind=Q0,k.bindAll=n7,k.bindKey=y_,k.castArray=w5,k.chain=v_,k.chunk=NA,k.compact=PA,k.concat=BA,k.cond=s7,k.conforms=a7,k.constant=am,k.countBy=H8,k.create=eO,k.curry=w_,k.curryRight=S_,k.debounce=E_,k.defaults=tO,k.defaultsDeep=rO,k.defer=l5,k.delay=p5,k.difference=MA,k.differenceBy=CA,k.differenceWith=LA,k.drop=DA,k.dropRight=UA,k.dropRightWhile=qA,k.dropWhile=FA,k.fill=HA,k.filter=j8,k.flatMap=K8,k.flatMapDeep=G8,k.flatMapDepth=$8,k.flatten=p_,k.flattenDeep=zA,k.flattenDepth=jA,k.flip=h5,k.flow=c7,k.flowRight=u7,k.fromPairs=VA,k.functions=uO,k.functionsIn=fO,k.groupBy=X8,k.initial=KA,k.intersection=GA,k.intersectionBy=$A,k.intersectionWith=XA,k.invert=pO,k.invertBy=hO,k.invokeMap=Z8,k.iteratee=om,k.keyBy=J8,k.keys=Yr,k.keysIn=Ri,k.map=Np,k.mapKeys=mO,k.mapValues=vO,k.matches=f7,k.matchesProperty=l7,k.memoize=Bp,k.merge=gO,k.mergeWith=M_,k.method=p7,k.methodOf=h7,k.mixin=cm,k.negate=Mp,k.nthArg=m7,k.omit=bO,k.omitBy=xO,k.once=d5,k.orderBy=Q8,k.over=v7,k.overArgs=m5,k.overEvery=g7,k.overSome=b7,k.partial=em,k.partialRight=T_,k.partition=e5,k.pick=_O,k.pickBy=C_,k.property=z_,k.propertyOf=x7,k.pull=QA,k.pullAll=d_,k.pullAllBy=e8,k.pullAllWith=t8,k.pullAt=r8,k.range=_7,k.rangeRight=y7,k.rearg=v5,k.reject=i5,k.remove=i8,k.rest=g5,k.reverse=Z0,k.sampleSize=s5,k.set=wO,k.setWith=SO,k.shuffle=a5,k.slice=n8,k.sortBy=u5,k.sortedUniq=l8,k.sortedUniqBy=p8,k.split=KO,k.spread=b5,k.tail=h8,k.take=d8,k.takeRight=m8,k.takeRightWhile=v8,k.takeWhile=g8,k.tap=P8,k.throttle=x5,k.thru=kp,k.toArray=k_,k.toPairs=L_,k.toPairsIn=D_,k.toPath=I7,k.toPlainObject=P_,k.transform=EO,k.unary=_5,k.union=b8,k.unionBy=x8,k.unionWith=_8,k.uniq=y8,k.uniqBy=w8,k.uniqWith=S8,k.unset=TO,k.unzip=J0,k.unzipWith=m_,k.update=IO,k.updateWith=RO,k.values=Cc,k.valuesIn=AO,k.without=E8,k.words=F_,k.wrap=y5,k.xor=T8,k.xorBy=I8,k.xorWith=R8,k.zip=A8,k.zipObject=O8,k.zipObjectDeep=k8,k.zipWith=N8,k.entries=L_,k.entriesIn=D_,k.extend=B_,k.extendWith=Dp,cm(k,k),k.add=A7,k.attempt=H_,k.camelCase=PO,k.capitalize=U_,k.ceil=O7,k.clamp=OO,k.clone=S5,k.cloneDeep=T5,k.cloneDeepWith=I5,k.cloneWith=E5,k.conformsTo=R5,k.deburr=q_,k.defaultTo=o7,k.divide=k7,k.endsWith=BO,k.eq=Cn,k.escape=MO,k.escapeRegExp=CO,k.every=z8,k.find=V8,k.findIndex=f_,k.findKey=iO,k.findLast=W8,k.findLastIndex=l_,k.findLastKey=nO,k.floor=N7,k.forEach=g_,k.forEachRight=b_,k.forIn=sO,k.forInRight=aO,k.forOwn=oO,k.forOwnRight=cO,k.get=im,k.gt=A5,k.gte=O5,k.has=lO,k.hasIn=nm,k.head=h_,k.identity=Ai,k.includes=Y8,k.indexOf=WA,k.inRange=kO,k.invoke=dO,k.isArguments=Io,k.isArray=et,k.isArrayBuffer=k5,k.isArrayLike=Ii,k.isArrayLikeObject=Tr,k.isBoolean=N5,k.isBuffer=ka,k.isDate=P5,k.isElement=B5,k.isEmpty=M5,k.isEqual=C5,k.isEqualWith=L5,k.isError=tm,k.isFinite=D5,k.isFunction=Ks,k.isInteger=I_,k.isLength=Cp,k.isMap=R_,k.isMatch=U5,k.isMatchWith=q5,k.isNaN=F5,k.isNative=H5,k.isNil=j5,k.isNull=z5,k.isNumber=A_,k.isObject=br,k.isObjectLike=_r,k.isPlainObject=cf,k.isRegExp=rm,k.isSafeInteger=V5,k.isSet=O_,k.isString=Lp,k.isSymbol=Gi,k.isTypedArray=Mc,k.isUndefined=W5,k.isWeakMap=K5,k.isWeakSet=G5,k.join=YA,k.kebabCase=LO,k.last=hn,k.lastIndexOf=ZA,k.lowerCase=DO,k.lowerFirst=UO,k.lt=$5,k.lte=X5,k.max=P7,k.maxBy=B7,k.mean=M7,k.meanBy=C7,k.min=L7,k.minBy=D7,k.stubArray=fm,k.stubFalse=lm,k.stubObject=w7,k.stubString=S7,k.stubTrue=E7,k.multiply=U7,k.nth=JA,k.noConflict=d7,k.noop=um,k.now=Pp,k.pad=qO,k.padEnd=FO,k.padStart=HO,k.parseInt=zO,k.random=NO,k.reduce=t5,k.reduceRight=r5,k.repeat=jO,k.replace=VO,k.result=yO,k.round=q7,k.runInContext=F,k.sample=n5,k.size=o5,k.snakeCase=WO,k.some=c5,k.sortedIndex=s8,k.sortedIndexBy=a8,k.sortedIndexOf=o8,k.sortedLastIndex=c8,k.sortedLastIndexBy=u8,k.sortedLastIndexOf=f8,k.startCase=GO,k.startsWith=$O,k.subtract=F7,k.sum=H7,k.sumBy=z7,k.template=XO,k.times=T7,k.toFinite=Gs,k.toInteger=at,k.toLength=N_,k.toLower=YO,k.toNumber=dn,k.toSafeInteger=Y5,k.toString=Rt,k.toUpper=ZO,k.trim=JO,k.trimEnd=QO,k.trimStart=e7,k.truncate=t7,k.unescape=r7,k.uniqueId=R7,k.upperCase=i7,k.upperFirst=sm,k.each=g_,k.eachRight=b_,k.first=h_,cm(k,function(){var s={};return as(k,function(o,d){kt.call(k.prototype,d)||(s[d]=o)}),s}(),{chain:!1}),k.VERSION=t,cn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){k[s].placeholder=k}),cn(["drop","take"],function(s,o){mt.prototype[s]=function(d){d=d===e?1:jr(at(d),0);var y=this.__filtered__&&!o?new mt(this):this.clone();return y.__filtered__?y.__takeCount__=ui(d,y.__takeCount__):y.__views__.push({size:ui(d,m),type:s+(y.__dir__<0?"Right":"")}),y},mt.prototype[s+"Right"]=function(d){return this.reverse()[s](d).reverse()}}),cn(["filter","map","takeWhile"],function(s,o){var d=o+1,y=d==p||d==g;mt.prototype[s]=function(R){var N=this.clone();return N.__iteratees__.push({iteratee:Ne(R,3),type:d}),N.__filtered__=N.__filtered__||y,N}}),cn(["head","last"],function(s,o){var d="take"+(o?"Right":"");mt.prototype[s]=function(){return this[d](1).value()[0]}}),cn(["initial","tail"],function(s,o){var d="drop"+(o?"":"Right");mt.prototype[s]=function(){return this.__filtered__?new mt(this):this[d](1)}}),mt.prototype.compact=function(){return this.filter(Ai)},mt.prototype.find=function(s){return this.filter(s).head()},mt.prototype.findLast=function(s){return this.reverse().find(s)},mt.prototype.invokeMap=lt(function(s,o){return typeof s=="function"?new mt(this):this.map(function(d){return tf(d,s,o)})}),mt.prototype.reject=function(s){return this.filter(Mp(Ne(s)))},mt.prototype.slice=function(s,o){s=at(s);var d=this;return d.__filtered__&&(s>0||o<0)?new mt(d):(s<0?d=d.takeRight(-s):s&&(d=d.drop(s)),o!==e&&(o=at(o),d=o<0?d.dropRight(-o):d.take(o-s)),d)},mt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},mt.prototype.toArray=function(){return this.take(m)},as(mt.prototype,function(s,o){var d=/^(?:filter|find|map|reject)|While$/.test(o),y=/^(?:head|last)$/.test(o),R=k[y?"take"+(o=="last"?"Right":""):o],N=y||/^find/.test(o);R&&(k.prototype[o]=function(){var C=this.__wrapped__,D=y?[1]:arguments,H=C instanceof mt,te=D[0],re=H||et(C),oe=function(ht){var xt=R.apply(k,wa([ht],D));return y&&de?xt[0]:xt};re&&d&&typeof te=="function"&&te.length!=1&&(H=re=!1);var de=this.__chain__,Ie=!!this.__actions__.length,Be=N&&!de,ft=H&&!Ie;if(!N&&re){C=ft?C:new mt(this);var Me=s.apply(C,D);return Me.__actions__.push({func:kp,args:[oe],thisArg:e}),new fn(Me,de)}return Be&&ft?s.apply(this,D):(Me=this.thru(oe),Be?y?Me.value()[0]:Me.value():Me)})}),cn(["pop","push","shift","sort","splice","unshift"],function(s){var o=rp[s],d=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",y=/^(?:pop|shift)$/.test(s);k.prototype[s]=function(){var R=arguments;if(y&&!this.__chain__){var N=this.value();return o.apply(et(N)?N:[],R)}return this[d](function(C){return o.apply(et(C)?C:[],R)})}}),as(mt.prototype,function(s,o){var d=k[o];if(d){var y=d.name+"";kt.call(Oc,y)||(Oc[y]=[]),Oc[y].push({name:o,func:d})}}),Oc[Sp(e,L).name]=[{name:"wrapper",func:e}],mt.prototype.clone=rR,mt.prototype.reverse=iR,mt.prototype.value=nR,k.prototype.at=B8,k.prototype.chain=M8,k.prototype.commit=C8,k.prototype.next=L8,k.prototype.plant=U8,k.prototype.reverse=q8,k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=F8,k.prototype.first=k.prototype.head,$u&&(k.prototype[$u]=D8),k},Ea=CI();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Xr._=Ea,define(function(){return Ea})):bo?((bo.exports=Ea)._=Ea,o0._=Ea):Xr._=Ea}).call(Lc)});var W_=V((hH,X7)=>{X7.exports={name:"bitcore-lib",version:"10.0.28",description:"A pure and powerful JavaScript Bitcoin library.",author:"BitPay <dev@bitpay.com>",main:"index.js",scripts:{test:"gulp test","test:ci":"npm run test",coverage:"gulp coverage",build:"gulp",pub:"npm run build && npm publish"},keywords:["bitcoin","transaction","address","p2p","ecies","cryptocurrency","blockchain","payment","bip21","bip32","bip37","bip69","bip70","multisig"],repository:{type:"git",url:"https://github.com/bitpay/bitcore/tree/master/packages/bitcore-lib"},browser:{request:"browser-request"},dependencies:{bech32:"=2.0.0","bip-schnorr":"=0.6.4","bn.js":"=4.11.8",bs58:"^4.0.1","buffer-compare":"=1.1.1",elliptic:"^6.5.3",inherits:"=2.0.1",lodash:"^4.17.20"},devDependencies:{"bitcore-build":"^10.0.21",brfs:"^2.0.1",chai:"^4.2.0",gulp:"^4.0.0",sinon:"^7.1.1"},license:"MIT",gitHead:"c47030e29c2ef353b41955d78fd0ca5c8422c590"}});var hm=V((K_,pm)=>{(function(e,t){"use strict";function r(E,f){if(!E)throw new Error(f||"Assertion failed")}function i(E,f){E.super_=f;var c=function(){};c.prototype=f.prototype,E.prototype=new c,E.prototype.constructor=E}function n(E,f,c){if(n.isBN(E))return E;this.negative=0,this.words=null,this.length=0,this.red=null,E!==null&&((f==="le"||f==="be")&&(c=f,f=10),this._init(E||0,f||10,c||"be"))}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var a;try{a=require("buffer").Buffer}catch{}n.isBN=function(f){return f instanceof n?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===n.wordSize&&Array.isArray(f.words)},n.max=function(f,c){return f.cmp(c)>0?f:c},n.min=function(f,c){return f.cmp(c)<0?f:c},n.prototype._init=function(f,c,p){if(typeof f=="number")return this._initNumber(f,c,p);if(typeof f=="object")return this._initArray(f,c,p);c==="hex"&&(c=16),r(c===(c|0)&&c>=2&&c<=36),f=f.toString().replace(/\s+/g,"");var v=0;f[0]==="-"&&v++,c===16?this._parseHex(f,v):this._parseBase(f,c,v),f[0]==="-"&&(this.negative=1),this.strip(),p==="le"&&this._initArray(this.toArray(),c,p)},n.prototype._initNumber=function(f,c,p){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(r(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),p==="le"&&this._initArray(this.toArray(),c,p)},n.prototype._initArray=function(f,c,p){if(r(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var v=0;v<this.length;v++)this.words[v]=0;var g,x,S=0;if(p==="be")for(v=f.length-1,g=0;v>=0;v-=3)x=f[v]|f[v-1]<<8|f[v-2]<<16,this.words[g]|=x<<S&67108863,this.words[g+1]=x>>>26-S&67108863,S+=24,S>=26&&(S-=26,g++);else if(p==="le")for(v=0,g=0;v<f.length;v+=3)x=f[v]|f[v+1]<<8|f[v+2]<<16,this.words[g]|=x<<S&67108863,this.words[g+1]=x>>>26-S&67108863,S+=24,S>=26&&(S-=26,g++);return this.strip()};function u(E,f,c){for(var p=0,v=Math.min(E.length,c),g=f;g<v;g++){var x=E.charCodeAt(g)-48;p<<=4,x>=49&&x<=54?p|=x-49+10:x>=17&&x<=22?p|=x-17+10:p|=x&15}return p}n.prototype._parseHex=function(f,c){this.length=Math.ceil((f.length-c)/6),this.words=new Array(this.length);for(var p=0;p<this.length;p++)this.words[p]=0;var v,g,x=0;for(p=f.length-6,v=0;p>=c;p-=6)g=u(f,p,p+6),this.words[v]|=g<<x&67108863,this.words[v+1]|=g>>>26-x&4194303,x+=24,x>=26&&(x-=26,v++);p+6!==c&&(g=u(f,c,p+6),this.words[v]|=g<<x&67108863,this.words[v+1]|=g>>>26-x&4194303),this.strip()};function h(E,f,c,p){for(var v=0,g=Math.min(E.length,c),x=f;x<g;x++){var S=E.charCodeAt(x)-48;v*=p,S>=49?v+=S-49+10:S>=17?v+=S-17+10:v+=S}return v}n.prototype._parseBase=function(f,c,p){this.words=[0],this.length=1;for(var v=0,g=1;g<=67108863;g*=c)v++;v--,g=g/c|0;for(var x=f.length-p,S=x%v,_=Math.min(x,x-S)+p,l=0,m=p;m<_;m+=v)l=h(f,m,m+v,c),this.imuln(g),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(S!==0){var A=1;for(l=h(f,m,f.length,c),m=0;m<S;m++)A*=c;this.imuln(A),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},n.prototype.copy=function(f){f.words=new Array(this.length);for(var c=0;c<this.length;c++)f.words[c]=this.words[c];f.length=this.length,f.negative=this.negative,f.red=this.red},n.prototype.clone=function(){var f=new n(null);return this.copy(f),f},n.prototype._expand=function(f){for(;this.length<f;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var b=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(f,c){f=f||10,c=c|0||1;var p;if(f===16||f==="hex"){p="";for(var v=0,g=0,x=0;x<this.length;x++){var S=this.words[x],_=((S<<v|g)&16777215).toString(16);g=S>>>24-v&16777215,g!==0||x!==this.length-1?p=b[6-_.length]+_+p:p=_+p,v+=2,v>=26&&(v-=26,x--)}for(g!==0&&(p=g.toString(16)+p);p.length%c!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}if(f===(f|0)&&f>=2&&f<=36){var l=w[f],m=T[f];p="";var A=this.clone();for(A.negative=0;!A.isZero();){var U=A.modn(m).toString(f);A=A.idivn(m),A.isZero()?p=U+p:p=b[l-U.length]+U+p}for(this.isZero()&&(p="0"+p);p.length%c!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(f,c){return r(typeof a<"u"),this.toArrayLike(a,f,c)},n.prototype.toArray=function(f,c){return this.toArrayLike(Array,f,c)},n.prototype.toArrayLike=function(f,c,p){var v=this.byteLength(),g=p||Math.max(1,v);r(v<=g,"byte array longer than desired length"),r(g>0,"Requested array length <= 0"),this.strip();var x=c==="le",S=new f(g),_,l,m=this.clone();if(x){for(l=0;!m.isZero();l++)_=m.andln(255),m.iushrn(8),S[l]=_;for(;l<g;l++)S[l]=0}else{for(l=0;l<g-v;l++)S[l]=0;for(l=0;!m.isZero();l++)_=m.andln(255),m.iushrn(8),S[g-l-1]=_}return S},Math.clz32?n.prototype._countBits=function(f){return 32-Math.clz32(f)}:n.prototype._countBits=function(f){var c=f,p=0;return c>=4096&&(p+=13,c>>>=13),c>=64&&(p+=7,c>>>=7),c>=8&&(p+=4,c>>>=4),c>=2&&(p+=2,c>>>=2),p+c},n.prototype._zeroBits=function(f){if(f===0)return 26;var c=f,p=0;return c&8191||(p+=13,c>>>=13),c&127||(p+=7,c>>>=7),c&15||(p+=4,c>>>=4),c&3||(p+=2,c>>>=2),c&1||p++,p},n.prototype.bitLength=function(){var f=this.words[this.length-1],c=this._countBits(f);return(this.length-1)*26+c};function I(E){for(var f=new Array(E.bitLength()),c=0;c<f.length;c++){var p=c/26|0,v=c%26;f[c]=(E.words[p]&1<<v)>>>v}return f}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,c=0;c<this.length;c++){var p=this._zeroBits(this.words[c]);if(f+=p,p!==26)break}return f},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},n.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var c=0;c<f.length;c++)this.words[c]=this.words[c]|f.words[c];return this.strip()},n.prototype.ior=function(f){return r((this.negative|f.negative)===0),this.iuor(f)},n.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},n.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},n.prototype.iuand=function(f){var c;this.length>f.length?c=f:c=this;for(var p=0;p<c.length;p++)this.words[p]=this.words[p]&f.words[p];return this.length=c.length,this.strip()},n.prototype.iand=function(f){return r((this.negative|f.negative)===0),this.iuand(f)},n.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},n.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},n.prototype.iuxor=function(f){var c,p;this.length>f.length?(c=this,p=f):(c=f,p=this);for(var v=0;v<p.length;v++)this.words[v]=c.words[v]^p.words[v];if(this!==c)for(;v<c.length;v++)this.words[v]=c.words[v];return this.length=c.length,this.strip()},n.prototype.ixor=function(f){return r((this.negative|f.negative)===0),this.iuxor(f)},n.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},n.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},n.prototype.inotn=function(f){r(typeof f=="number"&&f>=0);var c=Math.ceil(f/26)|0,p=f%26;this._expand(c),p>0&&c--;for(var v=0;v<c;v++)this.words[v]=~this.words[v]&67108863;return p>0&&(this.words[v]=~this.words[v]&67108863>>26-p),this.strip()},n.prototype.notn=function(f){return this.clone().inotn(f)},n.prototype.setn=function(f,c){r(typeof f=="number"&&f>=0);var p=f/26|0,v=f%26;return this._expand(p+1),c?this.words[p]=this.words[p]|1<<v:this.words[p]=this.words[p]&~(1<<v),this.strip()},n.prototype.iadd=function(f){var c;if(this.negative!==0&&f.negative===0)return this.negative=0,c=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,c=this.isub(f),f.negative=1,c._normSign();var p,v;this.length>f.length?(p=this,v=f):(p=f,v=this);for(var g=0,x=0;x<v.length;x++)c=(p.words[x]|0)+(v.words[x]|0)+g,this.words[x]=c&67108863,g=c>>>26;for(;g!==0&&x<p.length;x++)c=(p.words[x]|0)+g,this.words[x]=c&67108863,g=c>>>26;if(this.length=p.length,g!==0)this.words[this.length]=g,this.length++;else if(p!==this)for(;x<p.length;x++)this.words[x]=p.words[x];return this},n.prototype.add=function(f){var c;return f.negative!==0&&this.negative===0?(f.negative=0,c=this.sub(f),f.negative^=1,c):f.negative===0&&this.negative!==0?(this.negative=0,c=f.sub(this),this.negative=1,c):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},n.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var c=this.iadd(f);return f.negative=1,c._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var p=this.cmp(f);if(p===0)return this.negative=0,this.length=1,this.words[0]=0,this;var v,g;p>0?(v=this,g=f):(v=f,g=this);for(var x=0,S=0;S<g.length;S++)c=(v.words[S]|0)-(g.words[S]|0)+x,x=c>>26,this.words[S]=c&67108863;for(;x!==0&&S<v.length;S++)c=(v.words[S]|0)+x,x=c>>26,this.words[S]=c&67108863;if(x===0&&S<v.length&&v!==this)for(;S<v.length;S++)this.words[S]=v.words[S];return this.length=Math.max(this.length,S),v!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(f){return this.clone().isub(f)};function B(E,f,c){c.negative=f.negative^E.negative;var p=E.length+f.length|0;c.length=p,p=p-1|0;var v=E.words[0]|0,g=f.words[0]|0,x=v*g,S=x&67108863,_=x/67108864|0;c.words[0]=S;for(var l=1;l<p;l++){for(var m=_>>>26,A=_&67108863,U=Math.min(l,f.length-1),j=Math.max(0,l-E.length+1);j<=U;j++){var Z=l-j|0;v=E.words[Z]|0,g=f.words[j]|0,x=v*g+A,m+=x/67108864|0,A=x&67108863}c.words[l]=A|0,_=m|0}return _!==0?c.words[l]=_|0:c.length--,c.strip()}var M=function(f,c,p){var v=f.words,g=c.words,x=p.words,S=0,_,l,m,A=v[0]|0,U=A&8191,j=A>>>13,Z=v[1]|0,se=Z&8191,ae=Z>>>13,he=v[2]|0,Ee=he&8191,me=he>>>13,dt=v[3]|0,St=dt&8191,Oe=dt>>>13,st=v[4]|0,rt=st&8191,Re=st>>>13,Ae=v[5]|0,Kt=Ae&8191,We=Ae>>>13,At=v[6]|0,bt=At&8191,De=At>>>13,Pt=v[7]|0,Qt=Pt&8191,Ue=Pt>>>13,er=v[8]|0,Ot=er&8191,Le=er>>>13,Ct=v[9]|0,Lt=Ct&8191,qe=Ct>>>13,Dt=g[0]|0,Ut=Dt&8191,Fe=Dt>>>13,qt=g[1]|0,Ft=qt&8191,He=qt>>>13,tr=g[2]|0,rr=tr&8191,Ke=tr>>>13,Gt=g[3]|0,$t=Gt&8191,Ge=Gt>>>13,ir=g[4]|0,nr=ir&8191,$e=ir>>>13,Xt=g[5]|0,sr=Xt&8191,Xe=Xt>>>13,ar=g[6]|0,Ht=ar&8191,Ye=ar>>>13,zt=g[7]|0,or=zt&8191,Ze=zt>>>13,cr=g[8]|0,ur=cr&8191,Je=cr>>>13,fr=g[9]|0,lr=fr&8191,Qe=fr>>>13;p.negative=f.negative^c.negative,p.length=19,_=Math.imul(U,Ut),l=Math.imul(U,Fe),l=l+Math.imul(j,Ut)|0,m=Math.imul(j,Fe);var jt=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(jt>>>26)|0,jt&=67108863,_=Math.imul(se,Ut),l=Math.imul(se,Fe),l=l+Math.imul(ae,Ut)|0,m=Math.imul(ae,Fe),_=_+Math.imul(U,Ft)|0,l=l+Math.imul(U,He)|0,l=l+Math.imul(j,Ft)|0,m=m+Math.imul(j,He)|0;var Rs=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Rs>>>26)|0,Rs&=67108863,_=Math.imul(Ee,Ut),l=Math.imul(Ee,Fe),l=l+Math.imul(me,Ut)|0,m=Math.imul(me,Fe),_=_+Math.imul(se,Ft)|0,l=l+Math.imul(se,He)|0,l=l+Math.imul(ae,Ft)|0,m=m+Math.imul(ae,He)|0,_=_+Math.imul(U,rr)|0,l=l+Math.imul(U,Ke)|0,l=l+Math.imul(j,rr)|0,m=m+Math.imul(j,Ke)|0;var As=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(As>>>26)|0,As&=67108863,_=Math.imul(St,Ut),l=Math.imul(St,Fe),l=l+Math.imul(Oe,Ut)|0,m=Math.imul(Oe,Fe),_=_+Math.imul(Ee,Ft)|0,l=l+Math.imul(Ee,He)|0,l=l+Math.imul(me,Ft)|0,m=m+Math.imul(me,He)|0,_=_+Math.imul(se,rr)|0,l=l+Math.imul(se,Ke)|0,l=l+Math.imul(ae,rr)|0,m=m+Math.imul(ae,Ke)|0,_=_+Math.imul(U,$t)|0,l=l+Math.imul(U,Ge)|0,l=l+Math.imul(j,$t)|0,m=m+Math.imul(j,Ge)|0;var Os=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Os>>>26)|0,Os&=67108863,_=Math.imul(rt,Ut),l=Math.imul(rt,Fe),l=l+Math.imul(Re,Ut)|0,m=Math.imul(Re,Fe),_=_+Math.imul(St,Ft)|0,l=l+Math.imul(St,He)|0,l=l+Math.imul(Oe,Ft)|0,m=m+Math.imul(Oe,He)|0,_=_+Math.imul(Ee,rr)|0,l=l+Math.imul(Ee,Ke)|0,l=l+Math.imul(me,rr)|0,m=m+Math.imul(me,Ke)|0,_=_+Math.imul(se,$t)|0,l=l+Math.imul(se,Ge)|0,l=l+Math.imul(ae,$t)|0,m=m+Math.imul(ae,Ge)|0,_=_+Math.imul(U,nr)|0,l=l+Math.imul(U,$e)|0,l=l+Math.imul(j,nr)|0,m=m+Math.imul(j,$e)|0;var ks=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(ks>>>26)|0,ks&=67108863,_=Math.imul(Kt,Ut),l=Math.imul(Kt,Fe),l=l+Math.imul(We,Ut)|0,m=Math.imul(We,Fe),_=_+Math.imul(rt,Ft)|0,l=l+Math.imul(rt,He)|0,l=l+Math.imul(Re,Ft)|0,m=m+Math.imul(Re,He)|0,_=_+Math.imul(St,rr)|0,l=l+Math.imul(St,Ke)|0,l=l+Math.imul(Oe,rr)|0,m=m+Math.imul(Oe,Ke)|0,_=_+Math.imul(Ee,$t)|0,l=l+Math.imul(Ee,Ge)|0,l=l+Math.imul(me,$t)|0,m=m+Math.imul(me,Ge)|0,_=_+Math.imul(se,nr)|0,l=l+Math.imul(se,$e)|0,l=l+Math.imul(ae,nr)|0,m=m+Math.imul(ae,$e)|0,_=_+Math.imul(U,sr)|0,l=l+Math.imul(U,Xe)|0,l=l+Math.imul(j,sr)|0,m=m+Math.imul(j,Xe)|0;var Ns=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Ns>>>26)|0,Ns&=67108863,_=Math.imul(bt,Ut),l=Math.imul(bt,Fe),l=l+Math.imul(De,Ut)|0,m=Math.imul(De,Fe),_=_+Math.imul(Kt,Ft)|0,l=l+Math.imul(Kt,He)|0,l=l+Math.imul(We,Ft)|0,m=m+Math.imul(We,He)|0,_=_+Math.imul(rt,rr)|0,l=l+Math.imul(rt,Ke)|0,l=l+Math.imul(Re,rr)|0,m=m+Math.imul(Re,Ke)|0,_=_+Math.imul(St,$t)|0,l=l+Math.imul(St,Ge)|0,l=l+Math.imul(Oe,$t)|0,m=m+Math.imul(Oe,Ge)|0,_=_+Math.imul(Ee,nr)|0,l=l+Math.imul(Ee,$e)|0,l=l+Math.imul(me,nr)|0,m=m+Math.imul(me,$e)|0,_=_+Math.imul(se,sr)|0,l=l+Math.imul(se,Xe)|0,l=l+Math.imul(ae,sr)|0,m=m+Math.imul(ae,Xe)|0,_=_+Math.imul(U,Ht)|0,l=l+Math.imul(U,Ye)|0,l=l+Math.imul(j,Ht)|0,m=m+Math.imul(j,Ye)|0;var Ps=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Ps>>>26)|0,Ps&=67108863,_=Math.imul(Qt,Ut),l=Math.imul(Qt,Fe),l=l+Math.imul(Ue,Ut)|0,m=Math.imul(Ue,Fe),_=_+Math.imul(bt,Ft)|0,l=l+Math.imul(bt,He)|0,l=l+Math.imul(De,Ft)|0,m=m+Math.imul(De,He)|0,_=_+Math.imul(Kt,rr)|0,l=l+Math.imul(Kt,Ke)|0,l=l+Math.imul(We,rr)|0,m=m+Math.imul(We,Ke)|0,_=_+Math.imul(rt,$t)|0,l=l+Math.imul(rt,Ge)|0,l=l+Math.imul(Re,$t)|0,m=m+Math.imul(Re,Ge)|0,_=_+Math.imul(St,nr)|0,l=l+Math.imul(St,$e)|0,l=l+Math.imul(Oe,nr)|0,m=m+Math.imul(Oe,$e)|0,_=_+Math.imul(Ee,sr)|0,l=l+Math.imul(Ee,Xe)|0,l=l+Math.imul(me,sr)|0,m=m+Math.imul(me,Xe)|0,_=_+Math.imul(se,Ht)|0,l=l+Math.imul(se,Ye)|0,l=l+Math.imul(ae,Ht)|0,m=m+Math.imul(ae,Ye)|0,_=_+Math.imul(U,or)|0,l=l+Math.imul(U,Ze)|0,l=l+Math.imul(j,or)|0,m=m+Math.imul(j,Ze)|0;var sn=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(sn>>>26)|0,sn&=67108863,_=Math.imul(Ot,Ut),l=Math.imul(Ot,Fe),l=l+Math.imul(Le,Ut)|0,m=Math.imul(Le,Fe),_=_+Math.imul(Qt,Ft)|0,l=l+Math.imul(Qt,He)|0,l=l+Math.imul(Ue,Ft)|0,m=m+Math.imul(Ue,He)|0,_=_+Math.imul(bt,rr)|0,l=l+Math.imul(bt,Ke)|0,l=l+Math.imul(De,rr)|0,m=m+Math.imul(De,Ke)|0,_=_+Math.imul(Kt,$t)|0,l=l+Math.imul(Kt,Ge)|0,l=l+Math.imul(We,$t)|0,m=m+Math.imul(We,Ge)|0,_=_+Math.imul(rt,nr)|0,l=l+Math.imul(rt,$e)|0,l=l+Math.imul(Re,nr)|0,m=m+Math.imul(Re,$e)|0,_=_+Math.imul(St,sr)|0,l=l+Math.imul(St,Xe)|0,l=l+Math.imul(Oe,sr)|0,m=m+Math.imul(Oe,Xe)|0,_=_+Math.imul(Ee,Ht)|0,l=l+Math.imul(Ee,Ye)|0,l=l+Math.imul(me,Ht)|0,m=m+Math.imul(me,Ye)|0,_=_+Math.imul(se,or)|0,l=l+Math.imul(se,Ze)|0,l=l+Math.imul(ae,or)|0,m=m+Math.imul(ae,Ze)|0,_=_+Math.imul(U,ur)|0,l=l+Math.imul(U,Je)|0,l=l+Math.imul(j,ur)|0,m=m+Math.imul(j,Je)|0;var Bs=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,_=Math.imul(Lt,Ut),l=Math.imul(Lt,Fe),l=l+Math.imul(qe,Ut)|0,m=Math.imul(qe,Fe),_=_+Math.imul(Ot,Ft)|0,l=l+Math.imul(Ot,He)|0,l=l+Math.imul(Le,Ft)|0,m=m+Math.imul(Le,He)|0,_=_+Math.imul(Qt,rr)|0,l=l+Math.imul(Qt,Ke)|0,l=l+Math.imul(Ue,rr)|0,m=m+Math.imul(Ue,Ke)|0,_=_+Math.imul(bt,$t)|0,l=l+Math.imul(bt,Ge)|0,l=l+Math.imul(De,$t)|0,m=m+Math.imul(De,Ge)|0,_=_+Math.imul(Kt,nr)|0,l=l+Math.imul(Kt,$e)|0,l=l+Math.imul(We,nr)|0,m=m+Math.imul(We,$e)|0,_=_+Math.imul(rt,sr)|0,l=l+Math.imul(rt,Xe)|0,l=l+Math.imul(Re,sr)|0,m=m+Math.imul(Re,Xe)|0,_=_+Math.imul(St,Ht)|0,l=l+Math.imul(St,Ye)|0,l=l+Math.imul(Oe,Ht)|0,m=m+Math.imul(Oe,Ye)|0,_=_+Math.imul(Ee,or)|0,l=l+Math.imul(Ee,Ze)|0,l=l+Math.imul(me,or)|0,m=m+Math.imul(me,Ze)|0,_=_+Math.imul(se,ur)|0,l=l+Math.imul(se,Je)|0,l=l+Math.imul(ae,ur)|0,m=m+Math.imul(ae,Je)|0,_=_+Math.imul(U,lr)|0,l=l+Math.imul(U,Qe)|0,l=l+Math.imul(j,lr)|0,m=m+Math.imul(j,Qe)|0;var an=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(an>>>26)|0,an&=67108863,_=Math.imul(Lt,Ft),l=Math.imul(Lt,He),l=l+Math.imul(qe,Ft)|0,m=Math.imul(qe,He),_=_+Math.imul(Ot,rr)|0,l=l+Math.imul(Ot,Ke)|0,l=l+Math.imul(Le,rr)|0,m=m+Math.imul(Le,Ke)|0,_=_+Math.imul(Qt,$t)|0,l=l+Math.imul(Qt,Ge)|0,l=l+Math.imul(Ue,$t)|0,m=m+Math.imul(Ue,Ge)|0,_=_+Math.imul(bt,nr)|0,l=l+Math.imul(bt,$e)|0,l=l+Math.imul(De,nr)|0,m=m+Math.imul(De,$e)|0,_=_+Math.imul(Kt,sr)|0,l=l+Math.imul(Kt,Xe)|0,l=l+Math.imul(We,sr)|0,m=m+Math.imul(We,Xe)|0,_=_+Math.imul(rt,Ht)|0,l=l+Math.imul(rt,Ye)|0,l=l+Math.imul(Re,Ht)|0,m=m+Math.imul(Re,Ye)|0,_=_+Math.imul(St,or)|0,l=l+Math.imul(St,Ze)|0,l=l+Math.imul(Oe,or)|0,m=m+Math.imul(Oe,Ze)|0,_=_+Math.imul(Ee,ur)|0,l=l+Math.imul(Ee,Je)|0,l=l+Math.imul(me,ur)|0,m=m+Math.imul(me,Je)|0,_=_+Math.imul(se,lr)|0,l=l+Math.imul(se,Qe)|0,l=l+Math.imul(ae,lr)|0,m=m+Math.imul(ae,Qe)|0;var Ms=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,_=Math.imul(Lt,rr),l=Math.imul(Lt,Ke),l=l+Math.imul(qe,rr)|0,m=Math.imul(qe,Ke),_=_+Math.imul(Ot,$t)|0,l=l+Math.imul(Ot,Ge)|0,l=l+Math.imul(Le,$t)|0,m=m+Math.imul(Le,Ge)|0,_=_+Math.imul(Qt,nr)|0,l=l+Math.imul(Qt,$e)|0,l=l+Math.imul(Ue,nr)|0,m=m+Math.imul(Ue,$e)|0,_=_+Math.imul(bt,sr)|0,l=l+Math.imul(bt,Xe)|0,l=l+Math.imul(De,sr)|0,m=m+Math.imul(De,Xe)|0,_=_+Math.imul(Kt,Ht)|0,l=l+Math.imul(Kt,Ye)|0,l=l+Math.imul(We,Ht)|0,m=m+Math.imul(We,Ye)|0,_=_+Math.imul(rt,or)|0,l=l+Math.imul(rt,Ze)|0,l=l+Math.imul(Re,or)|0,m=m+Math.imul(Re,Ze)|0,_=_+Math.imul(St,ur)|0,l=l+Math.imul(St,Je)|0,l=l+Math.imul(Oe,ur)|0,m=m+Math.imul(Oe,Je)|0,_=_+Math.imul(Ee,lr)|0,l=l+Math.imul(Ee,Qe)|0,l=l+Math.imul(me,lr)|0,m=m+Math.imul(me,Qe)|0;var Cs=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Cs>>>26)|0,Cs&=67108863,_=Math.imul(Lt,$t),l=Math.imul(Lt,Ge),l=l+Math.imul(qe,$t)|0,m=Math.imul(qe,Ge),_=_+Math.imul(Ot,nr)|0,l=l+Math.imul(Ot,$e)|0,l=l+Math.imul(Le,nr)|0,m=m+Math.imul(Le,$e)|0,_=_+Math.imul(Qt,sr)|0,l=l+Math.imul(Qt,Xe)|0,l=l+Math.imul(Ue,sr)|0,m=m+Math.imul(Ue,Xe)|0,_=_+Math.imul(bt,Ht)|0,l=l+Math.imul(bt,Ye)|0,l=l+Math.imul(De,Ht)|0,m=m+Math.imul(De,Ye)|0,_=_+Math.imul(Kt,or)|0,l=l+Math.imul(Kt,Ze)|0,l=l+Math.imul(We,or)|0,m=m+Math.imul(We,Ze)|0,_=_+Math.imul(rt,ur)|0,l=l+Math.imul(rt,Je)|0,l=l+Math.imul(Re,ur)|0,m=m+Math.imul(Re,Je)|0,_=_+Math.imul(St,lr)|0,l=l+Math.imul(St,Qe)|0,l=l+Math.imul(Oe,lr)|0,m=m+Math.imul(Oe,Qe)|0;var Ls=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Ls>>>26)|0,Ls&=67108863,_=Math.imul(Lt,nr),l=Math.imul(Lt,$e),l=l+Math.imul(qe,nr)|0,m=Math.imul(qe,$e),_=_+Math.imul(Ot,sr)|0,l=l+Math.imul(Ot,Xe)|0,l=l+Math.imul(Le,sr)|0,m=m+Math.imul(Le,Xe)|0,_=_+Math.imul(Qt,Ht)|0,l=l+Math.imul(Qt,Ye)|0,l=l+Math.imul(Ue,Ht)|0,m=m+Math.imul(Ue,Ye)|0,_=_+Math.imul(bt,or)|0,l=l+Math.imul(bt,Ze)|0,l=l+Math.imul(De,or)|0,m=m+Math.imul(De,Ze)|0,_=_+Math.imul(Kt,ur)|0,l=l+Math.imul(Kt,Je)|0,l=l+Math.imul(We,ur)|0,m=m+Math.imul(We,Je)|0,_=_+Math.imul(rt,lr)|0,l=l+Math.imul(rt,Qe)|0,l=l+Math.imul(Re,lr)|0,m=m+Math.imul(Re,Qe)|0;var is=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(is>>>26)|0,is&=67108863,_=Math.imul(Lt,sr),l=Math.imul(Lt,Xe),l=l+Math.imul(qe,sr)|0,m=Math.imul(qe,Xe),_=_+Math.imul(Ot,Ht)|0,l=l+Math.imul(Ot,Ye)|0,l=l+Math.imul(Le,Ht)|0,m=m+Math.imul(Le,Ye)|0,_=_+Math.imul(Qt,or)|0,l=l+Math.imul(Qt,Ze)|0,l=l+Math.imul(Ue,or)|0,m=m+Math.imul(Ue,Ze)|0,_=_+Math.imul(bt,ur)|0,l=l+Math.imul(bt,Je)|0,l=l+Math.imul(De,ur)|0,m=m+Math.imul(De,Je)|0,_=_+Math.imul(Kt,lr)|0,l=l+Math.imul(Kt,Qe)|0,l=l+Math.imul(We,lr)|0,m=m+Math.imul(We,Qe)|0;var ns=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(ns>>>26)|0,ns&=67108863,_=Math.imul(Lt,Ht),l=Math.imul(Lt,Ye),l=l+Math.imul(qe,Ht)|0,m=Math.imul(qe,Ye),_=_+Math.imul(Ot,or)|0,l=l+Math.imul(Ot,Ze)|0,l=l+Math.imul(Le,or)|0,m=m+Math.imul(Le,Ze)|0,_=_+Math.imul(Qt,ur)|0,l=l+Math.imul(Qt,Je)|0,l=l+Math.imul(Ue,ur)|0,m=m+Math.imul(Ue,Je)|0,_=_+Math.imul(bt,lr)|0,l=l+Math.imul(bt,Qe)|0,l=l+Math.imul(De,lr)|0,m=m+Math.imul(De,Qe)|0;var ss=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(ss>>>26)|0,ss&=67108863,_=Math.imul(Lt,or),l=Math.imul(Lt,Ze),l=l+Math.imul(qe,or)|0,m=Math.imul(qe,Ze),_=_+Math.imul(Ot,ur)|0,l=l+Math.imul(Ot,Je)|0,l=l+Math.imul(Le,ur)|0,m=m+Math.imul(Le,Je)|0,_=_+Math.imul(Qt,lr)|0,l=l+Math.imul(Qt,Qe)|0,l=l+Math.imul(Ue,lr)|0,m=m+Math.imul(Ue,Qe)|0;var Ds=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Ds>>>26)|0,Ds&=67108863,_=Math.imul(Lt,ur),l=Math.imul(Lt,Je),l=l+Math.imul(qe,ur)|0,m=Math.imul(qe,Je),_=_+Math.imul(Ot,lr)|0,l=l+Math.imul(Ot,Qe)|0,l=l+Math.imul(Le,lr)|0,m=m+Math.imul(Le,Qe)|0;var Us=(S+_|0)+((l&8191)<<13)|0;S=(m+(l>>>13)|0)+(Us>>>26)|0,Us&=67108863,_=Math.imul(Lt,lr),l=Math.imul(Lt,Qe),l=l+Math.imul(qe,lr)|0,m=Math.imul(qe,Qe);var qs=(S+_|0)+((l&8191)<<13)|0;return S=(m+(l>>>13)|0)+(qs>>>26)|0,qs&=67108863,x[0]=jt,x[1]=Rs,x[2]=As,x[3]=Os,x[4]=ks,x[5]=Ns,x[6]=Ps,x[7]=sn,x[8]=Bs,x[9]=an,x[10]=Ms,x[11]=Cs,x[12]=Ls,x[13]=is,x[14]=ns,x[15]=ss,x[16]=Ds,x[17]=Us,x[18]=qs,S!==0&&(x[19]=S,p.length++),p};Math.imul||(M=B);function P(E,f,c){c.negative=f.negative^E.negative,c.length=E.length+f.length;for(var p=0,v=0,g=0;g<c.length-1;g++){var x=v;v=0;for(var S=p&67108863,_=Math.min(g,f.length-1),l=Math.max(0,g-E.length+1);l<=_;l++){var m=g-l,A=E.words[m]|0,U=f.words[l]|0,j=A*U,Z=j&67108863;x=x+(j/67108864|0)|0,Z=Z+S|0,S=Z&67108863,x=x+(Z>>>26)|0,v+=x>>>26,x&=67108863}c.words[g]=S,p=x,x=v}return p!==0?c.words[g]=p:c.length--,c.strip()}function L(E,f,c){var p=new X;return p.mulp(E,f,c)}n.prototype.mulTo=function(f,c){var p,v=this.length+f.length;return this.length===10&&f.length===10?p=M(this,f,c):v<63?p=B(this,f,c):v<1024?p=P(this,f,c):p=L(this,f,c),p};function X(E,f){this.x=E,this.y=f}X.prototype.makeRBT=function(f){for(var c=new Array(f),p=n.prototype._countBits(f)-1,v=0;v<f;v++)c[v]=this.revBin(v,p,f);return c},X.prototype.revBin=function(f,c,p){if(f===0||f===p-1)return f;for(var v=0,g=0;g<c;g++)v|=(f&1)<<c-g-1,f>>=1;return v},X.prototype.permute=function(f,c,p,v,g,x){for(var S=0;S<x;S++)v[S]=c[f[S]],g[S]=p[f[S]]},X.prototype.transform=function(f,c,p,v,g,x){this.permute(x,f,c,p,v,g);for(var S=1;S<g;S<<=1)for(var _=S<<1,l=Math.cos(2*Math.PI/_),m=Math.sin(2*Math.PI/_),A=0;A<g;A+=_)for(var U=l,j=m,Z=0;Z<S;Z++){var se=p[A+Z],ae=v[A+Z],he=p[A+Z+S],Ee=v[A+Z+S],me=U*he-j*Ee;Ee=U*Ee+j*he,he=me,p[A+Z]=se+he,v[A+Z]=ae+Ee,p[A+Z+S]=se-he,v[A+Z+S]=ae-Ee,Z!==_&&(me=l*U-m*j,j=l*j+m*U,U=me)}},X.prototype.guessLen13b=function(f,c){var p=Math.max(c,f)|1,v=p&1,g=0;for(p=p/2|0;p;p=p>>>1)g++;return 1<<g+1+v},X.prototype.conjugate=function(f,c,p){if(!(p<=1))for(var v=0;v<p/2;v++){var g=f[v];f[v]=f[p-v-1],f[p-v-1]=g,g=c[v],c[v]=-c[p-v-1],c[p-v-1]=-g}},X.prototype.normalize13b=function(f,c){for(var p=0,v=0;v<c/2;v++){var g=Math.round(f[2*v+1]/c)*8192+Math.round(f[2*v]/c)+p;f[v]=g&67108863,g<67108864?p=0:p=g/67108864|0}return f},X.prototype.convert13b=function(f,c,p,v){for(var g=0,x=0;x<c;x++)g=g+(f[x]|0),p[2*x]=g&8191,g=g>>>13,p[2*x+1]=g&8191,g=g>>>13;for(x=2*c;x<v;++x)p[x]=0;r(g===0),r((g&-8192)===0)},X.prototype.stub=function(f){for(var c=new Array(f),p=0;p<f;p++)c[p]=0;return c},X.prototype.mulp=function(f,c,p){var v=2*this.guessLen13b(f.length,c.length),g=this.makeRBT(v),x=this.stub(v),S=new Array(v),_=new Array(v),l=new Array(v),m=new Array(v),A=new Array(v),U=new Array(v),j=p.words;j.length=v,this.convert13b(f.words,f.length,S,v),this.convert13b(c.words,c.length,m,v),this.transform(S,x,_,l,v,g),this.transform(m,x,A,U,v,g);for(var Z=0;Z<v;Z++){var se=_[Z]*A[Z]-l[Z]*U[Z];l[Z]=_[Z]*U[Z]+l[Z]*A[Z],_[Z]=se}return this.conjugate(_,l,v),this.transform(_,l,j,x,v,g),this.conjugate(j,x,v),this.normalize13b(j,v),p.negative=f.negative^c.negative,p.length=f.length+c.length,p.strip()},n.prototype.mul=function(f){var c=new n(null);return c.words=new Array(this.length+f.length),this.mulTo(f,c)},n.prototype.mulf=function(f){var c=new n(null);return c.words=new Array(this.length+f.length),L(this,f,c)},n.prototype.imul=function(f){return this.clone().mulTo(f,this)},n.prototype.imuln=function(f){r(typeof f=="number"),r(f<67108864);for(var c=0,p=0;p<this.length;p++){var v=(this.words[p]|0)*f,g=(v&67108863)+(c&67108863);c>>=26,c+=v/67108864|0,c+=g>>>26,this.words[p]=g&67108863}return c!==0&&(this.words[p]=c,this.length++),this},n.prototype.muln=function(f){return this.clone().imuln(f)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(f){var c=I(f);if(c.length===0)return new n(1);for(var p=this,v=0;v<c.length&&c[v]===0;v++,p=p.sqr());if(++v<c.length)for(var g=p.sqr();v<c.length;v++,g=g.sqr())c[v]!==0&&(p=p.mul(g));return p},n.prototype.iushln=function(f){r(typeof f=="number"&&f>=0);var c=f%26,p=(f-c)/26,v=67108863>>>26-c<<26-c,g;if(c!==0){var x=0;for(g=0;g<this.length;g++){var S=this.words[g]&v,_=(this.words[g]|0)-S<<c;this.words[g]=_|x,x=S>>>26-c}x&&(this.words[g]=x,this.length++)}if(p!==0){for(g=this.length-1;g>=0;g--)this.words[g+p]=this.words[g];for(g=0;g<p;g++)this.words[g]=0;this.length+=p}return this.strip()},n.prototype.ishln=function(f){return r(this.negative===0),this.iushln(f)},n.prototype.iushrn=function(f,c,p){r(typeof f=="number"&&f>=0);var v;c?v=(c-c%26)/26:v=0;var g=f%26,x=Math.min((f-g)/26,this.length),S=67108863^67108863>>>g<<g,_=p;if(v-=x,v=Math.max(0,v),_){for(var l=0;l<x;l++)_.words[l]=this.words[l];_.length=x}if(x!==0)if(this.length>x)for(this.length-=x,l=0;l<this.length;l++)this.words[l]=this.words[l+x];else this.words[0]=0,this.length=1;var m=0;for(l=this.length-1;l>=0&&(m!==0||l>=v);l--){var A=this.words[l]|0;this.words[l]=m<<26-g|A>>>g,m=A&S}return _&&m!==0&&(_.words[_.length++]=m),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(f,c,p){return r(this.negative===0),this.iushrn(f,c,p)},n.prototype.shln=function(f){return this.clone().ishln(f)},n.prototype.ushln=function(f){return this.clone().iushln(f)},n.prototype.shrn=function(f){return this.clone().ishrn(f)},n.prototype.ushrn=function(f){return this.clone().iushrn(f)},n.prototype.testn=function(f){r(typeof f=="number"&&f>=0);var c=f%26,p=(f-c)/26,v=1<<c;if(this.length<=p)return!1;var g=this.words[p];return!!(g&v)},n.prototype.imaskn=function(f){r(typeof f=="number"&&f>=0);var c=f%26,p=(f-c)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=p)return this;if(c!==0&&p++,this.length=Math.min(p,this.length),c!==0){var v=67108863^67108863>>>c<<c;this.words[this.length-1]&=v}return this.strip()},n.prototype.maskn=function(f){return this.clone().imaskn(f)},n.prototype.iaddn=function(f){return r(typeof f=="number"),r(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},n.prototype._iaddn=function(f){this.words[0]+=f;for(var c=0;c<this.length&&this.words[c]>=67108864;c++)this.words[c]-=67108864,c===this.length-1?this.words[c+1]=1:this.words[c+1]++;return this.length=Math.max(this.length,c+1),this},n.prototype.isubn=function(f){if(r(typeof f=="number"),r(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var c=0;c<this.length&&this.words[c]<0;c++)this.words[c]+=67108864,this.words[c+1]-=1;return this.strip()},n.prototype.addn=function(f){return this.clone().iaddn(f)},n.prototype.subn=function(f){return this.clone().isubn(f)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(f,c,p){var v=f.length+p,g;this._expand(v);var x,S=0;for(g=0;g<f.length;g++){x=(this.words[g+p]|0)+S;var _=(f.words[g]|0)*c;x-=_&67108863,S=(x>>26)-(_/67108864|0),this.words[g+p]=x&67108863}for(;g<this.length-p;g++)x=(this.words[g+p]|0)+S,S=x>>26,this.words[g+p]=x&67108863;if(S===0)return this.strip();for(r(S===-1),S=0,g=0;g<this.length;g++)x=-(this.words[g]|0)+S,S=x>>26,this.words[g]=x&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(f,c){var p=this.length-f.length,v=this.clone(),g=f,x=g.words[g.length-1]|0,S=this._countBits(x);p=26-S,p!==0&&(g=g.ushln(p),v.iushln(p),x=g.words[g.length-1]|0);var _=v.length-g.length,l;if(c!=="mod"){l=new n(null),l.length=_+1,l.words=new Array(l.length);for(var m=0;m<l.length;m++)l.words[m]=0}var A=v.clone()._ishlnsubmul(g,1,_);A.negative===0&&(v=A,l&&(l.words[_]=1));for(var U=_-1;U>=0;U--){var j=(v.words[g.length+U]|0)*67108864+(v.words[g.length+U-1]|0);for(j=Math.min(j/x|0,67108863),v._ishlnsubmul(g,j,U);v.negative!==0;)j--,v.negative=0,v._ishlnsubmul(g,1,U),v.isZero()||(v.negative^=1);l&&(l.words[U]=j)}return l&&l.strip(),v.strip(),c!=="div"&&p!==0&&v.iushrn(p),{div:l||null,mod:v}},n.prototype.divmod=function(f,c,p){if(r(!f.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var v,g,x;return this.negative!==0&&f.negative===0?(x=this.neg().divmod(f,c),c!=="mod"&&(v=x.div.neg()),c!=="div"&&(g=x.mod.neg(),p&&g.negative!==0&&g.iadd(f)),{div:v,mod:g}):this.negative===0&&f.negative!==0?(x=this.divmod(f.neg(),c),c!=="mod"&&(v=x.div.neg()),{div:v,mod:x.mod}):this.negative&f.negative?(x=this.neg().divmod(f.neg(),c),c!=="div"&&(g=x.mod.neg(),p&&g.negative!==0&&g.isub(f)),{div:x.div,mod:g}):f.length>this.length||this.cmp(f)<0?{div:new n(0),mod:this}:f.length===1?c==="div"?{div:this.divn(f.words[0]),mod:null}:c==="mod"?{div:null,mod:new n(this.modn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new n(this.modn(f.words[0]))}:this._wordDiv(f,c)},n.prototype.div=function(f){return this.divmod(f,"div",!1).div},n.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},n.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},n.prototype.divRound=function(f){var c=this.divmod(f);if(c.mod.isZero())return c.div;var p=c.div.negative!==0?c.mod.isub(f):c.mod,v=f.ushrn(1),g=f.andln(1),x=p.cmp(v);return x<0||g===1&&x===0?c.div:c.div.negative!==0?c.div.isubn(1):c.div.iaddn(1)},n.prototype.modn=function(f){r(f<=67108863);for(var c=(1<<26)%f,p=0,v=this.length-1;v>=0;v--)p=(c*p+(this.words[v]|0))%f;return p},n.prototype.idivn=function(f){r(f<=67108863);for(var c=0,p=this.length-1;p>=0;p--){var v=(this.words[p]|0)+c*67108864;this.words[p]=v/f|0,c=v%f}return this.strip()},n.prototype.divn=function(f){return this.clone().idivn(f)},n.prototype.egcd=function(f){r(f.negative===0),r(!f.isZero());var c=this,p=f.clone();c.negative!==0?c=c.umod(f):c=c.clone();for(var v=new n(1),g=new n(0),x=new n(0),S=new n(1),_=0;c.isEven()&&p.isEven();)c.iushrn(1),p.iushrn(1),++_;for(var l=p.clone(),m=c.clone();!c.isZero();){for(var A=0,U=1;!(c.words[0]&U)&&A<26;++A,U<<=1);if(A>0)for(c.iushrn(A);A-- >0;)(v.isOdd()||g.isOdd())&&(v.iadd(l),g.isub(m)),v.iushrn(1),g.iushrn(1);for(var j=0,Z=1;!(p.words[0]&Z)&&j<26;++j,Z<<=1);if(j>0)for(p.iushrn(j);j-- >0;)(x.isOdd()||S.isOdd())&&(x.iadd(l),S.isub(m)),x.iushrn(1),S.iushrn(1);c.cmp(p)>=0?(c.isub(p),v.isub(x),g.isub(S)):(p.isub(c),x.isub(v),S.isub(g))}return{a:x,b:S,gcd:p.iushln(_)}},n.prototype._invmp=function(f){r(f.negative===0),r(!f.isZero());var c=this,p=f.clone();c.negative!==0?c=c.umod(f):c=c.clone();for(var v=new n(1),g=new n(0),x=p.clone();c.cmpn(1)>0&&p.cmpn(1)>0;){for(var S=0,_=1;!(c.words[0]&_)&&S<26;++S,_<<=1);if(S>0)for(c.iushrn(S);S-- >0;)v.isOdd()&&v.iadd(x),v.iushrn(1);for(var l=0,m=1;!(p.words[0]&m)&&l<26;++l,m<<=1);if(l>0)for(p.iushrn(l);l-- >0;)g.isOdd()&&g.iadd(x),g.iushrn(1);c.cmp(p)>=0?(c.isub(p),v.isub(g)):(p.isub(c),g.isub(v))}var A;return c.cmpn(1)===0?A=v:A=g,A.cmpn(0)<0&&A.iadd(f),A},n.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var c=this.clone(),p=f.clone();c.negative=0,p.negative=0;for(var v=0;c.isEven()&&p.isEven();v++)c.iushrn(1),p.iushrn(1);do{for(;c.isEven();)c.iushrn(1);for(;p.isEven();)p.iushrn(1);var g=c.cmp(p);if(g<0){var x=c;c=p,p=x}else if(g===0||p.cmpn(1)===0)break;c.isub(p)}while(!0);return p.iushln(v)},n.prototype.invm=function(f){return this.egcd(f).a.umod(f)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(f){return this.words[0]&f},n.prototype.bincn=function(f){r(typeof f=="number");var c=f%26,p=(f-c)/26,v=1<<c;if(this.length<=p)return this._expand(p+1),this.words[p]|=v,this;for(var g=v,x=p;g!==0&&x<this.length;x++){var S=this.words[x]|0;S+=g,g=S>>>26,S&=67108863,this.words[x]=S}return g!==0&&(this.words[x]=g,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(f){var c=f<0;if(this.negative!==0&&!c)return-1;if(this.negative===0&&c)return 1;this.strip();var p;if(this.length>1)p=1;else{c&&(f=-f),r(f<=67108863,"Number is too big");var v=this.words[0]|0;p=v===f?0:v<f?-1:1}return this.negative!==0?-p|0:p},n.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return-1;if(this.negative===0&&f.negative!==0)return 1;var c=this.ucmp(f);return this.negative!==0?-c|0:c},n.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return-1;for(var c=0,p=this.length-1;p>=0;p--){var v=this.words[p]|0,g=f.words[p]|0;if(v!==g){v<g?c=-1:v>g&&(c=1);break}}return c},n.prototype.gtn=function(f){return this.cmpn(f)===1},n.prototype.gt=function(f){return this.cmp(f)===1},n.prototype.gten=function(f){return this.cmpn(f)>=0},n.prototype.gte=function(f){return this.cmp(f)>=0},n.prototype.ltn=function(f){return this.cmpn(f)===-1},n.prototype.lt=function(f){return this.cmp(f)===-1},n.prototype.lten=function(f){return this.cmpn(f)<=0},n.prototype.lte=function(f){return this.cmp(f)<=0},n.prototype.eqn=function(f){return this.cmpn(f)===0},n.prototype.eq=function(f){return this.cmp(f)===0},n.red=function(f){return new be(f)},n.prototype.toRed=function(f){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(f){return this.red=f,this},n.prototype.forceRed=function(f){return r(!this.red,"Already a number in reduction context"),this._forceRed(f)},n.prototype.redAdd=function(f){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},n.prototype.redIAdd=function(f){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},n.prototype.redSub=function(f){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},n.prototype.redISub=function(f){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},n.prototype.redShl=function(f){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},n.prototype.redMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},n.prototype.redIMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(f){return r(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var W={k256:null,p224:null,p192:null,p25519:null};function q(E,f){this.name=E,this.p=new n(f,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}q.prototype._tmp=function(){var f=new n(null);return f.words=new Array(Math.ceil(this.n/13)),f},q.prototype.ireduce=function(f){var c=f,p;do this.split(c,this.tmp),c=this.imulK(c),c=c.iadd(this.tmp),p=c.bitLength();while(p>this.n);var v=p<this.n?-1:c.ucmp(this.p);return v===0?(c.words[0]=0,c.length=1):v>0?c.isub(this.p):c.strip(),c},q.prototype.split=function(f,c){f.iushrn(this.n,0,c)},q.prototype.imulK=function(f){return f.imul(this.k)};function ee(){q.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(ee,q),ee.prototype.split=function(f,c){for(var p=4194303,v=Math.min(f.length,9),g=0;g<v;g++)c.words[g]=f.words[g];if(c.length=v,f.length<=9){f.words[0]=0,f.length=1;return}var x=f.words[9];for(c.words[c.length++]=x&p,g=10;g<f.length;g++){var S=f.words[g]|0;f.words[g-10]=(S&p)<<4|x>>>22,x=S}x>>>=22,f.words[g-10]=x,x===0&&f.length>10?f.length-=10:f.length-=9},ee.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var c=0,p=0;p<f.length;p++){var v=f.words[p]|0;c+=v*977,f.words[p]=c&67108863,c=v*64+(c/67108864|0)}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function fe(){q.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(fe,q);function _e(){q.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(_e,q);function Te(){q.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(Te,q),Te.prototype.imulK=function(f){for(var c=0,p=0;p<f.length;p++){var v=(f.words[p]|0)*19+c,g=v&67108863;v>>>=26,f.words[p]=g,c=v}return c!==0&&(f.words[f.length++]=c),f},n._prime=function(f){if(W[f])return W[f];var c;if(f==="k256")c=new ee;else if(f==="p224")c=new fe;else if(f==="p192")c=new _e;else if(f==="p25519")c=new Te;else throw new Error("Unknown prime "+f);return W[f]=c,c};function be(E){if(typeof E=="string"){var f=n._prime(E);this.m=f.p,this.prime=f}else r(E.gtn(1),"modulus must be greater than 1"),this.m=E,this.prime=null}be.prototype._verify1=function(f){r(f.negative===0,"red works only with positives"),r(f.red,"red works only with red numbers")},be.prototype._verify2=function(f,c){r((f.negative|c.negative)===0,"red works only with positives"),r(f.red&&f.red===c.red,"red works only with red numbers")},be.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):f.umod(this.m)._forceRed(this)},be.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},be.prototype.add=function(f,c){this._verify2(f,c);var p=f.add(c);return p.cmp(this.m)>=0&&p.isub(this.m),p._forceRed(this)},be.prototype.iadd=function(f,c){this._verify2(f,c);var p=f.iadd(c);return p.cmp(this.m)>=0&&p.isub(this.m),p},be.prototype.sub=function(f,c){this._verify2(f,c);var p=f.sub(c);return p.cmpn(0)<0&&p.iadd(this.m),p._forceRed(this)},be.prototype.isub=function(f,c){this._verify2(f,c);var p=f.isub(c);return p.cmpn(0)<0&&p.iadd(this.m),p},be.prototype.shl=function(f,c){return this._verify1(f),this.imod(f.ushln(c))},be.prototype.imul=function(f,c){return this._verify2(f,c),this.imod(f.imul(c))},be.prototype.mul=function(f,c){return this._verify2(f,c),this.imod(f.mul(c))},be.prototype.isqr=function(f){return this.imul(f,f.clone())},be.prototype.sqr=function(f){return this.mul(f,f)},be.prototype.sqrt=function(f){if(f.isZero())return f.clone();var c=this.m.andln(3);if(r(c%2===1),c===3){var p=this.m.add(new n(1)).iushrn(2);return this.pow(f,p)}for(var v=this.m.subn(1),g=0;!v.isZero()&&v.andln(1)===0;)g++,v.iushrn(1);r(!v.isZero());var x=new n(1).toRed(this),S=x.redNeg(),_=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new n(2*l*l).toRed(this);this.pow(l,_).cmp(S)!==0;)l.redIAdd(S);for(var m=this.pow(l,v),A=this.pow(f,v.addn(1).iushrn(1)),U=this.pow(f,v),j=g;U.cmp(x)!==0;){for(var Z=U,se=0;Z.cmp(x)!==0;se++)Z=Z.redSqr();r(se<j);var ae=this.pow(m,new n(1).iushln(j-se-1));A=A.redMul(ae),m=ae.redSqr(),U=U.redMul(m),j=se}return A},be.prototype.invm=function(f){var c=f._invmp(this.m);return c.negative!==0?(c.negative=0,this.imod(c).redNeg()):this.imod(c)},be.prototype.pow=function(f,c){if(c.isZero())return new n(1).toRed(this);if(c.cmpn(1)===0)return f.clone();var p=4,v=new Array(1<<p);v[0]=new n(1).toRed(this),v[1]=f;for(var g=2;g<v.length;g++)v[g]=this.mul(v[g-1],f);var x=v[0],S=0,_=0,l=c.bitLength()%26;for(l===0&&(l=26),g=c.length-1;g>=0;g--){for(var m=c.words[g],A=l-1;A>=0;A--){var U=m>>A&1;if(x!==v[0]&&(x=this.sqr(x)),U===0&&S===0){_=0;continue}S<<=1,S|=U,_++,!(_!==p&&(g!==0||A!==0))&&(x=this.mul(x,v[S]),_=0,S=0)}l=26}return x},be.prototype.convertTo=function(f){var c=f.umod(this.m);return c===f?c.clone():c},be.prototype.convertFrom=function(f){var c=f.clone();return c.red=null,c},n.mont=function(f){return new O(f)};function O(E){be.call(this,E),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(O,be),O.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},O.prototype.convertFrom=function(f){var c=this.imod(f.mul(this.rinv));return c.red=null,c},O.prototype.imul=function(f,c){if(f.isZero()||c.isZero())return f.words[0]=0,f.length=1,f;var p=f.imul(c),v=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=p.isub(v).iushrn(this.shift),x=g;return g.cmp(this.m)>=0?x=g.isub(this.m):g.cmpn(0)<0&&(x=g.iadd(this.m)),x._forceRed(this)},O.prototype.mul=function(f,c){if(f.isZero()||c.isZero())return new n(0)._forceRed(this);var p=f.mul(c),v=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=p.isub(v).iushrn(this.shift),x=g;return g.cmp(this.m)>=0?x=g.isub(this.m):g.cmpn(0)<0&&(x=g.iadd(this.m)),x._forceRed(this)},O.prototype.invm=function(f){var c=this.imod(f._invmp(this.m).mul(this.r2));return c._forceRed(this)}})(typeof pm>"u"||pm,K_)});var $_=V((dH,G_)=>{"use strict";var Y7="http://bitcore.io/";G_.exports=[{name:"InvalidB58Char",message:"Invalid Base58 character: {0} in {1}"},{name:"InvalidB58Checksum",message:"Invalid Base58 checksum for {0}"},{name:"InvalidNetwork",message:"Invalid version for network: got {0}"},{name:"InvalidState",message:"Invalid state: {0}"},{name:"NotImplemented",message:"Function {0} was not implemented yet"},{name:"InvalidNetworkArgument",message:'Invalid network: must be "livenet" or "testnet", got {0}'},{name:"InvalidArgument",message:function(){return"Invalid Argument"+(arguments[0]?": "+arguments[0]:"")+(arguments[1]?" Documentation: "+Y7+arguments[1]:"")}},{name:"AbstractMethodInvoked",message:"Abstract Method Invocation: {0}"},{name:"InvalidArgumentType",message:function(){return"Invalid Argument for "+arguments[2]+", expected "+arguments[1]+" but got "+typeof arguments[0]}},{name:"Unit",message:"Internal Error on Unit {0}",errors:[{name:"UnknownCode",message:"Unrecognized unit code: {0}"},{name:"InvalidRate",message:"Invalid exchange rate: {0}"}]},{name:"MerkleBlock",message:"Internal Error on MerkleBlock {0}",errors:[{name:"InvalidMerkleTree",message:"This MerkleBlock contain an invalid Merkle Tree"}]},{name:"Transaction",message:"Internal Error on Transaction {0}",errors:[{name:"Input",message:"Internal Error on Input {0}",errors:[{name:"MissingScript",message:"Need a script to create an input"},{name:"UnsupportedScript",message:"Unsupported input script type: {0}"},{name:"MissingPreviousOutput",message:"No previous output information."},{name:"BlockHeightOutOfRange",message:"Block Height can only be between 0 and 65535"},{name:"LockTimeRange",message:"Seconds needs to be more that 0 and less that 33553920"}]},{name:"NeedMoreInfo",message:"{0}"},{name:"InvalidSorting",message:"The sorting function provided did not return the change output as one of the array elements"},{name:"InvalidOutputAmountSum",message:"{0}"},{name:"MissingSignatures",message:"Some inputs have not been fully signed"},{name:"InvalidIndex",message:"Invalid index: {0} is not between 0, {1}"},{name:"UnableToVerifySignature",message:"Unable to verify signature: {0}"},{name:"DustOutputs",message:"Dust amount detected in one output"},{name:"InvalidSatoshis",message:"Output satoshis are invalid"},{name:"FeeError",message:"Internal Error on Fee {0}",errors:[{name:"TooSmall",message:"Fee is too small: {0}"},{name:"TooLarge",message:"Fee is too large: {0}"},{name:"Different",message:"Unspent value is different from specified fee: {0}"}]},{name:"ChangeAddressMissing",message:"Change address is missing"},{name:"BlockHeightTooHigh",message:"Block Height can be at most 2^32 -1"},{name:"NLockTimeOutOfRange",message:"Block Height can only be between 0 and 499 999 999"},{name:"LockTimeTooEarly",message:"Lock Time can't be earlier than UNIX date 500 000 000"}]},{name:"Script",message:"Internal Error on Script {0}",errors:[{name:"UnrecognizedAddress",message:"Expected argument {0} to be an address"},{name:"CantDeriveAddress",message:"Can't derive address associated with script {0}, needs to be p2pkh in, p2pkh out, p2sh in, or p2sh out."},{name:"InvalidBuffer",message:"Invalid script buffer: can't parse valid script from given buffer {0}"}]},{name:"HDPrivateKey",message:"Internal Error on HDPrivateKey {0}",errors:[{name:"InvalidDerivationArgument",message:"Invalid derivation argument {0}, expected string, or number and boolean"},{name:"InvalidEntropyArgument",message:"Invalid entropy: must be an hexa string or binary buffer, got {0}",errors:[{name:"TooMuchEntropy",message:'Invalid entropy: more than 512 bits is non standard, got "{0}"'},{name:"NotEnoughEntropy",message:'Invalid entropy: at least 128 bits needed, got "{0}"'}]},{name:"InvalidLength",message:"Invalid length for xprivkey string in {0}"},{name:"InvalidPath",message:"Invalid derivation path: {0}"},{name:"UnrecognizedArgument",message:'Invalid argument: creating a HDPrivateKey requires a string, buffer, json or object, got "{0}"'}]},{name:"HDPublicKey",message:"Internal Error on HDPublicKey {0}",errors:[{name:"ArgumentIsPrivateExtended",message:"Argument is an extended private key: {0}"},{name:"InvalidDerivationArgument",message:"Invalid derivation argument: got {0}"},{name:"InvalidLength",message:'Invalid length for xpubkey: got "{0}"'},{name:"InvalidPath",message:'Invalid derivation path, it should look like: "m/1/100", got "{0}"'},{name:"InvalidIndexCantDeriveHardened",message:"Invalid argument: creating a hardened path requires an HDPrivateKey"},{name:"MustSupplyArgument",message:"Must supply an argument to create a HDPublicKey"},{name:"UnrecognizedArgument",message:"Invalid argument for creation, must be string, json, buffer, or object"}]}]});var Yi=V((mH,mm)=>{"use strict";var dm=vt();function Z7(e,t){return e.replace("{0}",t[0]).replace("{1}",t[1]).replace("{2}",t[2])}var X_=function(e,t){var r=function(){if(dm.isString(t.message))this.message=Z7(t.message,arguments);else if(dm.isFunction(t.message))this.message=t.message.apply(null,arguments);else throw new Error("Invalid error definition for "+t.name);this.stack=this.message+`
21
- `+new Error().stack};return r.prototype=Object.create(e.prototype),r.prototype.name=e.prototype.name+t.name,e[t.name]=r,t.errors&&Y_(r,t.errors),r},Y_=function(e,t){dm.each(t,function(r){X_(e,r)})},J7=function(e,t){return Y_(e,t),e},Dc={};Dc.Error=function(){this.message="Internal error",this.stack=this.message+`
22
- `+new Error().stack};Dc.Error.prototype=Object.create(Error.prototype);Dc.Error.prototype.name="bitcore.Error";var Q7=$_();J7(Dc.Error,Q7);mm.exports=Dc.Error;mm.exports.extend=function(e){return X_(Dc.Error,e)}});var It=V((vH,Z_)=>{"use strict";var ff=Yi(),e9=vt();Z_.exports={checkState:function(e,t){if(!e)throw new ff.InvalidState(t)},checkArgument:function(e,t,r,i){if(!e)throw new ff.InvalidArgument(t,r,i)},checkArgumentType:function(e,t,r){if(r=r||"(unknown name)",e9.isString(t)){if(t==="Buffer"){var i=require("buffer");if(!i.Buffer.isBuffer(e))throw new ff.InvalidArgumentType(e,t,r)}else if(typeof e!==t)throw new ff.InvalidArgumentType(e,t,r)}else if(!(e instanceof t))throw new ff.InvalidArgumentType(e,t.name,r)}}});var Zr=V((gH,Q_)=>{"use strict";var Nt=hm(),vm=It(),J_=vt(),qp=function(e){for(var t=Buffer.alloc(e.length),r=0;r<e.length;r++)t[r]=e[e.length-1-r];return t};Nt.Zero=new Nt(0);Nt.One=new Nt(1);Nt.Minus1=new Nt(-1);Nt.fromNumber=function(e){return vm.checkArgument(J_.isNumber(e)),new Nt(e)};Nt.fromString=function(e,t){return vm.checkArgument(J_.isString(e)),new Nt(e,t)};Nt.fromBuffer=function(e,t){typeof t<"u"&&t.endian==="little"&&(e=qp(e));var r=e.toString("hex"),i=new Nt(r,16);return i};Nt.fromSM=function(e,t){var r;if(e.length===0)return Nt.fromBuffer(Buffer.from([0]));var i="big";return t&&(i=t.endian),i==="little"&&(e=qp(e)),e[0]&128?(e[0]=e[0]&127,r=Nt.fromBuffer(e),r.neg().copy(r)):r=Nt.fromBuffer(e),r};Nt.prototype.toNumber=function(){return parseInt(this.toString(10),10)};Nt.prototype.toBuffer=function(e){var t,r;if(e&&e.size){r=this.toString(16,2);var i=r.length/2;t=Buffer.from(r,"hex"),i===e.size?t=t:i>e.size?t=Nt.trim(t,i):i<e.size&&(t=Nt.pad(t,i,e.size))}else r=this.toString(16,2),t=Buffer.from(r,"hex");return typeof e<"u"&&e.endian==="little"&&(t=qp(t)),t};Nt.prototype.toSMBigEndian=function(){var e;return this.cmp(Nt.Zero)===-1?(e=this.neg().toBuffer(),e[0]&128?e=Buffer.concat([Buffer.from([128]),e]):e[0]=e[0]|128):(e=this.toBuffer(),e[0]&128&&(e=Buffer.concat([Buffer.from([0]),e]))),e.length===1&e[0]===0&&(e=Buffer.from([])),e};Nt.prototype.toSM=function(e){var t=e?e.endian:"big",r=this.toSMBigEndian();return t==="little"&&(r=qp(r)),r};Nt.fromScriptNumBuffer=function(e,t,r){var i=r||4;if(vm.checkArgument(e.length<=i,new Error("script number overflow")),t&&e.length>0&&!(e[e.length-1]&127)&&(e.length<=1||!(e[e.length-2]&128)))throw new Error("non-minimally encoded script number");return Nt.fromSM(e,{endian:"little"})};Nt.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})};Nt.trim=function(e,t){return e.slice(t-e.length,e.length)};Nt.pad=function(e,t,r){for(var i=Buffer.alloc(r),n=0;n<e.length;n++)i[i.length-1-n]=e[e.length-1-n];for(n=0;n<r-t;n++)i[n]=0;return i};Q_.exports=Nt});var Lr=V((bH,ry)=>{"use strict";var ty=vt(),ey=function(t){return ty.isString(t)?/^[0-9a-fA-F]+$/.test(t):!1};ry.exports={isValidJSON:function(t){var r;if(!ty.isString(t))return!1;try{r=JSON.parse(t)}catch{return!1}return typeof r=="object"},isHexa:ey,isHexaString:ey,cloneArray:function(e){return[].concat(e)},defineImmutable:function(t,r){return Object.keys(r).forEach(function(i){Object.defineProperty(t,i,{configurable:!1,enumerable:!0,value:r[i]})}),t},isNaturalNumber:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}}});var hr=V((yH,lf)=>{"use strict";var iy=require("buffer"),xH=require("assert"),_H=Lr(),Pa=It();function ny(e,t){if(e.length!==t.length)return!1;for(var r=e.length,i=0;i<r;i++)if(e[i]!==t[i])return!1;return!0}lf.exports={fill:function(t,r){Pa.checkArgumentType(t,"Buffer","buffer"),Pa.checkArgumentType(r,"number","value");for(var i=t.length,n=0;n<i;n++)t[n]=r;return t},copy:function(e){var t=Buffer.alloc(e.length);return e.copy(t),t},isBuffer:function(t){return iy.Buffer.isBuffer(t)||t instanceof Uint8Array},emptyBuffer:function(t){Pa.checkArgumentType(t,"number","bytes");for(var r=Buffer.alloc(t),i=0;i<t;i++)r.write("\0",i);return r},concat:iy.Buffer.concat,equals:ny,equal:ny,integerAsSingleByteBuffer:function(t){return Pa.checkArgumentType(t,"number","integer"),Buffer.from([t&255])},integerAsBuffer:function(t){Pa.checkArgumentType(t,"number","integer");var r=[];return r.push(t>>24&255),r.push(t>>16&255),r.push(t>>8&255),r.push(t&255),Buffer.from(r)},integerFromBuffer:function(t){return Pa.checkArgumentType(t,"Buffer","buffer"),t[0]<<24|t[1]<<16|t[2]<<8|t[3]},integerFromSingleByteBuffer:function(t){return Pa.checkArgumentType(t,"Buffer","buffer"),t[0]},bufferToHex:function(t){return Pa.checkArgumentType(t,"Buffer","buffer"),t.toString("hex")},reverse:function(t){return Buffer.from(t).reverse()}};lf.exports.NULL_HASH=lf.exports.fill(Buffer.alloc(32),0);lf.exports.EMPTY_BUFFER=Buffer.alloc(0)});var sy=V((wH,t9)=>{t9.exports={name:"elliptic",version:"6.5.5",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}});var us=V((ay,gm)=>{(function(e,t){"use strict";function r(f,c){if(!f)throw new Error(c||"Assertion failed")}function i(f,c){f.super_=c;var p=function(){};p.prototype=c.prototype,f.prototype=new p,f.prototype.constructor=f}function n(f,c,p){if(n.isBN(f))return f;this.negative=0,this.words=null,this.length=0,this.red=null,f!==null&&((c==="le"||c==="be")&&(p=c,c=10),this._init(f||0,c||10,p||"be"))}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=require("buffer").Buffer}catch{}n.isBN=function(c){return c instanceof n?!0:c!==null&&typeof c=="object"&&c.constructor.wordSize===n.wordSize&&Array.isArray(c.words)},n.max=function(c,p){return c.cmp(p)>0?c:p},n.min=function(c,p){return c.cmp(p)<0?c:p},n.prototype._init=function(c,p,v){if(typeof c=="number")return this._initNumber(c,p,v);if(typeof c=="object")return this._initArray(c,p,v);p==="hex"&&(p=16),r(p===(p|0)&&p>=2&&p<=36),c=c.toString().replace(/\s+/g,"");var g=0;c[0]==="-"&&(g++,this.negative=1),g<c.length&&(p===16?this._parseHex(c,g,v):(this._parseBase(c,p,g),v==="le"&&this._initArray(this.toArray(),p,v)))},n.prototype._initNumber=function(c,p,v){c<0&&(this.negative=1,c=-c),c<67108864?(this.words=[c&67108863],this.length=1):c<4503599627370496?(this.words=[c&67108863,c/67108864&67108863],this.length=2):(r(c<9007199254740992),this.words=[c&67108863,c/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),p,v)},n.prototype._initArray=function(c,p,v){if(r(typeof c.length=="number"),c.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(c.length/3),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var x,S,_=0;if(v==="be")for(g=c.length-1,x=0;g>=0;g-=3)S=c[g]|c[g-1]<<8|c[g-2]<<16,this.words[x]|=S<<_&67108863,this.words[x+1]=S>>>26-_&67108863,_+=24,_>=26&&(_-=26,x++);else if(v==="le")for(g=0,x=0;g<c.length;g+=3)S=c[g]|c[g+1]<<8|c[g+2]<<16,this.words[x]|=S<<_&67108863,this.words[x+1]=S>>>26-_&67108863,_+=24,_>=26&&(_-=26,x++);return this.strip()};function u(f,c){var p=f.charCodeAt(c);return p>=65&&p<=70?p-55:p>=97&&p<=102?p-87:p-48&15}function h(f,c,p){var v=u(f,p);return p-1>=c&&(v|=u(f,p-1)<<4),v}n.prototype._parseHex=function(c,p,v){this.length=Math.ceil((c.length-p)/6),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var x=0,S=0,_;if(v==="be")for(g=c.length-1;g>=p;g-=2)_=h(c,p,g)<<x,this.words[S]|=_&67108863,x>=18?(x-=18,S+=1,this.words[S]|=_>>>26):x+=8;else{var l=c.length-p;for(g=l%2===0?p+1:p;g<c.length;g+=2)_=h(c,p,g)<<x,this.words[S]|=_&67108863,x>=18?(x-=18,S+=1,this.words[S]|=_>>>26):x+=8}this.strip()};function b(f,c,p,v){for(var g=0,x=Math.min(f.length,p),S=c;S<x;S++){var _=f.charCodeAt(S)-48;g*=v,_>=49?g+=_-49+10:_>=17?g+=_-17+10:g+=_}return g}n.prototype._parseBase=function(c,p,v){this.words=[0],this.length=1;for(var g=0,x=1;x<=67108863;x*=p)g++;g--,x=x/p|0;for(var S=c.length-v,_=S%g,l=Math.min(S,S-_)+v,m=0,A=v;A<l;A+=g)m=b(c,A,A+g,p),this.imuln(x),this.words[0]+m<67108864?this.words[0]+=m:this._iaddn(m);if(_!==0){var U=1;for(m=b(c,A,c.length,p),A=0;A<_;A++)U*=p;this.imuln(U),this.words[0]+m<67108864?this.words[0]+=m:this._iaddn(m)}this.strip()},n.prototype.copy=function(c){c.words=new Array(this.length);for(var p=0;p<this.length;p++)c.words[p]=this.words[p];c.length=this.length,c.negative=this.negative,c.red=this.red},n.prototype.clone=function(){var c=new n(null);return this.copy(c),c},n.prototype._expand=function(c){for(;this.length<c;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var w=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],T=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],I=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(c,p){c=c||10,p=p|0||1;var v;if(c===16||c==="hex"){v="";for(var g=0,x=0,S=0;S<this.length;S++){var _=this.words[S],l=((_<<g|x)&16777215).toString(16);x=_>>>24-g&16777215,x!==0||S!==this.length-1?v=w[6-l.length]+l+v:v=l+v,g+=2,g>=26&&(g-=26,S--)}for(x!==0&&(v=x.toString(16)+v);v.length%p!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(c===(c|0)&&c>=2&&c<=36){var m=T[c],A=I[c];v="";var U=this.clone();for(U.negative=0;!U.isZero();){var j=U.modn(A).toString(c);U=U.idivn(A),U.isZero()?v=j+v:v=w[m-j.length]+j+v}for(this.isZero()&&(v="0"+v);v.length%p!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var c=this.words[0];return this.length===2?c+=this.words[1]*67108864:this.length===3&&this.words[2]===1?c+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-c:c},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(c,p){return r(typeof a<"u"),this.toArrayLike(a,c,p)},n.prototype.toArray=function(c,p){return this.toArrayLike(Array,c,p)},n.prototype.toArrayLike=function(c,p,v){var g=this.byteLength(),x=v||Math.max(1,g);r(g<=x,"byte array longer than desired length"),r(x>0,"Requested array length <= 0"),this.strip();var S=p==="le",_=new c(x),l,m,A=this.clone();if(S){for(m=0;!A.isZero();m++)l=A.andln(255),A.iushrn(8),_[m]=l;for(;m<x;m++)_[m]=0}else{for(m=0;m<x-g;m++)_[m]=0;for(m=0;!A.isZero();m++)l=A.andln(255),A.iushrn(8),_[x-m-1]=l}return _},Math.clz32?n.prototype._countBits=function(c){return 32-Math.clz32(c)}:n.prototype._countBits=function(c){var p=c,v=0;return p>=4096&&(v+=13,p>>>=13),p>=64&&(v+=7,p>>>=7),p>=8&&(v+=4,p>>>=4),p>=2&&(v+=2,p>>>=2),v+p},n.prototype._zeroBits=function(c){if(c===0)return 26;var p=c,v=0;return p&8191||(v+=13,p>>>=13),p&127||(v+=7,p>>>=7),p&15||(v+=4,p>>>=4),p&3||(v+=2,p>>>=2),p&1||v++,v},n.prototype.bitLength=function(){var c=this.words[this.length-1],p=this._countBits(c);return(this.length-1)*26+p};function B(f){for(var c=new Array(f.bitLength()),p=0;p<c.length;p++){var v=p/26|0,g=p%26;c[p]=(f.words[v]&1<<g)>>>g}return c}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,p=0;p<this.length;p++){var v=this._zeroBits(this.words[p]);if(c+=v,v!==26)break}return c},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(c){return this.negative!==0?this.abs().inotn(c).iaddn(1):this.clone()},n.prototype.fromTwos=function(c){return this.testn(c-1)?this.notn(c).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(c){for(;this.length<c.length;)this.words[this.length++]=0;for(var p=0;p<c.length;p++)this.words[p]=this.words[p]|c.words[p];return this.strip()},n.prototype.ior=function(c){return r((this.negative|c.negative)===0),this.iuor(c)},n.prototype.or=function(c){return this.length>c.length?this.clone().ior(c):c.clone().ior(this)},n.prototype.uor=function(c){return this.length>c.length?this.clone().iuor(c):c.clone().iuor(this)},n.prototype.iuand=function(c){var p;this.length>c.length?p=c:p=this;for(var v=0;v<p.length;v++)this.words[v]=this.words[v]&c.words[v];return this.length=p.length,this.strip()},n.prototype.iand=function(c){return r((this.negative|c.negative)===0),this.iuand(c)},n.prototype.and=function(c){return this.length>c.length?this.clone().iand(c):c.clone().iand(this)},n.prototype.uand=function(c){return this.length>c.length?this.clone().iuand(c):c.clone().iuand(this)},n.prototype.iuxor=function(c){var p,v;this.length>c.length?(p=this,v=c):(p=c,v=this);for(var g=0;g<v.length;g++)this.words[g]=p.words[g]^v.words[g];if(this!==p)for(;g<p.length;g++)this.words[g]=p.words[g];return this.length=p.length,this.strip()},n.prototype.ixor=function(c){return r((this.negative|c.negative)===0),this.iuxor(c)},n.prototype.xor=function(c){return this.length>c.length?this.clone().ixor(c):c.clone().ixor(this)},n.prototype.uxor=function(c){return this.length>c.length?this.clone().iuxor(c):c.clone().iuxor(this)},n.prototype.inotn=function(c){r(typeof c=="number"&&c>=0);var p=Math.ceil(c/26)|0,v=c%26;this._expand(p),v>0&&p--;for(var g=0;g<p;g++)this.words[g]=~this.words[g]&67108863;return v>0&&(this.words[g]=~this.words[g]&67108863>>26-v),this.strip()},n.prototype.notn=function(c){return this.clone().inotn(c)},n.prototype.setn=function(c,p){r(typeof c=="number"&&c>=0);var v=c/26|0,g=c%26;return this._expand(v+1),p?this.words[v]=this.words[v]|1<<g:this.words[v]=this.words[v]&~(1<<g),this.strip()},n.prototype.iadd=function(c){var p;if(this.negative!==0&&c.negative===0)return this.negative=0,p=this.isub(c),this.negative^=1,this._normSign();if(this.negative===0&&c.negative!==0)return c.negative=0,p=this.isub(c),c.negative=1,p._normSign();var v,g;this.length>c.length?(v=this,g=c):(v=c,g=this);for(var x=0,S=0;S<g.length;S++)p=(v.words[S]|0)+(g.words[S]|0)+x,this.words[S]=p&67108863,x=p>>>26;for(;x!==0&&S<v.length;S++)p=(v.words[S]|0)+x,this.words[S]=p&67108863,x=p>>>26;if(this.length=v.length,x!==0)this.words[this.length]=x,this.length++;else if(v!==this)for(;S<v.length;S++)this.words[S]=v.words[S];return this},n.prototype.add=function(c){var p;return c.negative!==0&&this.negative===0?(c.negative=0,p=this.sub(c),c.negative^=1,p):c.negative===0&&this.negative!==0?(this.negative=0,p=c.sub(this),this.negative=1,p):this.length>c.length?this.clone().iadd(c):c.clone().iadd(this)},n.prototype.isub=function(c){if(c.negative!==0){c.negative=0;var p=this.iadd(c);return c.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var v=this.cmp(c);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var g,x;v>0?(g=this,x=c):(g=c,x=this);for(var S=0,_=0;_<x.length;_++)p=(g.words[_]|0)-(x.words[_]|0)+S,S=p>>26,this.words[_]=p&67108863;for(;S!==0&&_<g.length;_++)p=(g.words[_]|0)+S,S=p>>26,this.words[_]=p&67108863;if(S===0&&_<g.length&&g!==this)for(;_<g.length;_++)this.words[_]=g.words[_];return this.length=Math.max(this.length,_),g!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(c){return this.clone().isub(c)};function M(f,c,p){p.negative=c.negative^f.negative;var v=f.length+c.length|0;p.length=v,v=v-1|0;var g=f.words[0]|0,x=c.words[0]|0,S=g*x,_=S&67108863,l=S/67108864|0;p.words[0]=_;for(var m=1;m<v;m++){for(var A=l>>>26,U=l&67108863,j=Math.min(m,c.length-1),Z=Math.max(0,m-f.length+1);Z<=j;Z++){var se=m-Z|0;g=f.words[se]|0,x=c.words[Z]|0,S=g*x+U,A+=S/67108864|0,U=S&67108863}p.words[m]=U|0,l=A|0}return l!==0?p.words[m]=l|0:p.length--,p.strip()}var P=function(c,p,v){var g=c.words,x=p.words,S=v.words,_=0,l,m,A,U=g[0]|0,j=U&8191,Z=U>>>13,se=g[1]|0,ae=se&8191,he=se>>>13,Ee=g[2]|0,me=Ee&8191,dt=Ee>>>13,St=g[3]|0,Oe=St&8191,st=St>>>13,rt=g[4]|0,Re=rt&8191,Ae=rt>>>13,Kt=g[5]|0,We=Kt&8191,At=Kt>>>13,bt=g[6]|0,De=bt&8191,Pt=bt>>>13,Qt=g[7]|0,Ue=Qt&8191,er=Qt>>>13,Ot=g[8]|0,Le=Ot&8191,Ct=Ot>>>13,Lt=g[9]|0,qe=Lt&8191,Dt=Lt>>>13,Ut=x[0]|0,Fe=Ut&8191,qt=Ut>>>13,Ft=x[1]|0,He=Ft&8191,tr=Ft>>>13,rr=x[2]|0,Ke=rr&8191,Gt=rr>>>13,$t=x[3]|0,Ge=$t&8191,ir=$t>>>13,nr=x[4]|0,$e=nr&8191,Xt=nr>>>13,sr=x[5]|0,Xe=sr&8191,ar=sr>>>13,Ht=x[6]|0,Ye=Ht&8191,zt=Ht>>>13,or=x[7]|0,Ze=or&8191,cr=or>>>13,ur=x[8]|0,Je=ur&8191,fr=ur>>>13,lr=x[9]|0,Qe=lr&8191,jt=lr>>>13;v.negative=c.negative^p.negative,v.length=19,l=Math.imul(j,Fe),m=Math.imul(j,qt),m=m+Math.imul(Z,Fe)|0,A=Math.imul(Z,qt);var Rs=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Rs>>>26)|0,Rs&=67108863,l=Math.imul(ae,Fe),m=Math.imul(ae,qt),m=m+Math.imul(he,Fe)|0,A=Math.imul(he,qt),l=l+Math.imul(j,He)|0,m=m+Math.imul(j,tr)|0,m=m+Math.imul(Z,He)|0,A=A+Math.imul(Z,tr)|0;var As=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(As>>>26)|0,As&=67108863,l=Math.imul(me,Fe),m=Math.imul(me,qt),m=m+Math.imul(dt,Fe)|0,A=Math.imul(dt,qt),l=l+Math.imul(ae,He)|0,m=m+Math.imul(ae,tr)|0,m=m+Math.imul(he,He)|0,A=A+Math.imul(he,tr)|0,l=l+Math.imul(j,Ke)|0,m=m+Math.imul(j,Gt)|0,m=m+Math.imul(Z,Ke)|0,A=A+Math.imul(Z,Gt)|0;var Os=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Os>>>26)|0,Os&=67108863,l=Math.imul(Oe,Fe),m=Math.imul(Oe,qt),m=m+Math.imul(st,Fe)|0,A=Math.imul(st,qt),l=l+Math.imul(me,He)|0,m=m+Math.imul(me,tr)|0,m=m+Math.imul(dt,He)|0,A=A+Math.imul(dt,tr)|0,l=l+Math.imul(ae,Ke)|0,m=m+Math.imul(ae,Gt)|0,m=m+Math.imul(he,Ke)|0,A=A+Math.imul(he,Gt)|0,l=l+Math.imul(j,Ge)|0,m=m+Math.imul(j,ir)|0,m=m+Math.imul(Z,Ge)|0,A=A+Math.imul(Z,ir)|0;var ks=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(ks>>>26)|0,ks&=67108863,l=Math.imul(Re,Fe),m=Math.imul(Re,qt),m=m+Math.imul(Ae,Fe)|0,A=Math.imul(Ae,qt),l=l+Math.imul(Oe,He)|0,m=m+Math.imul(Oe,tr)|0,m=m+Math.imul(st,He)|0,A=A+Math.imul(st,tr)|0,l=l+Math.imul(me,Ke)|0,m=m+Math.imul(me,Gt)|0,m=m+Math.imul(dt,Ke)|0,A=A+Math.imul(dt,Gt)|0,l=l+Math.imul(ae,Ge)|0,m=m+Math.imul(ae,ir)|0,m=m+Math.imul(he,Ge)|0,A=A+Math.imul(he,ir)|0,l=l+Math.imul(j,$e)|0,m=m+Math.imul(j,Xt)|0,m=m+Math.imul(Z,$e)|0,A=A+Math.imul(Z,Xt)|0;var Ns=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Ns>>>26)|0,Ns&=67108863,l=Math.imul(We,Fe),m=Math.imul(We,qt),m=m+Math.imul(At,Fe)|0,A=Math.imul(At,qt),l=l+Math.imul(Re,He)|0,m=m+Math.imul(Re,tr)|0,m=m+Math.imul(Ae,He)|0,A=A+Math.imul(Ae,tr)|0,l=l+Math.imul(Oe,Ke)|0,m=m+Math.imul(Oe,Gt)|0,m=m+Math.imul(st,Ke)|0,A=A+Math.imul(st,Gt)|0,l=l+Math.imul(me,Ge)|0,m=m+Math.imul(me,ir)|0,m=m+Math.imul(dt,Ge)|0,A=A+Math.imul(dt,ir)|0,l=l+Math.imul(ae,$e)|0,m=m+Math.imul(ae,Xt)|0,m=m+Math.imul(he,$e)|0,A=A+Math.imul(he,Xt)|0,l=l+Math.imul(j,Xe)|0,m=m+Math.imul(j,ar)|0,m=m+Math.imul(Z,Xe)|0,A=A+Math.imul(Z,ar)|0;var Ps=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Ps>>>26)|0,Ps&=67108863,l=Math.imul(De,Fe),m=Math.imul(De,qt),m=m+Math.imul(Pt,Fe)|0,A=Math.imul(Pt,qt),l=l+Math.imul(We,He)|0,m=m+Math.imul(We,tr)|0,m=m+Math.imul(At,He)|0,A=A+Math.imul(At,tr)|0,l=l+Math.imul(Re,Ke)|0,m=m+Math.imul(Re,Gt)|0,m=m+Math.imul(Ae,Ke)|0,A=A+Math.imul(Ae,Gt)|0,l=l+Math.imul(Oe,Ge)|0,m=m+Math.imul(Oe,ir)|0,m=m+Math.imul(st,Ge)|0,A=A+Math.imul(st,ir)|0,l=l+Math.imul(me,$e)|0,m=m+Math.imul(me,Xt)|0,m=m+Math.imul(dt,$e)|0,A=A+Math.imul(dt,Xt)|0,l=l+Math.imul(ae,Xe)|0,m=m+Math.imul(ae,ar)|0,m=m+Math.imul(he,Xe)|0,A=A+Math.imul(he,ar)|0,l=l+Math.imul(j,Ye)|0,m=m+Math.imul(j,zt)|0,m=m+Math.imul(Z,Ye)|0,A=A+Math.imul(Z,zt)|0;var sn=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(sn>>>26)|0,sn&=67108863,l=Math.imul(Ue,Fe),m=Math.imul(Ue,qt),m=m+Math.imul(er,Fe)|0,A=Math.imul(er,qt),l=l+Math.imul(De,He)|0,m=m+Math.imul(De,tr)|0,m=m+Math.imul(Pt,He)|0,A=A+Math.imul(Pt,tr)|0,l=l+Math.imul(We,Ke)|0,m=m+Math.imul(We,Gt)|0,m=m+Math.imul(At,Ke)|0,A=A+Math.imul(At,Gt)|0,l=l+Math.imul(Re,Ge)|0,m=m+Math.imul(Re,ir)|0,m=m+Math.imul(Ae,Ge)|0,A=A+Math.imul(Ae,ir)|0,l=l+Math.imul(Oe,$e)|0,m=m+Math.imul(Oe,Xt)|0,m=m+Math.imul(st,$e)|0,A=A+Math.imul(st,Xt)|0,l=l+Math.imul(me,Xe)|0,m=m+Math.imul(me,ar)|0,m=m+Math.imul(dt,Xe)|0,A=A+Math.imul(dt,ar)|0,l=l+Math.imul(ae,Ye)|0,m=m+Math.imul(ae,zt)|0,m=m+Math.imul(he,Ye)|0,A=A+Math.imul(he,zt)|0,l=l+Math.imul(j,Ze)|0,m=m+Math.imul(j,cr)|0,m=m+Math.imul(Z,Ze)|0,A=A+Math.imul(Z,cr)|0;var Bs=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,l=Math.imul(Le,Fe),m=Math.imul(Le,qt),m=m+Math.imul(Ct,Fe)|0,A=Math.imul(Ct,qt),l=l+Math.imul(Ue,He)|0,m=m+Math.imul(Ue,tr)|0,m=m+Math.imul(er,He)|0,A=A+Math.imul(er,tr)|0,l=l+Math.imul(De,Ke)|0,m=m+Math.imul(De,Gt)|0,m=m+Math.imul(Pt,Ke)|0,A=A+Math.imul(Pt,Gt)|0,l=l+Math.imul(We,Ge)|0,m=m+Math.imul(We,ir)|0,m=m+Math.imul(At,Ge)|0,A=A+Math.imul(At,ir)|0,l=l+Math.imul(Re,$e)|0,m=m+Math.imul(Re,Xt)|0,m=m+Math.imul(Ae,$e)|0,A=A+Math.imul(Ae,Xt)|0,l=l+Math.imul(Oe,Xe)|0,m=m+Math.imul(Oe,ar)|0,m=m+Math.imul(st,Xe)|0,A=A+Math.imul(st,ar)|0,l=l+Math.imul(me,Ye)|0,m=m+Math.imul(me,zt)|0,m=m+Math.imul(dt,Ye)|0,A=A+Math.imul(dt,zt)|0,l=l+Math.imul(ae,Ze)|0,m=m+Math.imul(ae,cr)|0,m=m+Math.imul(he,Ze)|0,A=A+Math.imul(he,cr)|0,l=l+Math.imul(j,Je)|0,m=m+Math.imul(j,fr)|0,m=m+Math.imul(Z,Je)|0,A=A+Math.imul(Z,fr)|0;var an=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(an>>>26)|0,an&=67108863,l=Math.imul(qe,Fe),m=Math.imul(qe,qt),m=m+Math.imul(Dt,Fe)|0,A=Math.imul(Dt,qt),l=l+Math.imul(Le,He)|0,m=m+Math.imul(Le,tr)|0,m=m+Math.imul(Ct,He)|0,A=A+Math.imul(Ct,tr)|0,l=l+Math.imul(Ue,Ke)|0,m=m+Math.imul(Ue,Gt)|0,m=m+Math.imul(er,Ke)|0,A=A+Math.imul(er,Gt)|0,l=l+Math.imul(De,Ge)|0,m=m+Math.imul(De,ir)|0,m=m+Math.imul(Pt,Ge)|0,A=A+Math.imul(Pt,ir)|0,l=l+Math.imul(We,$e)|0,m=m+Math.imul(We,Xt)|0,m=m+Math.imul(At,$e)|0,A=A+Math.imul(At,Xt)|0,l=l+Math.imul(Re,Xe)|0,m=m+Math.imul(Re,ar)|0,m=m+Math.imul(Ae,Xe)|0,A=A+Math.imul(Ae,ar)|0,l=l+Math.imul(Oe,Ye)|0,m=m+Math.imul(Oe,zt)|0,m=m+Math.imul(st,Ye)|0,A=A+Math.imul(st,zt)|0,l=l+Math.imul(me,Ze)|0,m=m+Math.imul(me,cr)|0,m=m+Math.imul(dt,Ze)|0,A=A+Math.imul(dt,cr)|0,l=l+Math.imul(ae,Je)|0,m=m+Math.imul(ae,fr)|0,m=m+Math.imul(he,Je)|0,A=A+Math.imul(he,fr)|0,l=l+Math.imul(j,Qe)|0,m=m+Math.imul(j,jt)|0,m=m+Math.imul(Z,Qe)|0,A=A+Math.imul(Z,jt)|0;var Ms=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Ms>>>26)|0,Ms&=67108863,l=Math.imul(qe,He),m=Math.imul(qe,tr),m=m+Math.imul(Dt,He)|0,A=Math.imul(Dt,tr),l=l+Math.imul(Le,Ke)|0,m=m+Math.imul(Le,Gt)|0,m=m+Math.imul(Ct,Ke)|0,A=A+Math.imul(Ct,Gt)|0,l=l+Math.imul(Ue,Ge)|0,m=m+Math.imul(Ue,ir)|0,m=m+Math.imul(er,Ge)|0,A=A+Math.imul(er,ir)|0,l=l+Math.imul(De,$e)|0,m=m+Math.imul(De,Xt)|0,m=m+Math.imul(Pt,$e)|0,A=A+Math.imul(Pt,Xt)|0,l=l+Math.imul(We,Xe)|0,m=m+Math.imul(We,ar)|0,m=m+Math.imul(At,Xe)|0,A=A+Math.imul(At,ar)|0,l=l+Math.imul(Re,Ye)|0,m=m+Math.imul(Re,zt)|0,m=m+Math.imul(Ae,Ye)|0,A=A+Math.imul(Ae,zt)|0,l=l+Math.imul(Oe,Ze)|0,m=m+Math.imul(Oe,cr)|0,m=m+Math.imul(st,Ze)|0,A=A+Math.imul(st,cr)|0,l=l+Math.imul(me,Je)|0,m=m+Math.imul(me,fr)|0,m=m+Math.imul(dt,Je)|0,A=A+Math.imul(dt,fr)|0,l=l+Math.imul(ae,Qe)|0,m=m+Math.imul(ae,jt)|0,m=m+Math.imul(he,Qe)|0,A=A+Math.imul(he,jt)|0;var Cs=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Cs>>>26)|0,Cs&=67108863,l=Math.imul(qe,Ke),m=Math.imul(qe,Gt),m=m+Math.imul(Dt,Ke)|0,A=Math.imul(Dt,Gt),l=l+Math.imul(Le,Ge)|0,m=m+Math.imul(Le,ir)|0,m=m+Math.imul(Ct,Ge)|0,A=A+Math.imul(Ct,ir)|0,l=l+Math.imul(Ue,$e)|0,m=m+Math.imul(Ue,Xt)|0,m=m+Math.imul(er,$e)|0,A=A+Math.imul(er,Xt)|0,l=l+Math.imul(De,Xe)|0,m=m+Math.imul(De,ar)|0,m=m+Math.imul(Pt,Xe)|0,A=A+Math.imul(Pt,ar)|0,l=l+Math.imul(We,Ye)|0,m=m+Math.imul(We,zt)|0,m=m+Math.imul(At,Ye)|0,A=A+Math.imul(At,zt)|0,l=l+Math.imul(Re,Ze)|0,m=m+Math.imul(Re,cr)|0,m=m+Math.imul(Ae,Ze)|0,A=A+Math.imul(Ae,cr)|0,l=l+Math.imul(Oe,Je)|0,m=m+Math.imul(Oe,fr)|0,m=m+Math.imul(st,Je)|0,A=A+Math.imul(st,fr)|0,l=l+Math.imul(me,Qe)|0,m=m+Math.imul(me,jt)|0,m=m+Math.imul(dt,Qe)|0,A=A+Math.imul(dt,jt)|0;var Ls=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Ls>>>26)|0,Ls&=67108863,l=Math.imul(qe,Ge),m=Math.imul(qe,ir),m=m+Math.imul(Dt,Ge)|0,A=Math.imul(Dt,ir),l=l+Math.imul(Le,$e)|0,m=m+Math.imul(Le,Xt)|0,m=m+Math.imul(Ct,$e)|0,A=A+Math.imul(Ct,Xt)|0,l=l+Math.imul(Ue,Xe)|0,m=m+Math.imul(Ue,ar)|0,m=m+Math.imul(er,Xe)|0,A=A+Math.imul(er,ar)|0,l=l+Math.imul(De,Ye)|0,m=m+Math.imul(De,zt)|0,m=m+Math.imul(Pt,Ye)|0,A=A+Math.imul(Pt,zt)|0,l=l+Math.imul(We,Ze)|0,m=m+Math.imul(We,cr)|0,m=m+Math.imul(At,Ze)|0,A=A+Math.imul(At,cr)|0,l=l+Math.imul(Re,Je)|0,m=m+Math.imul(Re,fr)|0,m=m+Math.imul(Ae,Je)|0,A=A+Math.imul(Ae,fr)|0,l=l+Math.imul(Oe,Qe)|0,m=m+Math.imul(Oe,jt)|0,m=m+Math.imul(st,Qe)|0,A=A+Math.imul(st,jt)|0;var is=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(is>>>26)|0,is&=67108863,l=Math.imul(qe,$e),m=Math.imul(qe,Xt),m=m+Math.imul(Dt,$e)|0,A=Math.imul(Dt,Xt),l=l+Math.imul(Le,Xe)|0,m=m+Math.imul(Le,ar)|0,m=m+Math.imul(Ct,Xe)|0,A=A+Math.imul(Ct,ar)|0,l=l+Math.imul(Ue,Ye)|0,m=m+Math.imul(Ue,zt)|0,m=m+Math.imul(er,Ye)|0,A=A+Math.imul(er,zt)|0,l=l+Math.imul(De,Ze)|0,m=m+Math.imul(De,cr)|0,m=m+Math.imul(Pt,Ze)|0,A=A+Math.imul(Pt,cr)|0,l=l+Math.imul(We,Je)|0,m=m+Math.imul(We,fr)|0,m=m+Math.imul(At,Je)|0,A=A+Math.imul(At,fr)|0,l=l+Math.imul(Re,Qe)|0,m=m+Math.imul(Re,jt)|0,m=m+Math.imul(Ae,Qe)|0,A=A+Math.imul(Ae,jt)|0;var ns=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(ns>>>26)|0,ns&=67108863,l=Math.imul(qe,Xe),m=Math.imul(qe,ar),m=m+Math.imul(Dt,Xe)|0,A=Math.imul(Dt,ar),l=l+Math.imul(Le,Ye)|0,m=m+Math.imul(Le,zt)|0,m=m+Math.imul(Ct,Ye)|0,A=A+Math.imul(Ct,zt)|0,l=l+Math.imul(Ue,Ze)|0,m=m+Math.imul(Ue,cr)|0,m=m+Math.imul(er,Ze)|0,A=A+Math.imul(er,cr)|0,l=l+Math.imul(De,Je)|0,m=m+Math.imul(De,fr)|0,m=m+Math.imul(Pt,Je)|0,A=A+Math.imul(Pt,fr)|0,l=l+Math.imul(We,Qe)|0,m=m+Math.imul(We,jt)|0,m=m+Math.imul(At,Qe)|0,A=A+Math.imul(At,jt)|0;var ss=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(ss>>>26)|0,ss&=67108863,l=Math.imul(qe,Ye),m=Math.imul(qe,zt),m=m+Math.imul(Dt,Ye)|0,A=Math.imul(Dt,zt),l=l+Math.imul(Le,Ze)|0,m=m+Math.imul(Le,cr)|0,m=m+Math.imul(Ct,Ze)|0,A=A+Math.imul(Ct,cr)|0,l=l+Math.imul(Ue,Je)|0,m=m+Math.imul(Ue,fr)|0,m=m+Math.imul(er,Je)|0,A=A+Math.imul(er,fr)|0,l=l+Math.imul(De,Qe)|0,m=m+Math.imul(De,jt)|0,m=m+Math.imul(Pt,Qe)|0,A=A+Math.imul(Pt,jt)|0;var Ds=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Ds>>>26)|0,Ds&=67108863,l=Math.imul(qe,Ze),m=Math.imul(qe,cr),m=m+Math.imul(Dt,Ze)|0,A=Math.imul(Dt,cr),l=l+Math.imul(Le,Je)|0,m=m+Math.imul(Le,fr)|0,m=m+Math.imul(Ct,Je)|0,A=A+Math.imul(Ct,fr)|0,l=l+Math.imul(Ue,Qe)|0,m=m+Math.imul(Ue,jt)|0,m=m+Math.imul(er,Qe)|0,A=A+Math.imul(er,jt)|0;var Us=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(Us>>>26)|0,Us&=67108863,l=Math.imul(qe,Je),m=Math.imul(qe,fr),m=m+Math.imul(Dt,Je)|0,A=Math.imul(Dt,fr),l=l+Math.imul(Le,Qe)|0,m=m+Math.imul(Le,jt)|0,m=m+Math.imul(Ct,Qe)|0,A=A+Math.imul(Ct,jt)|0;var qs=(_+l|0)+((m&8191)<<13)|0;_=(A+(m>>>13)|0)+(qs>>>26)|0,qs&=67108863,l=Math.imul(qe,Qe),m=Math.imul(qe,jt),m=m+Math.imul(Dt,Qe)|0,A=Math.imul(Dt,jt);var Ku=(_+l|0)+((m&8191)<<13)|0;return _=(A+(m>>>13)|0)+(Ku>>>26)|0,Ku&=67108863,S[0]=Rs,S[1]=As,S[2]=Os,S[3]=ks,S[4]=Ns,S[5]=Ps,S[6]=sn,S[7]=Bs,S[8]=an,S[9]=Ms,S[10]=Cs,S[11]=Ls,S[12]=is,S[13]=ns,S[14]=ss,S[15]=Ds,S[16]=Us,S[17]=qs,S[18]=Ku,_!==0&&(S[19]=_,v.length++),v};Math.imul||(P=M);function L(f,c,p){p.negative=c.negative^f.negative,p.length=f.length+c.length;for(var v=0,g=0,x=0;x<p.length-1;x++){var S=g;g=0;for(var _=v&67108863,l=Math.min(x,c.length-1),m=Math.max(0,x-f.length+1);m<=l;m++){var A=x-m,U=f.words[A]|0,j=c.words[m]|0,Z=U*j,se=Z&67108863;S=S+(Z/67108864|0)|0,se=se+_|0,_=se&67108863,S=S+(se>>>26)|0,g+=S>>>26,S&=67108863}p.words[x]=_,v=S,S=g}return v!==0?p.words[x]=v:p.length--,p.strip()}function X(f,c,p){var v=new W;return v.mulp(f,c,p)}n.prototype.mulTo=function(c,p){var v,g=this.length+c.length;return this.length===10&&c.length===10?v=P(this,c,p):g<63?v=M(this,c,p):g<1024?v=L(this,c,p):v=X(this,c,p),v};function W(f,c){this.x=f,this.y=c}W.prototype.makeRBT=function(c){for(var p=new Array(c),v=n.prototype._countBits(c)-1,g=0;g<c;g++)p[g]=this.revBin(g,v,c);return p},W.prototype.revBin=function(c,p,v){if(c===0||c===v-1)return c;for(var g=0,x=0;x<p;x++)g|=(c&1)<<p-x-1,c>>=1;return g},W.prototype.permute=function(c,p,v,g,x,S){for(var _=0;_<S;_++)g[_]=p[c[_]],x[_]=v[c[_]]},W.prototype.transform=function(c,p,v,g,x,S){this.permute(S,c,p,v,g,x);for(var _=1;_<x;_<<=1)for(var l=_<<1,m=Math.cos(2*Math.PI/l),A=Math.sin(2*Math.PI/l),U=0;U<x;U+=l)for(var j=m,Z=A,se=0;se<_;se++){var ae=v[U+se],he=g[U+se],Ee=v[U+se+_],me=g[U+se+_],dt=j*Ee-Z*me;me=j*me+Z*Ee,Ee=dt,v[U+se]=ae+Ee,g[U+se]=he+me,v[U+se+_]=ae-Ee,g[U+se+_]=he-me,se!==l&&(dt=m*j-A*Z,Z=m*Z+A*j,j=dt)}},W.prototype.guessLen13b=function(c,p){var v=Math.max(p,c)|1,g=v&1,x=0;for(v=v/2|0;v;v=v>>>1)x++;return 1<<x+1+g},W.prototype.conjugate=function(c,p,v){if(!(v<=1))for(var g=0;g<v/2;g++){var x=c[g];c[g]=c[v-g-1],c[v-g-1]=x,x=p[g],p[g]=-p[v-g-1],p[v-g-1]=-x}},W.prototype.normalize13b=function(c,p){for(var v=0,g=0;g<p/2;g++){var x=Math.round(c[2*g+1]/p)*8192+Math.round(c[2*g]/p)+v;c[g]=x&67108863,x<67108864?v=0:v=x/67108864|0}return c},W.prototype.convert13b=function(c,p,v,g){for(var x=0,S=0;S<p;S++)x=x+(c[S]|0),v[2*S]=x&8191,x=x>>>13,v[2*S+1]=x&8191,x=x>>>13;for(S=2*p;S<g;++S)v[S]=0;r(x===0),r((x&-8192)===0)},W.prototype.stub=function(c){for(var p=new Array(c),v=0;v<c;v++)p[v]=0;return p},W.prototype.mulp=function(c,p,v){var g=2*this.guessLen13b(c.length,p.length),x=this.makeRBT(g),S=this.stub(g),_=new Array(g),l=new Array(g),m=new Array(g),A=new Array(g),U=new Array(g),j=new Array(g),Z=v.words;Z.length=g,this.convert13b(c.words,c.length,_,g),this.convert13b(p.words,p.length,A,g),this.transform(_,S,l,m,g,x),this.transform(A,S,U,j,g,x);for(var se=0;se<g;se++){var ae=l[se]*U[se]-m[se]*j[se];m[se]=l[se]*j[se]+m[se]*U[se],l[se]=ae}return this.conjugate(l,m,g),this.transform(l,m,Z,S,g,x),this.conjugate(Z,S,g),this.normalize13b(Z,g),v.negative=c.negative^p.negative,v.length=c.length+p.length,v.strip()},n.prototype.mul=function(c){var p=new n(null);return p.words=new Array(this.length+c.length),this.mulTo(c,p)},n.prototype.mulf=function(c){var p=new n(null);return p.words=new Array(this.length+c.length),X(this,c,p)},n.prototype.imul=function(c){return this.clone().mulTo(c,this)},n.prototype.imuln=function(c){r(typeof c=="number"),r(c<67108864);for(var p=0,v=0;v<this.length;v++){var g=(this.words[v]|0)*c,x=(g&67108863)+(p&67108863);p>>=26,p+=g/67108864|0,p+=x>>>26,this.words[v]=x&67108863}return p!==0&&(this.words[v]=p,this.length++),this},n.prototype.muln=function(c){return this.clone().imuln(c)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(c){var p=B(c);if(p.length===0)return new n(1);for(var v=this,g=0;g<p.length&&p[g]===0;g++,v=v.sqr());if(++g<p.length)for(var x=v.sqr();g<p.length;g++,x=x.sqr())p[g]!==0&&(v=v.mul(x));return v},n.prototype.iushln=function(c){r(typeof c=="number"&&c>=0);var p=c%26,v=(c-p)/26,g=67108863>>>26-p<<26-p,x;if(p!==0){var S=0;for(x=0;x<this.length;x++){var _=this.words[x]&g,l=(this.words[x]|0)-_<<p;this.words[x]=l|S,S=_>>>26-p}S&&(this.words[x]=S,this.length++)}if(v!==0){for(x=this.length-1;x>=0;x--)this.words[x+v]=this.words[x];for(x=0;x<v;x++)this.words[x]=0;this.length+=v}return this.strip()},n.prototype.ishln=function(c){return r(this.negative===0),this.iushln(c)},n.prototype.iushrn=function(c,p,v){r(typeof c=="number"&&c>=0);var g;p?g=(p-p%26)/26:g=0;var x=c%26,S=Math.min((c-x)/26,this.length),_=67108863^67108863>>>x<<x,l=v;if(g-=S,g=Math.max(0,g),l){for(var m=0;m<S;m++)l.words[m]=this.words[m];l.length=S}if(S!==0)if(this.length>S)for(this.length-=S,m=0;m<this.length;m++)this.words[m]=this.words[m+S];else this.words[0]=0,this.length=1;var A=0;for(m=this.length-1;m>=0&&(A!==0||m>=g);m--){var U=this.words[m]|0;this.words[m]=A<<26-x|U>>>x,A=U&_}return l&&A!==0&&(l.words[l.length++]=A),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(c,p,v){return r(this.negative===0),this.iushrn(c,p,v)},n.prototype.shln=function(c){return this.clone().ishln(c)},n.prototype.ushln=function(c){return this.clone().iushln(c)},n.prototype.shrn=function(c){return this.clone().ishrn(c)},n.prototype.ushrn=function(c){return this.clone().iushrn(c)},n.prototype.testn=function(c){r(typeof c=="number"&&c>=0);var p=c%26,v=(c-p)/26,g=1<<p;if(this.length<=v)return!1;var x=this.words[v];return!!(x&g)},n.prototype.imaskn=function(c){r(typeof c=="number"&&c>=0);var p=c%26,v=(c-p)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(p!==0&&v++,this.length=Math.min(v,this.length),p!==0){var g=67108863^67108863>>>p<<p;this.words[this.length-1]&=g}return this.strip()},n.prototype.maskn=function(c){return this.clone().imaskn(c)},n.prototype.iaddn=function(c){return r(typeof c=="number"),r(c<67108864),c<0?this.isubn(-c):this.negative!==0?this.length===1&&(this.words[0]|0)<c?(this.words[0]=c-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(c),this.negative=1,this):this._iaddn(c)},n.prototype._iaddn=function(c){this.words[0]+=c;for(var p=0;p<this.length&&this.words[p]>=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},n.prototype.isubn=function(c){if(r(typeof c=="number"),r(c<67108864),c<0)return this.iaddn(-c);if(this.negative!==0)return this.negative=0,this.iaddn(c),this.negative=1,this;if(this.words[0]-=c,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p<this.length&&this.words[p]<0;p++)this.words[p]+=67108864,this.words[p+1]-=1;return this.strip()},n.prototype.addn=function(c){return this.clone().iaddn(c)},n.prototype.subn=function(c){return this.clone().isubn(c)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(c,p,v){var g=c.length+v,x;this._expand(g);var S,_=0;for(x=0;x<c.length;x++){S=(this.words[x+v]|0)+_;var l=(c.words[x]|0)*p;S-=l&67108863,_=(S>>26)-(l/67108864|0),this.words[x+v]=S&67108863}for(;x<this.length-v;x++)S=(this.words[x+v]|0)+_,_=S>>26,this.words[x+v]=S&67108863;if(_===0)return this.strip();for(r(_===-1),_=0,x=0;x<this.length;x++)S=-(this.words[x]|0)+_,_=S>>26,this.words[x]=S&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(c,p){var v=this.length-c.length,g=this.clone(),x=c,S=x.words[x.length-1]|0,_=this._countBits(S);v=26-_,v!==0&&(x=x.ushln(v),g.iushln(v),S=x.words[x.length-1]|0);var l=g.length-x.length,m;if(p!=="mod"){m=new n(null),m.length=l+1,m.words=new Array(m.length);for(var A=0;A<m.length;A++)m.words[A]=0}var U=g.clone()._ishlnsubmul(x,1,l);U.negative===0&&(g=U,m&&(m.words[l]=1));for(var j=l-1;j>=0;j--){var Z=(g.words[x.length+j]|0)*67108864+(g.words[x.length+j-1]|0);for(Z=Math.min(Z/S|0,67108863),g._ishlnsubmul(x,Z,j);g.negative!==0;)Z--,g.negative=0,g._ishlnsubmul(x,1,j),g.isZero()||(g.negative^=1);m&&(m.words[j]=Z)}return m&&m.strip(),g.strip(),p!=="div"&&v!==0&&g.iushrn(v),{div:m||null,mod:g}},n.prototype.divmod=function(c,p,v){if(r(!c.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var g,x,S;return this.negative!==0&&c.negative===0?(S=this.neg().divmod(c,p),p!=="mod"&&(g=S.div.neg()),p!=="div"&&(x=S.mod.neg(),v&&x.negative!==0&&x.iadd(c)),{div:g,mod:x}):this.negative===0&&c.negative!==0?(S=this.divmod(c.neg(),p),p!=="mod"&&(g=S.div.neg()),{div:g,mod:S.mod}):this.negative&c.negative?(S=this.neg().divmod(c.neg(),p),p!=="div"&&(x=S.mod.neg(),v&&x.negative!==0&&x.isub(c)),{div:S.div,mod:x}):c.length>this.length||this.cmp(c)<0?{div:new n(0),mod:this}:c.length===1?p==="div"?{div:this.divn(c.words[0]),mod:null}:p==="mod"?{div:null,mod:new n(this.modn(c.words[0]))}:{div:this.divn(c.words[0]),mod:new n(this.modn(c.words[0]))}:this._wordDiv(c,p)},n.prototype.div=function(c){return this.divmod(c,"div",!1).div},n.prototype.mod=function(c){return this.divmod(c,"mod",!1).mod},n.prototype.umod=function(c){return this.divmod(c,"mod",!0).mod},n.prototype.divRound=function(c){var p=this.divmod(c);if(p.mod.isZero())return p.div;var v=p.div.negative!==0?p.mod.isub(c):p.mod,g=c.ushrn(1),x=c.andln(1),S=v.cmp(g);return S<0||x===1&&S===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},n.prototype.modn=function(c){r(c<=67108863);for(var p=(1<<26)%c,v=0,g=this.length-1;g>=0;g--)v=(p*v+(this.words[g]|0))%c;return v},n.prototype.idivn=function(c){r(c<=67108863);for(var p=0,v=this.length-1;v>=0;v--){var g=(this.words[v]|0)+p*67108864;this.words[v]=g/c|0,p=g%c}return this.strip()},n.prototype.divn=function(c){return this.clone().idivn(c)},n.prototype.egcd=function(c){r(c.negative===0),r(!c.isZero());var p=this,v=c.clone();p.negative!==0?p=p.umod(c):p=p.clone();for(var g=new n(1),x=new n(0),S=new n(0),_=new n(1),l=0;p.isEven()&&v.isEven();)p.iushrn(1),v.iushrn(1),++l;for(var m=v.clone(),A=p.clone();!p.isZero();){for(var U=0,j=1;!(p.words[0]&j)&&U<26;++U,j<<=1);if(U>0)for(p.iushrn(U);U-- >0;)(g.isOdd()||x.isOdd())&&(g.iadd(m),x.isub(A)),g.iushrn(1),x.iushrn(1);for(var Z=0,se=1;!(v.words[0]&se)&&Z<26;++Z,se<<=1);if(Z>0)for(v.iushrn(Z);Z-- >0;)(S.isOdd()||_.isOdd())&&(S.iadd(m),_.isub(A)),S.iushrn(1),_.iushrn(1);p.cmp(v)>=0?(p.isub(v),g.isub(S),x.isub(_)):(v.isub(p),S.isub(g),_.isub(x))}return{a:S,b:_,gcd:v.iushln(l)}},n.prototype._invmp=function(c){r(c.negative===0),r(!c.isZero());var p=this,v=c.clone();p.negative!==0?p=p.umod(c):p=p.clone();for(var g=new n(1),x=new n(0),S=v.clone();p.cmpn(1)>0&&v.cmpn(1)>0;){for(var _=0,l=1;!(p.words[0]&l)&&_<26;++_,l<<=1);if(_>0)for(p.iushrn(_);_-- >0;)g.isOdd()&&g.iadd(S),g.iushrn(1);for(var m=0,A=1;!(v.words[0]&A)&&m<26;++m,A<<=1);if(m>0)for(v.iushrn(m);m-- >0;)x.isOdd()&&x.iadd(S),x.iushrn(1);p.cmp(v)>=0?(p.isub(v),g.isub(x)):(v.isub(p),x.isub(g))}var U;return p.cmpn(1)===0?U=g:U=x,U.cmpn(0)<0&&U.iadd(c),U},n.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var p=this.clone(),v=c.clone();p.negative=0,v.negative=0;for(var g=0;p.isEven()&&v.isEven();g++)p.iushrn(1),v.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;v.isEven();)v.iushrn(1);var x=p.cmp(v);if(x<0){var S=p;p=v,v=S}else if(x===0||v.cmpn(1)===0)break;p.isub(v)}while(!0);return v.iushln(g)},n.prototype.invm=function(c){return this.egcd(c).a.umod(c)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(c){return this.words[0]&c},n.prototype.bincn=function(c){r(typeof c=="number");var p=c%26,v=(c-p)/26,g=1<<p;if(this.length<=v)return this._expand(v+1),this.words[v]|=g,this;for(var x=g,S=v;x!==0&&S<this.length;S++){var _=this.words[S]|0;_+=x,x=_>>>26,_&=67108863,this.words[S]=_}return x!==0&&(this.words[S]=x,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(c){var p=c<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this.strip();var v;if(this.length>1)v=1;else{p&&(c=-c),r(c<=67108863,"Number is too big");var g=this.words[0]|0;v=g===c?0:g<c?-1:1}return this.negative!==0?-v|0:v},n.prototype.cmp=function(c){if(this.negative!==0&&c.negative===0)return-1;if(this.negative===0&&c.negative!==0)return 1;var p=this.ucmp(c);return this.negative!==0?-p|0:p},n.prototype.ucmp=function(c){if(this.length>c.length)return 1;if(this.length<c.length)return-1;for(var p=0,v=this.length-1;v>=0;v--){var g=this.words[v]|0,x=c.words[v]|0;if(g!==x){g<x?p=-1:g>x&&(p=1);break}}return p},n.prototype.gtn=function(c){return this.cmpn(c)===1},n.prototype.gt=function(c){return this.cmp(c)===1},n.prototype.gten=function(c){return this.cmpn(c)>=0},n.prototype.gte=function(c){return this.cmp(c)>=0},n.prototype.ltn=function(c){return this.cmpn(c)===-1},n.prototype.lt=function(c){return this.cmp(c)===-1},n.prototype.lten=function(c){return this.cmpn(c)<=0},n.prototype.lte=function(c){return this.cmp(c)<=0},n.prototype.eqn=function(c){return this.cmpn(c)===0},n.prototype.eq=function(c){return this.cmp(c)===0},n.red=function(c){return new O(c)},n.prototype.toRed=function(c){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),c.convertTo(this)._forceRed(c)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(c){return this.red=c,this},n.prototype.forceRed=function(c){return r(!this.red,"Already a number in reduction context"),this._forceRed(c)},n.prototype.redAdd=function(c){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,c)},n.prototype.redIAdd=function(c){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,c)},n.prototype.redSub=function(c){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,c)},n.prototype.redISub=function(c){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,c)},n.prototype.redShl=function(c){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,c)},n.prototype.redMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.mul(this,c)},n.prototype.redIMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.imul(this,c)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(c){return r(this.red&&!c.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,c)};var q={k256:null,p224:null,p192:null,p25519:null};function ee(f,c){this.name=f,this.p=new n(c,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}ee.prototype._tmp=function(){var c=new n(null);return c.words=new Array(Math.ceil(this.n/13)),c},ee.prototype.ireduce=function(c){var p=c,v;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),v=p.bitLength();while(v>this.n);var g=v<this.n?-1:p.ucmp(this.p);return g===0?(p.words[0]=0,p.length=1):g>0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},ee.prototype.split=function(c,p){c.iushrn(this.n,0,p)},ee.prototype.imulK=function(c){return c.imul(this.k)};function fe(){ee.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(fe,ee),fe.prototype.split=function(c,p){for(var v=4194303,g=Math.min(c.length,9),x=0;x<g;x++)p.words[x]=c.words[x];if(p.length=g,c.length<=9){c.words[0]=0,c.length=1;return}var S=c.words[9];for(p.words[p.length++]=S&v,x=10;x<c.length;x++){var _=c.words[x]|0;c.words[x-10]=(_&v)<<4|S>>>22,S=_}S>>>=22,c.words[x-10]=S,S===0&&c.length>10?c.length-=10:c.length-=9},fe.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var p=0,v=0;v<c.length;v++){var g=c.words[v]|0;p+=g*977,c.words[v]=p&67108863,p=g*64+(p/67108864|0)}return c.words[c.length-1]===0&&(c.length--,c.words[c.length-1]===0&&c.length--),c};function _e(){ee.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(_e,ee);function Te(){ee.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(Te,ee);function be(){ee.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(be,ee),be.prototype.imulK=function(c){for(var p=0,v=0;v<c.length;v++){var g=(c.words[v]|0)*19+p,x=g&67108863;g>>>=26,c.words[v]=x,p=g}return p!==0&&(c.words[c.length++]=p),c},n._prime=function(c){if(q[c])return q[c];var p;if(c==="k256")p=new fe;else if(c==="p224")p=new _e;else if(c==="p192")p=new Te;else if(c==="p25519")p=new be;else throw new Error("Unknown prime "+c);return q[c]=p,p};function O(f){if(typeof f=="string"){var c=n._prime(f);this.m=c.p,this.prime=c}else r(f.gtn(1),"modulus must be greater than 1"),this.m=f,this.prime=null}O.prototype._verify1=function(c){r(c.negative===0,"red works only with positives"),r(c.red,"red works only with red numbers")},O.prototype._verify2=function(c,p){r((c.negative|p.negative)===0,"red works only with positives"),r(c.red&&c.red===p.red,"red works only with red numbers")},O.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):c.umod(this.m)._forceRed(this)},O.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},O.prototype.add=function(c,p){this._verify2(c,p);var v=c.add(p);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},O.prototype.iadd=function(c,p){this._verify2(c,p);var v=c.iadd(p);return v.cmp(this.m)>=0&&v.isub(this.m),v},O.prototype.sub=function(c,p){this._verify2(c,p);var v=c.sub(p);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},O.prototype.isub=function(c,p){this._verify2(c,p);var v=c.isub(p);return v.cmpn(0)<0&&v.iadd(this.m),v},O.prototype.shl=function(c,p){return this._verify1(c),this.imod(c.ushln(p))},O.prototype.imul=function(c,p){return this._verify2(c,p),this.imod(c.imul(p))},O.prototype.mul=function(c,p){return this._verify2(c,p),this.imod(c.mul(p))},O.prototype.isqr=function(c){return this.imul(c,c.clone())},O.prototype.sqr=function(c){return this.mul(c,c)},O.prototype.sqrt=function(c){if(c.isZero())return c.clone();var p=this.m.andln(3);if(r(p%2===1),p===3){var v=this.m.add(new n(1)).iushrn(2);return this.pow(c,v)}for(var g=this.m.subn(1),x=0;!g.isZero()&&g.andln(1)===0;)x++,g.iushrn(1);r(!g.isZero());var S=new n(1).toRed(this),_=S.redNeg(),l=this.m.subn(1).iushrn(1),m=this.m.bitLength();for(m=new n(2*m*m).toRed(this);this.pow(m,l).cmp(_)!==0;)m.redIAdd(_);for(var A=this.pow(m,g),U=this.pow(c,g.addn(1).iushrn(1)),j=this.pow(c,g),Z=x;j.cmp(S)!==0;){for(var se=j,ae=0;se.cmp(S)!==0;ae++)se=se.redSqr();r(ae<Z);var he=this.pow(A,new n(1).iushln(Z-ae-1));U=U.redMul(he),A=he.redSqr(),j=j.redMul(A),Z=ae}return U},O.prototype.invm=function(c){var p=c._invmp(this.m);return p.negative!==0?(p.negative=0,this.imod(p).redNeg()):this.imod(p)},O.prototype.pow=function(c,p){if(p.isZero())return new n(1).toRed(this);if(p.cmpn(1)===0)return c.clone();var v=4,g=new Array(1<<v);g[0]=new n(1).toRed(this),g[1]=c;for(var x=2;x<g.length;x++)g[x]=this.mul(g[x-1],c);var S=g[0],_=0,l=0,m=p.bitLength()%26;for(m===0&&(m=26),x=p.length-1;x>=0;x--){for(var A=p.words[x],U=m-1;U>=0;U--){var j=A>>U&1;if(S!==g[0]&&(S=this.sqr(S)),j===0&&_===0){l=0;continue}_<<=1,_|=j,l++,!(l!==v&&(x!==0||U!==0))&&(S=this.mul(S,g[_]),l=0,_=0)}m=26}return S},O.prototype.convertTo=function(c){var p=c.umod(this.m);return p===c?p.clone():p},O.prototype.convertFrom=function(c){var p=c.clone();return p.red=null,p},n.mont=function(c){return new E(c)};function E(f){O.call(this,f),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(E,O),E.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},E.prototype.convertFrom=function(c){var p=this.imod(c.mul(this.rinv));return p.red=null,p},E.prototype.imul=function(c,p){if(c.isZero()||p.isZero())return c.words[0]=0,c.length=1,c;var v=c.imul(p),g=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=v.isub(g).iushrn(this.shift),S=x;return x.cmp(this.m)>=0?S=x.isub(this.m):x.cmpn(0)<0&&(S=x.iadd(this.m)),S._forceRed(this)},E.prototype.mul=function(c,p){if(c.isZero()||p.isZero())return new n(0)._forceRed(this);var v=c.mul(p),g=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=v.isub(g).iushrn(this.shift),S=x;return x.cmp(this.m)>=0?S=x.isub(this.m):x.cmpn(0)<0&&(S=x.iadd(this.m)),S._forceRed(this)},E.prototype.invm=function(c){var p=this.imod(c._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(typeof gm>"u"||gm,ay)});var Ba=V((SH,cy)=>{cy.exports=oy;function oy(e,t){if(!e)throw new Error(t||"Assertion failed")}oy.equal=function(t,r,i){if(t!=r)throw new Error(i||"Assertion failed: "+t+" != "+r)}});var bm=V(ly=>{"use strict";var Fp=ly;function r9(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e!="string"){for(var i=0;i<e.length;i++)r[i]=e[i]|0;return r}if(t==="hex"){e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e);for(var i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var i=0;i<e.length;i++){var n=e.charCodeAt(i),a=n>>8,u=n&255;a?r.push(a,u):r.push(u)}return r}Fp.toArray=r9;function uy(e){return e.length===1?"0"+e:e}Fp.zero2=uy;function fy(e){for(var t="",r=0;r<e.length;r++)t+=uy(e[r].toString(16));return t}Fp.toHex=fy;Fp.encode=function(t,r){return r==="hex"?fy(t):t}});var Zi=V(py=>{"use strict";var Dn=py,i9=us(),n9=Ba(),Hp=bm();Dn.assert=n9;Dn.toArray=Hp.toArray;Dn.zero2=Hp.zero2;Dn.toHex=Hp.toHex;Dn.encode=Hp.encode;function s9(e,t,r){var i=new Array(Math.max(e.bitLength(),r)+1),n;for(n=0;n<i.length;n+=1)i[n]=0;var a=1<<t+1,u=e.clone();for(n=0;n<i.length;n++){var h,b=u.andln(a-1);u.isOdd()?(b>(a>>1)-1?h=(a>>1)-b:h=b,u.isubn(h)):h=0,i[n]=h,u.iushrn(1)}return i}Dn.getNAF=s9;function a9(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var i=0,n=0,a;e.cmpn(-i)>0||t.cmpn(-n)>0;){var u=e.andln(3)+i&3,h=t.andln(3)+n&3;u===3&&(u=-1),h===3&&(h=-1);var b;u&1?(a=e.andln(7)+i&7,(a===3||a===5)&&h===2?b=-u:b=u):b=0,r[0].push(b);var w;h&1?(a=t.andln(7)+n&7,(a===3||a===5)&&u===2?w=-h:w=h):w=0,r[1].push(w),2*i===b+1&&(i=1-i),2*n===w+1&&(n=1-n),e.iushrn(1),t.iushrn(1)}return r}Dn.getJSF=a9;function o9(e,t,r){var i="_"+t;e.prototype[t]=function(){return this[i]!==void 0?this[i]:this[i]=r.call(this)}}Dn.cachedProperty=o9;function c9(e){return typeof e=="string"?Dn.toArray(e,"hex"):e}Dn.parseBytes=c9;function u9(e){return new i9(e,"hex","le")}Dn.intFromLE=u9});var wm=V((IH,ym)=>{var xm;ym.exports=function(t){return xm||(xm=new Ma(null)),xm.generate(t)};function Ma(e){this.rand=e}ym.exports.Rand=Ma;Ma.prototype.generate=function(t){return this._rand(t)};Ma.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var r=new Uint8Array(t),i=0;i<r.length;i++)r[i]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?Ma.prototype._rand=function(t){var r=new Uint8Array(t);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?Ma.prototype._rand=function(t){var r=new Uint8Array(t);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(Ma.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(_m=require("crypto"),typeof _m.randomBytes!="function")throw new Error("Not supported");Ma.prototype._rand=function(t){return _m.randomBytes(t)}}catch{}var _m});var hf=V((RH,hy)=>{"use strict";var Ro=us(),pf=Zi(),zp=pf.getNAF,f9=pf.getJSF,jp=pf.assert;function Ca(e,t){this.type=e,this.p=new Ro(t.p,16),this.red=t.prime?Ro.red(t.prime):Ro.mont(this.p),this.zero=new Ro(0).toRed(this.red),this.one=new Ro(1).toRed(this.red),this.two=new Ro(2).toRed(this.red),this.n=t.n&&new Ro(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}hy.exports=Ca;Ca.prototype.point=function(){throw new Error("Not implemented")};Ca.prototype.validate=function(){throw new Error("Not implemented")};Ca.prototype._fixedNafMul=function(t,r){jp(t.precomputed);var i=t._getDoubles(),n=zp(r,1,this._bitLength),a=(1<<i.step+1)-(i.step%2===0?2:1);a/=3;var u=[],h,b;for(h=0;h<n.length;h+=i.step){b=0;for(var w=h+i.step-1;w>=h;w--)b=(b<<1)+n[w];u.push(b)}for(var T=this.jpoint(null,null,null),I=this.jpoint(null,null,null),B=a;B>0;B--){for(h=0;h<u.length;h++)b=u[h],b===B?I=I.mixedAdd(i.points[h]):b===-B&&(I=I.mixedAdd(i.points[h].neg()));T=T.add(I)}return T.toP()};Ca.prototype._wnafMul=function(t,r){var i=4,n=t._getNAFPoints(i);i=n.wnd;for(var a=n.points,u=zp(r,i,this._bitLength),h=this.jpoint(null,null,null),b=u.length-1;b>=0;b--){for(var w=0;b>=0&&u[b]===0;b--)w++;if(b>=0&&w++,h=h.dblp(w),b<0)break;var T=u[b];jp(T!==0),t.type==="affine"?T>0?h=h.mixedAdd(a[T-1>>1]):h=h.mixedAdd(a[-T-1>>1].neg()):T>0?h=h.add(a[T-1>>1]):h=h.add(a[-T-1>>1].neg())}return t.type==="affine"?h.toP():h};Ca.prototype._wnafMulAdd=function(t,r,i,n,a){var u=this._wnafT1,h=this._wnafT2,b=this._wnafT3,w=0,T,I,B;for(T=0;T<n;T++){B=r[T];var M=B._getNAFPoints(t);u[T]=M.wnd,h[T]=M.points}for(T=n-1;T>=1;T-=2){var P=T-1,L=T;if(u[P]!==1||u[L]!==1){b[P]=zp(i[P],u[P],this._bitLength),b[L]=zp(i[L],u[L],this._bitLength),w=Math.max(b[P].length,w),w=Math.max(b[L].length,w);continue}var X=[r[P],null,null,r[L]];r[P].y.cmp(r[L].y)===0?(X[1]=r[P].add(r[L]),X[2]=r[P].toJ().mixedAdd(r[L].neg())):r[P].y.cmp(r[L].y.redNeg())===0?(X[1]=r[P].toJ().mixedAdd(r[L]),X[2]=r[P].add(r[L].neg())):(X[1]=r[P].toJ().mixedAdd(r[L]),X[2]=r[P].toJ().mixedAdd(r[L].neg()));var W=[-3,-1,-5,-7,0,7,5,1,3],q=f9(i[P],i[L]);for(w=Math.max(q[0].length,w),b[P]=new Array(w),b[L]=new Array(w),I=0;I<w;I++){var ee=q[0][I]|0,fe=q[1][I]|0;b[P][I]=W[(ee+1)*3+(fe+1)],b[L][I]=0,h[P]=X}}var _e=this.jpoint(null,null,null),Te=this._wnafT4;for(T=w;T>=0;T--){for(var be=0;T>=0;){var O=!0;for(I=0;I<n;I++)Te[I]=b[I][T]|0,Te[I]!==0&&(O=!1);if(!O)break;be++,T--}if(T>=0&&be++,_e=_e.dblp(be),T<0)break;for(I=0;I<n;I++){var E=Te[I];E!==0&&(E>0?B=h[I][E-1>>1]:E<0&&(B=h[I][-E-1>>1].neg()),B.type==="affine"?_e=_e.mixedAdd(B):_e=_e.add(B))}}for(T=0;T<n;T++)h[T]=null;return a?_e:_e.toP()};function mn(e,t){this.curve=e,this.type=t,this.precomputed=null}Ca.BasePoint=mn;mn.prototype.eq=function(){throw new Error("Not implemented")};mn.prototype.validate=function(){return this.curve.validate(this)};Ca.prototype.decodePoint=function(t,r){t=pf.toArray(t,r);var i=this.p.byteLength();if((t[0]===4||t[0]===6||t[0]===7)&&t.length-1===2*i){t[0]===6?jp(t[t.length-1]%2===0):t[0]===7&&jp(t[t.length-1]%2===1);var n=this.point(t.slice(1,1+i),t.slice(1+i,1+2*i));return n}else if((t[0]===2||t[0]===3)&&t.length-1===i)return this.pointFromX(t.slice(1,1+i),t[0]===3);throw new Error("Unknown point format")};mn.prototype.encodeCompressed=function(t){return this.encode(t,!0)};mn.prototype._encode=function(t){var r=this.curve.p.byteLength(),i=this.getX().toArray("be",r);return t?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",r))};mn.prototype.encode=function(t,r){return pf.encode(this._encode(r),t)};mn.prototype.precompute=function(t){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,t),r.beta=this._getBeta(),this.precomputed=r,this};mn.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((t.bitLength()+1)/r.step):!1};mn.prototype._getDoubles=function(t,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],n=this,a=0;a<r;a+=t){for(var u=0;u<t;u++)n=n.dbl();i.push(n)}return{step:t,points:i}};mn.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],i=(1<<t)-1,n=i===1?null:this.dbl(),a=1;a<i;a++)r[a]=r[a-1].add(n);return{wnd:t,points:r}};mn.prototype._getBeta=function(){return null};mn.prototype.dblp=function(t){for(var r=this,i=0;i<t;i++)r=r.dbl();return r}});var dy=V((AH,Sm)=>{typeof Object.create=="function"?Sm.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Sm.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var df=V((OH,Tm)=>{try{if(Em=require("util"),typeof Em.inherits!="function")throw"";Tm.exports=Em.inherits}catch{Tm.exports=dy()}var Em});var vy=V((kH,my)=>{"use strict";var l9=Zi(),wr=us(),Im=df(),Uc=hf(),p9=l9.assert;function vn(e){Uc.call(this,"short",e),this.a=new wr(e.a,16).toRed(this.red),this.b=new wr(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Im(vn,Uc);my.exports=vn;vn.prototype._getEndomorphism=function(t){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,i;if(t.beta)r=new wr(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);r=n[0].cmp(n[1])<0?n[0]:n[1],r=r.toRed(this.red)}if(t.lambda)i=new wr(t.lambda,16);else{var a=this._getEndoRoots(this.n);this.g.mul(a[0]).x.cmp(this.g.x.redMul(r))===0?i=a[0]:(i=a[1],p9(this.g.mul(i).x.cmp(this.g.x.redMul(r))===0))}var u;return t.basis?u=t.basis.map(function(h){return{a:new wr(h.a,16),b:new wr(h.b,16)}}):u=this._getEndoBasis(i),{beta:r,lambda:i,basis:u}}};vn.prototype._getEndoRoots=function(t){var r=t===this.p?this.red:wr.mont(t),i=new wr(2).toRed(r).redInvm(),n=i.redNeg(),a=new wr(3).toRed(r).redNeg().redSqrt().redMul(i),u=n.redAdd(a).fromRed(),h=n.redSub(a).fromRed();return[u,h]};vn.prototype._getEndoBasis=function(t){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),i=t,n=this.n.clone(),a=new wr(1),u=new wr(0),h=new wr(0),b=new wr(1),w,T,I,B,M,P,L,X=0,W,q;i.cmpn(0)!==0;){var ee=n.div(i);W=n.sub(ee.mul(i)),q=h.sub(ee.mul(a));var fe=b.sub(ee.mul(u));if(!I&&W.cmp(r)<0)w=L.neg(),T=a,I=W.neg(),B=q;else if(I&&++X===2)break;L=W,n=i,i=W,h=a,a=q,b=u,u=fe}M=W.neg(),P=q;var _e=I.sqr().add(B.sqr()),Te=M.sqr().add(P.sqr());return Te.cmp(_e)>=0&&(M=w,P=T),I.negative&&(I=I.neg(),B=B.neg()),M.negative&&(M=M.neg(),P=P.neg()),[{a:I,b:B},{a:M,b:P}]};vn.prototype._endoSplit=function(t){var r=this.endo.basis,i=r[0],n=r[1],a=n.b.mul(t).divRound(this.n),u=i.b.neg().mul(t).divRound(this.n),h=a.mul(i.a),b=u.mul(n.a),w=a.mul(i.b),T=u.mul(n.b),I=t.sub(h).sub(b),B=w.add(T).neg();return{k1:I,k2:B}};vn.prototype.pointFromX=function(t,r){t=new wr(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=i.redSqrt();if(n.redSqr().redSub(i).cmp(this.zero)!==0)throw new Error("invalid point");var a=n.fromRed().isOdd();return(r&&!a||!r&&a)&&(n=n.redNeg()),this.point(t,n)};vn.prototype.validate=function(t){if(t.inf)return!0;var r=t.x,i=t.y,n=this.a.redMul(r),a=r.redSqr().redMul(r).redIAdd(n).redIAdd(this.b);return i.redSqr().redISub(a).cmpn(0)===0};vn.prototype._endoWnafMulAdd=function(t,r,i){for(var n=this._endoWnafT1,a=this._endoWnafT2,u=0;u<t.length;u++){var h=this._endoSplit(r[u]),b=t[u],w=b._getBeta();h.k1.negative&&(h.k1.ineg(),b=b.neg(!0)),h.k2.negative&&(h.k2.ineg(),w=w.neg(!0)),n[u*2]=b,n[u*2+1]=w,a[u*2]=h.k1,a[u*2+1]=h.k2}for(var T=this._wnafMulAdd(1,n,a,u*2,i),I=0;I<u*2;I++)n[I]=null,a[I]=null;return T};function Jr(e,t,r,i){Uc.BasePoint.call(this,e,"affine"),t===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new wr(t,16),this.y=new wr(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}Im(Jr,Uc.BasePoint);vn.prototype.point=function(t,r,i){return new Jr(this,t,r,i)};vn.prototype.pointFromJSON=function(t,r){return Jr.fromJSON(this,t,r)};Jr.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var i=this.curve,n=function(a){return i.point(a.x.redMul(i.endo.beta),a.y)};t.beta=r,r.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return r}};Jr.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};Jr.fromJSON=function(t,r,i){typeof r=="string"&&(r=JSON.parse(r));var n=t.point(r[0],r[1],i);if(!r[2])return n;function a(h){return t.point(h[0],h[1],i)}var u=r[2];return n.precomputed={beta:null,doubles:u.doubles&&{step:u.doubles.step,points:[n].concat(u.doubles.points.map(a))},naf:u.naf&&{wnd:u.naf.wnd,points:[n].concat(u.naf.points.map(a))}},n};Jr.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};Jr.prototype.isInfinity=function(){return this.inf};Jr.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(this.x.cmp(t.x)===0)return this.curve.point(null,null);var r=this.y.redSub(t.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(t.x).redInvm()));var i=r.redSqr().redISub(this.x).redISub(t.x),n=r.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,n)};Jr.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,i=this.x.redSqr(),n=t.redInvm(),a=i.redAdd(i).redIAdd(i).redIAdd(r).redMul(n),u=a.redSqr().redISub(this.x.redAdd(this.x)),h=a.redMul(this.x.redSub(u)).redISub(this.y);return this.curve.point(u,h)};Jr.prototype.getX=function(){return this.x.fromRed()};Jr.prototype.getY=function(){return this.y.fromRed()};Jr.prototype.mul=function(t){return t=new wr(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)};Jr.prototype.mulAdd=function(t,r,i){var n=[this,r],a=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,a):this.curve._wnafMulAdd(1,n,a,2)};Jr.prototype.jmulAdd=function(t,r,i){var n=[this,r],a=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,a,!0):this.curve._wnafMulAdd(1,n,a,2,!0)};Jr.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)};Jr.prototype.neg=function(t){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var i=this.precomputed,n=function(a){return a.neg()};r.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(n)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(n)}}}return r};Jr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t};function ni(e,t,r,i){Uc.BasePoint.call(this,e,"jacobian"),t===null&&r===null&&i===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new wr(0)):(this.x=new wr(t,16),this.y=new wr(r,16),this.z=new wr(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Im(ni,Uc.BasePoint);vn.prototype.jpoint=function(t,r,i){return new ni(this,t,r,i)};ni.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),r=t.redSqr(),i=this.x.redMul(r),n=this.y.redMul(r).redMul(t);return this.curve.point(i,n)};ni.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};ni.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var r=t.z.redSqr(),i=this.z.redSqr(),n=this.x.redMul(r),a=t.x.redMul(i),u=this.y.redMul(r.redMul(t.z)),h=t.y.redMul(i.redMul(this.z)),b=n.redSub(a),w=u.redSub(h);if(b.cmpn(0)===0)return w.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var T=b.redSqr(),I=T.redMul(b),B=n.redMul(T),M=w.redSqr().redIAdd(I).redISub(B).redISub(B),P=w.redMul(B.redISub(M)).redISub(u.redMul(I)),L=this.z.redMul(t.z).redMul(b);return this.curve.jpoint(M,P,L)};ni.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var r=this.z.redSqr(),i=this.x,n=t.x.redMul(r),a=this.y,u=t.y.redMul(r).redMul(this.z),h=i.redSub(n),b=a.redSub(u);if(h.cmpn(0)===0)return b.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var w=h.redSqr(),T=w.redMul(h),I=i.redMul(w),B=b.redSqr().redIAdd(T).redISub(I).redISub(I),M=b.redMul(I.redISub(B)).redISub(a.redMul(T)),P=this.z.redMul(h);return this.curve.jpoint(B,M,P)};ni.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var i=this;for(r=0;r<t;r++)i=i.dbl();return i}var n=this.curve.a,a=this.curve.tinv,u=this.x,h=this.y,b=this.z,w=b.redSqr().redSqr(),T=h.redAdd(h);for(r=0;r<t;r++){var I=u.redSqr(),B=T.redSqr(),M=B.redSqr(),P=I.redAdd(I).redIAdd(I).redIAdd(n.redMul(w)),L=u.redMul(B),X=P.redSqr().redISub(L.redAdd(L)),W=L.redISub(X),q=P.redMul(W);q=q.redIAdd(q).redISub(M);var ee=T.redMul(b);r+1<t&&(w=w.redMul(M)),u=X,b=ee,T=q}return this.curve.jpoint(u,T.redMul(a),b)};ni.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};ni.prototype._zeroDbl=function(){var t,r,i;if(this.zOne){var n=this.x.redSqr(),a=this.y.redSqr(),u=a.redSqr(),h=this.x.redAdd(a).redSqr().redISub(n).redISub(u);h=h.redIAdd(h);var b=n.redAdd(n).redIAdd(n),w=b.redSqr().redISub(h).redISub(h),T=u.redIAdd(u);T=T.redIAdd(T),T=T.redIAdd(T),t=w,r=b.redMul(h.redISub(w)).redISub(T),i=this.y.redAdd(this.y)}else{var I=this.x.redSqr(),B=this.y.redSqr(),M=B.redSqr(),P=this.x.redAdd(B).redSqr().redISub(I).redISub(M);P=P.redIAdd(P);var L=I.redAdd(I).redIAdd(I),X=L.redSqr(),W=M.redIAdd(M);W=W.redIAdd(W),W=W.redIAdd(W),t=X.redISub(P).redISub(P),r=L.redMul(P.redISub(t)).redISub(W),i=this.y.redMul(this.z),i=i.redIAdd(i)}return this.curve.jpoint(t,r,i)};ni.prototype._threeDbl=function(){var t,r,i;if(this.zOne){var n=this.x.redSqr(),a=this.y.redSqr(),u=a.redSqr(),h=this.x.redAdd(a).redSqr().redISub(n).redISub(u);h=h.redIAdd(h);var b=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),w=b.redSqr().redISub(h).redISub(h);t=w;var T=u.redIAdd(u);T=T.redIAdd(T),T=T.redIAdd(T),r=b.redMul(h.redISub(w)).redISub(T),i=this.y.redAdd(this.y)}else{var I=this.z.redSqr(),B=this.y.redSqr(),M=this.x.redMul(B),P=this.x.redSub(I).redMul(this.x.redAdd(I));P=P.redAdd(P).redIAdd(P);var L=M.redIAdd(M);L=L.redIAdd(L);var X=L.redAdd(L);t=P.redSqr().redISub(X),i=this.y.redAdd(this.z).redSqr().redISub(B).redISub(I);var W=B.redSqr();W=W.redIAdd(W),W=W.redIAdd(W),W=W.redIAdd(W),r=P.redMul(L.redISub(t)).redISub(W)}return this.curve.jpoint(t,r,i)};ni.prototype._dbl=function(){var t=this.curve.a,r=this.x,i=this.y,n=this.z,a=n.redSqr().redSqr(),u=r.redSqr(),h=i.redSqr(),b=u.redAdd(u).redIAdd(u).redIAdd(t.redMul(a)),w=r.redAdd(r);w=w.redIAdd(w);var T=w.redMul(h),I=b.redSqr().redISub(T.redAdd(T)),B=T.redISub(I),M=h.redSqr();M=M.redIAdd(M),M=M.redIAdd(M),M=M.redIAdd(M);var P=b.redMul(B).redISub(M),L=i.redAdd(i).redMul(n);return this.curve.jpoint(I,P,L)};ni.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr(),n=r.redSqr(),a=t.redAdd(t).redIAdd(t),u=a.redSqr(),h=this.x.redAdd(r).redSqr().redISub(t).redISub(n);h=h.redIAdd(h),h=h.redAdd(h).redIAdd(h),h=h.redISub(u);var b=h.redSqr(),w=n.redIAdd(n);w=w.redIAdd(w),w=w.redIAdd(w),w=w.redIAdd(w);var T=a.redIAdd(h).redSqr().redISub(u).redISub(b).redISub(w),I=r.redMul(T);I=I.redIAdd(I),I=I.redIAdd(I);var B=this.x.redMul(b).redISub(I);B=B.redIAdd(B),B=B.redIAdd(B);var M=this.y.redMul(T.redMul(w.redISub(T)).redISub(h.redMul(b)));M=M.redIAdd(M),M=M.redIAdd(M),M=M.redIAdd(M);var P=this.z.redAdd(h).redSqr().redISub(i).redISub(b);return this.curve.jpoint(B,M,P)};ni.prototype.mul=function(t,r){return t=new wr(t,r),this.curve._wnafMul(this,t)};ni.prototype.eq=function(t){if(t.type==="affine")return this.eq(t.toJ());if(this===t)return!0;var r=this.z.redSqr(),i=t.z.redSqr();if(this.x.redMul(i).redISub(t.x.redMul(r)).cmpn(0)!==0)return!1;var n=r.redMul(this.z),a=i.redMul(t.z);return this.y.redMul(a).redISub(t.y.redMul(n)).cmpn(0)===0};ni.prototype.eqXToP=function(t){var r=this.z.redSqr(),i=t.toRed(this.curve.red).redMul(r);if(this.x.cmp(i)===0)return!0;for(var n=t.clone(),a=this.curve.redN.redMul(r);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(a),this.x.cmp(i)===0)return!0}};ni.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};ni.prototype.isInfinity=function(){return this.z.cmpn(0)===0}});var xy=V((NH,by)=>{"use strict";var qc=us(),gy=df(),Vp=hf(),h9=Zi();function Fc(e){Vp.call(this,"mont",e),this.a=new qc(e.a,16).toRed(this.red),this.b=new qc(e.b,16).toRed(this.red),this.i4=new qc(4).toRed(this.red).redInvm(),this.two=new qc(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}gy(Fc,Vp);by.exports=Fc;Fc.prototype.validate=function(t){var r=t.normalize().x,i=r.redSqr(),n=i.redMul(r).redAdd(i.redMul(this.a)).redAdd(r),a=n.redSqrt();return a.redSqr().cmp(n)===0};function Qr(e,t,r){Vp.BasePoint.call(this,e,"projective"),t===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new qc(t,16),this.z=new qc(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}gy(Qr,Vp.BasePoint);Fc.prototype.decodePoint=function(t,r){return this.point(h9.toArray(t,r),1)};Fc.prototype.point=function(t,r){return new Qr(this,t,r)};Fc.prototype.pointFromJSON=function(t){return Qr.fromJSON(this,t)};Qr.prototype.precompute=function(){};Qr.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};Qr.fromJSON=function(t,r){return new Qr(t,r[0],r[1]||t.one)};Qr.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Qr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};Qr.prototype.dbl=function(){var t=this.x.redAdd(this.z),r=t.redSqr(),i=this.x.redSub(this.z),n=i.redSqr(),a=r.redSub(n),u=r.redMul(n),h=a.redMul(n.redAdd(this.curve.a24.redMul(a)));return this.curve.point(u,h)};Qr.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};Qr.prototype.diffAdd=function(t,r){var i=this.x.redAdd(this.z),n=this.x.redSub(this.z),a=t.x.redAdd(t.z),u=t.x.redSub(t.z),h=u.redMul(i),b=a.redMul(n),w=r.z.redMul(h.redAdd(b).redSqr()),T=r.x.redMul(h.redISub(b).redSqr());return this.curve.point(w,T)};Qr.prototype.mul=function(t){for(var r=t.clone(),i=this,n=this.curve.point(null,null),a=this,u=[];r.cmpn(0)!==0;r.iushrn(1))u.push(r.andln(1));for(var h=u.length-1;h>=0;h--)u[h]===0?(i=i.diffAdd(n,a),n=n.dbl()):(n=i.diffAdd(n,a),i=i.dbl());return n};Qr.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};Qr.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};Qr.prototype.eq=function(t){return this.getX().cmp(t.getX())===0};Qr.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};Qr.prototype.getX=function(){return this.normalize(),this.x.fromRed()}});var wy=V((PH,yy)=>{"use strict";var d9=Zi(),Xs=us(),_y=df(),Wp=hf(),m9=d9.assert;function fs(e){this.twisted=(e.a|0)!==1,this.mOneA=this.twisted&&(e.a|0)===-1,this.extended=this.mOneA,Wp.call(this,"edwards",e),this.a=new Xs(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Xs(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Xs(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),m9(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(e.c|0)===1}_y(fs,Wp);yy.exports=fs;fs.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)};fs.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)};fs.prototype.jpoint=function(t,r,i,n){return this.point(t,r,i,n)};fs.prototype.pointFromX=function(t,r){t=new Xs(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr(),n=this.c2.redSub(this.a.redMul(i)),a=this.one.redSub(this.c2.redMul(this.d).redMul(i)),u=n.redMul(a.redInvm()),h=u.redSqrt();if(h.redSqr().redSub(u).cmp(this.zero)!==0)throw new Error("invalid point");var b=h.fromRed().isOdd();return(r&&!b||!r&&b)&&(h=h.redNeg()),this.point(t,h)};fs.prototype.pointFromY=function(t,r){t=new Xs(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr(),n=i.redSub(this.c2),a=i.redMul(this.d).redMul(this.c2).redSub(this.a),u=n.redMul(a.redInvm());if(u.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,t)}var h=u.redSqrt();if(h.redSqr().redSub(u).cmp(this.zero)!==0)throw new Error("invalid point");return h.fromRed().isOdd()!==r&&(h=h.redNeg()),this.point(h,t)};fs.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var r=t.x.redSqr(),i=t.y.redSqr(),n=r.redMul(this.a).redAdd(i),a=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(i)));return n.cmp(a)===0};function Zt(e,t,r,i,n){Wp.BasePoint.call(this,e,"projective"),t===null&&r===null&&i===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new Xs(t,16),this.y=new Xs(r,16),this.z=i?new Xs(i,16):this.curve.one,this.t=n&&new Xs(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}_y(Zt,Wp.BasePoint);fs.prototype.pointFromJSON=function(t){return Zt.fromJSON(this,t)};fs.prototype.point=function(t,r,i,n){return new Zt(this,t,r,i,n)};Zt.fromJSON=function(t,r){return new Zt(t,r[0],r[1],r[2])};Zt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Zt.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Zt.prototype._extDbl=function(){var t=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var n=this.curve._mulA(t),a=this.x.redAdd(this.y).redSqr().redISub(t).redISub(r),u=n.redAdd(r),h=u.redSub(i),b=n.redSub(r),w=a.redMul(h),T=u.redMul(b),I=a.redMul(b),B=h.redMul(u);return this.curve.point(w,T,B,I)};Zt.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),i=this.y.redSqr(),n,a,u,h,b,w;if(this.curve.twisted){h=this.curve._mulA(r);var T=h.redAdd(i);this.zOne?(n=t.redSub(r).redSub(i).redMul(T.redSub(this.curve.two)),a=T.redMul(h.redSub(i)),u=T.redSqr().redSub(T).redSub(T)):(b=this.z.redSqr(),w=T.redSub(b).redISub(b),n=t.redSub(r).redISub(i).redMul(w),a=T.redMul(h.redSub(i)),u=T.redMul(w))}else h=r.redAdd(i),b=this.curve._mulC(this.z).redSqr(),w=h.redSub(b).redSub(b),n=this.curve._mulC(t.redISub(h)).redMul(w),a=this.curve._mulC(h).redMul(r.redISub(i)),u=h.redMul(w);return this.curve.point(n,a,u)};Zt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};Zt.prototype._extAdd=function(t){var r=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),i=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),a=this.z.redMul(t.z.redAdd(t.z)),u=i.redSub(r),h=a.redSub(n),b=a.redAdd(n),w=i.redAdd(r),T=u.redMul(h),I=b.redMul(w),B=u.redMul(w),M=h.redMul(b);return this.curve.point(T,I,M,B)};Zt.prototype._projAdd=function(t){var r=this.z.redMul(t.z),i=r.redSqr(),n=this.x.redMul(t.x),a=this.y.redMul(t.y),u=this.curve.d.redMul(n).redMul(a),h=i.redSub(u),b=i.redAdd(u),w=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(n).redISub(a),T=r.redMul(h).redMul(w),I,B;return this.curve.twisted?(I=r.redMul(b).redMul(a.redSub(this.curve._mulA(n))),B=h.redMul(b)):(I=r.redMul(b).redMul(a.redSub(n)),B=this.curve._mulC(h).redMul(b)),this.curve.point(T,I,B)};Zt.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)};Zt.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)};Zt.prototype.mulAdd=function(t,r,i){return this.curve._wnafMulAdd(1,[this,r],[t,i],2,!1)};Zt.prototype.jmulAdd=function(t,r,i){return this.curve._wnafMulAdd(1,[this,r],[t,i],2,!0)};Zt.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this};Zt.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Zt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};Zt.prototype.getY=function(){return this.normalize(),this.y.fromRed()};Zt.prototype.eq=function(t){return this===t||this.getX().cmp(t.getX())===0&&this.getY().cmp(t.getY())===0};Zt.prototype.eqXToP=function(t){var r=t.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var i=t.clone(),n=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),this.x.cmp(r)===0)return!0}};Zt.prototype.toP=Zt.prototype.normalize;Zt.prototype.mixedAdd=Zt.prototype.add});var Rm=V(Sy=>{"use strict";var Kp=Sy;Kp.base=hf();Kp.short=vy();Kp.mont=xy();Kp.edwards=wy()});var Un=V(Wt=>{"use strict";var v9=Ba(),g9=df();Wt.inherits=g9;function b9(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function x9(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var i=0,n=0;n<e.length;n++){var a=e.charCodeAt(n);a<128?r[i++]=a:a<2048?(r[i++]=a>>6|192,r[i++]=a&63|128):b9(e,n)?(a=65536+((a&1023)<<10)+(e.charCodeAt(++n)&1023),r[i++]=a>>18|240,r[i++]=a>>12&63|128,r[i++]=a>>6&63|128,r[i++]=a&63|128):(r[i++]=a>>12|224,r[i++]=a>>6&63|128,r[i++]=a&63|128)}else for(n=0;n<e.length;n++)r[n]=e[n]|0;return r}Wt.toArray=x9;function _9(e){for(var t="",r=0;r<e.length;r++)t+=Ty(e[r].toString(16));return t}Wt.toHex=_9;function Ey(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}Wt.htonl=Ey;function y9(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];t==="little"&&(n=Ey(n)),r+=Iy(n.toString(16))}return r}Wt.toHex32=y9;function Ty(e){return e.length===1?"0"+e:e}Wt.zero2=Ty;function Iy(e){return e.length===7?"0"+e:e.length===6?"00"+e:e.length===5?"000"+e:e.length===4?"0000"+e:e.length===3?"00000"+e:e.length===2?"000000"+e:e.length===1?"0000000"+e:e}Wt.zero8=Iy;function w9(e,t,r,i){var n=r-t;v9(n%4===0);for(var a=new Array(n/4),u=0,h=t;u<a.length;u++,h+=4){var b;i==="big"?b=e[h]<<24|e[h+1]<<16|e[h+2]<<8|e[h+3]:b=e[h+3]<<24|e[h+2]<<16|e[h+1]<<8|e[h],a[u]=b>>>0}return a}Wt.join32=w9;function S9(e,t){for(var r=new Array(e.length*4),i=0,n=0;i<e.length;i++,n+=4){var a=e[i];t==="big"?(r[n]=a>>>24,r[n+1]=a>>>16&255,r[n+2]=a>>>8&255,r[n+3]=a&255):(r[n+3]=a>>>24,r[n+2]=a>>>16&255,r[n+1]=a>>>8&255,r[n]=a&255)}return r}Wt.split32=S9;function E9(e,t){return e>>>t|e<<32-t}Wt.rotr32=E9;function T9(e,t){return e<<t|e>>>32-t}Wt.rotl32=T9;function I9(e,t){return e+t>>>0}Wt.sum32=I9;function R9(e,t,r){return e+t+r>>>0}Wt.sum32_3=R9;function A9(e,t,r,i){return e+t+r+i>>>0}Wt.sum32_4=A9;function O9(e,t,r,i,n){return e+t+r+i+n>>>0}Wt.sum32_5=O9;function k9(e,t,r,i){var n=e[t],a=e[t+1],u=i+a>>>0,h=(u<i?1:0)+r+n;e[t]=h>>>0,e[t+1]=u}Wt.sum64=k9;function N9(e,t,r,i){var n=t+i>>>0,a=(n<t?1:0)+e+r;return a>>>0}Wt.sum64_hi=N9;function P9(e,t,r,i){var n=t+i;return n>>>0}Wt.sum64_lo=P9;function B9(e,t,r,i,n,a,u,h){var b=0,w=t;w=w+i>>>0,b+=w<t?1:0,w=w+a>>>0,b+=w<a?1:0,w=w+h>>>0,b+=w<h?1:0;var T=e+r+n+u+b;return T>>>0}Wt.sum64_4_hi=B9;function M9(e,t,r,i,n,a,u,h){var b=t+i+a+h;return b>>>0}Wt.sum64_4_lo=M9;function C9(e,t,r,i,n,a,u,h,b,w){var T=0,I=t;I=I+i>>>0,T+=I<t?1:0,I=I+a>>>0,T+=I<a?1:0,I=I+h>>>0,T+=I<h?1:0,I=I+w>>>0,T+=I<w?1:0;var B=e+r+n+u+b+T;return B>>>0}Wt.sum64_5_hi=C9;function L9(e,t,r,i,n,a,u,h,b,w){var T=t+i+a+h+w;return T>>>0}Wt.sum64_5_lo=L9;function D9(e,t,r){var i=t<<32-r|e>>>r;return i>>>0}Wt.rotr64_hi=D9;function U9(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}Wt.rotr64_lo=U9;function q9(e,t,r){return e>>>r}Wt.shr64_hi=q9;function F9(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}Wt.shr64_lo=F9});var Hc=V(Ay=>{"use strict";var Ry=Un(),H9=Ba();function Gp(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Ay.BlockHash=Gp;Gp.prototype.update=function(t,r){if(t=Ry.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var i=t.length%this._delta8;this.pending=t.slice(t.length-i,t.length),this.pending.length===0&&(this.pending=null),t=Ry.join32(t,0,t.length-i,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this};Gp.prototype.digest=function(t){return this.update(this._pad()),H9(this.pending===null),this._digest(t)};Gp.prototype._pad=function(){var t=this.pendingTotal,r=this._delta8,i=r-(t+this.padLength)%r,n=new Array(i+this.padLength);n[0]=128;for(var a=1;a<i;a++)n[a]=0;if(t<<=3,this.endian==="big"){for(var u=8;u<this.padLength;u++)n[a++]=0;n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=t>>>24&255,n[a++]=t>>>16&255,n[a++]=t>>>8&255,n[a++]=t&255}else for(n[a++]=t&255,n[a++]=t>>>8&255,n[a++]=t>>>16&255,n[a++]=t>>>24&255,n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=0,u=8;u<this.padLength;u++)n[a++]=0;return n}});var Am=V(Ys=>{"use strict";var z9=Un(),ls=z9.rotr32;function j9(e,t,r,i){if(e===0)return Oy(t,r,i);if(e===1||e===3)return Ny(t,r,i);if(e===2)return ky(t,r,i)}Ys.ft_1=j9;function Oy(e,t,r){return e&t^~e&r}Ys.ch32=Oy;function ky(e,t,r){return e&t^e&r^t&r}Ys.maj32=ky;function Ny(e,t,r){return e^t^r}Ys.p32=Ny;function V9(e){return ls(e,2)^ls(e,13)^ls(e,22)}Ys.s0_256=V9;function W9(e){return ls(e,6)^ls(e,11)^ls(e,25)}Ys.s1_256=W9;function K9(e){return ls(e,7)^ls(e,18)^e>>>3}Ys.g0_256=K9;function G9(e){return ls(e,17)^ls(e,19)^e>>>10}Ys.g1_256=G9});var My=V((DH,By)=>{"use strict";var zc=Un(),$9=Hc(),X9=Am(),Om=zc.rotl32,mf=zc.sum32,Y9=zc.sum32_5,Z9=X9.ft_1,Py=$9.BlockHash,J9=[1518500249,1859775393,2400959708,3395469782];function ps(){if(!(this instanceof ps))return new ps;Py.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}zc.inherits(ps,Py);By.exports=ps;ps.blockSize=512;ps.outSize=160;ps.hmacStrength=80;ps.padLength=64;ps.prototype._update=function(t,r){for(var i=this.W,n=0;n<16;n++)i[n]=t[r+n];for(;n<i.length;n++)i[n]=Om(i[n-3]^i[n-8]^i[n-14]^i[n-16],1);var a=this.h[0],u=this.h[1],h=this.h[2],b=this.h[3],w=this.h[4];for(n=0;n<i.length;n++){var T=~~(n/20),I=Y9(Om(a,5),Z9(T,u,h,b),w,i[n],J9[T]);w=b,b=h,h=Om(u,30),u=a,a=I}this.h[0]=mf(this.h[0],a),this.h[1]=mf(this.h[1],u),this.h[2]=mf(this.h[2],h),this.h[3]=mf(this.h[3],b),this.h[4]=mf(this.h[4],w)};ps.prototype._digest=function(t){return t==="hex"?zc.toHex32(this.h,"big"):zc.split32(this.h,"big")}});var km=V((UH,Ly)=>{"use strict";var jc=Un(),Q9=Hc(),Vc=Am(),ek=Ba(),qn=jc.sum32,tk=jc.sum32_4,rk=jc.sum32_5,ik=Vc.ch32,nk=Vc.maj32,sk=Vc.s0_256,ak=Vc.s1_256,ok=Vc.g0_256,ck=Vc.g1_256,Cy=Q9.BlockHash,uk=[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];function hs(){if(!(this instanceof hs))return new hs;Cy.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=uk,this.W=new Array(64)}jc.inherits(hs,Cy);Ly.exports=hs;hs.blockSize=512;hs.outSize=256;hs.hmacStrength=192;hs.padLength=64;hs.prototype._update=function(t,r){for(var i=this.W,n=0;n<16;n++)i[n]=t[r+n];for(;n<i.length;n++)i[n]=tk(ck(i[n-2]),i[n-7],ok(i[n-15]),i[n-16]);var a=this.h[0],u=this.h[1],h=this.h[2],b=this.h[3],w=this.h[4],T=this.h[5],I=this.h[6],B=this.h[7];for(ek(this.k.length===i.length),n=0;n<i.length;n++){var M=rk(B,ak(w),ik(w,T,I),this.k[n],i[n]),P=qn(sk(a),nk(a,u,h));B=I,I=T,T=w,w=qn(b,M),b=h,h=u,u=a,a=qn(M,P)}this.h[0]=qn(this.h[0],a),this.h[1]=qn(this.h[1],u),this.h[2]=qn(this.h[2],h),this.h[3]=qn(this.h[3],b),this.h[4]=qn(this.h[4],w),this.h[5]=qn(this.h[5],T),this.h[6]=qn(this.h[6],I),this.h[7]=qn(this.h[7],B)};hs.prototype._digest=function(t){return t==="hex"?jc.toHex32(this.h,"big"):jc.split32(this.h,"big")}});var qy=V((qH,Uy)=>{"use strict";var Nm=Un(),Dy=km();function Zs(){if(!(this instanceof Zs))return new Zs;Dy.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}Nm.inherits(Zs,Dy);Uy.exports=Zs;Zs.blockSize=512;Zs.outSize=224;Zs.hmacStrength=192;Zs.padLength=64;Zs.prototype._digest=function(t){return t==="hex"?Nm.toHex32(this.h.slice(0,7),"big"):Nm.split32(this.h.slice(0,7),"big")}});var Mm=V((FH,jy)=>{"use strict";var Oi=Un(),fk=Hc(),lk=Ba(),ds=Oi.rotr64_hi,ms=Oi.rotr64_lo,Fy=Oi.shr64_hi,Hy=Oi.shr64_lo,La=Oi.sum64,Pm=Oi.sum64_hi,Bm=Oi.sum64_lo,pk=Oi.sum64_4_hi,hk=Oi.sum64_4_lo,dk=Oi.sum64_5_hi,mk=Oi.sum64_5_lo,zy=fk.BlockHash,vk=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Fn(){if(!(this instanceof Fn))return new Fn;zy.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=vk,this.W=new Array(160)}Oi.inherits(Fn,zy);jy.exports=Fn;Fn.blockSize=1024;Fn.outSize=512;Fn.hmacStrength=192;Fn.padLength=128;Fn.prototype._prepareBlock=function(t,r){for(var i=this.W,n=0;n<32;n++)i[n]=t[r+n];for(;n<i.length;n+=2){var a=Rk(i[n-4],i[n-3]),u=Ak(i[n-4],i[n-3]),h=i[n-14],b=i[n-13],w=Tk(i[n-30],i[n-29]),T=Ik(i[n-30],i[n-29]),I=i[n-32],B=i[n-31];i[n]=pk(a,u,h,b,w,T,I,B),i[n+1]=hk(a,u,h,b,w,T,I,B)}};Fn.prototype._update=function(t,r){this._prepareBlock(t,r);var i=this.W,n=this.h[0],a=this.h[1],u=this.h[2],h=this.h[3],b=this.h[4],w=this.h[5],T=this.h[6],I=this.h[7],B=this.h[8],M=this.h[9],P=this.h[10],L=this.h[11],X=this.h[12],W=this.h[13],q=this.h[14],ee=this.h[15];lk(this.k.length===i.length);for(var fe=0;fe<i.length;fe+=2){var _e=q,Te=ee,be=Sk(B,M),O=Ek(B,M),E=gk(B,M,P,L,X,W),f=bk(B,M,P,L,X,W),c=this.k[fe],p=this.k[fe+1],v=i[fe],g=i[fe+1],x=dk(_e,Te,be,O,E,f,c,p,v,g),S=mk(_e,Te,be,O,E,f,c,p,v,g);_e=yk(n,a),Te=wk(n,a),be=xk(n,a,u,h,b,w),O=_k(n,a,u,h,b,w);var _=Pm(_e,Te,be,O),l=Bm(_e,Te,be,O);q=X,ee=W,X=P,W=L,P=B,L=M,B=Pm(T,I,x,S),M=Bm(I,I,x,S),T=b,I=w,b=u,w=h,u=n,h=a,n=Pm(x,S,_,l),a=Bm(x,S,_,l)}La(this.h,0,n,a),La(this.h,2,u,h),La(this.h,4,b,w),La(this.h,6,T,I),La(this.h,8,B,M),La(this.h,10,P,L),La(this.h,12,X,W),La(this.h,14,q,ee)};Fn.prototype._digest=function(t){return t==="hex"?Oi.toHex32(this.h,"big"):Oi.split32(this.h,"big")};function gk(e,t,r,i,n){var a=e&r^~e&n;return a<0&&(a+=4294967296),a}function bk(e,t,r,i,n,a){var u=t&i^~t&a;return u<0&&(u+=4294967296),u}function xk(e,t,r,i,n){var a=e&r^e&n^r&n;return a<0&&(a+=4294967296),a}function _k(e,t,r,i,n,a){var u=t&i^t&a^i&a;return u<0&&(u+=4294967296),u}function yk(e,t){var r=ds(e,t,28),i=ds(t,e,2),n=ds(t,e,7),a=r^i^n;return a<0&&(a+=4294967296),a}function wk(e,t){var r=ms(e,t,28),i=ms(t,e,2),n=ms(t,e,7),a=r^i^n;return a<0&&(a+=4294967296),a}function Sk(e,t){var r=ds(e,t,14),i=ds(e,t,18),n=ds(t,e,9),a=r^i^n;return a<0&&(a+=4294967296),a}function Ek(e,t){var r=ms(e,t,14),i=ms(e,t,18),n=ms(t,e,9),a=r^i^n;return a<0&&(a+=4294967296),a}function Tk(e,t){var r=ds(e,t,1),i=ds(e,t,8),n=Fy(e,t,7),a=r^i^n;return a<0&&(a+=4294967296),a}function Ik(e,t){var r=ms(e,t,1),i=ms(e,t,8),n=Hy(e,t,7),a=r^i^n;return a<0&&(a+=4294967296),a}function Rk(e,t){var r=ds(e,t,19),i=ds(t,e,29),n=Fy(e,t,6),a=r^i^n;return a<0&&(a+=4294967296),a}function Ak(e,t){var r=ms(e,t,19),i=ms(t,e,29),n=Hy(e,t,6),a=r^i^n;return a<0&&(a+=4294967296),a}});var Ky=V((HH,Wy)=>{"use strict";var Cm=Un(),Vy=Mm();function Js(){if(!(this instanceof Js))return new Js;Vy.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}Cm.inherits(Js,Vy);Wy.exports=Js;Js.blockSize=1024;Js.outSize=384;Js.hmacStrength=192;Js.padLength=128;Js.prototype._digest=function(t){return t==="hex"?Cm.toHex32(this.h.slice(0,12),"big"):Cm.split32(this.h.slice(0,12),"big")}});var Gy=V(Wc=>{"use strict";Wc.sha1=My();Wc.sha224=qy();Wc.sha256=km();Wc.sha384=Ky();Wc.sha512=Mm()});var Qy=V(Jy=>{"use strict";var Ao=Un(),Ok=Hc(),$p=Ao.rotl32,$y=Ao.sum32,vf=Ao.sum32_3,Xy=Ao.sum32_4,Zy=Ok.BlockHash;function vs(){if(!(this instanceof vs))return new vs;Zy.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Ao.inherits(vs,Zy);Jy.ripemd160=vs;vs.blockSize=512;vs.outSize=160;vs.hmacStrength=192;vs.padLength=64;vs.prototype._update=function(t,r){for(var i=this.h[0],n=this.h[1],a=this.h[2],u=this.h[3],h=this.h[4],b=i,w=n,T=a,I=u,B=h,M=0;M<80;M++){var P=$y($p(Xy(i,Yy(M,n,a,u),t[Pk[M]+r],kk(M)),Mk[M]),h);i=h,h=u,u=$p(a,10),a=n,n=P,P=$y($p(Xy(b,Yy(79-M,w,T,I),t[Bk[M]+r],Nk(M)),Ck[M]),B),b=B,B=I,I=$p(T,10),T=w,w=P}P=vf(this.h[1],a,I),this.h[1]=vf(this.h[2],u,B),this.h[2]=vf(this.h[3],h,b),this.h[3]=vf(this.h[4],i,w),this.h[4]=vf(this.h[0],n,T),this.h[0]=P};vs.prototype._digest=function(t){return t==="hex"?Ao.toHex32(this.h,"little"):Ao.split32(this.h,"little")};function Yy(e,t,r,i){return e<=15?t^r^i:e<=31?t&r|~t&i:e<=47?(t|~r)^i:e<=63?t&i|r&~i:t^(r|~i)}function kk(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function Nk(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}var Pk=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Bk=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Mk=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Ck=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var t2=V((VH,e2)=>{"use strict";var Lk=Un(),Dk=Ba();function Kc(e,t,r){if(!(this instanceof Kc))return new Kc(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(Lk.toArray(t,r))}e2.exports=Kc;Kc.prototype._init=function(t){t.length>this.blockSize&&(t=new this.Hash().update(t).digest()),Dk(t.length<=this.blockSize);for(var r=t.length;r<this.blockSize;r++)t.push(0);for(r=0;r<t.length;r++)t[r]^=54;for(this.inner=new this.Hash().update(t),r=0;r<t.length;r++)t[r]^=106;this.outer=new this.Hash().update(t)};Kc.prototype.update=function(t,r){return this.inner.update(t,r),this};Kc.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}});var Xp=V(r2=>{var si=r2;si.utils=Un();si.common=Hc();si.sha=Gy();si.ripemd=Qy();si.hmac=t2();si.sha1=si.sha.sha1;si.sha256=si.sha.sha256;si.sha224=si.sha.sha224;si.sha384=si.sha.sha384;si.sha512=si.sha.sha512;si.ripemd160=si.ripemd.ripemd160});var n2=V((KH,i2)=>{i2.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}});var Yp=V(o2=>{"use strict";var Dm=o2,Da=Xp(),Lm=Rm(),Uk=Zi(),s2=Uk.assert;function a2(e){e.type==="short"?this.curve=new Lm.short(e):e.type==="edwards"?this.curve=new Lm.edwards(e):this.curve=new Lm.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s2(this.g.validate(),"Invalid curve"),s2(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}Dm.PresetCurve=a2;function Ua(e,t){Object.defineProperty(Dm,e,{configurable:!0,enumerable:!0,get:function(){var r=new a2(t);return Object.defineProperty(Dm,e,{configurable:!0,enumerable:!0,value:r}),r}})}Ua("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Da.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});Ua("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Da.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});Ua("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Da.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});Ua("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Da.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});Ua("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Da.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]});Ua("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Da.sha256,gRed:!1,g:["9"]});Ua("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Da.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var Um;try{Um=n2()}catch{Um=void 0}Ua("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Da.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",Um]})});var f2=V(($H,u2)=>{"use strict";var qk=Xp(),Oo=bm(),c2=Ba();function qa(e){if(!(this instanceof qa))return new qa(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=Oo.toArray(e.entropy,e.entropyEnc||"hex"),r=Oo.toArray(e.nonce,e.nonceEnc||"hex"),i=Oo.toArray(e.pers,e.persEnc||"hex");c2(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,i)}u2.exports=qa;qa.prototype._init=function(t,r,i){var n=t.concat(r).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a<this.V.length;a++)this.K[a]=0,this.V[a]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656};qa.prototype._hmac=function(){return new qk.hmac(this.hash,this.K)};qa.prototype._update=function(t){var r=this._hmac().update(this.V).update([0]);t&&(r=r.update(t)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())};qa.prototype.reseed=function(t,r,i,n){typeof r!="string"&&(n=i,i=r,r=null),t=Oo.toArray(t,r),i=Oo.toArray(i,n),c2(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(i||[])),this._reseed=1};qa.prototype.generate=function(t,r,i,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(n=i,i=r,r=null),i&&(i=Oo.toArray(i,n||"hex"),this._update(i));for(var a=[];a.length<t;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var u=a.slice(0,t);return this._update(i),this._reseed++,Oo.encode(u,r)}});var p2=V((XH,l2)=>{"use strict";var Fk=us(),Hk=Zi(),qm=Hk.assert;function li(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}l2.exports=li;li.fromPublic=function(t,r,i){return r instanceof li?r:new li(t,{pub:r,pubEnc:i})};li.fromPrivate=function(t,r,i){return r instanceof li?r:new li(t,{priv:r,privEnc:i})};li.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};li.prototype.getPublic=function(t,r){return typeof t=="string"&&(r=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,t):this.pub};li.prototype.getPrivate=function(t){return t==="hex"?this.priv.toString(16,2):this.priv};li.prototype._importPrivate=function(t,r){this.priv=new Fk(t,r||16),this.priv=this.priv.umod(this.ec.curve.n)};li.prototype._importPublic=function(t,r){if(t.x||t.y){this.ec.curve.type==="mont"?qm(t.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&qm(t.x&&t.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(t.x,t.y);return}this.pub=this.ec.curve.decodePoint(t,r)};li.prototype.derive=function(t){return t.validate()||qm(t.validate(),"public point not validated"),t.mul(this.priv).getX()};li.prototype.sign=function(t,r,i){return this.ec.sign(t,this,r,i)};li.prototype.verify=function(t,r){return this.ec.verify(t,r,this)};li.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}});var m2=V((YH,d2)=>{"use strict";var Zp=us(),zm=Zi(),zk=zm.assert;function Jp(e,t){if(e instanceof Jp)return e;this._importDER(e,t)||(zk(e.r&&e.s,"Signature without r or s"),this.r=new Zp(e.r,16),this.s=new Zp(e.s,16),e.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}d2.exports=Jp;function jk(){this.place=0}function Fm(e,t){var r=e[t.place++];if(!(r&128))return r;var i=r&15;if(i===0||i>4)return!1;for(var n=0,a=0,u=t.place;a<i;a++,u++)n<<=8,n|=e[u],n>>>=0;return n<=127?!1:(t.place=u,n)}function h2(e){for(var t=0,r=e.length-1;!e[t]&&!(e[t+1]&128)&&t<r;)t++;return t===0?e:e.slice(t)}Jp.prototype._importDER=function(t,r){t=zm.toArray(t,r);var i=new jk;if(t[i.place++]!==48)return!1;var n=Fm(t,i);if(n===!1||n+i.place!==t.length||t[i.place++]!==2)return!1;var a=Fm(t,i);if(a===!1)return!1;var u=t.slice(i.place,a+i.place);if(i.place+=a,t[i.place++]!==2)return!1;var h=Fm(t,i);if(h===!1||t.length!==h+i.place)return!1;var b=t.slice(i.place,h+i.place);if(u[0]===0)if(u[1]&128)u=u.slice(1);else return!1;if(b[0]===0)if(b[1]&128)b=b.slice(1);else return!1;return this.r=new Zp(u),this.s=new Zp(b),this.recoveryParam=null,!0};function Hm(e,t){if(t<128){e.push(t);return}var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(r|128);--r;)e.push(t>>>(r<<3)&255);e.push(t)}Jp.prototype.toDER=function(t){var r=this.r.toArray(),i=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),i[0]&128&&(i=[0].concat(i)),r=h2(r),i=h2(i);!i[0]&&!(i[1]&128);)i=i.slice(1);var n=[2];Hm(n,r.length),n=n.concat(r),n.push(2),Hm(n,i.length);var a=n.concat(i),u=[48];return Hm(u,a.length),u=u.concat(a),zm.encode(u,t)}});var x2=V((ZH,b2)=>{"use strict";var ko=us(),v2=f2(),Vk=Zi(),jm=Yp(),Wk=wm(),g2=Vk.assert,Vm=p2(),Qp=m2();function gn(e){if(!(this instanceof gn))return new gn(e);typeof e=="string"&&(g2(Object.prototype.hasOwnProperty.call(jm,e),"Unknown curve "+e),e=jm[e]),e instanceof jm.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}b2.exports=gn;gn.prototype.keyPair=function(t){return new Vm(this,t)};gn.prototype.keyFromPrivate=function(t,r){return Vm.fromPrivate(this,t,r)};gn.prototype.keyFromPublic=function(t,r){return Vm.fromPublic(this,t,r)};gn.prototype.genKeyPair=function(t){t||(t={});for(var r=new v2({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||Wk(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),n=this.n.sub(new ko(2));;){var a=new ko(r.generate(i));if(!(a.cmp(n)>0))return a.iaddn(1),this.keyFromPrivate(a)}};gn.prototype._truncateToN=function(t,r){var i=t.byteLength()*8-this.n.bitLength();return i>0&&(t=t.ushrn(i)),!r&&t.cmp(this.n)>=0?t.sub(this.n):t};gn.prototype.sign=function(t,r,i,n){typeof i=="object"&&(n=i,i=null),n||(n={}),r=this.keyFromPrivate(r,i),t=this._truncateToN(new ko(t,16));for(var a=this.n.byteLength(),u=r.getPrivate().toArray("be",a),h=t.toArray("be",a),b=new v2({hash:this.hash,entropy:u,nonce:h,pers:n.pers,persEnc:n.persEnc||"utf8"}),w=this.n.sub(new ko(1)),T=0;;T++){var I=n.k?n.k(T):new ko(b.generate(this.n.byteLength()));if(I=this._truncateToN(I,!0),!(I.cmpn(1)<=0||I.cmp(w)>=0)){var B=this.g.mul(I);if(!B.isInfinity()){var M=B.getX(),P=M.umod(this.n);if(P.cmpn(0)!==0){var L=I.invm(this.n).mul(P.mul(r.getPrivate()).iadd(t));if(L=L.umod(this.n),L.cmpn(0)!==0){var X=(B.getY().isOdd()?1:0)|(M.cmp(P)!==0?2:0);return n.canonical&&L.cmp(this.nh)>0&&(L=this.n.sub(L),X^=1),new Qp({r:P,s:L,recoveryParam:X})}}}}}};gn.prototype.verify=function(t,r,i,n){t=this._truncateToN(new ko(t,16)),i=this.keyFromPublic(i,n),r=new Qp(r,"hex");var a=r.r,u=r.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0||u.cmpn(1)<0||u.cmp(this.n)>=0)return!1;var h=u.invm(this.n),b=h.mul(t).umod(this.n),w=h.mul(a).umod(this.n),T;return this.curve._maxwellTrick?(T=this.g.jmulAdd(b,i.getPublic(),w),T.isInfinity()?!1:T.eqXToP(a)):(T=this.g.mulAdd(b,i.getPublic(),w),T.isInfinity()?!1:T.getX().umod(this.n).cmp(a)===0)};gn.prototype.recoverPubKey=function(e,t,r,i){g2((3&r)===r,"The recovery param is more than two bits"),t=new Qp(t,i);var n=this.n,a=new ko(e),u=t.r,h=t.s,b=r&1,w=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&w)throw new Error("Unable to find sencond key candinate");w?u=this.curve.pointFromX(u.add(this.curve.n),b):u=this.curve.pointFromX(u,b);var T=t.r.invm(n),I=n.sub(a).mul(T).umod(n),B=h.mul(T).umod(n);return this.g.mulAdd(I,u,B)};gn.prototype.getKeyRecoveryParam=function(e,t,r,i){if(t=new Qp(t,i),t.recoveryParam!==null)return t.recoveryParam;for(var n=0;n<4;n++){var a;try{a=this.recoverPubKey(e,t,n)}catch{continue}if(a.eq(r))return n}throw new Error("Unable to find valid recovery factor")}});var S2=V((JH,w2)=>{"use strict";var gf=Zi(),y2=gf.assert,_2=gf.parseBytes,Gc=gf.cachedProperty;function ei(e,t){this.eddsa=e,this._secret=_2(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=_2(t.pub)}ei.fromPublic=function(t,r){return r instanceof ei?r:new ei(t,{pub:r})};ei.fromSecret=function(t,r){return r instanceof ei?r:new ei(t,{secret:r})};ei.prototype.secret=function(){return this._secret};Gc(ei,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});Gc(ei,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});Gc(ei,"privBytes",function(){var t=this.eddsa,r=this.hash(),i=t.encodingLength-1,n=r.slice(0,t.encodingLength);return n[0]&=248,n[i]&=127,n[i]|=64,n});Gc(ei,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});Gc(ei,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});Gc(ei,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});ei.prototype.sign=function(t){return y2(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)};ei.prototype.verify=function(t,r){return this.eddsa.verify(t,r,this)};ei.prototype.getSecret=function(t){return y2(this._secret,"KeyPair is public only"),gf.encode(this.secret(),t)};ei.prototype.getPublic=function(t){return gf.encode(this.pubBytes(),t)};w2.exports=ei});var T2=V((QH,E2)=>{"use strict";var Kk=us(),eh=Zi(),Gk=eh.assert,th=eh.cachedProperty,$k=eh.parseBytes;function No(e,t){this.eddsa=e,typeof t!="object"&&(t=$k(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),Gk(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof Kk&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}th(No,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});th(No,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});th(No,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});th(No,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});No.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};No.prototype.toHex=function(){return eh.encode(this.toBytes(),"hex").toUpperCase()};E2.exports=No});var k2=V((ez,O2)=>{"use strict";var Xk=Xp(),Yk=Yp(),$c=Zi(),Zk=$c.assert,R2=$c.parseBytes,A2=S2(),I2=T2();function ki(e){if(Zk(e==="ed25519","only tested with ed25519 so far"),!(this instanceof ki))return new ki(e);e=Yk[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=Xk.sha512}O2.exports=ki;ki.prototype.sign=function(t,r){t=R2(t);var i=this.keyFromSecret(r),n=this.hashInt(i.messagePrefix(),t),a=this.g.mul(n),u=this.encodePoint(a),h=this.hashInt(u,i.pubBytes(),t).mul(i.priv()),b=n.add(h).umod(this.curve.n);return this.makeSignature({R:a,S:b,Rencoded:u})};ki.prototype.verify=function(t,r,i){t=R2(t),r=this.makeSignature(r);var n=this.keyFromPublic(i),a=this.hashInt(r.Rencoded(),n.pubBytes(),t),u=this.g.mul(r.S()),h=r.R().add(n.pub().mul(a));return h.eq(u)};ki.prototype.hashInt=function(){for(var t=this.hash(),r=0;r<arguments.length;r++)t.update(arguments[r]);return $c.intFromLE(t.digest()).umod(this.curve.n)};ki.prototype.keyFromPublic=function(t){return A2.fromPublic(this,t)};ki.prototype.keyFromSecret=function(t){return A2.fromSecret(this,t)};ki.prototype.makeSignature=function(t){return t instanceof I2?t:new I2(this,t)};ki.prototype.encodePoint=function(t){var r=t.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=t.getX().isOdd()?128:0,r};ki.prototype.decodePoint=function(t){t=$c.parseBytes(t);var r=t.length-1,i=t.slice(0,r).concat(t[r]&-129),n=(t[r]&128)!==0,a=$c.intFromLE(i);return this.curve.pointFromY(a,n)};ki.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)};ki.prototype.decodeInt=function(t){return $c.intFromLE(t)};ki.prototype.isPoint=function(t){return t instanceof this.pointClass}});var Wm=V(N2=>{"use strict";var Po=N2;Po.version=sy().version;Po.utils=Zi();Po.rand=wm();Po.curve=Rm();Po.curves=Yp();Po.ec=x2();Po.eddsa=k2()});var Mo=V((rz,B2)=>{"use strict";var Km=Zr(),Jk=hr(),Qk=Wm().ec,Bo=new Qk("secp256k1"),eN=Bo.curve.point.bind(Bo.curve),P2=Bo.curve.pointFromX.bind(Bo.curve),Ni=function(t,r,i){try{var n=eN(t,r,i)}catch{throw new Error("Invalid Point")}return n.validate(),n};Ni.prototype=Object.getPrototypeOf(Bo.curve.point());Ni.fromX=function(t,r){try{var i=P2(r,t)}catch{throw new Error("Invalid X")}return i.validate(),i};Ni.getG=function(){return Bo.curve.g};Ni.getN=function(){return new Km(Bo.curve.n.toArray())};Ni.prototype._getX=Ni.prototype.getX;Ni.prototype.getX=function(){return new Km(this._getX().toArray())};Ni.prototype._getY=Ni.prototype.getY;Ni.prototype.getY=function(){return new Km(this._getY().toArray())};Ni.prototype.validate=function(){if(this.isInfinity())throw new Error("Point cannot be equal to Infinity");var t;try{t=P2(this.getX(),this.getY().isOdd())}catch{throw new Error("Point does not lie on the curve")}if(t.y.cmp(this.y)!==0)throw new Error("Invalid y value for curve.");if(!this.mul(Ni.getN()).isInfinity())throw new Error("Point times N must be infinity");return this};Ni.pointToCompressed=function(t){var r=t.getX().toBuffer({size:32}),i=t.getY().toBuffer({size:32}),n,a=i[i.length-1]%2;return a?n=Buffer.from([3]):n=Buffer.from([2]),Jk.concat([n,r])};B2.exports=Ni});var Pi=V((iz,C2)=>{"use strict";var Co=Zr(),tN=vt(),bn=It(),M2=hr(),rN=Lr(),Bt=function e(t,r){if(!(this instanceof e))return new e(t,r);if(t instanceof Co)this.set({r:t,s:r});else if(t){var i=t;this.set(i)}};Bt.prototype.set=function(e){return this.r=e.r||this.r||void 0,this.s=e.s||this.s||void 0,this.i=typeof e.i<"u"?e.i:this.i,this.compressed=typeof e.compressed<"u"?e.compressed:this.compressed,this.nhashtype=e.nhashtype||this.nhashtype||void 0,this};Bt.fromCompact=function(e){bn.checkArgument(M2.isBuffer(e),"Argument is expected to be a Buffer");var t=new Bt,r=!0,i=e.slice(0,1)[0]-27-4;i<0&&(r=!1,i=i+4);var n=e.slice(1,33),a=e.slice(33,65);return bn.checkArgument(i===0||i===1||i===2||i===3,new Error("i must be 0, 1, 2, or 3")),bn.checkArgument(n.length===32,new Error("r must be 32 bytes")),bn.checkArgument(a.length===32,new Error("s must be 32 bytes")),t.compressed=r,t.i=i,t.r=Co.fromBuffer(n),t.s=Co.fromBuffer(a),t};Bt.fromDER=Bt.fromBuffer=function(e,t){var r=Bt.parseDER(e,t),i=new Bt;return i.r=r.r,i.s=r.s,i};Bt.fromTxFormat=function(e){var t=e.readUInt8(e.length-1),r=e.slice(0,e.length-1),i=new Bt.fromDER(r,!1);return i.nhashtype=t,i};Bt.fromString=function(e){var t=Buffer.from(e,"hex");return Bt.fromDER(t)};Bt.parseDER=function(e,t){bn.checkArgument(M2.isBuffer(e),new Error("DER formatted signature should be a buffer")),tN.isUndefined(t)&&(t=!0);var r=e[0];bn.checkArgument(r===48,new Error("Header byte should be 0x30"));var i=e[1],n=e.slice(2).length;bn.checkArgument(!t||i===n,new Error("Length byte should length of what follows")),i=i<n?i:n;var a=e[2];bn.checkArgument(a===2,new Error("Integer byte for r should be 0x02"));var u=e[3],h=e.slice(4,4+u),b=Co.fromBuffer(h),w=e[4]===0;bn.checkArgument(u===h.length,new Error("Length of r incorrect"));var T=e[4+u+0];bn.checkArgument(T===2,new Error("Integer byte for s should be 0x02"));var I=e[4+u+1],B=e.slice(4+u+2,4+u+2+I),M=Co.fromBuffer(B),P=e[4+u+2+2]===0;bn.checkArgument(I===B.length,new Error("Length of s incorrect"));var L=4+u+2+I;bn.checkArgument(i===L-2,new Error("Length of signature incorrect"));var X={header:r,length:i,rheader:a,rlength:u,rneg:w,rbuf:h,r:b,sheader:T,slength:I,sneg:P,sbuf:B,s:M};return X};Bt.prototype.toCompact=function(e,t){if(e=typeof e=="number"?e:this.i,t=typeof t=="boolean"?t:this.compressed,!(e===0||e===1||e===2||e===3))throw new Error("i must be equal to 0, 1, 2, or 3");var r=e+27+4;t===!1&&(r=r-4);var i=Buffer.from([r]),n=this.r.toBuffer({size:32}),a=this.s.toBuffer({size:32});return Buffer.concat([i,n,a])};Bt.prototype.toBuffer=Bt.prototype.toDER=function(){var e=this.r.toBuffer(),t=this.s.toBuffer(),r=!!(e[0]&128),i=!!(t[0]&128),n=r?Buffer.concat([Buffer.from([0]),e]):e,a=i?Buffer.concat([Buffer.from([0]),t]):t,u=n.length,h=a.length,b=2+u+2+h,w=2,T=2,I=48,B=Buffer.concat([Buffer.from([I,b,w,u]),n,Buffer.from([T,h]),a]);return B};Bt.prototype.toString=function(){var e=this.toDER();return e.toString("hex")};Bt.isTxDER=function(e){if(e.length<9||e.length>73||e[0]!==48||e[1]!==e.length-3)return!1;var t=e[3];if(5+t>=e.length)return!1;var r=e[5+t];if(t+r+7!==e.length)return!1;var i=e.slice(4);if(e[2]!==2||t===0||i[0]&128||t>1&&i[0]===0&&!(i[1]&128))return!1;var n=e.slice(6+t);return!(e[6+t-2]!==2||r===0||n[0]&128||r>1&&n[0]===0&&!(n[1]&128))};Bt.prototype.hasLowS=function(){return!(this.s.lt(new Co(1))||this.s.gt(new Co("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))};Bt.prototype.hasDefinedHashtype=function(){if(!rN.isNaturalNumber(this.nhashtype))return!1;var e=this.nhashtype&~Bt.SIGHASH_ANYONECANPAY;return!(e<Bt.SIGHASH_ALL||e>Bt.SIGHASH_SINGLE)};Bt.prototype.toTxFormat=function(){var e=this.toDER(),t=Buffer.alloc(1);return t.writeUInt8(this.nhashtype,0),Buffer.concat([e,t])};Bt.SIGHASH_ALL=1;Bt.SIGHASH_NONE=2;Bt.SIGHASH_SINGLE=3;Bt.SIGHASH_ANYONECANPAY=128;C2.exports=Bt});var ti=V((nz,L2)=>{"use strict";var rh=require("crypto"),Fa=hr(),Qs=It(),Dr=L2.exports;Dr.sha1=function(e){return Qs.checkArgument(Fa.isBuffer(e)),rh.createHash("sha1").update(e).digest()};Dr.sha1.blocksize=512;Dr.sha256=function(e){return Qs.checkArgument(Fa.isBuffer(e)),rh.createHash("sha256").update(e).digest()};Dr.sha256.blocksize=512;Dr.sha256sha256=function(e){return Qs.checkArgument(Fa.isBuffer(e)),Dr.sha256(Dr.sha256(e))};Dr.ripemd160=function(e){return Qs.checkArgument(Fa.isBuffer(e)),rh.createHash("ripemd160").update(e).digest()};Dr.sha256ripemd160=function(e){return Qs.checkArgument(Fa.isBuffer(e)),Dr.ripemd160(Dr.sha256(e))};Dr.sha512=function(e){return Qs.checkArgument(Fa.isBuffer(e)),rh.createHash("sha512").update(e).digest()};Dr.sha512.blocksize=1024;Dr.hmac=function(e,t,r){Qs.checkArgument(Fa.isBuffer(t)),Qs.checkArgument(Fa.isBuffer(r)),Qs.checkArgument(e.blocksize);var i=e.blocksize/8;if(r.length>i)r=e(r);else if(r<i){var n=Buffer.alloc(i);n.fill(0),r.copy(n),r=n}var a=Buffer.alloc(i);a.fill(92);var u=Buffer.alloc(i);u.fill(54);for(var h=Buffer.alloc(i),b=Buffer.alloc(i),w=0;w<i;w++)h[w]=a[w]^r[w],b[w]=u[w]^r[w];return e(Buffer.concat([h,e(Buffer.concat([b,t]))]))};Dr.sha256hmac=function(e,t){return Dr.hmac(Dr.sha256,e,t)};Dr.sha512hmac=function(e,t){return Dr.hmac(Dr.sha512,e,t)}});var za=V((sz,U2)=>{"use strict";var bf=vt(),iN=hr(),ih=Lr(),Ha=[],_i={};function D2(){}D2.prototype.toString=function(){return this.name};function xf(e,t){if(~Ha.indexOf(e))return e;if(t){bf.isArray(t)||(t=[t]);var r=function(n){return Ha[i][n]===e};for(var i in Ha)if(bf.some(t,r))return Ha[i];return}return _i[e]&&_i[e].length>=1?_i[e][0]:_i[e]}function nh(e){var t=new D2;return ih.defineImmutable(t,{name:e.name,alias:e.alias,pubkeyhash:e.pubkeyhash,privatekey:e.privatekey,scripthash:e.scripthash,bech32prefix:e.bech32prefix,xpubkey:e.xpubkey,xprivkey:e.xprivkey}),e.networkMagic&&ih.defineImmutable(t,{networkMagic:iN.integerAsBuffer(e.networkMagic)}),e.port&&ih.defineImmutable(t,{port:e.port}),e.dnsSeeds&&ih.defineImmutable(t,{dnsSeeds:e.dnsSeeds}),bf.each(t,function(r){!bf.isUndefined(r)&&!bf.isObject(r)&&(_i[r]||(_i[r]=[]),_i[r].push(t))}),Ha.push(t),t}function nN(e){typeof e!="object"&&(e=xf(e));for(var t=0;t<Ha.length;t++)Ha[t]===e&&Ha.splice(t,1);for(var r in _i)if(_i[r].length){let i=_i[r].indexOf(e);i>=0&&_i[r].splice(i,1),_i[r].length===0&&delete _i[r]}else _i[r]===e&&delete _i[r]}nh({name:"livenet",alias:"mainnet",pubkeyhash:0,privatekey:128,scripthash:5,bech32prefix:"bc",xpubkey:76067358,xprivkey:76066276,networkMagic:4190024921,port:8333,dnsSeeds:["seed.bitcoin.sipa.be","dnsseed.bluematt.me","dnsseed.bitcoin.dashjr.org","seed.bitcoinstats.com","seed.bitnodes.io","bitseed.xf2.org"]});var Gm=xf("livenet");nh({name:"testnet",alias:"test",pubkeyhash:111,privatekey:239,scripthash:196,bech32prefix:"tb",xpubkey:70617039,xprivkey:70615956,networkMagic:185665799,port:18333,dnsSeeds:["testnet-seed.bitcoin.petertodd.org","testnet-seed.bluematt.me","testnet-seed.alexykot.me","testnet-seed.bitcoin.schildbach.de"]});var $m=xf("testnet");nh({name:"regtest",alias:"dev",pubkeyhash:111,privatekey:239,scripthash:196,bech32prefix:"bcrt",xpubkey:70617039,xprivkey:70615956,networkMagic:4206867930,port:18444,dnsSeeds:[]});var sN=xf("regtest");function aN(){$m.regtestEnabled=!0}function oN(){$m.regtestEnabled=!1}U2.exports={add:nh,remove:nN,defaultNetwork:Gm,livenet:Gm,mainnet:Gm,testnet:$m,regtest:sN,get:xf,enableRegtest:aN,disableRegtest:oN}});var ea=V((Xm,F2)=>{var sh=require("buffer"),gs=sh.Buffer;function q2(e,t){for(var r in e)t[r]=e[r]}gs.from&&gs.alloc&&gs.allocUnsafe&&gs.allocUnsafeSlow?F2.exports=sh:(q2(sh,Xm),Xm.Buffer=Lo);function Lo(e,t,r){return gs(e,t,r)}Lo.prototype=Object.create(gs.prototype);q2(gs,Lo);Lo.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return gs(e,t,r)};Lo.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=gs(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};Lo.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return gs(e)};Lo.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return sh.SlowBuffer(e)}});var z2=V((az,H2)=>{"use strict";var ah=ea().Buffer;function cN(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var i=0;i<e.length;i++){var n=e.charAt(i),a=n.charCodeAt(0);if(t[a]!==255)throw new TypeError(n+" is ambiguous");t[a]=i}var u=e.length,h=e.charAt(0),b=Math.log(u)/Math.log(256),w=Math.log(256)/Math.log(u);function T(M){if((Array.isArray(M)||M instanceof Uint8Array)&&(M=ah.from(M)),!ah.isBuffer(M))throw new TypeError("Expected Buffer");if(M.length===0)return"";for(var P=0,L=0,X=0,W=M.length;X!==W&&M[X]===0;)X++,P++;for(var q=(W-X)*w+1>>>0,ee=new Uint8Array(q);X!==W;){for(var fe=M[X],_e=0,Te=q-1;(fe!==0||_e<L)&&Te!==-1;Te--,_e++)fe+=256*ee[Te]>>>0,ee[Te]=fe%u>>>0,fe=fe/u>>>0;if(fe!==0)throw new Error("Non-zero carry");L=_e,X++}for(var be=q-L;be!==q&&ee[be]===0;)be++;for(var O=h.repeat(P);be<q;++be)O+=e.charAt(ee[be]);return O}function I(M){if(typeof M!="string")throw new TypeError("Expected String");if(M.length===0)return ah.alloc(0);for(var P=0,L=0,X=0;M[P]===h;)L++,P++;for(var W=(M.length-P)*b+1>>>0,q=new Uint8Array(W);M[P];){var ee=t[M.charCodeAt(P)];if(ee===255)return;for(var fe=0,_e=W-1;(ee!==0||fe<X)&&_e!==-1;_e--,fe++)ee+=u*q[_e]>>>0,q[_e]=ee%256>>>0,ee=ee/256>>>0;if(ee!==0)throw new Error("Non-zero carry");X=fe,P++}for(var Te=W-X;Te!==W&&q[Te]===0;)Te++;var be=ah.allocUnsafe(L+(W-Te));be.fill(0,0,L);for(var O=L;Te!==W;)be[O++]=q[Te++];return be}function B(M){var P=I(M);if(P)return P;throw new Error("Non-base"+u+" character")}return{encode:T,decodeUnsafe:I,decode:B}}H2.exports=cN});var Ym=V((oz,j2)=>{var uN=z2(),fN="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";j2.exports=uN(fN)});var _f=V((cz,K2)=>{"use strict";var Zm=vt(),V2=Ym(),W2=require("buffer"),lN="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".split(""),Hn=function e(t){if(!(this instanceof e))return new e(t);if(Buffer.isBuffer(t)){var r=t;this.fromBuffer(r)}else if(typeof t=="string"){var i=t;this.fromString(i)}else t&&this.set(t)};Hn.validCharacters=function(t){return W2.Buffer.isBuffer(t)&&(t=t.toString()),Zm.every(Zm.map(t,function(r){return Zm.includes(lN,r)}))};Hn.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this};Hn.encode=function(e){if(!W2.Buffer.isBuffer(e))throw new Error("Input should be a buffer");return V2.encode(e)};Hn.decode=function(e){if(typeof e!="string")throw new Error("Input should be a string");return Buffer.from(V2.decode(e))};Hn.prototype.fromBuffer=function(e){return this.buf=e,this};Hn.prototype.fromString=function(e){var t=Hn.decode(e);return this.buf=t,this};Hn.prototype.toBuffer=function(){return this.buf};Hn.prototype.toString=function(){return Hn.encode(this.buf)};K2.exports=Hn});var Xc=V((fz,X2)=>{"use strict";var G2=vt(),oh=_f(),uz=require("buffer"),$2=ti().sha256sha256,Bi=function e(t){if(!(this instanceof e))return new e(t);if(Buffer.isBuffer(t)){var r=t;this.fromBuffer(r)}else if(typeof t=="string"){var i=t;this.fromString(i)}else t&&this.set(t)};Bi.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this};Bi.validChecksum=function(t,r){return G2.isString(t)&&(t=Buffer.from(oh.decode(t))),G2.isString(r)&&(r=Buffer.from(oh.decode(r))),r||(r=t.slice(-4),t=t.slice(0,-4)),Bi.checksum(t).toString("hex")===r.toString("hex")};Bi.decode=function(e){if(typeof e!="string")throw new Error("Input must be a string");var t=Buffer.from(oh.decode(e));if(t.length<4)throw new Error("Input string too short");var r=t.slice(0,-4),i=t.slice(-4),n=$2(r),a=n.slice(0,4);if(i.toString("hex")!==a.toString("hex"))throw new Error("Checksum mismatch");return r};Bi.checksum=function(e){return $2(e).slice(0,4)};Bi.encode=function(e){if(!Buffer.isBuffer(e))throw new Error("Input must be a buffer");var t=Buffer.alloc(e.length+4),r=Bi.checksum(e);return e.copy(t),r.copy(t,e.length),oh.encode(t)};Bi.prototype.fromBuffer=function(e){return this.buf=e,this};Bi.prototype.fromString=function(e){var t=Bi.decode(e);return this.buf=t,this};Bi.prototype.toBuffer=function(){return this.buf};Bi.prototype.toString=function(){return Bi.encode(this.buf)};X2.exports=Bi});var Q2=V(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.bech32m=Zc.bech32=void 0;var ch="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Z2={};for(let e=0;e<ch.length;e++){let t=ch.charAt(e);Z2[t]=e}function Yc(e){let t=e>>25;return(e&33554431)<<5^-(t>>0&1)&996825010^-(t>>1&1)&642813549^-(t>>2&1)&513874426^-(t>>3&1)&1027748829^-(t>>4&1)&705979059}function Y2(e){let t=1;for(let r=0;r<e.length;++r){let i=e.charCodeAt(r);if(i<33||i>126)return"Invalid prefix ("+e+")";t=Yc(t)^i>>5}t=Yc(t);for(let r=0;r<e.length;++r){let i=e.charCodeAt(r);t=Yc(t)^i&31}return t}function Jm(e,t,r,i){let n=0,a=0,u=(1<<r)-1,h=[];for(let b=0;b<e.length;++b)for(n=n<<t|e[b],a+=t;a>=r;)a-=r,h.push(n>>a&u);if(i)a>0&&h.push(n<<r-a&u);else{if(a>=t)return"Excess padding";if(n<<r-a&u)return"Non-zero padding"}return h}function pN(e){return Jm(e,8,5,!0)}function hN(e){let t=Jm(e,5,8,!1);if(Array.isArray(t))return t}function dN(e){let t=Jm(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}function J2(e){let t;e==="bech32"?t=1:t=734539939;function r(u,h,b){if(b=b||90,u.length+7+h.length>b)throw new TypeError("Exceeds length limit");u=u.toLowerCase();let w=Y2(u);if(typeof w=="string")throw new Error(w);let T=u+"1";for(let I=0;I<h.length;++I){let B=h[I];if(B>>5)throw new Error("Non 5-bit word");w=Yc(w)^B,T+=ch.charAt(B)}for(let I=0;I<6;++I)w=Yc(w);w^=t;for(let I=0;I<6;++I){let B=w>>(5-I)*5&31;T+=ch.charAt(B)}return T}function i(u,h){if(h=h||90,u.length<8)return u+" too short";if(u.length>h)return"Exceeds length limit";let b=u.toLowerCase(),w=u.toUpperCase();if(u!==b&&u!==w)return"Mixed-case string "+u;u=b;let T=u.lastIndexOf("1");if(T===-1)return"No separator character for "+u;if(T===0)return"Missing prefix for "+u;let I=u.slice(0,T),B=u.slice(T+1);if(B.length<6)return"Data too short";let M=Y2(I);if(typeof M=="string")return M;let P=[];for(let L=0;L<B.length;++L){let X=B.charAt(L),W=Z2[X];if(W===void 0)return"Unknown character "+X;M=Yc(M)^W,!(L+6>=B.length)&&P.push(W)}return M!==t?"Invalid checksum for "+u:{prefix:I,words:P}}function n(u,h){let b=i(u,h);if(typeof b=="object")return b}function a(u,h){let b=i(u,h);if(typeof b=="object")return b;throw new Error(b)}return{decodeUnsafe:n,decode:a,encode:r,toWords:pN,fromWordsUnsafe:hN,fromWords:dN}}Zc.bech32=J2("bech32");Zc.bech32m=J2("bech32m")});var tw=V((pz,ew)=>{"use strict";var Jc=Q2(),mN=function(e){if(typeof e!="string")throw new Error("Input should be a string");var t;let r=Jc.bech32.fromWords,i=ja.BECH32;try{t=Jc.bech32.decode(e)}catch(a){if(a.message.indexOf("Invalid checksum")>-1)t=Jc.bech32m.decode(e),i=ja.BECH32M,r=Jc.bech32m.fromWords;else throw a}let n=t.words[0];if(n>=1&&i!==ja.BECH32M)throw new Error("Version 1+ witness address must use Bech32m checksum");return{prefix:t.prefix,data:Buffer.from(r(t.words.slice(1))),version:n}},vN=function(e,t,r,i){if(typeof e!="string")throw new Error("Prefix should be a string");if(typeof t!="number")throw new Error("version should be a number");if(i&&typeof i=="string"&&(i=ja[i.toUpperCase()]||-1),i&&!(i==ja.BECH32||i==ja.BECH32M))throw new Error("Invalid encoding specified");let n=i==ja.BECH32M?Jc.bech32m:Jc.bech32,a=n.toWords(r);return a.unshift(t),n.encode(e,a)},ja={BECH32:1,BECH32M:2};ew.exports={decode:mN,encode:vN,encodings:ja}});var bs=V((hz,iw)=>{"use strict";var yf=vt(),rw=It(),gN=hr(),Qc=Zr(),Rr=function e(t){if(!(this instanceof e))return new e(t);if(!yf.isUndefined(t))if(Buffer.isBuffer(t))this.set({buf:t});else if(yf.isString(t))this.set({buf:Buffer.from(t,"hex")});else if(yf.isObject(t)){var r=t;this.set(r)}else throw new TypeError("Unrecognized argument for BufferReader")};Rr.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this.pos=e.pos||this.pos||0,this};Rr.prototype.eof=function(){return this.buf?this.pos>=this.buf.length:!0};Rr.prototype.finished=Rr.prototype.eof;Rr.prototype.read=function(e){rw.checkArgument(!yf.isUndefined(e),"Must specify a length");var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,t};Rr.prototype.readAll=function(){var e=this.buf.slice(this.pos,this.buf.length);return this.pos=this.buf.length,e};Rr.prototype.readUInt8=function(){var e=this.buf.readUInt8(this.pos);return this.pos=this.pos+1,e};Rr.prototype.readUInt16BE=function(){var e=this.buf.readUInt16BE(this.pos);return this.pos=this.pos+2,e};Rr.prototype.readUInt16LE=function(){var e=this.buf.readUInt16LE(this.pos);return this.pos=this.pos+2,e};Rr.prototype.readUInt32BE=function(){var e=this.buf.readUInt32BE(this.pos);return this.pos=this.pos+4,e};Rr.prototype.readUInt32LE=function(){var e=this.buf.readUInt32LE(this.pos);return this.pos=this.pos+4,e};Rr.prototype.readInt32LE=function(){var e=this.buf.readInt32LE(this.pos);return this.pos=this.pos+4,e};Rr.prototype.readUInt64BEBN=function(){var e=this.buf.slice(this.pos,this.pos+8),t=Qc.fromBuffer(e);return this.pos=this.pos+8,t};Rr.prototype.readUInt64LEBN=function(){var e=this.buf.readUInt32LE(this.pos),t=this.buf.readUInt32LE(this.pos+4),r=t*4294967296+e,i;if(r<=9007199254740991)i=new Qc(r);else{var n=Array.prototype.slice.call(this.buf,this.pos,this.pos+8);i=new Qc(n,10,"le")}return this.pos=this.pos+8,i};Rr.prototype.readVarintNum=function(){var e=this.readUInt8();switch(e){case 253:return this.readUInt16LE();case 254:return this.readUInt32LE();case 255:var t=this.readUInt64LEBN(),r=t.toNumber();if(r<=Math.pow(2,53))return r;throw new Error("number too large to retain precision - use readVarintBN");default:return e}};Rr.prototype.readVarLengthBuffer=function(){var e=this.readVarintNum(),t=this.read(e);return rw.checkState(t.length===e,"Invalid length while reading varlength buffer. Expected to read: "+e+" and read "+t.length),t};Rr.prototype.readVarintBuf=function(){var e=this.buf.readUInt8(this.pos);switch(e){case 253:return this.read(3);case 254:return this.read(5);case 255:return this.read(9);default:return this.read(1)}};Rr.prototype.readVarintBN=function(){var e=this.readUInt8();switch(e){case 253:return new Qc(this.readUInt16LE());case 254:return new Qc(this.readUInt32LE());case 255:return this.readUInt64LEBN();default:return new Qc(e)}};Rr.prototype.reverse=function(){for(var e=Buffer.alloc(this.buf.length),t=0;t<e.length;t++)e[t]=this.buf[this.buf.length-1-t];return this.buf=e,this};Rr.prototype.readReverse=function(e){yf.isUndefined(e)&&(e=this.buf.length);var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,gN.reverse(t)};iw.exports=Rr});var yi=V((dz,sw)=>{"use strict";var Qm=hr(),nw=require("assert"),Ar=function e(t){if(!(this instanceof e))return new e(t);this.bufLen=0,t?this.set(t):this.bufs=[]};Ar.prototype.set=function(e){return this.bufs=e.bufs||this.bufs||[],this.bufLen=this.bufs.reduce(function(t,r){return t+r.length},0),this};Ar.prototype.toBuffer=function(){return this.concat()};Ar.prototype.concat=function(){return Buffer.concat(this.bufs,this.bufLen)};Ar.prototype.write=function(e){return nw(Qm.isBuffer(e)),this.bufs.push(e),this.bufLen+=e.length,this};Ar.prototype.writeReverse=function(e){return nw(Qm.isBuffer(e)),this.bufs.push(Qm.reverse(e)),this.bufLen+=e.length,this};Ar.prototype.writeUInt8=function(e){var t=Buffer.alloc(1);return t.writeUInt8(e,0),this.write(t),this};Ar.prototype.writeUInt16BE=function(e){var t=Buffer.alloc(2);return t.writeUInt16BE(e,0),this.write(t),this};Ar.prototype.writeUInt16LE=function(e){var t=Buffer.alloc(2);return t.writeUInt16LE(e,0),this.write(t),this};Ar.prototype.writeUInt32BE=function(e){var t=Buffer.alloc(4);return t.writeUInt32BE(e,0),this.write(t),this};Ar.prototype.writeInt32LE=function(e){var t=Buffer.alloc(4);return t.writeInt32LE(e,0),this.write(t),this};Ar.prototype.writeUInt32LE=function(e){var t=Buffer.alloc(4);return t.writeUInt32LE(e,0),this.write(t),this};Ar.prototype.writeUInt64BEBN=function(e){var t=e.toBuffer({size:8});return this.write(t),this};Ar.prototype.writeUInt64LEBN=function(e){var t=e.toBuffer({size:8});return this.writeReverse(t),this};Ar.prototype.writeVarintNum=function(e){var t=Ar.varintBufNum(e);return this.write(t),this};Ar.prototype.writeVarintBN=function(e){var t=Ar.varintBufBN(e);return this.write(t),this};Ar.varintBufNum=function(e){var t=void 0;return e<253?(t=Buffer.alloc(1),t.writeUInt8(e,0)):e<65536?(t=Buffer.alloc(3),t.writeUInt8(253,0),t.writeUInt16LE(e,1)):e<4294967296?(t=Buffer.alloc(5),t.writeUInt8(254,0),t.writeUInt32LE(e,1)):(t=Buffer.alloc(9),t.writeUInt8(255,0),t.writeInt32LE(e&-1,1),t.writeUInt32LE(Math.floor(e/4294967296),5)),t};Ar.varintBufBN=function(e){var t=void 0,r=e.toNumber();if(r<253)t=Buffer.alloc(1),t.writeUInt8(r,0);else if(r<65536)t=Buffer.alloc(3),t.writeUInt8(253,0),t.writeUInt16LE(r,1);else if(r<4294967296)t=Buffer.alloc(5),t.writeUInt8(254,0),t.writeUInt32LE(r,1);else{var i=new Ar;i.writeUInt8(255),i.writeUInt64LEBN(e);var t=i.concat()}return t};sw.exports=Ar});var uh=V((mz,aw)=>{"use strict";var eu=vt(),wf=It(),bN=hr(),xN=Lr();function yt(e){if(!(this instanceof yt))return new yt(e);var t;if(eu.isNumber(e))t=e;else if(eu.isString(e))t=yt.map[e];else throw new TypeError('Unrecognized num type: "'+typeof e+'" for Opcode');return xN.defineImmutable(this,{num:t}),this}yt.fromBuffer=function(e){return wf.checkArgument(bN.isBuffer(e)),new yt(+("0x"+e.toString("hex")))};yt.fromNumber=function(e){return wf.checkArgument(eu.isNumber(e)),new yt(e)};yt.fromString=function(e){wf.checkArgument(eu.isString(e));var t=yt.map[e];if(typeof t>"u")throw new TypeError("Invalid opcodestr");return new yt(t)};yt.prototype.toHex=function(){return this.num.toString(16)};yt.prototype.toBuffer=function(){return Buffer.from(this.toHex(),"hex")};yt.prototype.toNumber=function(){return this.num};yt.prototype.toString=function(){var e=yt.reverseMap[this.num];if(typeof e>"u")throw new Error("Opcode does not have a string representation");return e};yt.smallInt=function(e){return wf.checkArgument(eu.isNumber(e),"Invalid Argument: n should be number"),wf.checkArgument(e>=0&&e<=16,"Invalid Argument: n must be between 0 and 16"),e===0?yt("OP_0"):new yt(yt.map.OP_1+e-1)};yt.map={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_CHECKLOCKTIMEVERIFY:177,OP_CHECKSEQUENCEVERIFY:178,OP_NOP1:176,OP_NOP2:177,OP_NOP3:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255};yt.reverseMap=[];for(ev in yt.map)yt.reverseMap[yt.map[ev]]=ev;var ev;eu.extend(yt,yt.map);yt.isSmallIntOp=function(e){return e instanceof yt&&(e=e.toNumber()),e===yt.map.OP_0||e>=yt.map.OP_1&&e<=yt.map.OP_16};yt.prototype.inspect=function(){return"<Opcode: "+this.toString()+", hex: "+this.toHex()+", decimal: "+this.num+">"};aw.exports=yt});var iv=V((gz,cw)=>{"use strict";var ai=zn(),_N=bs(),yN=yi(),fh=ti(),pe=uh(),Va=jn(),Do=Pi(),ow=za(),gr=It(),tv=vt(),rv=Yi(),vz=require("buffer"),oi=hr(),wN=Lr(),Y=function e(t){if(!(this instanceof e))return new e(t);if(this.chunks=[],oi.isBuffer(t))return e.fromBuffer(t);if(t instanceof ai)return e.fromAddress(t);if(t instanceof e)return e.fromBuffer(t.toBuffer());if(typeof t=="string")return e.fromString(t);tv.isObject(t)&&Array.isArray(t.chunks)&&this.set(t)};Y.VERIFY_TAPROOT=1<<17;Y.prototype.set=function(e){return gr.checkArgument(tv.isObject(e)),gr.checkArgument(Array.isArray(e.chunks)),this.chunks=e.chunks,this};Y.fromBuffer=function(e){var t=new Y;t.chunks=[];for(var r=new _N(e);!r.finished();)try{var i=r.readUInt8(),n,a;i>0&&i<pe.OP_PUSHDATA1?(n=i,t.chunks.push({buf:r.read(n),len:n,opcodenum:i})):i===pe.OP_PUSHDATA1?(n=r.readUInt8(),a=r.read(n),t.chunks.push({buf:a,len:n,opcodenum:i})):i===pe.OP_PUSHDATA2?(n=r.readUInt16LE(),a=r.read(n),t.chunks.push({buf:a,len:n,opcodenum:i})):i===pe.OP_PUSHDATA4?(n=r.readUInt32LE(),a=r.read(n),t.chunks.push({buf:a,len:n,opcodenum:i})):t.chunks.push({opcodenum:i})}catch(u){throw u instanceof RangeError?new rv.Script.InvalidBuffer(e.toString("hex")):u}return t};Y.prototype.toBuffer=function(){for(var e=new yN,t=0;t<this.chunks.length;t++){var r=this.chunks[t],i=r.opcodenum;e.writeUInt8(r.opcodenum),r.buf&&(i<pe.OP_PUSHDATA1?e.write(r.buf):i===pe.OP_PUSHDATA1?(e.writeUInt8(r.len),e.write(r.buf)):i===pe.OP_PUSHDATA2?(e.writeUInt16LE(r.len),e.write(r.buf)):i===pe.OP_PUSHDATA4&&(e.writeUInt32LE(r.len),e.write(r.buf)))}return e.concat()};Y.fromASM=function(e){var t=new Y;t.chunks=[];for(var r=e.split(" "),i=0;i<r.length;){var n=r[i],a=pe(n),u=a.toNumber();if(u==null){var h=Buffer.from(r[i],"hex");t.chunks.push({buf:h,len:h.length,opcodenum:h.length}),i=i+1}else u===pe.OP_PUSHDATA1||u===pe.OP_PUSHDATA2||u===pe.OP_PUSHDATA4?(t.chunks.push({buf:Buffer.from(r[i+2],"hex"),len:parseInt(r[i+1]),opcodenum:u}),i=i+3):(t.chunks.push({opcodenum:u}),i=i+1)}return t};Y.fromHex=function(e){return new Y(Buffer.from(e,"hex"))};Y.fromString=function(e){if(wN.isHexa(e)||e.length===0)return new Y(Buffer.from(e,"hex"));var t=new Y;t.chunks=[];for(var r=e.split(" "),i=0;i<r.length;){var n=r[i],a=pe(n),u=a.toNumber();if(u==null)if(u=parseInt(n),u>0&&u<pe.OP_PUSHDATA1)t.chunks.push({buf:Buffer.from(r[i+1].slice(2),"hex"),len:u,opcodenum:u}),i=i+2;else throw new Error("Invalid script: "+JSON.stringify(e));else if(u===pe.OP_PUSHDATA1||u===pe.OP_PUSHDATA2||u===pe.OP_PUSHDATA4){if(r[i+2].slice(0,2)!=="0x")throw new Error("Pushdata data must start with 0x");t.chunks.push({buf:Buffer.from(r[i+2].slice(2),"hex"),len:parseInt(r[i+1]),opcodenum:u}),i=i+3}else t.chunks.push({opcodenum:u}),i=i+1}return t};Y.prototype._chunkToString=function(e,t){var r=e.opcodenum,i=t==="asm",n="";if(e.buf)(!i&&r===pe.OP_PUSHDATA1||r===pe.OP_PUSHDATA2||r===pe.OP_PUSHDATA4)&&(n=n+" "+pe(r).toString()),e.len>0&&(i?n=n+" "+e.buf.toString("hex"):n=n+" "+e.len+" 0x"+e.buf.toString("hex"));else if(typeof pe.reverseMap[r]<"u")i?r===0?n=n+" 0":r===79?n=n+" -1":n=n+" "+pe(r).toString():n=n+" "+pe(r).toString();else{var a=r.toString(16);a.length%2!==0&&(a="0"+a),i?n=n+" "+a:n=n+" 0x"+a}return n};Y.prototype.toASM=function(){for(var e="",t=0;t<this.chunks.length;t++){var r=this.chunks[t];e+=this._chunkToString(r,"asm")}return e.substr(1)};Y.prototype.toString=function(){for(var e="",t=0;t<this.chunks.length;t++){var r=this.chunks[t];e+=this._chunkToString(r)}return e.substr(1)};Y.prototype.toHex=function(){return this.toBuffer().toString("hex")};Y.prototype.inspect=function(){return"<Script: "+this.toString()+">"};Y.prototype.isPublicKeyHashOut=function(){return!!(this.chunks.length===5&&this.chunks[0].opcodenum===pe.OP_DUP&&this.chunks[1].opcodenum===pe.OP_HASH160&&this.chunks[2].buf&&this.chunks[2].buf.length===20&&this.chunks[3].opcodenum===pe.OP_EQUALVERIFY&&this.chunks[4].opcodenum===pe.OP_CHECKSIG)};Y.prototype.isPublicKeyHashIn=function(){if(this.chunks.length===2){var e=this.chunks[0].buf,t=this.chunks[1].buf;if(e&&e.length&&e[0]===48&&t&&t.length){var r=t[0];if((r===4||r===6||r===7)&&t.length===65)return!0;if((r===3||r===2)&&t.length===33)return!0}}return!1};Y.prototype.getPublicKey=function(){return gr.checkState(this.isPublicKeyOut(),"Can't retrieve PublicKey from a non-PK output"),this.chunks[0].buf};Y.prototype.getPublicKeyHash=function(){if(this.isPublicKeyHashOut())return this.chunks[2].buf;if(this.isWitnessPublicKeyHashOut())return this.chunks[1].buf;throw new Error("Can't retrieve PublicKeyHash from a non-PKH output")};Y.prototype.isPublicKeyOut=function(){if(this.chunks.length===2&&this.chunks[0].buf&&this.chunks[0].buf.length&&this.chunks[1].opcodenum===pe.OP_CHECKSIG){var e=this.chunks[0].buf,t=e[0],r=!1;if(((t===4||t===6||t===7)&&e.length===65||(t===3||t===2)&&e.length===33)&&(r=!0),r)return Va.isValid(e)}return!1};Y.prototype.isPublicKeyIn=function(){if(this.chunks.length===1){var e=this.chunks[0].buf;if(e&&e.length&&e[0]===48)return!0}return!1};Y.prototype.isScriptHashOut=function(){var e=this.toBuffer();return e.length===23&&e[0]===pe.OP_HASH160&&e[1]===20&&e[e.length-1]===pe.OP_EQUAL};Y.prototype.isWitnessScriptHashOut=function(){var e=this.toBuffer();return e.length===34&&e[0]===pe.OP_0&&e[1]===32};Y.prototype.isWitnessPublicKeyHashOut=function(){var e=this.toBuffer();return e.length===22&&e[0]===pe.OP_0&&e[1]===20};Y.prototype.isTaproot=function(){var e=this.toBuffer();return e.length===34&&e[0]===pe.OP_1&&e[1]===32};Y.prototype.isWitnessProgram=function(e){e||(e={});var t=this.toBuffer();return t.length<4||t.length>42||t[0]!==pe.OP_0&&!(t[0]>=pe.OP_1&&t[0]<=pe.OP_16)?!1:t.length===t[1]+2?(e.version=t[0],e.program=t.slice(2,t.length),!0):!1};Y.prototype.isScriptHashIn=function(){if(this.chunks.length<=1)return!1;var e=this.chunks[this.chunks.length-1],t=e.buf;if(!t)return!1;var r;try{r=Y.fromBuffer(t)}catch(n){if(n instanceof rv.Script.InvalidBuffer)return!1;throw n}var i=r.classify();return i!==Y.types.UNKNOWN};Y.prototype.isMultisigOut=function(){return this.chunks.length>3&&pe.isSmallIntOp(this.chunks[0].opcodenum)&&this.chunks.slice(1,this.chunks.length-2).every(function(e){return e.buf&&oi.isBuffer(e.buf)})&&pe.isSmallIntOp(this.chunks[this.chunks.length-2].opcodenum)&&this.chunks[this.chunks.length-1].opcodenum===pe.OP_CHECKMULTISIG};Y.prototype.isMultisigIn=function(){return this.chunks.length>=2&&this.chunks[0].opcodenum===0&&this.chunks.slice(1,this.chunks.length).every(function(e){return e.buf&&oi.isBuffer(e.buf)&&Do.isTxDER(e.buf)})};Y.prototype.isDataOut=function(){return this.chunks.length>=1&&this.chunks[0].opcodenum===pe.OP_RETURN&&(this.chunks.length===1||this.chunks.length===2&&this.chunks[1].buf&&this.chunks[1].buf.length<=Y.OP_RETURN_STANDARD_SIZE&&this.chunks[1].length===this.chunks.len)};Y.prototype.getData=function(){if(this.isDataOut()||this.isScriptHashOut()||this.isWitnessScriptHashOut()||this.isWitnessPublicKeyHashOut()||this.isTaproot())return this.chunks[1]==null?Buffer.alloc(0):Buffer.from(this.chunks[1].buf);if(this.isPublicKeyHashOut())return Buffer.from(this.chunks[2].buf);throw new Error("Unrecognized script type to get data from")};Y.prototype.isPushOnly=function(){return this.chunks.every(function(e){return e.opcodenum<=pe.OP_16})};Y.types={};Y.types.UNKNOWN="Unknown";Y.types.PUBKEY_OUT="Pay to public key";Y.types.PUBKEY_IN="Spend from public key";Y.types.PUBKEYHASH_OUT="Pay to public key hash";Y.types.PUBKEYHASH_IN="Spend from public key hash";Y.types.SCRIPTHASH_OUT="Pay to script hash";Y.types.SCRIPTHASH_IN="Spend from script hash";Y.types.MULTISIG_OUT="Pay to multisig";Y.types.MULTISIG_IN="Spend from multisig";Y.types.DATA_OUT="Data push";Y.OP_RETURN_STANDARD_SIZE=80;Y.prototype.classify=function(){if(this._isInput)return this.classifyInput();if(this._isOutput)return this.classifyOutput();var e=this.classifyOutput();return e!=Y.types.UNKNOWN?e:this.classifyInput()};Y.outputIdentifiers={};Y.outputIdentifiers.PUBKEY_OUT=Y.prototype.isPublicKeyOut;Y.outputIdentifiers.PUBKEYHASH_OUT=Y.prototype.isPublicKeyHashOut;Y.outputIdentifiers.MULTISIG_OUT=Y.prototype.isMultisigOut;Y.outputIdentifiers.SCRIPTHASH_OUT=Y.prototype.isScriptHashOut;Y.outputIdentifiers.DATA_OUT=Y.prototype.isDataOut;Y.prototype.classifyOutput=function(){for(var e in Y.outputIdentifiers)if(Y.outputIdentifiers[e].bind(this)())return Y.types[e];return Y.types.UNKNOWN};Y.inputIdentifiers={};Y.inputIdentifiers.PUBKEY_IN=Y.prototype.isPublicKeyIn;Y.inputIdentifiers.PUBKEYHASH_IN=Y.prototype.isPublicKeyHashIn;Y.inputIdentifiers.MULTISIG_IN=Y.prototype.isMultisigIn;Y.inputIdentifiers.SCRIPTHASH_IN=Y.prototype.isScriptHashIn;Y.prototype.classifyInput=function(){for(var e in Y.inputIdentifiers)if(Y.inputIdentifiers[e].bind(this)())return Y.types[e];return Y.types.UNKNOWN};Y.prototype.isStandard=function(){return this.classify()!==Y.types.UNKNOWN};Y.prototype.prepend=function(e){return this._addByType(e,!0),this};Y.prototype.equals=function(e){if(gr.checkState(e instanceof Y,"Must provide another script"),this.chunks.length!==e.chunks.length)return!1;var t;for(t=0;t<this.chunks.length;t++){if(oi.isBuffer(this.chunks[t].buf)&&!oi.isBuffer(e.chunks[t].buf)||oi.isBuffer(this.chunks[t].buf)&&!oi.equals(this.chunks[t].buf,e.chunks[t].buf))return!1;if(this.chunks[t].opcodenum!==e.chunks[t].opcodenum)return!1}return!0};Y.prototype.add=function(e){return this._addByType(e,!1),this};Y.prototype._addByType=function(e,t){if(typeof e=="string")this._addOpcode(e,t);else if(typeof e=="number")this._addOpcode(e,t);else if(e instanceof pe)this._addOpcode(e,t);else if(oi.isBuffer(e))this._addBuffer(e,t);else if(e instanceof Y)this.chunks=this.chunks.concat(e.chunks);else if(typeof e=="object")this._insertAtPosition(e,t);else throw new Error("Invalid script chunk")};Y.prototype._insertAtPosition=function(e,t){t?this.chunks.unshift(e):this.chunks.push(e)};Y.prototype._addOpcode=function(e,t){var r;return typeof e=="number"?r=e:e instanceof pe?r=e.toNumber():r=pe(e).toNumber(),this._insertAtPosition({opcodenum:r},t),this};Y.prototype._addBuffer=function(e,t){var r,i=e.length;if(i>=0&&i<pe.OP_PUSHDATA1)r=i;else if(i<Math.pow(2,8))r=pe.OP_PUSHDATA1;else if(i<Math.pow(2,16))r=pe.OP_PUSHDATA2;else if(i<Math.pow(2,32))r=pe.OP_PUSHDATA4;else throw new Error("You can't push that much data");return this._insertAtPosition({buf:e,len:i,opcodenum:r},t),this};Y.prototype.hasCodeseparators=function(){for(var e=0;e<this.chunks.length;e++)if(this.chunks[e].opcodenum===pe.OP_CODESEPARATOR)return!0;return!1};Y.prototype.removeCodeseparators=function(){for(var e=[],t=0;t<this.chunks.length;t++)this.chunks[t].opcodenum!==pe.OP_CODESEPARATOR&&e.push(this.chunks[t]);return this.chunks=e,this};Y.buildMultisigOut=function(e,t,r){gr.checkArgument(t<=e.length,"Number of required signatures must be less than or equal to the number of public keys"),r=r||{};var i=new Y;i.add(pe.smallInt(t)),e=e.map(Va);var n=e;r.noSorting||(n=tv.sortBy(e,function(h){return h.toString("hex")}));for(var a=0;a<n.length;a++){var u=n[a];i.add(u.toBuffer())}return i.add(pe.smallInt(e.length)),i.add(pe.OP_CHECKMULTISIG),i};Y.buildWitnessMultisigOutFromScript=function(e){if(e instanceof Y){var t=new Y;return t.add(pe.OP_0),t.add(fh.sha256(e.toBuffer())),t}else throw new TypeError("First argument is expected to be a p2sh script")};Y.buildMultisigIn=function(e,t,r,i){gr.checkArgument(Array.isArray(e)),gr.checkArgument(!isNaN(t)),gr.checkArgument(Array.isArray(r)),i=i||{};var n=new Y;n.add(pe.OP_0);for(let a of r)gr.checkArgument(oi.isBuffer(a),"Signatures must be an array of Buffers"),n.add(a);return n};Y.buildP2SHMultisigIn=function(e,t,r,i){gr.checkArgument(Array.isArray(e)),gr.checkArgument(!isNaN(t)),gr.checkArgument(Array.isArray(r)),i=i||{};var n=new Y;n.add(pe.OP_0);for(let a of r)gr.checkArgument(oi.isBuffer(a),"Signatures must be an array of Buffers"),n.add(a);return n.add((i.cachedMultisig||Y.buildMultisigOut(e,t,i)).toBuffer()),n};Y.buildPublicKeyHashOut=function(e){gr.checkArgument(e!=null),gr.checkArgument(e instanceof Va||e instanceof ai||typeof e=="string"),e instanceof Va?e=e.toAddress():typeof e=="string"&&(e=new ai(e));var t=new Y;return t.add(pe.OP_DUP).add(pe.OP_HASH160).add(e.hashBuffer).add(pe.OP_EQUALVERIFY).add(pe.OP_CHECKSIG),t._network=e.network,t};Y.buildWitnessV0Out=function(e){gr.checkArgument(e!=null),gr.checkArgument(e instanceof Va||e instanceof ai||typeof e=="string"),e instanceof Va?e=e.toAddress(null,ai.PayToWitnessPublicKeyHash):typeof e=="string"&&(e=new ai(e));var t=new Y;return t.add(pe.OP_0).add(e.hashBuffer),t._network=e.network,t};Y.buildPublicKeyOut=function(e){gr.checkArgument(e instanceof Va);var t=new Y;return t.add(e.toBuffer()).add(pe.OP_CHECKSIG),t};Y.buildDataOut=function(e,t){gr.checkArgument(e==null||typeof e=="string"||oi.isBuffer(e)),typeof e=="string"&&(e=Buffer.from(e,t));var r=new Y;return r.add(pe.OP_RETURN),e!=null&&r.add(e),r};Y.buildScriptHashOut=function(e){gr.checkArgument(e instanceof Y||e instanceof ai&&e.isPayToScriptHash());var t=new Y;return t.add(pe.OP_HASH160).add(e instanceof ai?e.hashBuffer:fh.sha256ripemd160(e.toBuffer())).add(pe.OP_EQUAL),t._network=e._network||e.network,t};Y.buildPublicKeyIn=function(e,t){gr.checkArgument(e instanceof Do||oi.isBuffer(e)),gr.checkArgument(t==null||!isNaN(t)),e instanceof Do&&(e=e.toBuffer());var r=new Y;return r.add(oi.concat([e,oi.integerAsSingleByteBuffer(t||Do.SIGHASH_ALL)])),r};Y.buildPublicKeyHashIn=function(e,t,r){gr.checkArgument(t instanceof Do||oi.isBuffer(t)),gr.checkArgument(r==null||!isNaN(r)),t instanceof Do&&(t=t.toBuffer());var i=new Y().add(oi.concat([t,oi.integerAsSingleByteBuffer(r||Do.SIGHASH_ALL)])).add(new Va(e).toBuffer());return i};Y.empty=function(){return new Y};Y.prototype.toScriptHashOut=function(){return Y.buildScriptHashOut(this)};Y.fromAddress=function(e){if(e=ai(e),e.isPayToScriptHash())return Y.buildScriptHashOut(e);if(e.isPayToPublicKeyHash())return Y.buildPublicKeyHashOut(e);if(e.isPayToWitnessPublicKeyHash())return Y.buildWitnessV0Out(e);if(e.isPayToWitnessScriptHash())return Y.buildWitnessV0Out(e);throw new rv.Script.UnrecognizedAddress(e)};Y.prototype.getAddressInfo=function(e){if(this._isInput)return this._getInputAddressInfo();if(this._isOutput)return this._getOutputAddressInfo();var t=this._getOutputAddressInfo();return t||this._getInputAddressInfo()};Y.prototype._getOutputAddressInfo=function(){var e={};if(this.isScriptHashOut())e.hashBuffer=this.getData(),e.type=ai.PayToScriptHash;else if(this.isPublicKeyHashOut())e.hashBuffer=this.getData(),e.type=ai.PayToPublicKeyHash;else if(this.isWitnessScriptHashOut())e.hashBuffer=this.getData(),e.type=ai.PayToWitnessScriptHash;else if(this.isWitnessPublicKeyHashOut())e.hashBuffer=this.getData(),e.type=ai.PayToWitnessPublicKeyHash;else if(this.isTaproot())e.hashBuffer=this.getData(),e.type=ai.PayToTaproot;else return!1;return e};Y.prototype._getInputAddressInfo=function(){var e={};if(this.isPublicKeyHashIn())e.hashBuffer=fh.sha256ripemd160(this.chunks[1].buf),e.type=ai.PayToPublicKeyHash;else if(this.isScriptHashIn())e.hashBuffer=fh.sha256ripemd160(this.chunks[this.chunks.length-1].buf),e.type=ai.PayToScriptHash;else return!1;return e};Y.prototype.toAddress=function(e){var t=this.getAddressInfo();return t?(t.network=ow.get(e)||this._network||ow.defaultNetwork,new ai(t)):!1};Y.prototype.findAndDelete=function(e){for(var t=e.toBuffer(),r=t.toString("hex"),i=0;i<this.chunks.length;i++){var n=Y({chunks:[this.chunks[i]]}),a=n.toBuffer(),u=a.toString("hex");r===u&&this.chunks.splice(i,1)}return this};Y.prototype.checkMinimalPush=function(e){var t=this.chunks[e],r=t.buf,i=t.opcodenum;return r?r.length===0?i===pe.OP_0:r.length===1&&r[0]>=1&&r[0]<=16?i===pe.OP_1+(r[0]-1):r.length===1&&r[0]===129?i===pe.OP_1NEGATE:r.length<=75?i===r.length:r.length<=255?i===pe.OP_PUSHDATA1:r.length<=65535?i===pe.OP_PUSHDATA2:!0:!0};Y.prototype._decodeOP_N=function(e){if(e===pe.OP_0)return 0;if(e>=pe.OP_1&&e<=pe.OP_16)return e-(pe.OP_1-1);throw new Error("Invalid opcode: "+JSON.stringify(e))};Y.prototype.getSignatureOperationsCount=function(e){e=e??!0;var t=0,r=pe.OP_INVALIDOPCODE;for(let n of this.chunks){var i=n.opcodenum;i==pe.OP_CHECKSIG||i==pe.OP_CHECKSIGVERIFY?t++:(i==pe.OP_CHECKMULTISIG||i==pe.OP_CHECKMULTISIGVERIFY)&&(e&&r>=pe.OP_1&&r<=pe.OP_16?t+=this._decodeOP_N(r):t+=20),r=i}return t};cw.exports=Y});var fw=V((bz,uw)=>{uw.exports=function(e,t){if(typeof e.compare=="function")return e.compare(t);if(e===t)return 0;for(var r=e.length,i=t.length,n=0,a=Math.min(r,i);n<a&&e[n]===t[n];)++n;return n!==a&&(r=e[n],i=t[n]),r<i?-1:i<r?1:0}});var xs=V((_z,dw)=>{"use strict";var lh=vt(),nv=Zr(),xz=require("buffer"),pw=hr(),sv=Lr(),hw=yi(),av=Mi(),lw=It(),SN=Yi(),EN=9007199254740991;function ci(e){if(!(this instanceof ci))return new ci(e);if(lh.isObject(e))if(this.satoshis=e.satoshis,pw.isBuffer(e.script))this._scriptBuffer=e.script;else{var t;lh.isString(e.script)&&sv.isHexa(e.script)?t=Buffer.from(e.script,"hex"):t=e.script,this.setScript(t)}else throw new TypeError("Unrecognized argument for Output")}Object.defineProperty(ci.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this._script?this._script:(this.setScriptFromBuffer(this._scriptBuffer),this._script)}});Object.defineProperty(ci.prototype,"satoshis",{configurable:!1,enumerable:!0,get:function(){return this._satoshis},set:function(e){e instanceof nv?(this._satoshisBN=e,this._satoshis=e.toNumber()):lh.isString(e)?(this._satoshis=parseInt(e),this._satoshisBN=nv.fromNumber(this._satoshis)):(lw.checkArgument(sv.isNaturalNumber(e),"Output satoshis is not a natural number"),this._satoshisBN=nv.fromNumber(e),this._satoshis=e),lw.checkState(sv.isNaturalNumber(this._satoshis),"Output satoshis is not a natural number")}});ci.prototype.invalidSatoshis=function(){return this._satoshis>EN?"transaction txout satoshis greater than max safe integer":this._satoshis!==this._satoshisBN.toNumber()?"transaction txout satoshis has corrupted value":this._satoshis<0?"transaction txout negative":!1};ci.prototype.toObject=ci.prototype.toJSON=function(){var t={satoshis:this.satoshis};return t.script=this._scriptBuffer.toString("hex"),t};ci.fromObject=function(e){return new ci(e)};ci.prototype.setScriptFromBuffer=function(e){this._scriptBuffer=e;try{this._script=av.fromBuffer(this._scriptBuffer),this._script._isOutput=!0}catch(t){if(t instanceof SN.Script.InvalidBuffer)this._script=null;else throw t}};ci.prototype.setScript=function(e){if(e instanceof av)this._scriptBuffer=e.toBuffer(),this._script=e,this._script._isOutput=!0;else if(lh.isString(e))this._script=av.fromString(e),this._scriptBuffer=this._script.toBuffer(),this._script._isOutput=!0;else if(pw.isBuffer(e))this.setScriptFromBuffer(e);else throw new TypeError("Invalid argument type: script");return this};ci.prototype.inspect=function(){var e;return this.script?e=this.script.inspect():e=this._scriptBuffer.toString("hex"),"<Output ("+this.satoshis+" sats) "+e+">"};ci.fromBufferReader=function(e){var t={};t.satoshis=e.readUInt64LEBN();var r=e.readVarintNum();return r!==0?t.script=e.read(r):t.script=Buffer.from([]),new ci(t)};ci.prototype.toBufferWriter=function(e){e||(e=new hw),e.writeUInt64LEBN(this._satoshisBN);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e};ci.prototype.calculateSize=function(){let e=8;return e+=hw.varintBufNum(this._scriptBuffer.length).length,e+=this._scriptBuffer.length,e};dw.exports=ci});var mw=V((yz,TN)=>{TN.exports={name:"bigi",version:"1.4.2",description:"Big integers.",keywords:["cryptography","math","bitcoin","arbitrary","precision","arithmetic","big","integer","int","number","biginteger","bigint","bignumber","decimal","float"],devDependencies:{coveralls:"^2.11.2",istanbul:"^0.3.5",jshint:"^2.5.1",mocha:"^2.1.0",mochify:"^2.1.0"},repository:{url:"https://github.com/cryptocoinjs/bigi",type:"git"},main:"./lib/index.js",scripts:{"browser-test":"./node_modules/.bin/mochify --wd -R spec",test:"./node_modules/.bin/_mocha -- test/*.js",jshint:"./node_modules/.bin/jshint --config jshint.json lib/*.js ; true",unit:"./node_modules/.bin/mocha",coverage:"./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --reporter list test/*.js",coveralls:"npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info"},dependencies:{},testling:{files:"test/*.js",harness:"mocha",browsers:["ie/9..latest","firefox/latest","chrome/latest","safari/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]}}});var uv=V((wz,yw)=>{function ge(e,t,r){if(!(this instanceof ge))return new ge(e,t,r);e!=null&&(typeof e=="number"?this.fromNumber(e,t,r):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}var ve=ge.prototype;ve.__bigi=mw().version;ge.isBigInteger=function(e,t){return e&&e.__bigi&&(!t||e.__bigi===ve.__bigi)};var tu;function IN(e,t,r,i,n,a){for(;--a>=0;){var u=t*this[e++]+r[i]+n;n=Math.floor(u/67108864),r[i++]=u&67108863}return n}ge.prototype.am=IN;tu=26;ge.prototype.DB=tu;ge.prototype.DM=(1<<tu)-1;var RN=ge.prototype.DV=1<<tu,ov=52;ge.prototype.FV=Math.pow(2,ov);ge.prototype.F1=ov-tu;ge.prototype.F2=2*tu-ov;var AN="0123456789abcdefghijklmnopqrstuvwxyz",ph=new Array,ru,xn;ru=48;for(xn=0;xn<=9;++xn)ph[ru++]=xn;ru=97;for(xn=10;xn<36;++xn)ph[ru++]=xn;ru=65;for(xn=10;xn<36;++xn)ph[ru++]=xn;function vw(e){return AN.charAt(e)}function gw(e,t){var r=ph[e.charCodeAt(t)];return r??-1}function ON(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function kN(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+RN:this.t=0}function ta(e){var t=new ge;return t.fromInt(e),t}function NN(e,t){var r=this,i;if(t==16)i=4;else if(t==8)i=3;else if(t==256)i=8;else if(t==2)i=1;else if(t==32)i=5;else if(t==4)i=2;else{r.fromRadix(e,t);return}r.t=0,r.s=0;for(var n=e.length,a=!1,u=0;--n>=0;){var h=i==8?e[n]&255:gw(e,n);if(h<0){e.charAt(n)=="-"&&(a=!0);continue}a=!1,u==0?r[r.t++]=h:u+i>r.DB?(r[r.t-1]|=(h&(1<<r.DB-u)-1)<<u,r[r.t++]=h>>r.DB-u):r[r.t-1]|=h<<u,u+=i,u>=r.DB&&(u-=r.DB)}i==8&&e[0]&128&&(r.s=-1,u>0&&(r[r.t-1]|=(1<<r.DB-u)-1<<u)),r.clamp(),a&&ge.ZERO.subTo(r,r)}function PN(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t}function BN(e){var t=this;if(t.s<0)return"-"+t.negate().toString(e);var r;if(e==16)r=4;else if(e==8)r=3;else if(e==2)r=1;else if(e==32)r=5;else if(e==4)r=2;else return t.toRadix(e);var i=(1<<r)-1,n,a=!1,u="",h=t.t,b=t.DB-h*t.DB%r;if(h-- >0)for(b<t.DB&&(n=t[h]>>b)>0&&(a=!0,u=vw(n));h>=0;)b<r?(n=(t[h]&(1<<b)-1)<<r-b,n|=t[--h]>>(b+=t.DB-r)):(n=t[h]>>(b-=r)&i,b<=0&&(b+=t.DB,--h)),n>0&&(a=!0),a&&(u+=vw(n));return a?u:"0"}function MN(){var e=new ge;return ge.ZERO.subTo(this,e),e}function CN(){return this.s<0?this.negate():this}function LN(e){var t=this.s-e.s;if(t!=0)return t;var r=this.t;if(t=r-e.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this[r]-e[r])!=0)return t;return 0}function hh(e){var t=1,r;return(r=e>>>16)!=0&&(e=r,t+=16),(r=e>>8)!=0&&(e=r,t+=8),(r=e>>4)!=0&&(e=r,t+=4),(r=e>>2)!=0&&(e=r,t+=2),(r=e>>1)!=0&&(e=r,t+=1),t}function DN(){return this.t<=0?0:this.DB*(this.t-1)+hh(this[this.t-1]^this.s&this.DM)}function UN(){return this.bitLength()>>3}function qN(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s}function FN(e,t){for(var r=e;r<this.t;++r)t[r-e]=this[r];t.t=Math.max(this.t-e,0),t.s=this.s}function HN(e,t){var r=this,i=e%r.DB,n=r.DB-i,a=(1<<n)-1,u=Math.floor(e/r.DB),h=r.s<<i&r.DM,b;for(b=r.t-1;b>=0;--b)t[b+u+1]=r[b]>>n|h,h=(r[b]&a)<<i;for(b=u-1;b>=0;--b)t[b]=0;t[u]=h,t.t=r.t+u+1,t.s=r.s,t.clamp()}function zN(e,t){var r=this;t.s=r.s;var i=Math.floor(e/r.DB);if(i>=r.t){t.t=0;return}var n=e%r.DB,a=r.DB-n,u=(1<<n)-1;t[0]=r[i]>>n;for(var h=i+1;h<r.t;++h)t[h-i-1]|=(r[h]&u)<<a,t[h-i]=r[h]>>n;n>0&&(t[r.t-i-1]|=(r.s&u)<<a),t.t=r.t-i,t.clamp()}function jN(e,t){for(var r=this,i=0,n=0,a=Math.min(e.t,r.t);i<a;)n+=r[i]-e[i],t[i++]=n&r.DM,n>>=r.DB;if(e.t<r.t){for(n-=e.s;i<r.t;)n+=r[i],t[i++]=n&r.DM,n>>=r.DB;n+=r.s}else{for(n+=r.s;i<e.t;)n-=e[i],t[i++]=n&r.DM,n>>=r.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[i++]=r.DV+n:n>0&&(t[i++]=n),t.t=i,t.clamp()}function VN(e,t){var r=this.abs(),i=e.abs(),n=r.t;for(t.t=n+i.t;--n>=0;)t[n]=0;for(n=0;n<i.t;++n)t[n+r.t]=r.am(0,i[n],t,n,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&ge.ZERO.subTo(t,t)}function WN(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e[r]=0;for(r=0;r<t.t-1;++r){var i=t.am(r,t[r],e,2*r,0,1);(e[r+t.t]+=t.am(r+1,2*t[r],e,2*r+1,i,t.t-r-1))>=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()}function KN(e,t,r){var i=this,n=e.abs();if(!(n.t<=0)){var a=i.abs();if(a.t<n.t){t?.fromInt(0),r!=null&&i.copyTo(r);return}r==null&&(r=new ge);var u=new ge,h=i.s,b=e.s,w=i.DB-hh(n[n.t-1]);w>0?(n.lShiftTo(w,u),a.lShiftTo(w,r)):(n.copyTo(u),a.copyTo(r));var T=u.t,I=u[T-1];if(I!=0){var B=I*(1<<i.F1)+(T>1?u[T-2]>>i.F2:0),M=i.FV/B,P=(1<<i.F1)/B,L=1<<i.F2,X=r.t,W=X-T,q=t??new ge;for(u.dlShiftTo(W,q),r.compareTo(q)>=0&&(r[r.t++]=1,r.subTo(q,r)),ge.ONE.dlShiftTo(T,q),q.subTo(u,u);u.t<T;)u[u.t++]=0;for(;--W>=0;){var ee=r[--X]==I?i.DM:Math.floor(r[X]*M+(r[X-1]+L)*P);if((r[X]+=u.am(0,ee,r,W,0,T))<ee)for(u.dlShiftTo(W,q),r.subTo(q,r);r[X]<--ee;)r.subTo(q,r)}t!=null&&(r.drShiftTo(T,t),h!=b&&ge.ZERO.subTo(t,t)),r.t=T,r.clamp(),w>0&&r.rShiftTo(w,r),h<0&&ge.ZERO.subTo(r,r)}}}function GN(e){var t=new ge;return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(ge.ZERO)>0&&e.subTo(t,t),t}function Uo(e){this.m=e}function $N(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function XN(e){return e}function YN(e){e.divRemTo(this.m,null,e)}function ZN(e,t,r){e.multiplyTo(t,r),this.reduce(r)}function JN(e,t){e.squareTo(t),this.reduce(t)}Uo.prototype.convert=$N;Uo.prototype.revert=XN;Uo.prototype.reduce=YN;Uo.prototype.mulTo=ZN;Uo.prototype.sqrTo=JN;function QN(){if(this.t<1)return 0;var e=this[0];if(!(e&1))return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function qo(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function eP(e){var t=new ge;return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(ge.ZERO)>0&&this.m.subTo(t,t),t}function tP(e){var t=new ge;return e.copyTo(t),this.reduce(t),t}function rP(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=e[t]&32767,i=r*this.mpl+((r*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e[r]+=this.m.am(0,i,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function iP(e,t){e.squareTo(t),this.reduce(t)}function nP(e,t,r){e.multiplyTo(t,r),this.reduce(r)}qo.prototype.convert=eP;qo.prototype.revert=tP;qo.prototype.reduce=rP;qo.prototype.mulTo=nP;qo.prototype.sqrTo=iP;function sP(){return(this.t>0?this[0]&1:this.s)==0}function aP(e,t){if(e>4294967295||e<1)return ge.ONE;var r=new ge,i=new ge,n=t.convert(this),a=hh(e)-1;for(n.copyTo(r);--a>=0;)if(t.sqrTo(r,i),(e&1<<a)>0)t.mulTo(i,n,r);else{var u=r;r=i,i=u}return t.revert(r)}function oP(e,t){var r;return e<256||t.isEven()?r=new Uo(t):r=new qo(t),this.exp(e,r)}ve.copyTo=ON;ve.fromInt=kN;ve.fromString=NN;ve.clamp=PN;ve.dlShiftTo=qN;ve.drShiftTo=FN;ve.lShiftTo=HN;ve.rShiftTo=zN;ve.subTo=jN;ve.multiplyTo=VN;ve.squareTo=WN;ve.divRemTo=KN;ve.invDigit=QN;ve.isEven=sP;ve.exp=aP;ve.toString=BN;ve.negate=MN;ve.abs=CN;ve.compareTo=LN;ve.bitLength=DN;ve.byteLength=UN;ve.mod=GN;ve.modPowInt=oP;function cP(){var e=new ge;return this.copyTo(e),e}function uP(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function fP(){return this.t==0?this.s:this[0]<<24>>24}function lP(){return this.t==0?this.s:this[0]<<16>>16}function pP(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function hP(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function dP(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),i=ta(r),n=new ge,a=new ge,u="";for(this.divRemTo(i,n,a);n.signum()>0;)u=(r+a.intValue()).toString(e).substr(1)+u,n.divRemTo(i,n,a);return a.intValue().toString(e)+u}function mP(e,t){var r=this;r.fromInt(0),t==null&&(t=10);for(var i=r.chunkSize(t),n=Math.pow(t,i),a=!1,u=0,h=0,b=0;b<e.length;++b){var w=gw(e,b);if(w<0){e.charAt(b)=="-"&&r.signum()==0&&(a=!0);continue}h=t*h+w,++u>=i&&(r.dMultiply(n),r.dAddOffset(h,0),u=0,h=0)}u>0&&(r.dMultiply(Math.pow(t,u)),r.dAddOffset(h,0)),a&&ge.ZERO.subTo(r,r)}function vP(e,t,r){var i=this;if(typeof t=="number")if(e<2)i.fromInt(1);else for(i.fromNumber(e,r),i.testBit(e-1)||i.bitwiseTo(ge.ONE.shiftLeft(e-1),cv,i),i.isEven()&&i.dAddOffset(1,0);!i.isProbablePrime(t);)i.dAddOffset(2,0),i.bitLength()>e&&i.subTo(ge.ONE.shiftLeft(e-1),i);else{var n=new Array,a=e&7;n.length=(e>>3)+1,t.nextBytes(n),a>0?n[0]&=(1<<a)-1:n[0]=0,i.fromString(n,256)}}function gP(){var e=this,t=e.t,r=new Array;r[0]=e.s;var i=e.DB-t*e.DB%8,n,a=0;if(t-- >0)for(i<e.DB&&(n=e[t]>>i)!=(e.s&e.DM)>>i&&(r[a++]=n|e.s<<e.DB-i);t>=0;)i<8?(n=(e[t]&(1<<i)-1)<<8-i,n|=e[--t]>>(i+=e.DB-8)):(n=e[t]>>(i-=8)&255,i<=0&&(i+=e.DB,--t)),n&128&&(n|=-256),a===0&&(e.s&128)!=(n&128)&&++a,(a>0||n!=e.s)&&(r[a++]=n);return r}function bP(e){return this.compareTo(e)==0}function xP(e){return this.compareTo(e)<0?this:e}function _P(e){return this.compareTo(e)>0?this:e}function yP(e,t,r){var i=this,n,a,u=Math.min(e.t,i.t);for(n=0;n<u;++n)r[n]=t(i[n],e[n]);if(e.t<i.t){for(a=e.s&i.DM,n=u;n<i.t;++n)r[n]=t(i[n],a);r.t=i.t}else{for(a=i.s&i.DM,n=u;n<e.t;++n)r[n]=t(a,e[n]);r.t=e.t}r.s=t(i.s,e.s),r.clamp()}function wP(e,t){return e&t}function SP(e){var t=new ge;return this.bitwiseTo(e,wP,t),t}function cv(e,t){return e|t}function EP(e){var t=new ge;return this.bitwiseTo(e,cv,t),t}function bw(e,t){return e^t}function TP(e){var t=new ge;return this.bitwiseTo(e,bw,t),t}function xw(e,t){return e&~t}function IP(e){var t=new ge;return this.bitwiseTo(e,xw,t),t}function RP(){for(var e=new ge,t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e}function AP(e){var t=new ge;return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function OP(e){var t=new ge;return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function kP(e){if(e==0)return-1;var t=0;return e&65535||(e>>=16,t+=16),e&255||(e>>=8,t+=8),e&15||(e>>=4,t+=4),e&3||(e>>=2,t+=2),e&1||++t,t}function NP(){for(var e=0;e<this.t;++e)if(this[e]!=0)return e*this.DB+kP(this[e]);return this.s<0?this.t*this.DB:-1}function PP(e){for(var t=0;e!=0;)e&=e-1,++t;return t}function BP(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=PP(this[r]^t);return e}function MP(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this[t]&1<<e%this.DB)!=0}function CP(e,t){var r=ge.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r}function LP(e){return this.changeBit(e,cv)}function DP(e){return this.changeBit(e,xw)}function UP(e){return this.changeBit(e,bw)}function qP(e,t){for(var r=this,i=0,n=0,a=Math.min(e.t,r.t);i<a;)n+=r[i]+e[i],t[i++]=n&r.DM,n>>=r.DB;if(e.t<r.t){for(n+=e.s;i<r.t;)n+=r[i],t[i++]=n&r.DM,n>>=r.DB;n+=r.s}else{for(n+=r.s;i<e.t;)n+=e[i],t[i++]=n&r.DM,n>>=r.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[i++]=n:n<-1&&(t[i++]=r.DV+n),t.t=i,t.clamp()}function FP(e){var t=new ge;return this.addTo(e,t),t}function HP(e){var t=new ge;return this.subTo(e,t),t}function zP(e){var t=new ge;return this.multiplyTo(e,t),t}function jP(){var e=new ge;return this.squareTo(e),e}function VP(e){var t=new ge;return this.divRemTo(e,t,null),t}function WP(e){var t=new ge;return this.divRemTo(e,null,t),t}function KP(e){var t=new ge,r=new ge;return this.divRemTo(e,t,r),new Array(t,r)}function GP(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function $P(e,t){if(e!=0){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}}function Sf(){}function _w(e){return e}function XP(e,t,r){e.multiplyTo(t,r)}function YP(e,t){e.squareTo(t)}Sf.prototype.convert=_w;Sf.prototype.revert=_w;Sf.prototype.mulTo=XP;Sf.prototype.sqrTo=YP;function ZP(e){return this.exp(e,new Sf)}function JP(e,t,r){var i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r[--i]=0;var n;for(n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,e[i],r,i,0,this.t);for(n=Math.min(e.t,t);i<n;++i)this.am(0,e[i],r,i,0,t-i);r.clamp()}function QP(e,t,r){--t;var i=r.t=this.t+e.t-t;for(r.s=0;--i>=0;)r[i]=0;for(i=Math.max(t-this.t,0);i<e.t;++i)r[this.t+i-t]=this.am(t-i,e[i],r,0,0,this.t+i-t);r.clamp(),r.drShiftTo(1,r)}function iu(e){this.r2=new ge,this.q3=new ge,ge.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function eB(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=new ge;return e.copyTo(t),this.reduce(t),t}function tB(e){return e}function rB(e){var t=this;for(e.drShiftTo(t.m.t-1,t.r2),e.t>t.m.t+1&&(e.t=t.m.t+1,e.clamp()),t.mu.multiplyUpperTo(t.r2,t.m.t+1,t.q3),t.m.multiplyLowerTo(t.q3,t.m.t+1,t.r2);e.compareTo(t.r2)<0;)e.dAddOffset(1,t.m.t+1);for(e.subTo(t.r2,e);e.compareTo(t.m)>=0;)e.subTo(t.m,e)}function iB(e,t){e.squareTo(t),this.reduce(t)}function nB(e,t,r){e.multiplyTo(t,r),this.reduce(r)}iu.prototype.convert=eB;iu.prototype.revert=tB;iu.prototype.reduce=rB;iu.prototype.mulTo=nB;iu.prototype.sqrTo=iB;function sB(e,t){var r=e.bitLength(),i,n=ta(1),a;if(r<=0)return n;r<18?i=1:r<48?i=3:r<144?i=4:r<768?i=5:i=6,r<8?a=new Uo(t):t.isEven()?a=new iu(t):a=new qo(t);var u=new Array,h=3,b=i-1,w=(1<<i)-1;if(u[1]=a.convert(this),i>1){var T=new ge;for(a.sqrTo(u[1],T);h<=w;)u[h]=new ge,a.mulTo(T,u[h-2],u[h]),h+=2}var I=e.t-1,B,M=!0,P=new ge,L;for(r=hh(e[I])-1;I>=0;){for(r>=b?B=e[I]>>r-b&w:(B=(e[I]&(1<<r+1)-1)<<b-r,I>0&&(B|=e[I-1]>>this.DB+r-b)),h=i;!(B&1);)B>>=1,--h;if((r-=h)<0&&(r+=this.DB,--I),M)u[B].copyTo(n),M=!1;else{for(;h>1;)a.sqrTo(n,P),a.sqrTo(P,n),h-=2;h>0?a.sqrTo(n,P):(L=n,n=P,P=L),a.mulTo(P,u[B],n)}for(;I>=0&&!(e[I]&1<<r);)a.sqrTo(n,P),L=n,n=P,P=L,--r<0&&(r=this.DB-1,--I)}return a.revert(n)}function aB(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var i=t;t=r,r=i}var n=t.getLowestSetBit(),a=r.getLowestSetBit();if(a<0)return t;for(n<a&&(a=n),a>0&&(t.rShiftTo(a,t),r.rShiftTo(a,r));t.signum()>0;)(n=t.getLowestSetBit())>0&&t.rShiftTo(n,t),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r}function oB(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(t==0)r=this[0]%e;else for(var i=this.t-1;i>=0;--i)r=(t*r+this[i])%e;return r}function cB(e){var t=e.isEven();if(this.signum()===0)throw new Error("division by zero");if(this.isEven()&&t||e.signum()==0)return ge.ZERO;for(var r=e.clone(),i=this.clone(),n=ta(1),a=ta(0),u=ta(0),h=ta(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!n.isEven()||!a.isEven())&&(n.addTo(this,n),a.subTo(e,a)),n.rShiftTo(1,n)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),t?((!u.isEven()||!h.isEven())&&(u.addTo(this,u),h.subTo(e,h)),u.rShiftTo(1,u)):h.isEven()||h.subTo(e,h),h.rShiftTo(1,h);r.compareTo(i)>=0?(r.subTo(i,r),t&&n.subTo(u,n),a.subTo(h,a)):(i.subTo(r,i),t&&u.subTo(n,u),h.subTo(a,h))}if(i.compareTo(ge.ONE)!=0)return ge.ZERO;for(;h.compareTo(e)>=0;)h.subTo(e,h);for(;h.signum()<0;)h.addTo(e,h);return h}var wi=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],uB=(1<<26)/wi[wi.length-1];function fB(e){var t,r=this.abs();if(r.t==1&&r[0]<=wi[wi.length-1]){for(t=0;t<wi.length;++t)if(r[0]==wi[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<wi.length;){for(var i=wi[t],n=t+1;n<wi.length&&i<uB;)i*=wi[n++];for(i=r.modInt(i);t<n;)if(i%wi[t++]==0)return!1}return r.millerRabin(e)}function lB(e){var t=this.subtract(ge.ONE),r=t.getLowestSetBit();if(r<=0)return!1;var i=t.shiftRight(r);e=e+1>>1,e>wi.length&&(e=wi.length);for(var n=new ge(null),a,u=[],h=0;h<e;++h){for(;a=wi[Math.floor(Math.random()*wi.length)],u.indexOf(a)!=-1;);u.push(a),n.fromInt(a);var b=n.modPow(i,this);if(b.compareTo(ge.ONE)!=0&&b.compareTo(t)!=0){for(var a=1;a++<r&&b.compareTo(t)!=0;)if(b=b.modPowInt(2,this),b.compareTo(ge.ONE)==0)return!1;if(b.compareTo(t)!=0)return!1}}return!0}ve.chunkSize=pP;ve.toRadix=dP;ve.fromRadix=mP;ve.fromNumber=vP;ve.bitwiseTo=yP;ve.changeBit=CP;ve.addTo=qP;ve.dMultiply=GP;ve.dAddOffset=$P;ve.multiplyLowerTo=JP;ve.multiplyUpperTo=QP;ve.modInt=oB;ve.millerRabin=lB;ve.clone=cP;ve.intValue=uP;ve.byteValue=fP;ve.shortValue=lP;ve.signum=hP;ve.toByteArray=gP;ve.equals=bP;ve.min=xP;ve.max=_P;ve.and=SP;ve.or=EP;ve.xor=TP;ve.andNot=IP;ve.not=RP;ve.shiftLeft=AP;ve.shiftRight=OP;ve.getLowestSetBit=NP;ve.bitCount=BP;ve.testBit=MP;ve.setBit=LP;ve.clearBit=DP;ve.flipBit=UP;ve.add=FP;ve.subtract=HP;ve.multiply=zP;ve.divide=VP;ve.remainder=WP;ve.divideAndRemainder=KP;ve.modPow=sB;ve.modInverse=cB;ve.pow=ZP;ve.gcd=aB;ve.isProbablePrime=fB;ve.square=jP;ge.ZERO=ta(0);ge.ONE=ta(1);ge.valueOf=ta;yw.exports=ge});var Sw=V(()=>{var ww=require("assert"),pi=uv();pi.fromByteArrayUnsigned=function(e){return e[0]&128?new pi([0].concat(e)):new pi(e)};pi.prototype.toByteArrayUnsigned=function(){var e=this.toByteArray();return e[0]===0?e.slice(1):e};pi.fromDERInteger=function(e){return new pi(e)};pi.prototype.toDERInteger=pi.prototype.toByteArray;pi.fromBuffer=function(e){if(e[0]&128){var t=Array.prototype.slice.call(e);return new pi([0].concat(t))}return new pi(e)};pi.fromHex=function(e){return e===""?pi.ZERO:(ww.equal(e,e.match(/^[A-Fa-f0-9]+/),"Invalid hex string"),ww.equal(e.length%2,0,"Incomplete hex"),new pi(e,16))};pi.prototype.toBuffer=function(e){for(var t=this.toByteArrayUnsigned(),r=[],i=e-t.length;r.length<i;)r.push(0);return new Buffer(r.concat(t))};pi.prototype.toHex=function(e){return this.toBuffer(e).toString("hex")}});var Wa=V((Tz,Ew)=>{var pB=uv();Sw();Ew.exports=pB});var lv=V((Iz,Tw)=>{var dh=require("assert"),fv=ea().Buffer,mh=Wa(),vh=mh.valueOf(3);function Vr(e,t,r,i){dh.notStrictEqual(i,void 0,"Missing Z coordinate"),this.curve=e,this.x=t,this.y=r,this.z=i,this._zInv=null,this.compressed=!0}Object.defineProperty(Vr.prototype,"zInv",{get:function(){return this._zInv===null&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}});Object.defineProperty(Vr.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}});Object.defineProperty(Vr.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}});Vr.fromAffine=function(e,t,r){return new Vr(e,t,r,mh.ONE)};Vr.prototype.equals=function(e){if(e===this)return!0;if(this.curve.isInfinity(this))return this.curve.isInfinity(e);if(this.curve.isInfinity(e))return this.curve.isInfinity(this);var t=e.y.multiply(this.z).subtract(this.y.multiply(e.z)).mod(this.curve.p);if(t.signum()!==0)return!1;var r=e.x.multiply(this.z).subtract(this.x.multiply(e.z)).mod(this.curve.p);return r.signum()===0};Vr.prototype.negate=function(){var e=this.curve.p.subtract(this.y);return new Vr(this.curve,this.x,e,this.z)};Vr.prototype.add=function(e){if(this.curve.isInfinity(this))return e;if(this.curve.isInfinity(e))return this;var t=this.x,r=this.y,i=e.x,n=e.y,a=n.multiply(this.z).subtract(r.multiply(e.z)).mod(this.curve.p),u=i.multiply(this.z).subtract(t.multiply(e.z)).mod(this.curve.p);if(u.signum()===0)return a.signum()===0?this.twice():this.curve.infinity;var h=u.square(),b=h.multiply(u),w=t.multiply(h),T=a.square().multiply(this.z),I=T.subtract(w.shiftLeft(1)).multiply(e.z).subtract(b).multiply(u).mod(this.curve.p),B=w.multiply(vh).multiply(a).subtract(r.multiply(b)).subtract(T.multiply(a)).multiply(e.z).add(a.multiply(b)).mod(this.curve.p),M=b.multiply(this.z).multiply(e.z).mod(this.curve.p);return new Vr(this.curve,I,B,M)};Vr.prototype.twice=function(){if(this.curve.isInfinity(this))return this;if(this.y.signum()===0)return this.curve.infinity;var e=this.x,t=this.y,r=t.multiply(this.z).mod(this.curve.p),i=r.multiply(t).mod(this.curve.p),n=this.curve.a,a=e.square().multiply(vh);n.signum()!==0&&(a=a.add(this.z.square().multiply(n))),a=a.mod(this.curve.p);var u=a.square().subtract(e.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(r).mod(this.curve.p),h=a.multiply(vh).multiply(e).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(a.pow(3)).mod(this.curve.p),b=r.pow(3).shiftLeft(3).mod(this.curve.p);return new Vr(this.curve,u,h,b)};Vr.prototype.multiply=function(e){if(this.curve.isInfinity(this))return this;if(e.signum()===0)return this.curve.infinity;for(var t=e,r=t.multiply(vh),i=this.negate(),n=this,a=r.bitLength()-2;a>0;--a){var u=r.testBit(a),h=t.testBit(a);n=n.twice(),u!==h&&(n=n.add(u?this:i))}return n};Vr.prototype.multiplyTwo=function(e,t,r){for(var i=Math.max(e.bitLength(),r.bitLength())-1,n=this.curve.infinity,a=this.add(t);i>=0;){var u=e.testBit(i),h=r.testBit(i);n=n.twice(),u?h?n=n.add(a):n=n.add(this):h&&(n=n.add(t)),--i}return n};Vr.prototype.getEncoded=function(e){if(e==null&&(e=this.compressed),this.curve.isInfinity(this))return fv.alloc(1,0);var t=this.affineX,r=this.affineY,i=this.curve.pLength,n;return e?(n=fv.allocUnsafe(1+i),n.writeUInt8(r.isEven()?2:3,0)):(n=fv.allocUnsafe(1+i+i),n.writeUInt8(4,0),r.toBuffer(i).copy(n,1+i)),t.toBuffer(i).copy(n,1),n};Vr.decodeFrom=function(e,t){var r=t.readUInt8(0),i=r!==4,n=Math.floor((e.p.bitLength()+7)/8),a=mh.fromBuffer(t.slice(1,1+n)),u;if(i){dh.equal(t.length,n+1,"Invalid sequence length"),dh(r===2||r===3,"Invalid sequence tag");var h=r===3;u=e.pointFromX(h,a)}else{dh.equal(t.length,1+n+n,"Invalid sequence length");var b=mh.fromBuffer(t.slice(1+n));u=Vr.fromAffine(e,a,b)}return u.compressed=i,u};Vr.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"};Tw.exports=Vr});var dv=V((Rz,Rw)=>{var pv=require("assert"),Iw=Wa(),hv=lv();function Ef(e,t,r,i,n,a,u){this.p=e,this.a=t,this.b=r,this.G=hv.fromAffine(this,i,n),this.n=a,this.h=u,this.infinity=new hv(this,null,null,Iw.ZERO),this.pOverFour=e.add(Iw.ONE).shiftRight(2),this.pLength=Math.floor((this.p.bitLength()+7)/8)}Ef.prototype.pointFromX=function(e,t){var r=t.pow(3).add(this.a.multiply(t)).add(this.b).mod(this.p),i=r.modPow(this.pOverFour,this.p),n=i;return i.isEven()^!e&&(n=this.p.subtract(n)),hv.fromAffine(this,t,n)};Ef.prototype.isInfinity=function(e){return e===this.infinity?!0:e.z.signum()===0&&e.y.signum()!==0};Ef.prototype.isOnCurve=function(e){if(this.isInfinity(e))return!0;var t=e.affineX,r=e.affineY,i=this.a,n=this.b,a=this.p;if(t.signum()<0||t.compareTo(a)>=0||r.signum()<0||r.compareTo(a)>=0)return!1;var u=r.square().mod(a),h=t.pow(3).add(i.multiply(t)).add(n).mod(a);return u.equals(h)};Ef.prototype.validate=function(e){pv(!this.isInfinity(e),"Point is at infinity"),pv(this.isOnCurve(e),"Point is not on the curve");var t=e.multiply(this.n);return pv(this.isInfinity(t),"Point is not a scalar multiple of G"),!0};Rw.exports=Ef});var Aw=V((Az,hB)=>{hB.exports={secp128r1:{p:"fffffffdffffffffffffffffffffffff",a:"fffffffdfffffffffffffffffffffffc",b:"e87579c11079f43dd824993c2cee5ed3",n:"fffffffe0000000075a30d1b9038a115",h:"01",Gx:"161ff7528b899b2d0c28607ca52c5b86",Gy:"cf5ac8395bafeb13c02da292dded7a83"},secp160k1:{p:"fffffffffffffffffffffffffffffffeffffac73",a:"00",b:"07",n:"0100000000000000000001b8fa16dfab9aca16b6b3",h:"01",Gx:"3b4c382ce37aa192a4019e763036f4f5dd4d7ebb",Gy:"938cf935318fdced6bc28286531733c3f03c4fee"},secp160r1:{p:"ffffffffffffffffffffffffffffffff7fffffff",a:"ffffffffffffffffffffffffffffffff7ffffffc",b:"1c97befc54bd7a8b65acf89f81d4d4adc565fa45",n:"0100000000000000000001f4c8f927aed3ca752257",h:"01",Gx:"4a96b5688ef573284664698968c38bb913cbfc82",Gy:"23a628553168947d59dcc912042351377ac5fb32"},secp192k1:{p:"fffffffffffffffffffffffffffffffffffffffeffffee37",a:"00",b:"03",n:"fffffffffffffffffffffffe26f2fc170f69466a74defd8d",h:"01",Gx:"db4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d",Gy:"9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d"},secp192r1:{p:"fffffffffffffffffffffffffffffffeffffffffffffffff",a:"fffffffffffffffffffffffffffffffefffffffffffffffc",b:"64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1",n:"ffffffffffffffffffffffff99def836146bc9b1b4d22831",h:"01",Gx:"188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012",Gy:"07192b95ffc8da78631011ed6b24cdd573f977a11e794811"},secp256k1:{p:"fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f",a:"00",b:"07",n:"fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",h:"01",Gx:"79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",Gy:"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8"},secp256r1:{p:"ffffffff00000001000000000000000000000000ffffffffffffffffffffffff",a:"ffffffff00000001000000000000000000000000fffffffffffffffffffffffc",b:"5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b",n:"ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",h:"01",Gx:"6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296",Gy:"4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"}}});var kw=V((Oz,Ow)=>{var Fo=Wa(),dB=Aw(),mB=dv();function vB(e){var t=dB[e];if(!t)return null;var r=new Fo(t.p,16),i=new Fo(t.a,16),n=new Fo(t.b,16),a=new Fo(t.n,16),u=new Fo(t.h,16),h=new Fo(t.Gx,16),b=new Fo(t.Gy,16);return new mB(r,i,n,h,b,a,u)}Ow.exports=vB});var nu=V((kz,Nw)=>{var gB=lv(),bB=dv(),xB=kw();Nw.exports={Curve:bB,Point:gB,getCurveByName:xB}});var Bw=V((Nz,Pw)=>{Pw.exports=require("crypto").randomBytes});var If=V((Pz,qw)=>{var mv=Wa(),_B=ea().Buffer,yB=nu(),Cw=yB.getCurveByName("secp256k1"),Mw=mv.ONE,Lw=Cw.n,wB=Cw.p;function Vn(e,t,r,i){let n=i!==void 0?"["+i+"]":"";if(!_B.isBuffer(t))throw new Error(e+n+" must be a Buffer");if(t.length!==r)throw new Error(e+n+" must be "+r+" bytes long")}function Tf(e,t){if(!t||!t.length)throw new Error(e+" must be an array with one or more elements")}function Dw(e){Tf("pubKeys",e);for(let t=0;t<e.length;t++)Vn("pubKey",e[t],32,t)}function SB(e){Tf("messages",e);for(let t=0;t<e.length;t++)Vn("message",e[t],32,t)}function EB(e){Tf("signatures",e);for(let t=0;t<e.length;t++)Vn("signature",e[t],64,t)}function TB(e){Tf("nonces",e);for(let t=0;t<e.length;t++)Vn("nonce",e[t],32,t)}function IB(e,t){let r=t!==void 0?"["+t+"]":"";if(!mv.isBigInteger(e)&&typeof e!="string")throw new Error("privateKey"+r+" must be a BigInteger or valid hex string");if(typeof e=="string"){if(e.match(/[^a-f^A-F^0-9]+/))throw new Error("privateKey must be a BigInteger or valid hex string");vv("privateKey",mv.fromHex(e));return}vv("privateKey",e)}function Uw(e,t){IB(e),Vn("message",t,32)}function RB(e,t,r){Vn("pubKey",e,32),Vn("message",t,32),Vn("signature",r,64)}function AB(e,t,r){if(Dw(e),SB(t),EB(r),e.length!==t.length||t.length!==r.length)throw new Error("all parameters must be an array with the same length")}function OB(e,t,r,i,n){Uw(t,r),Vn("sessionId",e,32),Vn("pubKeyCombined",i,32),Vn("ell",n,32)}function vv(e,t){if(t.compareTo(Mw)<0||t.compareTo(Lw.subtract(Mw))>0)throw new Error(e+" must be an integer in the range 1..n-1")}function kB(e,t){if(e.compareTo(wB)>=0)throw new Error("r is larger than or equal to field size");if(t.compareTo(Lw)>=0)throw new Error("s is larger than or equal to curve order")}function NB(e,t){if(t.curve.isInfinity(t))throw new Error("point is at infinity");let r=t.affineY.isEven();if(e!==r)throw new Error("point does not exist")}function PB(e){if(e.length!==32)throw new Error("aux must be 32 bytes")}qw.exports={checkSessionParams:OB,checkSignParams:Uw,checkVerifyParams:RB,checkBatchVerifyParams:AB,checkRange:vv,checkSignatureInput:kB,checkPointExists:NB,checkPubKeyArr:Dw,checkArray:Tf,checkNonceArr:TB,checkAux:PB}});var Fw=V((exports,module)=>{(function(){"use strict";var ERROR="input is invalid type",WINDOW=typeof window=="object",root=WINDOW?window:{};root.JS_SHA256_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&typeof self=="object",NODE_JS=!root.JS_SHA256_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_SHA256_NO_COMMON_JS&&typeof module=="object"&&module.exports,AMD=typeof define=="function"&&define.amd,ARRAY_BUFFER=!root.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],K=[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],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[];(root.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return Object.prototype.toString.call(e)==="[object Array]"}),ARRAY_BUFFER&&(root.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(e){return typeof e=="object"&&e.buffer&&e.buffer.constructor===ArrayBuffer});var createOutputMethod=function(e,t){return function(r){return new Sha256(t,!0).update(r)[e]()}},createMethod=function(e){var t=createOutputMethod("hex",e);NODE_JS&&(t=nodeWrap(t,e)),t.create=function(){return new Sha256(e)},t.update=function(n){return t.create().update(n)};for(var r=0;r<OUTPUT_TYPES.length;++r){var i=OUTPUT_TYPES[r];t[i]=createOutputMethod(i,e)}return t},nodeWrap=function(method,is224){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),algorithm=is224?"sha224":"sha256",nodeMethod=function(e){if(typeof e=="string")return crypto.createHash(algorithm).update(e,"utf8").digest("hex");if(e==null)throw new Error(ERROR);return e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),Array.isArray(e)||ArrayBuffer.isView(e)||e.constructor===Buffer?crypto.createHash(algorithm).update(new Buffer(e)).digest("hex"):method(e)};return nodeMethod},createHmacOutputMethod=function(e,t){return function(r,i){return new HmacSha256(r,t,!0).update(i)[e]()}},createHmacMethod=function(e){var t=createHmacOutputMethod("hex",e);t.create=function(n){return new HmacSha256(n,e)},t.update=function(n,a){return t.create(n).update(a)};for(var r=0;r<OUTPUT_TYPES.length;++r){var i=OUTPUT_TYPES[r];t[i]=createHmacOutputMethod(i,e)}return t};function Sha256(e,t){t?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e?(this.h0=3238371032,this.h1=914150663,this.h2=812702999,this.h3=4144912697,this.h4=4290775857,this.h5=1750603025,this.h6=1694076839,this.h7=3204075428):(this.h0=1779033703,this.h1=3144134277,this.h2=1013904242,this.h3=2773480762,this.h4=1359893119,this.h5=2600822924,this.h6=528734635,this.h7=1541459225),this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0,this.is224=e}Sha256.prototype.update=function(e){if(!this.finalized){var t,r=typeof e;if(r!=="string"){if(r==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);t=!0}for(var i,n=0,a,u=e.length,h=this.blocks;n<u;){if(this.hashed&&(this.hashed=!1,h[0]=this.block,h[16]=h[1]=h[2]=h[3]=h[4]=h[5]=h[6]=h[7]=h[8]=h[9]=h[10]=h[11]=h[12]=h[13]=h[14]=h[15]=0),t)for(a=this.start;n<u&&a<64;++n)h[a>>2]|=e[n]<<SHIFT[a++&3];else for(a=this.start;n<u&&a<64;++n)i=e.charCodeAt(n),i<128?h[a>>2]|=i<<SHIFT[a++&3]:i<2048?(h[a>>2]|=(192|i>>6)<<SHIFT[a++&3],h[a>>2]|=(128|i&63)<<SHIFT[a++&3]):i<55296||i>=57344?(h[a>>2]|=(224|i>>12)<<SHIFT[a++&3],h[a>>2]|=(128|i>>6&63)<<SHIFT[a++&3],h[a>>2]|=(128|i&63)<<SHIFT[a++&3]):(i=65536+((i&1023)<<10|e.charCodeAt(++n)&1023),h[a>>2]|=(240|i>>18)<<SHIFT[a++&3],h[a>>2]|=(128|i>>12&63)<<SHIFT[a++&3],h[a>>2]|=(128|i>>6&63)<<SHIFT[a++&3],h[a>>2]|=(128|i&63)<<SHIFT[a++&3]);this.lastByteIndex=a,this.bytes+=a-this.start,a>=64?(this.block=h[16],this.start=a-64,this.hash(),this.hashed=!0):this.start=a}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha256.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[t&3],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha256.prototype.hash=function(){var e=this.h0,t=this.h1,r=this.h2,i=this.h3,n=this.h4,a=this.h5,u=this.h6,h=this.h7,b=this.blocks,w,T,I,B,M,P,L,X,W,q,ee;for(w=16;w<64;++w)M=b[w-15],T=(M>>>7|M<<25)^(M>>>18|M<<14)^M>>>3,M=b[w-2],I=(M>>>17|M<<15)^(M>>>19|M<<13)^M>>>10,b[w]=b[w-16]+T+b[w-7]+I<<0;for(ee=t&r,w=0;w<64;w+=4)this.first?(this.is224?(X=300032,M=b[0]-1413257819,h=M-150054599<<0,i=M+24177077<<0):(X=704751109,M=b[0]-210244248,h=M-1521486534<<0,i=M+143694565<<0),this.first=!1):(T=(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10),I=(n>>>6|n<<26)^(n>>>11|n<<21)^(n>>>25|n<<7),X=e&t,B=X^e&r^ee,L=n&a^~n&u,M=h+I+L+K[w]+b[w],P=T+B,h=i+M<<0,i=M+P<<0),T=(i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10),I=(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7),W=i&e,B=W^i&t^X,L=h&n^~h&a,M=u+I+L+K[w+1]+b[w+1],P=T+B,u=r+M<<0,r=M+P<<0,T=(r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10),I=(u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7),q=r&i,B=q^r&e^W,L=u&h^~u&n,M=a+I+L+K[w+2]+b[w+2],P=T+B,a=t+M<<0,t=M+P<<0,T=(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10),I=(a>>>6|a<<26)^(a>>>11|a<<21)^(a>>>25|a<<7),ee=t&r,B=ee^t&i^q,L=a&u^~a&h,M=n+I+L+K[w+3]+b[w+3],P=T+B,n=e+M<<0,e=M+P<<0;this.h0=this.h0+e<<0,this.h1=this.h1+t<<0,this.h2=this.h2+r<<0,this.h3=this.h3+i<<0,this.h4=this.h4+n<<0,this.h5=this.h5+a<<0,this.h6=this.h6+u<<0,this.h7=this.h7+h<<0},Sha256.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,i=this.h3,n=this.h4,a=this.h5,u=this.h6,h=this.h7,b=HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[e&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[t&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[r&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[i&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[n&15]+HEX_CHARS[a>>28&15]+HEX_CHARS[a>>24&15]+HEX_CHARS[a>>20&15]+HEX_CHARS[a>>16&15]+HEX_CHARS[a>>12&15]+HEX_CHARS[a>>8&15]+HEX_CHARS[a>>4&15]+HEX_CHARS[a&15]+HEX_CHARS[u>>28&15]+HEX_CHARS[u>>24&15]+HEX_CHARS[u>>20&15]+HEX_CHARS[u>>16&15]+HEX_CHARS[u>>12&15]+HEX_CHARS[u>>8&15]+HEX_CHARS[u>>4&15]+HEX_CHARS[u&15];return this.is224||(b+=HEX_CHARS[h>>28&15]+HEX_CHARS[h>>24&15]+HEX_CHARS[h>>20&15]+HEX_CHARS[h>>16&15]+HEX_CHARS[h>>12&15]+HEX_CHARS[h>>8&15]+HEX_CHARS[h>>4&15]+HEX_CHARS[h&15]),b},Sha256.prototype.toString=Sha256.prototype.hex,Sha256.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,r=this.h2,i=this.h3,n=this.h4,a=this.h5,u=this.h6,h=this.h7,b=[e>>24&255,e>>16&255,e>>8&255,e&255,t>>24&255,t>>16&255,t>>8&255,t&255,r>>24&255,r>>16&255,r>>8&255,r&255,i>>24&255,i>>16&255,i>>8&255,i&255,n>>24&255,n>>16&255,n>>8&255,n&255,a>>24&255,a>>16&255,a>>8&255,a&255,u>>24&255,u>>16&255,u>>8&255,u&255];return this.is224||b.push(h>>24&255,h>>16&255,h>>8&255,h&255),b},Sha256.prototype.array=Sha256.prototype.digest,Sha256.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(this.is224?28:32),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),t.setUint32(20,this.h5),t.setUint32(24,this.h6),this.is224||t.setUint32(28,this.h7),e};function HmacSha256(e,t,r){var i,n=typeof e;if(n==="string"){var a=[],u=e.length,h=0,b;for(i=0;i<u;++i)b=e.charCodeAt(i),b<128?a[h++]=b:b<2048?(a[h++]=192|b>>6,a[h++]=128|b&63):b<55296||b>=57344?(a[h++]=224|b>>12,a[h++]=128|b>>6&63,a[h++]=128|b&63):(b=65536+((b&1023)<<10|e.charCodeAt(++i)&1023),a[h++]=240|b>>18,a[h++]=128|b>>12&63,a[h++]=128|b>>6&63,a[h++]=128|b&63);e=a}else if(n==="object"){if(e===null)throw new Error(ERROR);if(ARRAY_BUFFER&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(e)))throw new Error(ERROR)}else throw new Error(ERROR);e.length>64&&(e=new Sha256(t,!0).update(e).array());var w=[],T=[];for(i=0;i<64;++i){var I=e[i]||0;w[i]=92^I,T[i]=54^I}Sha256.call(this,t,r),this.update(T),this.oKeyPad=w,this.inner=!0,this.sharedMemory=r}HmacSha256.prototype=new Sha256,HmacSha256.prototype.finalize=function(){if(Sha256.prototype.finalize.call(this),this.inner){this.inner=!1;var e=this.array();Sha256.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(e),Sha256.prototype.finalize.call(this)}};var exports=createMethod();exports.sha256=exports,exports.sha224=createMethod(!0),exports.sha256.hmac=createHmacMethod(),exports.sha224.hmac=createHmacMethod(!0),COMMON_JS?module.exports=exports:(root.sha256=exports.sha256,root.sha224=exports.sha224,AMD&&define(function(){return exports}))})()});var su=V((Bz,Hw)=>{var BB=Wa(),MB=ea().Buffer,CB=Fw();function LB(e){return BB.fromBuffer(e)}function DB(e){return e.toBuffer(32)}function UB(e){return MB.from(CB.create().update(e).array())}Hw.exports={bufferToInt:LB,intToBuffer:DB,hash:UB}});var Of=V((Mz,jw)=>{var au=Wa(),bv=ea().Buffer,gv=nu(),qB=Bw(),Af=gv.getCurveByName("secp256k1"),xv=If(),Ho=su(),_v=bv.concat,FB=Af.G,Rf=Af.p,yv=Af.n,HB=au.ZERO,zB=au.ONE,zw=au.valueOf(2),jB=au.valueOf(3),VB=au.valueOf(4),WB=au.valueOf(7);function KB(e,t,r){xv.checkSignParams(e,r);let i=Sv("BIP0340/nonce",_v([Ho.intToBuffer(e),t,r]));return Ho.bufferToInt(i).mod(yv)}function wv(e){return e.affineY.mod(zw).equals(HB)}function GB(e,t){return wv(e)?t.clone():yv.subtract(t)}function $B(e,t,r){let i=Sv("BIP0340/challenge",_v([e,t,r]));return Ho.bufferToInt(i).mod(yv)}function XB(e,t,r){let i=FB.multiply(e),n=r.multiply(t);return i.add(n.negate())}function Sv(e,t){let r=Ho.hash(e);return Ho.hash(_v([r,r,bv.from(t)]))}function YB(e){let t=Ho.bufferToInt(e),r=t.pow(jB).add(WB).mod(Rf),i=r.modPow(Rf.add(zB).divide(VB),Rf);if(r.compareTo(i.modPow(zw,Rf))!==0)throw new Error("c is not equal to y^2");let n=gv.Point.fromAffine(Af,t,i);return wv(n)||(n=gv.Point.fromAffine(Af,t,Rf.subtract(i))),xv.checkPointExists(!0,n),n}function ZB(){let e=null;for(;;){e=Ho.bufferToInt(bv.from(qB(32)));try{return xv.checkRange("a",e),e}catch{}}}jw.exports={deterministicGetK0:KB,isEven:wv,getEvenKey:GB,getE:$B,getR:XB,taggedHash:Sv,liftX:YB,randomA:ZB}});var $w=V((Lz,Gw)=>{var Kw=Wa(),JB=ea().Buffer,QB=nu(),Tv=QB.getCurveByName("secp256k1"),Ci=Of(),ou=If(),Li=su(),Vw=JB.concat,Ev=Tv.G,Cz=Tv.p,Ww=Tv.n,eM=Kw.ZERO;function tM(e,t,r){ou.checkSignParams(e,t),e=typeof e=="string"?Kw.fromHex(e):e;let i=Ev.multiply(e),n=Li.intToBuffer(i.affineX),a=Ci.getEvenKey(i,e),u;if(r){ou.checkAux(r);let I=Li.intToBuffer(a.xor(Li.bufferToInt(Ci.taggedHash("BIP0340/aux",r)))),B=Ci.taggedHash("BIP0340/nonce",Vw([I,n,t]));u=Li.bufferToInt(B).mod(Ww)}else u=Ci.deterministicGetK0(a,n,t);if(u.signum()===0)throw new Error("kPrime is zero");let h=Ev.multiply(u),b=Ci.getEvenKey(h,u),w=Li.intToBuffer(h.affineX),T=Ci.getE(w,n,t);return Vw([w,Li.intToBuffer(b.add(T.multiply(a)).mod(Ww))])}function rM(e,t,r){ou.checkVerifyParams(e,t,r);let i=Ci.liftX(e),n=Li.intToBuffer(i.affineX),a=Li.bufferToInt(r.slice(0,32)),u=Li.bufferToInt(r.slice(32,64));ou.checkSignatureInput(a,u);let h=Ci.getE(Li.intToBuffer(a),n,t),b=Ci.getR(u,h,i);if(b.curve.isInfinity(b)||!Ci.isEven(b)||!b.affineX.equals(a))throw new Error("signature verification failed")}function iM(e,t,r){ou.checkBatchVerifyParams(e,t,r);let i=eM,n=null;for(let a=0;a<e.length;a++){let u=Ci.liftX(e[a]),h=Li.intToBuffer(u.affineX),b=Li.bufferToInt(r[a].slice(0,32)),w=Li.bufferToInt(r[a].slice(32,64));ou.checkSignatureInput(b,w);let T=Ci.getE(Li.intToBuffer(b),h,t[a]),I=Ci.liftX(r[a].slice(0,32));if(a===0)i=i.add(w),n=I,n=n.add(u.multiply(T));else{let B=Ci.randomA();i=i.add(B.multiply(w)),n=n.add(I.multiply(B)),n=n.add(u.multiply(B.multiply(T)))}}if(!Ev.multiply(i).equals(n))throw new Error("signature verification failed")}Gw.exports={sign:tM,verify:rM,batchVerify:iM}});var eS=V((Dz,Qw)=>{var Iv=ea().Buffer,nM=nu(),Zw=nM.getCurveByName("secp256k1"),yn=Of(),kf=If(),_n=su(),gh=Iv.concat,Xw=Zw.G,Ka=Zw.n,Yw=_n.hash(Iv.from("MuSig coefficient"));function Jw(e){return kf.checkPubKeyArr(e),_n.hash(gh(e))}function bh(e,t){let r=Iv.alloc(4);r.writeUInt32LE(t);let i=gh([Yw,Yw,e,r]);return _n.bufferToInt(_n.hash(i)).mod(Ka)}function sM(e,t){let r=t||Jw(e),i=null;for(let n=0;n<e.length;n++){let a=yn.liftX(e[n]),u=bh(r,n),h=a.multiply(u);i===null?i=h:i=i.add(h)}return i}function aM(e,t,r,i,n,a,u){kf.checkSessionParams(e,t,r,i,a);let h={sessionId:e,message:r,pubKeyCombined:i,pkParity:n,ell:a,idx:u},b=bh(a,u);h.secretKey=t.multiply(b).mod(Ka),h.ownKeyParity=yn.isEven(Xw.multiply(t)),h.pkParity!==h.ownKeyParity&&(h.secretKey=Ka.subtract(h.secretKey));let w=gh([e,r,h.pubKeyCombined,_n.intToBuffer(t)]);h.secretNonce=_n.bufferToInt(_n.hash(w)),kf.checkRange("secretNonce",h.secretNonce);let T=Xw.multiply(h.secretNonce);return h.nonce=_n.intToBuffer(T.affineX),h.nonceParity=yn.isEven(T),h.commitment=_n.hash(h.nonce),h}function oM(e,t){kf.checkNonceArr(t);let r=yn.liftX(t[0]);for(let i=1;i<t.length;i++)r=r.add(yn.liftX(t[i]));return e.combinedNonceParity=yn.isEven(r),_n.intToBuffer(r.affineX)}function cM(e,t,r,i){let n=yn.getE(r,i,t),a=e.secretKey,u=e.secretNonce;return e.nonceParity!==e.combinedNonceParity&&(u=Ka.subtract(u)),a.multiply(n).add(u).mod(Ka)}function uM(e,t,r,i,n,a){let u=yn.getE(r,e.pubKeyCombined,e.message),h=bh(e.ell,i),b=yn.liftX(n),w=yn.liftX(a);e.pkParity||(u=Ka.subtract(u));let T=yn.getR(t,u.multiply(h).mod(Ka),b);e.combinedNonceParity&&(T=T.negate());let I=T.add(w);if(!I.curve.isInfinity(I))throw new Error("partial signature verification failed")}function fM(e,t){let r=yn.liftX(e);kf.checkArray("partialSigs",t);let i=_n.intToBuffer(r.affineX),n=t[0];for(let a=1;a<t.length;a++)n=n.add(t[a]).mod(Ka);return gh([i,_n.intToBuffer(n)])}Qw.exports={computeEll:Jw,computeCoefficient:bh,pubKeyCombine:sM,sessionInitialize:aM,sessionNonceCombine:oM,partialSign:cM,partialSigVerify:uM,partialSigCombine:fM}});var iS=V((Uz,rS)=>{var Av=ea().Buffer,lM=nu(),pM=lM.getCurveByName("secp256k1"),tS=Of(),Rv=su(),hM=Av.concat,dM=pM.G;function mM(e,t){t||(t=[]);let r=vM(t),i=Rv.intToBuffer(e.affineX),n=tS.liftX(i),a=Rv.bufferToInt(tS.taggedHash("TapTweak",hM([i,r]))),u=n.add(dM.multiply(a));return Rv.intToBuffer(u.affineX)}function vM(e){let t=Av.alloc(32,0);return!e||e.length===0?new Av(0):t}rS.exports={taprootConstruct:mM}});var sS=V((qz,nS)=>{var cu=$w();cu.check=If();cu.convert=su();cu.math=Of();cu.muSig=eS();cu.taproot=iS();nS.exports=cu});var uu=V((Hz,uS)=>{"use strict";var xh=vt(),Nf=It(),zo=Yi(),aS=yi(),Fz=require("buffer"),gM=hr(),oS=Lr(),Ov=Mi(),bM=ra(),kv=xs(),_h=4294967295,cS=_h,xM=_h-1,_M=_h-2,yM=Math.pow(2,31),Bv=Math.pow(2,22),Nv=65535,Pv=512,wM=Math.pow(2,16)-1;function _t(e){if(!(this instanceof _t))return new _t(e);if(e)return this._fromObject(e)}_t.MAXINT=_h;_t.DEFAULT_SEQNUMBER=cS;_t.DEFAULT_LOCKTIME_SEQNUMBER=xM;_t.DEFAULT_RBF_SEQNUMBER=_M;_t.SEQUENCE_LOCKTIME_TYPE_FLAG=Bv;Object.defineProperty(_t.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this.isNull()?null:(this._script||(this._script=new Ov(this._scriptBuffer),this._script._isInput=!0),this._script)}});_t.fromObject=function(e){Nf.checkArgument(xh.isObject(e));var t=new _t;return t._fromObject(e)};_t.prototype._fromObject=function(e){var t;if(typeof e.prevTxId=="string"&&oS.isHexa(e.prevTxId)?t=Buffer.from(e.prevTxId,"hex"):t=e.prevTxId,this.witnesses=[],this.output=e.output?e.output instanceof kv?e.output:new kv(e.output):void 0,this.prevTxId=t||e.txidbuf,this.outputIndex=e.outputIndex==null?e.txoutnum:e.outputIndex,this.sequenceNumber=e.sequenceNumber==null?e.seqnum==null?cS:e.seqnum:e.sequenceNumber,e.script===void 0&&e.scriptBuffer===void 0)throw new zo.Transaction.Input.MissingScript;return this.setScript(e.scriptBuffer||e.script),this};_t.prototype.toObject=_t.prototype.toJSON=function(){var t={prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,sequenceNumber:this.sequenceNumber,script:this._scriptBuffer.toString("hex")};return this.script&&(t.scriptString=this.script.toString()),this.output&&(t.output=this.output.toObject()),t};_t.fromBufferReader=function(e){var t=new _t;return t.prevTxId=e.readReverse(32),t.outputIndex=e.readUInt32LE(),t._scriptBuffer=e.readVarLengthBuffer(),t.sequenceNumber=e.readUInt32LE(),t};_t.prototype.toBufferWriter=function(e){e||(e=new aS),e.writeReverse(this.prevTxId),e.writeUInt32LE(this.outputIndex);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e.writeUInt32LE(this.sequenceNumber),e};_t.prototype.setScript=function(e){if(this._script=null,e instanceof Ov)this._script=e,this._script._isInput=!0,this._scriptBuffer=e.toBuffer();else if(oS.isHexa(e))this._scriptBuffer=Buffer.from(e,"hex");else if(xh.isString(e))this._script=new Ov(e),this._script._isInput=!0,this._scriptBuffer=this._script.toBuffer();else if(gM.isBuffer(e))this._scriptBuffer=Buffer.from(e);else throw new TypeError("Invalid argument type: script");return this};_t.prototype.getSignatures=function(){throw new zo.AbstractMethodInvoked("Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported) for input: "+JSON.stringify(this))};_t.prototype.getSatoshisBuffer=function(){return Nf.checkState(this.output instanceof kv),Nf.checkState(this.output._satoshisBN),new aS().writeUInt64LEBN(this.output._satoshisBN).toBuffer()};_t.prototype.isFullySigned=function(){throw new zo.AbstractMethodInvoked("Input#isFullySigned")};_t.prototype.isFinal=function(){return this.sequenceNumber!==_t.MAXINT};_t.prototype.addSignature=function(){throw new zo.AbstractMethodInvoked("Input#addSignature")};_t.prototype.clearSignatures=function(){throw new zo.AbstractMethodInvoked("Input#clearSignatures")};_t.prototype.hasWitnesses=function(){return!!(this.witnesses&&this.witnesses.length>0)};_t.prototype.getWitnesses=function(){return this.witnesses};_t.prototype.setWitnesses=function(e){this.witnesses=e};_t.prototype.isValidSignature=function(e,t,r){return r=r||"ecdsa",t.signature.nhashtype=t.sigtype,bM.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script,r)};_t.prototype.isNull=function(){return this.prevTxId.toString("hex")==="0000000000000000000000000000000000000000000000000000000000000000"&&this.outputIndex===4294967295};_t.prototype._estimateSize=function(){return this.toBufferWriter().toBuffer().length};_t.prototype._getBaseSize=function(){return 40};_t.prototype.lockForSeconds=function(e){if(Nf.checkArgument(xh.isNumber(e)),e<0||e>=Pv*Nv)throw new zo.Transaction.Input.LockTimeRange;return e=parseInt(Math.floor(e/Pv)),this.sequenceNumber=e|Bv,this};_t.prototype.lockUntilBlockHeight=function(e){if(Nf.checkArgument(xh.isNumber(e)),e<0||e>=wM)throw new zo.Transaction.Input.BlockHeightOutOfRange;return this.sequenceNumber=e,this};_t.prototype.getLockTime=function(){if(this.sequenceNumber&yM)return null;if(this.sequenceNumber&Bv){var e=Pv*(this.sequenceNumber&Nv);return e}else{var t=this.sequenceNumber&Nv;return t}};uS.exports=_t});var fu=V((zz,fS)=>{fS.exports=require("util").inherits});var pu=V((jz,hS)=>{"use strict";var lu=vt(),wn=It(),SM=fu(),yh=hr(),lS=Lr(),pS=jn(),EM=Yi(),Pf=Pi();function Wn(e){if(!(this instanceof Wn))return new Wn(e);if(e instanceof Wn)return e;if(lu.isObject(e))return this._fromObject(e);throw new EM.InvalidArgument("TransactionSignatures must be instantiated from an object")}SM(Wn,Pf);Wn.prototype._fromObject=function(e){return this._checkObjectArgs(e),this.publicKey=new pS(e.publicKey),this.prevTxId=yh.isBuffer(e.prevTxId)?e.prevTxId:Buffer.from(e.prevTxId,"hex"),this.outputIndex=e.outputIndex,this.inputIndex=e.inputIndex,this.signature=e.signature instanceof Pf?e.signature:yh.isBuffer(e.signature)?Pf.fromBuffer(e.signature):Pf.fromString(e.signature),this.sigtype=e.sigtype,this};Wn.prototype._checkObjectArgs=function(e){wn.checkArgument(pS(e.publicKey),"publicKey"),wn.checkArgument(!lu.isUndefined(e.inputIndex),"inputIndex"),wn.checkArgument(!lu.isUndefined(e.outputIndex),"outputIndex"),wn.checkState(lu.isNumber(e.inputIndex),"inputIndex must be a number"),wn.checkState(lu.isNumber(e.outputIndex),"outputIndex must be a number"),wn.checkArgument(e.signature,"signature"),wn.checkArgument(e.prevTxId,"prevTxId"),wn.checkState(e.signature instanceof Pf||yh.isBuffer(e.signature)||lS.isHexa(e.signature),"signature must be a buffer or hexa value"),wn.checkState(yh.isBuffer(e.prevTxId)||lS.isHexa(e.prevTxId),"prevTxId must be a buffer or hexa value"),wn.checkArgument(e.sigtype,"sigtype"),wn.checkState(lu.isNumber(e.sigtype),"sigtype must be a number")};Wn.prototype.toObject=Wn.prototype.toJSON=function(){return{publicKey:this.publicKey.toString(),prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,inputIndex:this.inputIndex,signature:this.signature.toString(),sigtype:this.sigtype}};Wn.fromObject=function(e){return wn.checkArgument(e),new Wn(e)};hS.exports=Wn});var bS=V((Wz,gS)=>{"use strict";var TM=fu(),dS=It(),Vz=hr(),mS=uu(),IM=xs(),RM=ra(),vS=Mi(),AM=Pi(),OM=pu();function ia(){mS.apply(this,arguments)}TM(ia,mS);ia.prototype.getSignatures=function(e,t,r,i,n,a){dS.checkState(this.output instanceof IM),i=i||AM.SIGHASH_ALL;var u=t.toPublicKey();return u.toString()===this.output.script.getPublicKey().toString("hex")?[new OM({publicKey:u,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:RM.sign(e,t,i,r,this.output.script,a),sigtype:i})]:[]};ia.prototype.addSignature=function(e,t,r){return dS.checkState(this.isValidSignature(e,t,r),"Signature is invalid"),this.setScript(vS.buildPublicKeyIn(t.signature.toDER(),t.sigtype)),this};ia.prototype.clearSignatures=function(){return this.setScript(vS.empty()),this};ia.prototype.isFullySigned=function(){return this.script.isPublicKeyIn()};ia.SCRIPT_MAX_SIZE=73;ia.prototype._estimateSize=function(){return this._getBaseSize()+ia.SCRIPT_MAX_SIZE};gS.exports=ia});var Mf=V((Xz,SS)=>{"use strict";var jo=Pi(),Kz=Mi(),Gz=xs(),xS=bs(),_S=yi(),$z=Zr(),Bf=ti(),wS=Cf(),yS=It(),Mv=vt(),Cv=function(t,r,i,n,a){var u,h,b;if(!(r&jo.SIGHASH_ANYONECANPAY)){for(var w=[],T=0;T<t.inputs.length;T++){var I=t.inputs[T],B=new xS(I.prevTxId).readReverse();w.push(B);var M=Buffer.alloc(4);M.writeUInt32LE(I.outputIndex,0),w.push(M)}u=Bf.sha256sha256(Buffer.concat(w))}if(!(r&jo.SIGHASH_ANYONECANPAY)&&(r&31)!==jo.SIGHASH_SINGLE&&(r&31)!==jo.SIGHASH_NONE){for(var P=[],L=0;L<t.inputs.length;L++){var X=Buffer.alloc(4);X.writeUInt32LE(t.inputs[L].sequenceNumber,0),P.push(X)}h=Bf.sha256sha256(Buffer.concat(P))}var W=new _S;if((r&31)!==jo.SIGHASH_SINGLE&&(r&31)!==jo.SIGHASH_NONE){for(var q=0;q<t.outputs.length;q++)t.outputs[q].toBufferWriter(W);b=Bf.sha256sha256(W.toBuffer())}else(r&31)===jo.SIGHASH_SINGLE&&i<t.outputs.length&&(t.outputs[i].toBufferWriter(W),b=Bf.sha256sha256(W.toBuffer()));var ee=new _S;ee.writeUInt32LE(t.version),ee.write(u),ee.write(h);var fe=new xS(t.inputs[i].prevTxId).readReverse();return ee.write(fe),ee.writeUInt32LE(t.inputs[i].outputIndex),ee.write(n),ee.write(a),ee.writeUInt32LE(t.inputs[i].sequenceNumber),ee.write(b),ee.writeUInt32LE(t.nLockTime),ee.writeInt32LE(r),Bf.sha256sha256(ee.toBuffer())};function kM(e,t,r,i,n,a,u){u=u||"ecdsa";var h;if(u==="ecdsa"){let b=Cv(e,r,i,n,a);return h=wS.sign(b,t).set({nhashtype:r}),h}throw new Error("signingMethod not supported ",u)}function NM(e,t,r,i,n,a,u){if(yS.checkArgument(!Mv.isUndefined(e)),yS.checkArgument(!Mv.isUndefined(t)&&!Mv.isUndefined(t.nhashtype)),u=u||"ecdsa",u==="ecdsa"){let h=Cv(e,t.nhashtype,i,n,a);return wS.verify(h,t,r)}throw new Error("signingMethod not supported ",u)}SS.exports={sighash:Cv,sign:kM,verify:NM}});var AS=V((Zz,RS)=>{"use strict";var PM=fu(),ES=It(),wh=hr(),Yz=zn(),BM=ti(),TS=uu(),MM=xs(),IS=ra(),Lv=Mf(),CM=yi(),wh=hr(),hu=Mi(),LM=Pi(),DM=pu();function hi(){TS.apply(this,arguments)}PM(hi,TS);hi.prototype.getRedeemScript=function(e){if(!this.redeemScript){var t=hu.buildWitnessV0Out(e);if(hu.buildScriptHashOut(t).equals(this.output.script)){var r=new hu;r.add(t.toBuffer()),this.setScript(r),this.redeemScript=t}}return this.redeemScript};hi.prototype.getScriptCode=function(e){var t=new CM,r;this.output.script.isScriptHashOut()?r=this.getRedeemScript(e):r=this.output.script;var i=hu.buildPublicKeyHashOut(r.toAddress()).toBuffer();return t.writeVarintNum(i.length),t.write(i),t.toBuffer()};hi.prototype.getSighash=function(e,t,r,i){var n=this.getScriptCode(t),a=this.getSatoshisBuffer();return Lv.sighash(e,i,r,n,a)};hi.prototype.getSignatures=function(e,t,r,i,n,a){ES.checkState(this.output instanceof MM),n=n||BM.sha256ripemd160(t.publicKey.toBuffer()),i=i||LM.SIGHASH_ALL,a=a||"ecdsa";var u;if(this.output.script.isScriptHashOut()?u=this.getRedeemScript(t.publicKey):u=this.output.script,u&&wh.equals(n,u.getPublicKeyHash())){var h;if(u.isWitnessPublicKeyHashOut()){var b=this.getSatoshisBuffer(),w=this.getScriptCode(t.publicKey);h=Lv.sign(e,t,i,r,w,b,a)}else h=IS.sign(e,t,i,r,this.output.script,a);return[new DM({publicKey:t.publicKey,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:h,sigtype:i})]}return[]};hi.prototype.addSignature=function(e,t,r){return ES.checkState(this.isValidSignature(e,t,r),"Signature is invalid"),this.output.script.isWitnessPublicKeyHashOut()||this.output.script.isScriptHashOut()?this.setWitnesses([wh.concat([t.signature.toDER(),wh.integerAsSingleByteBuffer(t.sigtype)]),t.publicKey.toBuffer()]):this.setScript(hu.buildPublicKeyHashIn(t.publicKey,t.signature.toDER(),t.sigtype)),this};hi.prototype.clearSignatures=function(){return this.setScript(hu.empty()),this.setWitnesses([]),this};hi.prototype.isFullySigned=function(){return this.script.isPublicKeyHashIn()||this.hasWitnesses()};hi.prototype.isValidSignature=function(e,t,r){if(t.signature.nhashtype=t.sigtype,this.output.script.isWitnessPublicKeyHashOut()||this.output.script.isScriptHashOut()){var i=this.getScriptCode(),n=this.getSatoshisBuffer();return Lv.verify(e,t.signature,t.publicKey,t.inputIndex,i,n,r)}else return IS.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script,r)};hi.SCRIPT_MAX_SIZE=107;hi.REDEEM_SCRIPT_SIZE=23;hi.prototype._estimateSize=function(){let e=this._getBaseSize();e+=1;let r=hi.SCRIPT_MAX_SIZE/4;return this.output.script.isWitnessPublicKeyHashOut()?e+=r:this.output.script.isScriptHashOut()?e+=r+hi.REDEEM_SCRIPT_SIZE:e+=hi.SCRIPT_MAX_SIZE,e};RS.exports=hi});var PS=V((ej,NS)=>{"use strict";var Sn=vt(),UM=fu(),Jz=Sh(),Uv=uu(),qM=xs(),Lf=It(),kS=Mi(),Dv=Pi(),qv=ra(),Qz=jn(),OS=hr(),Fv=pu();function Or(e,t,r,i,n){n=n||{},Uv.apply(this,arguments);var a=this;t=t||e.publicKeys,r=r||e.threshold,i=i||e.signatures,n.noSorting?this.publicKeys=t:this.publicKeys=Sn.sortBy(t,function(u){return u.toString("hex")}),Lf.checkState(kS.buildMultisigOut(this.publicKeys,r).equals(this.output.script),"Provided public keys don't match to the provided output script"),this.publicKeyIndex={},Sn.each(this.publicKeys,function(u,h){a.publicKeyIndex[u.toString()]=h}),this.threshold=r,this.signatures=i?this._deserializeSignatures(i):new Array(this.publicKeys.length)}UM(Or,Uv);Or.prototype.toObject=function(){var e=Uv.prototype.toObject.apply(this,arguments);return e.threshold=this.threshold,e.publicKeys=Sn.map(this.publicKeys,function(t){return t.toString()}),e.signatures=this._serializeSignatures(),e};Or.prototype._deserializeSignatures=function(e){return Sn.map(e,function(t){if(t)return new Fv(t)})};Or.prototype._serializeSignatures=function(){return Sn.map(this.signatures,function(e){if(e)return e.toObject()})};Or.prototype.getSignatures=function(e,t,r,i,n,a){Lf.checkState(this.output instanceof qM),i=i||Dv.SIGHASH_ALL,a=a||"ecdsa";var u=this,h=[];return Sn.each(this.publicKeys,function(b){b.toString()===t.publicKey.toString()&&h.push(new Fv({publicKey:t.publicKey,prevTxId:u.prevTxId,outputIndex:u.outputIndex,inputIndex:r,signature:qv.sign(e,t,i,r,u.output.script,a),sigtype:i}))}),h};Or.prototype.addSignature=function(e,t,r){return Lf.checkState(!this.isFullySigned(),"All needed signatures have already been added"),Lf.checkArgument(!Sn.isUndefined(this.publicKeyIndex[t.publicKey.toString()],"Signature Undefined"),"Signature has no matching public key"),Lf.checkState(this.isValidSignature(e,t,r),"Invalid Signature"),this.signatures[this.publicKeyIndex[t.publicKey.toString()]]=t,this._updateScript(),this};Or.prototype._updateScript=function(){return this.setScript(kS.buildMultisigIn(this.publicKeys,this.threshold,this._createSignatures())),this};Or.prototype._createSignatures=function(){return Sn.map(Sn.filter(this.signatures,function(e){return!Sn.isUndefined(e)}),function(e){return OS.concat([e.signature.toDER(),OS.integerAsSingleByteBuffer(e.sigtype)])})};Or.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()};Or.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold};Or.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()};Or.prototype.countSignatures=function(){return Sn.reduce(this.signatures,function(e,t){return e+!!t},0)};Or.prototype.publicKeysWithoutSignature=function(){var e=this;return Sn.filter(this.publicKeys,function(t){return!e.signatures[e.publicKeyIndex[t.toString()]]})};Or.prototype.isValidSignature=function(e,t,r){return t.signature.nhashtype=t.sigtype,qv.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script,r)};Or.normalizeSignatures=function(e,t,r,i,n,a){return n.map(function(u){var h=null;return i=i.filter(function(b){if(h)return!0;var w=new Fv({signature:Dv.fromTxFormat(b),publicKey:u,prevTxId:t.prevTxId,outputIndex:t.outputIndex,inputIndex:r,sigtype:Dv.SIGHASH_ALL});w.signature.nhashtype=w.sigtype;var T=qv.verify(e,w.signature,w.publicKey,w.inputIndex,t.output.script,a);return T?(h=w,!1):!0}),h||null})};Or.OPCODES_SIZE=1;Or.SIGNATURE_SIZE=73;Or.prototype._estimateSize=function(){return this._getBaseSize()+Or.OPCODES_SIZE+this.threshold*Or.SIGNATURE_SIZE};NS.exports=Or});var LS=V((tj,CS)=>{"use strict";var FM=vt(),HM=fu(),Hv=uu(),zM=xs(),Eh=It(),Ga=zn(),du=Mi(),jM=Pi(),zv=ra(),jv=Mf(),VM=yi(),BS=hr(),MS=pu();function Jt(e,t,r,i,n){n=n||{},Hv.apply(this,arguments),t=t||e.publicKeys,r=r||e.threshold,i=i||e.signatures,n.noSorting?this.publicKeys=t:this.publicKeys=FM.sortBy(t,function(h){return h.toString("hex")}),this.redeemScript=du.buildMultisigOut(this.publicKeys,r,n);var a=du.buildWitnessMultisigOutFromScript(this.redeemScript);if(a.equals(this.output.script))this.nestedWitness=!1,this.type=Ga.PayToWitnessScriptHash;else if(du.buildScriptHashOut(a).equals(this.output.script))this.nestedWitness=!0,this.type=Ga.PayToScriptHash;else if(du.buildScriptHashOut(this.redeemScript).equals(this.output.script))this.nestedWitness=!1,this.type=Ga.PayToScriptHash;else throw new Error("Provided public keys don't hash to the provided output");if(this.nestedWitness){var u=new du;u.add(a.toBuffer()),this.setScript(u)}this.publicKeyIndex={};for(let h=0;h<this.publicKeys.length;h++){let b=this.publicKeys[h];this.publicKeyIndex[b.toString()]=h}this.threshold=r,this.signatures=i?this._deserializeSignatures(i):new Array(this.publicKeys.length)}HM(Jt,Hv);Jt.prototype.toObject=function(){var e=Hv.prototype.toObject.apply(this,arguments);return e.threshold=this.threshold,e.publicKeys=this.publicKeys.map(function(t){return t.toString()}),e.signatures=this._serializeSignatures(),e};Jt.prototype._deserializeSignatures=function(e){return e.map(function(t){if(t)return new MS(t)})};Jt.prototype._serializeSignatures=function(){return this.signatures.map(function(e){if(e)return e.toObject()})};Jt.prototype.getScriptCode=function(){var e=new VM;if(this.redeemScript.hasCodeseparators())throw new Error("@TODO");var t=this.redeemScript.toBuffer();return e.writeVarintNum(t.length),e.write(t),e.toBuffer()};Jt.prototype.getSighash=function(e,t,r,i){var n;if(this.nestedWitness||this.type===Ga.PayToWitnessScriptHash){var a=this.getScriptCode(),u=this.getSatoshisBuffer();n=jv.sighash(e,i,r,a,u)}else n=zv.sighash(e,i,r,this.redeemScript);return n};Jt.prototype.getSignatures=function(e,t,r,i,n,a){Eh.checkState(this.output instanceof zM),i=i||jM.SIGHASH_ALL,a=a||"ecdsa";let u=[];for(let T of this.publicKeys)if(T.toString()===t.publicKey.toString()){var h;if(this.nestedWitness||this.type===Ga.PayToWitnessScriptHash){var b=this.getScriptCode(),w=this.getSatoshisBuffer();h=jv.sign(e,t,i,r,b,w,a)}else h=zv.sign(e,t,i,r,this.redeemScript,a);u.push(new MS({publicKey:t.publicKey,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:h,sigtype:i}))}return u};Jt.prototype.addSignature=function(e,t,r){return Eh.checkState(!this.isFullySigned(),"All needed signatures have already been added"),Eh.checkArgument(this.publicKeyIndex[t.publicKey.toString()]!=null,"Signature has no matching public key"),Eh.checkState(this.isValidSignature(e,t,r),"Invalid Signature!"),this.signatures[this.publicKeyIndex[t.publicKey.toString()]]=t,this._updateScript(),this};Jt.prototype._updateScript=function(){if(this.nestedWitness||this.type===Ga.PayToWitnessScriptHash){for(var e=[Buffer.alloc(0)],t=this._createSignatures(),r=0;r<t.length;r++)e.push(t[r]);e.push(this.redeemScript.toBuffer()),this.setWitnesses(e)}else{var i=du.buildP2SHMultisigIn(this.publicKeys,this.threshold,this._createSignatures(),{cachedMultisig:this.redeemScript});this.setScript(i)}return this};Jt.prototype._createSignatures=function(){return this.signatures.filter(function(e){return e!=null}).map(function(e){return BS.concat([e.signature.toDER(),BS.integerAsSingleByteBuffer(e.sigtype)])})};Jt.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()};Jt.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold};Jt.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()};Jt.prototype.countSignatures=function(){return this.signatures.reduce(function(e,t){return e+!!t},0)};Jt.prototype.publicKeysWithoutSignature=function(){return this.publicKeys.filter(e=>!this.signatures[this.publicKeyIndex[e.toString()]])};Jt.prototype.isValidSignature=function(e,t,r){if(r=r||"ecdsa",this.nestedWitness||this.type===Ga.PayToWitnessScriptHash){t.signature.nhashtype=t.sigtype;var i=this.getScriptCode(),n=this.getSatoshisBuffer();return jv.verify(e,t.signature,t.publicKey,t.inputIndex,i,n,r)}else return t.signature.nhashtype=t.sigtype,zv.verify(e,t.signature,t.publicKey,t.inputIndex,this.redeemScript,r)};Jt.MAX_OPCODES_SIZE=8;Jt.MAX_SIGNATURE_SIZE=74;Jt.MAX_PUBKEY_SIZE=34;Jt.REDEEM_SCRIPT_SIZE=34;Jt.prototype._estimateSize=function(){let e=this._getBaseSize(),t=4,r=Jt.MAX_OPCODES_SIZE+this.threshold*Jt.MAX_SIGNATURE_SIZE+this.publicKeys.length*Jt.MAX_PUBKEY_SIZE;return this.type===Ga.PayToWitnessScriptHash?e+=r/t:this.nestedWitness?e+=r/t+Jt.REDEEM_SCRIPT_SIZE:e+=r,e};CS.exports=Jt});var Th=V((rj,mu)=>{mu.exports=uu();mu.exports.PublicKey=bS();mu.exports.PublicKeyHash=AS();mu.exports.MultiSig=PS();mu.exports.MultiSigScriptHash=LS()});var ra=V((ij,FS)=>{"use strict";var Df=Pi(),Vv=Mi(),WM=xs(),KM=bs(),GM=yi(),$M=Zr(),XM=ti(),US=Cf(),DS=It(),Wv=vt(),qS=sS(),YM="0000000000000000000000000000000000000000000000000000000000000001",ZM="ffffffffffffffff",Kv=function(t,r,i,n){var a=Sh(),u=Th(),h,b=a.shallowCopy(t);for(n=new Vv(n),n.removeCodeseparators(),h=0;h<b.inputs.length;h++)b.inputs[h]=new u(b.inputs[h]).setScript(Vv.empty());if(b.inputs[i]=new u(b.inputs[i]).setScript(n),(r&31)===Df.SIGHASH_NONE||(r&31)===Df.SIGHASH_SINGLE)for(h=0;h<b.inputs.length;h++)h!==i&&(b.inputs[h].sequenceNumber=0);if((r&31)===Df.SIGHASH_NONE)b.outputs=[];else if((r&31)===Df.SIGHASH_SINGLE){if(i>=b.outputs.length)return Buffer.from(YM,"hex");for(b.outputs.length=i+1,h=0;h<i;h++)b.outputs[h]=new WM({satoshis:$M.fromBuffer(Buffer.from(ZM,"hex")),script:Vv.empty()})}r&Df.SIGHASH_ANYONECANPAY&&(b.inputs=[b.inputs[i]]);var w=new GM().write(b.toBuffer()).writeInt32LE(r).toBuffer(),T=XM.sha256sha256(w);return T=new KM(T).readReverse(),T};function JM(e,t,r,i,n,a){a=a||"ecdsa";let u=Kv(e,r,i,n),h;switch(a){case"ecdsa":h=US.sign(u,t,"little").set({nhashtype:r});break;case"schnorr":h=qS.sign(t.toString(),u);break;default:throw new Error("signingMethod not supported ",a)}return h}function QM(e,t,r,i,n,a){DS.checkArgument(!Wv.isUndefined(e),"Transaction Undefined"),DS.checkArgument(!Wv.isUndefined(t)&&!Wv.isUndefined(t.nhashtype),"Signature Undefined"),a=a||"ecdsa";let u=Kv(e,t.nhashtype,i,n),h=!1;switch(a){case"ecdsa":h=US.verify(u,t,r,"little");break;case"schnorr":h=qS.verify(r,u,t);break;default:throw new Error("signingMethod not supported ",a)}return h}FS.exports={sighash:Kv,sign:JM,verify:QM}});var Rh=V((nj,HS)=>{"use strict";var Gv=vt(),Ih=Yi(),eC=It(),Vo={BTC:[1e8,8],mBTC:[1e5,5],uBTC:[100,2],bits:[100,2],satoshis:[1,0]};function ot(e,t){if(!(this instanceof ot))return new ot(e,t);if(Gv.isNumber(t)){if(t<=0)throw new Ih.Unit.InvalidRate(t);e=e/t,t=ot.BTC}this._value=this._from(e,t);var r=this,i=function(n){Object.defineProperty(r,n,{get:function(){return r.to(n)},enumerable:!0})};Object.keys(Vo).forEach(i)}Object.keys(Vo).forEach(function(e){ot[e]=e});ot.fromObject=function(t){return eC.checkArgument(Gv.isObject(t),"Argument is expected to be an object"),new ot(t.amount,t.code)};ot.fromBTC=function(e){return new ot(e,ot.BTC)};ot.fromMillis=ot.fromMilis=function(e){return new ot(e,ot.mBTC)};ot.fromMicros=ot.fromBits=function(e){return new ot(e,ot.bits)};ot.fromSatoshis=function(e){return new ot(e,ot.satoshis)};ot.fromFiat=function(e,t){return new ot(e,t)};ot.prototype._from=function(e,t){if(!Vo[t])throw new Ih.Unit.UnknownCode(t);return parseInt((e*Vo[t][0]).toFixed())};ot.prototype.to=function(e){if(Gv.isNumber(e)){if(e<=0)throw new Ih.Unit.InvalidRate(e);return parseFloat((this.BTC*e).toFixed(2))}if(!Vo[e])throw new Ih.Unit.UnknownCode(e);var t=this._value/Vo[e][0];return parseFloat(t.toFixed(Vo[e][1]))};ot.prototype.toBTC=function(){return this.to(ot.BTC)};ot.prototype.toMillis=ot.prototype.toMilis=function(){return this.to(ot.mBTC)};ot.prototype.toMicros=ot.prototype.toBits=function(){return this.to(ot.bits)};ot.prototype.toSatoshis=function(){return this.to(ot.satoshis)};ot.prototype.atRate=function(e){return this.to(e)};ot.prototype.toString=function(){return this.satoshis+" satoshis"};ot.prototype.toObject=ot.prototype.toJSON=function(){return{amount:this.BTC,code:ot.BTC}};ot.prototype.inspect=function(){return"<Unit: "+this.toString()+">"};HS.exports=ot});var $v=V((sj,VS)=>{"use strict";var na=vt(),Ah=It(),zS=Lr(),tC=Mi(),rC=zn(),jS=Rh();function sa(e){if(!(this instanceof sa))return new sa(e);Ah.checkArgument(na.isObject(e),"Must provide an object from where to extract data");var t=e.address?new rC(e.address):void 0,r=e.txid?e.txid:e.txId;if(!r||!zS.isHexaString(r)||r.length>64)throw new Error("Invalid TXID in object",e);var i=na.isUndefined(e.vout)?e.outputIndex:e.vout;if(!na.isNumber(i))throw new Error("Invalid outputIndex, received "+i);Ah.checkArgument(!na.isUndefined(e.scriptPubKey)||!na.isUndefined(e.script),"Must provide the scriptPubKey for that output!");var n=new tC(e.scriptPubKey||e.script);Ah.checkArgument(!na.isUndefined(e.amount)||!na.isUndefined(e.satoshis),"Must provide an amount for the output");var a=na.isUndefined(e.amount)?e.satoshis:new jS.fromBTC(e.amount).toSatoshis();Ah.checkArgument(na.isNumber(a),"Amount must be a number"),zS.defineImmutable(this,{address:t,txId:r,outputIndex:i,script:n,satoshis:a})}sa.prototype.inspect=function(){return"<UnspentOutput: "+this.txId+":"+this.outputIndex+", satoshis: "+this.satoshis+", address: "+this.address+">"};sa.prototype.toString=function(){return this.txId+":"+this.outputIndex};sa.fromObject=function(e){return new sa(e)};sa.prototype.toObject=sa.prototype.toJSON=function(){return{address:this.address?this.address.toString():void 0,txid:this.txId,vout:this.outputIndex,scriptPubKey:this.script.toBuffer().toString("hex"),amount:jS.fromSatoshis(this.satoshis).toBTC()}};VS.exports=sa});var Sh=V((aj,XS)=>{"use strict";var Xa=vt(),kr=It(),iC=require("buffer"),WS=Buffer.compare||fw(),Wr=Yi(),nC=hr(),kh=Lr(),Xv=bs(),vu=yi(),Yv=ti(),sC=Pi(),aC=ra(),oC=Mf(),cC=zn(),KS=$v(),Nr=Th(),uC=Nr.PublicKeyHash,fC=Nr.PublicKey,lC=Nr.MultiSigScriptHash,pC=Nr.MultiSig,Ya=xs(),$a=Mi(),hC=gu(),Oh=Zr();function ie(e,t){if(!(this instanceof ie))return new ie(e);if(this.inputs=[],this.outputs=[],this._inputAmount=void 0,this._outputAmount=void 0,e){if(e instanceof ie)return ie.shallowCopy(e);if(kh.isHexa(e))this.fromString(e);else if(nC.isBuffer(e))this.fromBuffer(e);else if(Xa.isObject(e))this.fromObject(e,t);else throw new Wr.InvalidArgument("Must provide an object or string to deserialize a transaction")}else this._newTransaction()}var GS=2,dC=0,mC=1e6;ie.DUST_AMOUNT=546;ie.FEE_SECURITY_MARGIN=150;ie.MAX_MONEY=21e6*1e8;ie.NLOCKTIME_BLOCKHEIGHT_LIMIT=5e8;ie.NLOCKTIME_MAX_VALUE=4294967295;ie.FEE_PER_KB=1e5;ie.CHANGE_OUTPUT_MAX_SIZE=62;ie.MAXIMUM_EXTRA_SIZE=26;ie.shallowCopy=function(e){var t=new ie(e.toBuffer());return t};var $S={configurable:!1,enumerable:!0,get:function(){return this._hash=new Xv(this._getHash()).readReverse().toString("hex"),this._hash}},vC={configurable:!1,enumerable:!0,get:function(){return new Xv(this._getWitnessHash()).readReverse().toString("hex")}};Object.defineProperty(ie.prototype,"witnessHash",vC);Object.defineProperty(ie.prototype,"hash",$S);Object.defineProperty(ie.prototype,"id",$S);var Zv={configurable:!1,enumerable:!0,get:function(){return this._getInputAmount()}};Object.defineProperty(ie.prototype,"inputAmount",Zv);Zv.get=function(){return this._getOutputAmount()};Object.defineProperty(ie.prototype,"outputAmount",Zv);Object.defineProperty(ie.prototype,"size",{configurable:!1,enumerable:!1,get:function(){return this._calculateSize()}});Object.defineProperty(ie.prototype,"vsize",{configurable:!1,enumerable:!1,get:function(){return this._calculateVSize()}});Object.defineProperty(ie.prototype,"weight",{configurable:!1,enumerable:!1,get:function(){return this._calculateWeight()}});ie.prototype._getHash=function(){return Yv.sha256sha256(this.toBuffer(!0))};ie.prototype._getWitnessHash=function(){return Yv.sha256sha256(this.toBuffer(!1))};ie.prototype.serialize=function(e){return e===!0||e&&e.disableAll?this.uncheckedSerialize():this.checkedSerialize(e)};ie.prototype.uncheckedSerialize=ie.prototype.toString=function(){return this.toBuffer().toString("hex")};ie.prototype.checkedSerialize=function(e){var t=this.getSerializationError(e);if(t)throw t.message+=" - For more information please see: https://github.com/bitpay/bitcore/blob/master/packages/bitcore-lib/docs/transaction.md#serialization-checks",t;return this.uncheckedSerialize()};ie.prototype.invalidSatoshis=function(){for(var e=!1,t=0;t<this.outputs.length;t++)this.outputs[t].invalidSatoshis()&&(e=!0);return e};ie.prototype.getSerializationError=function(e){if(e=e||{},this.invalidSatoshis())return new Wr.Transaction.InvalidSatoshis;var t=this._getUnspentValue(),r;return t<0?e.disableMoreOutputThanInput||(r=new Wr.Transaction.InvalidOutputAmountSum):r=this._hasFeeError(e,t),r||this._hasDustOutputs(e)||this._isMissingSignatures(e)};ie.prototype._hasFeeError=function(e,t){if(this._fee!=null&&this._fee!==t)return new Wr.Transaction.FeeError.Different("Unspent value is "+t+" but specified fee is "+this._fee);if(!e.disableLargeFees){var r=Math.floor(ie.FEE_SECURITY_MARGIN*this._estimateFee());if(t>r)return this._missingChange()?new Wr.Transaction.ChangeAddressMissing("Fee is too large and no change address was provided"):new Wr.Transaction.FeeError.TooLarge("expected less than "+r+" but got "+t)}if(!e.disableSmallFees){var i=Math.ceil(this._estimateFee()/ie.FEE_SECURITY_MARGIN);if(t<i)return new Wr.Transaction.FeeError.TooSmall("expected more than "+i+" but got "+t)}};ie.prototype._missingChange=function(){return!this._changeScript};ie.prototype._hasDustOutputs=function(e){if(!e.disableDustOutputs){var t,r;for(t in this.outputs)if(r=this.outputs[t],r.satoshis<ie.DUST_AMOUNT&&!r.script.isDataOut())return new Wr.Transaction.DustOutputs}};ie.prototype._isMissingSignatures=function(e){if(!e.disableIsFullySigned&&!this.isFullySigned())return new Wr.Transaction.MissingSignatures};ie.prototype.inspect=function(){return"<Transaction: "+this.uncheckedSerialize()+">"};ie.prototype.toBuffer=function(e){var t=new vu;return this.toBufferWriter(t,e).toBuffer()};ie.prototype.hasWitnesses=function(){for(var e=0;e<this.inputs.length;e++)if(this.inputs[e].hasWitnesses())return!0;return!1};ie.prototype.toBufferWriter=function(e,t){e.writeInt32LE(this.version);let r=this.hasWitnesses();r&&!t&&e.write(Buffer.from("0001","hex")),e.writeVarintNum(this.inputs?this.inputs.length:0);for(let i of this.inputs||[])i.toBufferWriter(e);e.writeVarintNum(this.outputs?this.outputs.length:0);for(let i of this.outputs||[])i.toBufferWriter(e);if(r&&!t)for(let i of this.inputs){let n=i.getWitnesses();e.writeVarintNum(n.length);for(let a=0;a<n.length;a++)e.writeVarintNum(n[a].length),e.write(n[a])}return e.writeUInt32LE(this.nLockTime),e};ie.prototype.fromBuffer=function(e){var t=new Xv(e);return this.fromBufferReader(t)};ie.prototype.fromBufferReader=function(e){kr.checkArgument(!e.finished(),"No transaction data received"),this.version=e.readInt32LE();var t=e.readVarintNum(),r=!1;t===0&&e.buf[e.pos]!==0&&(e.pos+=1,r=!0,t=e.readVarintNum());for(var i=0;i<t;i++){var n=Nr.fromBufferReader(e);this.inputs.push(n)}for(var a=e.readVarintNum(),u=0;u<a;u++)this.outputs.push(Ya.fromBufferReader(e));if(r)for(var h=0;h<t;h++){for(var b=e.readVarintNum(),w=[],T=0;T<b;T++){var I=e.readVarintNum(),B=e.read(I);w.push(B)}this.inputs[h].setWitnesses(w)}return this.nLockTime=e.readUInt32LE(),this};ie.prototype.toObject=ie.prototype.toJSON=function(){var t=[];this.inputs.forEach(function(n){t.push(n.toObject())});var r=[];this.outputs.forEach(function(n){r.push(n.toObject())});var i={hash:this.hash,version:this.version,inputs:t,outputs:r,nLockTime:this.nLockTime};return this._changeScript&&(i.changeScript=this._changeScript.toString()),this._changeIndex!=null&&(i.changeIndex=this._changeIndex),this._fee!=null&&(i.fee=this._fee),i};ie.prototype.fromObject=function(t,r){kr.checkArgument(Xa.isObject(t)||t instanceof ie);var i;t instanceof ie?i=t.toObject():i=t;for(let u of i.inputs||[]){if(!u.output||!u.output.script){this.uncheckedAddInput(new Nr(u));continue}var n=new $a(u.output.script),a;if((n.isScriptHashOut()||n.isWitnessScriptHashOut())&&u.publicKeys&&u.threshold)a=new Nr.MultiSigScriptHash(u,u.publicKeys,u.threshold,u.signatures,r);else if(n.isPublicKeyHashOut()||n.isWitnessPublicKeyHashOut()||n.isScriptHashOut())a=new Nr.PublicKeyHash(u);else if(n.isPublicKeyOut())a=new Nr.PublicKey(u);else throw new Wr.Transaction.Input.UnsupportedScript(u.output.script);this.addInput(a)}for(let u of i.outputs||[])this.addOutput(new Ya(u));return i.changeIndex&&(this._changeIndex=i.changeIndex),i.changeScript&&(this._changeScript=new $a(i.changeScript)),i.fee&&(this._fee=i.fee),this.nLockTime=i.nLockTime,this.version=i.version,this._checkConsistency(t),this};ie.prototype._checkConsistency=function(e){this._changeIndex!=null&&(kr.checkState(this._changeScript,"Change script is expected."),kr.checkState(this.outputs[this._changeIndex],"Change index points to undefined output."),kr.checkState(this.outputs[this._changeIndex].script.toString()===this._changeScript.toString(),"Change output has an unexpected script.")),e&&e.hash&&kr.checkState(e.hash===this.hash,"Hash in object does not match transaction hash.")};ie.prototype.lockUntilDate=function(e){if(kr.checkArgument(e),!isNaN(e)&&e<ie.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new Wr.Transaction.LockTimeTooEarly;Xa.isDate(e)&&(e=e.getTime()/1e3);for(var t=0;t<this.inputs.length;t++)this.inputs[t].sequenceNumber===Nr.DEFAULT_SEQNUMBER&&(this.inputs[t].sequenceNumber=Nr.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=e,this};ie.prototype.lockUntilBlockHeight=function(e){if(kr.checkArgument(!isNaN(e)),e>=ie.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new Wr.Transaction.BlockHeightTooHigh;if(e<0)throw new Wr.Transaction.NLockTimeOutOfRange;for(var t=0;t<this.inputs.length;t++)this.inputs[t].sequenceNumber===Nr.DEFAULT_SEQNUMBER&&(this.inputs[t].sequenceNumber=Nr.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=e,this};ie.prototype.getLockTime=function(){return this.nLockTime?this.nLockTime<ie.NLOCKTIME_BLOCKHEIGHT_LIMIT?this.nLockTime:new Date(1e3*this.nLockTime):null};ie.prototype.fromString=function(e){this.fromBuffer(iC.Buffer.from(e,"hex"))};ie.prototype._newTransaction=function(){this.version=GS,this.nLockTime=dC};ie.prototype.from=function(e,t,r,i){if(Array.isArray(e)){for(let a of e)this.from(a,t,r,i);return this}return this.inputs.some(function(a){return a.prevTxId.toString("hex")===e.txId&&a.outputIndex===e.outputIndex})?this:(t&&r?this._fromMultisigUtxo(e,t,r,i):this._fromNonP2SH(e),this)};ie.prototype.associateInputs=function(e,t,r,i){let n=[];for(let a of e){let u=this.inputs.findIndex(h=>h.prevTxId.toString("hex")===a.txId&&h.outputIndex===a.outputIndex);if(n.push(u),u>=0){let h=this.inputs[u].sequenceNumber;this.inputs[u]=this._getInputFrom(a,t,r,i),this.inputs[u].sequenceNumber=h}}return n};ie.prototype._selectInputType=function(e,t,r){var i;return e=new KS(e),t&&r?e.script.isMultisigOut()?i=pC:(e.script.isScriptHashOut()||e.script.isWitnessScriptHashOut())&&(i=lC):e.script.isPublicKeyHashOut()||e.script.isWitnessPublicKeyHashOut()||e.script.isScriptHashOut()?i=uC:e.script.isPublicKeyOut()?i=fC:i=Nr,i};ie.prototype._getInputFrom=function(e,t,r,i){e=new KS(e);let n=this._selectInputType(e,t,r),a={output:new Ya({script:e.script,satoshis:e.satoshis}),prevTxId:e.txId,outputIndex:e.outputIndex,sequenceNumber:e.sequenceNumber,script:$a.empty()},u=t&&r?[t,r,!1,i]:[];return new n(a,...u)};ie.prototype._fromNonP2SH=function(e){let t=this._getInputFrom(e);this.addInput(t)};ie.prototype._fromMultisigUtxo=function(e,t,r,i){kr.checkArgument(r<=t.length,"Number of required signatures must be greater than the number of public keys");let n=this._getInputFrom(e,t,r,i);this.addInput(n)};ie.prototype.addInput=function(e,t,r){if(kr.checkArgumentType(e,Nr,"input"),!e.output&&(t==null||r==null))throw new Wr.Transaction.NeedMoreInfo("Need information about the UTXO script and satoshis");return!e.output&&t&&r!=null&&(t=t instanceof $a?t:new $a(t),kr.checkArgumentType(r,"number","satoshis"),e.output=new Ya({script:t,satoshis:r})),this.uncheckedAddInput(e)};ie.prototype.uncheckedAddInput=function(e){return kr.checkArgumentType(e,Nr,"input"),this.inputs.push(e),this._inputAmount=void 0,this._updateChangeOutput(),this};ie.prototype.hasAllUtxoInfo=function(){return this.inputs.every(function(e){return!!e.output})};ie.prototype.fee=function(e){return kr.checkArgument(!isNaN(e),"amount must be a number"),this._fee=e,this._updateChangeOutput(),this};ie.prototype.feePerKb=function(e){return kr.checkArgument(!isNaN(e),"amount must be a number"),this._feePerKb=e,this._updateChangeOutput(),this};ie.prototype.feePerByte=function(e){return kr.checkArgument(!isNaN(e),"amount must be a number"),this._feePerByte=e,this._updateChangeOutput(),this};ie.prototype.change=function(e){return kr.checkArgument(e,"address is required"),this._changeScript=$a.fromAddress(e),this._updateChangeOutput(),this};ie.prototype.getChangeOutput=function(){return this._changeIndex!=null?this.outputs[this._changeIndex]:null};ie.prototype.to=function(e,t){if(Array.isArray(e)){for(let r of e)this.to(r.address,r.satoshis);return this}return kr.checkArgument(kh.isNaturalNumber(t),"Amount is expected to be a positive integer"),this.addOutput(new Ya({script:$a(new cC(e)),satoshis:t})),this};ie.prototype.addData=function(e){return this.addOutput(new Ya({script:$a.buildDataOut(e),satoshis:0})),this};ie.prototype.addOutput=function(e){return kr.checkArgumentType(e,Ya,"output"),this._addOutput(e),this._updateChangeOutput(),this};ie.prototype.clearOutputs=function(){return this.outputs=[],this._clearSignatures(),this._outputAmount=void 0,this._changeIndex=void 0,this._updateChangeOutput(),this};ie.prototype._addOutput=function(e){this.outputs.push(e),this._outputAmount=void 0};ie.prototype._getOutputAmount=function(){if(this._outputAmount==null){var e=this;this._outputAmount=0;for(let t of this.outputs||[])e._outputAmount+=t.satoshis}return this._outputAmount};ie.prototype._getInputAmount=function(){return this._inputAmount==null&&(this._inputAmount=Xa.sumBy(this.inputs,function(e){if(e.output==null)throw new Wr.Transaction.Input.MissingPreviousOutput;return e.output.satoshis})),this._inputAmount};ie.prototype._updateChangeOutput=function(e){if(this._changeScript){e||this._clearSignatures(),this._changeIndex!=null&&this._removeOutput(this._changeIndex);var t=this._getUnspentValue(),r=this.getFee(),i=t-r;i>ie.DUST_AMOUNT?(this._changeIndex=this.outputs.length,this._addOutput(new Ya({script:this._changeScript,satoshis:i}))):this._changeIndex=void 0}};ie.prototype.getFee=function(){return this.isCoinbase()?0:this._fee!=null?this._fee:this._changeScript?this._estimateFee():this._getUnspentValue()};ie.prototype._estimateFee=function(){let e=this._estimateSize(),t=this._getUnspentValue(),r=this._feePerByte||(this._feePerKb||ie.FEE_PER_KB)/1e3;function i(u){return u*r}let n=Math.ceil(i(e)),a=Math.ceil(i(e)+i(this._estimateSizeOfChangeOutput()));return!this._changeScript||t<=a?n:a};ie.prototype._estimateSizeOfChangeOutput=function(){if(!this._changeScript)return 0;let e=this._changeScript.toBuffer().length;return 8+vu.varintBufNum(e).length+e};ie.prototype._getUnspentValue=function(){return this._getInputAmount()-this._getOutputAmount()};ie.prototype._clearSignatures=function(){for(let e of this.inputs||[])e.clearSignatures()};ie.prototype._estimateSize=function(){let e=4;this.hasWitnesses()&&(e+=.5),e+=vu.varintBufNum(this.inputs.length).length;for(let t of this.inputs||[])e+=t._estimateSize();e+=vu.varintBufNum(this.outputs.length).length;for(let t of this.outputs||[])e+=t.calculateSize();return e+=4,Math.ceil(e)};ie.prototype._calculateSize=function(){return this.toBuffer().length};ie.prototype._calculateVSize=function(e){let t=this._calculateWeight()/4;return e?t:Math.ceil(t)};ie.prototype._calculateWeight=function(){return this.toBuffer(!0).length*3+this.toBuffer(!1).length};ie.prototype._removeOutput=function(e){var t=this.outputs[e];this.outputs=Xa.without(this.outputs,t),this._outputAmount=void 0};ie.prototype.removeOutput=function(e){this._removeOutput(e),this._updateChangeOutput()};ie.prototype.sort=function(){return this.sortInputs(function(e){var t=Array.prototype.concat.apply([],e);let r=0;return t.forEach(i=>{i.i=r++}),t.sort(function(i,n){return WS(i.prevTxId,n.prevTxId)||i.outputIndex-n.outputIndex||i.i-n.i}),t}),this.sortOutputs(function(e){var t=Array.prototype.concat.apply([],e);let r=0;return t.forEach(i=>{i.i=r++}),t.sort(function(i,n){return i.satoshis-n.satoshis||WS(i.script.toBuffer(),n.script.toBuffer())||i.i-n.i}),t}),this};ie.prototype.shuffleOutputs=function(){return this.sortOutputs(Xa.shuffle)};ie.prototype.sortOutputs=function(e){var t=e(this.outputs);return this._newOutputOrder(t)};ie.prototype.sortInputs=function(e){return this.inputs=e(this.inputs),this._clearSignatures(),this};ie.prototype._newOutputOrder=function(e){var t=this.outputs.length!==e.length||Xa.difference(this.outputs,e).length!==0;if(t)throw new Wr.Transaction.InvalidSorting;if(this._changeIndex!=null){var r=this.outputs[this._changeIndex];this._changeIndex=e.indexOf(r)}return this.outputs=e,this};ie.prototype.removeInput=function(e,t){var r;if(!t&&!isNaN(e)?r=e:r=this.inputs.findIndex(function(n){return n.prevTxId.toString("hex")===e&&n.outputIndex===t}),r<0||r>=this.inputs.length)throw new Wr.Transaction.InvalidIndex(r,this.inputs.length);var i=this.inputs[r];this.inputs=Xa.without(this.inputs,i),this._inputAmount=void 0,this._updateChangeOutput()};ie.prototype.sign=function(e,t,r){if(kr.checkState(this.hasAllUtxoInfo(),"Not all utxo information is available to sign the transaction."),Array.isArray(e)){for(let i of e)this.sign(i,t,r);return this}for(let i of this.getSignatures(e,t,r))this.applySignature(i,r);return this};ie.prototype.getSignatures=function(e,t,r){e=new hC(e),t=t||sC.SIGHASH_ALL;var i=this,n=[],a=Yv.sha256ripemd160(e.publicKey.toBuffer());for(let u=0;u<this.inputs.length;u++){let h=this.inputs[u];for(let b of h.getSignatures(i,e,u,t,a,r))n.push(b)}return n};ie.prototype.applySignature=function(e,t){return this.inputs[e.inputIndex].addSignature(this,e,t),this};ie.prototype.isFullySigned=function(){for(let e of this.inputs||[])if(e.isFullySigned===Nr.prototype.isFullySigned)throw new Wr.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction");return this.inputs.every(function(e){return e.isFullySigned()})};ie.prototype.isValidSignature=function(e,t){if(this.inputs[e.inputIndex].isValidSignature===Nr.prototype.isValidSignature)throw new Wr.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction");return this.inputs[e.inputIndex].isValidSignature(this,e,t)};ie.prototype.verifySignature=function(e,t,r,i,n,a,u){if(n==null&&(n=0),n===1){var h=i.toBuffer(),b=new vu;b.writeVarintNum(h.length),b.write(h);var w;a?(kr.checkState(kh.isNaturalNumber(a)),w=new vu().writeUInt64LEBN(new Oh(a)).toBuffer()):w=this.inputs[r].getSatoshisBuffer();var T=oC.verify(this,e,t,r,b.toBuffer(),w,u);return T}return aC.verify(this,e,t,r,i,u)};ie.prototype.verify=function(){if(this.inputs.length===0)return"transaction txins empty";if(this.outputs.length===0)return"transaction txouts empty";for(var e=new Oh(0),t=0;t<this.outputs.length;t++){var r=this.outputs[t];if(r.invalidSatoshis())return"transaction txout "+t+" satoshis is invalid";if(r._satoshisBN.gt(new Oh(ie.MAX_MONEY,10)))return"transaction txout "+t+" greater than MAX_MONEY";if(e=e.add(r._satoshisBN),e.gt(new Oh(ie.MAX_MONEY)))return"transaction txout "+t+" total output greater than MAX_MONEY"}if(this.toBuffer().length>mC)return"transaction over the maximum block size";var i={};for(t=0;t<this.inputs.length;t++){var n=this.inputs[t],a=n.prevTxId+":"+n.outputIndex;if(i[a]!=null)return"transaction input "+t+" duplicate input";i[a]=!0}var u=this.isCoinbase();if(u){var h=this.inputs[0]._scriptBuffer;if(h.length<2||h.length>100)return"coinbase transaction script size invalid"}else for(t=0;t<this.inputs.length;t++)if(this.inputs[t].isNull())return"transaction input "+t+" has null input";return!0};ie.prototype.isCoinbase=function(){return this.inputs.length===1&&this.inputs[0].isNull()};ie.prototype.isRBF=function(){for(var e=0;e<this.inputs.length;e++){var t=this.inputs[e];if(t.sequenceNumber<Nr.MAXINT-1)return!0}return!1};ie.prototype.enableRBF=function(){for(var e=0;e<this.inputs.length;e++){var t=this.inputs[e];t.sequenceNumber>=Nr.MAXINT-1&&(t.sequenceNumber=Nr.DEFAULT_RBF_SEQNUMBER)}return this};ie.prototype.setVersion=function(e){return kr.checkArgument(kh.isNaturalNumber(e)&&e<=GS,"Wrong version number"),this.version=e,this};XS.exports=ie});var Uf=V((oj,Za)=>{Za.exports=Sh();Za.exports.Input=Th();Za.exports.Output=xs();Za.exports.UnspentOutput=$v();Za.exports.Signature=pu();Za.exports.Sighash=ra();Za.exports.SighashWitness=Mf()});var ZS=V((cj,YS)=>{"use strict";var bu=vt(),Ja=iv(),G=uh(),ct=Zr(),xu=ti(),qf=Pi(),Nh=jn(),ue=function e(t){if(!(this instanceof e))return new e(t);t?(this.initialize(),this.set(t)):this.initialize()};ue.SIGVERSION_BASE=0;ue.SIGVERSION_WITNESS_V0=1;ue.SIGVERSION_TAPROOT=2;ue.SIGVERSION_TAPSCRIPT=3;ue.prototype.verifyWitnessProgram=function(e,t,r,i,n){var a=new Ja,u=[];if(e===0)if(t.length===32){if(r.length===0)return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY",!1;var h=r[r.length-1];a=new Ja(h);var b=xu.sha256(h);if(b.toString("hex")!==t.toString("hex"))return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH",!1;u=r.slice(0,-1)}else if(t.length===20){if(r.length!==2)return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH",!1;a.add(G.OP_DUP),a.add(G.OP_HASH160),a.add(t),a.add(G.OP_EQUALVERIFY),a.add(G.OP_CHECKSIG),u=r}else return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH",!1;else return n&ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM?(this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM",!1):!0;if(this.initialize(),this.set({script:a,stack:u,sigversion:ue.SIGVERSION_WITNESS_V0,satoshis:i,flags:n}),!this.evaluate())return!1;if(this.stack.length!==1)return this.errstr="SCRIPT_ERR_EVAL_FALSE",!1;var w=this.stack[this.stack.length-1];return ue.castToBool(w)?!0:(this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_STACK",!1)};ue.prototype.verify=function(e,t,r,i,n,a,u){var h=Uf();bu.isUndefined(r)&&(r=new h),bu.isUndefined(i)&&(i=0),bu.isUndefined(n)&&(n=0),bu.isUndefined(a)&&(a=null),bu.isUndefined(u)&&(u=0),this.set({script:e,tx:r,nin:i,sigversion:ue.SIGVERSION_BASE,satoshis:0,flags:n});var b;if(n&ue.SCRIPT_VERIFY_SIGPUSHONLY&&!e.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(!this.evaluate())return!1;n&ue.SCRIPT_VERIFY_P2SH&&(b=this.stack.slice());var w=this.stack;if(this.initialize(),this.set({script:t,stack:w,tx:r,nin:i,flags:n}),!this.evaluate())return!1;if(this.stack.length===0)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_RESULT",!1;var T=this.stack[this.stack.length-1];if(!ue.castToBool(T))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_STACK",!1;var I=!1;if(n&ue.SCRIPT_VERIFY_WITNESS){var B={};if(t.isWitnessProgram(B)&&(I=!0,e.toBuffer().length!==0||!this.verifyWitnessProgram(B.version,B.program,a,u,this.flags)))return!1}if(n&ue.SCRIPT_VERIFY_P2SH&&t.isScriptHashOut()){if(!e.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(b.length===0)throw new Error("internal error - stack copy empty");var M=b[b.length-1],P=Ja.fromBuffer(M);if(b.pop(),this.initialize(),this.set({script:P,stack:b,tx:r,nin:i,flags:n}),!this.evaluate())return!1;if(b.length===0)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_P2SH_STACK",!1;if(!ue.castToBool(b[b.length-1]))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_P2SH_STACK",!1;if(n&ue.SCRIPT_VERIFY_WITNESS){var L={};if(P.isWitnessProgram(L)){I=!0;var X=new Ja;if(X.add(P.toBuffer()),e.toHex()!==X.toHex())return this.errstr="SCRIPT_ERR_WITNESS_MALLEATED_P2SH",!1;if(!this.verifyWitnessProgram(L.version,L.program,a,u,this.flags))return!1;w=[w[0]]}}}if(this.flags&ue.SCRIPT_VERIFY_CLEANSTACK){if(!(this.flags&ue.SCRIPT_VERIFY_P2SH))throw"flags & SCRIPT_VERIFY_P2SH";if(b.length!=1)return this.errstr="SCRIPT_ERR_CLEANSTACK",!1}return this.flags&ue.SCRIPT_VERIFY_WITNESS&&!I&&a.length>0?(this.errstr="SCRIPT_ERR_WITNESS_UNEXPECTED",!1):!0};YS.exports=ue;ue.prototype.initialize=function(e){this.stack=[],this.altstack=[],this.pc=0,this.satoshis=0,this.sigversion=ue.SIGVERSION_BASE,this.pbegincodehash=0,this.nOpCount=0,this.vfExec=[],this.errstr="",this.flags=0};ue.prototype.set=function(e){this.script=e.script||this.script,this.tx=e.tx||this.tx,this.nin=typeof e.nin<"u"?e.nin:this.nin,this.stack=e.stack||this.stack,this.altstack=e.altack||this.altstack,this.pc=typeof e.pc<"u"?e.pc:this.pc,this.pbegincodehash=typeof e.pbegincodehash<"u"?e.pbegincodehash:this.pbegincodehash,this.sigversion=typeof e.sigversion<"u"?e.sigversion:this.sigversion,this.satoshis=typeof e.satoshis<"u"?e.satoshis:this.satoshis,this.nOpCount=typeof e.nOpCount<"u"?e.nOpCount:this.nOpCount,this.vfExec=e.vfExec||this.vfExec,this.errstr=e.errstr||this.errstr,this.flags=typeof e.flags<"u"?e.flags:this.flags};ue.true=Buffer.from([1]);ue.false=Buffer.from([]);ue.MAX_SCRIPT_ELEMENT_SIZE=520;ue.LOCKTIME_THRESHOLD=5e8;ue.LOCKTIME_THRESHOLD_BN=new ct(ue.LOCKTIME_THRESHOLD);ue.SCRIPT_VERIFY_NONE=0;ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM=4096;ue.SCRIPT_VERIFY_P2SH=1;ue.SCRIPT_VERIFY_STRICTENC=2;ue.SCRIPT_VERIFY_DERSIG=4;ue.SCRIPT_VERIFY_LOW_S=8;ue.SCRIPT_VERIFY_NULLDUMMY=16;ue.SCRIPT_VERIFY_SIGPUSHONLY=32;ue.SCRIPT_VERIFY_MINIMALDATA=64;ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS=128;ue.SCRIPT_VERIFY_CLEANSTACK=256,ue.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY=512;ue.SCRIPT_VERIFY_WITNESS=1024;ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS=2048;ue.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY=1024;ue.SCRIPT_VERIFY_MINIMALIF=8192;ue.SCRIPT_VERIFY_NULLFAIL=16384;ue.SCRIPT_VERIFY_WITNESS_PUBKEYTYPE=32768;ue.SCRIPT_ENABLE_SIGHASH_FORKID=65536;ue.SCRIPT_ENABLE_REPLAY_PROTECTION=1<<17;ue.SCRIPT_ENABLE_MONOLITH_OPCODES=1<<18;ue.SEQUENCE_LOCKTIME_DISABLE_FLAG=1<<31;ue.SEQUENCE_LOCKTIME_TYPE_FLAG=1<<22;ue.SEQUENCE_LOCKTIME_MASK=65535;ue.castToBool=function(e){for(var t=0;t<e.length;t++)if(e[t]!==0)return!(t===e.length-1&&e[t]===128);return!1};ue.prototype.checkSignatureEncoding=function(e){var t;if(e.length==0)return!0;if(this.flags&(ue.SCRIPT_VERIFY_DERSIG|ue.SCRIPT_VERIFY_LOW_S|ue.SCRIPT_VERIFY_STRICTENC)&&!qf.isTxDER(e))return this.errstr="SCRIPT_ERR_SIG_DER_INVALID_FORMAT",!1;if(this.flags&ue.SCRIPT_VERIFY_LOW_S){if(t=qf.fromTxFormat(e),!t.hasLowS())return this.errstr="SCRIPT_ERR_SIG_DER_HIGH_S",!1}else if(this.flags&ue.SCRIPT_VERIFY_STRICTENC&&(t=qf.fromTxFormat(e),!t.hasDefinedHashtype()))return this.errstr="SCRIPT_ERR_SIG_HASHTYPE",!1;return!0};ue.prototype.checkPubkeyEncoding=function(e){return this.flags&ue.SCRIPT_VERIFY_STRICTENC&&!Nh.isValid(e)?(this.errstr="SCRIPT_ERR_PUBKEYTYPE",!1):this.flags&ue.SCRIPT_VERIFY_WITNESS_PUBKEYTYPE&&this.sigversion==ue.SIGVERSION_WITNESS_V0&&!Nh.fromBuffer(e).compressed?(this.errstr="SCRIPT_ERR_WITNESS_PUBKEYTYPE",!1):!0};ue.prototype.evaluate=function(){if(this.script.toBuffer().length>1e4)return this.errstr="SCRIPT_ERR_SCRIPT_SIZE",!1;try{for(;this.pc<this.script.chunks.length;){var e=this.step();if(!e)return!1}if(this.stack.length+this.altstack.length>1e3)return this.errstr="SCRIPT_ERR_STACK_SIZE",!1}catch(t){return this.errstr="SCRIPT_ERR_UNKNOWN_ERROR: "+t,!1}return this.vfExec.length>0?(this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1):!0};ue.prototype.checkLockTime=function(e){return!(!(this.tx.nLockTime<ue.LOCKTIME_THRESHOLD&&e.lt(ue.LOCKTIME_THRESHOLD_BN)||this.tx.nLockTime>=ue.LOCKTIME_THRESHOLD&&e.gte(ue.LOCKTIME_THRESHOLD_BN))||e.gt(new ct(this.tx.nLockTime))||!this.tx.inputs[this.nin].isFinal())};ue.prototype.checkSequence=function(e){var t=this.tx.inputs[this.nin].sequenceNumber;if(this.tx.version<2||t&SEQUENCE_LOCKTIME_DISABLE_FLAG)return!1;var r=ue.SEQUENCE_LOCKTIME_TYPE_FLAG|ue.SEQUENCE_LOCKTIME_MASK,i=new ct(t&r),n=e.and(r),a=new ct(ue.SEQUENCE_LOCKTIME_TYPE_FLAG);return!(!(i.lt(a)&&n.lt(a)||i.gte(a)&&n.gte(a))||n.gt(i))};ue.prototype.step=function(){var e=(this.flags&ue.SCRIPT_VERIFY_MINIMALDATA)!==0,t=this.vfExec.indexOf(!1)===-1,r,i,n,a,u,h,b,w,T,I,B,M,P,L,X,W,q,ee=this.script.chunks[this.pc];this.pc++;var fe=ee.opcodenum;if(bu.isUndefined(fe))return this.errstr="SCRIPT_ERR_UNDEFINED_OPCODE",!1;if(ee.buf&&ee.buf.length>ue.MAX_SCRIPT_ELEMENT_SIZE)return this.errstr="SCRIPT_ERR_PUSH_SIZE",!1;if(fe>G.OP_16&&++this.nOpCount>201)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;if(fe===G.OP_CAT||fe===G.OP_SUBSTR||fe===G.OP_LEFT||fe===G.OP_RIGHT||fe===G.OP_INVERT||fe===G.OP_AND||fe===G.OP_OR||fe===G.OP_XOR||fe===G.OP_2MUL||fe===G.OP_2DIV||fe===G.OP_MUL||fe===G.OP_DIV||fe===G.OP_MOD||fe===G.OP_LSHIFT||fe===G.OP_RSHIFT)return this.errstr="SCRIPT_ERR_DISABLED_OPCODE",!1;if(t&&0<=fe&&fe<=G.OP_PUSHDATA4){if(e&&!this.script.checkMinimalPush(this.pc-1))return this.errstr="SCRIPT_ERR_MINIMALDATA",!1;if(!ee.buf)this.stack.push(ue.false);else{if(ee.len!==ee.buf.length)throw new Error("Length of push value not equal to length of data");this.stack.push(ee.buf)}}else if(t||G.OP_IF<=fe&&fe<=G.OP_ENDIF)switch(fe){case G.OP_1NEGATE:case G.OP_1:case G.OP_2:case G.OP_3:case G.OP_4:case G.OP_5:case G.OP_6:case G.OP_7:case G.OP_8:case G.OP_9:case G.OP_10:case G.OP_11:case G.OP_12:case G.OP_13:case G.OP_14:case G.OP_15:case G.OP_16:u=fe-(G.OP_1-1),r=new ct(u).toScriptNumBuffer(),this.stack.push(r);break;case G.OP_NOP:break;case G.OP_NOP2:case G.OP_CHECKLOCKTIMEVERIFY:if(!(this.flags&ue.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY)){if(this.flags&ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var _e=ct.fromScriptNumBuffer(this.stack[this.stack.length-1],e,5);if(_e.lt(new ct(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(!this.checkLockTime(_e))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case G.OP_NOP3:case G.OP_CHECKSEQUENCEVERIFY:if(!(this.flags&ue.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY)){if(this.flags&ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var Te=ct.fromScriptNumBuffer(this.stack[this.stack.length-1],e,5);if(Te.lt(new ct(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(Te&ue.SEQUENCE_LOCKTIME_DISABLE_FLAG)break;if(!this.checkSequence(Te))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case G.OP_NOP1:case G.OP_NOP4:case G.OP_NOP5:case G.OP_NOP6:case G.OP_NOP7:case G.OP_NOP8:case G.OP_NOP9:case G.OP_NOP10:if(this.flags&ue.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break;case G.OP_IF:case G.OP_NOTIF:{if(W=!1,t){if(this.stack.length<1)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;if(r=this.stack[this.stack.length-1],this.flags&ue.SCRIPT_VERIFY_MINIMALIF){if(r=this.stack[this.stack.length-1],r.length>1)return this.errstr="SCRIPT_ERR_MINIMALIF",!1;if(r.length==1&&r[0]!=1)return this.errstr="SCRIPT_ERR_MINIMALIF",!1}W=ue.castToBool(r),fe===G.OP_NOTIF&&(W=!W),this.stack.pop()}this.vfExec.push(W)}break;case G.OP_ELSE:{if(this.vfExec.length===0)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec[this.vfExec.length-1]=!this.vfExec[this.vfExec.length-1]}break;case G.OP_ENDIF:{if(this.vfExec.length===0)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec.pop()}break;case G.OP_VERIFY:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(r=this.stack[this.stack.length-1],W=ue.castToBool(r),W)this.stack.pop();else return this.errstr="SCRIPT_ERR_VERIFY",!1}break;case G.OP_RETURN:return this.errstr="SCRIPT_ERR_OP_RETURN",!1;case G.OP_TOALTSTACK:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.altstack.push(this.stack.pop())}break;case G.OP_FROMALTSTACK:{if(this.altstack.length<1)return this.errstr="SCRIPT_ERR_INVALID_ALTSTACK_OPERATION",!1;this.stack.push(this.altstack.pop())}break;case G.OP_2DROP:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop(),this.stack.pop()}break;case G.OP_2DUP:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;i=this.stack[this.stack.length-2],n=this.stack[this.stack.length-1],this.stack.push(i),this.stack.push(n)}break;case G.OP_3DUP:{if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;i=this.stack[this.stack.length-3],n=this.stack[this.stack.length-2];var be=this.stack[this.stack.length-1];this.stack.push(i),this.stack.push(n),this.stack.push(be)}break;case G.OP_2OVER:{if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;i=this.stack[this.stack.length-4],n=this.stack[this.stack.length-3],this.stack.push(i),this.stack.push(n)}break;case G.OP_2ROT:{if(this.stack.length<6)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=this.stack.splice(this.stack.length-6,2),this.stack.push(a[0]),this.stack.push(a[1])}break;case G.OP_2SWAP:{if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;a=this.stack.splice(this.stack.length-4,2),this.stack.push(a[0]),this.stack.push(a[1])}break;case G.OP_IFDUP:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;r=this.stack[this.stack.length-1],W=ue.castToBool(r),W&&this.stack.push(r)}break;case G.OP_DEPTH:r=new ct(this.stack.length).toScriptNumBuffer(),this.stack.push(r);break;case G.OP_DROP:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop()}break;case G.OP_DUP:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-1])}break;case G.OP_NIP:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,1)}break;case G.OP_OVER:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-2])}break;case G.OP_PICK:case G.OP_ROLL:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(r=this.stack[this.stack.length-1],w=ct.fromScriptNumBuffer(r,e),u=w.toNumber(),this.stack.pop(),u<0||u>=this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;r=this.stack[this.stack.length-u-1],fe===G.OP_ROLL&&this.stack.splice(this.stack.length-u-1,1),this.stack.push(r)}break;case G.OP_ROT:{if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;h=this.stack[this.stack.length-3],b=this.stack[this.stack.length-2];var O=this.stack[this.stack.length-1];this.stack[this.stack.length-3]=b,this.stack[this.stack.length-2]=O,this.stack[this.stack.length-1]=h}break;case G.OP_SWAP:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;h=this.stack[this.stack.length-2],b=this.stack[this.stack.length-1],this.stack[this.stack.length-2]=b,this.stack[this.stack.length-1]=h}break;case G.OP_TUCK:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,0,this.stack[this.stack.length-1])}break;case G.OP_SIZE:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;w=new ct(this.stack[this.stack.length-1].length),this.stack.push(w.toScriptNumBuffer())}break;case G.OP_EQUAL:case G.OP_EQUALVERIFY:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;i=this.stack[this.stack.length-2],n=this.stack[this.stack.length-1];var E=i.toString("hex")===n.toString("hex");if(this.stack.pop(),this.stack.pop(),this.stack.push(E?ue.true:ue.false),fe===G.OP_EQUALVERIFY)if(E)this.stack.pop();else return this.errstr="SCRIPT_ERR_EQUALVERIFY",!1}break;case G.OP_1ADD:case G.OP_1SUB:case G.OP_NEGATE:case G.OP_ABS:case G.OP_NOT:case G.OP_0NOTEQUAL:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(r=this.stack[this.stack.length-1],w=ct.fromScriptNumBuffer(r,e),fe){case G.OP_1ADD:w=w.add(ct.One);break;case G.OP_1SUB:w=w.sub(ct.One);break;case G.OP_NEGATE:w=w.neg();break;case G.OP_ABS:w.cmp(ct.Zero)<0&&(w=w.neg());break;case G.OP_NOT:w=new ct((w.cmp(ct.Zero)===0)+0);break;case G.OP_0NOTEQUAL:w=new ct((w.cmp(ct.Zero)!==0)+0);break}this.stack.pop(),this.stack.push(w.toScriptNumBuffer())}break;case G.OP_ADD:case G.OP_SUB:case G.OP_BOOLAND:case G.OP_BOOLOR:case G.OP_NUMEQUAL:case G.OP_NUMEQUALVERIFY:case G.OP_NUMNOTEQUAL:case G.OP_LESSTHAN:case G.OP_GREATERTHAN:case G.OP_LESSTHANOREQUAL:case G.OP_GREATERTHANOREQUAL:case G.OP_MIN:case G.OP_MAX:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(T=ct.fromScriptNumBuffer(this.stack[this.stack.length-2],e),I=ct.fromScriptNumBuffer(this.stack[this.stack.length-1],e),w=new ct(0),fe){case G.OP_ADD:w=T.add(I);break;case G.OP_SUB:w=T.sub(I);break;case G.OP_BOOLAND:w=new ct((T.cmp(ct.Zero)!==0&&I.cmp(ct.Zero)!==0)+0);break;case G.OP_BOOLOR:w=new ct((T.cmp(ct.Zero)!==0||I.cmp(ct.Zero)!==0)+0);break;case G.OP_NUMEQUAL:w=new ct((T.cmp(I)===0)+0);break;case G.OP_NUMEQUALVERIFY:w=new ct((T.cmp(I)===0)+0);break;case G.OP_NUMNOTEQUAL:w=new ct((T.cmp(I)!==0)+0);break;case G.OP_LESSTHAN:w=new ct((T.cmp(I)<0)+0);break;case G.OP_GREATERTHAN:w=new ct((T.cmp(I)>0)+0);break;case G.OP_LESSTHANOREQUAL:w=new ct((T.cmp(I)<=0)+0);break;case G.OP_GREATERTHANOREQUAL:w=new ct((T.cmp(I)>=0)+0);break;case G.OP_MIN:w=T.cmp(I)<0?T:I;break;case G.OP_MAX:w=T.cmp(I)>0?T:I;break}if(this.stack.pop(),this.stack.pop(),this.stack.push(w.toScriptNumBuffer()),fe===G.OP_NUMEQUALVERIFY)if(ue.castToBool(this.stack[this.stack.length-1]))this.stack.pop();else return this.errstr="SCRIPT_ERR_NUMEQUALVERIFY",!1}break;case G.OP_WITHIN:{if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;T=ct.fromScriptNumBuffer(this.stack[this.stack.length-3],e),I=ct.fromScriptNumBuffer(this.stack[this.stack.length-2],e);var f=ct.fromScriptNumBuffer(this.stack[this.stack.length-1],e);W=I.cmp(T)<=0&&T.cmp(f)<0,this.stack.pop(),this.stack.pop(),this.stack.pop(),this.stack.push(W?ue.true:ue.false)}break;case G.OP_RIPEMD160:case G.OP_SHA1:case G.OP_SHA256:case G.OP_HASH160:case G.OP_HASH256:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;r=this.stack[this.stack.length-1];var c;fe===G.OP_RIPEMD160?c=xu.ripemd160(r):fe===G.OP_SHA1?c=xu.sha1(r):fe===G.OP_SHA256?c=xu.sha256(r):fe===G.OP_HASH160?c=xu.sha256ripemd160(r):fe===G.OP_HASH256&&(c=xu.sha256sha256(r)),this.stack.pop(),this.stack.push(c)}break;case G.OP_CODESEPARATOR:this.pbegincodehash=this.pc;break;case G.OP_CHECKSIG:case G.OP_CHECKSIGVERIFY:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(B=this.stack[this.stack.length-2],M=this.stack[this.stack.length-1],!this.checkSignatureEncoding(B)||!this.checkPubkeyEncoding(M))return!1;P=new Ja().set({chunks:this.script.chunks.slice(this.pbegincodehash)});var p=new Ja().add(B);P.findAndDelete(p);try{L=qf.fromTxFormat(B),X=Nh.fromBuffer(M,!1),q=this.tx.verifySignature(L,X,this.nin,P,this.sigversion,this.satoshis)}catch{q=!1}if(!q&&this.flags&ue.SCRIPT_VERIFY_NULLFAIL&&B.length)return this.errstr="SCRIPT_ERR_NULLFAIL",!1;if(this.stack.pop(),this.stack.pop(),this.stack.push(q?ue.true:ue.false),fe===G.OP_CHECKSIGVERIFY)if(q)this.stack.pop();else return this.errstr="SCRIPT_ERR_CHECKSIGVERIFY",!1}break;case G.OP_CHECKMULTISIG:case G.OP_CHECKMULTISIGVERIFY:{var v=1;if(this.stack.length<v)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var g=ct.fromScriptNumBuffer(this.stack[this.stack.length-v],e).toNumber();if(g<0||g>20)return this.errstr="SCRIPT_ERR_PUBKEY_COUNT",!1;if(this.nOpCount+=g,this.nOpCount>201)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;var x=++v;v+=g;var S=g+2;if(this.stack.length<v)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var _=ct.fromScriptNumBuffer(this.stack[this.stack.length-v],e).toNumber();if(_<0||_>g)return this.errstr="SCRIPT_ERR_SIG_COUNT",!1;var l=++v;if(v+=_,this.stack.length<v)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;P=new Ja().set({chunks:this.script.chunks.slice(this.pbegincodehash)});for(var m=0;m<_;m++)B=this.stack[this.stack.length-l-m],P.findAndDelete(new Ja().add(B));for(q=!0;q&&_>0;){if(B=this.stack[this.stack.length-l],M=this.stack[this.stack.length-x],!this.checkSignatureEncoding(B)||!this.checkPubkeyEncoding(M))return!1;var A;try{L=qf.fromTxFormat(B),X=Nh.fromBuffer(M,!1),A=this.tx.verifySignature(L,X,this.nin,P,this.sigversion,this.satoshis)}catch{A=!1}A&&(l++,_--),x++,g--,_>g&&(q=!1)}for(;v-- >1;){if(!q&&this.flags&ue.SCRIPT_VERIFY_NULLFAIL&&!S&&this.stack[this.stack.length-1].length)return this.errstr="SCRIPT_ERR_NULLFAIL",!1;S>0&&S--,this.stack.pop()}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(this.flags&ue.SCRIPT_VERIFY_NULLDUMMY&&this.stack[this.stack.length-1].length)return this.errstr="SCRIPT_ERR_SIG_NULLDUMMY",!1;if(this.stack.pop(),this.stack.push(q?ue.true:ue.false),fe===G.OP_CHECKMULTISIGVERIFY)if(q)this.stack.pop();else return this.errstr="SCRIPT_ERR_CHECKMULTISIGVERIFY",!1}break;default:return this.errstr="SCRIPT_ERR_BAD_OPCODE",!1}return!0}});var Mi=V((uj,Jv)=>{Jv.exports=iv();Jv.exports.Interpreter=ZS()});var zn=V((fj,e3)=>{"use strict";var Ph=vt(),aa=It(),gC=Yi(),JS=Xc(),Ff=tw(),Di=za(),Hf=ti(),QS=Lr(),Qv=jn();function ce(e,t,r,i){if(!(this instanceof ce))return new ce(e,t,r);if(Ph.isArray(e)&&Ph.isNumber(t))return ce.createMultisig(e,t,r,!1,i);if(e instanceof ce)return e;if(aa.checkArgument(e,"First argument is required, please include address data.","guide/address.html"),t&&!Di.get(t))throw new TypeError('Second argument must be "livenet" or "testnet".');if(r&&r!==ce.PayToPublicKeyHash&&r!==ce.PayToScriptHash&&r!==ce.PayToWitnessPublicKeyHash&&r!==ce.PayToWitnessScriptHash&&r!==ce.PayToTaproot)throw new TypeError('Third argument must be "pubkeyhash", "scripthash", "witnesspubkeyhash", "witnessscripthash", or "taproot".');var n=this._classifyArguments(e,t,r);return n.network=n.network||Di.get(t)||Di.defaultNetwork,n.type=n.type||r||ce.PayToPublicKeyHash,QS.defineImmutable(this,{hashBuffer:n.hashBuffer,network:n.network,type:n.type}),this}ce.prototype._classifyArguments=function(e,t,r){if((e instanceof Buffer||e instanceof Uint8Array)&&(e.length===20||e.length===32))return ce._transformHash(e,t,r);if((e instanceof Buffer||e instanceof Uint8Array)&&e.length>=21)return ce._transformBuffer(e,t,r);if(e instanceof Qv)return ce._transformPublicKey(e,t,r);if(e instanceof Qa)return ce._transformScript(e,t);if(typeof e=="string")return ce._transformString(e,t,r);if(Ph.isObject(e))return ce._transformObject(e);throw new TypeError("First argument is an unrecognized data format.")};ce.PayToPublicKeyHash="pubkeyhash";ce.PayToScriptHash="scripthash";ce.PayToWitnessPublicKeyHash="witnesspubkeyhash";ce.PayToWitnessScriptHash="witnessscripthash";ce.PayToTaproot="taproot";ce._transformHash=function(e,t,r){var i={};if(!(e instanceof Buffer)&&!(e instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(e.length!==20&&e.length!==32)throw new TypeError("Address hashbuffers must be either 20 or 32 bytes.");return i.hashBuffer=e,i.network=Di.get(t)||Di.defaultNetwork,i.type=r,i};ce._transformObject=function(e){return aa.checkArgument(e.hash||e.hashBuffer,"Must provide a `hash` or `hashBuffer` property"),aa.checkArgument(e.type,"Must provide a `type` property"),{hashBuffer:e.hash?Buffer.from(e.hash,"hex"):e.hashBuffer,network:Di.get(e.network)||Di.defaultNetwork,type:e.type}};ce._classifyFromVersion=function(e){var t={};if(e.length>21){var r=Ff.decode(e.toString("utf8"));if(r.version!==0&&r.version!==1)throw new TypeError("Only witness v0 and v1 addresses are supported.");if(r.version===0)if(r.data.length===20)t.type=ce.PayToWitnessPublicKeyHash;else if(r.data.length===32)t.type=ce.PayToWitnessScriptHash;else throw new TypeError("Witness data must be either 20 or 32 bytes.");else if(r.version===1)if(r.data.length===32)t.type=ce.PayToTaproot;else throw new TypeError("Witness data must be 32 bytes for v1");t.network=Di.get(r.prefix,"bech32prefix")}else{var i=Di.get(e[0],"pubkeyhash"),n=Di.get(e[0],"scripthash");i?(t.network=i,t.type=ce.PayToPublicKeyHash):n&&(t.network=n,t.type=ce.PayToScriptHash)}return t};ce._transformBuffer=function(e,t,r){var i={};if(!(e instanceof Buffer)&&!(e instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(e.length<21)throw new TypeError("Address buffer is incorrect length.");var n=Di.get(t),a=ce._classifyFromVersion(e);if(t&&!n)throw new TypeError("Unknown network");if(!a.network||n&&n.xpubkey!==a.network.xpubkey)throw new TypeError("Address has mismatched network type.");if(!a.type||r&&r!==a.type)throw new TypeError("Address has mismatched type.");return e.length>21?i.hashBuffer=Ff.decode(e.toString("utf8")).data:i.hashBuffer=e.slice(1),i.network=n||a.network,i.type=a.type,i};ce._transformPublicKey=function(e,t,r){var i={};if(!(e instanceof Qv))throw new TypeError("Address must be an instance of PublicKey.");if(r&&r!==ce.PayToScriptHash&&r!==ce.PayToWitnessPublicKeyHash&&r!==ce.PayToPublicKeyHash&&r!==ce.PayToTaproot)throw new TypeError("Type must be either pubkeyhash, witnesspubkeyhash, scripthash, or taproot to transform public key.");if(!e.compressed&&(r===ce.PayToScriptHash||r===ce.PayToWitnessPublicKeyHash))throw new TypeError("Witness addresses must use compressed public keys.");return r===ce.PayToScriptHash?i.hashBuffer=Hf.sha256ripemd160(Qa.buildWitnessV0Out(e).toBuffer()):r===ce.PayToTaproot?i.hashBuffer=Hf.sha256ripemd160(Qa.buildWitnessV1Out(e).toBuffer()):i.hashBuffer=Hf.sha256ripemd160(e.toBuffer()),i.type=r||ce.PayToPublicKeyHash,i};ce._transformScript=function(e,t){aa.checkArgument(e instanceof Qa,"script must be a Script instance");var r=e.getAddressInfo(t);if(!r)throw new gC.Script.CantDeriveAddress(e);return r};ce.createMultisig=function(e,t,r,i,n){if(r=r||e[0].network||Di.defaultNetwork,n&&n!==ce.PayToScriptHash&&n!==ce.PayToWitnessScriptHash)throw new TypeError("Type must be either scripthash or witnessscripthash to create multisig.");if(i||n===ce.PayToWitnessScriptHash){e=Ph.map(e,Qv);for(var a=0;a<e.length;a++)if(!e[a].compressed)throw new TypeError("Witness addresses must use compressed public keys.")}var u=Qa.buildMultisigOut(e,t);return i?ce.payingTo(Qa.buildWitnessMultisigOutFromScript(u),r):ce.payingTo(u,r,n)};ce._transformString=function(e,t,r){if(typeof e!="string")throw new TypeError("data parameter supplied is not a string.");if(e.length>100)throw new TypeError("address string is too long");if(t&&!Di.get(t))throw new TypeError("Unknown network");e=e.trim();try{var n=ce._transformBuffer(Buffer.from(e,"utf8"),t,r);return n}catch(a){if(r===ce.PayToWitnessPublicKeyHash||r===ce.PayToWitnessScriptHash||r===ce.PayToTaproot)throw a}var i=JS.decode(e),n=ce._transformBuffer(i,t,r);return n};ce.fromPublicKey=function(e,t,r){var i=ce._transformPublicKey(e,t,r);return t=t||Di.defaultNetwork,new ce(i.hashBuffer,t,i.type)};ce.fromPublicKeyHash=function(e,t){var r=ce._transformHash(e);return new ce(r.hashBuffer,t,ce.PayToPublicKeyHash)};ce.fromScriptHash=function(e,t,n){aa.checkArgument(e,"hash parameter is required");var i=ce._transformHash(e);if(n===ce.PayToWitnessScriptHash&&e.length!==32)throw new TypeError("Address hashbuffer must be exactly 32 bytes for v0 witness script hash.");var n=n||ce.PayToScriptHash;return new ce(i.hashBuffer,t,n)};ce.payingTo=function(e,t,n){aa.checkArgument(e,"script is required"),aa.checkArgument(e instanceof Qa,"script must be instance of Script");var i;n===ce.PayToWitnessScriptHash?i=Hf.sha256(e.toBuffer()):i=Hf.sha256ripemd160(e.toBuffer());var n=n||ce.PayToScriptHash;return ce.fromScriptHash(i,t,n)};ce.fromScript=function(e,t){aa.checkArgument(e instanceof Qa,"script must be a Script instance");var r=ce._transformScript(e,t);return new ce(r.hashBuffer,t,r.type)};ce.fromBuffer=function(e,t,r){var i=ce._transformBuffer(e,t,r);return new ce(i.hashBuffer,i.network,i.type)};ce.fromString=function(e,t,r){var i=ce._transformString(e,t,r);return new ce(i.hashBuffer,i.network,i.type)};ce.fromObject=function(t){aa.checkState(QS.isHexa(t.hash),'Unexpected hash property, "'+t.hash+'", expected to be hex.');var r=Buffer.from(t.hash,"hex");return new ce(r,t.network,t.type)};ce.getValidationError=function(e,t,r){var i;try{new ce(e,t,r)}catch(n){i=n}return i};ce.isValid=function(e,t,r){return!ce.getValidationError(e,t,r)};ce.prototype.isPayToPublicKeyHash=function(){return this.type===ce.PayToPublicKeyHash};ce.prototype.isPayToScriptHash=function(){return this.type===ce.PayToScriptHash};ce.prototype.isPayToWitnessPublicKeyHash=function(){return this.type===ce.PayToWitnessPublicKeyHash};ce.prototype.isPayToWitnessScriptHash=function(){return this.type===ce.PayToWitnessScriptHash};ce.prototype.isPayToTaproot=function(){return this.type===ce.PayToTaproot};ce.prototype.toBuffer=function(){if(this.isPayToWitnessPublicKeyHash()||this.isPayToWitnessScriptHash())return Buffer.from(this.toString(),"utf8");var e=Buffer.from([this.network[this.type]]);return Buffer.concat([e,this.hashBuffer])};ce.prototype.toObject=ce.prototype.toJSON=function(){return{hash:this.hashBuffer.toString("hex"),type:this.type,network:this.network.toString()}};ce.prototype.toString=function(){if(this.isPayToWitnessPublicKeyHash()||this.isPayToWitnessScriptHash()||this.isPayToTaproot()){let e=this.network.bech32prefix,t=0,r=Ff.encodings.BECH32;return this.isPayToTaproot()&&(t=1,r=Ff.encodings.BECH32M),Ff.encode(e,t,this.hashBuffer,r)}return JS.encode(this.toBuffer())};ce.prototype.inspect=function(){return"<Address: "+this.toString()+", type: "+this.type+", network: "+this.network+">"};e3.exports=ce;var Qa=Mi()});var zf=V((lj,t3)=>{"use strict";function Wo(){}Wo.getRandomBuffer=function(e){return process.browser?Wo.getRandomBufferBrowser(e):Wo.getRandomBufferNode(e)};Wo.getRandomBufferNode=function(e){var t=require("crypto");return t.randomBytes(e)};Wo.getRandomBufferBrowser=function(e){if(!window.crypto&&!window.msCrypto)throw new Error("window.crypto not available");if(window.crypto&&window.crypto.getRandomValues)var t=window.crypto;else if(window.msCrypto&&window.msCrypto.getRandomValues)var t=window.msCrypto;else throw new Error("window.crypto.getRandomValues not available");var r=new Uint8Array(e);t.getRandomValues(r);var i=Buffer.from(r);return i};Wo.getPseudoRandomBuffer=function(e){for(var t=4294967296,r=Buffer.alloc(e),i,n=0;n<=e;n++){var a=Math.floor(n/4),u=n-a*4;u===0?(i=Math.random()*t,r[n]=i&255):r[n]=(i=i>>>8)&255}return r};t3.exports=Wo});var gu=V((pj,a3)=>{"use strict";var Bh=vt(),bC=zn(),r3=Xc(),Ko=Zr(),i3=Lr(),oa=za(),n3=Mo(),xC=jn(),_C=zf(),s3=It();function ut(e,t){if(!(this instanceof ut))return new ut(e,t);if(e instanceof ut)return e;var r=this._classifyArguments(e,t);if(!r.bn||r.bn.cmp(new Ko(0))===0)throw new TypeError("Number can not be equal to zero, undefined, null or false");if(!r.bn.lt(n3.getN()))throw new TypeError("Number must be less than N");if(typeof r.network>"u")throw new TypeError('Must specify the network ("livenet" or "testnet")');return i3.defineImmutable(this,{bn:r.bn,compressed:r.compressed,network:r.network}),Object.defineProperty(this,"publicKey",{configurable:!1,enumerable:!0,get:this.toPublicKey.bind(this)}),this}ut.prototype._classifyArguments=function(e,t){var r={compressed:!0,network:t?oa.get(t):oa.defaultNetwork};if(Bh.isUndefined(e)||Bh.isNull(e))r.bn=ut._getRandomBN();else if(e instanceof Ko)r.bn=e;else if(e instanceof Buffer||e instanceof Uint8Array)r=ut._transformBuffer(e,t);else if(e.bn&&e.network)r=ut._transformObject(e);else if(!t&&oa.get(e))r.bn=ut._getRandomBN(),r.network=oa.get(e);else if(typeof e=="string")i3.isHexa(e)?r.bn=new Ko(Buffer.from(e,"hex")):r=ut._transformWIF(e,t);else throw new TypeError("First argument is an unrecognized data type.");return r};ut._getRandomBN=function(){var e,t;do{var r=_C.getRandomBuffer(32);t=Ko.fromBuffer(r),e=t.lt(n3.getN())}while(!e);return t};ut._transformBuffer=function(e,t){var r={};if(e.length===32)return ut._transformBNBuffer(e,t);if(r.network=oa.get(e[0],"privatekey"),!r.network)throw new Error("Invalid network");if(t&&r.network!==oa.get(t))throw new TypeError("Private key network mismatch");if(e.length===34&&e[33]===1)r.compressed=!0;else if(e.length===33)r.compressed=!1;else throw new Error("Length of buffer must be 33 (uncompressed) or 34 (compressed)");return r.bn=Ko.fromBuffer(e.slice(1,33)),r};ut._transformBNBuffer=function(e,t){var r={};return r.network=oa.get(t)||oa.defaultNetwork,r.bn=Ko.fromBuffer(e),r.compressed=!1,r};ut._transformWIF=function(e,t){return ut._transformBuffer(r3.decode(e),t)};ut.fromBuffer=function(e,t){return new ut(e,t)};ut._transformObject=function(e){var t=new Ko(e.bn,"hex"),r=oa.get(e.network);return{bn:t,network:r,compressed:e.compressed}};ut.fromString=ut.fromWIF=function(e){return s3.checkArgument(Bh.isString(e),"First argument is expected to be a string."),new ut(e)};ut.fromObject=function(e){return s3.checkArgument(Bh.isObject(e),"First argument is expected to be an object."),new ut(e)};ut.fromRandom=function(e){var t=ut._getRandomBN();return new ut(t,e)};ut.getValidationError=function(e,t){var r;try{new ut(e,t)}catch(i){r=i}return r};ut.isValid=function(e,t){return e?!ut.getValidationError(e,t):!1};ut.prototype.toString=function(){return this.toBuffer().toString("hex")};ut.prototype.toWIF=function(){var e=this.network,t=this.compressed,r;return t?r=Buffer.concat([Buffer.from([e.privatekey]),this.bn.toBuffer({size:32}),Buffer.from([1])]):r=Buffer.concat([Buffer.from([e.privatekey]),this.bn.toBuffer({size:32})]),r3.encode(r)};ut.prototype.toBigNumber=function(){return this.bn};ut.prototype.toBuffer=function(){return this.bn.toBuffer({size:32})};ut.prototype.toBufferNoPadding=function(){return this.bn.toBuffer()};ut.prototype.toPublicKey=function(){return this._pubkey||(this._pubkey=xC.fromPrivateKey(this)),this._pubkey};ut.prototype.toAddress=function(e,t){var r=this.toPublicKey();return bC.fromPublicKey(r,e||this.network,t)};ut.prototype.toObject=ut.prototype.toJSON=function(){return{bn:this.bn.toString("hex"),compressed:this.compressed,network:this.network.toString()}};ut.prototype.inspect=function(){var e=this.compressed?"":", uncompressed";return"<PrivateKey: "+this.toString()+", network: "+this.network+e+">"};a3.exports=ut});var jn=V((hj,c3)=>{"use strict";var _u=Zr(),yu=Mo(),yC=ti(),wC=Lr(),o3=za(),eg=vt(),Go=It();function Pe(e,t){if(!(this instanceof Pe))return new Pe(e,t);if(Go.checkArgument(e,"First argument is required, please include public key data."),e instanceof Pe)return e;t=t||{};var r=this._classifyArgs(e,t);return r.point.validate(),wC.defineImmutable(this,{point:r.point,compressed:r.compressed,network:r.network||o3.defaultNetwork}),this}Pe.prototype._classifyArgs=function(e,t){var r={compressed:eg.isUndefined(t.compressed)||t.compressed};if(e instanceof yu)r.point=e;else if(e.x&&e.y)r=Pe._transformObject(e);else if(typeof e=="string")r=Pe._transformDER(Buffer.from(e,"hex"));else if(Pe._isBuffer(e))r=Pe._transformDER(e);else if(Pe._isPrivateKey(e))r=Pe._transformPrivateKey(e);else throw new TypeError("First argument is an unrecognized data format.");return r.network||(r.network=eg.isUndefined(t.network)?void 0:o3.get(t.network)),r};Pe._isPrivateKey=function(e){var t=gu();return e instanceof t};Pe._isBuffer=function(e){return e instanceof Buffer||e instanceof Uint8Array};Pe._transformPrivateKey=function(e){Go.checkArgument(Pe._isPrivateKey(e),"Must be an instance of PrivateKey");var t={};return t.point=yu.getG().mul(e.bn),t.compressed=e.compressed,t.network=e.network,t};Pe._transformDER=function(e,t){Go.checkArgument(Pe._isBuffer(e),"Must be a hex buffer of DER encoded public key");var r={};t=eg.isUndefined(t)?!0:t;var i,n,a,u;if(e[0]===4||!t&&(e[0]===6||e[0]===7)){if(a=e.slice(1,33),u=e.slice(33,65),a.length!==32||u.length!==32||e.length!==65)throw new TypeError("Length of x and y must be 32 bytes");i=new _u(a),n=new _u(u),r.point=new yu(i,n),r.compressed=!1}else if(e[0]===3)a=e.slice(1),i=new _u(a),r=Pe._transformX(!0,i),r.compressed=!0;else if(e[0]===2)a=e.slice(1),i=new _u(a),r=Pe._transformX(!1,i),r.compressed=!0;else throw new TypeError("Invalid DER format public key");return r};Pe._transformX=function(e,t){Go.checkArgument(typeof e=="boolean","Must specify whether y is odd or not (true or false)");var r={};return r.point=yu.fromX(e,t),r};Pe._transformObject=function(e){var t=new _u(e.x,"hex"),r=new _u(e.y,"hex"),i=new yu(t,r);return new Pe(i,{compressed:e.compressed})};Pe.fromPrivateKey=function(e){Go.checkArgument(Pe._isPrivateKey(e),"Must be an instance of PrivateKey");var t=Pe._transformPrivateKey(e);return new Pe(t.point,{compressed:t.compressed,network:t.network})};Pe.fromDER=Pe.fromBuffer=function(e,t){Go.checkArgument(Pe._isBuffer(e),"Must be a hex buffer of DER encoded public key");var r=Pe._transformDER(e,t);return new Pe(r.point,{compressed:r.compressed})};Pe.fromPoint=function(e,t){return Go.checkArgument(e instanceof yu,"First argument must be an instance of Point."),new Pe(e,{compressed:t})};Pe.fromString=function(e,t){var r=Buffer.from(e,t||"hex"),i=Pe._transformDER(r);return new Pe(i.point,{compressed:i.compressed})};Pe.fromX=function(e,t){var r=Pe._transformX(e,t);return new Pe(r.point,{compressed:r.compressed})};Pe.getValidationError=function(e){var t;try{new Pe(e)}catch(r){t=r}return t};Pe.isValid=function(e){return!Pe.getValidationError(e)};Pe.prototype.toObject=Pe.prototype.toJSON=function(){return{x:this.point.getX().toString("hex",2),y:this.point.getY().toString("hex",2),compressed:this.compressed}};Pe.prototype.toBuffer=Pe.prototype.toDER=function(){var e=this.point.getX(),t=this.point.getY(),r=e.toBuffer({size:32}),i=t.toBuffer({size:32}),n;if(this.compressed){var a=i[i.length-1]%2;return a?n=Buffer.from([3]):n=Buffer.from([2]),Buffer.concat([n,r])}else return n=Buffer.from([4]),Buffer.concat([n,r,i])};Pe.prototype._getID=function(){return yC.sha256ripemd160(this.toBuffer())};Pe.prototype.toAddress=function(e,t){var r=zn();return r.fromPublicKey(this,e||this.network,t)};Pe.prototype.toString=function(){return this.toDER().toString("hex")};Pe.prototype.inspect=function(){return"<PublicKey: "+this.toString()+(this.compressed?"":", uncompressed")+">"};c3.exports=Pe});var Cf=V((dj,u3)=>{"use strict";var Ji=Zr(),En=Mo(),SC=Pi(),EC=jn(),TC=zf(),eo=ti(),rg=hr(),IC=vt(),tg=It(),Pr=function e(t){if(!(this instanceof e))return new e(t);t&&this.set(t)};Pr.prototype.set=function(e){return this.hashbuf=e.hashbuf||this.hashbuf,this.endian=e.endian||this.endian,this.privkey=e.privkey||this.privkey,this.pubkey=e.pubkey||(this.privkey?this.privkey.publicKey:this.pubkey),this.sig=e.sig||this.sig,this.k=e.k||this.k,this.verified=e.verified||this.verified,this};Pr.prototype.privkey2pubkey=function(){this.pubkey=this.privkey.toPublicKey()};Pr.prototype.calci=function(){for(var e=0;e<4;e++){this.sig.i=e;var t;try{t=this.toPublicKey()}catch(r){console.error(r);continue}if(t.point.eq(this.pubkey.point))return this.sig.compressed=this.pubkey.compressed,this}throw this.sig.i=void 0,new Error("Unable to find valid recovery factor")};Pr.fromString=function(e){var t=JSON.parse(e);return new Pr(t)};Pr.prototype.randomK=function(){var e=En.getN(),t;do t=Ji.fromBuffer(TC.getRandomBuffer(32));while(!(t.lt(e)&&t.gt(Ji.Zero)));return this.k=t,this};Pr.prototype.deterministicK=function(e){IC.isUndefined(e)&&(e=0);var t=Buffer.alloc(32);t.fill(1);var r=Buffer.alloc(32);r.fill(0);var i=this.privkey.bn.toBuffer({size:32}),n=this.endian==="little"?rg.reverse(this.hashbuf):this.hashbuf;r=eo.sha256hmac(Buffer.concat([t,Buffer.from([0]),i,n]),r),t=eo.sha256hmac(t,r),r=eo.sha256hmac(Buffer.concat([t,Buffer.from([1]),i,n]),r),t=eo.sha256hmac(t,r),t=eo.sha256hmac(t,r);for(var a=Ji.fromBuffer(t),u=En.getN(),h=0;h<e||!(a.lt(u)&&a.gt(Ji.Zero));h++)r=eo.sha256hmac(Buffer.concat([t,Buffer.from([0])]),r),t=eo.sha256hmac(t,r),t=eo.sha256hmac(t,r),a=Ji.fromBuffer(t);return this.k=a,this};Pr.prototype.toPublicKey=function(){var e=this.sig.i;tg.checkArgument(e===0||e===1||e===2||e===3,new Error("i must be equal to 0, 1, 2, or 3"));var t=Ji.fromBuffer(this.hashbuf),r=this.sig.r,i=this.sig.s,n=e&1,a=e>>1,u=En.getN(),h=En.getG(),b=a?r.add(u):r,w=En.fromX(n,b),T=w.mul(u);if(!T.isInfinity())throw new Error("nR is not a valid curve point");var I=t.neg().umod(u),B=r.invm(u),M=w.mul(i).add(h.mul(I)).mul(B),P=EC.fromPoint(M,this.sig.compressed);return P};Pr.prototype.sigError=function(){if(!rg.isBuffer(this.hashbuf)||this.hashbuf.length!==32)return"hashbuf must be a 32 byte buffer";var e=this.sig.r,t=this.sig.s;if(!(e.gt(Ji.Zero)&&e.lt(En.getN()))||!(t.gt(Ji.Zero)&&t.lt(En.getN())))return"r and s not in range";var r=Ji.fromBuffer(this.hashbuf,this.endian?{endian:this.endian}:void 0),i=En.getN(),n=t.invm(i),a=n.mul(r).umod(i),u=n.mul(e).umod(i),h=En.getG().mulAdd(a,this.pubkey.point,u);return h.isInfinity()?"p is infinity":h.getX().umod(i).cmp(e)!==0?"Invalid signature":!1};Pr.toLowS=function(e){return e.gt(Ji.fromBuffer(Buffer.from("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))&&(e=En.getN().sub(e)),e};Pr.prototype._findSignature=function(e,t){var r=En.getN(),i=En.getG(),n=0,a,u,h,b;do(!this.k||n>0)&&this.deterministicK(n),n++,a=this.k,u=i.mul(a),h=u.x.umod(r),b=a.invm(r).mul(t.add(e.mul(h))).umod(r);while(h.cmp(Ji.Zero)<=0||b.cmp(Ji.Zero)<=0);return b=Pr.toLowS(b),{s:b,r:h}};Pr.prototype.sign=function(){var e=this.hashbuf,t=this.privkey,r=t.bn;tg.checkState(e&&t&&r,new Error("invalid parameters")),tg.checkState(rg.isBuffer(e)&&e.length===32,new Error("hashbuf must be a 32 byte buffer"));var i=Ji.fromBuffer(e,this.endian?{endian:this.endian}:void 0),n=this._findSignature(r,i);return n.compressed=this.pubkey.compressed,this.sig=new SC(n),this};Pr.prototype.signRandomK=function(){return this.randomK(),this.sign()};Pr.prototype.toString=function(){var e={};return this.hashbuf&&(e.hashbuf=this.hashbuf.toString("hex")),this.privkey&&(e.privkey=this.privkey.toString()),this.pubkey&&(e.pubkey=this.pubkey.toString()),this.sig&&(e.sig=this.sig.toString()),this.k&&(e.k=this.k.toString()),JSON.stringify(e)};Pr.prototype.verify=function(){return this.sigError()?this.verified=!1:this.verified=!0,this};Pr.sign=function(e,t,r){return Pr().set({hashbuf:e,endian:r,privkey:t}).sign().sig};Pr.verify=function(e,t,r,i){return Pr().set({hashbuf:e,endian:i,sig:t,pubkey:r}).verify().verified};u3.exports=Pr});var h3=V((mj,p3)=>{"use strict";var f3=yi(),l3=bs(),RC=Zr(),Kn=function e(t){if(!(this instanceof e))return new e(t);if(Buffer.isBuffer(t))this.buf=t;else if(typeof t=="number"){var r=t;this.fromNumber(r)}else if(t instanceof RC){var i=t;this.fromBN(i)}else if(t){var n=t;this.set(n)}};Kn.prototype.set=function(e){return this.buf=e.buf||this.buf,this};Kn.prototype.fromString=function(e){return this.set({buf:Buffer.from(e,"hex")}),this};Kn.prototype.toString=function(){return this.buf.toString("hex")};Kn.prototype.fromBuffer=function(e){return this.buf=e,this};Kn.prototype.fromBufferReader=function(e){return this.buf=e.readVarintBuf(),this};Kn.prototype.fromBN=function(e){return this.buf=f3().writeVarintBN(e).concat(),this};Kn.prototype.fromNumber=function(e){return this.buf=f3().writeVarintNum(e).concat(),this};Kn.prototype.toBuffer=function(){return this.buf};Kn.prototype.toBN=function(){return l3(this.buf).readVarintBN()};Kn.prototype.toNumber=function(){return l3(this.buf).readVarintNum()};p3.exports=Kn});var Vf=V((gj,v3)=>{"use strict";var Mh=vt(),jf=Zr(),wu=hr(),Ch=bs(),AC=yi(),OC=ti(),vj=Lr(),d3=It(),kC=486604799,gt=function e(t){if(!(this instanceof e))return new e(t);var r=e._from(t);return this.version=r.version,this.prevHash=r.prevHash,this.merkleRoot=r.merkleRoot,this.time=r.time,this.timestamp=r.time,this.bits=r.bits,this.nonce=r.nonce,r.hash&&d3.checkState(this.hash===r.hash,"Argument object hash property does not match block hash."),this};gt._from=function(t){var r={};if(wu.isBuffer(t))r=gt._fromBufferReader(Ch(t));else if(Mh.isObject(t))r=gt._fromObject(t);else throw new TypeError("Unrecognized argument for BlockHeader");return r};gt._fromObject=function(t){d3.checkArgument(t,"data is required");var r=t.prevHash,i=t.merkleRoot;Mh.isString(t.prevHash)&&(r=wu.reverse(Buffer.from(t.prevHash,"hex"))),Mh.isString(t.merkleRoot)&&(i=wu.reverse(Buffer.from(t.merkleRoot,"hex")));var n={hash:t.hash,version:t.version,prevHash:r,merkleRoot:i,time:t.time,timestamp:t.time,bits:t.bits,nonce:t.nonce};return n};gt.fromObject=function(t){var r=gt._fromObject(t);return new gt(r)};gt.fromRawBlock=function(t){wu.isBuffer(t)||(t=Buffer.from(t,"binary"));var r=Ch(t);r.pos=gt.Constants.START_OF_HEADER;var i=gt._fromBufferReader(r);return new gt(i)};gt.fromBuffer=function(t){var r=gt._fromBufferReader(Ch(t));return new gt(r)};gt.fromString=function(t){var r=Buffer.from(t,"hex");return gt.fromBuffer(r)};gt._fromBufferReader=function(t){var r={};return r.version=t.readInt32LE(),r.prevHash=t.read(32),r.merkleRoot=t.read(32),r.time=t.readUInt32LE(),r.bits=t.readUInt32LE(),r.nonce=t.readUInt32LE(),r};gt.fromBufferReader=function(t){var r=gt._fromBufferReader(t);return new gt(r)};gt.prototype.toObject=gt.prototype.toJSON=function(){return{hash:this.hash,version:this.version,prevHash:wu.reverse(this.prevHash).toString("hex"),merkleRoot:wu.reverse(this.merkleRoot).toString("hex"),time:this.time,bits:this.bits,nonce:this.nonce}};gt.prototype.toBuffer=function(){return this.toBufferWriter().concat()};gt.prototype.toString=function(){return this.toBuffer().toString("hex")};gt.prototype.toBufferWriter=function(t){return t||(t=new AC),t.writeInt32LE(this.version),t.write(this.prevHash),t.write(this.merkleRoot),t.writeUInt32LE(this.time),t.writeUInt32LE(this.bits),t.writeUInt32LE(this.nonce),t};gt.prototype.getTargetDifficulty=function(t){t=t||this.bits;for(var r=new jf(t&16777215),i=8*((t>>>24)-3);i-- >0;)r=r.mul(new jf(2));return r};gt.prototype.getDifficulty=function(){var t=this.getTargetDifficulty(kC).mul(new jf(Math.pow(10,8))),r=this.getTargetDifficulty(),i=t.div(r).toString(10),n=i.length-8;return i=i.slice(0,n)+"."+i.slice(n),parseFloat(i)};gt.prototype._getHash=function(){var t=this.toBuffer();return OC.sha256sha256(t)};var m3={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=Ch(this._getHash()).readReverse().toString("hex")),this._id},set:Mh.noop};Object.defineProperty(gt.prototype,"id",m3);Object.defineProperty(gt.prototype,"hash",m3);gt.prototype.validTimestamp=function(){var t=Math.round(new Date().getTime()/1e3);return!(this.time>t+gt.Constants.MAX_TIME_OFFSET)};gt.prototype.validProofOfWork=function(){var t=new jf(this.id,"hex"),r=this.getTargetDifficulty();return!(t.cmp(r)>0)};gt.prototype.inspect=function(){return"<BlockHeader "+this.id+">"};gt.Constants={START_OF_HEADER:8,MAX_TIME_OFFSET:2*60*60,LARGEST_HASH:new jf("10000000000000000000000000000000000000000000000000000000000000000","hex")};v3.exports=gt});var S3=V((bj,w3)=>{"use strict";var ng=vt(),b3=Vf(),g3=Zr(),x3=hr(),sg=bs(),NC=yi(),PC=ti(),ig=Uf(),_3=It();function pt(e){return this instanceof pt?(ng.extend(this,pt._from(e)),this):new pt(e)}pt.MAX_BLOCK_SIZE=1e6;pt._from=function(t){var r={};if(x3.isBuffer(t))r=pt._fromBufferReader(sg(t));else if(ng.isObject(t))r=pt._fromObject(t);else throw new TypeError("Unrecognized argument for Block");return r};pt._fromObject=function(t){var r=[];t.transactions.forEach(function(n){n instanceof ig?r.push(n):r.push(ig().fromObject(n))});var i={header:b3.fromObject(t.header),transactions:r};return i};pt.fromObject=function(t){var r=pt._fromObject(t);return new pt(r)};pt._fromBufferReader=function(t){var r={};_3.checkState(!t.finished(),"No block data received"),r.header=b3.fromBufferReader(t);var i=t.readVarintNum();r.transactions=[];for(var n=0;n<i;n++)r.transactions.push(ig().fromBufferReader(t));return r};pt.fromBufferReader=function(t){_3.checkArgument(t,"br is required");var r=pt._fromBufferReader(t);return new pt(r)};pt.fromBuffer=function(t){return pt.fromBufferReader(new sg(t))};pt.fromString=function(t){var r=Buffer.from(t,"hex");return pt.fromBuffer(r)};pt.fromRawBlock=function(t){x3.isBuffer(t)||(t=Buffer.from(t,"binary"));var r=sg(t);r.pos=pt.Values.START_OF_BLOCK;var i=pt._fromBufferReader(r);return new pt(i)};pt.prototype.toObject=pt.prototype.toJSON=function(){var t=[];return this.transactions.forEach(function(r){t.push(r.toObject())}),{header:this.header.toObject(),transactions:t}};pt.prototype.toBuffer=function(){return this.toBufferWriter().concat()};pt.prototype.toString=function(){return this.toBuffer().toString("hex")};pt.prototype.toBufferWriter=function(t){t||(t=new NC),t.write(this.header.toBuffer()),t.writeVarintNum(this.transactions.length);for(var r=0;r<this.transactions.length;r++)this.transactions[r].toBufferWriter(t);return t};pt.prototype.getTransactionHashes=function(){var t=[];if(this.transactions.length===0)return[pt.Values.NULL_HASH];for(var r=0;r<this.transactions.length;r++)t.push(this.transactions[r]._getHash());return t};pt.prototype.getMerkleTree=function(){for(var t=this.getTransactionHashes(),r=0,i=this.transactions.length;i>1;i=Math.floor((i+1)/2)){for(var n=0;n<i;n+=2){var a=Math.min(n+1,i-1),u=Buffer.concat([t[r+n],t[r+a]]);t.push(PC.sha256sha256(u))}r+=i}return t};pt.prototype.getMerkleRoot=function(){var t=this.getMerkleTree();return t[t.length-1]};pt.prototype.validMerkleRoot=function(){var t=new g3(this.header.merkleRoot.toString("hex"),"hex"),r=new g3(this.getMerkleRoot().toString("hex"),"hex");return t.cmp(r)===0};pt.prototype._getHash=function(){return this.header._getHash()};var y3={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=this.header.id),this._id},set:ng.noop};Object.defineProperty(pt.prototype,"id",y3);Object.defineProperty(pt.prototype,"hash",y3);pt.prototype.inspect=function(){return"<Block "+this.id+">"};pt.Values={START_OF_BLOCK:8,NULL_HASH:Buffer.from("0000000000000000000000000000000000000000000000000000000000000000","hex")};w3.exports=pt});var ug=V((_j,I3)=>{"use strict";var $o=vt(),og=Vf(),cg=hr(),T3=bs(),BC=yi(),MC=ti(),xj=Lr(),E3=Uf(),ag=Yi(),Xo=It();function Sr(e){if(!(this instanceof Sr))return new Sr(e);var t={};if(cg.isBuffer(e))t=Sr._fromBufferReader(T3(e));else if($o.isObject(e)){var r;e.header instanceof og?r=e.header:r=og.fromObject(e.header),t={header:r,numTransactions:e.numTransactions,hashes:e.hashes,flags:e.flags}}else throw new TypeError("Unrecognized argument for MerkleBlock");return $o.extend(this,t),this._flagBitsUsed=0,this._hashesUsed=0,this}Sr.fromBuffer=function(t){return Sr.fromBufferReader(T3(t))};Sr.fromBufferReader=function(t){return new Sr(Sr._fromBufferReader(t))};Sr.prototype.toBuffer=function(){return this.toBufferWriter().concat()};Sr.prototype.toBufferWriter=function(t){t||(t=new BC),t.write(this.header.toBuffer()),t.writeUInt32LE(this.numTransactions),t.writeVarintNum(this.hashes.length);for(var r=0;r<this.hashes.length;r++)t.write(Buffer.from(this.hashes[r],"hex"));for(t.writeVarintNum(this.flags.length),r=0;r<this.flags.length;r++)t.writeUInt8(this.flags[r]);return t};Sr.prototype.toObject=Sr.prototype.toJSON=function(){return{header:this.header.toObject(),numTransactions:this.numTransactions,hashes:this.hashes,flags:this.flags}};Sr.prototype.validMerkleTree=function(){if(Xo.checkState($o.isArray(this.flags),"MerkleBlock flags is not an array"),Xo.checkState($o.isArray(this.hashes),"MerkleBlock hashes is not an array"),this.hashes.length>this.numTransactions||this.flags.length*8<this.hashes.length)return!1;var t=this._calcTreeHeight(),r={hashesUsed:0,flagBitsUsed:0},i=this._traverseMerkleTree(t,0,r);return r.hashesUsed!==this.hashes.length?!1:cg.equals(i,this.header.merkleRoot)};Sr.prototype.filterdTxsHash=function(){if(Xo.checkState($o.isArray(this.flags),"MerkleBlock flags is not an array"),Xo.checkState($o.isArray(this.hashes),"MerkleBlock hashes is not an array"),this.hashes.length>this.numTransactions)throw new ag.MerkleBlock.InvalidMerkleTree;if(this.flags.length*8<this.hashes.length)throw new ag.MerkleBlock.InvalidMerkleTree;if(this.hashes.length===1)return[];var t=this._calcTreeHeight(),r={hashesUsed:0,flagBitsUsed:0},i=this._traverseMerkleTree(t,0,r,!0);if(r.hashesUsed!==this.hashes.length)throw new ag.MerkleBlock.InvalidMerkleTree;return i};Sr.prototype._traverseMerkleTree=function(t,r,i,a){i=i||{},i.txs=i.txs||[],i.flagBitsUsed=i.flagBitsUsed||0,i.hashesUsed=i.hashesUsed||0;var a=a||!1;if(i.flagBitsUsed>this.flags.length*8)return null;var u=this.flags[i.flagBitsUsed>>3]>>>(i.flagBitsUsed++&7)&1;if(t===0||!u){if(i.hashesUsed>=this.hashes.length)return null;var h=this.hashes[i.hashesUsed++];return t===0&&u&&i.txs.push(h),Buffer.from(h,"hex")}else{var b=this._traverseMerkleTree(t-1,r*2,i),w=b;return r*2+1<this._calcTreeWidth(t-1)&&(w=this._traverseMerkleTree(t-1,r*2+1,i)),a?i.txs:MC.sha256sha256(new Buffer.concat([b,w]))}};Sr.prototype._calcTreeWidth=function(t){return this.numTransactions+(1<<t)-1>>t};Sr.prototype._calcTreeHeight=function(){for(var t=0;this._calcTreeWidth(t)>1;)t++;return t};Sr.prototype.hasTransaction=function(t){Xo.checkArgument(!$o.isUndefined(t),"tx cannot be undefined"),Xo.checkArgument(t instanceof E3||typeof t=="string",'Invalid tx given, tx must be a "string" or "Transaction"');var r=t;t instanceof E3&&(r=cg.reverse(Buffer.from(t.id,"hex")).toString("hex"));var i=[],n=this._calcTreeHeight();return this._traverseMerkleTree(n,0,{txs:i}),i.indexOf(r)!==-1};Sr._fromBufferReader=function(t){Xo.checkState(!t.finished(),"No merkleblock data received");var r={};r.header=og.fromBufferReader(t),r.numTransactions=t.readUInt32LE();var i=t.readVarintNum();r.hashes=[];for(var n=0;n<i;n++)r.hashes.push(t.read(32).toString("hex"));var a=t.readVarintNum();for(r.flags=[],n=0;n<a;n++)r.flags.push(t.readUInt8());return r};Sr.fromObject=function(t){return new Sr(t)};I3.exports=Sr});var R3=V((yj,Lh)=>{Lh.exports=S3();Lh.exports.BlockHeader=Vf();Lh.exports.MerkleBlock=ug()});var lg=V((wj,M3)=>{"use strict";var Ur=vt(),O3=It(),k3=Zr(),CC=_f(),Dh=Xc(),N3=ti(),Uh=pg(),Yo=za(),fg=Mo(),P3=jn(),B3=Yi(),Wf=B3,Gn=B3.HDPublicKey,qh=require("assert"),A3=Lr(),Mt=hr();function ne(e){if(e instanceof ne)return e;if(!(this instanceof ne))return new ne(e);if(e)if(Ur.isString(e)||Mt.isBuffer(e)){var t=ne.getSerializedError(e);if(t){if(Mt.isBuffer(e)&&!ne.getSerializedError(e.toString()))return this._buildFromSerialized(e.toString());if(t instanceof Gn.ArgumentIsPrivateExtended)return new Uh(e).hdPublicKey;throw t}else return this._buildFromSerialized(e)}else{if(Ur.isObject(e))return e instanceof Uh?this._buildFromPrivate(e):this._buildFromObject(e);throw new Gn.UnrecognizedArgument(e)}else throw new Gn.MustSupplyArgument}ne.isValidPath=function(e){if(Ur.isString(e)){var t=Uh._getDerivationIndexes(e);return t!==null&&Ur.every(t,ne.isValidPath)}return Ur.isNumber(e)?e>=0&&e<ne.Hardened:!1};ne.prototype.derive=function(e,t){return this.deriveChild(e,t)};ne.prototype.deriveChild=function(e,t){if(Ur.isNumber(e))return this._deriveWithNumber(e,t);if(Ur.isString(e))return this._deriveFromString(e);throw new Gn.InvalidDerivationArgument(e)};ne.prototype._deriveWithNumber=function(e,t){if(e>=ne.Hardened||t)throw new Gn.InvalidIndexCantDeriveHardened;if(e<0)throw new Gn.InvalidPath(e);var r=Mt.integerAsBuffer(e),i=Mt.concat([this.publicKey.toBuffer(),r]),n=N3.sha512hmac(i,this._buffers.chainCode),a=k3.fromBuffer(n.slice(0,32),{size:32}),u=n.slice(32,64),h;try{h=P3.fromPoint(fg.getG().mul(a).add(this.publicKey.point))}catch{return this._deriveWithNumber(e+1)}var b=new ne({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:u,publicKey:h});return b};ne.prototype._deriveFromString=function(e){if(Ur.includes(e,"'"))throw new Gn.InvalidIndexCantDeriveHardened;if(!ne.isValidPath(e))throw new Gn.InvalidPath(e);var t=Uh._getDerivationIndexes(e),r=t.reduce(function(i,n){return i._deriveWithNumber(n)},this);return r};ne.isValidSerialized=function(e,t){return Ur.isNull(ne.getSerializedError(e,t))};ne.getSerializedError=function(e,t){if(!(Ur.isString(e)||Mt.isBuffer(e)))return new Gn.UnrecognizedArgument("expected buffer or string");if(!CC.validCharacters(e))return new Wf.InvalidB58Char("(unknown)",e);try{e=Dh.decode(e)}catch{return new Wf.InvalidB58Checksum(e)}if(e.length!==ne.DataSize)return new Gn.InvalidLength(e);if(!Ur.isUndefined(t)){var r=ne._validateNetwork(e,t);if(r)return r}var i=Mt.integerFromBuffer(e.slice(0,4));return i===Yo.livenet.xprivkey||i===Yo.testnet.xprivkey?new Gn.ArgumentIsPrivateExtended:null};ne._validateNetwork=function(e,t){var r=Yo.get(t);if(!r)return new Wf.InvalidNetworkArgument(t);var i=e.slice(ne.VersionStart,ne.VersionEnd);return Mt.integerFromBuffer(i)!==r.xpubkey?new Wf.InvalidNetwork(i):null};ne.prototype._buildFromPrivate=function(e){var t=Ur.clone(e._buffers),r=fg.getG().mul(k3.fromBuffer(t.privateKey));return t.publicKey=fg.pointToCompressed(r),t.version=Mt.integerAsBuffer(Yo.get(Mt.integerFromBuffer(t.version)).xpubkey),t.privateKey=void 0,t.checksum=void 0,t.xprivkey=void 0,this._buildFromBuffers(t)};ne.prototype._buildFromObject=function(e){var t={version:e.network?Mt.integerAsBuffer(Yo.get(e.network).xpubkey):e.version,depth:Ur.isNumber(e.depth)?Mt.integerAsSingleByteBuffer(e.depth):e.depth,parentFingerPrint:Ur.isNumber(e.parentFingerPrint)?Mt.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:Ur.isNumber(e.childIndex)?Mt.integerAsBuffer(e.childIndex):e.childIndex,chainCode:Ur.isString(e.chainCode)?Buffer.from(e.chainCode,"hex"):e.chainCode,publicKey:Ur.isString(e.publicKey)?Buffer.from(e.publicKey,"hex"):Mt.isBuffer(e.publicKey)?e.publicKey:e.publicKey.toBuffer(),checksum:Ur.isNumber(e.checksum)?Mt.integerAsBuffer(e.checksum):e.checksum};return this._buildFromBuffers(t)};ne.prototype._buildFromSerialized=function(e){var t=Dh.decode(e),r={version:t.slice(ne.VersionStart,ne.VersionEnd),depth:t.slice(ne.DepthStart,ne.DepthEnd),parentFingerPrint:t.slice(ne.ParentFingerPrintStart,ne.ParentFingerPrintEnd),childIndex:t.slice(ne.ChildIndexStart,ne.ChildIndexEnd),chainCode:t.slice(ne.ChainCodeStart,ne.ChainCodeEnd),publicKey:t.slice(ne.PublicKeyStart,ne.PublicKeyEnd),checksum:t.slice(ne.ChecksumStart,ne.ChecksumEnd),xpubkey:e};return this._buildFromBuffers(r)};ne.prototype._buildFromBuffers=function(e){ne._validateBufferArguments(e),A3.defineImmutable(this,{_buffers:e});var t=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,e.publicKey],r=Mt.concat(t),i=Dh.checksum(r);if(!e.checksum||!e.checksum.length)e.checksum=i;else if(e.checksum.toString("hex")!==i.toString("hex"))throw new Wf.InvalidB58Checksum(r,i);var n=Yo.get(Mt.integerFromBuffer(e.version)),a;a=Dh.encode(Mt.concat(t)),e.xpubkey=Buffer.from(a);var u=new P3(e.publicKey,{network:n}),h=ne.ParentFingerPrintSize,b=N3.sha256ripemd160(u.toBuffer()).slice(0,h);return A3.defineImmutable(this,{xpubkey:a,network:n,depth:Mt.integerFromSingleByteBuffer(e.depth),publicKey:u,fingerPrint:b}),this};ne._validateBufferArguments=function(e){var t=function(r,i){var n=e[r];qh(Mt.isBuffer(n),r+" argument is not a buffer, it's "+typeof n),qh(n.length===i,r+" has not the expected size: found "+n.length+", expected "+i)};t("version",ne.VersionSize),t("depth",ne.DepthSize),t("parentFingerPrint",ne.ParentFingerPrintSize),t("childIndex",ne.ChildIndexSize),t("chainCode",ne.ChainCodeSize),t("publicKey",ne.PublicKeySize),e.checksum&&e.checksum.length&&t("checksum",ne.CheckSumSize)};ne.fromString=function(e){return O3.checkArgument(Ur.isString(e),"No valid string was provided"),new ne(e)};ne.fromObject=function(e){return O3.checkArgument(Ur.isObject(e),"No valid argument was provided"),new ne(e)};ne.prototype.toString=function(){return this.xpubkey};ne.prototype.inspect=function(){return"<HDPublicKey: "+this.xpubkey+">"};ne.prototype.toObject=ne.prototype.toJSON=function(){return{network:Yo.get(Mt.integerFromBuffer(this._buffers.version)).name,depth:Mt.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:Mt.integerFromBuffer(this.fingerPrint),parentFingerPrint:Mt.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:Mt.integerFromBuffer(this._buffers.childIndex),chainCode:Mt.bufferToHex(this._buffers.chainCode),publicKey:this.publicKey.toString(),checksum:Mt.integerFromBuffer(this._buffers.checksum),xpubkey:this.xpubkey}};ne.fromBuffer=function(e){return new ne(e)};ne.prototype.toBuffer=function(){return Mt.copy(this._buffers.xpubkey)};ne.Hardened=2147483648;ne.RootElementAlias=["m","M"];ne.VersionSize=4;ne.DepthSize=1;ne.ParentFingerPrintSize=4;ne.ChildIndexSize=4;ne.ChainCodeSize=32;ne.PublicKeySize=33;ne.CheckSumSize=4;ne.DataSize=78;ne.SerializedByteSize=82;ne.VersionStart=0;ne.VersionEnd=ne.VersionStart+ne.VersionSize;ne.DepthStart=ne.VersionEnd;ne.DepthEnd=ne.DepthStart+ne.DepthSize;ne.ParentFingerPrintStart=ne.DepthEnd;ne.ParentFingerPrintEnd=ne.ParentFingerPrintStart+ne.ParentFingerPrintSize;ne.ChildIndexStart=ne.ParentFingerPrintEnd;ne.ChildIndexEnd=ne.ChildIndexStart+ne.ChildIndexSize;ne.ChainCodeStart=ne.ChildIndexEnd;ne.ChainCodeEnd=ne.ChainCodeStart+ne.ChainCodeSize;ne.PublicKeyStart=ne.ChainCodeEnd;ne.PublicKeyEnd=ne.PublicKeyStart+ne.PublicKeySize;ne.ChecksumStart=ne.PublicKeyEnd;ne.ChecksumEnd=ne.ChecksumStart+ne.CheckSumSize;qh(ne.PublicKeyEnd===ne.DataSize);qh(ne.ChecksumEnd===ne.SerializedByteSize);M3.exports=ne});var pg=V((Sj,F3)=>{"use strict";var Fh=require("assert"),C3=require("buffer"),Br=vt(),D3=It(),U3=Zr(),LC=_f(),Kf=Xc(),hg=ti(),Zo=za(),DC=Mo(),q3=gu(),UC=zf(),Su=Yi(),_s=Su.HDPrivateKey,dr=hr(),Gf=Lr(),qC=128,L3=1/8,FC=512;function J(e){if(e instanceof J)return e;if(!(this instanceof J))return new J(e);if(!e)return this._generateRandomly();if(Zo.get(e))return this._generateRandomly(e);if(Br.isString(e)||dr.isBuffer(e))if(J.isValidSerialized(e))this._buildFromSerialized(e);else if(Gf.isValidJSON(e))this._buildFromJSON(e);else if(dr.isBuffer(e)&&J.isValidSerialized(e.toString()))this._buildFromSerialized(e.toString());else throw J.getSerializedError(e);else if(Br.isObject(e))this._buildFromObject(e);else throw new _s.UnrecognizedArgument(e)}J.isValidPath=function(e,t){if(Br.isString(e)){var r=J._getDerivationIndexes(e);return r!==null&&Br.every(r,J.isValidPath)}return Br.isNumber(e)?(e<J.Hardened&&t===!0&&(e+=J.Hardened),e>=0&&e<J.MaxIndex):!1};J._getDerivationIndexes=function(e){var t=e.split("/");if(Br.includes(J.RootElementAlias,e))return[];if(!Br.includes(J.RootElementAlias,t[0]))return null;var r=t.slice(1).map(function(i){var n=i.slice(-1)==="'";if(n&&(i=i.slice(0,-1)),!i||i[0]==="-")return NaN;var a=+i;return n&&(a+=J.Hardened),a});return Br.some(r,isNaN)?null:r};J.prototype.derive=function(e,t){return this.deriveNonCompliantChild(e,t)};J.prototype.deriveChild=function(e,t){if(Br.isNumber(e))return this._deriveWithNumber(e,t);if(Br.isString(e))return this._deriveFromString(e);throw new _s.InvalidDerivationArgument(e)};J.prototype.deriveNonCompliantChild=function(e,t){if(Br.isNumber(e))return this._deriveWithNumber(e,t,!0);if(Br.isString(e))return this._deriveFromString(e,!0);throw new _s.InvalidDerivationArgument(e)};J.prototype._deriveWithNumber=function(e,t,r){if(!J.isValidPath(e,t))throw new _s.InvalidPath(e);t=e>=J.Hardened?!0:t,e<J.Hardened&&t===!0&&(e+=J.Hardened);var i=dr.integerAsBuffer(e),n;if(t&&r){var a=this.privateKey.bn.toBuffer();n=dr.concat([Buffer.from([0]),a,i])}else if(t){var u=this.privateKey.bn.toBuffer({size:32});Fh(u.length===32,"length of private key buffer is expected to be 32 bytes"),n=dr.concat([Buffer.from([0]),u,i])}else n=dr.concat([this.publicKey.toBuffer(),i]);var h=hg.sha512hmac(n,this._buffers.chainCode),b=U3.fromBuffer(h.slice(0,32),{size:32}),w=h.slice(32,64),T=b.add(this.privateKey.toBigNumber()).umod(DC.getN()).toBuffer({size:32});if(!q3.isValid(T))return this._deriveWithNumber(e+1,null,r);var I=new J({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:w,privateKey:T});return I};J.prototype._deriveFromString=function(e,t){if(!J.isValidPath(e))throw new _s.InvalidPath(e);var r=J._getDerivationIndexes(e),i=r.reduce(function(n,a){return n._deriveWithNumber(a,null,t)},this);return i};J.isValidSerialized=function(e,t){return!J.getSerializedError(e,t)};J.getSerializedError=function(e,t){if(!(Br.isString(e)||dr.isBuffer(e)))return new _s.UnrecognizedArgument("Expected string or buffer");if(!LC.validCharacters(e))return new Su.InvalidB58Char("(unknown)",e);try{e=Kf.decode(e)}catch{return new Su.InvalidB58Checksum(e)}if(e.length!==J.DataLength)return new _s.InvalidLength(e);if(!Br.isUndefined(t)){var r=J._validateNetwork(e,t);if(r)return r}return null};J._validateNetwork=function(e,t){var r=Zo.get(t);if(!r)return new Su.InvalidNetworkArgument(t);var i=e.slice(0,4);return dr.integerFromBuffer(i)!==r.xprivkey?new Su.InvalidNetwork(i):null};J.fromString=function(e){return D3.checkArgument(Br.isString(e),"No valid string was provided"),new J(e)};J.fromObject=function(e){return D3.checkArgument(Br.isObject(e),"No valid argument was provided"),new J(e)};J.prototype._buildFromJSON=function(e){return this._buildFromObject(JSON.parse(e))};J.prototype._buildFromObject=function(e){var t={version:e.network?dr.integerAsBuffer(Zo.get(e.network).xprivkey):e.version,depth:Br.isNumber(e.depth)?dr.integerAsSingleByteBuffer(e.depth):e.depth,parentFingerPrint:Br.isNumber(e.parentFingerPrint)?dr.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:Br.isNumber(e.childIndex)?dr.integerAsBuffer(e.childIndex):e.childIndex,chainCode:Br.isString(e.chainCode)?Buffer.from(e.chainCode,"hex"):e.chainCode,privateKey:Br.isString(e.privateKey)&&Gf.isHexa(e.privateKey)?Buffer.from(e.privateKey,"hex"):e.privateKey,checksum:e.checksum?e.checksum.length?e.checksum:dr.integerAsBuffer(e.checksum):void 0};return this._buildFromBuffers(t)};J.prototype._buildFromSerialized=function(e){var t=Kf.decode(e),r={version:t.slice(J.VersionStart,J.VersionEnd),depth:t.slice(J.DepthStart,J.DepthEnd),parentFingerPrint:t.slice(J.ParentFingerPrintStart,J.ParentFingerPrintEnd),childIndex:t.slice(J.ChildIndexStart,J.ChildIndexEnd),chainCode:t.slice(J.ChainCodeStart,J.ChainCodeEnd),privateKey:t.slice(J.PrivateKeyStart,J.PrivateKeyEnd),checksum:t.slice(J.ChecksumStart,J.ChecksumEnd),xprivkey:e};return this._buildFromBuffers(r)};J.prototype._generateRandomly=function(e){return J.fromSeed(UC.getRandomBuffer(64),e)};J.fromSeed=function(e,t){if(Gf.isHexaString(e)&&(e=Buffer.from(e,"hex")),!Buffer.isBuffer(e))throw new _s.InvalidEntropyArgument(e);if(e.length<qC*L3)throw new _s.InvalidEntropyArgument.NotEnoughEntropy(e);if(e.length>FC*L3)throw new _s.InvalidEntropyArgument.TooMuchEntropy(e);var r=hg.sha512hmac(e,Buffer.from("Bitcoin seed"));return new J({network:Zo.get(t)||Zo.defaultNetwork,depth:0,parentFingerPrint:0,childIndex:0,privateKey:r.slice(0,32),chainCode:r.slice(32,64)})};J.prototype._calcHDPublicKey=function(){if(!this._hdPublicKey){var e=lg();this._hdPublicKey=new e(this)}};J.prototype._buildFromBuffers=function(e){J._validateBufferArguments(e),Gf.defineImmutable(this,{_buffers:e});var t=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,dr.emptyBuffer(1),e.privateKey],r=C3.Buffer.concat(t);if(!e.checksum||!e.checksum.length)e.checksum=Kf.checksum(r);else if(e.checksum.toString()!==Kf.checksum(r).toString())throw new Su.InvalidB58Checksum(r);var i=Zo.get(dr.integerFromBuffer(e.version)),n;n=Kf.encode(C3.Buffer.concat(t)),e.xprivkey=Buffer.from(n);var a=new q3(U3.fromBuffer(e.privateKey),i),u=a.toPublicKey(),h=J.ParentFingerPrintSize,b=hg.sha256ripemd160(u.toBuffer()).slice(0,h);return Gf.defineImmutable(this,{xprivkey:n,network:i,depth:dr.integerFromSingleByteBuffer(e.depth),privateKey:a,publicKey:u,fingerPrint:b}),this._hdPublicKey=null,Object.defineProperty(this,"hdPublicKey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey}}),Object.defineProperty(this,"xpubkey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey.xpubkey}}),this};J._validateBufferArguments=function(e){var t=function(r,i){var n=e[r];Fh(dr.isBuffer(n),r+" argument is not a buffer"),Fh(n.length===i,r+" has not the expected size: found "+n.length+", expected "+i)};t("version",J.VersionSize),t("depth",J.DepthSize),t("parentFingerPrint",J.ParentFingerPrintSize),t("childIndex",J.ChildIndexSize),t("chainCode",J.ChainCodeSize),t("privateKey",J.PrivateKeySize),e.checksum&&e.checksum.length&&t("checksum",J.CheckSumSize)};J.prototype.toString=function(){return this.xprivkey};J.prototype.inspect=function(){return"<HDPrivateKey: "+this.xprivkey+">"};J.prototype.toObject=J.prototype.toJSON=function(){return{network:Zo.get(dr.integerFromBuffer(this._buffers.version),"xprivkey").name,depth:dr.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:dr.integerFromBuffer(this.fingerPrint),parentFingerPrint:dr.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:dr.integerFromBuffer(this._buffers.childIndex),chainCode:dr.bufferToHex(this._buffers.chainCode),privateKey:this.privateKey.toBuffer().toString("hex"),checksum:dr.integerFromBuffer(this._buffers.checksum),xprivkey:this.xprivkey}};J.fromBuffer=function(e){return new J(e.toString())};J.prototype.toBuffer=function(){return dr.copy(this._buffers.xprivkey)};J.DefaultDepth=0;J.DefaultFingerprint=0;J.DefaultChildIndex=0;J.Hardened=2147483648;J.MaxIndex=2*J.Hardened;J.RootElementAlias=["m","M","m'","M'"];J.VersionSize=4;J.DepthSize=1;J.ParentFingerPrintSize=4;J.ChildIndexSize=4;J.ChainCodeSize=32;J.PrivateKeySize=32;J.CheckSumSize=4;J.DataLength=78;J.SerializedByteSize=82;J.VersionStart=0;J.VersionEnd=J.VersionStart+J.VersionSize;J.DepthStart=J.VersionEnd;J.DepthEnd=J.DepthStart+J.DepthSize;J.ParentFingerPrintStart=J.DepthEnd;J.ParentFingerPrintEnd=J.ParentFingerPrintStart+J.ParentFingerPrintSize;J.ChildIndexStart=J.ParentFingerPrintEnd;J.ChildIndexEnd=J.ChildIndexStart+J.ChildIndexSize;J.ChainCodeStart=J.ChildIndexEnd;J.ChainCodeEnd=J.ChainCodeStart+J.ChainCodeSize;J.PrivateKeyStart=J.ChainCodeEnd+1;J.PrivateKeyEnd=J.PrivateKeyStart+J.PrivateKeySize;J.ChecksumStart=J.PrivateKeyEnd;J.ChecksumEnd=J.ChecksumStart+J.CheckSumSize;Fh(J.ChecksumEnd===J.SerializedByteSize);F3.exports=J});var j3=V((Tj,z3)=>{"use strict";var $f=vt(),HC=gu(),zC=jn(),Hh=zn(),H3=yi(),zh=Cf(),dg=Pi(),jC=ti().sha256sha256,VC=Lr(),to=It();function qr(e){return this instanceof qr?(to.checkArgument($f.isString(e),"First argument should be a string"),this.message=e,this):new qr(e)}qr.MAGIC_BYTES=Buffer.from(`Bitcoin Signed Message:
23
- `);qr.prototype.magicHash=function(){var t=H3.varintBufNum(qr.MAGIC_BYTES.length),r=Buffer.from(this.message),i=H3.varintBufNum(r.length),n=Buffer.concat([t,qr.MAGIC_BYTES,i,r]),a=jC(n);return a};qr.prototype._sign=function(t){to.checkArgument(t instanceof HC,"First argument should be an instance of PrivateKey");var r=this.magicHash(),i=new zh;return i.hashbuf=r,i.privkey=t,i.pubkey=t.toPublicKey(),i.signRandomK(),i.calci(),i.sig};qr.prototype.sign=function(t){var r=this._sign(t);return r.toCompact().toString("base64")};qr.prototype._verify=function(t,r){to.checkArgument(t instanceof zC,"First argument should be an instance of PublicKey"),to.checkArgument(r instanceof dg,"Second argument should be an instance of Signature");var i=this.magicHash(),n=zh.verify(i,r,t);return n||(this.error="The signature was invalid"),n};qr.prototype.verify=function(t,r){to.checkArgument(t),to.checkArgument(r&&$f.isString(r)),$f.isString(t)&&(t=Hh.fromString(t));var i=dg.fromCompact(Buffer.from(r,"base64")),n=new zh;n.hashbuf=this.magicHash(),n.sig=i;var a=n.toPublicKey(),u=Hh.fromPublicKey(a,t.network);return t.toString()!==u.toString()?(this.error="The signature did not match the message digest",!1):this._verify(a,i)};qr.prototype.recoverPublicKey=function(t,r){to.checkArgument(t),to.checkArgument(r&&$f.isString(r)),$f.isString(t)&&(t=Hh.fromString(t));var i=dg.fromCompact(Buffer.from(r,"base64")),n=new zh;n.hashbuf=this.magicHash(),n.sig=i;var a=n.toPublicKey(),u=Hh.fromPublicKey(a,t.network);return t.toString()!==u.toString()&&(this.error="The signature did not match the message digest"),a.toString()};qr.fromString=function(e){return new qr(e)};qr.fromJSON=function(t){return VC.isValidJSON(t)&&(t=JSON.parse(t)),new qr(t.message)};qr.prototype.toObject=function(){return{message:this.message}};qr.prototype.toJSON=function(){return JSON.stringify(this.toObject())};qr.prototype.toString=function(){return this.message};qr.prototype.inspect=function(){return"<Message: "+this.toString()+">"};z3.exports=qr;var Ej=Mi()});var X3=V((Ij,$3)=>{"use strict";var W3=vt(),K3=require("url"),V3=zn(),G3=Rh(),Mr=function(e,t){if(!(this instanceof Mr))return new Mr(e,t);if(this.extras={},this.knownParams=t||[],this.address=this.network=this.amount=this.message=null,typeof e=="string"){var r=Mr.parse(e);r.amount&&(r.amount=this._parseAmount(r.amount)),this._fromObject(r)}else if(typeof e=="object")this._fromObject(e);else throw new TypeError("Unrecognized data format.")};Mr.fromString=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return new Mr(t)};Mr.fromObject=function(t){return new Mr(t)};Mr.isValid=function(e,t){try{new Mr(e,t)}catch{return!1}return!0};Mr.parse=function(e){var t=K3.parse(e,!0);if(t.protocol!=="bitcoin:")throw new TypeError("Invalid bitcoin URI");var r=/[^:]*:\/?\/?([^?]*)/.exec(e);return t.query.address=r&&r[1]||void 0,t.query};Mr.Members=["address","amount","message","label","r"];Mr.prototype._fromObject=function(e){if(!V3.isValid(e.address))throw new TypeError("Invalid bitcoin address");this.address=new V3(e.address),this.network=this.address.network,this.amount=e.amount;for(var t in e)if(!(t==="address"||t==="amount")){if(/^req-/.exec(t)&&this.knownParams.indexOf(t)===-1)throw Error("Unknown required argument "+t);var r=Mr.Members.indexOf(t)>-1?this:this.extras;r[t]=e[t]}};Mr.prototype._parseAmount=function(e){if(e=Number(e),isNaN(e))throw new TypeError("Invalid amount");return G3.fromBTC(e).toSatoshis()};Mr.prototype.toObject=Mr.prototype.toJSON=function(){for(var t={},r=0;r<Mr.Members.length;r++){var i=Mr.Members[r];this.hasOwnProperty(i)&&typeof this[i]<"u"&&(t[i]=this[i].toString())}return W3.extend(t,this.extras),t};Mr.prototype.toString=function(){var e={};return this.amount&&(e.amount=G3.fromSatoshis(this.amount).toBTC()),this.message&&(e.message=this.message),this.label&&(e.label=this.label),this.r&&(e.r=this.r),W3.extend(e,this.extras),K3.format({protocol:"bitcoin:",host:this.address,query:e})};Mr.prototype.inspect=function(){return"<URI: "+this.toString()+">"};$3.exports=Mr});var jh=V((Rj,Y3)=>{"use strict";var je=Y3.exports;je.version="v"+W_().version;je.versionGuard=function(e){if(e!==void 0){var t="More than one instance of bitcore-lib found. Please make sure to require bitcore-lib and check that submodules do not also include their own bitcore-lib dependency.";throw new Error(t)}};je.versionGuard(global._bitcore);global._bitcore=je.version;je.crypto={};je.crypto.BN=Zr();je.crypto.ECDSA=Cf();je.crypto.Hash=ti();je.crypto.Random=zf();je.crypto.Point=Mo();je.crypto.Signature=Pi();je.encoding={};je.encoding.Base58=_f();je.encoding.Base58Check=Xc();je.encoding.BufferReader=bs();je.encoding.BufferWriter=yi();je.encoding.Varint=h3();je.util={};je.util.buffer=hr();je.util.js=Lr();je.util.preconditions=It();je.errors=Yi();je.Address=zn();je.Block=R3();je.MerkleBlock=ug();je.BlockHeader=Vf();je.HDPrivateKey=pg();je.HDPublicKey=lg();je.Message=j3();je.Networks=za();je.Opcode=uh();je.PrivateKey=gu();je.PublicKey=jn();je.Script=Mi();je.Transaction=Uf();je.URI=X3();je.Unit=Rh();je.deps={};je.deps.bnjs=hm();je.deps.bs58=Ym();je.deps.Buffer=Buffer;je.deps.elliptic=Wm();je.deps._=vt();je.Transaction.sighash=ra()});var fE=V((Bj,uE)=>{var cE=require("stream").Stream,TL=require("util");uE.exports=$n;function $n(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}TL.inherits($n,cE);$n.create=function(e,t){var r=new this;t=t||{};for(var i in t)r[i]=t[i];r.source=e;var n=e.emit;return e.emit=function(){return r._handleEmit(arguments),n.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty($n.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});$n.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};$n.prototype.resume=function(){this._released||this.release(),this.source.resume()};$n.prototype.pause=function(){this.source.pause()};$n.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};$n.prototype.pipe=function(){var e=cE.prototype.pipe.apply(this,arguments);return this.resume(),e};$n.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};$n.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var dE=V((Mj,hE)=>{var IL=require("util"),pE=require("stream").Stream,lE=fE();hE.exports=Er;function Er(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}IL.inherits(Er,pE);Er.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};Er.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};Er.prototype.append=function(e){var t=Er.isStreamLike(e);if(t){if(!(e instanceof lE)){var r=lE.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};Er.prototype.pipe=function(e,t){return pE.prototype.pipe.call(this,e,t),this.resume(),e};Er.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};Er.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var i=Er.isStreamLike(r);i&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};Er.prototype._pipeNext=function(e){this._currentStream=e;var t=Er.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};Er.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};Er.prototype.write=function(e){this.emit("data",e)};Er.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};Er.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};Er.prototype.end=function(){this._reset(),this.emit("end")};Er.prototype.destroy=function(){this._reset(),this.emit("close")};Er.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};Er.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};Er.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};Er.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var mE=V((Cj,RL)=>{RL.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var gE=V((Lj,vE)=>{vE.exports=mE()});var _E=V(Ui=>{"use strict";var $h=gE(),AL=require("path").extname,bE=/^\s*([^;\s]*)(?:;|\s|$)/,OL=/^text\//i;Ui.charset=xE;Ui.charsets={lookup:xE};Ui.contentType=kL;Ui.extension=NL;Ui.extensions=Object.create(null);Ui.lookup=PL;Ui.types=Object.create(null);BL(Ui.extensions,Ui.types);function xE(e){if(!e||typeof e!="string")return!1;var t=bE.exec(e),r=t&&$h[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&OL.test(t[1])?"UTF-8":!1}function kL(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Ui.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Ui.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}function NL(e){if(!e||typeof e!="string")return!1;var t=bE.exec(e),r=t&&Ui.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}function PL(e){if(!e||typeof e!="string")return!1;var t=AL("x."+e).toLowerCase().substr(1);return t&&Ui.types[t]||!1}function BL(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys($h).forEach(function(n){var a=$h[n],u=a.extensions;if(!(!u||!u.length)){e[n]=u;for(var h=0;h<u.length;h++){var b=u[h];if(t[b]){var w=r.indexOf($h[t[b]].source),T=r.indexOf(a.source);if(t[b]!=="application/octet-stream"&&(w>T||w===T&&t[b].substr(0,12)==="application/"))continue}t[b]=n}}})}});var wE=V((Uj,yE)=>{yE.exports=ML;function ML(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}});var bg=V((qj,EE)=>{var SE=wE();EE.exports=CL;function CL(e){var t=!1;return SE(function(){t=!0}),function(i,n){t?e(i,n):SE(function(){e(i,n)})}}});var xg=V((Fj,TE)=>{TE.exports=LL;function LL(e){Object.keys(e.jobs).forEach(DL.bind(e)),e.jobs={}}function DL(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}});var _g=V((Hj,RE)=>{var IE=bg(),UL=xg();RE.exports=qL;function qL(e,t,r,i){var n=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[n]=FL(t,n,e[n],function(a,u){n in r.jobs&&(delete r.jobs[n],a?UL(r):r.results[n]=u,i(a,r.results))})}function FL(e,t,r,i){var n;return e.length==2?n=e(r,IE(i)):n=e(r,t,IE(i)),n}});var yg=V((zj,AE)=>{AE.exports=HL;function HL(e,t){var r=!Array.isArray(e),i={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&i.keyedList.sort(r?t:function(n,a){return t(e[n],e[a])}),i}});var wg=V((jj,OE)=>{var zL=xg(),jL=bg();OE.exports=VL;function VL(e){Object.keys(this.jobs).length&&(this.index=this.size,zL(this),jL(e)(null,this.results))}});var NE=V((Vj,kE)=>{var WL=_g(),KL=yg(),GL=wg();kE.exports=$L;function $L(e,t,r){for(var i=KL(e);i.index<(i.keyedList||e).length;)WL(e,t,i,function(n,a){if(n){r(n,a);return}if(Object.keys(i.jobs).length===0){r(null,i.results);return}}),i.index++;return GL.bind(i,r)}});var Sg=V((Wj,Xh)=>{var PE=_g(),XL=yg(),YL=wg();Xh.exports=ZL;Xh.exports.ascending=BE;Xh.exports.descending=JL;function ZL(e,t,r,i){var n=XL(e,r);return PE(e,t,n,function a(u,h){if(u){i(u,h);return}if(n.index++,n.index<(n.keyedList||e).length){PE(e,t,n,a);return}i(null,n.results)}),YL.bind(n,i)}function BE(e,t){return e<t?-1:e>t?1:0}function JL(e,t){return-1*BE(e,t)}});var CE=V((Kj,ME)=>{var QL=Sg();ME.exports=eD;function eD(e,t,r){return QL(e,t,null,r)}});var DE=V((Gj,LE)=>{LE.exports={parallel:NE(),serial:CE(),serialOrdered:Sg()}});var qE=V(($j,UE)=>{UE.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var zE=V((Xj,HE)=>{var Rg=dE(),FE=require("util"),Eg=require("path"),tD=require("http"),rD=require("https"),iD=require("url").parse,nD=require("fs"),sD=require("stream").Stream,Tg=_E(),aD=DE(),Ig=qE();HE.exports=wt;FE.inherits(wt,Rg);function wt(e){if(!(this instanceof wt))return new wt(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Rg.call(this),e=e||{};for(var t in e)this[t]=e[t]}wt.LINE_BREAK=`\r
24
- `;wt.DEFAULT_CONTENT_TYPE="application/octet-stream";wt.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var i=Rg.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),FE.isArray(t)){this._error(new Error("Arrays are not supported."));return}var n=this._multiPartHeader(e,t,r),a=this._multiPartFooter();i(n),i(t),i(a),this._trackLength(n,t,r)};wt.prototype._trackLength=function(e,t,r){var i=0;r.knownLength!=null?i+=+r.knownLength:Buffer.isBuffer(t)?i=t.length:typeof t=="string"&&(i=Buffer.byteLength(t)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(e)+wt.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof sD))&&(r.knownLength||this._valuesToMeasure.push(t))};wt.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):nD.stat(e.path,function(r,i){var n;if(r){t(r);return}n=i.size-(e.start?e.start:0),t(null,n)}):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",function(r){e.pause(),t(null,+r.headers["content-length"])}),e.resume()):t("Unknown stream")};wt.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var i=this._getContentDisposition(t,r),n=this._getContentType(t,r),a="",u={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(n||[])};typeof r.header=="object"&&Ig(u,r.header);var h;for(var b in u)u.hasOwnProperty(b)&&(h=u[b],h!=null&&(Array.isArray(h)||(h=[h]),h.length&&(a+=b+": "+h.join("; ")+wt.LINE_BREAK)));return"--"+this.getBoundary()+wt.LINE_BREAK+a+wt.LINE_BREAK};wt.prototype._getContentDisposition=function(e,t){var r,i;return typeof t.filepath=="string"?r=Eg.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?r=Eg.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(r=Eg.basename(e.client._httpMessage.path||"")),r&&(i='filename="'+r+'"'),i};wt.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e.name&&(r=Tg.lookup(e.name)),!r&&e.path&&(r=Tg.lookup(e.path)),!r&&e.readable&&e.hasOwnProperty("httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=Tg.lookup(t.filepath||t.filename)),!r&&typeof e=="object"&&(r=wt.DEFAULT_CONTENT_TYPE),r};wt.prototype._multiPartFooter=function(){return function(e){var t=wt.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};wt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+wt.LINE_BREAK};wt.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(r[t.toLowerCase()]=e[t]);return r};wt.prototype.setBoundary=function(e){this._boundary=e};wt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};wt.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,i=this._streams.length;r<i;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(wt.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};wt.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(Math.random()*10).toString(16);this._boundary=e};wt.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};wt.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};wt.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}aD.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,i){if(r){e(r);return}i.forEach(function(n){t+=n}),e(null,t)})};wt.prototype.submit=function(e,t){var r,i,n={method:"post"};return typeof e=="string"?(e=iD(e),i=Ig({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},n)):(i=Ig(e,n),i.port||(i.port=i.protocol=="https:"?443:80)),i.headers=this.getHeaders(e.headers),i.protocol=="https:"?r=rD.request(i):r=tD.request(i),this.getLength(function(a,u){if(a&&a!=="Unknown stream"){this._error(a);return}if(u&&r.setHeader("Content-Length",u),this.pipe(r),t){var h,b=function(w,T){return r.removeListener("error",b),r.removeListener("response",h),t.call(this,w,T)};h=b.bind(this,null),r.on("error",b),r.on("response",h)}}.bind(this)),r};wt.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};wt.prototype.toString=function(){return"[object FormData]"}});var n6=V(i6=>{"use strict";var wD=require("url").parse,SD={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},ED=String.prototype.endsWith||function(e){return e.length<=this.length&&this.indexOf(e,this.length-e.length)!==-1};function TD(e){var t=typeof e=="string"?wD(e):e||{},r=t.protocol,i=t.host,n=t.port;if(typeof i!="string"||!i||typeof r!="string"||(r=r.split(":",1)[0],i=i.replace(/:\d*$/,""),n=parseInt(n)||SD[r]||0,!ID(i,n)))return"";var a=Ou("npm_config_"+r+"_proxy")||Ou(r+"_proxy")||Ou("npm_config_proxy")||Ou("all_proxy");return a&&a.indexOf("://")===-1&&(a=r+"://"+a),a}function ID(e,t){var r=(Ou("npm_config_no_proxy")||Ou("no_proxy")).toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(i){if(!i)return!0;var n=i.match(/^(.+):(\d+)$/),a=n?n[1]:i,u=n?parseInt(n[2]):0;return u&&u!==t?!0:/^[.*]/.test(a)?(a.charAt(0)==="*"&&(a=a.slice(1)),!ED.call(e,a)):e!==a}):!0}function Ou(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}i6.getProxyForUrl=TD});var a6=V((YV,s6)=>{var tl;s6.exports=function(){if(!tl){try{tl=require("debug")("follow-redirects")}catch{}typeof tl!="function"&&(tl=function(){})}tl.apply(null,arguments)}});var l6=V((ZV,$g)=>{var nl=require("url"),rl=nl.URL,RD=require("http"),AD=require("https"),Hg=require("stream").Writable,zg=require("assert"),o6=a6(),jg=!1;try{zg(new rl)}catch(e){jg=e.code==="ERR_INVALID_URL"}var OD=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],Vg=["abort","aborted","connect","error","socket","timeout"],Wg=Object.create(null);Vg.forEach(function(e){Wg[e]=function(t,r,i){this._redirectable.emit(e,t,r,i)}});var Ug=sl("ERR_INVALID_URL","Invalid URL",TypeError),qg=sl("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),kD=sl("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",qg),ND=sl("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),PD=sl("ERR_STREAM_WRITE_AFTER_END","write after end"),BD=Hg.prototype.destroy||u6;function qi(e,t){Hg.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(i){try{r._processResponse(i)}catch(n){r.emit("error",n instanceof qg?n:new qg({cause:n}))}},this._performRequest()}qi.prototype=Object.create(Hg.prototype);qi.prototype.abort=function(){Gg(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};qi.prototype.destroy=function(e){return Gg(this._currentRequest,e),BD.call(this,e),this};qi.prototype.write=function(e,t,r){if(this._ending)throw new PD;if(!ec(e)&&!LD(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(il(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new ND),this.abort())};qi.prototype.end=function(e,t,r){if(il(e)?(r=e,e=t=null):il(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var i=this,n=this._currentRequest;this.write(e,t,function(){i._ended=!0,n.end(null,null,r)}),this._ending=!0}};qi.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};qi.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};qi.prototype.setTimeout=function(e,t){var r=this;function i(u){u.setTimeout(e),u.removeListener("timeout",u.destroy),u.addListener("timeout",u.destroy)}function n(u){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),a()},e),i(u)}function a(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",a),r.removeListener("error",a),r.removeListener("response",a),r.removeListener("close",a),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",n)}return t&&this.on("timeout",t),this.socket?n(this.socket):this._currentRequest.once("socket",n),this.on("socket",i),this.on("abort",a),this.on("error",a),this.on("response",a),this.on("close",a),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){qi.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(qi.prototype,e,{get:function(){return this._currentRequest[e]}})});qi.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};qi.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var n of Vg)i.on(n,Wg[n]);if(this._currentUrl=/^\//.test(this._options.path)?nl.format(this._options):this._options.path,this._isRedirect){var a=0,u=this,h=this._requestBodyBuffers;(function b(w){if(i===u._currentRequest)if(w)u.emit("error",w);else if(a<h.length){var T=h[a++];i.finished||i.write(T.data,T.encoding,b)}else u._ended&&i.end()})()}};qi.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(Gg(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new kD;var i,n=this._options.beforeRedirect;n&&(i=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var a=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Dg(/^content-/i,this._options.headers));var u=Dg(/^host$/i,this._options.headers),h=Kg(this._currentUrl),b=u||h.host,w=/^\w+:/.test(r)?this._currentUrl:nl.format(Object.assign(h,{host:b})),T=MD(r,w);if(o6("redirecting to",T.href),this._isRedirect=!0,Fg(T,this._options),(T.protocol!==h.protocol&&T.protocol!=="https:"||T.host!==b&&!CD(T.host,b))&&Dg(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),il(n)){var I={headers:e.headers,statusCode:t},B={url:w,method:a,headers:i};n(this._options,I,B),this._sanitizeOptions(this._options)}this._performRequest()};function c6(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(i){var n=i+":",a=r[n]=e[i],u=t[i]=Object.create(a);function h(w,T,I){return DD(w)?w=Fg(w):ec(w)?w=Fg(Kg(w)):(I=T,T=f6(w),w={protocol:n}),il(T)&&(I=T,T=null),T=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},w,T),T.nativeProtocols=r,!ec(T.host)&&!ec(T.hostname)&&(T.hostname="::1"),zg.equal(T.protocol,n,"protocol mismatch"),o6("options",T),new qi(T,I)}function b(w,T,I){var B=u.request(w,T,I);return B.end(),B}Object.defineProperties(u,{request:{value:h,configurable:!0,enumerable:!0,writable:!0},get:{value:b,configurable:!0,enumerable:!0,writable:!0}})}),t}function u6(){}function Kg(e){var t;if(jg)t=new rl(e);else if(t=f6(nl.parse(e)),!ec(t.protocol))throw new Ug({input:e});return t}function MD(e,t){return jg?new rl(e,t):Kg(nl.resolve(t,e))}function f6(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new Ug({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new Ug({input:e.href||e});return e}function Fg(e,t){var r=t||{};for(var i of OD)r[i]=e[i];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function Dg(e,t){var r;for(var i in t)e.test(i)&&(r=t[i],delete t[i]);return r===null||typeof r>"u"?void 0:String(r).trim()}function sl(e,t,r){function i(n){Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return i.prototype=new(r||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),i}function Gg(e,t){for(var r of Vg)e.removeListener(r,Wg[r]);e.on("error",u6),e.destroy(t)}function CD(e,t){zg(ec(e)&&ec(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function ec(e){return typeof e=="string"||e instanceof String}function il(e){return typeof e=="function"}function LD(e){return typeof e=="object"&&"length"in e}function DD(e){return rl&&e instanceof rl}$g.exports=c6({http:RD,https:AD});$g.exports.wrap=c6});var N4=V((QJ,qb)=>{"use strict";var Mq=Object.prototype.hasOwnProperty,Ei="~";function Dl(){}Object.create&&(Dl.prototype=Object.create(null),new Dl().__proto__||(Ei=!1));function Cq(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function k4(e,t,r,i,n){if(typeof r!="function")throw new TypeError("The listener must be a function");var a=new Cq(r,i||e,n),u=Ei?Ei+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function Md(e,t){--e._eventsCount===0?e._events=new Dl:delete e._events[t]}function mi(){this._events=new Dl,this._eventsCount=0}mi.prototype.eventNames=function(){var t=[],r,i;if(this._eventsCount===0)return t;for(i in r=this._events)Mq.call(r,i)&&t.push(Ei?i.slice(1):i);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};mi.prototype.listeners=function(t){var r=Ei?Ei+t:t,i=this._events[r];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,a=i.length,u=new Array(a);n<a;n++)u[n]=i[n].fn;return u};mi.prototype.listenerCount=function(t){var r=Ei?Ei+t:t,i=this._events[r];return i?i.fn?1:i.length:0};mi.prototype.emit=function(t,r,i,n,a,u){var h=Ei?Ei+t:t;if(!this._events[h])return!1;var b=this._events[h],w=arguments.length,T,I;if(b.fn){switch(b.once&&this.removeListener(t,b.fn,void 0,!0),w){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,r),!0;case 3:return b.fn.call(b.context,r,i),!0;case 4:return b.fn.call(b.context,r,i,n),!0;case 5:return b.fn.call(b.context,r,i,n,a),!0;case 6:return b.fn.call(b.context,r,i,n,a,u),!0}for(I=1,T=new Array(w-1);I<w;I++)T[I-1]=arguments[I];b.fn.apply(b.context,T)}else{var B=b.length,M;for(I=0;I<B;I++)switch(b[I].once&&this.removeListener(t,b[I].fn,void 0,!0),w){case 1:b[I].fn.call(b[I].context);break;case 2:b[I].fn.call(b[I].context,r);break;case 3:b[I].fn.call(b[I].context,r,i);break;case 4:b[I].fn.call(b[I].context,r,i,n);break;default:if(!T)for(M=1,T=new Array(w-1);M<w;M++)T[M-1]=arguments[M];b[I].fn.apply(b[I].context,T)}}return!0};mi.prototype.on=function(t,r,i){return k4(this,t,r,i,!1)};mi.prototype.once=function(t,r,i){return k4(this,t,r,i,!0)};mi.prototype.removeListener=function(t,r,i,n){var a=Ei?Ei+t:t;if(!this._events[a])return this;if(!r)return Md(this,a),this;var u=this._events[a];if(u.fn)u.fn===r&&(!n||u.once)&&(!i||u.context===i)&&Md(this,a);else{for(var h=0,b=[],w=u.length;h<w;h++)(u[h].fn!==r||n&&!u[h].once||i&&u[h].context!==i)&&b.push(u[h]);b.length?this._events[a]=b.length===1?b[0]:b:Md(this,a)}return this};mi.prototype.removeAllListeners=function(t){var r;return t?(r=Ei?Ei+t:t,this._events[r]&&Md(this,r)):(this._events=new Dl,this._eventsCount=0),this};mi.prototype.off=mi.prototype.removeListener;mi.prototype.addListener=mi.prototype.on;mi.prefixed=Ei;mi.EventEmitter=mi;typeof qb<"u"&&(qb.exports=mi)});var jb=V((ute,U4)=>{"use strict";var{Duplex:Hq}=require("stream");function L4(e){e.emit("close")}function zq(){!this.destroyed&&this._writableState.finished&&this.destroy()}function D4(e){this.removeListener("error",D4),this.destroy(),this.listenerCount("error")===0&&this.emit("error",e)}function jq(e,t){let r=!0,i=new Hq({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",function(a,u){let h=!u&&i._readableState.objectMode?a.toString():a;i.push(h)||e.pause()}),e.once("error",function(a){i.destroyed||(r=!1,i.destroy(a))}),e.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(n,a){if(e.readyState===e.CLOSED){a(n),process.nextTick(L4,i);return}let u=!1;e.once("error",function(b){u=!0,a(b)}),e.once("close",function(){u||a(n),process.nextTick(L4,i)}),r&&e.terminate()},i._final=function(n){if(e.readyState===e.CONNECTING){e.once("open",function(){i._final(n)});return}e._socket!==null&&(e._socket._writableState.finished?(n(),i._readableState.endEmitted&&i.destroy()):(e._socket.once("finish",function(){n()}),e.close()))},i._read=function(){e.isPaused&&e.resume()},i._write=function(n,a,u){if(e.readyState===e.CONNECTING){e.once("open",function(){i._write(n,a,u)});return}e.send(n,u)},i.on("end",zq),i.on("error",D4),i}U4.exports=jq});var mo=V((fte,q4)=>{"use strict";q4.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Ul=V((lte,Dd)=>{"use strict";var{EMPTY_BUFFER:Vq}=mo(),Vb=Buffer[Symbol.species];function Wq(e,t){if(e.length===0)return Vq;if(e.length===1)return e[0];let r=Buffer.allocUnsafe(t),i=0;for(let n=0;n<e.length;n++){let a=e[n];r.set(a,i),i+=a.length}return i<t?new Vb(r.buffer,r.byteOffset,i):r}function F4(e,t,r,i,n){for(let a=0;a<n;a++)r[i+a]=e[a]^t[a&3]}function H4(e,t){for(let r=0;r<e.length;r++)e[r]^=t[r&3]}function Kq(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}function Wb(e){if(Wb.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new Vb(e):ArrayBuffer.isView(e)?t=new Vb(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),Wb.readOnly=!1),t}Dd.exports={concat:Wq,mask:F4,toArrayBuffer:Kq,toBuffer:Wb,unmask:H4};if(!process.env.WS_NO_BUFFER_UTIL)try{let e=require("bufferutil");Dd.exports.mask=function(t,r,i,n,a){a<48?F4(t,r,i,n,a):e.mask(t,r,i,n,a)},Dd.exports.unmask=function(t,r){t.length<32?H4(t,r):e.unmask(t,r)}}catch{}});var V4=V((pte,j4)=>{"use strict";var z4=Symbol("kDone"),Kb=Symbol("kRun"),Gb=class{constructor(t){this[z4]=()=>{this.pending--,this[Kb]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[Kb]()}[Kb](){if(this.pending!==this.concurrency&&this.jobs.length){let t=this.jobs.shift();this.pending++,t(this[z4])}}};j4.exports=Gb});var Hl=V((hte,$4)=>{"use strict";var ql=require("zlib"),W4=Ul(),Gq=V4(),{kStatusCode:K4}=mo(),$q=Buffer[Symbol.species],Xq=Buffer.from([0,0,255,255]),Fd=Symbol("permessage-deflate"),ga=Symbol("total-length"),Fl=Symbol("callback"),vo=Symbol("buffers"),qd=Symbol("error"),Ud,$b=class{constructor(t,r,i){if(this._maxPayload=i|0,this._options=t||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!r,this._deflate=null,this._inflate=null,this.params=null,!Ud){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Ud=new Gq(n)}}static get extensionName(){return"permessage-deflate"}offer(){let t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let t=this._deflate[Fl];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){let r=this._options,i=t.find(n=>!(r.serverNoContextTakeover===!1&&n.server_no_context_takeover||n.server_max_window_bits&&(r.serverMaxWindowBits===!1||typeof r.serverMaxWindowBits=="number"&&r.serverMaxWindowBits>n.server_max_window_bits)||typeof r.clientMaxWindowBits=="number"&&!n.client_max_window_bits));if(!i)throw new Error("None of the extension offers can be accepted");return r.serverNoContextTakeover&&(i.server_no_context_takeover=!0),r.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof r.serverMaxWindowBits=="number"&&(i.server_max_window_bits=r.serverMaxWindowBits),typeof r.clientMaxWindowBits=="number"?i.client_max_window_bits=r.clientMaxWindowBits:(i.client_max_window_bits===!0||r.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(t){let r=t[0];if(this._options.clientNoContextTakeover===!1&&r.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!r.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(r.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&r.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return r}normalizeParams(t){return t.forEach(r=>{Object.keys(r).forEach(i=>{let n=r[i];if(n.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(n=n[0],i==="client_max_window_bits"){if(n!==!0){let a=+n;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=a}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else if(i==="server_max_window_bits"){let a=+n;if(!Number.isInteger(a)||a<8||a>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=a}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(n!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else throw new Error(`Unknown parameter "${i}"`);r[i]=n})}),t}decompress(t,r,i){Ud.add(n=>{this._decompress(t,r,(a,u)=>{n(),i(a,u)})})}compress(t,r,i){Ud.add(n=>{this._compress(t,r,(a,u)=>{n(),i(a,u)})})}_decompress(t,r,i){let n=this._isServer?"client":"server";if(!this._inflate){let a=`${n}_max_window_bits`,u=typeof this.params[a]!="number"?ql.Z_DEFAULT_WINDOWBITS:this.params[a];this._inflate=ql.createInflateRaw({...this._options.zlibInflateOptions,windowBits:u}),this._inflate[Fd]=this,this._inflate[ga]=0,this._inflate[vo]=[],this._inflate.on("error",Zq),this._inflate.on("data",G4)}this._inflate[Fl]=i,this._inflate.write(t),r&&this._inflate.write(Xq),this._inflate.flush(()=>{let a=this._inflate[qd];if(a){this._inflate.close(),this._inflate=null,i(a);return}let u=W4.concat(this._inflate[vo],this._inflate[ga]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[ga]=0,this._inflate[vo]=[],r&&this.params[`${n}_no_context_takeover`]&&this._inflate.reset()),i(null,u)})}_compress(t,r,i){let n=this._isServer?"server":"client";if(!this._deflate){let a=`${n}_max_window_bits`,u=typeof this.params[a]!="number"?ql.Z_DEFAULT_WINDOWBITS:this.params[a];this._deflate=ql.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:u}),this._deflate[ga]=0,this._deflate[vo]=[],this._deflate.on("data",Yq)}this._deflate[Fl]=i,this._deflate.write(t),this._deflate.flush(ql.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let a=W4.concat(this._deflate[vo],this._deflate[ga]);r&&(a=new $q(a.buffer,a.byteOffset,a.length-4)),this._deflate[Fl]=null,this._deflate[ga]=0,this._deflate[vo]=[],r&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),i(null,a)})}};$4.exports=$b;function Yq(e){this[vo].push(e),this[ga]+=e.length}function G4(e){if(this[ga]+=e.length,this[Fd]._maxPayload<1||this[ga]<=this[Fd]._maxPayload){this[vo].push(e);return}this[qd]=new RangeError("Max payload size exceeded"),this[qd].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[qd][K4]=1009,this.removeListener("data",G4),this.reset()}function Zq(e){this[Fd]._inflate=null,e[K4]=1007,this[Fl](e)}});var zl=V((dte,Hd)=>{"use strict";var{isUtf8:X4}=require("buffer"),Jq=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Qq(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}function Xb(e){let t=e.length,r=0;for(;r<t;)if(!(e[r]&128))r++;else if((e[r]&224)===192){if(r+1===t||(e[r+1]&192)!==128||(e[r]&254)===192)return!1;r+=2}else if((e[r]&240)===224){if(r+2>=t||(e[r+1]&192)!==128||(e[r+2]&192)!==128||e[r]===224&&(e[r+1]&224)===128||e[r]===237&&(e[r+1]&224)===160)return!1;r+=3}else if((e[r]&248)===240){if(r+3>=t||(e[r+1]&192)!==128||(e[r+2]&192)!==128||(e[r+3]&192)!==128||e[r]===240&&(e[r+1]&240)===128||e[r]===244&&e[r+1]>143||e[r]>244)return!1;r+=4}else return!1;return!0}Hd.exports={isValidStatusCode:Qq,isValidUTF8:Xb,tokenChars:Jq};if(X4)Hd.exports.isValidUTF8=function(e){return e.length<24?Xb(e):X4(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=require("utf-8-validate");Hd.exports.isValidUTF8=function(t){return t.length<32?Xb(t):e(t)}}catch{}});var Vd=V((mte,rT)=>{"use strict";var{Writable:eF}=require("stream"),Y4=Hl(),{BINARY_TYPES:tF,EMPTY_BUFFER:Z4,kStatusCode:rF,kWebSocket:iF}=mo(),{concat:Yb,toArrayBuffer:nF,unmask:sF}=Ul(),{isValidStatusCode:aF,isValidUTF8:J4}=zl(),zd=Buffer[Symbol.species],Nn=0,Q4=1,eT=2,tT=3,Zb=4,Jb=5,jd=6,Qb=class extends eF{constructor(t={}){super(),this._allowSynchronousEvents=t.allowSynchronousEvents!==void 0?t.allowSynchronousEvents:!0,this._binaryType=t.binaryType||tF[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxPayload=t.maxPayload|0,this._skipUTF8Validation=!!t.skipUTF8Validation,this[iF]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=Nn}_write(t,r,i){if(this._opcode===8&&this._state==Nn)return i();this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(i)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t<this._buffers[0].length){let i=this._buffers[0];return this._buffers[0]=new zd(i.buffer,i.byteOffset+t,i.length-t),new zd(i.buffer,i.byteOffset,t)}let r=Buffer.allocUnsafe(t);do{let i=this._buffers[0],n=r.length-t;t>=i.length?r.set(this._buffers.shift(),n):(r.set(new Uint8Array(i.buffer,i.byteOffset,t),n),this._buffers[0]=new zd(i.buffer,i.byteOffset+t,i.length-t)),t-=i.length}while(t>0);return r}startLoop(t){this._loop=!0;do switch(this._state){case Nn:this.getInfo(t);break;case Q4:this.getPayloadLength16(t);break;case eT:this.getPayloadLength64(t);break;case tT:this.getMask();break;case Zb:this.getData(t);break;case Jb:case jd:this._loop=!1;return}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2){this._loop=!1;return}let r=this.consume(2);if(r[0]&48){let n=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");t(n);return}let i=(r[0]&64)===64;if(i&&!this._extensions[Y4.extensionName]){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(n);return}if(this._fin=(r[0]&128)===128,this._opcode=r[0]&15,this._payloadLength=r[1]&127,this._opcode===0){if(i){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(n);return}if(!this._fragmented){let n=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");t(n);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(n);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let n=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");t(n);return}if(i){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(n);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let n=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");t(n);return}}else{let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(n);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(r[1]&128)===128,this._isServer){if(!this._masked){let n=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");t(n);return}}else if(this._masked){let n=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");t(n);return}this._payloadLength===126?this._state=Q4:this._payloadLength===127?this._state=eT:this.haveLength(t)}getPayloadLength16(t){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t)}getPayloadLength64(t){if(this._bufferedBytes<8){this._loop=!1;return}let r=this.consume(8),i=r.readUInt32BE(0);if(i>Math.pow(2,21)-1){let n=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");t(n);return}this._payloadLength=i*Math.pow(2,32)+r.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let r=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(r);return}this._masked?this._state=tT:this._state=Zb}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=Zb}getData(t){let r=Z4;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}r=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&sF(r,this._mask)}if(this._opcode>7){this.controlMessage(r,t);return}if(this._compressed){this._state=Jb,this.decompress(r,t);return}r.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(r)),this.dataMessage(t)}decompress(t,r){this._extensions[Y4.extensionName].decompress(t,this._fin,(n,a)=>{if(n)return r(n);if(a.length){if(this._messageLength+=a.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let u=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");r(u);return}this._fragments.push(a)}this.dataMessage(r),this._state===Nn&&this.startLoop(r)})}dataMessage(t){if(!this._fin){this._state=Nn;return}let r=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let n;this._binaryType==="nodebuffer"?n=Yb(i,r):this._binaryType==="arraybuffer"?n=nF(Yb(i,r)):n=i,this._allowSynchronousEvents?(this.emit("message",n,!0),this._state=Nn):(this._state=jd,setImmediate(()=>{this.emit("message",n,!0),this._state=Nn,this.startLoop(t)}))}else{let n=Yb(i,r);if(!this._skipUTF8Validation&&!J4(n)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(a);return}this._state===Jb||this._allowSynchronousEvents?(this.emit("message",n,!1),this._state=Nn):(this._state=jd,setImmediate(()=>{this.emit("message",n,!1),this._state=Nn,this.startLoop(t)}))}}controlMessage(t,r){if(this._opcode===8){if(t.length===0)this._loop=!1,this.emit("conclude",1005,Z4),this.end();else{let i=t.readUInt16BE(0);if(!aF(i)){let a=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");r(a);return}let n=new zd(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!J4(n)){let a=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");r(a);return}this._loop=!1,this.emit("conclude",i,n),this.end()}this._state=Nn;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",t),this._state=Nn):(this._state=jd,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",t),this._state=Nn,this.startLoop(r)}))}createError(t,r,i,n,a){this._loop=!1,this._errored=!0;let u=new t(i?`Invalid WebSocket frame: ${r}`:r);return Error.captureStackTrace(u,this.createError),u.code=a,u[rF]=n,u}};rT.exports=Qb});var Wd=V((gte,sT)=>{"use strict";var{Duplex:vte}=require("stream"),{randomFillSync:oF}=require("crypto"),iT=Hl(),{EMPTY_BUFFER:cF}=mo(),{isValidStatusCode:uF}=zl(),{mask:nT,toBuffer:ju}=Ul(),ts=Symbol("kByteLength"),fF=Buffer.alloc(4),ex=class e{constructor(t,r,i){this._extensions=r||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(t,r){let i,n=!1,a=2,u=!1;r.mask&&(i=r.maskBuffer||fF,r.generateMask?r.generateMask(i):oF(i,0,4),u=(i[0]|i[1]|i[2]|i[3])===0,a=6);let h;typeof t=="string"?(!r.mask||u)&&r[ts]!==void 0?h=r[ts]:(t=Buffer.from(t),h=t.length):(h=t.length,n=r.mask&&r.readOnly&&!u);let b=h;h>=65536?(a+=8,b=127):h>125&&(a+=2,b=126);let w=Buffer.allocUnsafe(n?h+a:a);return w[0]=r.fin?r.opcode|128:r.opcode,r.rsv1&&(w[0]|=64),w[1]=b,b===126?w.writeUInt16BE(h,2):b===127&&(w[2]=w[3]=0,w.writeUIntBE(h,4,6)),r.mask?(w[1]|=128,w[a-4]=i[0],w[a-3]=i[1],w[a-2]=i[2],w[a-1]=i[3],u?[w,t]:n?(nT(t,i,w,a,h),[w]):(nT(t,i,t,0,h),[w,t])):[w,t]}close(t,r,i,n){let a;if(t===void 0)a=cF;else{if(typeof t!="number"||!uF(t))throw new TypeError("First argument must be a valid error code number");if(r===void 0||!r.length)a=Buffer.allocUnsafe(2),a.writeUInt16BE(t,0);else{let h=Buffer.byteLength(r);if(h>123)throw new RangeError("The message must not be greater than 123 bytes");a=Buffer.allocUnsafe(2+h),a.writeUInt16BE(t,0),typeof r=="string"?a.write(r,2):a.set(r,2)}}let u={[ts]:a.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,a,!1,u,n]):this.sendFrame(e.frame(a,u),n)}ping(t,r,i){let n,a;if(typeof t=="string"?(n=Buffer.byteLength(t),a=!1):(t=ju(t),n=t.length,a=ju.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let u={[ts]:n,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:9,readOnly:a,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,u,i]):this.sendFrame(e.frame(t,u),i)}pong(t,r,i){let n,a;if(typeof t=="string"?(n=Buffer.byteLength(t),a=!1):(t=ju(t),n=t.length,a=ju.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let u={[ts]:n,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:10,readOnly:a,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,u,i]):this.sendFrame(e.frame(t,u),i)}send(t,r,i){let n=this._extensions[iT.extensionName],a=r.binary?2:1,u=r.compress,h,b;if(typeof t=="string"?(h=Buffer.byteLength(t),b=!1):(t=ju(t),h=t.length,b=ju.readOnly),this._firstFragment?(this._firstFragment=!1,u&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(u=h>=n._threshold),this._compress=u):(u=!1,a=0),r.fin&&(this._firstFragment=!0),n){let w={[ts]:h,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:b,rsv1:u};this._deflating?this.enqueue([this.dispatch,t,this._compress,w,i]):this.dispatch(t,this._compress,w,i)}else this.sendFrame(e.frame(t,{[ts]:h,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:a,readOnly:b,rsv1:!1}),i)}dispatch(t,r,i,n){if(!r){this.sendFrame(e.frame(t,i),n);return}let a=this._extensions[iT.extensionName];this._bufferedBytes+=i[ts],this._deflating=!0,a.compress(t,i.fin,(u,h)=>{if(this._socket.destroyed){let b=new Error("The socket was closed while data was being compressed");typeof n=="function"&&n(b);for(let w=0;w<this._queue.length;w++){let T=this._queue[w],I=T[T.length-1];typeof I=="function"&&I(b)}return}this._bufferedBytes-=i[ts],this._deflating=!1,i.readOnly=!1,this.sendFrame(e.frame(h,i),n),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let t=this._queue.shift();this._bufferedBytes-=t[3][ts],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][ts],this._queue.push(t)}sendFrame(t,r){t.length===2?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],r),this._socket.uncork()):this._socket.write(t[0],r)}};sT.exports=ex});var dT=V((bte,hT)=>{"use strict";var{kForOnEventAttribute:jl,kListener:tx}=mo(),aT=Symbol("kCode"),oT=Symbol("kData"),cT=Symbol("kError"),uT=Symbol("kMessage"),fT=Symbol("kReason"),Vu=Symbol("kTarget"),lT=Symbol("kType"),pT=Symbol("kWasClean"),ba=class{constructor(t){this[Vu]=null,this[lT]=t}get target(){return this[Vu]}get type(){return this[lT]}};Object.defineProperty(ba.prototype,"target",{enumerable:!0});Object.defineProperty(ba.prototype,"type",{enumerable:!0});var bc=class extends ba{constructor(t,r={}){super(t),this[aT]=r.code===void 0?0:r.code,this[fT]=r.reason===void 0?"":r.reason,this[pT]=r.wasClean===void 0?!1:r.wasClean}get code(){return this[aT]}get reason(){return this[fT]}get wasClean(){return this[pT]}};Object.defineProperty(bc.prototype,"code",{enumerable:!0});Object.defineProperty(bc.prototype,"reason",{enumerable:!0});Object.defineProperty(bc.prototype,"wasClean",{enumerable:!0});var Wu=class extends ba{constructor(t,r={}){super(t),this[cT]=r.error===void 0?null:r.error,this[uT]=r.message===void 0?"":r.message}get error(){return this[cT]}get message(){return this[uT]}};Object.defineProperty(Wu.prototype,"error",{enumerable:!0});Object.defineProperty(Wu.prototype,"message",{enumerable:!0});var Vl=class extends ba{constructor(t,r={}){super(t),this[oT]=r.data===void 0?null:r.data}get data(){return this[oT]}};Object.defineProperty(Vl.prototype,"data",{enumerable:!0});var lF={addEventListener(e,t,r={}){for(let n of this.listeners(e))if(!r[jl]&&n[tx]===t&&!n[jl])return;let i;if(e==="message")i=function(a,u){let h=new Vl("message",{data:u?a:a.toString()});h[Vu]=this,Kd(t,this,h)};else if(e==="close")i=function(a,u){let h=new bc("close",{code:a,reason:u.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});h[Vu]=this,Kd(t,this,h)};else if(e==="error")i=function(a){let u=new Wu("error",{error:a,message:a.message});u[Vu]=this,Kd(t,this,u)};else if(e==="open")i=function(){let a=new ba("open");a[Vu]=this,Kd(t,this,a)};else return;i[jl]=!!r[jl],i[tx]=t,r.once?this.once(e,i):this.on(e,i)},removeEventListener(e,t){for(let r of this.listeners(e))if(r[tx]===t&&!r[jl]){this.removeListener(e,r);break}}};hT.exports={CloseEvent:bc,ErrorEvent:Wu,Event:ba,EventTarget:lF,MessageEvent:Vl};function Kd(e,t,r){typeof e=="object"&&e.handleEvent?e.handleEvent.call(e,r):e.call(t,r)}});var rx=V((xte,mT)=>{"use strict";var{tokenChars:Wl}=zl();function Ts(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}function pF(e){let t=Object.create(null),r=Object.create(null),i=!1,n=!1,a=!1,u,h,b=-1,w=-1,T=-1,I=0;for(;I<e.length;I++)if(w=e.charCodeAt(I),u===void 0)if(T===-1&&Wl[w]===1)b===-1&&(b=I);else if(I!==0&&(w===32||w===9))T===-1&&b!==-1&&(T=I);else if(w===59||w===44){if(b===-1)throw new SyntaxError(`Unexpected character at index ${I}`);T===-1&&(T=I);let M=e.slice(b,T);w===44?(Ts(t,M,r),r=Object.create(null)):u=M,b=T=-1}else throw new SyntaxError(`Unexpected character at index ${I}`);else if(h===void 0)if(T===-1&&Wl[w]===1)b===-1&&(b=I);else if(w===32||w===9)T===-1&&b!==-1&&(T=I);else if(w===59||w===44){if(b===-1)throw new SyntaxError(`Unexpected character at index ${I}`);T===-1&&(T=I),Ts(r,e.slice(b,T),!0),w===44&&(Ts(t,u,r),r=Object.create(null),u=void 0),b=T=-1}else if(w===61&&b!==-1&&T===-1)h=e.slice(b,I),b=T=-1;else throw new SyntaxError(`Unexpected character at index ${I}`);else if(n){if(Wl[w]!==1)throw new SyntaxError(`Unexpected character at index ${I}`);b===-1?b=I:i||(i=!0),n=!1}else if(a)if(Wl[w]===1)b===-1&&(b=I);else if(w===34&&b!==-1)a=!1,T=I;else if(w===92)n=!0;else throw new SyntaxError(`Unexpected character at index ${I}`);else if(w===34&&e.charCodeAt(I-1)===61)a=!0;else if(T===-1&&Wl[w]===1)b===-1&&(b=I);else if(b!==-1&&(w===32||w===9))T===-1&&(T=I);else if(w===59||w===44){if(b===-1)throw new SyntaxError(`Unexpected character at index ${I}`);T===-1&&(T=I);let M=e.slice(b,T);i&&(M=M.replace(/\\/g,""),i=!1),Ts(r,h,M),w===44&&(Ts(t,u,r),r=Object.create(null),u=void 0),h=void 0,b=T=-1}else throw new SyntaxError(`Unexpected character at index ${I}`);if(b===-1||a||w===32||w===9)throw new SyntaxError("Unexpected end of input");T===-1&&(T=I);let B=e.slice(b,T);return u===void 0?Ts(t,B,r):(h===void 0?Ts(r,B,!0):i?Ts(r,h,B.replace(/\\/g,"")):Ts(r,h,B),Ts(t,u,r)),t}function hF(e){return Object.keys(e).map(t=>{let r=e[t];return Array.isArray(r)||(r=[r]),r.map(i=>[t].concat(Object.keys(i).map(n=>{let a=i[n];return Array.isArray(a)||(a=[a]),a.map(u=>u===!0?n:`${n}=${u}`).join("; ")})).join("; ")).join(", ")}).join(", ")}mT.exports={format:hF,parse:pF}});var Yd=V((wte,IT)=>{"use strict";var dF=require("events"),mF=require("https"),vF=require("http"),bT=require("net"),gF=require("tls"),{randomBytes:bF,createHash:xF}=require("crypto"),{Duplex:_te,Readable:yte}=require("stream"),{URL:ix}=require("url"),go=Hl(),_F=Vd(),yF=Wd(),{BINARY_TYPES:vT,EMPTY_BUFFER:Gd,GUID:wF,kForOnEventAttribute:nx,kListener:SF,kStatusCode:EF,kWebSocket:vi,NOOP:xT}=mo(),{EventTarget:{addEventListener:TF,removeEventListener:IF}}=dT(),{format:RF,parse:AF}=rx(),{toBuffer:OF}=Ul(),kF=30*1e3,_T=Symbol("kAborted"),sx=[8,13],xa=["CONNECTING","OPEN","CLOSING","CLOSED"],NF=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,Cr=class e extends dF{constructor(t,r,i){super(),this._binaryType=vT[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Gd,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,r===void 0?r=[]:Array.isArray(r)||(typeof r=="object"&&r!==null?(i=r,r=[]):r=[r]),yT(this,t,r,i)):(this._autoPong=i.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){vT.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,r,i){let n=new _F({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation});this._sender=new yF(t,this._extensions,i.generateMask),this._receiver=n,this._socket=t,n[vi]=this,t[vi]=this,n.on("conclude",MF),n.on("drain",CF),n.on("error",LF),n.on("message",DF),n.on("ping",UF),n.on("pong",qF),t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),r.length>0&&t.unshift(r),t.on("close",ST),t.on("data",Xd),t.on("end",ET),t.on("error",TT),this._readyState=e.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[go.extensionName]&&this._extensions[go.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,r){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){nn(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===e.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=e.CLOSING,this._sender.close(t,r,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),kF)}}pause(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,r,i){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(i=t,t=r=void 0):typeof r=="function"&&(i=r,r=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){ax(this,t,i);return}r===void 0&&(r=!this._isServer),this._sender.ping(t||Gd,r,i)}pong(t,r,i){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(i=t,t=r=void 0):typeof r=="function"&&(i=r,r=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){ax(this,t,i);return}r===void 0&&(r=!this._isServer),this._sender.pong(t||Gd,r,i)}resume(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,r,i){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof r=="function"&&(i=r,r={}),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){ax(this,t,i);return}let n={binary:typeof t!="string",mask:!this._isServer,compress:!0,fin:!0,...r};this._extensions[go.extensionName]||(n.compress=!1),this._sender.send(t||Gd,n,i)}terminate(){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){nn(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=e.CLOSING,this._socket.destroy())}}};Object.defineProperty(Cr,"CONNECTING",{enumerable:!0,value:xa.indexOf("CONNECTING")});Object.defineProperty(Cr.prototype,"CONNECTING",{enumerable:!0,value:xa.indexOf("CONNECTING")});Object.defineProperty(Cr,"OPEN",{enumerable:!0,value:xa.indexOf("OPEN")});Object.defineProperty(Cr.prototype,"OPEN",{enumerable:!0,value:xa.indexOf("OPEN")});Object.defineProperty(Cr,"CLOSING",{enumerable:!0,value:xa.indexOf("CLOSING")});Object.defineProperty(Cr.prototype,"CLOSING",{enumerable:!0,value:xa.indexOf("CLOSING")});Object.defineProperty(Cr,"CLOSED",{enumerable:!0,value:xa.indexOf("CLOSED")});Object.defineProperty(Cr.prototype,"CLOSED",{enumerable:!0,value:xa.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(e=>{Object.defineProperty(Cr.prototype,e,{enumerable:!0})});["open","error","close","message"].forEach(e=>{Object.defineProperty(Cr.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[nx])return t[SF];return null},set(t){for(let r of this.listeners(e))if(r[nx]){this.removeListener(e,r);break}typeof t=="function"&&this.addEventListener(e,t,{[nx]:!0})}})});Cr.prototype.addEventListener=TF;Cr.prototype.removeEventListener=IF;IT.exports=Cr;function yT(e,t,r,i){let n={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:sx[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=n.autoPong,!sx.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${sx.join(", ")})`);let a;if(t instanceof ix)a=t;else try{a=new ix(t)}catch{throw new SyntaxError(`Invalid URL: ${t}`)}a.protocol==="http:"?a.protocol="ws:":a.protocol==="https:"&&(a.protocol="wss:"),e._url=a.href;let u=a.protocol==="wss:",h=a.protocol==="ws+unix:",b;if(a.protocol!=="ws:"&&!u&&!h?b=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:h&&!a.pathname?b="The URL's pathname is empty":a.hash&&(b="The URL contains a fragment identifier"),b){let L=new SyntaxError(b);if(e._redirects===0)throw L;$d(e,L);return}let w=u?443:80,T=bF(16).toString("base64"),I=u?mF.request:vF.request,B=new Set,M;if(n.createConnection=n.createConnection||(u?BF:PF),n.defaultPort=n.defaultPort||w,n.port=a.port||w,n.host=a.hostname.startsWith("[")?a.hostname.slice(1,-1):a.hostname,n.headers={...n.headers,"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":T,Connection:"Upgrade",Upgrade:"websocket"},n.path=a.pathname+a.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(M=new go(n.perMessageDeflate!==!0?n.perMessageDeflate:{},!1,n.maxPayload),n.headers["Sec-WebSocket-Extensions"]=RF({[go.extensionName]:M.offer()})),r.length){for(let L of r){if(typeof L!="string"||!NF.test(L)||B.has(L))throw new SyntaxError("An invalid or duplicated subprotocol was specified");B.add(L)}n.headers["Sec-WebSocket-Protocol"]=r.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(a.username||a.password)&&(n.auth=`${a.username}:${a.password}`),h){let L=n.path.split(":");n.socketPath=L[0],n.path=L[1]}let P;if(n.followRedirects){if(e._redirects===0){e._originalIpc=h,e._originalSecure=u,e._originalHostOrSocketPath=h?n.socketPath:a.host;let L=i&&i.headers;if(i={...i,headers:{}},L)for(let[X,W]of Object.entries(L))i.headers[X.toLowerCase()]=W}else if(e.listenerCount("redirect")===0){let L=h?e._originalIpc?n.socketPath===e._originalHostOrSocketPath:!1:e._originalIpc?!1:a.host===e._originalHostOrSocketPath;(!L||e._originalSecure&&!u)&&(delete n.headers.authorization,delete n.headers.cookie,L||delete n.headers.host,n.auth=void 0)}n.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(n.auth).toString("base64")),P=e._req=I(n),e._redirects&&e.emit("redirect",e.url,P)}else P=e._req=I(n);n.timeout&&P.on("timeout",()=>{nn(e,P,"Opening handshake has timed out")}),P.on("error",L=>{P===null||P[_T]||(P=e._req=null,$d(e,L))}),P.on("response",L=>{let X=L.headers.location,W=L.statusCode;if(X&&n.followRedirects&&W>=300&&W<400){if(++e._redirects>n.maxRedirects){nn(e,P,"Maximum redirects exceeded");return}P.abort();let q;try{q=new ix(X,t)}catch{let fe=new SyntaxError(`Invalid URL: ${X}`);$d(e,fe);return}yT(e,q,r,i)}else e.emit("unexpected-response",P,L)||nn(e,P,`Unexpected server response: ${L.statusCode}`)}),P.on("upgrade",(L,X,W)=>{if(e.emit("upgrade",L),e.readyState!==Cr.CONNECTING)return;if(P=e._req=null,L.headers.upgrade.toLowerCase()!=="websocket"){nn(e,X,"Invalid Upgrade header");return}let q=xF("sha1").update(T+wF).digest("base64");if(L.headers["sec-websocket-accept"]!==q){nn(e,X,"Invalid Sec-WebSocket-Accept header");return}let ee=L.headers["sec-websocket-protocol"],fe;if(ee!==void 0?B.size?B.has(ee)||(fe="Server sent an invalid subprotocol"):fe="Server sent a subprotocol but none was requested":B.size&&(fe="Server sent no subprotocol"),fe){nn(e,X,fe);return}ee&&(e._protocol=ee);let _e=L.headers["sec-websocket-extensions"];if(_e!==void 0){if(!M){nn(e,X,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let Te;try{Te=AF(_e)}catch{nn(e,X,"Invalid Sec-WebSocket-Extensions header");return}let be=Object.keys(Te);if(be.length!==1||be[0]!==go.extensionName){nn(e,X,"Server indicated an extension that was not requested");return}try{M.accept(Te[go.extensionName])}catch{nn(e,X,"Invalid Sec-WebSocket-Extensions header");return}e._extensions[go.extensionName]=M}e.setSocket(X,W,{allowSynchronousEvents:n.allowSynchronousEvents,generateMask:n.generateMask,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})}),n.finishRequest?n.finishRequest(P,e):P.end()}function $d(e,t){e._readyState=Cr.CLOSING,e.emit("error",t),e.emitClose()}function PF(e){return e.path=e.socketPath,bT.connect(e)}function BF(e){return e.path=void 0,!e.servername&&e.servername!==""&&(e.servername=bT.isIP(e.host)?"":e.host),gF.connect(e)}function nn(e,t,r){e._readyState=Cr.CLOSING;let i=new Error(r);Error.captureStackTrace(i,nn),t.setHeader?(t[_T]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick($d,e,i)):(t.destroy(i),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function ax(e,t,r){if(t){let i=OF(t).length;e._socket?e._sender._bufferedBytes+=i:e._bufferedAmount+=i}if(r){let i=new Error(`WebSocket is not open: readyState ${e.readyState} (${xa[e.readyState]})`);process.nextTick(r,i)}}function MF(e,t){let r=this[vi];r._closeFrameReceived=!0,r._closeMessage=t,r._closeCode=e,r._socket[vi]!==void 0&&(r._socket.removeListener("data",Xd),process.nextTick(wT,r._socket),e===1005?r.close():r.close(e,t))}function CF(){let e=this[vi];e.isPaused||e._socket.resume()}function LF(e){let t=this[vi];t._socket[vi]!==void 0&&(t._socket.removeListener("data",Xd),process.nextTick(wT,t._socket),t.close(e[EF])),t.emit("error",e)}function gT(){this[vi].emitClose()}function DF(e,t){this[vi].emit("message",e,t)}function UF(e){let t=this[vi];t._autoPong&&t.pong(e,!this._isServer,xT),t.emit("ping",e)}function qF(e){this[vi].emit("pong",e)}function wT(e){e.resume()}function ST(){let e=this[vi];this.removeListener("close",ST),this.removeListener("data",Xd),this.removeListener("end",ET),e._readyState=Cr.CLOSING;let t;!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&(t=e._socket.read())!==null&&e._receiver.write(t),e._receiver.end(),this[vi]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",gT),e._receiver.on("finish",gT))}function Xd(e){this[vi]._receiver.write(e)||this.pause()}function ET(){let e=this[vi];e._readyState=Cr.CLOSING,e._receiver.end(),this.end()}function TT(){let e=this[vi];this.removeListener("error",TT),this.on("error",xT),e&&(e._readyState=Cr.CLOSING,this.destroy())}});var AT=V((Ste,RT)=>{"use strict";var{tokenChars:FF}=zl();function HF(e){let t=new Set,r=-1,i=-1,n=0;for(n;n<e.length;n++){let u=e.charCodeAt(n);if(i===-1&&FF[u]===1)r===-1&&(r=n);else if(n!==0&&(u===32||u===9))i===-1&&r!==-1&&(i=n);else if(u===44){if(r===-1)throw new SyntaxError(`Unexpected character at index ${n}`);i===-1&&(i=n);let h=e.slice(r,i);if(t.has(h))throw new SyntaxError(`The "${h}" subprotocol is duplicated`);t.add(h),r=i=-1}else throw new SyntaxError(`Unexpected character at index ${n}`)}if(r===-1||i!==-1)throw new SyntaxError("Unexpected end of input");let a=e.slice(r,n);if(t.has(a))throw new SyntaxError(`The "${a}" subprotocol is duplicated`);return t.add(a),t}RT.exports={parse:HF}});var cx=V((Tte,MT)=>{"use strict";var zF=require("events"),Zd=require("http"),{Duplex:Ete}=require("stream"),{createHash:jF}=require("crypto"),OT=rx(),xc=Hl(),VF=AT(),WF=Yd(),{GUID:KF,kWebSocket:GF}=mo(),$F=/^[+/0-9A-Za-z]{22}==$/,kT=0,NT=1,BT=2,ox=class extends zF{constructor(t,r){if(super(),t={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:WF,...t},t.port==null&&!t.server&&!t.noServer||t.port!=null&&(t.server||t.noServer)||t.server&&t.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(t.port!=null?(this._server=Zd.createServer((i,n)=>{let a=Zd.STATUS_CODES[426];n.writeHead(426,{"Content-Length":a.length,"Content-Type":"text/plain"}),n.end(a)}),this._server.listen(t.port,t.host,t.backlog,r)):t.server&&(this._server=t.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=XF(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,a,u)=>{this.handleUpgrade(n,a,u,i)}})}t.perMessageDeflate===!0&&(t.perMessageDeflate={}),t.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=t,this._state=kT}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(t){if(this._state===BT){t&&this.once("close",()=>{t(new Error("The server is not running"))}),process.nextTick(Kl,this);return}if(t&&this.once("close",t),this._state!==NT)if(this._state=NT,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(Kl,this):process.nextTick(Kl,this);else{let r=this._server;this._removeListeners(),this._removeListeners=this._server=null,r.close(()=>{Kl(this)})}}shouldHandle(t){if(this.options.path){let r=t.url.indexOf("?");if((r!==-1?t.url.slice(0,r):t.url)!==this.options.path)return!1}return!0}handleUpgrade(t,r,i,n){r.on("error",PT);let a=t.headers["sec-websocket-key"],u=+t.headers["sec-websocket-version"];if(t.method!=="GET"){_c(this,t,r,405,"Invalid HTTP method");return}if(t.headers.upgrade.toLowerCase()!=="websocket"){_c(this,t,r,400,"Invalid Upgrade header");return}if(!a||!$F.test(a)){_c(this,t,r,400,"Missing or invalid Sec-WebSocket-Key header");return}if(u!==8&&u!==13){_c(this,t,r,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(t)){Gl(r,400);return}let h=t.headers["sec-websocket-protocol"],b=new Set;if(h!==void 0)try{b=VF.parse(h)}catch{_c(this,t,r,400,"Invalid Sec-WebSocket-Protocol header");return}let w=t.headers["sec-websocket-extensions"],T={};if(this.options.perMessageDeflate&&w!==void 0){let I=new xc(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let B=OT.parse(w);B[xc.extensionName]&&(I.accept(B[xc.extensionName]),T[xc.extensionName]=I)}catch{_c(this,t,r,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let I={origin:t.headers[`${u===8?"sec-websocket-origin":"origin"}`],secure:!!(t.socket.authorized||t.socket.encrypted),req:t};if(this.options.verifyClient.length===2){this.options.verifyClient(I,(B,M,P,L)=>{if(!B)return Gl(r,M||401,P,L);this.completeUpgrade(T,a,b,t,r,i,n)});return}if(!this.options.verifyClient(I))return Gl(r,401)}this.completeUpgrade(T,a,b,t,r,i,n)}completeUpgrade(t,r,i,n,a,u,h){if(!a.readable||!a.writable)return a.destroy();if(a[GF])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>kT)return Gl(a,503);let w=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${jF("sha1").update(r+KF).digest("base64")}`],T=new this.options.WebSocket(null,void 0,this.options);if(i.size){let I=this.options.handleProtocols?this.options.handleProtocols(i,n):i.values().next().value;I&&(w.push(`Sec-WebSocket-Protocol: ${I}`),T._protocol=I)}if(t[xc.extensionName]){let I=t[xc.extensionName].params,B=OT.format({[xc.extensionName]:[I]});w.push(`Sec-WebSocket-Extensions: ${B}`),T._extensions=t}this.emit("headers",w,n),a.write(w.concat(`\r
20
+ }`;var ct=t1(function(){return It(P,Ee+"return "+oe).apply(e,M)});if(ct.source=oe,N0(ct))throw ct;return ct}function U8(s){return Tt(s).toLowerCase()}function D8(s){return Tt(s).toUpperCase()}function q8(s,a,h){if(s=Tt(s),s&&(h||a===e))return fb(s);if(!s||!(a=Fi(a)))return s;var y=En(s),R=En(a),P=lb(y,R),M=pb(y,R)+1;return Ra(y,P,M).join("")}function F8(s,a,h){if(s=Tt(s),s&&(h||a===e))return s.slice(0,db(s)+1);if(!s||!(a=Fi(a)))return s;var y=En(s),R=pb(y,En(a))+1;return Ra(y,0,R).join("")}function H8(s,a,h){if(s=Tt(s),s&&(h||a===e))return s.replace(Ft,"");if(!s||!(a=Fi(a)))return s;var y=En(s),R=lb(y,En(a));return Ra(y,R).join("")}function z8(s,a){var h=O,y=E;if(gr(a)){var R="separator"in a?a.separator:R;h="length"in a?at(a.length):h,y="omission"in a?Fi(a.omission):y}s=Tt(s);var P=s.length;if(wc(s)){var M=En(s);P=M.length}if(h>=P)return s;var L=h-Sc(y);if(L<1)return y;var F=M?Ra(M,0,L).join(""):s.slice(0,L);if(R===e)return F+y;if(M&&(L+=F.length-L),B0(R)){if(s.slice(L).search(R)){var te,re=F;for(R.global||(R=Yd(R.source,Tt(Ht.exec(R))+"g")),R.lastIndex=0;te=R.exec(re);)var oe=te.index;F=F.slice(0,oe===e?L:oe)}}else if(s.indexOf(Fi(R),L)!=L){var he=F.lastIndexOf(R);he>-1&&(F=F.slice(0,he))}return F+y}function V8(s){return s=Tt(s),s&&We.test(s)?s.replace(Wt,xR):s}var j8=Oc(function(s,a,h){return s+(h?" ":"")+a.toUpperCase()}),L0=r_("toUpperCase");function e1(s,a,h){return s=Tt(s),a=h?e:a,a===e?hR(s)?yR(s):nR(s):s.match(a)||[]}var t1=ft(function(s,a){try{return Di(s,e,a)}catch(h){return N0(h)?h:new He(h)}}),W8=Ds(function(s,a){return rn(a,function(h){h=ts(h),Ls(s,h,k0(s[h],s))}),s});function K8(s){var a=s==null?0:s.length,h=Oe();return s=a?mr(s,function(y){if(typeof y[1]!="function")throw new nn(n);return[h(y[0]),y[1]]}):[],ft(function(y){for(var R=-1;++R<a;){var P=s[R];if(Di(P[0],this,y))return Di(P[1],this,y)}})}function G8(s){return xA(an(s,w))}function U0(s){return function(){return s}}function $8(s,a){return s==null||s!==s?a:s}var Y8=n_(),Z8=n_(!0);function Ti(s){return s}function D0(s){return Mb(typeof s=="function"?s:an(s,w))}function X8(s){return Lb(an(s,w))}function J8(s,a){return Ub(s,an(a,w))}var Q8=ft(function(s,a){return function(h){return zu(h,s,a)}}),e5=ft(function(s,a){return function(h){return zu(s,h,a)}});function q0(s,a,h){var y=Yr(a),R=Yl(a,y);h==null&&!(gr(a)&&(R.length||!y.length))&&(h=a,a=s,s=this,R=Yl(a,Yr(a)));var P=!(gr(h)&&"chain"in h)||!!h.chain,M=Fs(s);return rn(R,function(L){var F=a[L];s[L]=F,M&&(s.prototype[L]=function(){var te=this.__chain__;if(P||te){var re=s(this.__wrapped__),oe=re.__actions__=Si(this.__actions__);return oe.push({func:F,args:arguments,thisArg:s}),re.__chain__=te,re}return F.apply(s,_a([this.value()],arguments))})}),s}function t5(){return $r._===this&&($r._=RR),this}function F0(){}function r5(s){return s=at(s),ft(function(a){return Db(a,s)})}var i5=g0(mr),n5=g0(sb),s5=g0(zd);function r1(s){return E0(s)?Vd(ts(s)):CA(s)}function a5(s){return function(a){return s==null?e:yo(s,a)}}var o5=a_(),c5=a_(!0);function H0(){return[]}function z0(){return!1}function u5(){return{}}function f5(){return""}function l5(){return!0}function p5(s,a){if(s=at(s),s<1||s>S)return[];var h=d,y=oi(s,d);a=Oe(a),s-=d;for(var R=Kd(y,a);++h<s;)a(h);return R}function h5(s){return Je(s)?mr(s,ts):Hi(s)?[s]:Si(w_(Tt(s)))}function d5(s){var a=++IR;return Tt(s)+a}var m5=tp(function(s,a){return s+a},0),v5=x0("ceil"),g5=tp(function(s,a){return s/a},1),x5=x0("floor");function b5(s){return s&&s.length?$l(s,Ti,i0):e}function _5(s,a){return s&&s.length?$l(s,Oe(a,2),i0):e}function y5(s){return cb(s,Ti)}function w5(s,a){return cb(s,Oe(a,2))}function S5(s){return s&&s.length?$l(s,Ti,o0):e}function E5(s,a){return s&&s.length?$l(s,Oe(a,2),o0):e}var I5=tp(function(s,a){return s*a},1),T5=x0("round"),R5=tp(function(s,a){return s-a},0);function A5(s){return s&&s.length?Wd(s,Ti):0}function O5(s,a){return s&&s.length?Wd(s,Oe(a,2)):0}return k.after=X4,k.ary=B_,k.assign=DO,k.assignIn=G_,k.assignInWith=dp,k.assignWith=qO,k.at=FO,k.before=M_,k.bind=k0,k.bindAll=W8,k.bindKey=C_,k.castArray=uO,k.chain=k_,k.chunk=x6,k.compact=b6,k.concat=_6,k.cond=K8,k.conforms=G8,k.constant=U0,k.countBy=A4,k.create=HO,k.curry=L_,k.curryRight=U_,k.debounce=D_,k.defaults=zO,k.defaultsDeep=VO,k.defer=J4,k.delay=Q4,k.difference=y6,k.differenceBy=w6,k.differenceWith=S6,k.drop=E6,k.dropRight=I6,k.dropRightWhile=T6,k.dropWhile=R6,k.fill=A6,k.filter=k4,k.flatMap=B4,k.flatMapDeep=M4,k.flatMapDepth=C4,k.flatten=T_,k.flattenDeep=O6,k.flattenDepth=k6,k.flip=eO,k.flow=Y8,k.flowRight=Z8,k.fromPairs=P6,k.functions=ZO,k.functionsIn=XO,k.groupBy=L4,k.initial=B6,k.intersection=M6,k.intersectionBy=C6,k.intersectionWith=L6,k.invert=QO,k.invertBy=e8,k.invokeMap=D4,k.iteratee=D0,k.keyBy=q4,k.keys=Yr,k.keysIn=Ii,k.map=cp,k.mapKeys=r8,k.mapValues=i8,k.matches=X8,k.matchesProperty=J8,k.memoize=fp,k.merge=n8,k.mergeWith=$_,k.method=Q8,k.methodOf=e5,k.mixin=q0,k.negate=lp,k.nthArg=r5,k.omit=s8,k.omitBy=a8,k.once=tO,k.orderBy=F4,k.over=i5,k.overArgs=rO,k.overEvery=n5,k.overSome=s5,k.partial=P0,k.partialRight=q_,k.partition=H4,k.pick=o8,k.pickBy=Y_,k.property=r1,k.propertyOf=a5,k.pull=F6,k.pullAll=A_,k.pullAllBy=H6,k.pullAllWith=z6,k.pullAt=V6,k.range=o5,k.rangeRight=c5,k.rearg=iO,k.reject=j4,k.remove=j6,k.rest=nO,k.reverse=A0,k.sampleSize=K4,k.set=u8,k.setWith=f8,k.shuffle=G4,k.slice=W6,k.sortBy=Z4,k.sortedUniq=J6,k.sortedUniqBy=Q6,k.split=B8,k.spread=sO,k.tail=e4,k.take=t4,k.takeRight=r4,k.takeRightWhile=i4,k.takeWhile=n4,k.tap=b4,k.throttle=aO,k.thru=op,k.toArray=j_,k.toPairs=Z_,k.toPairsIn=X_,k.toPath=h5,k.toPlainObject=K_,k.transform=l8,k.unary=oO,k.union=s4,k.unionBy=a4,k.unionWith=o4,k.uniq=c4,k.uniqBy=u4,k.uniqWith=f4,k.unset=p8,k.unzip=O0,k.unzipWith=O_,k.update=h8,k.updateWith=d8,k.values=Nc,k.valuesIn=m8,k.without=l4,k.words=e1,k.wrap=cO,k.xor=p4,k.xorBy=h4,k.xorWith=d4,k.zip=m4,k.zipObject=v4,k.zipObjectDeep=g4,k.zipWith=x4,k.entries=Z_,k.entriesIn=X_,k.extend=G_,k.extendWith=dp,q0(k,k),k.add=m5,k.attempt=t1,k.camelCase=b8,k.capitalize=J_,k.ceil=v5,k.clamp=v8,k.clone=fO,k.cloneDeep=pO,k.cloneDeepWith=hO,k.cloneWith=lO,k.conformsTo=dO,k.deburr=Q_,k.defaultTo=$8,k.divide=g5,k.endsWith=_8,k.eq=Tn,k.escape=y8,k.escapeRegExp=w8,k.every=O4,k.find=P4,k.findIndex=E_,k.findKey=jO,k.findLast=N4,k.findLastIndex=I_,k.findLastKey=WO,k.floor=x5,k.forEach=P_,k.forEachRight=N_,k.forIn=KO,k.forInRight=GO,k.forOwn=$O,k.forOwnRight=YO,k.get=M0,k.gt=mO,k.gte=vO,k.has=JO,k.hasIn=C0,k.head=R_,k.identity=Ti,k.includes=U4,k.indexOf=N6,k.inRange=g8,k.invoke=t8,k.isArguments=Eo,k.isArray=Je,k.isArrayBuffer=gO,k.isArrayLike=Ei,k.isArrayLikeObject=Ir,k.isBoolean=xO,k.isBuffer=Aa,k.isDate=bO,k.isElement=_O,k.isEmpty=yO,k.isEqual=wO,k.isEqualWith=SO,k.isError=N0,k.isFinite=EO,k.isFunction=Fs,k.isInteger=F_,k.isLength=pp,k.isMap=H_,k.isMatch=IO,k.isMatchWith=TO,k.isNaN=RO,k.isNative=AO,k.isNil=kO,k.isNull=OO,k.isNumber=z_,k.isObject=gr,k.isObjectLike=br,k.isPlainObject=$u,k.isRegExp=B0,k.isSafeInteger=PO,k.isSet=V_,k.isString=hp,k.isSymbol=Hi,k.isTypedArray=Pc,k.isUndefined=NO,k.isWeakMap=BO,k.isWeakSet=MO,k.join=U6,k.kebabCase=S8,k.last=cn,k.lastIndexOf=D6,k.lowerCase=E8,k.lowerFirst=I8,k.lt=CO,k.lte=LO,k.max=b5,k.maxBy=_5,k.mean=y5,k.meanBy=w5,k.min=S5,k.minBy=E5,k.stubArray=H0,k.stubFalse=z0,k.stubObject=u5,k.stubString=f5,k.stubTrue=l5,k.multiply=I5,k.nth=q6,k.noConflict=t5,k.noop=F0,k.now=up,k.pad=T8,k.padEnd=R8,k.padStart=A8,k.parseInt=O8,k.random=x8,k.reduce=z4,k.reduceRight=V4,k.repeat=k8,k.replace=P8,k.result=c8,k.round=T5,k.runInContext=q,k.sample=W4,k.size=$4,k.snakeCase=N8,k.some=Y4,k.sortedIndex=K6,k.sortedIndexBy=G6,k.sortedIndexOf=$6,k.sortedLastIndex=Y6,k.sortedLastIndexBy=Z6,k.sortedLastIndexOf=X6,k.startCase=M8,k.startsWith=C8,k.subtract=R5,k.sum=A5,k.sumBy=O5,k.template=L8,k.times=p5,k.toFinite=Hs,k.toInteger=at,k.toLength=W_,k.toLower=U8,k.toNumber=un,k.toSafeInteger=UO,k.toString=Tt,k.toUpper=D8,k.trim=q8,k.trimEnd=F8,k.trimStart=H8,k.truncate=z8,k.unescape=V8,k.uniqueId=d5,k.upperCase=j8,k.upperFirst=L0,k.each=P_,k.eachRight=N_,k.first=R_,q0(k,function(){var s={};return Qn(k,function(a,h){Ot.call(k.prototype,h)||(s[h]=a)}),s}(),{chain:!1}),k.VERSION=t,rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){k[s].placeholder=k}),rn(["drop","take"],function(s,a){dt.prototype[s]=function(h){h=h===e?1:zr(at(h),0);var y=this.__filtered__&&!a?new dt(this):this.clone();return y.__filtered__?y.__takeCount__=oi(h,y.__takeCount__):y.__views__.push({size:oi(h,d),type:s+(y.__dir__<0?"Right":"")}),y},dt.prototype[s+"Right"]=function(h){return this.reverse()[s](h).reverse()}}),rn(["filter","map","takeWhile"],function(s,a){var h=a+1,y=h==p||h==g;dt.prototype[s]=function(R){var P=this.clone();return P.__iteratees__.push({iteratee:Oe(R,3),type:h}),P.__filtered__=P.__filtered__||y,P}}),rn(["head","last"],function(s,a){var h="take"+(a?"Right":"");dt.prototype[s]=function(){return this[h](1).value()[0]}}),rn(["initial","tail"],function(s,a){var h="drop"+(a?"":"Right");dt.prototype[s]=function(){return this.__filtered__?new dt(this):this[h](1)}}),dt.prototype.compact=function(){return this.filter(Ti)},dt.prototype.find=function(s){return this.filter(s).head()},dt.prototype.findLast=function(s){return this.reverse().find(s)},dt.prototype.invokeMap=ft(function(s,a){return typeof s=="function"?new dt(this):this.map(function(h){return zu(h,s,a)})}),dt.prototype.reject=function(s){return this.filter(lp(Oe(s)))},dt.prototype.slice=function(s,a){s=at(s);var h=this;return h.__filtered__&&(s>0||a<0)?new dt(h):(s<0?h=h.takeRight(-s):s&&(h=h.drop(s)),a!==e&&(a=at(a),h=a<0?h.dropRight(-a):h.take(a-s)),h)},dt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},dt.prototype.toArray=function(){return this.take(d)},Qn(dt.prototype,function(s,a){var h=/^(?:filter|find|map|reject)|While$/.test(a),y=/^(?:head|last)$/.test(a),R=k[y?"take"+(a=="last"?"Right":""):a],P=y||/^find/.test(a);R&&(k.prototype[a]=function(){var M=this.__wrapped__,L=y?[1]:arguments,F=M instanceof dt,te=L[0],re=F||Je(M),oe=function(pt){var gt=R.apply(k,_a([pt],L));return y&&he?gt[0]:gt};re&&h&&typeof te=="function"&&te.length!=1&&(F=re=!1);var he=this.__chain__,Ee=!!this.__actions__.length,ke=P&&!he,ct=F&&!Ee;if(!P&&re){M=ct?M:new dt(this);var Pe=s.apply(M,L);return Pe.__actions__.push({func:op,args:[oe],thisArg:e}),new sn(Pe,he)}return ke&&ct?s.apply(this,L):(Pe=this.thru(oe),ke?y?Pe.value()[0]:Pe.value():Pe)})}),rn(["pop","push","shift","sort","splice","unshift"],function(s){var a=Bl[s],h=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",y=/^(?:pop|shift)$/.test(s);k.prototype[s]=function(){var R=arguments;if(y&&!this.__chain__){var P=this.value();return a.apply(Je(P)?P:[],R)}return this[h](function(M){return a.apply(Je(M)?M:[],R)})}}),Qn(dt.prototype,function(s,a){var h=k[a];if(h){var y=h.name+"";Ot.call(Tc,y)||(Tc[y]=[]),Tc[y].push({name:a,func:h})}}),Tc[ep(e,U).name]=[{name:"wrapper",func:e}],dt.prototype.clone=VR,dt.prototype.reverse=jR,dt.prototype.value=WR,k.prototype.at=_4,k.prototype.chain=y4,k.prototype.commit=w4,k.prototype.next=S4,k.prototype.plant=I4,k.prototype.reverse=T4,k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=R4,k.prototype.first=k.prototype.head,Cu&&(k.prototype[Cu]=E4),k},wa=wR();typeof define=="function"&&typeof define.amd=="object"&&define.amd?($r._=wa,define(function(){return wa})):vo?((vo.exports=wa)._=wa,Dd._=wa):$r._=wa}).call(Bc)});var s1=X((EU,L5)=>{L5.exports={name:"bitcore-lib",version:"10.7.0",description:"A pure and powerful JavaScript Bitcoin library.",author:"BitPay <dev@bitpay.com>",main:"index.js",scripts:{test:"gulp test","test:ci":"npm run test",coverage:"gulp coverage",build:"gulp",pub:"npm run build && npm publish"},keywords:["bitcoin","transaction","address","p2p","ecies","cryptocurrency","blockchain","payment","bip21","bip32","bip37","bip69","bip70","multisig"],repository:{type:"git",url:"https://github.com/bitpay/bitcore/tree/master/packages/bitcore-lib"},browser:{request:"browser-request"},dependencies:{bech32:"=2.0.0","bn.js":"=4.11.8",bs58:"^4.0.1","buffer-compare":"=1.1.1",elliptic:"^6.5.3",inherits:"=2.0.1",lodash:"^4.17.20"},devDependencies:{"bitcore-build":"^10.5.3",brfs:"^2.0.1",chai:"^4.2.0",gulp:"^4.0.0",sinon:"^7.1.1"},license:"MIT",gitHead:"f1efdbe2e7b17e22c586145c450d75ea94497591"}});var j0=X((a1,V0)=>{(function(e,t){"use strict";function r(E,f){if(!E)throw new Error(f||"Assertion failed")}function i(E,f){E.super_=f;var c=function(){};c.prototype=f.prototype,E.prototype=new c,E.prototype.constructor=E}function n(E,f,c){if(n.isBN(E))return E;this.negative=0,this.words=null,this.length=0,this.red=null,E!==null&&((f==="le"||f==="be")&&(c=f,f=10),this._init(E||0,f||10,c||"be"))}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var o;try{o=require("buffer").Buffer}catch{}n.isBN=function(f){return f instanceof n?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===n.wordSize&&Array.isArray(f.words)},n.max=function(f,c){return f.cmp(c)>0?f:c},n.min=function(f,c){return f.cmp(c)<0?f:c},n.prototype._init=function(f,c,p){if(typeof f=="number")return this._initNumber(f,c,p);if(typeof f=="object")return this._initArray(f,c,p);c==="hex"&&(c=16),r(c===(c|0)&&c>=2&&c<=36),f=f.toString().replace(/\s+/g,"");var v=0;f[0]==="-"&&v++,c===16?this._parseHex(f,v):this._parseBase(f,c,v),f[0]==="-"&&(this.negative=1),this.strip(),p==="le"&&this._initArray(this.toArray(),c,p)},n.prototype._initNumber=function(f,c,p){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(r(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),p==="le"&&this._initArray(this.toArray(),c,p)},n.prototype._initArray=function(f,c,p){if(r(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var v=0;v<this.length;v++)this.words[v]=0;var g,x,S=0;if(p==="be")for(v=f.length-1,g=0;v>=0;v-=3)x=f[v]|f[v-1]<<8|f[v-2]<<16,this.words[g]|=x<<S&67108863,this.words[g+1]=x>>>26-S&67108863,S+=24,S>=26&&(S-=26,g++);else if(p==="le")for(v=0,g=0;v<f.length;v+=3)x=f[v]|f[v+1]<<8|f[v+2]<<16,this.words[g]|=x<<S&67108863,this.words[g+1]=x>>>26-S&67108863,S+=24,S>=26&&(S-=26,g++);return this.strip()};function u(E,f,c){for(var p=0,v=Math.min(E.length,c),g=f;g<v;g++){var x=E.charCodeAt(g)-48;p<<=4,x>=49&&x<=54?p|=x-49+10:x>=17&&x<=22?p|=x-17+10:p|=x&15}return p}n.prototype._parseHex=function(f,c){this.length=Math.ceil((f.length-c)/6),this.words=new Array(this.length);for(var p=0;p<this.length;p++)this.words[p]=0;var v,g,x=0;for(p=f.length-6,v=0;p>=c;p-=6)g=u(f,p,p+6),this.words[v]|=g<<x&67108863,this.words[v+1]|=g>>>26-x&4194303,x+=24,x>=26&&(x-=26,v++);p+6!==c&&(g=u(f,c,p+6),this.words[v]|=g<<x&67108863,this.words[v+1]|=g>>>26-x&4194303),this.strip()};function m(E,f,c,p){for(var v=0,g=Math.min(E.length,c),x=f;x<g;x++){var S=E.charCodeAt(x)-48;v*=p,S>=49?v+=S-49+10:S>=17?v+=S-17+10:v+=S}return v}n.prototype._parseBase=function(f,c,p){this.words=[0],this.length=1;for(var v=0,g=1;g<=67108863;g*=c)v++;v--,g=g/c|0;for(var x=f.length-p,S=x%v,b=Math.min(x,x-S)+p,l=0,d=p;d<b;d+=v)l=m(f,d,d+v,c),this.imuln(g),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(S!==0){var A=1;for(l=m(f,d,f.length,c),d=0;d<S;d++)A*=c;this.imuln(A),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}},n.prototype.copy=function(f){f.words=new Array(this.length);for(var c=0;c<this.length;c++)f.words[c]=this.words[c];f.length=this.length,f.negative=this.negative,f.red=this.red},n.prototype.clone=function(){var f=new n(null);return this.copy(f),f},n.prototype._expand=function(f){for(;this.length<f;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],w=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],I=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(f,c){f=f||10,c=c|0||1;var p;if(f===16||f==="hex"){p="";for(var v=0,g=0,x=0;x<this.length;x++){var S=this.words[x],b=((S<<v|g)&16777215).toString(16);g=S>>>24-v&16777215,g!==0||x!==this.length-1?p=_[6-b.length]+b+p:p=b+p,v+=2,v>=26&&(v-=26,x--)}for(g!==0&&(p=g.toString(16)+p);p.length%c!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}if(f===(f|0)&&f>=2&&f<=36){var l=w[f],d=I[f];p="";var A=this.clone();for(A.negative=0;!A.isZero();){var D=A.modn(d).toString(f);A=A.idivn(d),A.isZero()?p=D+p:p=_[l-D.length]+D+p}for(this.isZero()&&(p="0"+p);p.length%c!==0;)p="0"+p;return this.negative!==0&&(p="-"+p),p}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(f,c){return r(typeof o<"u"),this.toArrayLike(o,f,c)},n.prototype.toArray=function(f,c){return this.toArrayLike(Array,f,c)},n.prototype.toArrayLike=function(f,c,p){var v=this.byteLength(),g=p||Math.max(1,v);r(v<=g,"byte array longer than desired length"),r(g>0,"Requested array length <= 0"),this.strip();var x=c==="le",S=new f(g),b,l,d=this.clone();if(x){for(l=0;!d.isZero();l++)b=d.andln(255),d.iushrn(8),S[l]=b;for(;l<g;l++)S[l]=0}else{for(l=0;l<g-v;l++)S[l]=0;for(l=0;!d.isZero();l++)b=d.andln(255),d.iushrn(8),S[g-l-1]=b}return S},Math.clz32?n.prototype._countBits=function(f){return 32-Math.clz32(f)}:n.prototype._countBits=function(f){var c=f,p=0;return c>=4096&&(p+=13,c>>>=13),c>=64&&(p+=7,c>>>=7),c>=8&&(p+=4,c>>>=4),c>=2&&(p+=2,c>>>=2),p+c},n.prototype._zeroBits=function(f){if(f===0)return 26;var c=f,p=0;return c&8191||(p+=13,c>>>=13),c&127||(p+=7,c>>>=7),c&15||(p+=4,c>>>=4),c&3||(p+=2,c>>>=2),c&1||p++,p},n.prototype.bitLength=function(){var f=this.words[this.length-1],c=this._countBits(f);return(this.length-1)*26+c};function T(E){for(var f=new Array(E.bitLength()),c=0;c<f.length;c++){var p=c/26|0,v=c%26;f[c]=(E.words[p]&1<<v)>>>v}return f}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,c=0;c<this.length;c++){var p=this._zeroBits(this.words[c]);if(f+=p,p!==26)break}return f},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},n.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var c=0;c<f.length;c++)this.words[c]=this.words[c]|f.words[c];return this.strip()},n.prototype.ior=function(f){return r((this.negative|f.negative)===0),this.iuor(f)},n.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},n.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},n.prototype.iuand=function(f){var c;this.length>f.length?c=f:c=this;for(var p=0;p<c.length;p++)this.words[p]=this.words[p]&f.words[p];return this.length=c.length,this.strip()},n.prototype.iand=function(f){return r((this.negative|f.negative)===0),this.iuand(f)},n.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},n.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},n.prototype.iuxor=function(f){var c,p;this.length>f.length?(c=this,p=f):(c=f,p=this);for(var v=0;v<p.length;v++)this.words[v]=c.words[v]^p.words[v];if(this!==c)for(;v<c.length;v++)this.words[v]=c.words[v];return this.length=c.length,this.strip()},n.prototype.ixor=function(f){return r((this.negative|f.negative)===0),this.iuxor(f)},n.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},n.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},n.prototype.inotn=function(f){r(typeof f=="number"&&f>=0);var c=Math.ceil(f/26)|0,p=f%26;this._expand(c),p>0&&c--;for(var v=0;v<c;v++)this.words[v]=~this.words[v]&67108863;return p>0&&(this.words[v]=~this.words[v]&67108863>>26-p),this.strip()},n.prototype.notn=function(f){return this.clone().inotn(f)},n.prototype.setn=function(f,c){r(typeof f=="number"&&f>=0);var p=f/26|0,v=f%26;return this._expand(p+1),c?this.words[p]=this.words[p]|1<<v:this.words[p]=this.words[p]&~(1<<v),this.strip()},n.prototype.iadd=function(f){var c;if(this.negative!==0&&f.negative===0)return this.negative=0,c=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,c=this.isub(f),f.negative=1,c._normSign();var p,v;this.length>f.length?(p=this,v=f):(p=f,v=this);for(var g=0,x=0;x<v.length;x++)c=(p.words[x]|0)+(v.words[x]|0)+g,this.words[x]=c&67108863,g=c>>>26;for(;g!==0&&x<p.length;x++)c=(p.words[x]|0)+g,this.words[x]=c&67108863,g=c>>>26;if(this.length=p.length,g!==0)this.words[this.length]=g,this.length++;else if(p!==this)for(;x<p.length;x++)this.words[x]=p.words[x];return this},n.prototype.add=function(f){var c;return f.negative!==0&&this.negative===0?(f.negative=0,c=this.sub(f),f.negative^=1,c):f.negative===0&&this.negative!==0?(this.negative=0,c=f.sub(this),this.negative=1,c):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},n.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var c=this.iadd(f);return f.negative=1,c._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var p=this.cmp(f);if(p===0)return this.negative=0,this.length=1,this.words[0]=0,this;var v,g;p>0?(v=this,g=f):(v=f,g=this);for(var x=0,S=0;S<g.length;S++)c=(v.words[S]|0)-(g.words[S]|0)+x,x=c>>26,this.words[S]=c&67108863;for(;x!==0&&S<v.length;S++)c=(v.words[S]|0)+x,x=c>>26,this.words[S]=c&67108863;if(x===0&&S<v.length&&v!==this)for(;S<v.length;S++)this.words[S]=v.words[S];return this.length=Math.max(this.length,S),v!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(f){return this.clone().isub(f)};function N(E,f,c){c.negative=f.negative^E.negative;var p=E.length+f.length|0;c.length=p,p=p-1|0;var v=E.words[0]|0,g=f.words[0]|0,x=v*g,S=x&67108863,b=x/67108864|0;c.words[0]=S;for(var l=1;l<p;l++){for(var d=b>>>26,A=b&67108863,D=Math.min(l,f.length-1),V=Math.max(0,l-E.length+1);V<=D;V++){var Y=l-V|0;v=E.words[Y]|0,g=f.words[V]|0,x=v*g+A,d+=x/67108864|0,A=x&67108863}c.words[l]=A|0,b=d|0}return b!==0?c.words[l]=b|0:c.length--,c.strip()}var C=function(f,c,p){var v=f.words,g=c.words,x=p.words,S=0,b,l,d,A=v[0]|0,D=A&8191,V=A>>>13,Y=v[1]|0,se=Y&8191,ae=Y>>>13,pe=v[2]|0,ye=pe&8191,de=pe>>>13,ht=v[3]|0,St=ht&8191,Re=ht>>>13,st=v[4]|0,et=st&8191,Ie=st>>>13,Te=v[5]|0,jt=Te&8191,Ve=Te>>>13,Rt=v[6]|0,vt=Rt&8191,Me=Rt>>>13,Pt=v[7]|0,Qt=Pt&8191,Ce=Pt>>>13,er=v[8]|0,At=er&8191,Be=er>>>13,Bt=v[9]|0,Mt=Bt&8191,Ue=Bt>>>13,Ct=g[0]|0,Lt=Ct&8191,De=Ct>>>13,Ut=g[1]|0,Dt=Ut&8191,qe=Ut>>>13,tr=g[2]|0,rr=tr&8191,je=tr>>>13,Wt=g[3]|0,Kt=Wt&8191,We=Wt>>>13,ir=g[4]|0,nr=ir&8191,Ke=ir>>>13,Gt=g[5]|0,sr=Gt&8191,Ge=Gt>>>13,ar=g[6]|0,qt=ar&8191,$e=ar>>>13,Ft=g[7]|0,or=Ft&8191,Ye=Ft>>>13,cr=g[8]|0,ur=cr&8191,Ze=cr>>>13,fr=g[9]|0,lr=fr&8191,Xe=fr>>>13;p.negative=f.negative^c.negative,p.length=19,b=Math.imul(D,Lt),l=Math.imul(D,De),l=l+Math.imul(V,Lt)|0,d=Math.imul(V,De);var Ht=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,b=Math.imul(se,Lt),l=Math.imul(se,De),l=l+Math.imul(ae,Lt)|0,d=Math.imul(ae,De),b=b+Math.imul(D,Dt)|0,l=l+Math.imul(D,qe)|0,l=l+Math.imul(V,Dt)|0,d=d+Math.imul(V,qe)|0;var ys=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(ys>>>26)|0,ys&=67108863,b=Math.imul(ye,Lt),l=Math.imul(ye,De),l=l+Math.imul(de,Lt)|0,d=Math.imul(de,De),b=b+Math.imul(se,Dt)|0,l=l+Math.imul(se,qe)|0,l=l+Math.imul(ae,Dt)|0,d=d+Math.imul(ae,qe)|0,b=b+Math.imul(D,rr)|0,l=l+Math.imul(D,je)|0,l=l+Math.imul(V,rr)|0,d=d+Math.imul(V,je)|0;var ws=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(ws>>>26)|0,ws&=67108863,b=Math.imul(St,Lt),l=Math.imul(St,De),l=l+Math.imul(Re,Lt)|0,d=Math.imul(Re,De),b=b+Math.imul(ye,Dt)|0,l=l+Math.imul(ye,qe)|0,l=l+Math.imul(de,Dt)|0,d=d+Math.imul(de,qe)|0,b=b+Math.imul(se,rr)|0,l=l+Math.imul(se,je)|0,l=l+Math.imul(ae,rr)|0,d=d+Math.imul(ae,je)|0,b=b+Math.imul(D,Kt)|0,l=l+Math.imul(D,We)|0,l=l+Math.imul(V,Kt)|0,d=d+Math.imul(V,We)|0;var Ss=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(Ss>>>26)|0,Ss&=67108863,b=Math.imul(et,Lt),l=Math.imul(et,De),l=l+Math.imul(Ie,Lt)|0,d=Math.imul(Ie,De),b=b+Math.imul(St,Dt)|0,l=l+Math.imul(St,qe)|0,l=l+Math.imul(Re,Dt)|0,d=d+Math.imul(Re,qe)|0,b=b+Math.imul(ye,rr)|0,l=l+Math.imul(ye,je)|0,l=l+Math.imul(de,rr)|0,d=d+Math.imul(de,je)|0,b=b+Math.imul(se,Kt)|0,l=l+Math.imul(se,We)|0,l=l+Math.imul(ae,Kt)|0,d=d+Math.imul(ae,We)|0,b=b+Math.imul(D,nr)|0,l=l+Math.imul(D,Ke)|0,l=l+Math.imul(V,nr)|0,d=d+Math.imul(V,Ke)|0;var Es=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(Es>>>26)|0,Es&=67108863,b=Math.imul(jt,Lt),l=Math.imul(jt,De),l=l+Math.imul(Ve,Lt)|0,d=Math.imul(Ve,De),b=b+Math.imul(et,Dt)|0,l=l+Math.imul(et,qe)|0,l=l+Math.imul(Ie,Dt)|0,d=d+Math.imul(Ie,qe)|0,b=b+Math.imul(St,rr)|0,l=l+Math.imul(St,je)|0,l=l+Math.imul(Re,rr)|0,d=d+Math.imul(Re,je)|0,b=b+Math.imul(ye,Kt)|0,l=l+Math.imul(ye,We)|0,l=l+Math.imul(de,Kt)|0,d=d+Math.imul(de,We)|0,b=b+Math.imul(se,nr)|0,l=l+Math.imul(se,Ke)|0,l=l+Math.imul(ae,nr)|0,d=d+Math.imul(ae,Ke)|0,b=b+Math.imul(D,sr)|0,l=l+Math.imul(D,Ge)|0,l=l+Math.imul(V,sr)|0,d=d+Math.imul(V,Ge)|0;var Is=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(Is>>>26)|0,Is&=67108863,b=Math.imul(vt,Lt),l=Math.imul(vt,De),l=l+Math.imul(Me,Lt)|0,d=Math.imul(Me,De),b=b+Math.imul(jt,Dt)|0,l=l+Math.imul(jt,qe)|0,l=l+Math.imul(Ve,Dt)|0,d=d+Math.imul(Ve,qe)|0,b=b+Math.imul(et,rr)|0,l=l+Math.imul(et,je)|0,l=l+Math.imul(Ie,rr)|0,d=d+Math.imul(Ie,je)|0,b=b+Math.imul(St,Kt)|0,l=l+Math.imul(St,We)|0,l=l+Math.imul(Re,Kt)|0,d=d+Math.imul(Re,We)|0,b=b+Math.imul(ye,nr)|0,l=l+Math.imul(ye,Ke)|0,l=l+Math.imul(de,nr)|0,d=d+Math.imul(de,Ke)|0,b=b+Math.imul(se,sr)|0,l=l+Math.imul(se,Ge)|0,l=l+Math.imul(ae,sr)|0,d=d+Math.imul(ae,Ge)|0,b=b+Math.imul(D,qt)|0,l=l+Math.imul(D,$e)|0,l=l+Math.imul(V,qt)|0,d=d+Math.imul(V,$e)|0;var Ts=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(Ts>>>26)|0,Ts&=67108863,b=Math.imul(Qt,Lt),l=Math.imul(Qt,De),l=l+Math.imul(Ce,Lt)|0,d=Math.imul(Ce,De),b=b+Math.imul(vt,Dt)|0,l=l+Math.imul(vt,qe)|0,l=l+Math.imul(Me,Dt)|0,d=d+Math.imul(Me,qe)|0,b=b+Math.imul(jt,rr)|0,l=l+Math.imul(jt,je)|0,l=l+Math.imul(Ve,rr)|0,d=d+Math.imul(Ve,je)|0,b=b+Math.imul(et,Kt)|0,l=l+Math.imul(et,We)|0,l=l+Math.imul(Ie,Kt)|0,d=d+Math.imul(Ie,We)|0,b=b+Math.imul(St,nr)|0,l=l+Math.imul(St,Ke)|0,l=l+Math.imul(Re,nr)|0,d=d+Math.imul(Re,Ke)|0,b=b+Math.imul(ye,sr)|0,l=l+Math.imul(ye,Ge)|0,l=l+Math.imul(de,sr)|0,d=d+Math.imul(de,Ge)|0,b=b+Math.imul(se,qt)|0,l=l+Math.imul(se,$e)|0,l=l+Math.imul(ae,qt)|0,d=d+Math.imul(ae,$e)|0,b=b+Math.imul(D,or)|0,l=l+Math.imul(D,Ye)|0,l=l+Math.imul(V,or)|0,d=d+Math.imul(V,Ye)|0;var Qi=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(Qi>>>26)|0,Qi&=67108863,b=Math.imul(At,Lt),l=Math.imul(At,De),l=l+Math.imul(Be,Lt)|0,d=Math.imul(Be,De),b=b+Math.imul(Qt,Dt)|0,l=l+Math.imul(Qt,qe)|0,l=l+Math.imul(Ce,Dt)|0,d=d+Math.imul(Ce,qe)|0,b=b+Math.imul(vt,rr)|0,l=l+Math.imul(vt,je)|0,l=l+Math.imul(Me,rr)|0,d=d+Math.imul(Me,je)|0,b=b+Math.imul(jt,Kt)|0,l=l+Math.imul(jt,We)|0,l=l+Math.imul(Ve,Kt)|0,d=d+Math.imul(Ve,We)|0,b=b+Math.imul(et,nr)|0,l=l+Math.imul(et,Ke)|0,l=l+Math.imul(Ie,nr)|0,d=d+Math.imul(Ie,Ke)|0,b=b+Math.imul(St,sr)|0,l=l+Math.imul(St,Ge)|0,l=l+Math.imul(Re,sr)|0,d=d+Math.imul(Re,Ge)|0,b=b+Math.imul(ye,qt)|0,l=l+Math.imul(ye,$e)|0,l=l+Math.imul(de,qt)|0,d=d+Math.imul(de,$e)|0,b=b+Math.imul(se,or)|0,l=l+Math.imul(se,Ye)|0,l=l+Math.imul(ae,or)|0,d=d+Math.imul(ae,Ye)|0,b=b+Math.imul(D,ur)|0,l=l+Math.imul(D,Ze)|0,l=l+Math.imul(V,ur)|0,d=d+Math.imul(V,Ze)|0;var Rs=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(Rs>>>26)|0,Rs&=67108863,b=Math.imul(Mt,Lt),l=Math.imul(Mt,De),l=l+Math.imul(Ue,Lt)|0,d=Math.imul(Ue,De),b=b+Math.imul(At,Dt)|0,l=l+Math.imul(At,qe)|0,l=l+Math.imul(Be,Dt)|0,d=d+Math.imul(Be,qe)|0,b=b+Math.imul(Qt,rr)|0,l=l+Math.imul(Qt,je)|0,l=l+Math.imul(Ce,rr)|0,d=d+Math.imul(Ce,je)|0,b=b+Math.imul(vt,Kt)|0,l=l+Math.imul(vt,We)|0,l=l+Math.imul(Me,Kt)|0,d=d+Math.imul(Me,We)|0,b=b+Math.imul(jt,nr)|0,l=l+Math.imul(jt,Ke)|0,l=l+Math.imul(Ve,nr)|0,d=d+Math.imul(Ve,Ke)|0,b=b+Math.imul(et,sr)|0,l=l+Math.imul(et,Ge)|0,l=l+Math.imul(Ie,sr)|0,d=d+Math.imul(Ie,Ge)|0,b=b+Math.imul(St,qt)|0,l=l+Math.imul(St,$e)|0,l=l+Math.imul(Re,qt)|0,d=d+Math.imul(Re,$e)|0,b=b+Math.imul(ye,or)|0,l=l+Math.imul(ye,Ye)|0,l=l+Math.imul(de,or)|0,d=d+Math.imul(de,Ye)|0,b=b+Math.imul(se,ur)|0,l=l+Math.imul(se,Ze)|0,l=l+Math.imul(ae,ur)|0,d=d+Math.imul(ae,Ze)|0,b=b+Math.imul(D,lr)|0,l=l+Math.imul(D,Xe)|0,l=l+Math.imul(V,lr)|0,d=d+Math.imul(V,Xe)|0;var en=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(en>>>26)|0,en&=67108863,b=Math.imul(Mt,Dt),l=Math.imul(Mt,qe),l=l+Math.imul(Ue,Dt)|0,d=Math.imul(Ue,qe),b=b+Math.imul(At,rr)|0,l=l+Math.imul(At,je)|0,l=l+Math.imul(Be,rr)|0,d=d+Math.imul(Be,je)|0,b=b+Math.imul(Qt,Kt)|0,l=l+Math.imul(Qt,We)|0,l=l+Math.imul(Ce,Kt)|0,d=d+Math.imul(Ce,We)|0,b=b+Math.imul(vt,nr)|0,l=l+Math.imul(vt,Ke)|0,l=l+Math.imul(Me,nr)|0,d=d+Math.imul(Me,Ke)|0,b=b+Math.imul(jt,sr)|0,l=l+Math.imul(jt,Ge)|0,l=l+Math.imul(Ve,sr)|0,d=d+Math.imul(Ve,Ge)|0,b=b+Math.imul(et,qt)|0,l=l+Math.imul(et,$e)|0,l=l+Math.imul(Ie,qt)|0,d=d+Math.imul(Ie,$e)|0,b=b+Math.imul(St,or)|0,l=l+Math.imul(St,Ye)|0,l=l+Math.imul(Re,or)|0,d=d+Math.imul(Re,Ye)|0,b=b+Math.imul(ye,ur)|0,l=l+Math.imul(ye,Ze)|0,l=l+Math.imul(de,ur)|0,d=d+Math.imul(de,Ze)|0,b=b+Math.imul(se,lr)|0,l=l+Math.imul(se,Xe)|0,l=l+Math.imul(ae,lr)|0,d=d+Math.imul(ae,Xe)|0;var As=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(As>>>26)|0,As&=67108863,b=Math.imul(Mt,rr),l=Math.imul(Mt,je),l=l+Math.imul(Ue,rr)|0,d=Math.imul(Ue,je),b=b+Math.imul(At,Kt)|0,l=l+Math.imul(At,We)|0,l=l+Math.imul(Be,Kt)|0,d=d+Math.imul(Be,We)|0,b=b+Math.imul(Qt,nr)|0,l=l+Math.imul(Qt,Ke)|0,l=l+Math.imul(Ce,nr)|0,d=d+Math.imul(Ce,Ke)|0,b=b+Math.imul(vt,sr)|0,l=l+Math.imul(vt,Ge)|0,l=l+Math.imul(Me,sr)|0,d=d+Math.imul(Me,Ge)|0,b=b+Math.imul(jt,qt)|0,l=l+Math.imul(jt,$e)|0,l=l+Math.imul(Ve,qt)|0,d=d+Math.imul(Ve,$e)|0,b=b+Math.imul(et,or)|0,l=l+Math.imul(et,Ye)|0,l=l+Math.imul(Ie,or)|0,d=d+Math.imul(Ie,Ye)|0,b=b+Math.imul(St,ur)|0,l=l+Math.imul(St,Ze)|0,l=l+Math.imul(Re,ur)|0,d=d+Math.imul(Re,Ze)|0,b=b+Math.imul(ye,lr)|0,l=l+Math.imul(ye,Xe)|0,l=l+Math.imul(de,lr)|0,d=d+Math.imul(de,Xe)|0;var Os=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(Os>>>26)|0,Os&=67108863,b=Math.imul(Mt,Kt),l=Math.imul(Mt,We),l=l+Math.imul(Ue,Kt)|0,d=Math.imul(Ue,We),b=b+Math.imul(At,nr)|0,l=l+Math.imul(At,Ke)|0,l=l+Math.imul(Be,nr)|0,d=d+Math.imul(Be,Ke)|0,b=b+Math.imul(Qt,sr)|0,l=l+Math.imul(Qt,Ge)|0,l=l+Math.imul(Ce,sr)|0,d=d+Math.imul(Ce,Ge)|0,b=b+Math.imul(vt,qt)|0,l=l+Math.imul(vt,$e)|0,l=l+Math.imul(Me,qt)|0,d=d+Math.imul(Me,$e)|0,b=b+Math.imul(jt,or)|0,l=l+Math.imul(jt,Ye)|0,l=l+Math.imul(Ve,or)|0,d=d+Math.imul(Ve,Ye)|0,b=b+Math.imul(et,ur)|0,l=l+Math.imul(et,Ze)|0,l=l+Math.imul(Ie,ur)|0,d=d+Math.imul(Ie,Ze)|0,b=b+Math.imul(St,lr)|0,l=l+Math.imul(St,Xe)|0,l=l+Math.imul(Re,lr)|0,d=d+Math.imul(Re,Xe)|0;var ks=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(ks>>>26)|0,ks&=67108863,b=Math.imul(Mt,nr),l=Math.imul(Mt,Ke),l=l+Math.imul(Ue,nr)|0,d=Math.imul(Ue,Ke),b=b+Math.imul(At,sr)|0,l=l+Math.imul(At,Ge)|0,l=l+Math.imul(Be,sr)|0,d=d+Math.imul(Be,Ge)|0,b=b+Math.imul(Qt,qt)|0,l=l+Math.imul(Qt,$e)|0,l=l+Math.imul(Ce,qt)|0,d=d+Math.imul(Ce,$e)|0,b=b+Math.imul(vt,or)|0,l=l+Math.imul(vt,Ye)|0,l=l+Math.imul(Me,or)|0,d=d+Math.imul(Me,Ye)|0,b=b+Math.imul(jt,ur)|0,l=l+Math.imul(jt,Ze)|0,l=l+Math.imul(Ve,ur)|0,d=d+Math.imul(Ve,Ze)|0,b=b+Math.imul(et,lr)|0,l=l+Math.imul(et,Xe)|0,l=l+Math.imul(Ie,lr)|0,d=d+Math.imul(Ie,Xe)|0;var Zn=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(Zn>>>26)|0,Zn&=67108863,b=Math.imul(Mt,sr),l=Math.imul(Mt,Ge),l=l+Math.imul(Ue,sr)|0,d=Math.imul(Ue,Ge),b=b+Math.imul(At,qt)|0,l=l+Math.imul(At,$e)|0,l=l+Math.imul(Be,qt)|0,d=d+Math.imul(Be,$e)|0,b=b+Math.imul(Qt,or)|0,l=l+Math.imul(Qt,Ye)|0,l=l+Math.imul(Ce,or)|0,d=d+Math.imul(Ce,Ye)|0,b=b+Math.imul(vt,ur)|0,l=l+Math.imul(vt,Ze)|0,l=l+Math.imul(Me,ur)|0,d=d+Math.imul(Me,Ze)|0,b=b+Math.imul(jt,lr)|0,l=l+Math.imul(jt,Xe)|0,l=l+Math.imul(Ve,lr)|0,d=d+Math.imul(Ve,Xe)|0;var Xn=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,b=Math.imul(Mt,qt),l=Math.imul(Mt,$e),l=l+Math.imul(Ue,qt)|0,d=Math.imul(Ue,$e),b=b+Math.imul(At,or)|0,l=l+Math.imul(At,Ye)|0,l=l+Math.imul(Be,or)|0,d=d+Math.imul(Be,Ye)|0,b=b+Math.imul(Qt,ur)|0,l=l+Math.imul(Qt,Ze)|0,l=l+Math.imul(Ce,ur)|0,d=d+Math.imul(Ce,Ze)|0,b=b+Math.imul(vt,lr)|0,l=l+Math.imul(vt,Xe)|0,l=l+Math.imul(Me,lr)|0,d=d+Math.imul(Me,Xe)|0;var Jn=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(Jn>>>26)|0,Jn&=67108863,b=Math.imul(Mt,or),l=Math.imul(Mt,Ye),l=l+Math.imul(Ue,or)|0,d=Math.imul(Ue,Ye),b=b+Math.imul(At,ur)|0,l=l+Math.imul(At,Ze)|0,l=l+Math.imul(Be,ur)|0,d=d+Math.imul(Be,Ze)|0,b=b+Math.imul(Qt,lr)|0,l=l+Math.imul(Qt,Xe)|0,l=l+Math.imul(Ce,lr)|0,d=d+Math.imul(Ce,Xe)|0;var Ps=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(Ps>>>26)|0,Ps&=67108863,b=Math.imul(Mt,ur),l=Math.imul(Mt,Ze),l=l+Math.imul(Ue,ur)|0,d=Math.imul(Ue,Ze),b=b+Math.imul(At,lr)|0,l=l+Math.imul(At,Xe)|0,l=l+Math.imul(Be,lr)|0,d=d+Math.imul(Be,Xe)|0;var Ns=(S+b|0)+((l&8191)<<13)|0;S=(d+(l>>>13)|0)+(Ns>>>26)|0,Ns&=67108863,b=Math.imul(Mt,lr),l=Math.imul(Mt,Xe),l=l+Math.imul(Ue,lr)|0,d=Math.imul(Ue,Xe);var Bs=(S+b|0)+((l&8191)<<13)|0;return S=(d+(l>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,x[0]=Ht,x[1]=ys,x[2]=ws,x[3]=Ss,x[4]=Es,x[5]=Is,x[6]=Ts,x[7]=Qi,x[8]=Rs,x[9]=en,x[10]=As,x[11]=Os,x[12]=ks,x[13]=Zn,x[14]=Xn,x[15]=Jn,x[16]=Ps,x[17]=Ns,x[18]=Bs,S!==0&&(x[19]=S,p.length++),p};Math.imul||(C=N);function B(E,f,c){c.negative=f.negative^E.negative,c.length=E.length+f.length;for(var p=0,v=0,g=0;g<c.length-1;g++){var x=v;v=0;for(var S=p&67108863,b=Math.min(g,f.length-1),l=Math.max(0,g-E.length+1);l<=b;l++){var d=g-l,A=E.words[d]|0,D=f.words[l]|0,V=A*D,Y=V&67108863;x=x+(V/67108864|0)|0,Y=Y+S|0,S=Y&67108863,x=x+(Y>>>26)|0,v+=x>>>26,x&=67108863}c.words[g]=S,p=x,x=v}return p!==0?c.words[g]=p:c.length--,c.strip()}function U(E,f,c){var p=new Z;return p.mulp(E,f,c)}n.prototype.mulTo=function(f,c){var p,v=this.length+f.length;return this.length===10&&f.length===10?p=C(this,f,c):v<63?p=N(this,f,c):v<1024?p=B(this,f,c):p=U(this,f,c),p};function Z(E,f){this.x=E,this.y=f}Z.prototype.makeRBT=function(f){for(var c=new Array(f),p=n.prototype._countBits(f)-1,v=0;v<f;v++)c[v]=this.revBin(v,p,f);return c},Z.prototype.revBin=function(f,c,p){if(f===0||f===p-1)return f;for(var v=0,g=0;g<c;g++)v|=(f&1)<<c-g-1,f>>=1;return v},Z.prototype.permute=function(f,c,p,v,g,x){for(var S=0;S<x;S++)v[S]=c[f[S]],g[S]=p[f[S]]},Z.prototype.transform=function(f,c,p,v,g,x){this.permute(x,f,c,p,v,g);for(var S=1;S<g;S<<=1)for(var b=S<<1,l=Math.cos(2*Math.PI/b),d=Math.sin(2*Math.PI/b),A=0;A<g;A+=b)for(var D=l,V=d,Y=0;Y<S;Y++){var se=p[A+Y],ae=v[A+Y],pe=p[A+Y+S],ye=v[A+Y+S],de=D*pe-V*ye;ye=D*ye+V*pe,pe=de,p[A+Y]=se+pe,v[A+Y]=ae+ye,p[A+Y+S]=se-pe,v[A+Y+S]=ae-ye,Y!==b&&(de=l*D-d*V,V=l*V+d*D,D=de)}},Z.prototype.guessLen13b=function(f,c){var p=Math.max(c,f)|1,v=p&1,g=0;for(p=p/2|0;p;p=p>>>1)g++;return 1<<g+1+v},Z.prototype.conjugate=function(f,c,p){if(!(p<=1))for(var v=0;v<p/2;v++){var g=f[v];f[v]=f[p-v-1],f[p-v-1]=g,g=c[v],c[v]=-c[p-v-1],c[p-v-1]=-g}},Z.prototype.normalize13b=function(f,c){for(var p=0,v=0;v<c/2;v++){var g=Math.round(f[2*v+1]/c)*8192+Math.round(f[2*v]/c)+p;f[v]=g&67108863,g<67108864?p=0:p=g/67108864|0}return f},Z.prototype.convert13b=function(f,c,p,v){for(var g=0,x=0;x<c;x++)g=g+(f[x]|0),p[2*x]=g&8191,g=g>>>13,p[2*x+1]=g&8191,g=g>>>13;for(x=2*c;x<v;++x)p[x]=0;r(g===0),r((g&-8192)===0)},Z.prototype.stub=function(f){for(var c=new Array(f),p=0;p<f;p++)c[p]=0;return c},Z.prototype.mulp=function(f,c,p){var v=2*this.guessLen13b(f.length,c.length),g=this.makeRBT(v),x=this.stub(v),S=new Array(v),b=new Array(v),l=new Array(v),d=new Array(v),A=new Array(v),D=new Array(v),V=p.words;V.length=v,this.convert13b(f.words,f.length,S,v),this.convert13b(c.words,c.length,d,v),this.transform(S,x,b,l,v,g),this.transform(d,x,A,D,v,g);for(var Y=0;Y<v;Y++){var se=b[Y]*A[Y]-l[Y]*D[Y];l[Y]=b[Y]*D[Y]+l[Y]*A[Y],b[Y]=se}return this.conjugate(b,l,v),this.transform(b,l,V,x,v,g),this.conjugate(V,x,v),this.normalize13b(V,v),p.negative=f.negative^c.negative,p.length=f.length+c.length,p.strip()},n.prototype.mul=function(f){var c=new n(null);return c.words=new Array(this.length+f.length),this.mulTo(f,c)},n.prototype.mulf=function(f){var c=new n(null);return c.words=new Array(this.length+f.length),U(this,f,c)},n.prototype.imul=function(f){return this.clone().mulTo(f,this)},n.prototype.imuln=function(f){r(typeof f=="number"),r(f<67108864);for(var c=0,p=0;p<this.length;p++){var v=(this.words[p]|0)*f,g=(v&67108863)+(c&67108863);c>>=26,c+=v/67108864|0,c+=g>>>26,this.words[p]=g&67108863}return c!==0&&(this.words[p]=c,this.length++),this},n.prototype.muln=function(f){return this.clone().imuln(f)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(f){var c=T(f);if(c.length===0)return new n(1);for(var p=this,v=0;v<c.length&&c[v]===0;v++,p=p.sqr());if(++v<c.length)for(var g=p.sqr();v<c.length;v++,g=g.sqr())c[v]!==0&&(p=p.mul(g));return p},n.prototype.iushln=function(f){r(typeof f=="number"&&f>=0);var c=f%26,p=(f-c)/26,v=67108863>>>26-c<<26-c,g;if(c!==0){var x=0;for(g=0;g<this.length;g++){var S=this.words[g]&v,b=(this.words[g]|0)-S<<c;this.words[g]=b|x,x=S>>>26-c}x&&(this.words[g]=x,this.length++)}if(p!==0){for(g=this.length-1;g>=0;g--)this.words[g+p]=this.words[g];for(g=0;g<p;g++)this.words[g]=0;this.length+=p}return this.strip()},n.prototype.ishln=function(f){return r(this.negative===0),this.iushln(f)},n.prototype.iushrn=function(f,c,p){r(typeof f=="number"&&f>=0);var v;c?v=(c-c%26)/26:v=0;var g=f%26,x=Math.min((f-g)/26,this.length),S=67108863^67108863>>>g<<g,b=p;if(v-=x,v=Math.max(0,v),b){for(var l=0;l<x;l++)b.words[l]=this.words[l];b.length=x}if(x!==0)if(this.length>x)for(this.length-=x,l=0;l<this.length;l++)this.words[l]=this.words[l+x];else this.words[0]=0,this.length=1;var d=0;for(l=this.length-1;l>=0&&(d!==0||l>=v);l--){var A=this.words[l]|0;this.words[l]=d<<26-g|A>>>g,d=A&S}return b&&d!==0&&(b.words[b.length++]=d),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(f,c,p){return r(this.negative===0),this.iushrn(f,c,p)},n.prototype.shln=function(f){return this.clone().ishln(f)},n.prototype.ushln=function(f){return this.clone().iushln(f)},n.prototype.shrn=function(f){return this.clone().ishrn(f)},n.prototype.ushrn=function(f){return this.clone().iushrn(f)},n.prototype.testn=function(f){r(typeof f=="number"&&f>=0);var c=f%26,p=(f-c)/26,v=1<<c;if(this.length<=p)return!1;var g=this.words[p];return!!(g&v)},n.prototype.imaskn=function(f){r(typeof f=="number"&&f>=0);var c=f%26,p=(f-c)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=p)return this;if(c!==0&&p++,this.length=Math.min(p,this.length),c!==0){var v=67108863^67108863>>>c<<c;this.words[this.length-1]&=v}return this.strip()},n.prototype.maskn=function(f){return this.clone().imaskn(f)},n.prototype.iaddn=function(f){return r(typeof f=="number"),r(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},n.prototype._iaddn=function(f){this.words[0]+=f;for(var c=0;c<this.length&&this.words[c]>=67108864;c++)this.words[c]-=67108864,c===this.length-1?this.words[c+1]=1:this.words[c+1]++;return this.length=Math.max(this.length,c+1),this},n.prototype.isubn=function(f){if(r(typeof f=="number"),r(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var c=0;c<this.length&&this.words[c]<0;c++)this.words[c]+=67108864,this.words[c+1]-=1;return this.strip()},n.prototype.addn=function(f){return this.clone().iaddn(f)},n.prototype.subn=function(f){return this.clone().isubn(f)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(f,c,p){var v=f.length+p,g;this._expand(v);var x,S=0;for(g=0;g<f.length;g++){x=(this.words[g+p]|0)+S;var b=(f.words[g]|0)*c;x-=b&67108863,S=(x>>26)-(b/67108864|0),this.words[g+p]=x&67108863}for(;g<this.length-p;g++)x=(this.words[g+p]|0)+S,S=x>>26,this.words[g+p]=x&67108863;if(S===0)return this.strip();for(r(S===-1),S=0,g=0;g<this.length;g++)x=-(this.words[g]|0)+S,S=x>>26,this.words[g]=x&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(f,c){var p=this.length-f.length,v=this.clone(),g=f,x=g.words[g.length-1]|0,S=this._countBits(x);p=26-S,p!==0&&(g=g.ushln(p),v.iushln(p),x=g.words[g.length-1]|0);var b=v.length-g.length,l;if(c!=="mod"){l=new n(null),l.length=b+1,l.words=new Array(l.length);for(var d=0;d<l.length;d++)l.words[d]=0}var A=v.clone()._ishlnsubmul(g,1,b);A.negative===0&&(v=A,l&&(l.words[b]=1));for(var D=b-1;D>=0;D--){var V=(v.words[g.length+D]|0)*67108864+(v.words[g.length+D-1]|0);for(V=Math.min(V/x|0,67108863),v._ishlnsubmul(g,V,D);v.negative!==0;)V--,v.negative=0,v._ishlnsubmul(g,1,D),v.isZero()||(v.negative^=1);l&&(l.words[D]=V)}return l&&l.strip(),v.strip(),c!=="div"&&p!==0&&v.iushrn(p),{div:l||null,mod:v}},n.prototype.divmod=function(f,c,p){if(r(!f.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var v,g,x;return this.negative!==0&&f.negative===0?(x=this.neg().divmod(f,c),c!=="mod"&&(v=x.div.neg()),c!=="div"&&(g=x.mod.neg(),p&&g.negative!==0&&g.iadd(f)),{div:v,mod:g}):this.negative===0&&f.negative!==0?(x=this.divmod(f.neg(),c),c!=="mod"&&(v=x.div.neg()),{div:v,mod:x.mod}):this.negative&f.negative?(x=this.neg().divmod(f.neg(),c),c!=="div"&&(g=x.mod.neg(),p&&g.negative!==0&&g.isub(f)),{div:x.div,mod:g}):f.length>this.length||this.cmp(f)<0?{div:new n(0),mod:this}:f.length===1?c==="div"?{div:this.divn(f.words[0]),mod:null}:c==="mod"?{div:null,mod:new n(this.modn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new n(this.modn(f.words[0]))}:this._wordDiv(f,c)},n.prototype.div=function(f){return this.divmod(f,"div",!1).div},n.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},n.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},n.prototype.divRound=function(f){var c=this.divmod(f);if(c.mod.isZero())return c.div;var p=c.div.negative!==0?c.mod.isub(f):c.mod,v=f.ushrn(1),g=f.andln(1),x=p.cmp(v);return x<0||g===1&&x===0?c.div:c.div.negative!==0?c.div.isubn(1):c.div.iaddn(1)},n.prototype.modn=function(f){r(f<=67108863);for(var c=(1<<26)%f,p=0,v=this.length-1;v>=0;v--)p=(c*p+(this.words[v]|0))%f;return p},n.prototype.idivn=function(f){r(f<=67108863);for(var c=0,p=this.length-1;p>=0;p--){var v=(this.words[p]|0)+c*67108864;this.words[p]=v/f|0,c=v%f}return this.strip()},n.prototype.divn=function(f){return this.clone().idivn(f)},n.prototype.egcd=function(f){r(f.negative===0),r(!f.isZero());var c=this,p=f.clone();c.negative!==0?c=c.umod(f):c=c.clone();for(var v=new n(1),g=new n(0),x=new n(0),S=new n(1),b=0;c.isEven()&&p.isEven();)c.iushrn(1),p.iushrn(1),++b;for(var l=p.clone(),d=c.clone();!c.isZero();){for(var A=0,D=1;!(c.words[0]&D)&&A<26;++A,D<<=1);if(A>0)for(c.iushrn(A);A-- >0;)(v.isOdd()||g.isOdd())&&(v.iadd(l),g.isub(d)),v.iushrn(1),g.iushrn(1);for(var V=0,Y=1;!(p.words[0]&Y)&&V<26;++V,Y<<=1);if(V>0)for(p.iushrn(V);V-- >0;)(x.isOdd()||S.isOdd())&&(x.iadd(l),S.isub(d)),x.iushrn(1),S.iushrn(1);c.cmp(p)>=0?(c.isub(p),v.isub(x),g.isub(S)):(p.isub(c),x.isub(v),S.isub(g))}return{a:x,b:S,gcd:p.iushln(b)}},n.prototype._invmp=function(f){r(f.negative===0),r(!f.isZero());var c=this,p=f.clone();c.negative!==0?c=c.umod(f):c=c.clone();for(var v=new n(1),g=new n(0),x=p.clone();c.cmpn(1)>0&&p.cmpn(1)>0;){for(var S=0,b=1;!(c.words[0]&b)&&S<26;++S,b<<=1);if(S>0)for(c.iushrn(S);S-- >0;)v.isOdd()&&v.iadd(x),v.iushrn(1);for(var l=0,d=1;!(p.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(p.iushrn(l);l-- >0;)g.isOdd()&&g.iadd(x),g.iushrn(1);c.cmp(p)>=0?(c.isub(p),v.isub(g)):(p.isub(c),g.isub(v))}var A;return c.cmpn(1)===0?A=v:A=g,A.cmpn(0)<0&&A.iadd(f),A},n.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var c=this.clone(),p=f.clone();c.negative=0,p.negative=0;for(var v=0;c.isEven()&&p.isEven();v++)c.iushrn(1),p.iushrn(1);do{for(;c.isEven();)c.iushrn(1);for(;p.isEven();)p.iushrn(1);var g=c.cmp(p);if(g<0){var x=c;c=p,p=x}else if(g===0||p.cmpn(1)===0)break;c.isub(p)}while(!0);return p.iushln(v)},n.prototype.invm=function(f){return this.egcd(f).a.umod(f)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(f){return this.words[0]&f},n.prototype.bincn=function(f){r(typeof f=="number");var c=f%26,p=(f-c)/26,v=1<<c;if(this.length<=p)return this._expand(p+1),this.words[p]|=v,this;for(var g=v,x=p;g!==0&&x<this.length;x++){var S=this.words[x]|0;S+=g,g=S>>>26,S&=67108863,this.words[x]=S}return g!==0&&(this.words[x]=g,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(f){var c=f<0;if(this.negative!==0&&!c)return-1;if(this.negative===0&&c)return 1;this.strip();var p;if(this.length>1)p=1;else{c&&(f=-f),r(f<=67108863,"Number is too big");var v=this.words[0]|0;p=v===f?0:v<f?-1:1}return this.negative!==0?-p|0:p},n.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return-1;if(this.negative===0&&f.negative!==0)return 1;var c=this.ucmp(f);return this.negative!==0?-c|0:c},n.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return-1;for(var c=0,p=this.length-1;p>=0;p--){var v=this.words[p]|0,g=f.words[p]|0;if(v!==g){v<g?c=-1:v>g&&(c=1);break}}return c},n.prototype.gtn=function(f){return this.cmpn(f)===1},n.prototype.gt=function(f){return this.cmp(f)===1},n.prototype.gten=function(f){return this.cmpn(f)>=0},n.prototype.gte=function(f){return this.cmp(f)>=0},n.prototype.ltn=function(f){return this.cmpn(f)===-1},n.prototype.lt=function(f){return this.cmp(f)===-1},n.prototype.lten=function(f){return this.cmpn(f)<=0},n.prototype.lte=function(f){return this.cmp(f)<=0},n.prototype.eqn=function(f){return this.cmpn(f)===0},n.prototype.eq=function(f){return this.cmp(f)===0},n.red=function(f){return new me(f)},n.prototype.toRed=function(f){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(f){return this.red=f,this},n.prototype.forceRed=function(f){return r(!this.red,"Already a number in reduction context"),this._forceRed(f)},n.prototype.redAdd=function(f){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},n.prototype.redIAdd=function(f){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},n.prototype.redSub=function(f){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},n.prototype.redISub=function(f){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},n.prototype.redShl=function(f){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},n.prototype.redMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},n.prototype.redIMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(f){return r(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var $={k256:null,p224:null,p192:null,p25519:null};function H(E,f){this.name=E,this.p=new n(f,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}H.prototype._tmp=function(){var f=new n(null);return f.words=new Array(Math.ceil(this.n/13)),f},H.prototype.ireduce=function(f){var c=f,p;do this.split(c,this.tmp),c=this.imulK(c),c=c.iadd(this.tmp),p=c.bitLength();while(p>this.n);var v=p<this.n?-1:c.ucmp(this.p);return v===0?(c.words[0]=0,c.length=1):v>0?c.isub(this.p):c.strip(),c},H.prototype.split=function(f,c){f.iushrn(this.n,0,c)},H.prototype.imulK=function(f){return f.imul(this.k)};function ee(){H.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(ee,H),ee.prototype.split=function(f,c){for(var p=4194303,v=Math.min(f.length,9),g=0;g<v;g++)c.words[g]=f.words[g];if(c.length=v,f.length<=9){f.words[0]=0,f.length=1;return}var x=f.words[9];for(c.words[c.length++]=x&p,g=10;g<f.length;g++){var S=f.words[g]|0;f.words[g-10]=(S&p)<<4|x>>>22,x=S}x>>>=22,f.words[g-10]=x,x===0&&f.length>10?f.length-=10:f.length-=9},ee.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var c=0,p=0;p<f.length;p++){var v=f.words[p]|0;c+=v*977,f.words[p]=c&67108863,c=v*64+(c/67108864|0)}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function ce(){H.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(ce,H);function ge(){H.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(ge,H);function Se(){H.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(Se,H),Se.prototype.imulK=function(f){for(var c=0,p=0;p<f.length;p++){var v=(f.words[p]|0)*19+c,g=v&67108863;v>>>=26,f.words[p]=g,c=v}return c!==0&&(f.words[f.length++]=c),f},n._prime=function(f){if($[f])return $[f];var c;if(f==="k256")c=new ee;else if(f==="p224")c=new ce;else if(f==="p192")c=new ge;else if(f==="p25519")c=new Se;else throw new Error("Unknown prime "+f);return $[f]=c,c};function me(E){if(typeof E=="string"){var f=n._prime(E);this.m=f.p,this.prime=f}else r(E.gtn(1),"modulus must be greater than 1"),this.m=E,this.prime=null}me.prototype._verify1=function(f){r(f.negative===0,"red works only with positives"),r(f.red,"red works only with red numbers")},me.prototype._verify2=function(f,c){r((f.negative|c.negative)===0,"red works only with positives"),r(f.red&&f.red===c.red,"red works only with red numbers")},me.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):f.umod(this.m)._forceRed(this)},me.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},me.prototype.add=function(f,c){this._verify2(f,c);var p=f.add(c);return p.cmp(this.m)>=0&&p.isub(this.m),p._forceRed(this)},me.prototype.iadd=function(f,c){this._verify2(f,c);var p=f.iadd(c);return p.cmp(this.m)>=0&&p.isub(this.m),p},me.prototype.sub=function(f,c){this._verify2(f,c);var p=f.sub(c);return p.cmpn(0)<0&&p.iadd(this.m),p._forceRed(this)},me.prototype.isub=function(f,c){this._verify2(f,c);var p=f.isub(c);return p.cmpn(0)<0&&p.iadd(this.m),p},me.prototype.shl=function(f,c){return this._verify1(f),this.imod(f.ushln(c))},me.prototype.imul=function(f,c){return this._verify2(f,c),this.imod(f.imul(c))},me.prototype.mul=function(f,c){return this._verify2(f,c),this.imod(f.mul(c))},me.prototype.isqr=function(f){return this.imul(f,f.clone())},me.prototype.sqr=function(f){return this.mul(f,f)},me.prototype.sqrt=function(f){if(f.isZero())return f.clone();var c=this.m.andln(3);if(r(c%2===1),c===3){var p=this.m.add(new n(1)).iushrn(2);return this.pow(f,p)}for(var v=this.m.subn(1),g=0;!v.isZero()&&v.andln(1)===0;)g++,v.iushrn(1);r(!v.isZero());var x=new n(1).toRed(this),S=x.redNeg(),b=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new n(2*l*l).toRed(this);this.pow(l,b).cmp(S)!==0;)l.redIAdd(S);for(var d=this.pow(l,v),A=this.pow(f,v.addn(1).iushrn(1)),D=this.pow(f,v),V=g;D.cmp(x)!==0;){for(var Y=D,se=0;Y.cmp(x)!==0;se++)Y=Y.redSqr();r(se<V);var ae=this.pow(d,new n(1).iushln(V-se-1));A=A.redMul(ae),d=ae.redSqr(),D=D.redMul(d),V=se}return A},me.prototype.invm=function(f){var c=f._invmp(this.m);return c.negative!==0?(c.negative=0,this.imod(c).redNeg()):this.imod(c)},me.prototype.pow=function(f,c){if(c.isZero())return new n(1).toRed(this);if(c.cmpn(1)===0)return f.clone();var p=4,v=new Array(1<<p);v[0]=new n(1).toRed(this),v[1]=f;for(var g=2;g<v.length;g++)v[g]=this.mul(v[g-1],f);var x=v[0],S=0,b=0,l=c.bitLength()%26;for(l===0&&(l=26),g=c.length-1;g>=0;g--){for(var d=c.words[g],A=l-1;A>=0;A--){var D=d>>A&1;if(x!==v[0]&&(x=this.sqr(x)),D===0&&S===0){b=0;continue}S<<=1,S|=D,b++,!(b!==p&&(g!==0||A!==0))&&(x=this.mul(x,v[S]),b=0,S=0)}l=26}return x},me.prototype.convertTo=function(f){var c=f.umod(this.m);return c===f?c.clone():c},me.prototype.convertFrom=function(f){var c=f.clone();return c.red=null,c},n.mont=function(f){return new O(f)};function O(E){me.call(this,E),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(O,me),O.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},O.prototype.convertFrom=function(f){var c=this.imod(f.mul(this.rinv));return c.red=null,c},O.prototype.imul=function(f,c){if(f.isZero()||c.isZero())return f.words[0]=0,f.length=1,f;var p=f.imul(c),v=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=p.isub(v).iushrn(this.shift),x=g;return g.cmp(this.m)>=0?x=g.isub(this.m):g.cmpn(0)<0&&(x=g.iadd(this.m)),x._forceRed(this)},O.prototype.mul=function(f,c){if(f.isZero()||c.isZero())return new n(0)._forceRed(this);var p=f.mul(c),v=p.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),g=p.isub(v).iushrn(this.shift),x=g;return g.cmp(this.m)>=0?x=g.isub(this.m):g.cmpn(0)<0&&(x=g.iadd(this.m)),x._forceRed(this)},O.prototype.invm=function(f){var c=this.imod(f._invmp(this.m).mul(this.r2));return c._forceRed(this)}})(typeof V0>"u"||V0,a1)});var c1=X((IU,o1)=>{"use strict";var U5="http://bitcore.io/";o1.exports=[{name:"InvalidB58Char",message:"Invalid Base58 character: {0} in {1}"},{name:"InvalidB58Checksum",message:"Invalid Base58 checksum for {0}"},{name:"InvalidNetwork",message:"Invalid version for network: got {0}"},{name:"InvalidState",message:"Invalid state: {0}"},{name:"NotImplemented",message:"Function {0} was not implemented yet"},{name:"InvalidNetworkArgument",message:'Invalid network: must be "livenet" or "testnet", got {0}'},{name:"InvalidArgument",message:function(){return"Invalid Argument"+(arguments[0]?": "+arguments[0]:"")+(arguments[1]?" Documentation: "+U5+arguments[1]:"")}},{name:"AbstractMethodInvoked",message:"Abstract Method Invocation: {0}"},{name:"InvalidArgumentType",message:function(){return"Invalid Argument for "+arguments[2]+", expected "+arguments[1]+" but got "+typeof arguments[0]}},{name:"Unit",message:"Internal Error on Unit {0}",errors:[{name:"UnknownCode",message:"Unrecognized unit code: {0}"},{name:"InvalidRate",message:"Invalid exchange rate: {0}"}]},{name:"MerkleBlock",message:"Internal Error on MerkleBlock {0}",errors:[{name:"InvalidMerkleTree",message:"This MerkleBlock contain an invalid Merkle Tree"}]},{name:"Transaction",message:"Internal Error on Transaction {0}",errors:[{name:"Input",message:"Internal Error on Input {0}",errors:[{name:"MissingScript",message:"Need a script to create an input"},{name:"UnsupportedScript",message:"Unsupported input script type: {0}"},{name:"MissingPreviousOutput",message:"No previous output information."},{name:"BlockHeightOutOfRange",message:"Block Height can only be between 0 and 65535"},{name:"LockTimeRange",message:"Seconds needs to be more that 0 and less that 33553920"}]},{name:"NeedMoreInfo",message:"{0}"},{name:"InvalidSorting",message:"The sorting function provided did not return the change output as one of the array elements"},{name:"InvalidOutputAmountSum",message:"{0}"},{name:"MissingSignatures",message:"Some inputs have not been fully signed"},{name:"InvalidIndex",message:"Invalid index: {0} is not between 0, {1}"},{name:"UnableToVerifySignature",message:"Unable to verify signature: {0}"},{name:"DustOutputs",message:"Dust amount detected in one output"},{name:"InvalidSatoshis",message:"Output satoshis are invalid"},{name:"FeeError",message:"Internal Error on Fee {0}",errors:[{name:"TooSmall",message:"Fee is too small: {0}"},{name:"TooLarge",message:"Fee is too large: {0}"},{name:"Different",message:"Unspent value is different from specified fee: {0}"}]},{name:"ChangeAddressMissing",message:"Change address is missing"},{name:"BlockHeightTooHigh",message:"Block Height can be at most 2^32 -1"},{name:"NLockTimeOutOfRange",message:"Block Height can only be between 0 and 499 999 999"},{name:"LockTimeTooEarly",message:"Lock Time can't be earlier than UNIX date 500 000 000"}]},{name:"Script",message:"Internal Error on Script {0}",errors:[{name:"UnrecognizedAddress",message:"Expected argument {0} to be an address"},{name:"CantDeriveAddress",message:"Can't derive address associated with script {0}, needs to be p2pkh in, p2pkh out, p2sh in, or p2sh out."},{name:"InvalidBuffer",message:"Invalid script buffer: can't parse valid script from given buffer {0}"}]},{name:"HDPrivateKey",message:"Internal Error on HDPrivateKey {0}",errors:[{name:"InvalidDerivationArgument",message:"Invalid derivation argument {0}, expected string, or number and boolean"},{name:"InvalidEntropyArgument",message:"Invalid entropy: must be an hexa string or binary buffer, got {0}",errors:[{name:"TooMuchEntropy",message:'Invalid entropy: more than 512 bits is non standard, got "{0}"'},{name:"NotEnoughEntropy",message:'Invalid entropy: at least 128 bits needed, got "{0}"'}]},{name:"InvalidLength",message:"Invalid length for xprivkey string in {0}"},{name:"InvalidPath",message:"Invalid derivation path: {0}"},{name:"UnrecognizedArgument",message:'Invalid argument: creating a HDPrivateKey requires a string, buffer, json or object, got "{0}"'}]},{name:"HDPublicKey",message:"Internal Error on HDPublicKey {0}",errors:[{name:"ArgumentIsPrivateExtended",message:"Argument is an extended private key: {0}"},{name:"InvalidDerivationArgument",message:"Invalid derivation argument: got {0}"},{name:"InvalidLength",message:'Invalid length for xpubkey: got "{0}"'},{name:"InvalidPath",message:'Invalid derivation path, it should look like: "m/1/100", got "{0}"'},{name:"InvalidIndexCantDeriveHardened",message:"Invalid argument: creating a hardened path requires an HDPrivateKey"},{name:"MustSupplyArgument",message:"Must supply an argument to create a HDPublicKey"},{name:"UnrecognizedArgument",message:"Invalid argument for creation, must be string, json, buffer, or object"}]}]});var ji=X((TU,K0)=>{"use strict";var W0=yt();function D5(e,t){return e.replace("{0}",t[0]).replace("{1}",t[1]).replace("{2}",t[2])}var u1=function(e,t){var r=function(){if(W0.isString(t.message))this.message=D5(t.message,arguments);else if(W0.isFunction(t.message))this.message=t.message.apply(null,arguments);else throw new Error("Invalid error definition for "+t.name);this.stack=this.message+`
21
+ `+new Error().stack};return r.prototype=Object.create(e.prototype),r.prototype.name=e.prototype.name+t.name,e[t.name]=r,t.errors&&f1(r,t.errors),r},f1=function(e,t){W0.each(t,function(r){u1(e,r)})},q5=function(e,t){return f1(e,t),e},Mc={};Mc.Error=function(){this.message="Internal error",this.stack=this.message+`
22
+ `+new Error().stack};Mc.Error.prototype=Object.create(Error.prototype);Mc.Error.prototype.name="bitcore.Error";var F5=c1();q5(Mc.Error,F5);K0.exports=Mc.Error;K0.exports.extend=function(e){return u1(Mc.Error,e)}});var xt=X((RU,l1)=>{"use strict";var Zu=ji(),H5=yt();l1.exports={checkState:function(e,t){if(!e)throw new Zu.InvalidState(t)},checkArgument:function(e,t,r,i){if(!e)throw new Zu.InvalidArgument(t,r,i)},checkArgumentType:function(e,t,r){if(r=r||"(unknown name)",H5.isString(t)){if(t==="Buffer"){var i=require("buffer");if(!i.Buffer.isBuffer(e))throw new Zu.InvalidArgumentType(e,t,r)}else if(typeof e!==t&&e&&e.constructor&&e.constructor.name!==t)throw new Zu.InvalidArgumentType(e,t,r)}else if(!(e instanceof t))throw new Zu.InvalidArgumentType(e,t.name,r)},isType:function(e,t,r){try{return this.checkArgumentType(e,t,r),!0}catch{return!1}}}});var Rr=X((AU,d1)=>{"use strict";var h1=yt(),p1=function(t){return h1.isString(t)?/^[0-9a-fA-F]+$/.test(t):!1};d1.exports={isValidJSON:function(t){var r;if(!h1.isString(t))return!1;try{r=JSON.parse(t)}catch{return!1}return typeof r=="object"},isHexa:p1,isHexaString:p1,cloneArray:function(e){return[].concat(e)},defineImmutable:function(t,r){return Object.keys(r).forEach(function(i){Object.defineProperty(t,i,{configurable:!1,enumerable:!0,value:r[i]})}),t},isNaturalNumber:function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t&&t>=0}}});var Yt=X((PU,Xu)=>{"use strict";var m1=require("buffer"),OU=require("assert"),kU=Rr(),ka=xt();function v1(e,t){if(e.length!==t.length)return!1;for(var r=e.length,i=0;i<r;i++)if(e[i]!==t[i])return!1;return!0}Xu.exports={fill:function(t,r){ka.checkArgumentType(t,"Buffer","buffer"),ka.checkArgumentType(r,"number","value");for(var i=t.length,n=0;n<i;n++)t[n]=r;return t},copy:function(e){var t=Buffer.alloc(e.length);return e.copy(t),t},isBuffer:function(t){return m1.Buffer.isBuffer(t)||t instanceof Uint8Array},emptyBuffer:function(t){ka.checkArgumentType(t,"number","bytes");for(var r=Buffer.alloc(t),i=0;i<t;i++)r.write("\0",i);return r},concat:m1.Buffer.concat,equals:v1,equal:v1,integerAsSingleByteBuffer:function(t){return ka.checkArgumentType(t,"number","integer"),Buffer.from([t&255])},integerAsBuffer:function(t){ka.checkArgumentType(t,"number","integer");var r=[];return r.push(t>>24&255),r.push(t>>16&255),r.push(t>>8&255),r.push(t&255),Buffer.from(r)},integerFromBuffer:function(t){return ka.checkArgumentType(t,"Buffer","buffer"),t[0]<<24|t[1]<<16|t[2]<<8|t[3]},integerFromSingleByteBuffer:function(t){return ka.checkArgumentType(t,"Buffer","buffer"),t[0]},bufferToHex:function(t){return ka.checkArgumentType(t,"Buffer","buffer"),t.toString("hex")},reverse:function(t){return Buffer.from(t).reverse()}};Xu.exports.NULL_HASH=Xu.exports.fill(Buffer.alloc(32),0);Xu.exports.EMPTY_BUFFER=Buffer.alloc(0)});var Zr=X((NU,x1)=>{"use strict";var kt=j0(),vp=xt(),g1=yt(),z5=Yt(),gp=function(e){for(var t=Buffer.alloc(e.length),r=0;r<e.length;r++)t[r]=e[e.length-1-r];return t};kt.Zero=new kt(0);kt.One=new kt(1);kt.Minus1=new kt(-1);kt.fromNumber=function(e){return vp.checkArgument(g1.isNumber(e)),new kt(e)};kt.fromString=function(e,t){return vp.checkArgument(g1.isString(e)),new kt(e,t)};kt.fromBuffer=function(e,t){vp.checkArgument(z5.isBuffer(e),"first argument should be a buffer"),e=Buffer.from(e),typeof t<"u"&&t.endian==="little"&&(e=gp(e));var r=e.toString("hex"),i=new kt(r,16);return i};kt.fromSM=function(e,t){var r;if(e.length===0)return kt.fromBuffer(Buffer.from([0]));var i="big";return t&&(i=t.endian),i==="little"&&(e=gp(e)),e[0]&128?(e[0]=e[0]&127,r=kt.fromBuffer(e),r.neg().copy(r)):r=kt.fromBuffer(e),r};kt.prototype.toNumber=function(){return parseInt(this.toString(10),10)};kt.prototype.toBuffer=function(e){var t,r;if(e&&e.size){r=this.toString(16,2);var i=r.length/2;t=Buffer.from(r,"hex"),i===e.size?t=t:i>e.size?t=kt.trim(t,i):i<e.size&&(t=kt.pad(t,i,e.size))}else r=this.toString(16,2),t=Buffer.from(r,"hex");return typeof e<"u"&&e.endian==="little"&&(t=gp(t)),t};kt.prototype.toSMBigEndian=function(){var e;return this.cmp(kt.Zero)===-1?(e=this.neg().toBuffer(),e[0]&128?e=Buffer.concat([Buffer.from([128]),e]):e[0]=e[0]|128):(e=this.toBuffer(),e[0]&128&&(e=Buffer.concat([Buffer.from([0]),e]))),e.length===1&e[0]===0&&(e=Buffer.from([])),e};kt.prototype.toSM=function(e){var t=e?e.endian:"big",r=this.toSMBigEndian();return t==="little"&&(r=gp(r)),r};kt.fromScriptNumBuffer=function(e,t,r){var i=r||4;if(vp.checkArgument(e.length<=i,new Error("script number overflow")),t&&e.length>0&&!(e[e.length-1]&127)&&(e.length<=1||!(e[e.length-2]&128)))throw new Error("non-minimally encoded script number");return kt.fromSM(e,{endian:"little"})};kt.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})};kt.trim=function(e,t){return e.slice(t-e.length,e.length)};kt.pad=function(e,t,r){for(var i=Buffer.alloc(r),n=0;n<e.length;n++)i[i.length-1-n]=e[e.length-1-n];for(n=0;n<r-t;n++)i[n]=0;return i};x1.exports=kt});var b1=X((BU,V5)=>{V5.exports={name:"elliptic",version:"6.5.5",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}});var rs=X((_1,G0)=>{(function(e,t){"use strict";function r(f,c){if(!f)throw new Error(c||"Assertion failed")}function i(f,c){f.super_=c;var p=function(){};p.prototype=c.prototype,f.prototype=new p,f.prototype.constructor=f}function n(f,c,p){if(n.isBN(f))return f;this.negative=0,this.words=null,this.length=0,this.red=null,f!==null&&((c==="le"||c==="be")&&(p=c,c=10),this._init(f||0,c||10,p||"be"))}typeof e=="object"?e.exports=n:t.BN=n,n.BN=n,n.wordSize=26;var o;try{typeof window<"u"&&typeof window.Buffer<"u"?o=window.Buffer:o=require("buffer").Buffer}catch{}n.isBN=function(c){return c instanceof n?!0:c!==null&&typeof c=="object"&&c.constructor.wordSize===n.wordSize&&Array.isArray(c.words)},n.max=function(c,p){return c.cmp(p)>0?c:p},n.min=function(c,p){return c.cmp(p)<0?c:p},n.prototype._init=function(c,p,v){if(typeof c=="number")return this._initNumber(c,p,v);if(typeof c=="object")return this._initArray(c,p,v);p==="hex"&&(p=16),r(p===(p|0)&&p>=2&&p<=36),c=c.toString().replace(/\s+/g,"");var g=0;c[0]==="-"&&(g++,this.negative=1),g<c.length&&(p===16?this._parseHex(c,g,v):(this._parseBase(c,p,g),v==="le"&&this._initArray(this.toArray(),p,v)))},n.prototype._initNumber=function(c,p,v){c<0&&(this.negative=1,c=-c),c<67108864?(this.words=[c&67108863],this.length=1):c<4503599627370496?(this.words=[c&67108863,c/67108864&67108863],this.length=2):(r(c<9007199254740992),this.words=[c&67108863,c/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),p,v)},n.prototype._initArray=function(c,p,v){if(r(typeof c.length=="number"),c.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(c.length/3),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var x,S,b=0;if(v==="be")for(g=c.length-1,x=0;g>=0;g-=3)S=c[g]|c[g-1]<<8|c[g-2]<<16,this.words[x]|=S<<b&67108863,this.words[x+1]=S>>>26-b&67108863,b+=24,b>=26&&(b-=26,x++);else if(v==="le")for(g=0,x=0;g<c.length;g+=3)S=c[g]|c[g+1]<<8|c[g+2]<<16,this.words[x]|=S<<b&67108863,this.words[x+1]=S>>>26-b&67108863,b+=24,b>=26&&(b-=26,x++);return this.strip()};function u(f,c){var p=f.charCodeAt(c);return p>=65&&p<=70?p-55:p>=97&&p<=102?p-87:p-48&15}function m(f,c,p){var v=u(f,p);return p-1>=c&&(v|=u(f,p-1)<<4),v}n.prototype._parseHex=function(c,p,v){this.length=Math.ceil((c.length-p)/6),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var x=0,S=0,b;if(v==="be")for(g=c.length-1;g>=p;g-=2)b=m(c,p,g)<<x,this.words[S]|=b&67108863,x>=18?(x-=18,S+=1,this.words[S]|=b>>>26):x+=8;else{var l=c.length-p;for(g=l%2===0?p+1:p;g<c.length;g+=2)b=m(c,p,g)<<x,this.words[S]|=b&67108863,x>=18?(x-=18,S+=1,this.words[S]|=b>>>26):x+=8}this.strip()};function _(f,c,p,v){for(var g=0,x=Math.min(f.length,p),S=c;S<x;S++){var b=f.charCodeAt(S)-48;g*=v,b>=49?g+=b-49+10:b>=17?g+=b-17+10:g+=b}return g}n.prototype._parseBase=function(c,p,v){this.words=[0],this.length=1;for(var g=0,x=1;x<=67108863;x*=p)g++;g--,x=x/p|0;for(var S=c.length-v,b=S%g,l=Math.min(S,S-b)+v,d=0,A=v;A<l;A+=g)d=_(c,A,A+g,p),this.imuln(x),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d);if(b!==0){var D=1;for(d=_(c,A,c.length,p),A=0;A<b;A++)D*=p;this.imuln(D),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d)}this.strip()},n.prototype.copy=function(c){c.words=new Array(this.length);for(var p=0;p<this.length;p++)c.words[p]=this.words[p];c.length=this.length,c.negative=this.negative,c.red=this.red},n.prototype.clone=function(){var c=new n(null);return this.copy(c),c},n.prototype._expand=function(c){for(;this.length<c;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var w=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],I=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],T=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];n.prototype.toString=function(c,p){c=c||10,p=p|0||1;var v;if(c===16||c==="hex"){v="";for(var g=0,x=0,S=0;S<this.length;S++){var b=this.words[S],l=((b<<g|x)&16777215).toString(16);x=b>>>24-g&16777215,x!==0||S!==this.length-1?v=w[6-l.length]+l+v:v=l+v,g+=2,g>=26&&(g-=26,S--)}for(x!==0&&(v=x.toString(16)+v);v.length%p!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(c===(c|0)&&c>=2&&c<=36){var d=I[c],A=T[c];v="";var D=this.clone();for(D.negative=0;!D.isZero();){var V=D.modn(A).toString(c);D=D.idivn(A),D.isZero()?v=V+v:v=w[d-V.length]+V+v}for(this.isZero()&&(v="0"+v);v.length%p!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var c=this.words[0];return this.length===2?c+=this.words[1]*67108864:this.length===3&&this.words[2]===1?c+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-c:c},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(c,p){return r(typeof o<"u"),this.toArrayLike(o,c,p)},n.prototype.toArray=function(c,p){return this.toArrayLike(Array,c,p)},n.prototype.toArrayLike=function(c,p,v){var g=this.byteLength(),x=v||Math.max(1,g);r(g<=x,"byte array longer than desired length"),r(x>0,"Requested array length <= 0"),this.strip();var S=p==="le",b=new c(x),l,d,A=this.clone();if(S){for(d=0;!A.isZero();d++)l=A.andln(255),A.iushrn(8),b[d]=l;for(;d<x;d++)b[d]=0}else{for(d=0;d<x-g;d++)b[d]=0;for(d=0;!A.isZero();d++)l=A.andln(255),A.iushrn(8),b[x-d-1]=l}return b},Math.clz32?n.prototype._countBits=function(c){return 32-Math.clz32(c)}:n.prototype._countBits=function(c){var p=c,v=0;return p>=4096&&(v+=13,p>>>=13),p>=64&&(v+=7,p>>>=7),p>=8&&(v+=4,p>>>=4),p>=2&&(v+=2,p>>>=2),v+p},n.prototype._zeroBits=function(c){if(c===0)return 26;var p=c,v=0;return p&8191||(v+=13,p>>>=13),p&127||(v+=7,p>>>=7),p&15||(v+=4,p>>>=4),p&3||(v+=2,p>>>=2),p&1||v++,v},n.prototype.bitLength=function(){var c=this.words[this.length-1],p=this._countBits(c);return(this.length-1)*26+p};function N(f){for(var c=new Array(f.bitLength()),p=0;p<c.length;p++){var v=p/26|0,g=p%26;c[p]=(f.words[v]&1<<g)>>>g}return c}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var c=0,p=0;p<this.length;p++){var v=this._zeroBits(this.words[p]);if(c+=v,v!==26)break}return c},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(c){return this.negative!==0?this.abs().inotn(c).iaddn(1):this.clone()},n.prototype.fromTwos=function(c){return this.testn(c-1)?this.notn(c).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(c){for(;this.length<c.length;)this.words[this.length++]=0;for(var p=0;p<c.length;p++)this.words[p]=this.words[p]|c.words[p];return this.strip()},n.prototype.ior=function(c){return r((this.negative|c.negative)===0),this.iuor(c)},n.prototype.or=function(c){return this.length>c.length?this.clone().ior(c):c.clone().ior(this)},n.prototype.uor=function(c){return this.length>c.length?this.clone().iuor(c):c.clone().iuor(this)},n.prototype.iuand=function(c){var p;this.length>c.length?p=c:p=this;for(var v=0;v<p.length;v++)this.words[v]=this.words[v]&c.words[v];return this.length=p.length,this.strip()},n.prototype.iand=function(c){return r((this.negative|c.negative)===0),this.iuand(c)},n.prototype.and=function(c){return this.length>c.length?this.clone().iand(c):c.clone().iand(this)},n.prototype.uand=function(c){return this.length>c.length?this.clone().iuand(c):c.clone().iuand(this)},n.prototype.iuxor=function(c){var p,v;this.length>c.length?(p=this,v=c):(p=c,v=this);for(var g=0;g<v.length;g++)this.words[g]=p.words[g]^v.words[g];if(this!==p)for(;g<p.length;g++)this.words[g]=p.words[g];return this.length=p.length,this.strip()},n.prototype.ixor=function(c){return r((this.negative|c.negative)===0),this.iuxor(c)},n.prototype.xor=function(c){return this.length>c.length?this.clone().ixor(c):c.clone().ixor(this)},n.prototype.uxor=function(c){return this.length>c.length?this.clone().iuxor(c):c.clone().iuxor(this)},n.prototype.inotn=function(c){r(typeof c=="number"&&c>=0);var p=Math.ceil(c/26)|0,v=c%26;this._expand(p),v>0&&p--;for(var g=0;g<p;g++)this.words[g]=~this.words[g]&67108863;return v>0&&(this.words[g]=~this.words[g]&67108863>>26-v),this.strip()},n.prototype.notn=function(c){return this.clone().inotn(c)},n.prototype.setn=function(c,p){r(typeof c=="number"&&c>=0);var v=c/26|0,g=c%26;return this._expand(v+1),p?this.words[v]=this.words[v]|1<<g:this.words[v]=this.words[v]&~(1<<g),this.strip()},n.prototype.iadd=function(c){var p;if(this.negative!==0&&c.negative===0)return this.negative=0,p=this.isub(c),this.negative^=1,this._normSign();if(this.negative===0&&c.negative!==0)return c.negative=0,p=this.isub(c),c.negative=1,p._normSign();var v,g;this.length>c.length?(v=this,g=c):(v=c,g=this);for(var x=0,S=0;S<g.length;S++)p=(v.words[S]|0)+(g.words[S]|0)+x,this.words[S]=p&67108863,x=p>>>26;for(;x!==0&&S<v.length;S++)p=(v.words[S]|0)+x,this.words[S]=p&67108863,x=p>>>26;if(this.length=v.length,x!==0)this.words[this.length]=x,this.length++;else if(v!==this)for(;S<v.length;S++)this.words[S]=v.words[S];return this},n.prototype.add=function(c){var p;return c.negative!==0&&this.negative===0?(c.negative=0,p=this.sub(c),c.negative^=1,p):c.negative===0&&this.negative!==0?(this.negative=0,p=c.sub(this),this.negative=1,p):this.length>c.length?this.clone().iadd(c):c.clone().iadd(this)},n.prototype.isub=function(c){if(c.negative!==0){c.negative=0;var p=this.iadd(c);return c.negative=1,p._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(c),this.negative=1,this._normSign();var v=this.cmp(c);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var g,x;v>0?(g=this,x=c):(g=c,x=this);for(var S=0,b=0;b<x.length;b++)p=(g.words[b]|0)-(x.words[b]|0)+S,S=p>>26,this.words[b]=p&67108863;for(;S!==0&&b<g.length;b++)p=(g.words[b]|0)+S,S=p>>26,this.words[b]=p&67108863;if(S===0&&b<g.length&&g!==this)for(;b<g.length;b++)this.words[b]=g.words[b];return this.length=Math.max(this.length,b),g!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(c){return this.clone().isub(c)};function C(f,c,p){p.negative=c.negative^f.negative;var v=f.length+c.length|0;p.length=v,v=v-1|0;var g=f.words[0]|0,x=c.words[0]|0,S=g*x,b=S&67108863,l=S/67108864|0;p.words[0]=b;for(var d=1;d<v;d++){for(var A=l>>>26,D=l&67108863,V=Math.min(d,c.length-1),Y=Math.max(0,d-f.length+1);Y<=V;Y++){var se=d-Y|0;g=f.words[se]|0,x=c.words[Y]|0,S=g*x+D,A+=S/67108864|0,D=S&67108863}p.words[d]=D|0,l=A|0}return l!==0?p.words[d]=l|0:p.length--,p.strip()}var B=function(c,p,v){var g=c.words,x=p.words,S=v.words,b=0,l,d,A,D=g[0]|0,V=D&8191,Y=D>>>13,se=g[1]|0,ae=se&8191,pe=se>>>13,ye=g[2]|0,de=ye&8191,ht=ye>>>13,St=g[3]|0,Re=St&8191,st=St>>>13,et=g[4]|0,Ie=et&8191,Te=et>>>13,jt=g[5]|0,Ve=jt&8191,Rt=jt>>>13,vt=g[6]|0,Me=vt&8191,Pt=vt>>>13,Qt=g[7]|0,Ce=Qt&8191,er=Qt>>>13,At=g[8]|0,Be=At&8191,Bt=At>>>13,Mt=g[9]|0,Ue=Mt&8191,Ct=Mt>>>13,Lt=x[0]|0,De=Lt&8191,Ut=Lt>>>13,Dt=x[1]|0,qe=Dt&8191,tr=Dt>>>13,rr=x[2]|0,je=rr&8191,Wt=rr>>>13,Kt=x[3]|0,We=Kt&8191,ir=Kt>>>13,nr=x[4]|0,Ke=nr&8191,Gt=nr>>>13,sr=x[5]|0,Ge=sr&8191,ar=sr>>>13,qt=x[6]|0,$e=qt&8191,Ft=qt>>>13,or=x[7]|0,Ye=or&8191,cr=or>>>13,ur=x[8]|0,Ze=ur&8191,fr=ur>>>13,lr=x[9]|0,Xe=lr&8191,Ht=lr>>>13;v.negative=c.negative^p.negative,v.length=19,l=Math.imul(V,De),d=Math.imul(V,Ut),d=d+Math.imul(Y,De)|0,A=Math.imul(Y,Ut);var ys=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(ys>>>26)|0,ys&=67108863,l=Math.imul(ae,De),d=Math.imul(ae,Ut),d=d+Math.imul(pe,De)|0,A=Math.imul(pe,Ut),l=l+Math.imul(V,qe)|0,d=d+Math.imul(V,tr)|0,d=d+Math.imul(Y,qe)|0,A=A+Math.imul(Y,tr)|0;var ws=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(ws>>>26)|0,ws&=67108863,l=Math.imul(de,De),d=Math.imul(de,Ut),d=d+Math.imul(ht,De)|0,A=Math.imul(ht,Ut),l=l+Math.imul(ae,qe)|0,d=d+Math.imul(ae,tr)|0,d=d+Math.imul(pe,qe)|0,A=A+Math.imul(pe,tr)|0,l=l+Math.imul(V,je)|0,d=d+Math.imul(V,Wt)|0,d=d+Math.imul(Y,je)|0,A=A+Math.imul(Y,Wt)|0;var Ss=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(Ss>>>26)|0,Ss&=67108863,l=Math.imul(Re,De),d=Math.imul(Re,Ut),d=d+Math.imul(st,De)|0,A=Math.imul(st,Ut),l=l+Math.imul(de,qe)|0,d=d+Math.imul(de,tr)|0,d=d+Math.imul(ht,qe)|0,A=A+Math.imul(ht,tr)|0,l=l+Math.imul(ae,je)|0,d=d+Math.imul(ae,Wt)|0,d=d+Math.imul(pe,je)|0,A=A+Math.imul(pe,Wt)|0,l=l+Math.imul(V,We)|0,d=d+Math.imul(V,ir)|0,d=d+Math.imul(Y,We)|0,A=A+Math.imul(Y,ir)|0;var Es=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(Es>>>26)|0,Es&=67108863,l=Math.imul(Ie,De),d=Math.imul(Ie,Ut),d=d+Math.imul(Te,De)|0,A=Math.imul(Te,Ut),l=l+Math.imul(Re,qe)|0,d=d+Math.imul(Re,tr)|0,d=d+Math.imul(st,qe)|0,A=A+Math.imul(st,tr)|0,l=l+Math.imul(de,je)|0,d=d+Math.imul(de,Wt)|0,d=d+Math.imul(ht,je)|0,A=A+Math.imul(ht,Wt)|0,l=l+Math.imul(ae,We)|0,d=d+Math.imul(ae,ir)|0,d=d+Math.imul(pe,We)|0,A=A+Math.imul(pe,ir)|0,l=l+Math.imul(V,Ke)|0,d=d+Math.imul(V,Gt)|0,d=d+Math.imul(Y,Ke)|0,A=A+Math.imul(Y,Gt)|0;var Is=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(Is>>>26)|0,Is&=67108863,l=Math.imul(Ve,De),d=Math.imul(Ve,Ut),d=d+Math.imul(Rt,De)|0,A=Math.imul(Rt,Ut),l=l+Math.imul(Ie,qe)|0,d=d+Math.imul(Ie,tr)|0,d=d+Math.imul(Te,qe)|0,A=A+Math.imul(Te,tr)|0,l=l+Math.imul(Re,je)|0,d=d+Math.imul(Re,Wt)|0,d=d+Math.imul(st,je)|0,A=A+Math.imul(st,Wt)|0,l=l+Math.imul(de,We)|0,d=d+Math.imul(de,ir)|0,d=d+Math.imul(ht,We)|0,A=A+Math.imul(ht,ir)|0,l=l+Math.imul(ae,Ke)|0,d=d+Math.imul(ae,Gt)|0,d=d+Math.imul(pe,Ke)|0,A=A+Math.imul(pe,Gt)|0,l=l+Math.imul(V,Ge)|0,d=d+Math.imul(V,ar)|0,d=d+Math.imul(Y,Ge)|0,A=A+Math.imul(Y,ar)|0;var Ts=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(Ts>>>26)|0,Ts&=67108863,l=Math.imul(Me,De),d=Math.imul(Me,Ut),d=d+Math.imul(Pt,De)|0,A=Math.imul(Pt,Ut),l=l+Math.imul(Ve,qe)|0,d=d+Math.imul(Ve,tr)|0,d=d+Math.imul(Rt,qe)|0,A=A+Math.imul(Rt,tr)|0,l=l+Math.imul(Ie,je)|0,d=d+Math.imul(Ie,Wt)|0,d=d+Math.imul(Te,je)|0,A=A+Math.imul(Te,Wt)|0,l=l+Math.imul(Re,We)|0,d=d+Math.imul(Re,ir)|0,d=d+Math.imul(st,We)|0,A=A+Math.imul(st,ir)|0,l=l+Math.imul(de,Ke)|0,d=d+Math.imul(de,Gt)|0,d=d+Math.imul(ht,Ke)|0,A=A+Math.imul(ht,Gt)|0,l=l+Math.imul(ae,Ge)|0,d=d+Math.imul(ae,ar)|0,d=d+Math.imul(pe,Ge)|0,A=A+Math.imul(pe,ar)|0,l=l+Math.imul(V,$e)|0,d=d+Math.imul(V,Ft)|0,d=d+Math.imul(Y,$e)|0,A=A+Math.imul(Y,Ft)|0;var Qi=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(Qi>>>26)|0,Qi&=67108863,l=Math.imul(Ce,De),d=Math.imul(Ce,Ut),d=d+Math.imul(er,De)|0,A=Math.imul(er,Ut),l=l+Math.imul(Me,qe)|0,d=d+Math.imul(Me,tr)|0,d=d+Math.imul(Pt,qe)|0,A=A+Math.imul(Pt,tr)|0,l=l+Math.imul(Ve,je)|0,d=d+Math.imul(Ve,Wt)|0,d=d+Math.imul(Rt,je)|0,A=A+Math.imul(Rt,Wt)|0,l=l+Math.imul(Ie,We)|0,d=d+Math.imul(Ie,ir)|0,d=d+Math.imul(Te,We)|0,A=A+Math.imul(Te,ir)|0,l=l+Math.imul(Re,Ke)|0,d=d+Math.imul(Re,Gt)|0,d=d+Math.imul(st,Ke)|0,A=A+Math.imul(st,Gt)|0,l=l+Math.imul(de,Ge)|0,d=d+Math.imul(de,ar)|0,d=d+Math.imul(ht,Ge)|0,A=A+Math.imul(ht,ar)|0,l=l+Math.imul(ae,$e)|0,d=d+Math.imul(ae,Ft)|0,d=d+Math.imul(pe,$e)|0,A=A+Math.imul(pe,Ft)|0,l=l+Math.imul(V,Ye)|0,d=d+Math.imul(V,cr)|0,d=d+Math.imul(Y,Ye)|0,A=A+Math.imul(Y,cr)|0;var Rs=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(Rs>>>26)|0,Rs&=67108863,l=Math.imul(Be,De),d=Math.imul(Be,Ut),d=d+Math.imul(Bt,De)|0,A=Math.imul(Bt,Ut),l=l+Math.imul(Ce,qe)|0,d=d+Math.imul(Ce,tr)|0,d=d+Math.imul(er,qe)|0,A=A+Math.imul(er,tr)|0,l=l+Math.imul(Me,je)|0,d=d+Math.imul(Me,Wt)|0,d=d+Math.imul(Pt,je)|0,A=A+Math.imul(Pt,Wt)|0,l=l+Math.imul(Ve,We)|0,d=d+Math.imul(Ve,ir)|0,d=d+Math.imul(Rt,We)|0,A=A+Math.imul(Rt,ir)|0,l=l+Math.imul(Ie,Ke)|0,d=d+Math.imul(Ie,Gt)|0,d=d+Math.imul(Te,Ke)|0,A=A+Math.imul(Te,Gt)|0,l=l+Math.imul(Re,Ge)|0,d=d+Math.imul(Re,ar)|0,d=d+Math.imul(st,Ge)|0,A=A+Math.imul(st,ar)|0,l=l+Math.imul(de,$e)|0,d=d+Math.imul(de,Ft)|0,d=d+Math.imul(ht,$e)|0,A=A+Math.imul(ht,Ft)|0,l=l+Math.imul(ae,Ye)|0,d=d+Math.imul(ae,cr)|0,d=d+Math.imul(pe,Ye)|0,A=A+Math.imul(pe,cr)|0,l=l+Math.imul(V,Ze)|0,d=d+Math.imul(V,fr)|0,d=d+Math.imul(Y,Ze)|0,A=A+Math.imul(Y,fr)|0;var en=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(en>>>26)|0,en&=67108863,l=Math.imul(Ue,De),d=Math.imul(Ue,Ut),d=d+Math.imul(Ct,De)|0,A=Math.imul(Ct,Ut),l=l+Math.imul(Be,qe)|0,d=d+Math.imul(Be,tr)|0,d=d+Math.imul(Bt,qe)|0,A=A+Math.imul(Bt,tr)|0,l=l+Math.imul(Ce,je)|0,d=d+Math.imul(Ce,Wt)|0,d=d+Math.imul(er,je)|0,A=A+Math.imul(er,Wt)|0,l=l+Math.imul(Me,We)|0,d=d+Math.imul(Me,ir)|0,d=d+Math.imul(Pt,We)|0,A=A+Math.imul(Pt,ir)|0,l=l+Math.imul(Ve,Ke)|0,d=d+Math.imul(Ve,Gt)|0,d=d+Math.imul(Rt,Ke)|0,A=A+Math.imul(Rt,Gt)|0,l=l+Math.imul(Ie,Ge)|0,d=d+Math.imul(Ie,ar)|0,d=d+Math.imul(Te,Ge)|0,A=A+Math.imul(Te,ar)|0,l=l+Math.imul(Re,$e)|0,d=d+Math.imul(Re,Ft)|0,d=d+Math.imul(st,$e)|0,A=A+Math.imul(st,Ft)|0,l=l+Math.imul(de,Ye)|0,d=d+Math.imul(de,cr)|0,d=d+Math.imul(ht,Ye)|0,A=A+Math.imul(ht,cr)|0,l=l+Math.imul(ae,Ze)|0,d=d+Math.imul(ae,fr)|0,d=d+Math.imul(pe,Ze)|0,A=A+Math.imul(pe,fr)|0,l=l+Math.imul(V,Xe)|0,d=d+Math.imul(V,Ht)|0,d=d+Math.imul(Y,Xe)|0,A=A+Math.imul(Y,Ht)|0;var As=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(As>>>26)|0,As&=67108863,l=Math.imul(Ue,qe),d=Math.imul(Ue,tr),d=d+Math.imul(Ct,qe)|0,A=Math.imul(Ct,tr),l=l+Math.imul(Be,je)|0,d=d+Math.imul(Be,Wt)|0,d=d+Math.imul(Bt,je)|0,A=A+Math.imul(Bt,Wt)|0,l=l+Math.imul(Ce,We)|0,d=d+Math.imul(Ce,ir)|0,d=d+Math.imul(er,We)|0,A=A+Math.imul(er,ir)|0,l=l+Math.imul(Me,Ke)|0,d=d+Math.imul(Me,Gt)|0,d=d+Math.imul(Pt,Ke)|0,A=A+Math.imul(Pt,Gt)|0,l=l+Math.imul(Ve,Ge)|0,d=d+Math.imul(Ve,ar)|0,d=d+Math.imul(Rt,Ge)|0,A=A+Math.imul(Rt,ar)|0,l=l+Math.imul(Ie,$e)|0,d=d+Math.imul(Ie,Ft)|0,d=d+Math.imul(Te,$e)|0,A=A+Math.imul(Te,Ft)|0,l=l+Math.imul(Re,Ye)|0,d=d+Math.imul(Re,cr)|0,d=d+Math.imul(st,Ye)|0,A=A+Math.imul(st,cr)|0,l=l+Math.imul(de,Ze)|0,d=d+Math.imul(de,fr)|0,d=d+Math.imul(ht,Ze)|0,A=A+Math.imul(ht,fr)|0,l=l+Math.imul(ae,Xe)|0,d=d+Math.imul(ae,Ht)|0,d=d+Math.imul(pe,Xe)|0,A=A+Math.imul(pe,Ht)|0;var Os=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(Os>>>26)|0,Os&=67108863,l=Math.imul(Ue,je),d=Math.imul(Ue,Wt),d=d+Math.imul(Ct,je)|0,A=Math.imul(Ct,Wt),l=l+Math.imul(Be,We)|0,d=d+Math.imul(Be,ir)|0,d=d+Math.imul(Bt,We)|0,A=A+Math.imul(Bt,ir)|0,l=l+Math.imul(Ce,Ke)|0,d=d+Math.imul(Ce,Gt)|0,d=d+Math.imul(er,Ke)|0,A=A+Math.imul(er,Gt)|0,l=l+Math.imul(Me,Ge)|0,d=d+Math.imul(Me,ar)|0,d=d+Math.imul(Pt,Ge)|0,A=A+Math.imul(Pt,ar)|0,l=l+Math.imul(Ve,$e)|0,d=d+Math.imul(Ve,Ft)|0,d=d+Math.imul(Rt,$e)|0,A=A+Math.imul(Rt,Ft)|0,l=l+Math.imul(Ie,Ye)|0,d=d+Math.imul(Ie,cr)|0,d=d+Math.imul(Te,Ye)|0,A=A+Math.imul(Te,cr)|0,l=l+Math.imul(Re,Ze)|0,d=d+Math.imul(Re,fr)|0,d=d+Math.imul(st,Ze)|0,A=A+Math.imul(st,fr)|0,l=l+Math.imul(de,Xe)|0,d=d+Math.imul(de,Ht)|0,d=d+Math.imul(ht,Xe)|0,A=A+Math.imul(ht,Ht)|0;var ks=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(ks>>>26)|0,ks&=67108863,l=Math.imul(Ue,We),d=Math.imul(Ue,ir),d=d+Math.imul(Ct,We)|0,A=Math.imul(Ct,ir),l=l+Math.imul(Be,Ke)|0,d=d+Math.imul(Be,Gt)|0,d=d+Math.imul(Bt,Ke)|0,A=A+Math.imul(Bt,Gt)|0,l=l+Math.imul(Ce,Ge)|0,d=d+Math.imul(Ce,ar)|0,d=d+Math.imul(er,Ge)|0,A=A+Math.imul(er,ar)|0,l=l+Math.imul(Me,$e)|0,d=d+Math.imul(Me,Ft)|0,d=d+Math.imul(Pt,$e)|0,A=A+Math.imul(Pt,Ft)|0,l=l+Math.imul(Ve,Ye)|0,d=d+Math.imul(Ve,cr)|0,d=d+Math.imul(Rt,Ye)|0,A=A+Math.imul(Rt,cr)|0,l=l+Math.imul(Ie,Ze)|0,d=d+Math.imul(Ie,fr)|0,d=d+Math.imul(Te,Ze)|0,A=A+Math.imul(Te,fr)|0,l=l+Math.imul(Re,Xe)|0,d=d+Math.imul(Re,Ht)|0,d=d+Math.imul(st,Xe)|0,A=A+Math.imul(st,Ht)|0;var Zn=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(Zn>>>26)|0,Zn&=67108863,l=Math.imul(Ue,Ke),d=Math.imul(Ue,Gt),d=d+Math.imul(Ct,Ke)|0,A=Math.imul(Ct,Gt),l=l+Math.imul(Be,Ge)|0,d=d+Math.imul(Be,ar)|0,d=d+Math.imul(Bt,Ge)|0,A=A+Math.imul(Bt,ar)|0,l=l+Math.imul(Ce,$e)|0,d=d+Math.imul(Ce,Ft)|0,d=d+Math.imul(er,$e)|0,A=A+Math.imul(er,Ft)|0,l=l+Math.imul(Me,Ye)|0,d=d+Math.imul(Me,cr)|0,d=d+Math.imul(Pt,Ye)|0,A=A+Math.imul(Pt,cr)|0,l=l+Math.imul(Ve,Ze)|0,d=d+Math.imul(Ve,fr)|0,d=d+Math.imul(Rt,Ze)|0,A=A+Math.imul(Rt,fr)|0,l=l+Math.imul(Ie,Xe)|0,d=d+Math.imul(Ie,Ht)|0,d=d+Math.imul(Te,Xe)|0,A=A+Math.imul(Te,Ht)|0;var Xn=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(Xn>>>26)|0,Xn&=67108863,l=Math.imul(Ue,Ge),d=Math.imul(Ue,ar),d=d+Math.imul(Ct,Ge)|0,A=Math.imul(Ct,ar),l=l+Math.imul(Be,$e)|0,d=d+Math.imul(Be,Ft)|0,d=d+Math.imul(Bt,$e)|0,A=A+Math.imul(Bt,Ft)|0,l=l+Math.imul(Ce,Ye)|0,d=d+Math.imul(Ce,cr)|0,d=d+Math.imul(er,Ye)|0,A=A+Math.imul(er,cr)|0,l=l+Math.imul(Me,Ze)|0,d=d+Math.imul(Me,fr)|0,d=d+Math.imul(Pt,Ze)|0,A=A+Math.imul(Pt,fr)|0,l=l+Math.imul(Ve,Xe)|0,d=d+Math.imul(Ve,Ht)|0,d=d+Math.imul(Rt,Xe)|0,A=A+Math.imul(Rt,Ht)|0;var Jn=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(Jn>>>26)|0,Jn&=67108863,l=Math.imul(Ue,$e),d=Math.imul(Ue,Ft),d=d+Math.imul(Ct,$e)|0,A=Math.imul(Ct,Ft),l=l+Math.imul(Be,Ye)|0,d=d+Math.imul(Be,cr)|0,d=d+Math.imul(Bt,Ye)|0,A=A+Math.imul(Bt,cr)|0,l=l+Math.imul(Ce,Ze)|0,d=d+Math.imul(Ce,fr)|0,d=d+Math.imul(er,Ze)|0,A=A+Math.imul(er,fr)|0,l=l+Math.imul(Me,Xe)|0,d=d+Math.imul(Me,Ht)|0,d=d+Math.imul(Pt,Xe)|0,A=A+Math.imul(Pt,Ht)|0;var Ps=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(Ps>>>26)|0,Ps&=67108863,l=Math.imul(Ue,Ye),d=Math.imul(Ue,cr),d=d+Math.imul(Ct,Ye)|0,A=Math.imul(Ct,cr),l=l+Math.imul(Be,Ze)|0,d=d+Math.imul(Be,fr)|0,d=d+Math.imul(Bt,Ze)|0,A=A+Math.imul(Bt,fr)|0,l=l+Math.imul(Ce,Xe)|0,d=d+Math.imul(Ce,Ht)|0,d=d+Math.imul(er,Xe)|0,A=A+Math.imul(er,Ht)|0;var Ns=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(Ns>>>26)|0,Ns&=67108863,l=Math.imul(Ue,Ze),d=Math.imul(Ue,fr),d=d+Math.imul(Ct,Ze)|0,A=Math.imul(Ct,fr),l=l+Math.imul(Be,Xe)|0,d=d+Math.imul(Be,Ht)|0,d=d+Math.imul(Bt,Xe)|0,A=A+Math.imul(Bt,Ht)|0;var Bs=(b+l|0)+((d&8191)<<13)|0;b=(A+(d>>>13)|0)+(Bs>>>26)|0,Bs&=67108863,l=Math.imul(Ue,Xe),d=Math.imul(Ue,Ht),d=d+Math.imul(Ct,Xe)|0,A=Math.imul(Ct,Ht);var Bu=(b+l|0)+((d&8191)<<13)|0;return b=(A+(d>>>13)|0)+(Bu>>>26)|0,Bu&=67108863,S[0]=ys,S[1]=ws,S[2]=Ss,S[3]=Es,S[4]=Is,S[5]=Ts,S[6]=Qi,S[7]=Rs,S[8]=en,S[9]=As,S[10]=Os,S[11]=ks,S[12]=Zn,S[13]=Xn,S[14]=Jn,S[15]=Ps,S[16]=Ns,S[17]=Bs,S[18]=Bu,b!==0&&(S[19]=b,v.length++),v};Math.imul||(B=C);function U(f,c,p){p.negative=c.negative^f.negative,p.length=f.length+c.length;for(var v=0,g=0,x=0;x<p.length-1;x++){var S=g;g=0;for(var b=v&67108863,l=Math.min(x,c.length-1),d=Math.max(0,x-f.length+1);d<=l;d++){var A=x-d,D=f.words[A]|0,V=c.words[d]|0,Y=D*V,se=Y&67108863;S=S+(Y/67108864|0)|0,se=se+b|0,b=se&67108863,S=S+(se>>>26)|0,g+=S>>>26,S&=67108863}p.words[x]=b,v=S,S=g}return v!==0?p.words[x]=v:p.length--,p.strip()}function Z(f,c,p){var v=new $;return v.mulp(f,c,p)}n.prototype.mulTo=function(c,p){var v,g=this.length+c.length;return this.length===10&&c.length===10?v=B(this,c,p):g<63?v=C(this,c,p):g<1024?v=U(this,c,p):v=Z(this,c,p),v};function $(f,c){this.x=f,this.y=c}$.prototype.makeRBT=function(c){for(var p=new Array(c),v=n.prototype._countBits(c)-1,g=0;g<c;g++)p[g]=this.revBin(g,v,c);return p},$.prototype.revBin=function(c,p,v){if(c===0||c===v-1)return c;for(var g=0,x=0;x<p;x++)g|=(c&1)<<p-x-1,c>>=1;return g},$.prototype.permute=function(c,p,v,g,x,S){for(var b=0;b<S;b++)g[b]=p[c[b]],x[b]=v[c[b]]},$.prototype.transform=function(c,p,v,g,x,S){this.permute(S,c,p,v,g,x);for(var b=1;b<x;b<<=1)for(var l=b<<1,d=Math.cos(2*Math.PI/l),A=Math.sin(2*Math.PI/l),D=0;D<x;D+=l)for(var V=d,Y=A,se=0;se<b;se++){var ae=v[D+se],pe=g[D+se],ye=v[D+se+b],de=g[D+se+b],ht=V*ye-Y*de;de=V*de+Y*ye,ye=ht,v[D+se]=ae+ye,g[D+se]=pe+de,v[D+se+b]=ae-ye,g[D+se+b]=pe-de,se!==l&&(ht=d*V-A*Y,Y=d*Y+A*V,V=ht)}},$.prototype.guessLen13b=function(c,p){var v=Math.max(p,c)|1,g=v&1,x=0;for(v=v/2|0;v;v=v>>>1)x++;return 1<<x+1+g},$.prototype.conjugate=function(c,p,v){if(!(v<=1))for(var g=0;g<v/2;g++){var x=c[g];c[g]=c[v-g-1],c[v-g-1]=x,x=p[g],p[g]=-p[v-g-1],p[v-g-1]=-x}},$.prototype.normalize13b=function(c,p){for(var v=0,g=0;g<p/2;g++){var x=Math.round(c[2*g+1]/p)*8192+Math.round(c[2*g]/p)+v;c[g]=x&67108863,x<67108864?v=0:v=x/67108864|0}return c},$.prototype.convert13b=function(c,p,v,g){for(var x=0,S=0;S<p;S++)x=x+(c[S]|0),v[2*S]=x&8191,x=x>>>13,v[2*S+1]=x&8191,x=x>>>13;for(S=2*p;S<g;++S)v[S]=0;r(x===0),r((x&-8192)===0)},$.prototype.stub=function(c){for(var p=new Array(c),v=0;v<c;v++)p[v]=0;return p},$.prototype.mulp=function(c,p,v){var g=2*this.guessLen13b(c.length,p.length),x=this.makeRBT(g),S=this.stub(g),b=new Array(g),l=new Array(g),d=new Array(g),A=new Array(g),D=new Array(g),V=new Array(g),Y=v.words;Y.length=g,this.convert13b(c.words,c.length,b,g),this.convert13b(p.words,p.length,A,g),this.transform(b,S,l,d,g,x),this.transform(A,S,D,V,g,x);for(var se=0;se<g;se++){var ae=l[se]*D[se]-d[se]*V[se];d[se]=l[se]*V[se]+d[se]*D[se],l[se]=ae}return this.conjugate(l,d,g),this.transform(l,d,Y,S,g,x),this.conjugate(Y,S,g),this.normalize13b(Y,g),v.negative=c.negative^p.negative,v.length=c.length+p.length,v.strip()},n.prototype.mul=function(c){var p=new n(null);return p.words=new Array(this.length+c.length),this.mulTo(c,p)},n.prototype.mulf=function(c){var p=new n(null);return p.words=new Array(this.length+c.length),Z(this,c,p)},n.prototype.imul=function(c){return this.clone().mulTo(c,this)},n.prototype.imuln=function(c){r(typeof c=="number"),r(c<67108864);for(var p=0,v=0;v<this.length;v++){var g=(this.words[v]|0)*c,x=(g&67108863)+(p&67108863);p>>=26,p+=g/67108864|0,p+=x>>>26,this.words[v]=x&67108863}return p!==0&&(this.words[v]=p,this.length++),this},n.prototype.muln=function(c){return this.clone().imuln(c)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(c){var p=N(c);if(p.length===0)return new n(1);for(var v=this,g=0;g<p.length&&p[g]===0;g++,v=v.sqr());if(++g<p.length)for(var x=v.sqr();g<p.length;g++,x=x.sqr())p[g]!==0&&(v=v.mul(x));return v},n.prototype.iushln=function(c){r(typeof c=="number"&&c>=0);var p=c%26,v=(c-p)/26,g=67108863>>>26-p<<26-p,x;if(p!==0){var S=0;for(x=0;x<this.length;x++){var b=this.words[x]&g,l=(this.words[x]|0)-b<<p;this.words[x]=l|S,S=b>>>26-p}S&&(this.words[x]=S,this.length++)}if(v!==0){for(x=this.length-1;x>=0;x--)this.words[x+v]=this.words[x];for(x=0;x<v;x++)this.words[x]=0;this.length+=v}return this.strip()},n.prototype.ishln=function(c){return r(this.negative===0),this.iushln(c)},n.prototype.iushrn=function(c,p,v){r(typeof c=="number"&&c>=0);var g;p?g=(p-p%26)/26:g=0;var x=c%26,S=Math.min((c-x)/26,this.length),b=67108863^67108863>>>x<<x,l=v;if(g-=S,g=Math.max(0,g),l){for(var d=0;d<S;d++)l.words[d]=this.words[d];l.length=S}if(S!==0)if(this.length>S)for(this.length-=S,d=0;d<this.length;d++)this.words[d]=this.words[d+S];else this.words[0]=0,this.length=1;var A=0;for(d=this.length-1;d>=0&&(A!==0||d>=g);d--){var D=this.words[d]|0;this.words[d]=A<<26-x|D>>>x,A=D&b}return l&&A!==0&&(l.words[l.length++]=A),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(c,p,v){return r(this.negative===0),this.iushrn(c,p,v)},n.prototype.shln=function(c){return this.clone().ishln(c)},n.prototype.ushln=function(c){return this.clone().iushln(c)},n.prototype.shrn=function(c){return this.clone().ishrn(c)},n.prototype.ushrn=function(c){return this.clone().iushrn(c)},n.prototype.testn=function(c){r(typeof c=="number"&&c>=0);var p=c%26,v=(c-p)/26,g=1<<p;if(this.length<=v)return!1;var x=this.words[v];return!!(x&g)},n.prototype.imaskn=function(c){r(typeof c=="number"&&c>=0);var p=c%26,v=(c-p)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(p!==0&&v++,this.length=Math.min(v,this.length),p!==0){var g=67108863^67108863>>>p<<p;this.words[this.length-1]&=g}return this.strip()},n.prototype.maskn=function(c){return this.clone().imaskn(c)},n.prototype.iaddn=function(c){return r(typeof c=="number"),r(c<67108864),c<0?this.isubn(-c):this.negative!==0?this.length===1&&(this.words[0]|0)<c?(this.words[0]=c-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(c),this.negative=1,this):this._iaddn(c)},n.prototype._iaddn=function(c){this.words[0]+=c;for(var p=0;p<this.length&&this.words[p]>=67108864;p++)this.words[p]-=67108864,p===this.length-1?this.words[p+1]=1:this.words[p+1]++;return this.length=Math.max(this.length,p+1),this},n.prototype.isubn=function(c){if(r(typeof c=="number"),r(c<67108864),c<0)return this.iaddn(-c);if(this.negative!==0)return this.negative=0,this.iaddn(c),this.negative=1,this;if(this.words[0]-=c,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var p=0;p<this.length&&this.words[p]<0;p++)this.words[p]+=67108864,this.words[p+1]-=1;return this.strip()},n.prototype.addn=function(c){return this.clone().iaddn(c)},n.prototype.subn=function(c){return this.clone().isubn(c)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(c,p,v){var g=c.length+v,x;this._expand(g);var S,b=0;for(x=0;x<c.length;x++){S=(this.words[x+v]|0)+b;var l=(c.words[x]|0)*p;S-=l&67108863,b=(S>>26)-(l/67108864|0),this.words[x+v]=S&67108863}for(;x<this.length-v;x++)S=(this.words[x+v]|0)+b,b=S>>26,this.words[x+v]=S&67108863;if(b===0)return this.strip();for(r(b===-1),b=0,x=0;x<this.length;x++)S=-(this.words[x]|0)+b,b=S>>26,this.words[x]=S&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(c,p){var v=this.length-c.length,g=this.clone(),x=c,S=x.words[x.length-1]|0,b=this._countBits(S);v=26-b,v!==0&&(x=x.ushln(v),g.iushln(v),S=x.words[x.length-1]|0);var l=g.length-x.length,d;if(p!=="mod"){d=new n(null),d.length=l+1,d.words=new Array(d.length);for(var A=0;A<d.length;A++)d.words[A]=0}var D=g.clone()._ishlnsubmul(x,1,l);D.negative===0&&(g=D,d&&(d.words[l]=1));for(var V=l-1;V>=0;V--){var Y=(g.words[x.length+V]|0)*67108864+(g.words[x.length+V-1]|0);for(Y=Math.min(Y/S|0,67108863),g._ishlnsubmul(x,Y,V);g.negative!==0;)Y--,g.negative=0,g._ishlnsubmul(x,1,V),g.isZero()||(g.negative^=1);d&&(d.words[V]=Y)}return d&&d.strip(),g.strip(),p!=="div"&&v!==0&&g.iushrn(v),{div:d||null,mod:g}},n.prototype.divmod=function(c,p,v){if(r(!c.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var g,x,S;return this.negative!==0&&c.negative===0?(S=this.neg().divmod(c,p),p!=="mod"&&(g=S.div.neg()),p!=="div"&&(x=S.mod.neg(),v&&x.negative!==0&&x.iadd(c)),{div:g,mod:x}):this.negative===0&&c.negative!==0?(S=this.divmod(c.neg(),p),p!=="mod"&&(g=S.div.neg()),{div:g,mod:S.mod}):this.negative&c.negative?(S=this.neg().divmod(c.neg(),p),p!=="div"&&(x=S.mod.neg(),v&&x.negative!==0&&x.isub(c)),{div:S.div,mod:x}):c.length>this.length||this.cmp(c)<0?{div:new n(0),mod:this}:c.length===1?p==="div"?{div:this.divn(c.words[0]),mod:null}:p==="mod"?{div:null,mod:new n(this.modn(c.words[0]))}:{div:this.divn(c.words[0]),mod:new n(this.modn(c.words[0]))}:this._wordDiv(c,p)},n.prototype.div=function(c){return this.divmod(c,"div",!1).div},n.prototype.mod=function(c){return this.divmod(c,"mod",!1).mod},n.prototype.umod=function(c){return this.divmod(c,"mod",!0).mod},n.prototype.divRound=function(c){var p=this.divmod(c);if(p.mod.isZero())return p.div;var v=p.div.negative!==0?p.mod.isub(c):p.mod,g=c.ushrn(1),x=c.andln(1),S=v.cmp(g);return S<0||x===1&&S===0?p.div:p.div.negative!==0?p.div.isubn(1):p.div.iaddn(1)},n.prototype.modn=function(c){r(c<=67108863);for(var p=(1<<26)%c,v=0,g=this.length-1;g>=0;g--)v=(p*v+(this.words[g]|0))%c;return v},n.prototype.idivn=function(c){r(c<=67108863);for(var p=0,v=this.length-1;v>=0;v--){var g=(this.words[v]|0)+p*67108864;this.words[v]=g/c|0,p=g%c}return this.strip()},n.prototype.divn=function(c){return this.clone().idivn(c)},n.prototype.egcd=function(c){r(c.negative===0),r(!c.isZero());var p=this,v=c.clone();p.negative!==0?p=p.umod(c):p=p.clone();for(var g=new n(1),x=new n(0),S=new n(0),b=new n(1),l=0;p.isEven()&&v.isEven();)p.iushrn(1),v.iushrn(1),++l;for(var d=v.clone(),A=p.clone();!p.isZero();){for(var D=0,V=1;!(p.words[0]&V)&&D<26;++D,V<<=1);if(D>0)for(p.iushrn(D);D-- >0;)(g.isOdd()||x.isOdd())&&(g.iadd(d),x.isub(A)),g.iushrn(1),x.iushrn(1);for(var Y=0,se=1;!(v.words[0]&se)&&Y<26;++Y,se<<=1);if(Y>0)for(v.iushrn(Y);Y-- >0;)(S.isOdd()||b.isOdd())&&(S.iadd(d),b.isub(A)),S.iushrn(1),b.iushrn(1);p.cmp(v)>=0?(p.isub(v),g.isub(S),x.isub(b)):(v.isub(p),S.isub(g),b.isub(x))}return{a:S,b,gcd:v.iushln(l)}},n.prototype._invmp=function(c){r(c.negative===0),r(!c.isZero());var p=this,v=c.clone();p.negative!==0?p=p.umod(c):p=p.clone();for(var g=new n(1),x=new n(0),S=v.clone();p.cmpn(1)>0&&v.cmpn(1)>0;){for(var b=0,l=1;!(p.words[0]&l)&&b<26;++b,l<<=1);if(b>0)for(p.iushrn(b);b-- >0;)g.isOdd()&&g.iadd(S),g.iushrn(1);for(var d=0,A=1;!(v.words[0]&A)&&d<26;++d,A<<=1);if(d>0)for(v.iushrn(d);d-- >0;)x.isOdd()&&x.iadd(S),x.iushrn(1);p.cmp(v)>=0?(p.isub(v),g.isub(x)):(v.isub(p),x.isub(g))}var D;return p.cmpn(1)===0?D=g:D=x,D.cmpn(0)<0&&D.iadd(c),D},n.prototype.gcd=function(c){if(this.isZero())return c.abs();if(c.isZero())return this.abs();var p=this.clone(),v=c.clone();p.negative=0,v.negative=0;for(var g=0;p.isEven()&&v.isEven();g++)p.iushrn(1),v.iushrn(1);do{for(;p.isEven();)p.iushrn(1);for(;v.isEven();)v.iushrn(1);var x=p.cmp(v);if(x<0){var S=p;p=v,v=S}else if(x===0||v.cmpn(1)===0)break;p.isub(v)}while(!0);return v.iushln(g)},n.prototype.invm=function(c){return this.egcd(c).a.umod(c)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(c){return this.words[0]&c},n.prototype.bincn=function(c){r(typeof c=="number");var p=c%26,v=(c-p)/26,g=1<<p;if(this.length<=v)return this._expand(v+1),this.words[v]|=g,this;for(var x=g,S=v;x!==0&&S<this.length;S++){var b=this.words[S]|0;b+=x,x=b>>>26,b&=67108863,this.words[S]=b}return x!==0&&(this.words[S]=x,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(c){var p=c<0;if(this.negative!==0&&!p)return-1;if(this.negative===0&&p)return 1;this.strip();var v;if(this.length>1)v=1;else{p&&(c=-c),r(c<=67108863,"Number is too big");var g=this.words[0]|0;v=g===c?0:g<c?-1:1}return this.negative!==0?-v|0:v},n.prototype.cmp=function(c){if(this.negative!==0&&c.negative===0)return-1;if(this.negative===0&&c.negative!==0)return 1;var p=this.ucmp(c);return this.negative!==0?-p|0:p},n.prototype.ucmp=function(c){if(this.length>c.length)return 1;if(this.length<c.length)return-1;for(var p=0,v=this.length-1;v>=0;v--){var g=this.words[v]|0,x=c.words[v]|0;if(g!==x){g<x?p=-1:g>x&&(p=1);break}}return p},n.prototype.gtn=function(c){return this.cmpn(c)===1},n.prototype.gt=function(c){return this.cmp(c)===1},n.prototype.gten=function(c){return this.cmpn(c)>=0},n.prototype.gte=function(c){return this.cmp(c)>=0},n.prototype.ltn=function(c){return this.cmpn(c)===-1},n.prototype.lt=function(c){return this.cmp(c)===-1},n.prototype.lten=function(c){return this.cmpn(c)<=0},n.prototype.lte=function(c){return this.cmp(c)<=0},n.prototype.eqn=function(c){return this.cmpn(c)===0},n.prototype.eq=function(c){return this.cmp(c)===0},n.red=function(c){return new O(c)},n.prototype.toRed=function(c){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),c.convertTo(this)._forceRed(c)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(c){return this.red=c,this},n.prototype.forceRed=function(c){return r(!this.red,"Already a number in reduction context"),this._forceRed(c)},n.prototype.redAdd=function(c){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,c)},n.prototype.redIAdd=function(c){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,c)},n.prototype.redSub=function(c){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,c)},n.prototype.redISub=function(c){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,c)},n.prototype.redShl=function(c){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,c)},n.prototype.redMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.mul(this,c)},n.prototype.redIMul=function(c){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,c),this.red.imul(this,c)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(c){return r(this.red&&!c.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,c)};var H={k256:null,p224:null,p192:null,p25519:null};function ee(f,c){this.name=f,this.p=new n(c,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}ee.prototype._tmp=function(){var c=new n(null);return c.words=new Array(Math.ceil(this.n/13)),c},ee.prototype.ireduce=function(c){var p=c,v;do this.split(p,this.tmp),p=this.imulK(p),p=p.iadd(this.tmp),v=p.bitLength();while(v>this.n);var g=v<this.n?-1:p.ucmp(this.p);return g===0?(p.words[0]=0,p.length=1):g>0?p.isub(this.p):p.strip!==void 0?p.strip():p._strip(),p},ee.prototype.split=function(c,p){c.iushrn(this.n,0,p)},ee.prototype.imulK=function(c){return c.imul(this.k)};function ce(){ee.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(ce,ee),ce.prototype.split=function(c,p){for(var v=4194303,g=Math.min(c.length,9),x=0;x<g;x++)p.words[x]=c.words[x];if(p.length=g,c.length<=9){c.words[0]=0,c.length=1;return}var S=c.words[9];for(p.words[p.length++]=S&v,x=10;x<c.length;x++){var b=c.words[x]|0;c.words[x-10]=(b&v)<<4|S>>>22,S=b}S>>>=22,c.words[x-10]=S,S===0&&c.length>10?c.length-=10:c.length-=9},ce.prototype.imulK=function(c){c.words[c.length]=0,c.words[c.length+1]=0,c.length+=2;for(var p=0,v=0;v<c.length;v++){var g=c.words[v]|0;p+=g*977,c.words[v]=p&67108863,p=g*64+(p/67108864|0)}return c.words[c.length-1]===0&&(c.length--,c.words[c.length-1]===0&&c.length--),c};function ge(){ee.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(ge,ee);function Se(){ee.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(Se,ee);function me(){ee.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(me,ee),me.prototype.imulK=function(c){for(var p=0,v=0;v<c.length;v++){var g=(c.words[v]|0)*19+p,x=g&67108863;g>>>=26,c.words[v]=x,p=g}return p!==0&&(c.words[c.length++]=p),c},n._prime=function(c){if(H[c])return H[c];var p;if(c==="k256")p=new ce;else if(c==="p224")p=new ge;else if(c==="p192")p=new Se;else if(c==="p25519")p=new me;else throw new Error("Unknown prime "+c);return H[c]=p,p};function O(f){if(typeof f=="string"){var c=n._prime(f);this.m=c.p,this.prime=c}else r(f.gtn(1),"modulus must be greater than 1"),this.m=f,this.prime=null}O.prototype._verify1=function(c){r(c.negative===0,"red works only with positives"),r(c.red,"red works only with red numbers")},O.prototype._verify2=function(c,p){r((c.negative|p.negative)===0,"red works only with positives"),r(c.red&&c.red===p.red,"red works only with red numbers")},O.prototype.imod=function(c){return this.prime?this.prime.ireduce(c)._forceRed(this):c.umod(this.m)._forceRed(this)},O.prototype.neg=function(c){return c.isZero()?c.clone():this.m.sub(c)._forceRed(this)},O.prototype.add=function(c,p){this._verify2(c,p);var v=c.add(p);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},O.prototype.iadd=function(c,p){this._verify2(c,p);var v=c.iadd(p);return v.cmp(this.m)>=0&&v.isub(this.m),v},O.prototype.sub=function(c,p){this._verify2(c,p);var v=c.sub(p);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},O.prototype.isub=function(c,p){this._verify2(c,p);var v=c.isub(p);return v.cmpn(0)<0&&v.iadd(this.m),v},O.prototype.shl=function(c,p){return this._verify1(c),this.imod(c.ushln(p))},O.prototype.imul=function(c,p){return this._verify2(c,p),this.imod(c.imul(p))},O.prototype.mul=function(c,p){return this._verify2(c,p),this.imod(c.mul(p))},O.prototype.isqr=function(c){return this.imul(c,c.clone())},O.prototype.sqr=function(c){return this.mul(c,c)},O.prototype.sqrt=function(c){if(c.isZero())return c.clone();var p=this.m.andln(3);if(r(p%2===1),p===3){var v=this.m.add(new n(1)).iushrn(2);return this.pow(c,v)}for(var g=this.m.subn(1),x=0;!g.isZero()&&g.andln(1)===0;)x++,g.iushrn(1);r(!g.isZero());var S=new n(1).toRed(this),b=S.redNeg(),l=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new n(2*d*d).toRed(this);this.pow(d,l).cmp(b)!==0;)d.redIAdd(b);for(var A=this.pow(d,g),D=this.pow(c,g.addn(1).iushrn(1)),V=this.pow(c,g),Y=x;V.cmp(S)!==0;){for(var se=V,ae=0;se.cmp(S)!==0;ae++)se=se.redSqr();r(ae<Y);var pe=this.pow(A,new n(1).iushln(Y-ae-1));D=D.redMul(pe),A=pe.redSqr(),V=V.redMul(A),Y=ae}return D},O.prototype.invm=function(c){var p=c._invmp(this.m);return p.negative!==0?(p.negative=0,this.imod(p).redNeg()):this.imod(p)},O.prototype.pow=function(c,p){if(p.isZero())return new n(1).toRed(this);if(p.cmpn(1)===0)return c.clone();var v=4,g=new Array(1<<v);g[0]=new n(1).toRed(this),g[1]=c;for(var x=2;x<g.length;x++)g[x]=this.mul(g[x-1],c);var S=g[0],b=0,l=0,d=p.bitLength()%26;for(d===0&&(d=26),x=p.length-1;x>=0;x--){for(var A=p.words[x],D=d-1;D>=0;D--){var V=A>>D&1;if(S!==g[0]&&(S=this.sqr(S)),V===0&&b===0){l=0;continue}b<<=1,b|=V,l++,!(l!==v&&(x!==0||D!==0))&&(S=this.mul(S,g[b]),l=0,b=0)}d=26}return S},O.prototype.convertTo=function(c){var p=c.umod(this.m);return p===c?p.clone():p},O.prototype.convertFrom=function(c){var p=c.clone();return p.red=null,p},n.mont=function(c){return new E(c)};function E(f){O.call(this,f),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(E,O),E.prototype.convertTo=function(c){return this.imod(c.ushln(this.shift))},E.prototype.convertFrom=function(c){var p=this.imod(c.mul(this.rinv));return p.red=null,p},E.prototype.imul=function(c,p){if(c.isZero()||p.isZero())return c.words[0]=0,c.length=1,c;var v=c.imul(p),g=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=v.isub(g).iushrn(this.shift),S=x;return x.cmp(this.m)>=0?S=x.isub(this.m):x.cmpn(0)<0&&(S=x.iadd(this.m)),S._forceRed(this)},E.prototype.mul=function(c,p){if(c.isZero()||p.isZero())return new n(0)._forceRed(this);var v=c.mul(p),g=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),x=v.isub(g).iushrn(this.shift),S=x;return x.cmp(this.m)>=0?S=x.isub(this.m):x.cmpn(0)<0&&(S=x.iadd(this.m)),S._forceRed(this)},E.prototype.invm=function(c){var p=this.imod(c._invmp(this.m).mul(this.r2));return p._forceRed(this)}})(typeof G0>"u"||G0,_1)});var Pa=X((MU,w1)=>{w1.exports=y1;function y1(e,t){if(!e)throw new Error(t||"Assertion failed")}y1.equal=function(t,r,i){if(t!=r)throw new Error(i||"Assertion failed: "+t+" != "+r)}});var $0=X(I1=>{"use strict";var xp=I1;function j5(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e!="string"){for(var i=0;i<e.length;i++)r[i]=e[i]|0;return r}if(t==="hex"){e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e);for(var i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var i=0;i<e.length;i++){var n=e.charCodeAt(i),o=n>>8,u=n&255;o?r.push(o,u):r.push(u)}return r}xp.toArray=j5;function S1(e){return e.length===1?"0"+e:e}xp.zero2=S1;function E1(e){for(var t="",r=0;r<e.length;r++)t+=S1(e[r].toString(16));return t}xp.toHex=E1;xp.encode=function(t,r){return r==="hex"?E1(t):t}});var Wi=X(T1=>{"use strict";var An=T1,W5=rs(),K5=Pa(),bp=$0();An.assert=K5;An.toArray=bp.toArray;An.zero2=bp.zero2;An.toHex=bp.toHex;An.encode=bp.encode;function G5(e,t,r){var i=new Array(Math.max(e.bitLength(),r)+1),n;for(n=0;n<i.length;n+=1)i[n]=0;var o=1<<t+1,u=e.clone();for(n=0;n<i.length;n++){var m,_=u.andln(o-1);u.isOdd()?(_>(o>>1)-1?m=(o>>1)-_:m=_,u.isubn(m)):m=0,i[n]=m,u.iushrn(1)}return i}An.getNAF=G5;function $5(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var i=0,n=0,o;e.cmpn(-i)>0||t.cmpn(-n)>0;){var u=e.andln(3)+i&3,m=t.andln(3)+n&3;u===3&&(u=-1),m===3&&(m=-1);var _;u&1?(o=e.andln(7)+i&7,(o===3||o===5)&&m===2?_=-u:_=u):_=0,r[0].push(_);var w;m&1?(o=t.andln(7)+n&7,(o===3||o===5)&&u===2?w=-m:w=m):w=0,r[1].push(w),2*i===_+1&&(i=1-i),2*n===w+1&&(n=1-n),e.iushrn(1),t.iushrn(1)}return r}An.getJSF=$5;function Y5(e,t,r){var i="_"+t;e.prototype[t]=function(){return this[i]!==void 0?this[i]:this[i]=r.call(this)}}An.cachedProperty=Y5;function Z5(e){return typeof e=="string"?An.toArray(e,"hex"):e}An.parseBytes=Z5;function X5(e){return new W5(e,"hex","le")}An.intFromLE=X5});var J0=X((UU,X0)=>{var Y0;X0.exports=function(t){return Y0||(Y0=new Na(null)),Y0.generate(t)};function Na(e){this.rand=e}X0.exports.Rand=Na;Na.prototype.generate=function(t){return this._rand(t)};Na.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var r=new Uint8Array(t),i=0;i<r.length;i++)r[i]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?Na.prototype._rand=function(t){var r=new Uint8Array(t);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?Na.prototype._rand=function(t){var r=new Uint8Array(t);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(Na.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(Z0=require("crypto"),typeof Z0.randomBytes!="function")throw new Error("Not supported");Na.prototype._rand=function(t){return Z0.randomBytes(t)}}catch{}var Z0});var Qu=X((DU,R1)=>{"use strict";var Io=rs(),Ju=Wi(),_p=Ju.getNAF,J5=Ju.getJSF,yp=Ju.assert;function Ba(e,t){this.type=e,this.p=new Io(t.p,16),this.red=t.prime?Io.red(t.prime):Io.mont(this.p),this.zero=new Io(0).toRed(this.red),this.one=new Io(1).toRed(this.red),this.two=new Io(2).toRed(this.red),this.n=t.n&&new Io(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}R1.exports=Ba;Ba.prototype.point=function(){throw new Error("Not implemented")};Ba.prototype.validate=function(){throw new Error("Not implemented")};Ba.prototype._fixedNafMul=function(t,r){yp(t.precomputed);var i=t._getDoubles(),n=_p(r,1,this._bitLength),o=(1<<i.step+1)-(i.step%2===0?2:1);o/=3;var u=[],m,_;for(m=0;m<n.length;m+=i.step){_=0;for(var w=m+i.step-1;w>=m;w--)_=(_<<1)+n[w];u.push(_)}for(var I=this.jpoint(null,null,null),T=this.jpoint(null,null,null),N=o;N>0;N--){for(m=0;m<u.length;m++)_=u[m],_===N?T=T.mixedAdd(i.points[m]):_===-N&&(T=T.mixedAdd(i.points[m].neg()));I=I.add(T)}return I.toP()};Ba.prototype._wnafMul=function(t,r){var i=4,n=t._getNAFPoints(i);i=n.wnd;for(var o=n.points,u=_p(r,i,this._bitLength),m=this.jpoint(null,null,null),_=u.length-1;_>=0;_--){for(var w=0;_>=0&&u[_]===0;_--)w++;if(_>=0&&w++,m=m.dblp(w),_<0)break;var I=u[_];yp(I!==0),t.type==="affine"?I>0?m=m.mixedAdd(o[I-1>>1]):m=m.mixedAdd(o[-I-1>>1].neg()):I>0?m=m.add(o[I-1>>1]):m=m.add(o[-I-1>>1].neg())}return t.type==="affine"?m.toP():m};Ba.prototype._wnafMulAdd=function(t,r,i,n,o){var u=this._wnafT1,m=this._wnafT2,_=this._wnafT3,w=0,I,T,N;for(I=0;I<n;I++){N=r[I];var C=N._getNAFPoints(t);u[I]=C.wnd,m[I]=C.points}for(I=n-1;I>=1;I-=2){var B=I-1,U=I;if(u[B]!==1||u[U]!==1){_[B]=_p(i[B],u[B],this._bitLength),_[U]=_p(i[U],u[U],this._bitLength),w=Math.max(_[B].length,w),w=Math.max(_[U].length,w);continue}var Z=[r[B],null,null,r[U]];r[B].y.cmp(r[U].y)===0?(Z[1]=r[B].add(r[U]),Z[2]=r[B].toJ().mixedAdd(r[U].neg())):r[B].y.cmp(r[U].y.redNeg())===0?(Z[1]=r[B].toJ().mixedAdd(r[U]),Z[2]=r[B].add(r[U].neg())):(Z[1]=r[B].toJ().mixedAdd(r[U]),Z[2]=r[B].toJ().mixedAdd(r[U].neg()));var $=[-3,-1,-5,-7,0,7,5,1,3],H=J5(i[B],i[U]);for(w=Math.max(H[0].length,w),_[B]=new Array(w),_[U]=new Array(w),T=0;T<w;T++){var ee=H[0][T]|0,ce=H[1][T]|0;_[B][T]=$[(ee+1)*3+(ce+1)],_[U][T]=0,m[B]=Z}}var ge=this.jpoint(null,null,null),Se=this._wnafT4;for(I=w;I>=0;I--){for(var me=0;I>=0;){var O=!0;for(T=0;T<n;T++)Se[T]=_[T][I]|0,Se[T]!==0&&(O=!1);if(!O)break;me++,I--}if(I>=0&&me++,ge=ge.dblp(me),I<0)break;for(T=0;T<n;T++){var E=Se[T];E!==0&&(E>0?N=m[T][E-1>>1]:E<0&&(N=m[T][-E-1>>1].neg()),N.type==="affine"?ge=ge.mixedAdd(N):ge=ge.add(N))}}for(I=0;I<n;I++)m[I]=null;return o?ge:ge.toP()};function fn(e,t){this.curve=e,this.type=t,this.precomputed=null}Ba.BasePoint=fn;fn.prototype.eq=function(){throw new Error("Not implemented")};fn.prototype.validate=function(){return this.curve.validate(this)};Ba.prototype.decodePoint=function(t,r){t=Ju.toArray(t,r);var i=this.p.byteLength();if((t[0]===4||t[0]===6||t[0]===7)&&t.length-1===2*i){t[0]===6?yp(t[t.length-1]%2===0):t[0]===7&&yp(t[t.length-1]%2===1);var n=this.point(t.slice(1,1+i),t.slice(1+i,1+2*i));return n}else if((t[0]===2||t[0]===3)&&t.length-1===i)return this.pointFromX(t.slice(1,1+i),t[0]===3);throw new Error("Unknown point format")};fn.prototype.encodeCompressed=function(t){return this.encode(t,!0)};fn.prototype._encode=function(t){var r=this.curve.p.byteLength(),i=this.getX().toArray("be",r);return t?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",r))};fn.prototype.encode=function(t,r){return Ju.encode(this._encode(r),t)};fn.prototype.precompute=function(t){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,t),r.beta=this._getBeta(),this.precomputed=r,this};fn.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((t.bitLength()+1)/r.step):!1};fn.prototype._getDoubles=function(t,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],n=this,o=0;o<r;o+=t){for(var u=0;u<t;u++)n=n.dbl();i.push(n)}return{step:t,points:i}};fn.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],i=(1<<t)-1,n=i===1?null:this.dbl(),o=1;o<i;o++)r[o]=r[o-1].add(n);return{wnd:t,points:r}};fn.prototype._getBeta=function(){return null};fn.prototype.dblp=function(t){for(var r=this,i=0;i<t;i++)r=r.dbl();return r}});var A1=X((qU,Q0)=>{typeof Object.create=="function"?Q0.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Q0.exports=function(t,r){if(r){t.super_=r;var i=function(){};i.prototype=r.prototype,t.prototype=new i,t.prototype.constructor=t}}});var ef=X((FU,tm)=>{try{if(em=require("util"),typeof em.inherits!="function")throw"";tm.exports=em.inherits}catch{tm.exports=A1()}var em});var k1=X((HU,O1)=>{"use strict";var Q5=Wi(),yr=rs(),rm=ef(),Cc=Qu(),ek=Q5.assert;function ln(e){Cc.call(this,"short",e),this.a=new yr(e.a,16).toRed(this.red),this.b=new yr(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}rm(ln,Cc);O1.exports=ln;ln.prototype._getEndomorphism=function(t){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,i;if(t.beta)r=new yr(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);r=n[0].cmp(n[1])<0?n[0]:n[1],r=r.toRed(this.red)}if(t.lambda)i=new yr(t.lambda,16);else{var o=this._getEndoRoots(this.n);this.g.mul(o[0]).x.cmp(this.g.x.redMul(r))===0?i=o[0]:(i=o[1],ek(this.g.mul(i).x.cmp(this.g.x.redMul(r))===0))}var u;return t.basis?u=t.basis.map(function(m){return{a:new yr(m.a,16),b:new yr(m.b,16)}}):u=this._getEndoBasis(i),{beta:r,lambda:i,basis:u}}};ln.prototype._getEndoRoots=function(t){var r=t===this.p?this.red:yr.mont(t),i=new yr(2).toRed(r).redInvm(),n=i.redNeg(),o=new yr(3).toRed(r).redNeg().redSqrt().redMul(i),u=n.redAdd(o).fromRed(),m=n.redSub(o).fromRed();return[u,m]};ln.prototype._getEndoBasis=function(t){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),i=t,n=this.n.clone(),o=new yr(1),u=new yr(0),m=new yr(0),_=new yr(1),w,I,T,N,C,B,U,Z=0,$,H;i.cmpn(0)!==0;){var ee=n.div(i);$=n.sub(ee.mul(i)),H=m.sub(ee.mul(o));var ce=_.sub(ee.mul(u));if(!T&&$.cmp(r)<0)w=U.neg(),I=o,T=$.neg(),N=H;else if(T&&++Z===2)break;U=$,n=i,i=$,m=o,o=H,_=u,u=ce}C=$.neg(),B=H;var ge=T.sqr().add(N.sqr()),Se=C.sqr().add(B.sqr());return Se.cmp(ge)>=0&&(C=w,B=I),T.negative&&(T=T.neg(),N=N.neg()),C.negative&&(C=C.neg(),B=B.neg()),[{a:T,b:N},{a:C,b:B}]};ln.prototype._endoSplit=function(t){var r=this.endo.basis,i=r[0],n=r[1],o=n.b.mul(t).divRound(this.n),u=i.b.neg().mul(t).divRound(this.n),m=o.mul(i.a),_=u.mul(n.a),w=o.mul(i.b),I=u.mul(n.b),T=t.sub(m).sub(_),N=w.add(I).neg();return{k1:T,k2:N}};ln.prototype.pointFromX=function(t,r){t=new yr(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=i.redSqrt();if(n.redSqr().redSub(i).cmp(this.zero)!==0)throw new Error("invalid point");var o=n.fromRed().isOdd();return(r&&!o||!r&&o)&&(n=n.redNeg()),this.point(t,n)};ln.prototype.validate=function(t){if(t.inf)return!0;var r=t.x,i=t.y,n=this.a.redMul(r),o=r.redSqr().redMul(r).redIAdd(n).redIAdd(this.b);return i.redSqr().redISub(o).cmpn(0)===0};ln.prototype._endoWnafMulAdd=function(t,r,i){for(var n=this._endoWnafT1,o=this._endoWnafT2,u=0;u<t.length;u++){var m=this._endoSplit(r[u]),_=t[u],w=_._getBeta();m.k1.negative&&(m.k1.ineg(),_=_.neg(!0)),m.k2.negative&&(m.k2.ineg(),w=w.neg(!0)),n[u*2]=_,n[u*2+1]=w,o[u*2]=m.k1,o[u*2+1]=m.k2}for(var I=this._wnafMulAdd(1,n,o,u*2,i),T=0;T<u*2;T++)n[T]=null,o[T]=null;return I};function Xr(e,t,r,i){Cc.BasePoint.call(this,e,"affine"),t===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new yr(t,16),this.y=new yr(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}rm(Xr,Cc.BasePoint);ln.prototype.point=function(t,r,i){return new Xr(this,t,r,i)};ln.prototype.pointFromJSON=function(t,r){return Xr.fromJSON(this,t,r)};Xr.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var i=this.curve,n=function(o){return i.point(o.x.redMul(i.endo.beta),o.y)};t.beta=r,r.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return r}};Xr.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};Xr.fromJSON=function(t,r,i){typeof r=="string"&&(r=JSON.parse(r));var n=t.point(r[0],r[1],i);if(!r[2])return n;function o(m){return t.point(m[0],m[1],i)}var u=r[2];return n.precomputed={beta:null,doubles:u.doubles&&{step:u.doubles.step,points:[n].concat(u.doubles.points.map(o))},naf:u.naf&&{wnd:u.naf.wnd,points:[n].concat(u.naf.points.map(o))}},n};Xr.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};Xr.prototype.isInfinity=function(){return this.inf};Xr.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(this.x.cmp(t.x)===0)return this.curve.point(null,null);var r=this.y.redSub(t.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(t.x).redInvm()));var i=r.redSqr().redISub(this.x).redISub(t.x),n=r.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,n)};Xr.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(t.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,i=this.x.redSqr(),n=t.redInvm(),o=i.redAdd(i).redIAdd(i).redIAdd(r).redMul(n),u=o.redSqr().redISub(this.x.redAdd(this.x)),m=o.redMul(this.x.redSub(u)).redISub(this.y);return this.curve.point(u,m)};Xr.prototype.getX=function(){return this.x.fromRed()};Xr.prototype.getY=function(){return this.y.fromRed()};Xr.prototype.mul=function(t){return t=new yr(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)};Xr.prototype.mulAdd=function(t,r,i){var n=[this,r],o=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,o):this.curve._wnafMulAdd(1,n,o,2)};Xr.prototype.jmulAdd=function(t,r,i){var n=[this,r],o=[t,i];return this.curve.endo?this.curve._endoWnafMulAdd(n,o,!0):this.curve._wnafMulAdd(1,n,o,2,!0)};Xr.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||this.x.cmp(t.x)===0&&this.y.cmp(t.y)===0)};Xr.prototype.neg=function(t){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var i=this.precomputed,n=function(o){return o.neg()};r.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(n)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(n)}}}return r};Xr.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var t=this.curve.jpoint(this.x,this.y,this.curve.one);return t};function ni(e,t,r,i){Cc.BasePoint.call(this,e,"jacobian"),t===null&&r===null&&i===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new yr(0)):(this.x=new yr(t,16),this.y=new yr(r,16),this.z=new yr(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}rm(ni,Cc.BasePoint);ln.prototype.jpoint=function(t,r,i){return new ni(this,t,r,i)};ni.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),r=t.redSqr(),i=this.x.redMul(r),n=this.y.redMul(r).redMul(t);return this.curve.point(i,n)};ni.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};ni.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var r=t.z.redSqr(),i=this.z.redSqr(),n=this.x.redMul(r),o=t.x.redMul(i),u=this.y.redMul(r.redMul(t.z)),m=t.y.redMul(i.redMul(this.z)),_=n.redSub(o),w=u.redSub(m);if(_.cmpn(0)===0)return w.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var I=_.redSqr(),T=I.redMul(_),N=n.redMul(I),C=w.redSqr().redIAdd(T).redISub(N).redISub(N),B=w.redMul(N.redISub(C)).redISub(u.redMul(T)),U=this.z.redMul(t.z).redMul(_);return this.curve.jpoint(C,B,U)};ni.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var r=this.z.redSqr(),i=this.x,n=t.x.redMul(r),o=this.y,u=t.y.redMul(r).redMul(this.z),m=i.redSub(n),_=o.redSub(u);if(m.cmpn(0)===0)return _.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var w=m.redSqr(),I=w.redMul(m),T=i.redMul(w),N=_.redSqr().redIAdd(I).redISub(T).redISub(T),C=_.redMul(T.redISub(N)).redISub(o.redMul(I)),B=this.z.redMul(m);return this.curve.jpoint(N,C,B)};ni.prototype.dblp=function(t){if(t===0)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var i=this;for(r=0;r<t;r++)i=i.dbl();return i}var n=this.curve.a,o=this.curve.tinv,u=this.x,m=this.y,_=this.z,w=_.redSqr().redSqr(),I=m.redAdd(m);for(r=0;r<t;r++){var T=u.redSqr(),N=I.redSqr(),C=N.redSqr(),B=T.redAdd(T).redIAdd(T).redIAdd(n.redMul(w)),U=u.redMul(N),Z=B.redSqr().redISub(U.redAdd(U)),$=U.redISub(Z),H=B.redMul($);H=H.redIAdd(H).redISub(C);var ee=I.redMul(_);r+1<t&&(w=w.redMul(C)),u=Z,_=ee,I=H}return this.curve.jpoint(u,I.redMul(o),_)};ni.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};ni.prototype._zeroDbl=function(){var t,r,i;if(this.zOne){var n=this.x.redSqr(),o=this.y.redSqr(),u=o.redSqr(),m=this.x.redAdd(o).redSqr().redISub(n).redISub(u);m=m.redIAdd(m);var _=n.redAdd(n).redIAdd(n),w=_.redSqr().redISub(m).redISub(m),I=u.redIAdd(u);I=I.redIAdd(I),I=I.redIAdd(I),t=w,r=_.redMul(m.redISub(w)).redISub(I),i=this.y.redAdd(this.y)}else{var T=this.x.redSqr(),N=this.y.redSqr(),C=N.redSqr(),B=this.x.redAdd(N).redSqr().redISub(T).redISub(C);B=B.redIAdd(B);var U=T.redAdd(T).redIAdd(T),Z=U.redSqr(),$=C.redIAdd(C);$=$.redIAdd($),$=$.redIAdd($),t=Z.redISub(B).redISub(B),r=U.redMul(B.redISub(t)).redISub($),i=this.y.redMul(this.z),i=i.redIAdd(i)}return this.curve.jpoint(t,r,i)};ni.prototype._threeDbl=function(){var t,r,i;if(this.zOne){var n=this.x.redSqr(),o=this.y.redSqr(),u=o.redSqr(),m=this.x.redAdd(o).redSqr().redISub(n).redISub(u);m=m.redIAdd(m);var _=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),w=_.redSqr().redISub(m).redISub(m);t=w;var I=u.redIAdd(u);I=I.redIAdd(I),I=I.redIAdd(I),r=_.redMul(m.redISub(w)).redISub(I),i=this.y.redAdd(this.y)}else{var T=this.z.redSqr(),N=this.y.redSqr(),C=this.x.redMul(N),B=this.x.redSub(T).redMul(this.x.redAdd(T));B=B.redAdd(B).redIAdd(B);var U=C.redIAdd(C);U=U.redIAdd(U);var Z=U.redAdd(U);t=B.redSqr().redISub(Z),i=this.y.redAdd(this.z).redSqr().redISub(N).redISub(T);var $=N.redSqr();$=$.redIAdd($),$=$.redIAdd($),$=$.redIAdd($),r=B.redMul(U.redISub(t)).redISub($)}return this.curve.jpoint(t,r,i)};ni.prototype._dbl=function(){var t=this.curve.a,r=this.x,i=this.y,n=this.z,o=n.redSqr().redSqr(),u=r.redSqr(),m=i.redSqr(),_=u.redAdd(u).redIAdd(u).redIAdd(t.redMul(o)),w=r.redAdd(r);w=w.redIAdd(w);var I=w.redMul(m),T=_.redSqr().redISub(I.redAdd(I)),N=I.redISub(T),C=m.redSqr();C=C.redIAdd(C),C=C.redIAdd(C),C=C.redIAdd(C);var B=_.redMul(N).redISub(C),U=i.redAdd(i).redMul(n);return this.curve.jpoint(T,B,U)};ni.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr(),n=r.redSqr(),o=t.redAdd(t).redIAdd(t),u=o.redSqr(),m=this.x.redAdd(r).redSqr().redISub(t).redISub(n);m=m.redIAdd(m),m=m.redAdd(m).redIAdd(m),m=m.redISub(u);var _=m.redSqr(),w=n.redIAdd(n);w=w.redIAdd(w),w=w.redIAdd(w),w=w.redIAdd(w);var I=o.redIAdd(m).redSqr().redISub(u).redISub(_).redISub(w),T=r.redMul(I);T=T.redIAdd(T),T=T.redIAdd(T);var N=this.x.redMul(_).redISub(T);N=N.redIAdd(N),N=N.redIAdd(N);var C=this.y.redMul(I.redMul(w.redISub(I)).redISub(m.redMul(_)));C=C.redIAdd(C),C=C.redIAdd(C),C=C.redIAdd(C);var B=this.z.redAdd(m).redSqr().redISub(i).redISub(_);return this.curve.jpoint(N,C,B)};ni.prototype.mul=function(t,r){return t=new yr(t,r),this.curve._wnafMul(this,t)};ni.prototype.eq=function(t){if(t.type==="affine")return this.eq(t.toJ());if(this===t)return!0;var r=this.z.redSqr(),i=t.z.redSqr();if(this.x.redMul(i).redISub(t.x.redMul(r)).cmpn(0)!==0)return!1;var n=r.redMul(this.z),o=i.redMul(t.z);return this.y.redMul(o).redISub(t.y.redMul(n)).cmpn(0)===0};ni.prototype.eqXToP=function(t){var r=this.z.redSqr(),i=t.toRed(this.curve.red).redMul(r);if(this.x.cmp(i)===0)return!0;for(var n=t.clone(),o=this.curve.redN.redMul(r);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(o),this.x.cmp(i)===0)return!0}};ni.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};ni.prototype.isInfinity=function(){return this.z.cmpn(0)===0}});var B1=X((zU,N1)=>{"use strict";var Lc=rs(),P1=ef(),wp=Qu(),tk=Wi();function Uc(e){wp.call(this,"mont",e),this.a=new Lc(e.a,16).toRed(this.red),this.b=new Lc(e.b,16).toRed(this.red),this.i4=new Lc(4).toRed(this.red).redInvm(),this.two=new Lc(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}P1(Uc,wp);N1.exports=Uc;Uc.prototype.validate=function(t){var r=t.normalize().x,i=r.redSqr(),n=i.redMul(r).redAdd(i.redMul(this.a)).redAdd(r),o=n.redSqrt();return o.redSqr().cmp(n)===0};function Jr(e,t,r){wp.BasePoint.call(this,e,"projective"),t===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Lc(t,16),this.z=new Lc(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}P1(Jr,wp.BasePoint);Uc.prototype.decodePoint=function(t,r){return this.point(tk.toArray(t,r),1)};Uc.prototype.point=function(t,r){return new Jr(this,t,r)};Uc.prototype.pointFromJSON=function(t){return Jr.fromJSON(this,t)};Jr.prototype.precompute=function(){};Jr.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};Jr.fromJSON=function(t,r){return new Jr(t,r[0],r[1]||t.one)};Jr.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Jr.prototype.isInfinity=function(){return this.z.cmpn(0)===0};Jr.prototype.dbl=function(){var t=this.x.redAdd(this.z),r=t.redSqr(),i=this.x.redSub(this.z),n=i.redSqr(),o=r.redSub(n),u=r.redMul(n),m=o.redMul(n.redAdd(this.curve.a24.redMul(o)));return this.curve.point(u,m)};Jr.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};Jr.prototype.diffAdd=function(t,r){var i=this.x.redAdd(this.z),n=this.x.redSub(this.z),o=t.x.redAdd(t.z),u=t.x.redSub(t.z),m=u.redMul(i),_=o.redMul(n),w=r.z.redMul(m.redAdd(_).redSqr()),I=r.x.redMul(m.redISub(_).redSqr());return this.curve.point(w,I)};Jr.prototype.mul=function(t){for(var r=t.clone(),i=this,n=this.curve.point(null,null),o=this,u=[];r.cmpn(0)!==0;r.iushrn(1))u.push(r.andln(1));for(var m=u.length-1;m>=0;m--)u[m]===0?(i=i.diffAdd(n,o),n=n.dbl()):(n=i.diffAdd(n,o),i=i.dbl());return n};Jr.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};Jr.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};Jr.prototype.eq=function(t){return this.getX().cmp(t.getX())===0};Jr.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};Jr.prototype.getX=function(){return this.normalize(),this.x.fromRed()}});var L1=X((VU,C1)=>{"use strict";var rk=Wi(),Vs=rs(),M1=ef(),Sp=Qu(),ik=rk.assert;function is(e){this.twisted=(e.a|0)!==1,this.mOneA=this.twisted&&(e.a|0)===-1,this.extended=this.mOneA,Sp.call(this,"edwards",e),this.a=new Vs(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Vs(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Vs(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),ik(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(e.c|0)===1}M1(is,Sp);C1.exports=is;is.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)};is.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)};is.prototype.jpoint=function(t,r,i,n){return this.point(t,r,i,n)};is.prototype.pointFromX=function(t,r){t=new Vs(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr(),n=this.c2.redSub(this.a.redMul(i)),o=this.one.redSub(this.c2.redMul(this.d).redMul(i)),u=n.redMul(o.redInvm()),m=u.redSqrt();if(m.redSqr().redSub(u).cmp(this.zero)!==0)throw new Error("invalid point");var _=m.fromRed().isOdd();return(r&&!_||!r&&_)&&(m=m.redNeg()),this.point(t,m)};is.prototype.pointFromY=function(t,r){t=new Vs(t,16),t.red||(t=t.toRed(this.red));var i=t.redSqr(),n=i.redSub(this.c2),o=i.redMul(this.d).redMul(this.c2).redSub(this.a),u=n.redMul(o.redInvm());if(u.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,t)}var m=u.redSqrt();if(m.redSqr().redSub(u).cmp(this.zero)!==0)throw new Error("invalid point");return m.fromRed().isOdd()!==r&&(m=m.redNeg()),this.point(m,t)};is.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var r=t.x.redSqr(),i=t.y.redSqr(),n=r.redMul(this.a).redAdd(i),o=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(i)));return n.cmp(o)===0};function Zt(e,t,r,i,n){Sp.BasePoint.call(this,e,"projective"),t===null&&r===null&&i===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new Vs(t,16),this.y=new Vs(r,16),this.z=i?new Vs(i,16):this.curve.one,this.t=n&&new Vs(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}M1(Zt,Sp.BasePoint);is.prototype.pointFromJSON=function(t){return Zt.fromJSON(this,t)};is.prototype.point=function(t,r,i,n){return new Zt(this,t,r,i,n)};Zt.fromJSON=function(t,r){return new Zt(t,r[0],r[1],r[2])};Zt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Zt.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Zt.prototype._extDbl=function(){var t=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var n=this.curve._mulA(t),o=this.x.redAdd(this.y).redSqr().redISub(t).redISub(r),u=n.redAdd(r),m=u.redSub(i),_=n.redSub(r),w=o.redMul(m),I=u.redMul(_),T=o.redMul(_),N=m.redMul(u);return this.curve.point(w,I,N,T)};Zt.prototype._projDbl=function(){var t=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),i=this.y.redSqr(),n,o,u,m,_,w;if(this.curve.twisted){m=this.curve._mulA(r);var I=m.redAdd(i);this.zOne?(n=t.redSub(r).redSub(i).redMul(I.redSub(this.curve.two)),o=I.redMul(m.redSub(i)),u=I.redSqr().redSub(I).redSub(I)):(_=this.z.redSqr(),w=I.redSub(_).redISub(_),n=t.redSub(r).redISub(i).redMul(w),o=I.redMul(m.redSub(i)),u=I.redMul(w))}else m=r.redAdd(i),_=this.curve._mulC(this.z).redSqr(),w=m.redSub(_).redSub(_),n=this.curve._mulC(t.redISub(m)).redMul(w),o=this.curve._mulC(m).redMul(r.redISub(i)),u=m.redMul(w);return this.curve.point(n,o,u)};Zt.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};Zt.prototype._extAdd=function(t){var r=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),i=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),o=this.z.redMul(t.z.redAdd(t.z)),u=i.redSub(r),m=o.redSub(n),_=o.redAdd(n),w=i.redAdd(r),I=u.redMul(m),T=_.redMul(w),N=u.redMul(w),C=m.redMul(_);return this.curve.point(I,T,C,N)};Zt.prototype._projAdd=function(t){var r=this.z.redMul(t.z),i=r.redSqr(),n=this.x.redMul(t.x),o=this.y.redMul(t.y),u=this.curve.d.redMul(n).redMul(o),m=i.redSub(u),_=i.redAdd(u),w=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(n).redISub(o),I=r.redMul(m).redMul(w),T,N;return this.curve.twisted?(T=r.redMul(_).redMul(o.redSub(this.curve._mulA(n))),N=m.redMul(_)):(T=r.redMul(_).redMul(o.redSub(n)),N=this.curve._mulC(m).redMul(_)),this.curve.point(I,T,N)};Zt.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)};Zt.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)};Zt.prototype.mulAdd=function(t,r,i){return this.curve._wnafMulAdd(1,[this,r],[t,i],2,!1)};Zt.prototype.jmulAdd=function(t,r,i){return this.curve._wnafMulAdd(1,[this,r],[t,i],2,!0)};Zt.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this};Zt.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Zt.prototype.getX=function(){return this.normalize(),this.x.fromRed()};Zt.prototype.getY=function(){return this.normalize(),this.y.fromRed()};Zt.prototype.eq=function(t){return this===t||this.getX().cmp(t.getX())===0&&this.getY().cmp(t.getY())===0};Zt.prototype.eqXToP=function(t){var r=t.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var i=t.clone(),n=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(n),this.x.cmp(r)===0)return!0}};Zt.prototype.toP=Zt.prototype.normalize;Zt.prototype.mixedAdd=Zt.prototype.add});var im=X(U1=>{"use strict";var Ep=U1;Ep.base=Qu();Ep.short=k1();Ep.mont=B1();Ep.edwards=L1()});var On=X(Vt=>{"use strict";var nk=Pa(),sk=ef();Vt.inherits=sk;function ak(e,t){return(e.charCodeAt(t)&64512)!==55296||t<0||t+1>=e.length?!1:(e.charCodeAt(t+1)&64512)===56320}function ok(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if(typeof e=="string")if(t){if(t==="hex")for(e=e.replace(/[^a-z0-9]+/ig,""),e.length%2!==0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var i=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);o<128?r[i++]=o:o<2048?(r[i++]=o>>6|192,r[i++]=o&63|128):ak(e,n)?(o=65536+((o&1023)<<10)+(e.charCodeAt(++n)&1023),r[i++]=o>>18|240,r[i++]=o>>12&63|128,r[i++]=o>>6&63|128,r[i++]=o&63|128):(r[i++]=o>>12|224,r[i++]=o>>6&63|128,r[i++]=o&63|128)}else for(n=0;n<e.length;n++)r[n]=e[n]|0;return r}Vt.toArray=ok;function ck(e){for(var t="",r=0;r<e.length;r++)t+=q1(e[r].toString(16));return t}Vt.toHex=ck;function D1(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(e&255)<<24;return t>>>0}Vt.htonl=D1;function uk(e,t){for(var r="",i=0;i<e.length;i++){var n=e[i];t==="little"&&(n=D1(n)),r+=F1(n.toString(16))}return r}Vt.toHex32=uk;function q1(e){return e.length===1?"0"+e:e}Vt.zero2=q1;function F1(e){return e.length===7?"0"+e:e.length===6?"00"+e:e.length===5?"000"+e:e.length===4?"0000"+e:e.length===3?"00000"+e:e.length===2?"000000"+e:e.length===1?"0000000"+e:e}Vt.zero8=F1;function fk(e,t,r,i){var n=r-t;nk(n%4===0);for(var o=new Array(n/4),u=0,m=t;u<o.length;u++,m+=4){var _;i==="big"?_=e[m]<<24|e[m+1]<<16|e[m+2]<<8|e[m+3]:_=e[m+3]<<24|e[m+2]<<16|e[m+1]<<8|e[m],o[u]=_>>>0}return o}Vt.join32=fk;function lk(e,t){for(var r=new Array(e.length*4),i=0,n=0;i<e.length;i++,n+=4){var o=e[i];t==="big"?(r[n]=o>>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=o&255):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=o&255)}return r}Vt.split32=lk;function pk(e,t){return e>>>t|e<<32-t}Vt.rotr32=pk;function hk(e,t){return e<<t|e>>>32-t}Vt.rotl32=hk;function dk(e,t){return e+t>>>0}Vt.sum32=dk;function mk(e,t,r){return e+t+r>>>0}Vt.sum32_3=mk;function vk(e,t,r,i){return e+t+r+i>>>0}Vt.sum32_4=vk;function gk(e,t,r,i,n){return e+t+r+i+n>>>0}Vt.sum32_5=gk;function xk(e,t,r,i){var n=e[t],o=e[t+1],u=i+o>>>0,m=(u<i?1:0)+r+n;e[t]=m>>>0,e[t+1]=u}Vt.sum64=xk;function bk(e,t,r,i){var n=t+i>>>0,o=(n<t?1:0)+e+r;return o>>>0}Vt.sum64_hi=bk;function _k(e,t,r,i){var n=t+i;return n>>>0}Vt.sum64_lo=_k;function yk(e,t,r,i,n,o,u,m){var _=0,w=t;w=w+i>>>0,_+=w<t?1:0,w=w+o>>>0,_+=w<o?1:0,w=w+m>>>0,_+=w<m?1:0;var I=e+r+n+u+_;return I>>>0}Vt.sum64_4_hi=yk;function wk(e,t,r,i,n,o,u,m){var _=t+i+o+m;return _>>>0}Vt.sum64_4_lo=wk;function Sk(e,t,r,i,n,o,u,m,_,w){var I=0,T=t;T=T+i>>>0,I+=T<t?1:0,T=T+o>>>0,I+=T<o?1:0,T=T+m>>>0,I+=T<m?1:0,T=T+w>>>0,I+=T<w?1:0;var N=e+r+n+u+_+I;return N>>>0}Vt.sum64_5_hi=Sk;function Ek(e,t,r,i,n,o,u,m,_,w){var I=t+i+o+m+w;return I>>>0}Vt.sum64_5_lo=Ek;function Ik(e,t,r){var i=t<<32-r|e>>>r;return i>>>0}Vt.rotr64_hi=Ik;function Tk(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}Vt.rotr64_lo=Tk;function Rk(e,t,r){return e>>>r}Vt.shr64_hi=Rk;function Ak(e,t,r){var i=e<<32-r|t>>>r;return i>>>0}Vt.shr64_lo=Ak});var Dc=X(z1=>{"use strict";var H1=On(),Ok=Pa();function Ip(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}z1.BlockHash=Ip;Ip.prototype.update=function(t,r){if(t=H1.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){t=this.pending;var i=t.length%this._delta8;this.pending=t.slice(t.length-i,t.length),this.pending.length===0&&(this.pending=null),t=H1.join32(t,0,t.length-i,this.endian);for(var n=0;n<t.length;n+=this._delta32)this._update(t,n,n+this._delta32)}return this};Ip.prototype.digest=function(t){return this.update(this._pad()),Ok(this.pending===null),this._digest(t)};Ip.prototype._pad=function(){var t=this.pendingTotal,r=this._delta8,i=r-(t+this.padLength)%r,n=new Array(i+this.padLength);n[0]=128;for(var o=1;o<i;o++)n[o]=0;if(t<<=3,this.endian==="big"){for(var u=8;u<this.padLength;u++)n[o++]=0;n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=t>>>24&255,n[o++]=t>>>16&255,n[o++]=t>>>8&255,n[o++]=t&255}else for(n[o++]=t&255,n[o++]=t>>>8&255,n[o++]=t>>>16&255,n[o++]=t>>>24&255,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,u=8;u<this.padLength;u++)n[o++]=0;return n}});var nm=X(js=>{"use strict";var kk=On(),ns=kk.rotr32;function Pk(e,t,r,i){if(e===0)return V1(t,r,i);if(e===1||e===3)return W1(t,r,i);if(e===2)return j1(t,r,i)}js.ft_1=Pk;function V1(e,t,r){return e&t^~e&r}js.ch32=V1;function j1(e,t,r){return e&t^e&r^t&r}js.maj32=j1;function W1(e,t,r){return e^t^r}js.p32=W1;function Nk(e){return ns(e,2)^ns(e,13)^ns(e,22)}js.s0_256=Nk;function Bk(e){return ns(e,6)^ns(e,11)^ns(e,25)}js.s1_256=Bk;function Mk(e){return ns(e,7)^ns(e,18)^e>>>3}js.g0_256=Mk;function Ck(e){return ns(e,17)^ns(e,19)^e>>>10}js.g1_256=Ck});var $1=X(($U,G1)=>{"use strict";var qc=On(),Lk=Dc(),Uk=nm(),sm=qc.rotl32,tf=qc.sum32,Dk=qc.sum32_5,qk=Uk.ft_1,K1=Lk.BlockHash,Fk=[1518500249,1859775393,2400959708,3395469782];function ss(){if(!(this instanceof ss))return new ss;K1.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}qc.inherits(ss,K1);G1.exports=ss;ss.blockSize=512;ss.outSize=160;ss.hmacStrength=80;ss.padLength=64;ss.prototype._update=function(t,r){for(var i=this.W,n=0;n<16;n++)i[n]=t[r+n];for(;n<i.length;n++)i[n]=sm(i[n-3]^i[n-8]^i[n-14]^i[n-16],1);var o=this.h[0],u=this.h[1],m=this.h[2],_=this.h[3],w=this.h[4];for(n=0;n<i.length;n++){var I=~~(n/20),T=Dk(sm(o,5),qk(I,u,m,_),w,i[n],Fk[I]);w=_,_=m,m=sm(u,30),u=o,o=T}this.h[0]=tf(this.h[0],o),this.h[1]=tf(this.h[1],u),this.h[2]=tf(this.h[2],m),this.h[3]=tf(this.h[3],_),this.h[4]=tf(this.h[4],w)};ss.prototype._digest=function(t){return t==="hex"?qc.toHex32(this.h,"big"):qc.split32(this.h,"big")}});var am=X((YU,Z1)=>{"use strict";var Fc=On(),Hk=Dc(),Hc=nm(),zk=Pa(),kn=Fc.sum32,Vk=Fc.sum32_4,jk=Fc.sum32_5,Wk=Hc.ch32,Kk=Hc.maj32,Gk=Hc.s0_256,$k=Hc.s1_256,Yk=Hc.g0_256,Zk=Hc.g1_256,Y1=Hk.BlockHash,Xk=[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];function as(){if(!(this instanceof as))return new as;Y1.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Xk,this.W=new Array(64)}Fc.inherits(as,Y1);Z1.exports=as;as.blockSize=512;as.outSize=256;as.hmacStrength=192;as.padLength=64;as.prototype._update=function(t,r){for(var i=this.W,n=0;n<16;n++)i[n]=t[r+n];for(;n<i.length;n++)i[n]=Vk(Zk(i[n-2]),i[n-7],Yk(i[n-15]),i[n-16]);var o=this.h[0],u=this.h[1],m=this.h[2],_=this.h[3],w=this.h[4],I=this.h[5],T=this.h[6],N=this.h[7];for(zk(this.k.length===i.length),n=0;n<i.length;n++){var C=jk(N,$k(w),Wk(w,I,T),this.k[n],i[n]),B=kn(Gk(o),Kk(o,u,m));N=T,T=I,I=w,w=kn(_,C),_=m,m=u,u=o,o=kn(C,B)}this.h[0]=kn(this.h[0],o),this.h[1]=kn(this.h[1],u),this.h[2]=kn(this.h[2],m),this.h[3]=kn(this.h[3],_),this.h[4]=kn(this.h[4],w),this.h[5]=kn(this.h[5],I),this.h[6]=kn(this.h[6],T),this.h[7]=kn(this.h[7],N)};as.prototype._digest=function(t){return t==="hex"?Fc.toHex32(this.h,"big"):Fc.split32(this.h,"big")}});var Q1=X((ZU,J1)=>{"use strict";var om=On(),X1=am();function Ws(){if(!(this instanceof Ws))return new Ws;X1.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}om.inherits(Ws,X1);J1.exports=Ws;Ws.blockSize=512;Ws.outSize=224;Ws.hmacStrength=192;Ws.padLength=64;Ws.prototype._digest=function(t){return t==="hex"?om.toHex32(this.h.slice(0,7),"big"):om.split32(this.h.slice(0,7),"big")}});var fm=X((XU,iy)=>{"use strict";var Ri=On(),Jk=Dc(),Qk=Pa(),os=Ri.rotr64_hi,cs=Ri.rotr64_lo,ey=Ri.shr64_hi,ty=Ri.shr64_lo,Ma=Ri.sum64,cm=Ri.sum64_hi,um=Ri.sum64_lo,eP=Ri.sum64_4_hi,tP=Ri.sum64_4_lo,rP=Ri.sum64_5_hi,iP=Ri.sum64_5_lo,ry=Jk.BlockHash,nP=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Pn(){if(!(this instanceof Pn))return new Pn;ry.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=nP,this.W=new Array(160)}Ri.inherits(Pn,ry);iy.exports=Pn;Pn.blockSize=1024;Pn.outSize=512;Pn.hmacStrength=192;Pn.padLength=128;Pn.prototype._prepareBlock=function(t,r){for(var i=this.W,n=0;n<32;n++)i[n]=t[r+n];for(;n<i.length;n+=2){var o=mP(i[n-4],i[n-3]),u=vP(i[n-4],i[n-3]),m=i[n-14],_=i[n-13],w=hP(i[n-30],i[n-29]),I=dP(i[n-30],i[n-29]),T=i[n-32],N=i[n-31];i[n]=eP(o,u,m,_,w,I,T,N),i[n+1]=tP(o,u,m,_,w,I,T,N)}};Pn.prototype._update=function(t,r){this._prepareBlock(t,r);var i=this.W,n=this.h[0],o=this.h[1],u=this.h[2],m=this.h[3],_=this.h[4],w=this.h[5],I=this.h[6],T=this.h[7],N=this.h[8],C=this.h[9],B=this.h[10],U=this.h[11],Z=this.h[12],$=this.h[13],H=this.h[14],ee=this.h[15];Qk(this.k.length===i.length);for(var ce=0;ce<i.length;ce+=2){var ge=H,Se=ee,me=lP(N,C),O=pP(N,C),E=sP(N,C,B,U,Z,$),f=aP(N,C,B,U,Z,$),c=this.k[ce],p=this.k[ce+1],v=i[ce],g=i[ce+1],x=rP(ge,Se,me,O,E,f,c,p,v,g),S=iP(ge,Se,me,O,E,f,c,p,v,g);ge=uP(n,o),Se=fP(n,o),me=oP(n,o,u,m,_,w),O=cP(n,o,u,m,_,w);var b=cm(ge,Se,me,O),l=um(ge,Se,me,O);H=Z,ee=$,Z=B,$=U,B=N,U=C,N=cm(I,T,x,S),C=um(T,T,x,S),I=_,T=w,_=u,w=m,u=n,m=o,n=cm(x,S,b,l),o=um(x,S,b,l)}Ma(this.h,0,n,o),Ma(this.h,2,u,m),Ma(this.h,4,_,w),Ma(this.h,6,I,T),Ma(this.h,8,N,C),Ma(this.h,10,B,U),Ma(this.h,12,Z,$),Ma(this.h,14,H,ee)};Pn.prototype._digest=function(t){return t==="hex"?Ri.toHex32(this.h,"big"):Ri.split32(this.h,"big")};function sP(e,t,r,i,n){var o=e&r^~e&n;return o<0&&(o+=4294967296),o}function aP(e,t,r,i,n,o){var u=t&i^~t&o;return u<0&&(u+=4294967296),u}function oP(e,t,r,i,n){var o=e&r^e&n^r&n;return o<0&&(o+=4294967296),o}function cP(e,t,r,i,n,o){var u=t&i^t&o^i&o;return u<0&&(u+=4294967296),u}function uP(e,t){var r=os(e,t,28),i=os(t,e,2),n=os(t,e,7),o=r^i^n;return o<0&&(o+=4294967296),o}function fP(e,t){var r=cs(e,t,28),i=cs(t,e,2),n=cs(t,e,7),o=r^i^n;return o<0&&(o+=4294967296),o}function lP(e,t){var r=os(e,t,14),i=os(e,t,18),n=os(t,e,9),o=r^i^n;return o<0&&(o+=4294967296),o}function pP(e,t){var r=cs(e,t,14),i=cs(e,t,18),n=cs(t,e,9),o=r^i^n;return o<0&&(o+=4294967296),o}function hP(e,t){var r=os(e,t,1),i=os(e,t,8),n=ey(e,t,7),o=r^i^n;return o<0&&(o+=4294967296),o}function dP(e,t){var r=cs(e,t,1),i=cs(e,t,8),n=ty(e,t,7),o=r^i^n;return o<0&&(o+=4294967296),o}function mP(e,t){var r=os(e,t,19),i=os(t,e,29),n=ey(e,t,6),o=r^i^n;return o<0&&(o+=4294967296),o}function vP(e,t){var r=cs(e,t,19),i=cs(t,e,29),n=ty(e,t,6),o=r^i^n;return o<0&&(o+=4294967296),o}});var ay=X((JU,sy)=>{"use strict";var lm=On(),ny=fm();function Ks(){if(!(this instanceof Ks))return new Ks;ny.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}lm.inherits(Ks,ny);sy.exports=Ks;Ks.blockSize=1024;Ks.outSize=384;Ks.hmacStrength=192;Ks.padLength=128;Ks.prototype._digest=function(t){return t==="hex"?lm.toHex32(this.h.slice(0,12),"big"):lm.split32(this.h.slice(0,12),"big")}});var oy=X(zc=>{"use strict";zc.sha1=$1();zc.sha224=Q1();zc.sha256=am();zc.sha384=ay();zc.sha512=fm()});var hy=X(py=>{"use strict";var To=On(),gP=Dc(),Tp=To.rotl32,cy=To.sum32,rf=To.sum32_3,uy=To.sum32_4,ly=gP.BlockHash;function us(){if(!(this instanceof us))return new us;ly.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}To.inherits(us,ly);py.ripemd160=us;us.blockSize=512;us.outSize=160;us.hmacStrength=192;us.padLength=64;us.prototype._update=function(t,r){for(var i=this.h[0],n=this.h[1],o=this.h[2],u=this.h[3],m=this.h[4],_=i,w=n,I=o,T=u,N=m,C=0;C<80;C++){var B=cy(Tp(uy(i,fy(C,n,o,u),t[_P[C]+r],xP(C)),wP[C]),m);i=m,m=u,u=Tp(o,10),o=n,n=B,B=cy(Tp(uy(_,fy(79-C,w,I,T),t[yP[C]+r],bP(C)),SP[C]),N),_=N,N=T,T=Tp(I,10),I=w,w=B}B=rf(this.h[1],o,T),this.h[1]=rf(this.h[2],u,N),this.h[2]=rf(this.h[3],m,_),this.h[3]=rf(this.h[4],i,w),this.h[4]=rf(this.h[0],n,I),this.h[0]=B};us.prototype._digest=function(t){return t==="hex"?To.toHex32(this.h,"little"):To.split32(this.h,"little")};function fy(e,t,r,i){return e<=15?t^r^i:e<=31?t&r|~t&i:e<=47?(t|~r)^i:e<=63?t&i|r&~i:t^(r|~i)}function xP(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function bP(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}var _P=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],yP=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],wP=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],SP=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var my=X((tD,dy)=>{"use strict";var EP=On(),IP=Pa();function Vc(e,t,r){if(!(this instanceof Vc))return new Vc(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(EP.toArray(t,r))}dy.exports=Vc;Vc.prototype._init=function(t){t.length>this.blockSize&&(t=new this.Hash().update(t).digest()),IP(t.length<=this.blockSize);for(var r=t.length;r<this.blockSize;r++)t.push(0);for(r=0;r<t.length;r++)t[r]^=54;for(this.inner=new this.Hash().update(t),r=0;r<t.length;r++)t[r]^=106;this.outer=new this.Hash().update(t)};Vc.prototype.update=function(t,r){return this.inner.update(t,r),this};Vc.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}});var Rp=X(vy=>{var si=vy;si.utils=On();si.common=Dc();si.sha=oy();si.ripemd=hy();si.hmac=my();si.sha1=si.sha.sha1;si.sha256=si.sha.sha256;si.sha224=si.sha.sha224;si.sha384=si.sha.sha384;si.sha512=si.sha.sha512;si.ripemd160=si.ripemd.ripemd160});var xy=X((iD,gy)=>{gy.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}});var Ap=X(yy=>{"use strict";var hm=yy,Ca=Rp(),pm=im(),TP=Wi(),by=TP.assert;function _y(e){e.type==="short"?this.curve=new pm.short(e):e.type==="edwards"?this.curve=new pm.edwards(e):this.curve=new pm.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,by(this.g.validate(),"Invalid curve"),by(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}hm.PresetCurve=_y;function La(e,t){Object.defineProperty(hm,e,{configurable:!0,enumerable:!0,get:function(){var r=new _y(t);return Object.defineProperty(hm,e,{configurable:!0,enumerable:!0,value:r}),r}})}La("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Ca.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});La("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Ca.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});La("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Ca.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});La("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Ca.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});La("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Ca.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]});La("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ca.sha256,gRed:!1,g:["9"]});La("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Ca.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var dm;try{dm=xy()}catch{dm=void 0}La("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Ca.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",dm]})});var Ey=X((sD,Sy)=>{"use strict";var RP=Rp(),Ro=$0(),wy=Pa();function Ua(e){if(!(this instanceof Ua))return new Ua(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=Ro.toArray(e.entropy,e.entropyEnc||"hex"),r=Ro.toArray(e.nonce,e.nonceEnc||"hex"),i=Ro.toArray(e.pers,e.persEnc||"hex");wy(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,i)}Sy.exports=Ua;Ua.prototype._init=function(t,r,i){var n=t.concat(r).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o<this.V.length;o++)this.K[o]=0,this.V[o]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656};Ua.prototype._hmac=function(){return new RP.hmac(this.hash,this.K)};Ua.prototype._update=function(t){var r=this._hmac().update(this.V).update([0]);t&&(r=r.update(t)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())};Ua.prototype.reseed=function(t,r,i,n){typeof r!="string"&&(n=i,i=r,r=null),t=Ro.toArray(t,r),i=Ro.toArray(i,n),wy(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(i||[])),this._reseed=1};Ua.prototype.generate=function(t,r,i,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(n=i,i=r,r=null),i&&(i=Ro.toArray(i,n||"hex"),this._update(i));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var u=o.slice(0,t);return this._update(i),this._reseed++,Ro.encode(u,r)}});var Ty=X((aD,Iy)=>{"use strict";var AP=rs(),OP=Wi(),mm=OP.assert;function ui(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}Iy.exports=ui;ui.fromPublic=function(t,r,i){return r instanceof ui?r:new ui(t,{pub:r,pubEnc:i})};ui.fromPrivate=function(t,r,i){return r instanceof ui?r:new ui(t,{priv:r,privEnc:i})};ui.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};ui.prototype.getPublic=function(t,r){return typeof t=="string"&&(r=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,t):this.pub};ui.prototype.getPrivate=function(t){return t==="hex"?this.priv.toString(16,2):this.priv};ui.prototype._importPrivate=function(t,r){this.priv=new AP(t,r||16),this.priv=this.priv.umod(this.ec.curve.n)};ui.prototype._importPublic=function(t,r){if(t.x||t.y){this.ec.curve.type==="mont"?mm(t.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&mm(t.x&&t.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(t.x,t.y);return}this.pub=this.ec.curve.decodePoint(t,r)};ui.prototype.derive=function(t){return t.validate()||mm(t.validate(),"public point not validated"),t.mul(this.priv).getX()};ui.prototype.sign=function(t,r,i){return this.ec.sign(t,this,r,i)};ui.prototype.verify=function(t,r){return this.ec.verify(t,r,this)};ui.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}});var Oy=X((oD,Ay)=>{"use strict";var Op=rs(),xm=Wi(),kP=xm.assert;function kp(e,t){if(e instanceof kp)return e;this._importDER(e,t)||(kP(e.r&&e.s,"Signature without r or s"),this.r=new Op(e.r,16),this.s=new Op(e.s,16),e.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}Ay.exports=kp;function PP(){this.place=0}function vm(e,t){var r=e[t.place++];if(!(r&128))return r;var i=r&15;if(i===0||i>4)return!1;for(var n=0,o=0,u=t.place;o<i;o++,u++)n<<=8,n|=e[u],n>>>=0;return n<=127?!1:(t.place=u,n)}function Ry(e){for(var t=0,r=e.length-1;!e[t]&&!(e[t+1]&128)&&t<r;)t++;return t===0?e:e.slice(t)}kp.prototype._importDER=function(t,r){t=xm.toArray(t,r);var i=new PP;if(t[i.place++]!==48)return!1;var n=vm(t,i);if(n===!1||n+i.place!==t.length||t[i.place++]!==2)return!1;var o=vm(t,i);if(o===!1)return!1;var u=t.slice(i.place,o+i.place);if(i.place+=o,t[i.place++]!==2)return!1;var m=vm(t,i);if(m===!1||t.length!==m+i.place)return!1;var _=t.slice(i.place,m+i.place);if(u[0]===0)if(u[1]&128)u=u.slice(1);else return!1;if(_[0]===0)if(_[1]&128)_=_.slice(1);else return!1;return this.r=new Op(u),this.s=new Op(_),this.recoveryParam=null,!0};function gm(e,t){if(t<128){e.push(t);return}var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(r|128);--r;)e.push(t>>>(r<<3)&255);e.push(t)}kp.prototype.toDER=function(t){var r=this.r.toArray(),i=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),i[0]&128&&(i=[0].concat(i)),r=Ry(r),i=Ry(i);!i[0]&&!(i[1]&128);)i=i.slice(1);var n=[2];gm(n,r.length),n=n.concat(r),n.push(2),gm(n,i.length);var o=n.concat(i),u=[48];return gm(u,o.length),u=u.concat(o),xm.encode(u,t)}});var By=X((cD,Ny)=>{"use strict";var Ao=rs(),ky=Ey(),NP=Wi(),bm=Ap(),BP=J0(),Py=NP.assert,_m=Ty(),Pp=Oy();function pn(e){if(!(this instanceof pn))return new pn(e);typeof e=="string"&&(Py(Object.prototype.hasOwnProperty.call(bm,e),"Unknown curve "+e),e=bm[e]),e instanceof bm.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}Ny.exports=pn;pn.prototype.keyPair=function(t){return new _m(this,t)};pn.prototype.keyFromPrivate=function(t,r){return _m.fromPrivate(this,t,r)};pn.prototype.keyFromPublic=function(t,r){return _m.fromPublic(this,t,r)};pn.prototype.genKeyPair=function(t){t||(t={});for(var r=new ky({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||BP(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),n=this.n.sub(new Ao(2));;){var o=new Ao(r.generate(i));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}};pn.prototype._truncateToN=function(t,r){var i=t.byteLength()*8-this.n.bitLength();return i>0&&(t=t.ushrn(i)),!r&&t.cmp(this.n)>=0?t.sub(this.n):t};pn.prototype.sign=function(t,r,i,n){typeof i=="object"&&(n=i,i=null),n||(n={}),r=this.keyFromPrivate(r,i),t=this._truncateToN(new Ao(t,16));for(var o=this.n.byteLength(),u=r.getPrivate().toArray("be",o),m=t.toArray("be",o),_=new ky({hash:this.hash,entropy:u,nonce:m,pers:n.pers,persEnc:n.persEnc||"utf8"}),w=this.n.sub(new Ao(1)),I=0;;I++){var T=n.k?n.k(I):new Ao(_.generate(this.n.byteLength()));if(T=this._truncateToN(T,!0),!(T.cmpn(1)<=0||T.cmp(w)>=0)){var N=this.g.mul(T);if(!N.isInfinity()){var C=N.getX(),B=C.umod(this.n);if(B.cmpn(0)!==0){var U=T.invm(this.n).mul(B.mul(r.getPrivate()).iadd(t));if(U=U.umod(this.n),U.cmpn(0)!==0){var Z=(N.getY().isOdd()?1:0)|(C.cmp(B)!==0?2:0);return n.canonical&&U.cmp(this.nh)>0&&(U=this.n.sub(U),Z^=1),new Pp({r:B,s:U,recoveryParam:Z})}}}}}};pn.prototype.verify=function(t,r,i,n){t=this._truncateToN(new Ao(t,16)),i=this.keyFromPublic(i,n),r=new Pp(r,"hex");var o=r.r,u=r.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0||u.cmpn(1)<0||u.cmp(this.n)>=0)return!1;var m=u.invm(this.n),_=m.mul(t).umod(this.n),w=m.mul(o).umod(this.n),I;return this.curve._maxwellTrick?(I=this.g.jmulAdd(_,i.getPublic(),w),I.isInfinity()?!1:I.eqXToP(o)):(I=this.g.mulAdd(_,i.getPublic(),w),I.isInfinity()?!1:I.getX().umod(this.n).cmp(o)===0)};pn.prototype.recoverPubKey=function(e,t,r,i){Py((3&r)===r,"The recovery param is more than two bits"),t=new Pp(t,i);var n=this.n,o=new Ao(e),u=t.r,m=t.s,_=r&1,w=r>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&w)throw new Error("Unable to find sencond key candinate");w?u=this.curve.pointFromX(u.add(this.curve.n),_):u=this.curve.pointFromX(u,_);var I=t.r.invm(n),T=n.sub(o).mul(I).umod(n),N=m.mul(I).umod(n);return this.g.mulAdd(T,u,N)};pn.prototype.getKeyRecoveryParam=function(e,t,r,i){if(t=new Pp(t,i),t.recoveryParam!==null)return t.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(e,t,n)}catch{continue}if(o.eq(r))return n}throw new Error("Unable to find valid recovery factor")}});var Uy=X((uD,Ly)=>{"use strict";var nf=Wi(),Cy=nf.assert,My=nf.parseBytes,jc=nf.cachedProperty;function Qr(e,t){this.eddsa=e,this._secret=My(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=My(t.pub)}Qr.fromPublic=function(t,r){return r instanceof Qr?r:new Qr(t,{pub:r})};Qr.fromSecret=function(t,r){return r instanceof Qr?r:new Qr(t,{secret:r})};Qr.prototype.secret=function(){return this._secret};jc(Qr,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});jc(Qr,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});jc(Qr,"privBytes",function(){var t=this.eddsa,r=this.hash(),i=t.encodingLength-1,n=r.slice(0,t.encodingLength);return n[0]&=248,n[i]&=127,n[i]|=64,n});jc(Qr,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});jc(Qr,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});jc(Qr,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});Qr.prototype.sign=function(t){return Cy(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)};Qr.prototype.verify=function(t,r){return this.eddsa.verify(t,r,this)};Qr.prototype.getSecret=function(t){return Cy(this._secret,"KeyPair is public only"),nf.encode(this.secret(),t)};Qr.prototype.getPublic=function(t){return nf.encode(this.pubBytes(),t)};Ly.exports=Qr});var qy=X((fD,Dy)=>{"use strict";var MP=rs(),Np=Wi(),CP=Np.assert,Bp=Np.cachedProperty,LP=Np.parseBytes;function Oo(e,t){this.eddsa=e,typeof t!="object"&&(t=LP(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),CP(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof MP&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}Bp(Oo,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});Bp(Oo,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});Bp(Oo,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});Bp(Oo,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});Oo.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};Oo.prototype.toHex=function(){return Np.encode(this.toBytes(),"hex").toUpperCase()};Dy.exports=Oo});var jy=X((lD,Vy)=>{"use strict";var UP=Rp(),DP=Ap(),Wc=Wi(),qP=Wc.assert,Hy=Wc.parseBytes,zy=Uy(),Fy=qy();function Ai(e){if(qP(e==="ed25519","only tested with ed25519 so far"),!(this instanceof Ai))return new Ai(e);e=DP[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=UP.sha512}Vy.exports=Ai;Ai.prototype.sign=function(t,r){t=Hy(t);var i=this.keyFromSecret(r),n=this.hashInt(i.messagePrefix(),t),o=this.g.mul(n),u=this.encodePoint(o),m=this.hashInt(u,i.pubBytes(),t).mul(i.priv()),_=n.add(m).umod(this.curve.n);return this.makeSignature({R:o,S:_,Rencoded:u})};Ai.prototype.verify=function(t,r,i){t=Hy(t),r=this.makeSignature(r);var n=this.keyFromPublic(i),o=this.hashInt(r.Rencoded(),n.pubBytes(),t),u=this.g.mul(r.S()),m=r.R().add(n.pub().mul(o));return m.eq(u)};Ai.prototype.hashInt=function(){for(var t=this.hash(),r=0;r<arguments.length;r++)t.update(arguments[r]);return Wc.intFromLE(t.digest()).umod(this.curve.n)};Ai.prototype.keyFromPublic=function(t){return zy.fromPublic(this,t)};Ai.prototype.keyFromSecret=function(t){return zy.fromSecret(this,t)};Ai.prototype.makeSignature=function(t){return t instanceof Fy?t:new Fy(this,t)};Ai.prototype.encodePoint=function(t){var r=t.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=t.getX().isOdd()?128:0,r};Ai.prototype.decodePoint=function(t){t=Wc.parseBytes(t);var r=t.length-1,i=t.slice(0,r).concat(t[r]&-129),n=(t[r]&128)!==0,o=Wc.intFromLE(i);return this.curve.pointFromY(o,n)};Ai.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)};Ai.prototype.decodeInt=function(t){return Wc.intFromLE(t)};Ai.prototype.isPoint=function(t){return t instanceof this.pointClass}});var ym=X(Wy=>{"use strict";var ko=Wy;ko.version=b1().version;ko.utils=Wi();ko.rand=J0();ko.curve=im();ko.curves=Ap();ko.ec=By();ko.eddsa=jy()});var qa=X((hD,Gy)=>{"use strict";var fs=Zr(),FP=Yt(),HP=ym().ec,Da=new HP("secp256k1"),zP=Da.curve.point.bind(Da.curve),Ky=Da.curve.pointFromX.bind(Da.curve),ei=function(t,r,i){try{var n=zP(t,r,i)}catch{throw new Error("Invalid Point")}return n.validate(),n};ei.prototype=Object.getPrototypeOf(Da.curve.point());ei.fromX=function(t,r){try{var i=Ky(r,t)}catch{throw new Error("Invalid X")}return i.validate(),i};ei.getG=function(){return Da.curve.g};ei.getN=function(){return new fs(Da.curve.n.toArray())};ei.getP=function(){return Da.curve.p.clone()};ei.prototype._getX=ei.prototype.getX;ei.prototype.getX=function(){return new fs(this._getX().toArray())};ei.prototype._getY=ei.prototype.getY;ei.prototype.getY=function(){return new fs(this._getY().toArray())};ei.prototype.validate=function(){if(this.isInfinity())throw new Error("Point cannot be equal to Infinity");var t;try{t=Ky(this.getX(),this.getY().isOdd())}catch{throw new Error("Point does not lie on the curve")}if(t.y.cmp(this.y)!==0)throw new Error("Invalid y value for curve.");if(!this.mul(ei.getN()).isInfinity())throw new Error("Point times N must be infinity");return this};ei.pointToCompressed=function(t){var r=t.getX().toBuffer({size:32}),i=t.getY().toBuffer({size:32}),n,o=i[i.length-1]%2;return o?n=Buffer.from([3]):n=Buffer.from([2]),FP.concat([n,r])};ei.prototype.liftX=function(){let e=ei.getP(),t=new fs(0),r=new fs(1),i=new fs(2),n=new fs(3),o=new fs(4),u=new fs(7),m=fs.red("k256"),_=this.x.pow(n).add(u).mod(e),w=_.toRed(m).redPow(e.add(r).div(o)).mod(e);if(!_.eq(w.pow(i).mod(e)))throw new Error("liftX failed");let I=this.x.red?this.x.fromRed():this.x,T=w.mod(i).eq(t)?w.fromRed():e.sub(w);return new ei(I,T,!0)};Gy.exports=ei});var li=X((dD,Yy)=>{"use strict";var Gs=Zr(),VP=yt(),fi=xt(),$y=Yt(),jP=Rr(),tt=function e(t,r,i){if(!(this instanceof e))return new e(t,r,i);if(t instanceof Gs)this.set({r:t,s:r,isSchnorr:i});else if(t){var n=t;this.set(n)}};tt.prototype.set=function(e){return this.r=e.r||this.r||void 0,this.s=e.s||this.s||void 0,this.i=typeof e.i>"u"?this.i:e.i,this.compressed=typeof e.compressed>"u"?this.compressed:e.compressed,this.isSchnorr=typeof e.isSchnorr>"u"?this.isSchnorr:e.isSchnorr,this.nhashtype=e.nhashtype||this.nhashtype||void 0,this};tt.fromCompact=function(e){fi.checkArgument($y.isBuffer(e),"Argument is expected to be a Buffer");var t=new tt,r=!0,i=e.slice(0,1)[0]-27-4;i<0&&(r=!1,i=i+4);var n=e.slice(1,33),o=e.slice(33,65);return fi.checkArgument(i===0||i===1||i===2||i===3,new Error("i must be 0, 1, 2, or 3")),fi.checkArgument(n.length===32,new Error("r must be 32 bytes")),fi.checkArgument(o.length===32,new Error("s must be 32 bytes")),t.compressed=r,t.i=i,t.r=Gs.fromBuffer(n),t.s=Gs.fromBuffer(o),t};tt.fromDER=tt.fromBuffer=function(e,t){var r=new tt;if((e.length===64||e.length===65)&&e[0]!=48)return tt.fromSchnorr(e);fi.checkArgument(!(e.length===64&&e[0]===48),new Error("64 DER (ecdsa) signatures not allowed"));var i=tt.parseDER(e,t);return r.r=i.r,r.s=i.s,r};tt.fromTxFormat=function(e){var t=e.readUInt8(e.length-1),r=e.slice(0,e.length-1),i=new tt.fromDER(r,!1);return i.nhashtype=t,i};tt.fromString=function(e){var t=Buffer.from(e,"hex");return tt.fromDER(t)};tt.parseDER=function(e,t){fi.checkArgument($y.isBuffer(e),new Error("DER formatted signature should be a buffer")),VP.isUndefined(t)&&(t=!0);var r=e[0];fi.checkArgument(r===48,new Error("Header byte should be 0x30"));var i=e[1],n=e.slice(2).length;fi.checkArgument(!t||i===n,new Error("Length byte should length of what follows")),i=i<n?i:n;var o=e[2];fi.checkArgument(o===2,new Error("Integer byte for r should be 0x02"));var u=e[3],m=e.slice(4,4+u),_=Gs.fromBuffer(m),w=e[4]===0;fi.checkArgument(u===m.length,new Error("Length of r incorrect"));var I=e[4+u+0];fi.checkArgument(I===2,new Error("Integer byte for s should be 0x02"));var T=e[4+u+1],N=e.slice(4+u+2,4+u+2+T),C=Gs.fromBuffer(N),B=e[4+u+2+2]===0;fi.checkArgument(T===N.length,new Error("Length of s incorrect"));var U=4+u+2+T;fi.checkArgument(i===U-2,new Error("Length of signature incorrect"));var Z={header:r,length:i,rheader:o,rlength:u,rneg:w,rbuf:m,r:_,sheader:I,slength:T,sneg:B,sbuf:N,s:C};return Z};tt.prototype.toCompact=function(e,t){if(e=typeof e=="number"?e:this.i,t=typeof t=="boolean"?t:this.compressed,!(e===0||e===1||e===2||e===3))throw new Error("i must be equal to 0, 1, 2, or 3");var r=e+27+4;t===!1&&(r=r-4);var i=Buffer.from([r]),n=this.r.toBuffer({size:32}),o=this.s.toBuffer({size:32});return Buffer.concat([i,n,o])};tt.prototype.toBuffer=tt.prototype.toDER=function(){if(this.isSchnorr){let C=!this.nhashtype||this.nhashtype===tt.SIGHASH_DEFAULT?Buffer.alloc(0):Buffer.from([this.nhashtype]);return Buffer.concat([this.r.toBuffer({size:32}),this.s.toBuffer({size:32}),C])}var e=this.r.toBuffer(),t=this.s.toBuffer(),r=!!(e[0]&128),i=!!(t[0]&128),n=r?Buffer.concat([Buffer.from([0]),e]):e,o=i?Buffer.concat([Buffer.from([0]),t]):t,u=n.length,m=o.length,_=2+u+2+m,w=2,I=2,T=48,N=Buffer.concat([Buffer.from([T,_,w,u]),n,Buffer.from([I,m]),o]);return N};tt.prototype.toString=function(){var e=this.toDER();return e.toString("hex")};tt.isTxDER=function(e){if(e.length<9||e.length>73||e[0]!==48||e[1]!==e.length-3)return!1;var t=e[3];if(5+t>=e.length)return!1;var r=e[5+t];if(t+r+7!==e.length)return!1;var i=e.slice(4);if(e[2]!==2||t===0||i[0]&128||t>1&&i[0]===0&&!(i[1]&128))return!1;var n=e.slice(6+t);return!(e[6+t-2]!==2||r===0||n[0]&128||r>1&&n[0]===0&&!(n[1]&128))};tt.prototype.hasLowS=function(){return!(this.s.lt(new Gs(1))||this.s.gt(new Gs("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))};tt.prototype.hasDefinedHashtype=function(){if(!jP.isNaturalNumber(this.nhashtype))return!1;var e=this.nhashtype&~tt.SIGHASH_ANYONECANPAY;return!(e<tt.SIGHASH_ALL||e>tt.SIGHASH_SINGLE)};tt.prototype.toTxFormat=function(){var e=this.toDER(),t=Buffer.alloc(1);return t.writeUInt8(this.nhashtype,0),Buffer.concat([e,t])};tt.fromSchnorr=function(e){fi.checkArgument(Buffer.isBuffer(e),"Schnorr signature argument must be a buffer"),fi.checkArgument(e.length===64||e.length===65,"Schnorr signatures must be 64 or 65 bytes");let t=new tt,r=e.slice(0,32),i=e.slice(32,64);return e.length===65?(t.nhashtype=e[e.length-1],fi.checkState(t.nhashtype!==tt.SIGHASH_DEFAULT,new Error("invalid hashtype"))):t.nhashtype=tt.SIGHASH_DEFAULT,t.r=Gs.fromBuffer(r),t.s=Gs.fromBuffer(i),t.isSchnorr=!0,t};tt.SIGHASH_DEFAULT=0;tt.SIGHASH_ALL=1;tt.SIGHASH_NONE=2;tt.SIGHASH_SINGLE=3;tt.SIGHASH_ANYONECANPAY=128;tt.SIGHASH_OUTPUT_MASK=3;tt.SIGHASH_INPUT_MASK=128;tt.Version={};tt.Version.BASE=0;tt.Version.WITNESS_V0=1;tt.Version.TAPROOT=2;tt.Version.TAPSCRIPT=3;Yy.exports=tt});var Lr=X((mD,Zy)=>{"use strict";var Mp=require("crypto"),Fa=Yt(),$s=xt(),Cr=Zy.exports;Cr.sha1=function(e){return $s.checkArgument(Fa.isBuffer(e)),Mp.createHash("sha1").update(e).digest()};Cr.sha1.blocksize=512;Cr.sha256=function(e){return $s.checkArgument(Fa.isBuffer(e)),Mp.createHash("sha256").update(e).digest()};Cr.sha256.blocksize=512;Cr.sha256sha256=function(e){return $s.checkArgument(Fa.isBuffer(e)),Cr.sha256(Cr.sha256(e))};Cr.ripemd160=function(e){return $s.checkArgument(Fa.isBuffer(e)),Mp.createHash("ripemd160").update(e).digest()};Cr.sha256ripemd160=function(e){return $s.checkArgument(Fa.isBuffer(e)),Cr.ripemd160(Cr.sha256(e))};Cr.sha512=function(e){return $s.checkArgument(Fa.isBuffer(e)),Mp.createHash("sha512").update(e).digest()};Cr.sha512.blocksize=1024;Cr.hmac=function(e,t,r){$s.checkArgument(Fa.isBuffer(t)),$s.checkArgument(Fa.isBuffer(r)),$s.checkArgument(e.blocksize);var i=e.blocksize/8;if(r.length>i)r=e(r);else if(r<i){var n=Buffer.alloc(i);n.fill(0),r.copy(n),r=n}var o=Buffer.alloc(i);o.fill(92);var u=Buffer.alloc(i);u.fill(54);for(var m=Buffer.alloc(i),_=Buffer.alloc(i),w=0;w<i;w++)m[w]=o[w]^r[w],_[w]=u[w]^r[w];return e(Buffer.concat([m,e(Buffer.concat([_,t]))]))};Cr.sha256hmac=function(e,t){return Cr.hmac(Cr.sha256,e,t)};Cr.sha512hmac=function(e,t){return Cr.hmac(Cr.sha512,e,t)}});var za=X((vD,Jy)=>{"use strict";var WP=Yt(),Cp=Rr(),Ha=[],bi={};function Xy(){}Xy.prototype.toString=function(){return this.name};function Po(e,t){if(~Ha.indexOf(e))return e;if(t){Array.isArray(t)||(t=[t]);for(let r in Ha)if(t.some(i=>Ha[r][i]===e))return Ha[r];return}return bi[e]&&bi[e].length>=1?bi[e][0]:bi[e]}function Sm(e){return this.name==e||this.alias==e}function sf(e){var t=new Xy;Cp.defineImmutable(t,{name:e.name,alias:e.alias,is:e.is,pubkeyhash:e.pubkeyhash,privatekey:e.privatekey,scripthash:e.scripthash,bech32prefix:e.bech32prefix,xpubkey:e.xpubkey,xprivkey:e.xprivkey}),e.networkMagic&&Cp.defineImmutable(t,{networkMagic:WP.integerAsBuffer(e.networkMagic)}),e.port&&Cp.defineImmutable(t,{port:e.port}),e.dnsSeeds&&Cp.defineImmutable(t,{dnsSeeds:e.dnsSeeds});for(let r of Object.values(t))r!=null&&typeof r!="object"&&(bi[r]||(bi[r]=[]),bi[r].push(t));Ha.push(t);for(let r of e.variants||[])sf({...e,variants:void 0,...r});return t}function KP(e){typeof e!="object"&&(e=Po(e));for(var t=0;t<Ha.length;t++)Ha[t]===e&&Ha.splice(t,1);for(var r in bi)if(bi[r].length){let i=bi[r].indexOf(e);i>=0&&bi[r].splice(i,1),bi[r].length===0&&delete bi[r]}else bi[r]===e&&delete bi[r]}sf({name:"livenet",alias:"mainnet",is:Sm,pubkeyhash:0,privatekey:128,scripthash:5,bech32prefix:"bc",xpubkey:76067358,xprivkey:76066276,networkMagic:4190024921,port:8333,dnsSeeds:["seed.bitcoin.sipa.be","dnsseed.bluematt.me","dnsseed.bitcoin.dashjr.org","seed.bitcoinstats.com","seed.bitnodes.io","bitseed.xf2.org"]});var wm=Po("livenet");sf({name:"testnet",alias:"testnet",is:Sm,pubkeyhash:111,privatekey:239,scripthash:196,bech32prefix:"tb",xpubkey:70617039,xprivkey:70615956,variants:[{name:"testnet3",networkMagic:185665799,port:18333,dnsSeeds:["testnet-seed.bitcoin.petertodd.org","testnet-seed.bluematt.me","testnet-seed.alexykot.me","testnet-seed.bitcoin.schildbach.de"]},{name:"signet",networkMagic:168021824,port:38333,dnsSeeds:["178.128.221.177","103.16.128.63","153.126.143.201","192.241.163.142"]},{name:"testnet4",networkMagic:471220008,port:48333,dnsSeeds:["18.189.156.102","18.201.207.55","51.158.248.8","57.128.176.163","82.67.102.15","88.99.248.50","95.217.73.162","103.99.171.212","103.165.192.210"]}]});var Em=Po("testnet"),GP=Po("testnet3"),$P=Po("signet");sf({name:"regtest",alias:"dev",is:Sm,pubkeyhash:111,privatekey:239,scripthash:196,bech32prefix:"bcrt",xpubkey:70617039,xprivkey:70615956,networkMagic:4206867930,port:18444,dnsSeeds:[]});var YP=Po("regtest");function ZP(){Em.regtestEnabled=!0}function XP(){Em.regtestEnabled=!1}Jy.exports={add:sf,remove:KP,defaultNetwork:wm,livenet:wm,mainnet:wm,testnet:Em,testnet3:GP,signet:$P,regtest:YP,get:Po,enableRegtest:ZP,disableRegtest:XP}});var ti=X((gD,e2)=>{"use strict";var Im=Yt(),Qy=require("assert"),Ar=function e(t){if(!(this instanceof e))return new e(t);this.bufLen=0,t?this.set(t):this.bufs=[]};Ar.prototype.set=function(e){return this.bufs=e.bufs||this.bufs||[],this.bufLen=this.bufs.reduce(function(t,r){return t+r.length},0),this};Ar.prototype.toBuffer=function(){return this.concat()};Ar.prototype.concat=function(){return Buffer.concat(this.bufs,this.bufLen)};Ar.prototype.write=function(e){return Qy(Im.isBuffer(e)),this.bufs.push(e),this.bufLen+=e.length,this};Ar.prototype.writeReverse=function(e){return Qy(Im.isBuffer(e)),this.bufs.push(Im.reverse(e)),this.bufLen+=e.length,this};Ar.prototype.writeUInt8=function(e){e<0&&(e=e>>>0);var t=Buffer.alloc(1);return t.writeUInt8(e,0),this.write(t),this};Ar.prototype.writeUInt16BE=function(e){e<0&&(e=e>>>0);var t=Buffer.alloc(2);return t.writeUInt16BE(e,0),this.write(t),this};Ar.prototype.writeUInt16LE=function(e){e<0&&(e=e>>>0);var t=Buffer.alloc(2);return t.writeUInt16LE(e,0),this.write(t),this};Ar.prototype.writeUInt32BE=function(e){e<0&&(e=e>>>0);var t=Buffer.alloc(4);return t.writeUInt32BE(e,0),this.write(t),this};Ar.prototype.writeInt32LE=function(e){var t=Buffer.alloc(4);return t.writeInt32LE(e,0),this.write(t),this};Ar.prototype.writeUInt32LE=function(e){e<0&&(e=e>>>0);var t=Buffer.alloc(4);return t.writeUInt32LE(e,0),this.write(t),this};Ar.prototype.writeUInt64BEBN=function(e){var t=e.toBuffer({size:8});return this.write(t),this};Ar.prototype.writeUInt64LEBN=function(e){var t=e.toBuffer({size:8});return this.writeReverse(t),this};Ar.prototype.writeVarintNum=function(e){var t=Ar.varintBufNum(e);return this.write(t),this};Ar.prototype.writeVarintBN=function(e){var t=Ar.varintBufBN(e);return this.write(t),this};Ar.varintBufNum=function(e){var t=void 0;return e<253?(t=Buffer.alloc(1),t.writeUInt8(e,0)):e<65536?(t=Buffer.alloc(3),t.writeUInt8(253,0),t.writeUInt16LE(e,1)):e<4294967296?(t=Buffer.alloc(5),t.writeUInt8(254,0),t.writeUInt32LE(e,1)):(t=Buffer.alloc(9),t.writeUInt8(255,0),t.writeInt32LE(e&-1,1),t.writeUInt32LE(Math.floor(e/4294967296),5)),t};Ar.varintBufBN=function(e){var t=void 0,r=e.toNumber();if(r<253)t=Buffer.alloc(1),t.writeUInt8(r,0);else if(r<65536)t=Buffer.alloc(3),t.writeUInt8(253,0),t.writeUInt16LE(r,1);else if(r<4294967296)t=Buffer.alloc(5),t.writeUInt8(254,0),t.writeUInt32LE(r,1);else{var i=new Ar;i.writeUInt8(255),i.writeUInt64LEBN(e);var t=i.concat()}return t};e2.exports=Ar});var Va=X((xD,t2)=>{t2.exports=require("util").inherits});var Zs=X((bD,n2)=>{var r2=Lr(),i2=ti(),JP=Va();function Ys(e,t,r="hex"){if(!(this instanceof Ys))return new Ys(e,t,r);i2.apply(this),e=Buffer.from(e);let i=r2.sha256(e);return this.write(i),this.write(i),t&&(t=Buffer.isBuffer(t)?t:Buffer.from(t,r),this.write(t)),this}JP(Ys,i2);Ys.prototype.finalize=function(){return Buffer.from(r2.sha256(this.toBuffer()))};Object.defineProperties(Ys,{TAPSIGHASH:{get:()=>new Ys("TapSighash")},TAPLEAF:{get:()=>new Ys("TapLeaf")},TAPBRANCH:{get:()=>new Ys("TapBranch")}});n2.exports=Ys});var o2=X((Tm,a2)=>{var Lp=require("buffer"),ls=Lp.Buffer;function s2(e,t){for(var r in e)t[r]=e[r]}ls.from&&ls.alloc&&ls.allocUnsafe&&ls.allocUnsafeSlow?a2.exports=Lp:(s2(Lp,Tm),Tm.Buffer=No);function No(e,t,r){return ls(e,t,r)}No.prototype=Object.create(ls.prototype);s2(ls,No);No.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return ls(e,t,r)};No.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var i=ls(e);return t!==void 0?typeof r=="string"?i.fill(t,r):i.fill(t):i.fill(0),i};No.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return ls(e)};No.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Lp.SlowBuffer(e)}});var u2=X((_D,c2)=>{"use strict";var Up=o2().Buffer;function QP(e){if(e.length>=255)throw new TypeError("Alphabet too long");for(var t=new Uint8Array(256),r=0;r<t.length;r++)t[r]=255;for(var i=0;i<e.length;i++){var n=e.charAt(i),o=n.charCodeAt(0);if(t[o]!==255)throw new TypeError(n+" is ambiguous");t[o]=i}var u=e.length,m=e.charAt(0),_=Math.log(u)/Math.log(256),w=Math.log(256)/Math.log(u);function I(C){if((Array.isArray(C)||C instanceof Uint8Array)&&(C=Up.from(C)),!Up.isBuffer(C))throw new TypeError("Expected Buffer");if(C.length===0)return"";for(var B=0,U=0,Z=0,$=C.length;Z!==$&&C[Z]===0;)Z++,B++;for(var H=($-Z)*w+1>>>0,ee=new Uint8Array(H);Z!==$;){for(var ce=C[Z],ge=0,Se=H-1;(ce!==0||ge<U)&&Se!==-1;Se--,ge++)ce+=256*ee[Se]>>>0,ee[Se]=ce%u>>>0,ce=ce/u>>>0;if(ce!==0)throw new Error("Non-zero carry");U=ge,Z++}for(var me=H-U;me!==H&&ee[me]===0;)me++;for(var O=m.repeat(B);me<H;++me)O+=e.charAt(ee[me]);return O}function T(C){if(typeof C!="string")throw new TypeError("Expected String");if(C.length===0)return Up.alloc(0);for(var B=0,U=0,Z=0;C[B]===m;)U++,B++;for(var $=(C.length-B)*_+1>>>0,H=new Uint8Array($);C[B];){var ee=t[C.charCodeAt(B)];if(ee===255)return;for(var ce=0,ge=$-1;(ee!==0||ce<Z)&&ge!==-1;ge--,ce++)ee+=u*H[ge]>>>0,H[ge]=ee%256>>>0,ee=ee/256>>>0;if(ee!==0)throw new Error("Non-zero carry");Z=ce,B++}for(var Se=$-Z;Se!==$&&H[Se]===0;)Se++;var me=Up.allocUnsafe(U+($-Se));me.fill(0,0,U);for(var O=U;Se!==$;)me[O++]=H[Se++];return me}function N(C){var B=T(C);if(B)return B;throw new Error("Non-base"+u+" character")}return{encode:I,decodeUnsafe:T,decode:N}}c2.exports=QP});var Rm=X((yD,f2)=>{var eN=u2(),tN="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";f2.exports=eN(tN)});var af=X((wD,h2)=>{"use strict";var Am=yt(),l2=Rm(),p2=require("buffer"),rN="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".split(""),Nn=function e(t){if(!(this instanceof e))return new e(t);if(Buffer.isBuffer(t)){var r=t;this.fromBuffer(r)}else if(typeof t=="string"){var i=t;this.fromString(i)}else t&&this.set(t)};Nn.validCharacters=function(t){return p2.Buffer.isBuffer(t)&&(t=t.toString()),Am.every(Am.map(t,function(r){return Am.includes(rN,r)}))};Nn.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this};Nn.encode=function(e){if(!p2.Buffer.isBuffer(e))throw new Error("Input should be a buffer");return l2.encode(e)};Nn.decode=function(e){if(typeof e!="string")throw new Error("Input should be a string");return Buffer.from(l2.decode(e))};Nn.prototype.fromBuffer=function(e){return this.buf=e,this};Nn.prototype.fromString=function(e){var t=Nn.decode(e);return this.buf=t,this};Nn.prototype.toBuffer=function(){return this.buf};Nn.prototype.toString=function(){return Nn.encode(this.buf)};h2.exports=Nn});var Kc=X((ED,v2)=>{"use strict";var d2=yt(),Dp=af(),SD=require("buffer"),m2=Lr().sha256sha256,Oi=function e(t){if(!(this instanceof e))return new e(t);if(Buffer.isBuffer(t)){var r=t;this.fromBuffer(r)}else if(typeof t=="string"){var i=t;this.fromString(i)}else t&&this.set(t)};Oi.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this};Oi.validChecksum=function(t,r){return d2.isString(t)&&(t=Buffer.from(Dp.decode(t))),d2.isString(r)&&(r=Buffer.from(Dp.decode(r))),r||(r=t.slice(-4),t=t.slice(0,-4)),Oi.checksum(t).toString("hex")===r.toString("hex")};Oi.decode=function(e){if(typeof e!="string")throw new Error("Input must be a string");var t=Buffer.from(Dp.decode(e));if(t.length<4)throw new Error("Input string too short");var r=t.slice(0,-4),i=t.slice(-4),n=m2(r),o=n.slice(0,4);if(i.toString("hex")!==o.toString("hex"))throw new Error("Checksum mismatch");return r};Oi.checksum=function(e){return m2(e).slice(0,4)};Oi.encode=function(e){if(!Buffer.isBuffer(e))throw new Error("Input must be a buffer");var t=Buffer.alloc(e.length+4),r=Oi.checksum(e);return e.copy(t),r.copy(t,e.length),Dp.encode(t)};Oi.prototype.fromBuffer=function(e){return this.buf=e,this};Oi.prototype.fromString=function(e){var t=Oi.decode(e);return this.buf=t,this};Oi.prototype.toBuffer=function(){return this.buf};Oi.prototype.toString=function(){return Oi.encode(this.buf)};v2.exports=Oi});var _2=X($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.bech32m=$c.bech32=void 0;var qp="qpzry9x8gf2tvdw0s3jn54khce6mua7l",x2={};for(let e=0;e<qp.length;e++){let t=qp.charAt(e);x2[t]=e}function Gc(e){let t=e>>25;return(e&33554431)<<5^-(t>>0&1)&996825010^-(t>>1&1)&642813549^-(t>>2&1)&513874426^-(t>>3&1)&1027748829^-(t>>4&1)&705979059}function g2(e){let t=1;for(let r=0;r<e.length;++r){let i=e.charCodeAt(r);if(i<33||i>126)return"Invalid prefix ("+e+")";t=Gc(t)^i>>5}t=Gc(t);for(let r=0;r<e.length;++r){let i=e.charCodeAt(r);t=Gc(t)^i&31}return t}function Om(e,t,r,i){let n=0,o=0,u=(1<<r)-1,m=[];for(let _=0;_<e.length;++_)for(n=n<<t|e[_],o+=t;o>=r;)o-=r,m.push(n>>o&u);if(i)o>0&&m.push(n<<r-o&u);else{if(o>=t)return"Excess padding";if(n<<r-o&u)return"Non-zero padding"}return m}function iN(e){return Om(e,8,5,!0)}function nN(e){let t=Om(e,5,8,!1);if(Array.isArray(t))return t}function sN(e){let t=Om(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}function b2(e){let t;e==="bech32"?t=1:t=734539939;function r(u,m,_){if(_=_||90,u.length+7+m.length>_)throw new TypeError("Exceeds length limit");u=u.toLowerCase();let w=g2(u);if(typeof w=="string")throw new Error(w);let I=u+"1";for(let T=0;T<m.length;++T){let N=m[T];if(N>>5)throw new Error("Non 5-bit word");w=Gc(w)^N,I+=qp.charAt(N)}for(let T=0;T<6;++T)w=Gc(w);w^=t;for(let T=0;T<6;++T){let N=w>>(5-T)*5&31;I+=qp.charAt(N)}return I}function i(u,m){if(m=m||90,u.length<8)return u+" too short";if(u.length>m)return"Exceeds length limit";let _=u.toLowerCase(),w=u.toUpperCase();if(u!==_&&u!==w)return"Mixed-case string "+u;u=_;let I=u.lastIndexOf("1");if(I===-1)return"No separator character for "+u;if(I===0)return"Missing prefix for "+u;let T=u.slice(0,I),N=u.slice(I+1);if(N.length<6)return"Data too short";let C=g2(T);if(typeof C=="string")return C;let B=[];for(let U=0;U<N.length;++U){let Z=N.charAt(U),$=x2[Z];if($===void 0)return"Unknown character "+Z;C=Gc(C)^$,!(U+6>=N.length)&&B.push($)}return C!==t?"Invalid checksum for "+u:{prefix:T,words:B}}function n(u,m){let _=i(u,m);if(typeof _=="object")return _}function o(u,m){let _=i(u,m);if(typeof _=="object")return _;throw new Error(_)}return{decodeUnsafe:n,decode:o,encode:r,toWords:iN,fromWordsUnsafe:nN,fromWords:sN}}$c.bech32=b2("bech32");$c.bech32m=b2("bech32m")});var w2=X((TD,y2)=>{"use strict";var Yc=_2(),aN=function(e){if(typeof e!="string")throw new Error("Input should be a string");var t;let r=Yc.bech32.fromWords,i=ja.BECH32;try{t=Yc.bech32.decode(e)}catch(o){if(o.message.indexOf("Invalid checksum")>-1)t=Yc.bech32m.decode(e),i=ja.BECH32M,r=Yc.bech32m.fromWords;else throw o}let n=t.words[0];if(n>=1&&i!==ja.BECH32M)throw new Error("Version 1+ witness address must use Bech32m checksum");return{prefix:t.prefix,data:Buffer.from(r(t.words.slice(1))),version:n}},oN=function(e,t,r,i){if(typeof e!="string")throw new Error("Prefix should be a string");if(typeof t!="number")throw new Error("version should be a number");if(i&&typeof i=="string"&&(i=ja[i.toUpperCase()]||-1),i&&!(i==ja.BECH32||i==ja.BECH32M))throw new Error("Invalid encoding specified");let n=i==ja.BECH32M?Yc.bech32m:Yc.bech32,o=n.toWords(r);return o.unshift(t),n.encode(e,o)},ja={BECH32:1,BECH32M:2};y2.exports={decode:aN,encode:oN,encodings:ja}});var ps=X((RD,E2)=>{"use strict";var of=yt(),S2=xt(),cN=Yt(),Zc=Zr(),Or=function e(t){if(!(this instanceof e))return new e(t);if(!of.isUndefined(t))if(Buffer.isBuffer(t))this.set({buf:t});else if(of.isString(t))this.set({buf:Buffer.from(t,"hex")});else if(of.isObject(t)){var r=t;this.set(r)}else throw new TypeError("Unrecognized argument for BufferReader")};Or.prototype.set=function(e){return this.buf=e.buf||this.buf||void 0,this.pos=e.pos||this.pos||0,this};Or.prototype.eof=function(){return this.buf?this.pos>=this.buf.length:!0};Or.prototype.finished=Or.prototype.eof;Or.prototype.read=function(e){S2.checkArgument(!of.isUndefined(e),"Must specify a length");var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,t};Or.prototype.readAll=function(){var e=this.buf.slice(this.pos,this.buf.length);return this.pos=this.buf.length,e};Or.prototype.readUInt8=function(){var e=this.buf.readUInt8(this.pos);return this.pos=this.pos+1,e};Or.prototype.readUInt16BE=function(){var e=this.buf.readUInt16BE(this.pos);return this.pos=this.pos+2,e};Or.prototype.readUInt16LE=function(){var e=this.buf.readUInt16LE(this.pos);return this.pos=this.pos+2,e};Or.prototype.readUInt32BE=function(){var e=this.buf.readUInt32BE(this.pos);return this.pos=this.pos+4,e};Or.prototype.readUInt32LE=function(){var e=this.buf.readUInt32LE(this.pos);return this.pos=this.pos+4,e};Or.prototype.readInt32LE=function(){var e=this.buf.readInt32LE(this.pos);return this.pos=this.pos+4,e};Or.prototype.readUInt64BEBN=function(){var e=this.buf.slice(this.pos,this.pos+8),t=Zc.fromBuffer(e);return this.pos=this.pos+8,t};Or.prototype.readUInt64LEBN=function(){var e=this.buf.readUInt32LE(this.pos),t=this.buf.readUInt32LE(this.pos+4),r=t*4294967296+e,i;if(r<=9007199254740991)i=new Zc(r);else{var n=Array.prototype.slice.call(this.buf,this.pos,this.pos+8);i=new Zc(n,10,"le")}return this.pos=this.pos+8,i};Or.prototype.readVarintNum=function(){var e=this.readUInt8();switch(e){case 253:return this.readUInt16LE();case 254:return this.readUInt32LE();case 255:var t=this.readUInt64LEBN(),r=t.toNumber();if(r<=Math.pow(2,53))return r;throw new Error("number too large to retain precision - use readVarintBN");default:return e}};Or.prototype.readVarLengthBuffer=function(){var e=this.readVarintNum(),t=this.read(e);return S2.checkState(t.length===e,"Invalid length while reading varlength buffer. Expected to read: "+e+" and read "+t.length),t};Or.prototype.readVarintBuf=function(){var e=this.buf.readUInt8(this.pos);switch(e){case 253:return this.read(3);case 254:return this.read(5);case 255:return this.read(9);default:return this.read(1)}};Or.prototype.readVarintBN=function(){var e=this.readUInt8();switch(e){case 253:return new Zc(this.readUInt16LE());case 254:return new Zc(this.readUInt32LE());case 255:return this.readUInt64LEBN();default:return new Zc(e)}};Or.prototype.reverse=function(){for(var e=Buffer.alloc(this.buf.length),t=0;t<e.length;t++)e[t]=this.buf[this.buf.length-1-t];return this.buf=e,this};Or.prototype.readReverse=function(e){of.isUndefined(e)&&(e=this.buf.length);var t=this.buf.slice(this.pos,this.pos+e);return this.pos=this.pos+e,cN.reverse(t)};E2.exports=Or});var Fp=X((AD,I2)=>{"use strict";var Xc=yt(),Jc=xt(),uN=Yt(),fN=Rr();function ut(e){if(!(this instanceof ut))return new ut(e);var t;if(Xc.isNumber(e))t=e;else if(Xc.isString(e))t=ut.map[e];else throw new TypeError('Unrecognized num type: "'+typeof e+'" for Opcode');return fN.defineImmutable(this,{num:t}),this}ut.fromBuffer=function(e){return Jc.checkArgument(uN.isBuffer(e)),new ut(+("0x"+e.toString("hex")))};ut.fromNumber=function(e){return Jc.checkArgument(Xc.isNumber(e)),new ut(e)};ut.fromString=function(e){Jc.checkArgument(Xc.isString(e));var t=ut.map[e];if(typeof t>"u")throw new TypeError("Invalid opcodestr");return new ut(t)};ut.prototype.toHex=function(){return this.num.toString(16)};ut.prototype.toBuffer=function(){return Buffer.from(this.toHex(),"hex")};ut.prototype.toNumber=function(){return this.num};ut.prototype.toString=function(){var e=ut.reverseMap[this.num];if(typeof e>"u")throw new Error("Opcode does not have a string representation");return e};ut.smallInt=function(e){return Jc.checkArgument(Xc.isNumber(e),"Invalid Argument: n should be number"),Jc.checkArgument(e>=0&&e<=16,"Invalid Argument: n must be between 0 and 16"),e===0?ut("OP_0"):new ut(ut.map.OP_1+e-1)};ut.decodeOpN=function(e){return e===ut.OP_0?0:(Jc.checkArgument(e>=ut.OP_1&&e<=ut.OP_16,new Error("Invalid opcode: "+JSON.stringify(e))),e-(ut.OP_1-1))};ut.isOpSuccess=function(e){return typeof e=="string"&&!parseInt(e)&&(e=ut[e]),e==80||e==98||e>=126&&e<=129||e>=131&&e<=134||e>=137&&e<=138||e>=141&&e<=142||e>=149&&e<=153||e>=187&&e<=254};ut.map={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_CHECKLOCKTIMEVERIFY:177,OP_CHECKSEQUENCEVERIFY:178,OP_NOP1:176,OP_NOP2:177,OP_NOP3:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_CHECKSIGADD:186,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255};ut.reverseMap=[];for(km in ut.map)ut.reverseMap[ut.map[km]]=km;var km;Xc.extend(ut,ut.map);ut.isSmallIntOp=function(e){return e instanceof ut&&(e=e.toNumber()),e===ut.map.OP_0||e>=ut.map.OP_1&&e<=ut.map.OP_16};ut.prototype.inspect=function(){return"<Opcode: "+this.toString()+", hex: "+this.toHex()+", decimal: "+this.num+">"};I2.exports=ut});var Bm=X((OD,A2)=>{"use strict";var Vr=Mn(),lN=ps(),pN=ti(),Hp=Lr(),le=Fp(),Bn=Cn(),Bo=li(),T2=za(),Xt=xt(),Pm=yt(),Nm=ji(),ai=Yt(),hN=Rr(),R2=Zs(),K=function e(t){if(!(this instanceof e))return new e(t);if(this.chunks=[],ai.isBuffer(t))return e.fromBuffer(t);if(t instanceof Vr)return e.fromAddress(t);if(t instanceof e)return e.fromBuffer(t.toBuffer());if(typeof t=="string")return e.fromString(t);Pm.isObject(t)&&Array.isArray(t.chunks)&&this.set(t)};K.prototype.set=function(e){return Xt.checkArgument(Pm.isObject(e)),Xt.checkArgument(Array.isArray(e.chunks)),this.chunks=e.chunks,this};K.fromBuffer=function(e){var t=new K;t.chunks=[];for(var r=new lN(e);!r.finished();)try{var i=r.readUInt8(),n,o;i>0&&i<le.OP_PUSHDATA1?(n=i,t.chunks.push({buf:r.read(n),len:n,opcodenum:i})):i===le.OP_PUSHDATA1?(n=r.readUInt8(),o=r.read(n),t.chunks.push({buf:o,len:n,opcodenum:i})):i===le.OP_PUSHDATA2?(n=r.readUInt16LE(),o=r.read(n),t.chunks.push({buf:o,len:n,opcodenum:i})):i===le.OP_PUSHDATA4?(n=r.readUInt32LE(),o=r.read(n),t.chunks.push({buf:o,len:n,opcodenum:i})):le.isOpSuccess(i)?(o=r.readAll(),n=o.length,t.chunks.push({buf:o,len:n,opcodenum:i})):t.chunks.push({opcodenum:i})}catch(u){throw u instanceof RangeError?new Nm.Script.InvalidBuffer(e.toString("hex")):u}return t};K.prototype.toBuffer=function(){for(var e=new pN,t=0;t<this.chunks.length;t++){var r=this.chunks[t],i=r.opcodenum;e.writeUInt8(r.opcodenum),r.buf&&(i<le.OP_PUSHDATA1?e.write(r.buf):i===le.OP_PUSHDATA1?(e.writeUInt8(r.len),e.write(r.buf)):i===le.OP_PUSHDATA2?(e.writeUInt16LE(r.len),e.write(r.buf)):(i===le.OP_PUSHDATA4&&e.writeUInt32LE(r.len),e.write(r.buf)))}return e.concat()};K.fromASM=function(e){var t=new K;t.chunks=[];for(var r=e.split(" "),i=0;i<r.length;){var n=r[i],o=le(n),u=o.toNumber();if(u==null){var m=Buffer.from(r[i],"hex");t.chunks.push({buf:m,len:m.length,opcodenum:m.length}),i=i+1}else u===le.OP_PUSHDATA1||u===le.OP_PUSHDATA2||u===le.OP_PUSHDATA4?(t.chunks.push({buf:Buffer.from(r[i+2],"hex"),len:parseInt(r[i+1]),opcodenum:u}),i=i+3):(t.chunks.push({opcodenum:u}),i=i+1)}return t};K.fromHex=function(e){return new K(Buffer.from(e,"hex"))};K.fromString=function(e){if(hN.isHexa(e)||e.length===0)return new K(Buffer.from(e,"hex"));var t=new K;t.chunks=[];for(var r=e.split(" "),i=0;i<r.length;){var n=r[i],o=le(n),u=o.toNumber();if(u==null)if(u=parseInt(n),u>0&&u<le.OP_PUSHDATA1)t.chunks.push({buf:Buffer.from(r[i+1].slice(2),"hex"),len:u,opcodenum:u}),i=i+2;else throw new Error("Invalid script: "+JSON.stringify(e));else if(u===le.OP_PUSHDATA1||u===le.OP_PUSHDATA2||u===le.OP_PUSHDATA4){if(r[i+2].slice(0,2)!=="0x")throw new Error("Pushdata data must start with 0x");t.chunks.push({buf:Buffer.from(r[i+2].slice(2),"hex"),len:parseInt(r[i+1]),opcodenum:u}),i=i+3}else t.chunks.push({opcodenum:u}),i=i+1}return t};K.prototype._chunkToString=function(e,t){var r=e.opcodenum,i=t==="asm",n="";if(e.buf)(!i&&r===le.OP_PUSHDATA1||r===le.OP_PUSHDATA2||r===le.OP_PUSHDATA4)&&(n=n+" "+le(r).toString()),e.len>0&&(i?n=n+" "+e.buf.toString("hex"):n=n+" "+e.len+" 0x"+e.buf.toString("hex"));else if(typeof le.reverseMap[r]<"u")i?r===0?n=n+" 0":r===79?n=n+" -1":n=n+" "+le(r).toString():n=n+" "+le(r).toString();else{var o=r.toString(16);o.length%2!==0&&(o="0"+o),i?n=n+" "+o:n=n+" 0x"+o}return n};K.prototype.toASM=function(){for(var e="",t=0;t<this.chunks.length;t++){var r=this.chunks[t];e+=this._chunkToString(r,"asm")}return e.substr(1)};K.prototype.toString=function(){for(var e="",t=0;t<this.chunks.length;t++){var r=this.chunks[t];e+=this._chunkToString(r)}return e.substr(1)};K.prototype.toHex=function(){return this.toBuffer().toString("hex")};K.prototype.inspect=function(){return"<Script: "+this.toString()+">"};K.prototype.isPublicKeyHashOut=function(){return!!(this.chunks.length===5&&this.chunks[0].opcodenum===le.OP_DUP&&this.chunks[1].opcodenum===le.OP_HASH160&&this.chunks[2].buf&&this.chunks[2].buf.length===20&&this.chunks[3].opcodenum===le.OP_EQUALVERIFY&&this.chunks[4].opcodenum===le.OP_CHECKSIG)};K.prototype.isPublicKeyHashIn=function(){if(this.chunks.length===2){var e=this.chunks[0].buf,t=this.chunks[1].buf;if(e&&e.length&&e[0]===48&&t&&t.length){var r=t[0];if((r===4||r===6||r===7)&&t.length===65)return!0;if((r===3||r===2)&&t.length===33)return!0}}return!1};K.prototype.getPublicKey=function(){return Xt.checkState(this.isPublicKeyOut(),"Can't retrieve PublicKey from a non-PK output"),this.chunks[0].buf};K.prototype.getPublicKeyHash=function(){if(this.isPublicKeyHashOut())return this.chunks[2].buf;if(this.isWitnessPublicKeyHashOut())return this.chunks[1].buf;if(this.isTaproot())return this.chunks[1].buf;throw new Error("Can't retrieve PublicKeyHash from a non-PKH output")};K.prototype.isPublicKeyOut=function(){if(this.chunks.length===2&&this.chunks[0].buf&&this.chunks[0].buf.length&&this.chunks[1].opcodenum===le.OP_CHECKSIG){var e=this.chunks[0].buf,t=e[0],r=!1;if(((t===4||t===6||t===7)&&e.length===65||(t===3||t===2)&&e.length===33)&&(r=!0),r)return Bn.isValid(e)}return!1};K.prototype.isPublicKeyIn=function(){if(this.chunks.length===1){var e=this.chunks[0].buf;if(e&&e.length&&e[0]===48)return!0}return!1};K.prototype.isScriptHashOut=function(){var e=this.toBuffer();return e.length===23&&e[0]===le.OP_HASH160&&e[1]===20&&e[e.length-1]===le.OP_EQUAL};K.prototype.isWitnessScriptHashOut=function(){var e=this.toBuffer();return e.length===34&&e[0]===le.OP_0&&e[1]===32};K.prototype.isWitnessPublicKeyHashOut=function(){var e=this.toBuffer();return e.length===22&&e[0]===le.OP_0&&e[1]===20};K.prototype.isTaproot=function(){var e=this.toBuffer();return e.length===34&&e[0]===le.OP_1&&e[1]===32};K.prototype.isWitnessProgram=function(e){e||(e={});var t=this.toBuffer();return t.length<4||t.length>42||t[0]!==le.OP_0&&!(t[0]>=le.OP_1&&t[0]<=le.OP_16)?!1:t.length===t[1]+2?(e.version=le.decodeOpN(t[0]),e.program=t.slice(2,t.length),!0):!1};K.prototype.isScriptHashIn=function(){if(this.chunks.length<=1)return!1;var e=this.chunks[this.chunks.length-1],t=e.buf;if(!t)return!1;var r;try{r=K.fromBuffer(t)}catch(n){if(n instanceof Nm.Script.InvalidBuffer)return!1;throw n}var i=r.classify();return i!==K.types.UNKNOWN};K.prototype.isMultisigOut=function(){return this.chunks.length>3&&le.isSmallIntOp(this.chunks[0].opcodenum)&&this.chunks.slice(1,this.chunks.length-2).every(function(e){return e.buf&&ai.isBuffer(e.buf)})&&le.isSmallIntOp(this.chunks[this.chunks.length-2].opcodenum)&&this.chunks[this.chunks.length-1].opcodenum===le.OP_CHECKMULTISIG};K.prototype.isMultisigIn=function(){return this.chunks.length>=2&&this.chunks[0].opcodenum===0&&this.chunks.slice(1,this.chunks.length).every(function(e){return e.buf&&ai.isBuffer(e.buf)&&Bo.isTxDER(e.buf)})};K.prototype.isDataOut=function(){return this.chunks.length>=1&&this.chunks[0].opcodenum===le.OP_RETURN&&(this.chunks.length===1||this.chunks.length===2&&this.chunks[1].buf&&this.chunks[1].buf.length<=K.OP_RETURN_STANDARD_SIZE&&this.chunks[1].length===this.chunks.len)};K.prototype.getData=function(){if(this.isDataOut()||this.isScriptHashOut()||this.isWitnessScriptHashOut()||this.isWitnessPublicKeyHashOut()||this.isTaproot())return this.chunks[1]==null?Buffer.alloc(0):Buffer.from(this.chunks[1].buf);if(this.isPublicKeyHashOut())return Buffer.from(this.chunks[2].buf);throw new Error("Unrecognized script type to get data from")};K.prototype.isPushOnly=function(){return this.chunks.every(function(e){return e.opcodenum<=le.OP_16})};K.types={};K.types.UNKNOWN="Unknown";K.types.PUBKEY_OUT="Pay to public key";K.types.PUBKEY_IN="Spend from public key";K.types.PUBKEYHASH_OUT="Pay to public key hash";K.types.PUBKEYHASH_IN="Spend from public key hash";K.types.SCRIPTHASH_OUT="Pay to script hash";K.types.SCRIPTHASH_IN="Spend from script hash";K.types.MULTISIG_OUT="Pay to multisig";K.types.MULTISIG_IN="Spend from multisig";K.types.DATA_OUT="Data push";K.OP_RETURN_STANDARD_SIZE=80;K.ANNEX_TAG=80;K.VALIDATION_WEIGHT_PER_SIGOP_PASSED=50;K.VALIDATION_WEIGHT_OFFSET=50;K.prototype.classify=function(){if(this._isInput)return this.classifyInput();if(this._isOutput)return this.classifyOutput();var e=this.classifyOutput();return e!=K.types.UNKNOWN?e:this.classifyInput()};K.outputIdentifiers={};K.outputIdentifiers.PUBKEY_OUT=K.prototype.isPublicKeyOut;K.outputIdentifiers.PUBKEYHASH_OUT=K.prototype.isPublicKeyHashOut;K.outputIdentifiers.MULTISIG_OUT=K.prototype.isMultisigOut;K.outputIdentifiers.SCRIPTHASH_OUT=K.prototype.isScriptHashOut;K.outputIdentifiers.DATA_OUT=K.prototype.isDataOut;K.prototype.classifyOutput=function(){for(var e in K.outputIdentifiers)if(K.outputIdentifiers[e].bind(this)())return K.types[e];return K.types.UNKNOWN};K.inputIdentifiers={};K.inputIdentifiers.PUBKEY_IN=K.prototype.isPublicKeyIn;K.inputIdentifiers.PUBKEYHASH_IN=K.prototype.isPublicKeyHashIn;K.inputIdentifiers.MULTISIG_IN=K.prototype.isMultisigIn;K.inputIdentifiers.SCRIPTHASH_IN=K.prototype.isScriptHashIn;K.prototype.classifyInput=function(){for(var e in K.inputIdentifiers)if(K.inputIdentifiers[e].bind(this)())return K.types[e];return K.types.UNKNOWN};K.prototype.isStandard=function(){return this.classify()!==K.types.UNKNOWN};K.prototype.prepend=function(e){return this._addByType(e,!0),this};K.prototype.equals=function(e){if(Xt.checkState(e instanceof K,"Must provide another script"),this.chunks.length!==e.chunks.length)return!1;var t;for(t=0;t<this.chunks.length;t++){if(ai.isBuffer(this.chunks[t].buf)&&!ai.isBuffer(e.chunks[t].buf)||ai.isBuffer(this.chunks[t].buf)&&!ai.equals(this.chunks[t].buf,e.chunks[t].buf))return!1;if(this.chunks[t].opcodenum!==e.chunks[t].opcodenum)return!1}return!0};K.prototype.add=function(e){return this._addByType(e,!1),this};K.prototype._addByType=function(e,t){if(typeof e=="string")this._addOpcode(e,t);else if(typeof e=="number")this._addOpcode(e,t);else if(e instanceof le)this._addOpcode(e,t);else if(ai.isBuffer(e))this._addBuffer(e,t);else if(e instanceof K)this.chunks=this.chunks.concat(e.chunks);else if(typeof e=="object")this._insertAtPosition(e,t);else throw new Error("Invalid script chunk")};K.prototype._insertAtPosition=function(e,t){t?this.chunks.unshift(e):this.chunks.push(e)};K.prototype._addOpcode=function(e,t){var r;return typeof e=="number"?r=e:e instanceof le?r=e.toNumber():r=le(e).toNumber(),this._insertAtPosition({opcodenum:r},t),this};K.prototype._addBuffer=function(e,t){var r,i=e.length;if(i>=0&&i<le.OP_PUSHDATA1)r=i;else if(i<Math.pow(2,8))r=le.OP_PUSHDATA1;else if(i<Math.pow(2,16))r=le.OP_PUSHDATA2;else if(i<Math.pow(2,32))r=le.OP_PUSHDATA4;else throw new Error("You can't push that much data");return this._insertAtPosition({buf:e,len:i,opcodenum:r},t),this};K.prototype.hasCodeseparators=function(){for(var e=0;e<this.chunks.length;e++)if(this.chunks[e].opcodenum===le.OP_CODESEPARATOR)return!0;return!1};K.prototype.removeCodeseparators=function(){for(var e=[],t=0;t<this.chunks.length;t++)this.chunks[t].opcodenum!==le.OP_CODESEPARATOR&&e.push(this.chunks[t]);return this.chunks=e,this};K.buildMultisigOut=function(e,t,r){Xt.checkArgument(t<=e.length,"Number of required signatures must be less than or equal to the number of public keys"),r=r||{};var i=new K;i.add(le.smallInt(t)),e=e.map(Bn);var n=e;r.noSorting||(n=Pm.sortBy(e,function(m){return m.toString("hex")}));for(var o=0;o<n.length;o++){var u=n[o];i.add(u.toBuffer())}return i.add(le.smallInt(e.length)),i.add(le.OP_CHECKMULTISIG),i};K.buildWitnessMultisigOutFromScript=function(e){if(e instanceof K){var t=new K;return t.add(le.OP_0),t.add(Hp.sha256(e.toBuffer())),t}else throw new TypeError("First argument is expected to be a p2sh script")};K.buildMultisigIn=function(e,t,r,i){Xt.checkArgument(Array.isArray(e)),Xt.checkArgument(!isNaN(t)),Xt.checkArgument(Array.isArray(r)),i=i||{};var n=new K;n.add(le.OP_0);for(let o of r)Xt.checkArgument(ai.isBuffer(o),"Signatures must be an array of Buffers"),n.add(o);return n};K.buildP2SHMultisigIn=function(e,t,r,i){Xt.checkArgument(Array.isArray(e)),Xt.checkArgument(!isNaN(t)),Xt.checkArgument(Array.isArray(r)),i=i||{};var n=new K;n.add(le.OP_0);for(let o of r)Xt.checkArgument(ai.isBuffer(o),"Signatures must be an array of Buffers"),n.add(o);return n.add((i.cachedMultisig||K.buildMultisigOut(e,t,i)).toBuffer()),n};K.buildPublicKeyHashOut=function(e){Xt.checkArgument(e!=null),Xt.checkArgument(e instanceof Bn||e instanceof Vr||typeof e=="string"),e instanceof Bn?e=e.toAddress():typeof e=="string"&&(e=new Vr(e));var t=new K;return t.add(le.OP_DUP).add(le.OP_HASH160).add(e.hashBuffer).add(le.OP_EQUALVERIFY).add(le.OP_CHECKSIG),t._network=e.network,t};K.buildWitnessV0Out=function(e){Xt.checkArgument(e!=null),Xt.checkArgument(e instanceof Bn||e instanceof Vr||typeof e=="string"),e instanceof Bn?e=e.toAddress(null,Vr.PayToWitnessPublicKeyHash):typeof e=="string"&&(e=new Vr(e));var t=new K;return t.add(le.OP_0).add(e.hashBuffer),t._network=e.network,t};K.buildWitnessV1Out=function(e,t){if(Xt.checkArgument(e instanceof Bn||e instanceof Vr||typeof e=="string"),Xt.checkArgument(!t||Array.isArray(t)||!!t.script),typeof e=="string")try{e=Bn.fromTaproot(e)}catch{e=Vr.fromString(e)}function r(u){if(Array.isArray(u)){let[m,_]=r(u[0]),[w,I]=r(u[1]),T=[[[m[0],m[1]],I],[[w[0],w[1]],_]],N=R2.TAPBRANCH;return _.compare(I)===1?(N.write(I),N.write(_)):(N.write(_),N.write(I)),[T,N.finalize()]}else{let{leafVersion:m,script:_}=u,w=new K(_).toBuffer(),I=R2.TAPLEAF;I.writeUInt8(m),I.writeUInt8(w.length),I.write(w);let T=I.finalize();return[[Buffer.from([m]),w],T]}}let i=null;if(t){let[u,m]=r(t);i=m}let n;e instanceof Bn?n=e.createTapTweak(i).tweakedPubKey:n=e.hashBuffer;let o=new K;return o.add(le.OP_1),o.add(n),o};K.buildPublicKeyOut=function(e){Xt.checkArgument(e instanceof Bn);var t=new K;return t.add(e.toBuffer()).add(le.OP_CHECKSIG),t};K.buildDataOut=function(e,t){Xt.checkArgument(e==null||typeof e=="string"||ai.isBuffer(e)),typeof e=="string"&&(e=Buffer.from(e,t));var r=new K;return r.add(le.OP_RETURN),e!=null&&r.add(e),r};K.buildScriptHashOut=function(e){Xt.checkArgument(e instanceof K||e instanceof Vr&&e.isPayToScriptHash());var t=new K;return t.add(le.OP_HASH160).add(e instanceof Vr?e.hashBuffer:Hp.sha256ripemd160(e.toBuffer())).add(le.OP_EQUAL),t._network=e._network||e.network,t};K.buildPublicKeyIn=function(e,t){Xt.checkArgument(e instanceof Bo||ai.isBuffer(e)),Xt.checkArgument(t==null||!isNaN(t)),e instanceof Bo&&(e=e.toBuffer());var r=new K;return r.add(ai.concat([e,ai.integerAsSingleByteBuffer(t||Bo.SIGHASH_ALL)])),r};K.buildPublicKeyHashIn=function(e,t,r){Xt.checkArgument(t instanceof Bo||ai.isBuffer(t)),Xt.checkArgument(r==null||!isNaN(r)),t instanceof Bo&&(t=t.toBuffer());var i=new K().add(ai.concat([t,ai.integerAsSingleByteBuffer(r||Bo.SIGHASH_ALL)])).add(new Bn(e).toBuffer());return i};K.empty=function(){return new K};K.prototype.toScriptHashOut=function(){return K.buildScriptHashOut(this)};K.fromAddress=function(e){if(e=Vr(e),e.isPayToScriptHash())return K.buildScriptHashOut(e);if(e.isPayToPublicKeyHash())return K.buildPublicKeyHashOut(e);if(e.isPayToWitnessPublicKeyHash())return K.buildWitnessV0Out(e);if(e.isPayToWitnessScriptHash())return K.buildWitnessV0Out(e);if(e.isPayToTaproot())return K.buildWitnessV1Out(e);throw new Nm.Script.UnrecognizedAddress(e)};K.prototype.getAddressInfo=function(e){if(this._isInput)return this._getInputAddressInfo();if(this._isOutput)return this._getOutputAddressInfo();var t=this._getOutputAddressInfo();return t||this._getInputAddressInfo()};K.prototype._getOutputAddressInfo=function(){var e={};if(this.isScriptHashOut())e.hashBuffer=this.getData(),e.type=Vr.PayToScriptHash;else if(this.isPublicKeyHashOut())e.hashBuffer=this.getData(),e.type=Vr.PayToPublicKeyHash;else if(this.isWitnessScriptHashOut())e.hashBuffer=this.getData(),e.type=Vr.PayToWitnessScriptHash;else if(this.isWitnessPublicKeyHashOut())e.hashBuffer=this.getData(),e.type=Vr.PayToWitnessPublicKeyHash;else if(this.isTaproot())e.hashBuffer=this.getData(),e.type=Vr.PayToTaproot;else return!1;return e};K.prototype._getInputAddressInfo=function(){var e={};if(this.isPublicKeyHashIn())e.hashBuffer=Hp.sha256ripemd160(this.chunks[1].buf),e.type=Vr.PayToPublicKeyHash;else if(this.isScriptHashIn())e.hashBuffer=Hp.sha256ripemd160(this.chunks[this.chunks.length-1].buf),e.type=Vr.PayToScriptHash;else return!1;return e};K.prototype.toAddress=function(e){var t=this.getAddressInfo();return t?(t.network=T2.get(e)||this._network||T2.defaultNetwork,new Vr(t)):!1};K.prototype.findAndDelete=function(e){for(var t=e.toBuffer(),r=t.toString("hex"),i=0;i<this.chunks.length;i++){var n=K({chunks:[this.chunks[i]]}),o=n.toBuffer(),u=o.toString("hex");r===u&&this.chunks.splice(i,1)}return this};K.prototype.checkMinimalPush=function(e){var t=this.chunks[e],r=t.buf,i=t.opcodenum;return r?r.length===0?i===le.OP_0:r.length===1&&r[0]>=1&&r[0]<=16?i===le.OP_1+(r[0]-1):r.length===1&&r[0]===129?i===le.OP_1NEGATE:r.length<=75?i===r.length:r.length<=255?i===le.OP_PUSHDATA1:r.length<=65535?i===le.OP_PUSHDATA2:!0:!0};K.prototype.getSignatureOperationsCount=function(e){e=e??!0;var t=0,r=le.OP_INVALIDOPCODE;for(let n of this.chunks){var i=n.opcodenum;i==le.OP_CHECKSIG||i==le.OP_CHECKSIGVERIFY?t++:(i==le.OP_CHECKMULTISIG||i==le.OP_CHECKMULTISIGVERIFY)&&(e&&r>=le.OP_1&&r<=le.OP_16?t+=le.decodeOpN(r):t+=20),r=i}return t};A2.exports=K});var Qc=X((PD,B2)=>{"use strict";var Mo=li(),kD=ki(),O2=ps(),k2=ti(),cf=Lr(),N2=uf(),P2=xt(),Mm=yt(),Cm=function(t,r,i,n,o){var u=Buffer.alloc(32),m=Buffer.alloc(32),_=Buffer.alloc(32);if(!(r&Mo.SIGHASH_ANYONECANPAY)){for(var w=[],I=0;I<t.inputs.length;I++){var T=t.inputs[I],N=new O2(T.prevTxId).readReverse();w.push(N);var C=Buffer.alloc(4);C.writeUInt32LE(T.outputIndex,0),w.push(C)}u=cf.sha256sha256(Buffer.concat(w))}if(!(r&Mo.SIGHASH_ANYONECANPAY)&&(r&31)!==Mo.SIGHASH_SINGLE&&(r&31)!==Mo.SIGHASH_NONE){for(var B=[],U=0;U<t.inputs.length;U++){var Z=Buffer.alloc(4);Z.writeUInt32LE(t.inputs[U].sequenceNumber,0),B.push(Z)}m=cf.sha256sha256(Buffer.concat(B))}var $=new k2;if((r&31)!==Mo.SIGHASH_SINGLE&&(r&31)!==Mo.SIGHASH_NONE){for(var H=0;H<t.outputs.length;H++)t.outputs[H].toBufferWriter($);_=cf.sha256sha256($.toBuffer())}else(r&31)===Mo.SIGHASH_SINGLE&&i<t.outputs.length&&(t.outputs[i].toBufferWriter($),_=cf.sha256sha256($.toBuffer()));var ee=new k2;ee.writeUInt32LE(t.version),ee.write(u),ee.write(m);var ce=new O2(t.inputs[i].prevTxId).readReverse();return ee.write(ce),ee.writeUInt32LE(t.inputs[i].outputIndex),ee.write(n),ee.write(o),ee.writeUInt32LE(t.inputs[i].sequenceNumber),ee.write(_),ee.writeUInt32LE(t.nLockTime),ee.writeInt32LE(r),cf.sha256sha256(ee.toBuffer())};function dN(e,t,r,i,n,o){let u=Cm(e,r,i,n,o);return N2.sign(u,t).set({nhashtype:r})}function mN(e,t,r,i,n,o){P2.checkArgument(!Mm.isUndefined(e),"Transaction Undefined"),P2.checkArgument(!Mm.isUndefined(t)&&!Mm.isUndefined(t.nhashtype),"Signature Undefined");let u=Cm(e,t.nhashtype,i,n,o);return N2.verify(u,t,r)}B2.exports={sighash:Cm,sign:dN,verify:mN}});var Lm=X((ND,M2)=>{var vN=require("crypto"),Xs=xt(),Vp=Rr(),Co=Zr(),Lo=qa(),zp=Zs(),ff=function e(){return this instanceof e?this:new e};ff.prototype.set=function(){};ff.sign=function(e,t,r){if(e=Buffer.isBuffer(e)?e:e.toBuffer(),e.length!==32)throw new Error("Private key should be 32 bytes for schnorr signatures");typeof t=="string"&&(Xs.checkArgument(Vp.isHexaString(t),"Schnorr message string is not hex"),t=Buffer.from(t,"hex")),Xs.checkArgument(Xs.isType(t,"Buffer"),"Schnorr message must be a hex string or buffer"),r||(r=vN.randomBytes(32)),typeof r=="string"&&(Xs.checkArgument(Vp.isHexaString(r),"Schnorr aux string is not hex"),r=Buffer.from(r,"hex")),Xs.checkArgument(Xs.isType(r,"Buffer"),"Schnorr aux must be a hex string or buffer");let i=Lo.getG(),n=Lo.getN(),o=new Co(e);if(o.eqn(0)||o.gte(n))throw new Error("Invalid private key for schnorr signing");let u=i.mul(o),m=Buffer.from(u.encodeCompressed().slice(1)),_=u.y.isEven()?o:n.sub(o),w=_.xor(new Co(new zp("BIP0340/aux",r).finalize())),I=new zp("BIP0340/nonce",Buffer.concat([w.toBuffer(),m,t])).finalize(),T=new Co(I).mod(n);if(T.eqn(0))throw new Error("Error creating schnorr signature");let N=i.mul(T),C=Buffer.from(N.encodeCompressed().slice(1)),B=N.y.isEven()?T:n.sub(T),U=new Co(new zp("BIP0340/challenge",Buffer.concat([C,m,t])).finalize()).mod(n),Z=Buffer.concat([C,B.add(U.mul(_)).mod(n).toBuffer({size:32})]);if(!ff.verify(m,t,Z))throw new Error("Error creating schnorr signature. Verification failed");return Z};ff.verify=function(e,t,r){if(Xs.isType(e,"PublicKey")&&(e=e.point.x.toBuffer()),e.length!==32)throw new Error("Public key should be 32 bytes for schnorr signatures");if(typeof t=="string"&&(Xs.checkArgument(Vp.isHexaString(t),"Schnorr message string is not hex"),t=Buffer.from(t,"hex")),t.length!==32)throw new Error("Message should be a 32 byte buffer");if(typeof r=="string"&&(Xs.checkArgument(Vp.isHexaString(r),"Schnorr signature string is not hex"),r=Buffer.from(r,"hex")),typeof r.toBuffer=="function"&&(r=r.toBuffer(),r.length===65&&(r=r.slice(0,64))),r.length!==64)throw new Error("Signature should be a 64 byte buffer. Got "+r.length+" bytes");try{let i=Lo.getP(),n=Lo.getN(),o=Lo.fromX(!1,e).liftX(),u=new Co(r.slice(0,32)),m=new Co(r.slice(32,64));if(u.gte(i)||m.gte(n))return!1;let _=gN(u,o,t),I=Lo.getG().mul(m).add(o.mul(_).neg());return!(I.inf||!I.y.isEven()||!I.x.eq(u))}catch{return!1}};var gN=function(e,t,r){let i=Lo.getN(),n=new zp("BIP0340/challenge",Buffer.concat([e.toBuffer({size:32}),t.x.toBuffer({size:32}),r])).finalize();return new Co(n).mod(i)};M2.exports=ff});var jp=X((MD,D2)=>{"use strict";var _i=li(),Uo=ti(),eu=Lr(),C2=Lm(),Do=xt(),xN=Zs(),BD=Wa();function L2(e,t,r,i,n){let o,u;switch(i){case _i.Version.TAPROOT:o=0;break;case _i.Version.TAPSCRIPT:o=1,u=0;break;default:return!1}Do.checkArgument(r<e.inputs.length,"inputNumber is greater than number of inputs");let m=xN.TAPSIGHASH;m.writeUInt8(0);let _=t==_i.SIGHASH_DEFAULT?_i.SIGHASH_ALL:t&_i.SIGHASH_OUTPUT_MASK,w=t&_i.SIGHASH_INPUT_MASK;if(!(t<=3||t>=129&&t<=131))return!1;if(m.writeUInt8(t),m.writeInt32LE(e.version),m.writeUInt32LE(e.nLockTime),w!==_i.SIGHASH_ANYONECANPAY){let T=new Uo,N=new Uo,C=new Uo,B=new Uo;for(let ee of e.inputs){T.writeReverse(ee.prevTxId),T.writeInt32LE(ee.outputIndex),N.writeUInt64LEBN(ee.output._satoshisBN);let ce=ee.output.script.toBuffer();C.writeUInt8(ce.length),C.write(ce),B.writeUInt32LE(ee.sequenceNumber)}let U=eu.sha256(T.toBuffer());m.write(U);let Z=eu.sha256(N.toBuffer());m.write(Z);let $=eu.sha256(C.toBuffer());m.write($);let H=eu.sha256(B.toBuffer());m.write(H)}if(_===_i.SIGHASH_ALL){let T=new Uo;for(let C of e.outputs)T.write(C.toBufferWriter().toBuffer());let N=eu.sha256(T.toBuffer());m.write(N)}Do.checkArgument(n.annexInit,"missing or invalid annexInit");let I=(o<<1)+(n.annexPresent?1:0);if(m.writeUInt8(I),w===_i.SIGHASH_ANYONECANPAY){let T=new Uo;T.writeReverse(e.inputs[r].prevTxId),T.writeInt32LE(e.inputs[r].outputIndex),m.write(T.toBuffer()),m.write(e.inputs[r].output.toBufferWriter().toBuffer()),m.writeUInt32LE(e.inputs[r].sequenceNumber)}else m.writeUInt32LE(r);if(n.annexPresent&&m.write(n.annexHash),_===_i.SIGHASH_SINGLE){if(r>=e.outputs.length)return!1;let T=new Uo;T.writeUInt64LEBN(e.outputs[r]._satoshisBN);let N=e.outputs[r].script.toBuffer();T.writeVarintNum(N.length),T.write(N),m.write(eu.sha256(T.toBuffer()))}return i==_i.Version.TAPSCRIPT&&(Do.checkArgument(n.tapleafHashInit,"missing or invalid tapleafHashInit"),m.write(n.tapleafHash),m.writeUInt8(u),Do.checkArgument(n.codeseparatorPosInit,"missing or invalid codeseparatorPosInit"),m.writeUInt32LE(n.codeseparatorPos)),m.finalize()}function U2(e,t){let r={annexInit:!0,annexPresent:!1};if(e===_i.Version.TAPSCRIPT){if(r.codeseparatorPosInit=!0,r.codeseparatorPos=4294967295,!t)return!1;r.tapleafHashInit=!0,r.tapleafHash=t}return r}function bN(e,t,r,i,n,o){Do.checkArgument(n===_i.Version.TAPROOT||n===_i.Version.TAPSCRIPT,"Invalid sigversion");let u=U2(n,o),m=L2(e,r,i,n,u);if(!m)return!1;let _=C2.sign(t,m);return r!==_i.SIGHASH_DEFAULT?Buffer.concat([_,Buffer.from([r])]):_}function _N(e,t,r,i,n,o){Do.checkArgument(e!=null,"Transaction Undefined"),(!o||Buffer.isBuffer(o))&&(o=U2(i,o)),Do.checkArgument(o.annexInit,"invalid execdata");let u=L2(e,t.nhashtype,n,i,o);return u?C2.verify(r,u,t):!1}D2.exports={sign:bN,verify:_N}});var F2=X((CD,q2)=>{q2.exports=function(e,t){if(typeof e.compare=="function")return e.compare(t);if(e===t)return 0;for(var r=e.length,i=t.length,n=0,o=Math.min(r,i);n<o&&e[n]===t[n];)++n;return n!==o&&(r=e[n],i=t[n]),r<i?-1:i<r?1:0}});var hs=X((LD,j2)=>{"use strict";var Wp=yt(),Um=Zr(),H2=Yt(),Dm=Rr(),z2=ti(),qm=ki(),tu=xt(),yN=ji(),V2=Hm(),Fm=Zs(),wN=9007199254740991;function kr(e){if(!(this instanceof kr))return new kr(e);if(Wp.isObject(e)){if(this.satoshis=e.satoshis,H2.isBuffer(e.script))this.setScriptFromBuffer(e.script);else{var t;Wp.isString(e.script)&&Dm.isHexa(e.script)?t=Buffer.from(e.script,"hex"):t=e.script,this.setScript(t)}e.type==="taproot"&&(this.branch=[],Object.defineProperty(this,"isValid",{configurable:!1,enumerable:!1,get:function(){this._isValid||this._branch.length},set:function(r){this._isValid=r}}),Object.defineProperty(this,"isComplete",{configurable:!1,enumerable:!1,get:function(){return this.isValid&&(this._branch.length===0||this._branch.length===1&&!!this._branch[0])}}))}else throw new TypeError("Unrecognized argument for Output")}Object.defineProperty(kr.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this._script?this._script:(this.setScriptFromBuffer(this._scriptBuffer),this._script)}});Object.defineProperty(kr.prototype,"satoshis",{configurable:!1,enumerable:!0,get:function(){return this._satoshis},set:function(e){e instanceof Um?(this._satoshisBN=e,this._satoshis=e.toNumber()):Wp.isString(e)?(this._satoshis=parseInt(e),this._satoshisBN=Um.fromNumber(this._satoshis)):(tu.checkArgument(Dm.isNaturalNumber(e),"Output satoshis is not a natural number"),this._satoshisBN=Um.fromNumber(e),this._satoshis=e),tu.checkState(Dm.isNaturalNumber(this._satoshis),"Output satoshis is not a natural number")}});kr.prototype.invalidSatoshis=function(){return this._satoshis>wN?"transaction txout satoshis greater than max safe integer":this._satoshis!==this._satoshisBN.toNumber()?"transaction txout satoshis has corrupted value":this._satoshis<0?"transaction txout negative":!1};kr.prototype.toObject=kr.prototype.toJSON=function(){var t={satoshis:this.satoshis};return t.script=this._scriptBuffer.toString("hex"),t};kr.fromObject=function(e){return new kr(e)};kr.prototype.setScriptFromBuffer=function(e){this._scriptBuffer=e;try{this._script=qm.fromBuffer(this._scriptBuffer),this._script._isOutput=!0}catch(t){if(t instanceof yN.Script.InvalidBuffer)this._script=null;else throw t}};kr.prototype.setScript=function(e){if(e instanceof qm)this._scriptBuffer=e.toBuffer(),this._script=e,this._script._isOutput=!0;else if(Wp.isString(e))this._script=qm.fromString(e),this._scriptBuffer=this._script.toBuffer(),this._script._isOutput=!0;else if(H2.isBuffer(e))this.setScriptFromBuffer(e);else throw new TypeError("Invalid argument type: script");return this};kr.prototype.inspect=function(){var e;return this.script?e=this.script.inspect():e=this._scriptBuffer.toString("hex"),"<Output ("+this.satoshis+" sats) "+e+">"};kr.fromBufferReader=function(e){var t={};t.satoshis=e.readUInt64LEBN();var r=e.readVarintNum();return r!==0?t.script=e.read(r):t.script=Buffer.from([]),new kr(t)};kr.prototype.toBufferWriter=function(e){e||(e=new z2),e.writeUInt64LEBN(this._satoshisBN);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e};kr.prototype.calculateSize=function(){let e=8;return e+=z2.varintBufNum(this._scriptBuffer.length).length,e+=this._scriptBuffer.length,e};kr.prototype.add=function(e,t,r,i=!0){if(tu.checkArgument((r&~V2.TAPROOT_LEAF_MASK)===0,"invalid leafVersion"),!this.isValid)return;let n={hash:Fm.TAPLEAF.writeUInt8(r).write(t.toBuffer()).finalize(),leaves:[]};if(i){let o={script:t,leafVersion:r,merkleBranch:[]};n.leaves.push(o)}return this._insertNode(n,e),this};kr.prototype._insertNode=function(e,t){if(tu.checkArgument(t>=0&&t<=V2.TAPROOT_CONTROL_MAX_NODE_COUNT,"invalid depth"),t+1<this._branch.length){this.isValid=!1;return}for(;this.isValid&&this._branch.length>t&&this._branch[t];)e=this._combineNodes(e,this._branch[t]),this._branch=this._branch.slice(0,this._branch.length-2),t==0&&(this.isValid=!1),t--;this.isValid&&(this._branch.length<=t&&(this._branch=this._branch.slice(0,t+1)),tu.checkState(!this._nodes[t]),m_branch[t]=e)};kr.prototype._combineNodes=function(e,t){let r={hash:null,leaves:[]};for(let i of e.leaves)i.merkleBranch.push(t.hash),r.leaves.push(i);for(let i of t.leaves)i.merkleBranch.push(e.hash),r.leaves.push(i);return e.hash.compare(t.hash)===-1?r.hash=Fm.TAPBRANCH.write(e.hash).write(t.hash).finalize():r.hash=Fm.TAPBRANCH.write(t.hash).write(e.hash).finalize(),r};kr.prototype.finalize=function(e){tu.checkState(this.isComplete===!0,"finalize can only be called when isComplete is true");let t=e.createTapTweak(this._branch.length===0?null:this._branch[0].hash)};j2.exports=kr});var ru=X((DD,$2)=>{"use strict";var Kp=yt(),lf=xt(),qo=ji(),W2=ti(),UD=require("buffer"),SN=Yt(),K2=Rr(),zm=ki(),EN=Js(),Vm=hs(),Gp=4294967295,G2=Gp,IN=Gp-1,TN=Gp-2,RN=Math.pow(2,31),Km=Math.pow(2,22),jm=65535,Wm=512,AN=Math.pow(2,16)-1;function bt(e){if(!(this instanceof bt))return new bt(e);if(e)return this._fromObject(e)}bt.MAXINT=Gp;bt.DEFAULT_SEQNUMBER=G2;bt.DEFAULT_LOCKTIME_SEQNUMBER=IN;bt.DEFAULT_RBF_SEQNUMBER=TN;bt.SEQUENCE_LOCKTIME_TYPE_FLAG=Km;Object.defineProperty(bt.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this.isNull()?null:(this._script||(this._script=new zm(this._scriptBuffer),this._script._isInput=!0),this._script)}});bt.fromObject=function(e){lf.checkArgument(Kp.isObject(e));var t=new bt;return t._fromObject(e)};bt.prototype._fromObject=function(e){var t;if(typeof e.prevTxId=="string"&&K2.isHexa(e.prevTxId)?t=Buffer.from(e.prevTxId,"hex"):t=e.prevTxId,this.witnesses=[],this.output=e.output?e.output instanceof Vm?e.output:new Vm(e.output):void 0,this.prevTxId=t||e.txidbuf,this.outputIndex=e.outputIndex==null?e.txoutnum:e.outputIndex,this.sequenceNumber=e.sequenceNumber==null?e.seqnum==null?G2:e.seqnum:e.sequenceNumber,e.script===void 0&&e.scriptBuffer===void 0)throw new qo.Transaction.Input.MissingScript;return this.setScript(e.scriptBuffer||e.script),this};bt.prototype.toObject=bt.prototype.toJSON=function(){var t={prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,sequenceNumber:this.sequenceNumber,script:this._scriptBuffer.toString("hex")};return this.script&&(t.scriptString=this.script.toString()),this.output&&(t.output=this.output.toObject()),t};bt.fromBufferReader=function(e){var t=new bt;return t.prevTxId=e.readReverse(32),t.outputIndex=e.readUInt32LE(),t._scriptBuffer=e.readVarLengthBuffer(),t.sequenceNumber=e.readUInt32LE(),t};bt.prototype.toBufferWriter=function(e){e||(e=new W2),e.writeReverse(this.prevTxId),e.writeUInt32LE(this.outputIndex);var t=this._scriptBuffer;return e.writeVarintNum(t.length),e.write(t),e.writeUInt32LE(this.sequenceNumber),e};bt.prototype.setScript=function(e){if(this._script=null,e instanceof zm)this._script=e,this._script._isInput=!0,this._scriptBuffer=e.toBuffer();else if(K2.isHexa(e))this._scriptBuffer=Buffer.from(e,"hex");else if(Kp.isString(e))this._script=new zm(e),this._script._isInput=!0,this._scriptBuffer=this._script.toBuffer();else if(SN.isBuffer(e))this._scriptBuffer=Buffer.from(e);else throw new TypeError("Invalid argument type: script");return this};bt.prototype.getSignatures=function(){throw new qo.AbstractMethodInvoked("Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported) for input: "+JSON.stringify(this))};bt.prototype.getSatoshisBuffer=function(){return lf.checkState(this.output instanceof Vm),lf.checkState(this.output._satoshisBN),new W2().writeUInt64LEBN(this.output._satoshisBN).toBuffer()};bt.prototype.isFullySigned=function(){throw new qo.AbstractMethodInvoked("Input#isFullySigned")};bt.prototype.isFinal=function(){return this.sequenceNumber!==bt.MAXINT};bt.prototype.addSignature=function(){throw new qo.AbstractMethodInvoked("Input#addSignature")};bt.prototype.clearSignatures=function(){throw new qo.AbstractMethodInvoked("Input#clearSignatures")};bt.prototype.hasWitnesses=function(){return!!(this.witnesses&&this.witnesses.length>0)};bt.prototype.getWitnesses=function(){return this.witnesses};bt.prototype.setWitnesses=function(e){this.witnesses=e};bt.prototype.isValidSignature=function(e,t,r){return r=r||"ecdsa",t.signature.nhashtype=t.sigtype,EN.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script)};bt.prototype.isNull=function(){return this.prevTxId.toString("hex")==="0000000000000000000000000000000000000000000000000000000000000000"&&this.outputIndex===4294967295};bt.prototype._estimateSize=function(){return this.toBufferWriter().toBuffer().length};bt.prototype._getBaseSize=function(){return 40};bt.prototype.lockForSeconds=function(e){if(lf.checkArgument(Kp.isNumber(e)),e<0||e>=Wm*jm)throw new qo.Transaction.Input.LockTimeRange;return e=parseInt(Math.floor(e/Wm)),this.sequenceNumber=e|Km,this};bt.prototype.lockUntilBlockHeight=function(e){if(lf.checkArgument(Kp.isNumber(e)),e<0||e>=AN)throw new qo.Transaction.Input.BlockHeightOutOfRange;return this.sequenceNumber=e,this};bt.prototype.getLockTime=function(){if(this.sequenceNumber&RN)return null;if(this.sequenceNumber&Km){var e=Wm*(this.sequenceNumber&jm);return e}else{var t=this.sequenceNumber&jm;return t}};$2.exports=bt});var Fo=X((qD,X2)=>{"use strict";var hn=xt(),ON=Va(),$p=Yt(),Y2=Rr(),Z2=Cn(),kN=ji(),pf=li();function Ln(e){if(!(this instanceof Ln))return new Ln(e);if(e instanceof Ln)return e;if(e&&typeof e=="object")return this._fromObject(e);throw new kN.InvalidArgument("TransactionSignatures must be instantiated from an object")}ON(Ln,pf);Ln.prototype._fromObject=function(e){return this._checkObjectArgs(e),this.publicKey=new Z2(e.publicKey),this.prevTxId=$p.isBuffer(e.prevTxId)?e.prevTxId:Buffer.from(e.prevTxId,"hex"),this.outputIndex=e.outputIndex,this.inputIndex=e.inputIndex,this.signature=e.signature instanceof pf?e.signature:$p.isBuffer(e.signature)?pf.fromBuffer(e.signature):pf.fromString(e.signature),this.sigtype=e.sigtype,this};Ln.prototype._checkObjectArgs=function(e){hn.checkArgument(Z2(e.publicKey),"invalid publicKey"),hn.checkArgument(e.inputIndex!=null,"missing inputIndex"),hn.checkArgument(e.outputIndex!=null,"missing outputIndex"),hn.checkState(!isNaN(e.inputIndex),"inputIndex must be a number"),hn.checkState(!isNaN(e.outputIndex),"outputIndex must be a number"),hn.checkArgument(e.signature,"missing signature"),hn.checkArgument(e.prevTxId,"missing prevTxId"),hn.checkState(e.signature instanceof pf||$p.isBuffer(e.signature)||Y2.isHexa(e.signature),"signature must be a buffer or hexa value"),hn.checkState($p.isBuffer(e.prevTxId)||Y2.isHexa(e.prevTxId),"prevTxId must be a buffer or hexa value"),hn.checkArgument(e.sigtype!=null,"missing sigtype"),hn.checkState(!isNaN(e.sigtype),"sigtype must be a number")};Ln.prototype.toObject=Ln.prototype.toJSON=function(){return{publicKey:this.publicKey.toString(),prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,inputIndex:this.inputIndex,signature:this.signature.toString(),sigtype:this.sigtype}};Ln.fromObject=function(e){return hn.checkArgument(e),new Ln(e)};X2.exports=Ln});var rw=X((HD,tw)=>{"use strict";var PN=Va(),J2=xt(),FD=Yt(),Q2=ru(),NN=hs(),BN=Js(),ew=ki(),MN=li(),CN=Fo();function Qs(){Q2.apply(this,arguments)}PN(Qs,Q2);Qs.prototype.getSignatures=function(e,t,r,i,n,o){J2.checkState(this.output instanceof NN),i=i||MN.SIGHASH_ALL,o=o||"ecdsa";var u=t.toPublicKey();return u.toString()===this.output.script.getPublicKey().toString("hex")?[new CN({publicKey:u,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:BN.sign(e,t,i,r,this.output.script),sigtype:i})]:[]};Qs.prototype.addSignature=function(e,t,r){return J2.checkState(this.isValidSignature(e,t,r),"Signature is invalid"),this.setScript(ew.buildPublicKeyIn(t.signature.toDER(),t.sigtype)),this};Qs.prototype.clearSignatures=function(){return this.setScript(ew.empty()),this};Qs.prototype.isFullySigned=function(){return this.script.isPublicKeyIn()};Qs.SCRIPT_MAX_SIZE=73;Qs.prototype._estimateSize=function(){return this._getBaseSize()+Qs.SCRIPT_MAX_SIZE};tw.exports=Qs});var $m=X((VD,aw)=>{"use strict";var LN=Va(),iw=xt(),Yp=Yt(),zD=Mn(),UN=Lr(),nw=ru(),DN=hs(),sw=Js(),Gm=Qc(),qN=ti(),Yp=Yt(),iu=ki(),FN=li(),HN=Fo();function pi(){nw.apply(this,arguments)}LN(pi,nw);pi.prototype.getRedeemScript=function(e){if(!this.redeemScript){var t=iu.buildWitnessV0Out(e);if(iu.buildScriptHashOut(t).equals(this.output.script)){var r=new iu;r.add(t.toBuffer()),this.setScript(r),this.redeemScript=t}}return this.redeemScript};pi.prototype.getScriptCode=function(e){var t=new qN,r;this.output.script.isScriptHashOut()?r=this.getRedeemScript(e):r=this.output.script;var i=iu.buildPublicKeyHashOut(r.toAddress()).toBuffer();return t.writeVarintNum(i.length),t.write(i),t.toBuffer()};pi.prototype.getSighash=function(e,t,r,i){var n=this.getScriptCode(t),o=this.getSatoshisBuffer();return Gm.sighash(e,i,r,n,o)};pi.prototype.getSignatures=function(e,t,r,i,n,o,u){iw.checkState(this.output instanceof DN),n=n||UN.sha256ripemd160(t.publicKey.toBuffer()),i=i||FN.SIGHASH_ALL,o=o||"ecdsa";var m;if(this.output.script.isScriptHashOut()?m=this.getRedeemScript(t.publicKey):m=this.output.script,m&&Yp.equals(n,m.getPublicKeyHash())){var _;if(m.isWitnessPublicKeyHashOut()){var w=this.getSatoshisBuffer(),I=this.getScriptCode(t.publicKey);_=Gm.sign(e,t,i,r,I,w)}else _=sw.sign(e,t,i,r,this.output.script);return[new HN({publicKey:t.publicKey,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:_,sigtype:i})]}return[]};pi.prototype.addSignature=function(e,t,r){return iw.checkState(this.isValidSignature(e,t,r),"Signature is invalid"),this.output.script.isWitnessPublicKeyHashOut()||this.output.script.isScriptHashOut()?this.setWitnesses([Yp.concat([t.signature.toDER(),Yp.integerAsSingleByteBuffer(t.sigtype)]),t.publicKey.toBuffer()]):this.setScript(iu.buildPublicKeyHashIn(t.publicKey,t.signature.toDER(),t.sigtype)),this};pi.prototype.clearSignatures=function(){return this.setScript(iu.empty()),this.setWitnesses([]),this};pi.prototype.isFullySigned=function(){return this.script.isPublicKeyHashIn()||this.hasWitnesses()};pi.prototype.isValidSignature=function(e,t,r){if(r=r||"ecdsa",t.signature.nhashtype=t.sigtype,this.output.script.isWitnessPublicKeyHashOut()||this.output.script.isScriptHashOut()){var i=this.getScriptCode(),n=this.getSatoshisBuffer();return Gm.verify(e,t.signature,t.publicKey,t.inputIndex,i,n)}else return sw.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script)};pi.SCRIPT_MAX_SIZE=107;pi.REDEEM_SCRIPT_SIZE=23;pi.prototype._estimateSize=function(){let e=this._getBaseSize();e+=1;let r=pi.SCRIPT_MAX_SIZE/4;return this.output.script.isWitnessPublicKeyHashOut()?e+=r:this.output.script.isScriptHashOut()?e+=r+pi.REDEEM_SCRIPT_SIZE:e+=pi.SCRIPT_MAX_SIZE,e};aw.exports=pi});var fw=X((KD,uw)=>{"use strict";var Un=yt(),zN=Va(),jD=Zp(),Zm=ru(),VN=hs(),hf=xt(),cw=ki(),Ym=li(),Xm=Js(),WD=Cn(),ow=Yt(),Jm=Fo();function Pr(e,t,r,i,n){n=n||{},Zm.apply(this,arguments);var o=this;t=t||e.publicKeys,r=r||e.threshold,i=i||e.signatures,n.noSorting?this.publicKeys=t:this.publicKeys=Un.sortBy(t,function(u){return u.toString("hex")}),hf.checkState(cw.buildMultisigOut(this.publicKeys,r).equals(this.output.script),"Provided public keys don't match to the provided output script"),this.publicKeyIndex={},Un.each(this.publicKeys,function(u,m){o.publicKeyIndex[u.toString()]=m}),this.threshold=r,this.signatures=i?this._deserializeSignatures(i):new Array(this.publicKeys.length)}zN(Pr,Zm);Pr.prototype.toObject=function(){var e=Zm.prototype.toObject.apply(this,arguments);return e.threshold=this.threshold,e.publicKeys=Un.map(this.publicKeys,function(t){return t.toString()}),e.signatures=this._serializeSignatures(),e};Pr.prototype._deserializeSignatures=function(e){return Un.map(e,function(t){if(t)return new Jm(t)})};Pr.prototype._serializeSignatures=function(){return Un.map(this.signatures,function(e){if(e)return e.toObject()})};Pr.prototype.getSignatures=function(e,t,r,i,n,o,u){hf.checkState(this.output instanceof VN),i=i||Ym.SIGHASH_ALL,o=o||"ecdsa";let m=[];for(let _ of this.publicKeys||[])_.toString()===t.publicKey.toString()&&m.push(new Jm({publicKey:t.publicKey,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:Xm.sign(e,t,i,r,this.output.script),sigtype:i}));return m};Pr.prototype.addSignature=function(e,t,r){return hf.checkState(!this.isFullySigned(),"All needed signatures have already been added"),hf.checkArgument(!Un.isUndefined(this.publicKeyIndex[t.publicKey.toString()],"Signature Undefined"),"Signature has no matching public key"),hf.checkState(this.isValidSignature(e,t,r),"Invalid Signature"),this.signatures[this.publicKeyIndex[t.publicKey.toString()]]=t,this._updateScript(),this};Pr.prototype._updateScript=function(){return this.setScript(cw.buildMultisigIn(this.publicKeys,this.threshold,this._createSignatures())),this};Pr.prototype._createSignatures=function(){return Un.map(Un.filter(this.signatures,function(e){return!Un.isUndefined(e)}),function(e){return ow.concat([e.signature.toDER(),ow.integerAsSingleByteBuffer(e.sigtype)])})};Pr.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()};Pr.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold};Pr.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()};Pr.prototype.countSignatures=function(){return Un.reduce(this.signatures,function(e,t){return e+!!t},0)};Pr.prototype.publicKeysWithoutSignature=function(){var e=this;return Un.filter(this.publicKeys,function(t){return!e.signatures[e.publicKeyIndex[t.toString()]]})};Pr.prototype.isValidSignature=function(e,t,r){return r=r||"ecdsa",t.signature.nhashtype=t.sigtype,Xm.verify(e,t.signature,t.publicKey,t.inputIndex,this.output.script)};Pr.normalizeSignatures=function(e,t,r,i,n,o){return o=o||"ecdsa",n.map(function(u){var m=null;return i=i.filter(function(_){if(m)return!0;var w=new Jm({signature:Ym.fromTxFormat(_),publicKey:u,prevTxId:t.prevTxId,outputIndex:t.outputIndex,inputIndex:r,sigtype:Ym.SIGHASH_ALL});w.signature.nhashtype=w.sigtype;var I=Xm.verify(e,w.signature,w.publicKey,w.inputIndex,t.output.script);return I?(m=w,!1):!0}),m||null})};Pr.OPCODES_SIZE=1;Pr.SIGNATURE_SIZE=73;Pr.prototype._estimateSize=function(){return this._getBaseSize()+Pr.OPCODES_SIZE+this.threshold*Pr.SIGNATURE_SIZE};uw.exports=Pr});var dw=X((GD,hw)=>{"use strict";var jN=yt(),WN=Va(),Qm=ru(),KN=hs(),Xp=xt(),Ka=Mn(),nu=ki(),GN=li(),ev=Js(),tv=Qc(),$N=ti(),lw=Yt(),pw=Fo();function Jt(e,t,r,i,n){n=n||{},Qm.apply(this,arguments),t=t||e.publicKeys,r=r||e.threshold,i=i||e.signatures,n.noSorting?this.publicKeys=t:this.publicKeys=jN.sortBy(t,function(m){return m.toString("hex")}),this.redeemScript=nu.buildMultisigOut(this.publicKeys,r,n);var o=nu.buildWitnessMultisigOutFromScript(this.redeemScript);if(o.equals(this.output.script))this.nestedWitness=!1,this.type=Ka.PayToWitnessScriptHash;else if(nu.buildScriptHashOut(o).equals(this.output.script))this.nestedWitness=!0,this.type=Ka.PayToScriptHash;else if(nu.buildScriptHashOut(this.redeemScript).equals(this.output.script))this.nestedWitness=!1,this.type=Ka.PayToScriptHash;else throw new Error("Provided public keys don't hash to the provided output");if(this.nestedWitness){var u=new nu;u.add(o.toBuffer()),this.setScript(u)}this.publicKeyIndex={};for(let m=0;m<this.publicKeys.length;m++){let _=this.publicKeys[m];this.publicKeyIndex[_.toString()]=m}this.threshold=r,this.signatures=i?this._deserializeSignatures(i):new Array(this.publicKeys.length)}WN(Jt,Qm);Jt.prototype.toObject=function(){var e=Qm.prototype.toObject.apply(this,arguments);return e.threshold=this.threshold,e.publicKeys=this.publicKeys.map(function(t){return t.toString()}),e.signatures=this._serializeSignatures(),e};Jt.prototype._deserializeSignatures=function(e){return e.map(function(t){if(t)return new pw(t)})};Jt.prototype._serializeSignatures=function(){return this.signatures.map(function(e){if(e)return e.toObject()})};Jt.prototype.getScriptCode=function(){var e=new $N;if(this.redeemScript.hasCodeseparators())throw new Error("@TODO");var t=this.redeemScript.toBuffer();return e.writeVarintNum(t.length),e.write(t),e.toBuffer()};Jt.prototype.getSighash=function(e,t,r,i){var n;if(this.nestedWitness||this.type===Ka.PayToWitnessScriptHash){var o=this.getScriptCode(),u=this.getSatoshisBuffer();n=tv.sighash(e,i,r,o,u)}else n=ev.sighash(e,i,r,this.redeemScript);return n};Jt.prototype.getSignatures=function(e,t,r,i,n,o,u){Xp.checkState(this.output instanceof KN),i=i||GN.SIGHASH_ALL,o=o||"ecdsa";let m=[];for(let T of this.publicKeys)if(T.toString()===t.publicKey.toString()){var _;if(this.nestedWitness||this.type===Ka.PayToWitnessScriptHash){var w=this.getScriptCode(),I=this.getSatoshisBuffer();_=tv.sign(e,t,i,r,w,I)}else _=ev.sign(e,t,i,r,this.redeemScript);m.push(new pw({publicKey:t.publicKey,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:r,signature:_,sigtype:i}))}return m};Jt.prototype.addSignature=function(e,t,r){return Xp.checkState(!this.isFullySigned(),"All needed signatures have already been added"),Xp.checkArgument(this.publicKeyIndex[t.publicKey.toString()]!=null,"Signature has no matching public key"),Xp.checkState(this.isValidSignature(e,t,r),"Invalid Signature!"),this.signatures[this.publicKeyIndex[t.publicKey.toString()]]=t,this._updateScript(),this};Jt.prototype._updateScript=function(){if(this.nestedWitness||this.type===Ka.PayToWitnessScriptHash){for(var e=[Buffer.alloc(0)],t=this._createSignatures(),r=0;r<t.length;r++)e.push(t[r]);e.push(this.redeemScript.toBuffer()),this.setWitnesses(e)}else{var i=nu.buildP2SHMultisigIn(this.publicKeys,this.threshold,this._createSignatures(),{cachedMultisig:this.redeemScript});this.setScript(i)}return this};Jt.prototype._createSignatures=function(){return this.signatures.filter(function(e){return e!=null}).map(function(e){return lw.concat([e.signature.toDER(),lw.integerAsSingleByteBuffer(e.sigtype)])})};Jt.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()};Jt.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold};Jt.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()};Jt.prototype.countSignatures=function(){return this.signatures.reduce(function(e,t){return e+!!t},0)};Jt.prototype.publicKeysWithoutSignature=function(){return this.publicKeys.filter(e=>!this.signatures[this.publicKeyIndex[e.toString()]])};Jt.prototype.isValidSignature=function(e,t,r){if(r=r||"ecdsa",this.nestedWitness||this.type===Ka.PayToWitnessScriptHash){t.signature.nhashtype=t.sigtype;var i=this.getScriptCode(),n=this.getSatoshisBuffer();return tv.verify(e,t.signature,t.publicKey,t.inputIndex,i,n)}else return t.signature.nhashtype=t.sigtype,ev.verify(e,t.signature,t.publicKey,t.inputIndex,this.redeemScript)};Jt.MAX_OPCODES_SIZE=8;Jt.MAX_SIGNATURE_SIZE=74;Jt.MAX_PUBKEY_SIZE=34;Jt.REDEEM_SCRIPT_SIZE=34;Jt.prototype._estimateSize=function(){let e=this._getBaseSize(),t=4,r=Jt.MAX_OPCODES_SIZE+this.threshold*Jt.MAX_SIGNATURE_SIZE+this.publicKeys.length*Jt.MAX_PUBKEY_SIZE;return this.type===Ka.PayToWitnessScriptHash?e+=r/t:this.nestedWitness?e+=r/t+Jt.REDEEM_SCRIPT_SIZE:e+=r,e};hw.exports=Jt});var bw=X((YD,xw)=>{var YN=Va(),rv=xt(),mw=$m(),vw=jp(),Jp=li(),ZN=Fo(),gw=hs(),$D=Wa();function ea(){mw.apply(this,arguments)}YN(ea,mw);ea.prototype.getSignatures=function(e,t,r,i,n,o,u){rv.checkState(this.output instanceof gw),i=i||Jp.SIGHASH_DEFAULT;let m=e.inputs.indexOf(this),_=t.createTapTweak(u).tweakedPrivKey,w=vw.sign(e,_,i,m,Jp.Version.TAPROOT,null);if(!w)return[];let I=new ZN({publicKey:t.publicKey,prevTxId:this.prevTxId,outputIndex:this.outputIndex,inputIndex:m,signature:Jp.fromSchnorr(w),sigtype:i});return this.isValidSignature(e,I)?[I]:[]};ea.prototype.isValidSignature=function(e,t){return rv.checkState(e.inputs.indexOf(this)>=0,"Signature has no matching input"),rv.checkState(this.output instanceof gw,"output is not instance of Output"),this.output.script.isTaproot()?vw.verify(e,t.signature,this.output.script.chunks[1].buf,Jp.Version.TAPROOT,e.inputs.indexOf(this),null):!1};ea.prototype.isFullySigned=function(){return this.output.script.isTaproot()&&this.hasWitnesses()};ea.prototype.addSignature=function(e,t){return this.isValidSignature(e,t)&&this.setWitnesses([t.signature.toBuffer()]),this};ea.SCRIPT_MAX_SIZE=66;ea.prototype._estimateSize=function(){let e=this._getBaseSize();e+=1;let r=ea.SCRIPT_MAX_SIZE/4;return e+=r,e};xw.exports=ea});var Qp=X((ZD,Ho)=>{Ho.exports=ru();Ho.exports.PublicKey=rw();Ho.exports.PublicKeyHash=$m();Ho.exports.MultiSig=fw();Ho.exports.MultiSigScriptHash=dw();Ho.exports.Taproot=bw()});var Js=X((XD,ww)=>{"use strict";var df=li(),iv=ki(),XN=hs(),JN=ps(),QN=ti(),e7=Zr(),t7=Lr(),yw=uf(),_w=xt(),nv=yt(),r7="0000000000000000000000000000000000000000000000000000000000000001",i7="ffffffffffffffff",sv=function(t,r,i,n){var o=Zp(),u=Qp();i=parseInt(i);var m,_=o.shallowCopy(t);for(n=new iv(n),n.removeCodeseparators(),m=0;m<_.inputs.length;m++)_.inputs[m]=new u(_.inputs[m]).setScript(iv.empty());if(_.inputs[i]=new u(_.inputs[i]).setScript(n),(r&31)===df.SIGHASH_NONE||(r&31)===df.SIGHASH_SINGLE)for(m=0;m<_.inputs.length;m++)m!==i&&(_.inputs[m].sequenceNumber=0);if((r&31)===df.SIGHASH_NONE)_.outputs=[];else if((r&31)===df.SIGHASH_SINGLE){if(i>=_.outputs.length)return Buffer.from(r7,"hex");for(_.outputs.length=i+1,m=0;m<i;m++)_.outputs[m]=new XN({satoshis:e7.fromBuffer(Buffer.from(i7,"hex")),script:iv.empty()})}r&df.SIGHASH_ANYONECANPAY&&(_.inputs=[_.inputs[i]]);var w=new QN().write(_.toBuffer()).writeInt32LE(r).toBuffer(),I=t7.sha256sha256(w);return I=new JN(I).readReverse(),I};function n7(e,t,r,i,n){let o=sv(e,r,i,n),u=yw.sign(o,t,{endian:"little"});return u.nhashtype=r,u}function s7(e,t,r,i,n){_w.checkArgument(!nv.isUndefined(e),"Transaction Undefined"),_w.checkArgument(!nv.isUndefined(t)&&!nv.isUndefined(t.nhashtype),"Signature Undefined");let o=sv(e,t.nhashtype,i,n);return yw.verify(o,t,r,{endian:"little"})}ww.exports={sighash:sv,sign:n7,verify:s7}});var th=X((JD,Sw)=>{"use strict";var av=yt(),eh=ji(),a7=xt(),zo={BTC:[1e8,8],mBTC:[1e5,5],uBTC:[100,2],bits:[100,2],satoshis:[1,0]};function ot(e,t){if(!(this instanceof ot))return new ot(e,t);if(av.isNumber(t)){if(t<=0)throw new eh.Unit.InvalidRate(t);e=e/t,t=ot.BTC}this._value=this._from(e,t);var r=this,i=function(n){Object.defineProperty(r,n,{get:function(){return r.to(n)},enumerable:!0})};Object.keys(zo).forEach(i)}Object.keys(zo).forEach(function(e){ot[e]=e});ot.fromObject=function(t){return a7.checkArgument(av.isObject(t),"Argument is expected to be an object"),new ot(t.amount,t.code)};ot.fromBTC=function(e){return new ot(e,ot.BTC)};ot.fromMillis=ot.fromMilis=function(e){return new ot(e,ot.mBTC)};ot.fromMicros=ot.fromBits=function(e){return new ot(e,ot.bits)};ot.fromSatoshis=function(e){return new ot(e,ot.satoshis)};ot.fromFiat=function(e,t){return new ot(e,t)};ot.prototype._from=function(e,t){if(!zo[t])throw new eh.Unit.UnknownCode(t);return parseInt((e*zo[t][0]).toFixed())};ot.prototype.to=function(e){if(av.isNumber(e)){if(e<=0)throw new eh.Unit.InvalidRate(e);return parseFloat((this.BTC*e).toFixed(2))}if(!zo[e])throw new eh.Unit.UnknownCode(e);var t=this._value/zo[e][0];return parseFloat(t.toFixed(zo[e][1]))};ot.prototype.toBTC=function(){return this.to(ot.BTC)};ot.prototype.toMillis=ot.prototype.toMilis=function(){return this.to(ot.mBTC)};ot.prototype.toMicros=ot.prototype.toBits=function(){return this.to(ot.bits)};ot.prototype.toSatoshis=function(){return this.to(ot.satoshis)};ot.prototype.atRate=function(e){return this.to(e)};ot.prototype.toString=function(){return this.satoshis+" satoshis"};ot.prototype.toObject=ot.prototype.toJSON=function(){return{amount:this.BTC,code:ot.BTC}};ot.prototype.inspect=function(){return"<Unit: "+this.toString()+">"};Sw.exports=ot});var ov=X((QD,Tw)=>{"use strict";var ta=yt(),rh=xt(),Ew=Rr(),o7=ki(),c7=Mn(),Iw=th();function ra(e){if(!(this instanceof ra))return new ra(e);rh.checkArgument(ta.isObject(e),"Must provide an object from where to extract data");var t=e.address?new c7(e.address):void 0,r=e.txid?e.txid:e.txId;if(!r||!Ew.isHexaString(r)||r.length>64)throw new Error("Invalid TXID in object",e);var i=ta.isUndefined(e.vout)?e.outputIndex:e.vout;if(!ta.isNumber(i))throw new Error("Invalid outputIndex, received "+i);rh.checkArgument(!ta.isUndefined(e.scriptPubKey)||!ta.isUndefined(e.script),"Must provide the scriptPubKey for that output!");var n=new o7(e.scriptPubKey||e.script);rh.checkArgument(!ta.isUndefined(e.amount)||!ta.isUndefined(e.satoshis),"Must provide an amount for the output");var o=ta.isUndefined(e.amount)?e.satoshis:new Iw.fromBTC(e.amount).toSatoshis();rh.checkArgument(ta.isNumber(o),"Amount must be a number"),Ew.defineImmutable(this,{address:t,txId:r,outputIndex:i,script:n,satoshis:o})}ra.prototype.inspect=function(){return"<UnspentOutput: "+this.txId+":"+this.outputIndex+", satoshis: "+this.satoshis+", address: "+this.address+">"};ra.prototype.toString=function(){return this.txId+":"+this.outputIndex};ra.fromObject=function(e){return new ra(e)};ra.prototype.toObject=ra.prototype.toJSON=function(){return{address:this.address?this.address.toString():void 0,txid:this.txId,vout:this.outputIndex,scriptPubKey:this.script.toBuffer().toString("hex"),amount:Iw.fromSatoshis(this.satoshis).toBTC()}};Tw.exports=ra});var Zp=X((eq,Pw)=>{"use strict";var $a=yt(),vr=xt(),u7=require("buffer"),Rw=Buffer.compare||F2(),jr=ji(),f7=Yt(),nh=Rr(),cv=ps(),au=ti(),uv=Lr(),su=li(),l7=Js(),p7=Qc(),h7=jp(),d7=Mn(),Aw=ov(),wr=Qp(),m7=wr.PublicKeyHash,v7=wr.PublicKey,g7=wr.MultiSigScriptHash,x7=wr.MultiSig,b7=wr.Taproot,Ya=hs(),Ga=ki(),_7=Wa(),ih=Zr();function ie(e,t){if(!(this instanceof ie))return new ie(e);if(this.inputs=[],this.outputs=[],this._inputAmount=void 0,this._outputAmount=void 0,e){if(e instanceof ie)return ie.shallowCopy(e);if(nh.isHexa(e))this.fromString(e);else if(f7.isBuffer(e))this.fromBuffer(e);else if($a.isObject(e))this.fromObject(e,t);else throw new jr.InvalidArgument("Must provide an object or string to deserialize a transaction")}else this._newTransaction()}var Ow=2,y7=0,w7=1e6;ie.DUST_AMOUNT=546;ie.FEE_SECURITY_MARGIN=150;ie.MAX_MONEY=21e6*1e8;ie.NLOCKTIME_BLOCKHEIGHT_LIMIT=5e8;ie.NLOCKTIME_MAX_VALUE=4294967295;ie.FEE_PER_KB=1e5;ie.CHANGE_OUTPUT_MAX_SIZE=62;ie.MAXIMUM_EXTRA_SIZE=26;ie.shallowCopy=function(e){var t=new ie(e.toBuffer());return t};var kw={configurable:!1,enumerable:!0,get:function(){return this._hash=new cv(this._getHash()).readReverse().toString("hex"),this._hash}},S7={configurable:!1,enumerable:!0,get:function(){return new cv(this._getWitnessHash()).readReverse().toString("hex")}};Object.defineProperty(ie.prototype,"witnessHash",S7);Object.defineProperty(ie.prototype,"hash",kw);Object.defineProperty(ie.prototype,"id",kw);var fv={configurable:!1,enumerable:!0,get:function(){return this._getInputAmount()}};Object.defineProperty(ie.prototype,"inputAmount",fv);fv.get=function(){return this._getOutputAmount()};Object.defineProperty(ie.prototype,"outputAmount",fv);Object.defineProperty(ie.prototype,"size",{configurable:!1,enumerable:!1,get:function(){return this._calculateSize()}});Object.defineProperty(ie.prototype,"vsize",{configurable:!1,enumerable:!1,get:function(){return this._calculateVSize()}});Object.defineProperty(ie.prototype,"weight",{configurable:!1,enumerable:!1,get:function(){return this._calculateWeight()}});ie.prototype._getHash=function(){return uv.sha256sha256(this.toBuffer(!0))};ie.prototype._getWitnessHash=function(){return uv.sha256sha256(this.toBuffer(!1))};ie.prototype.serialize=function(e){return e===!0||e&&e.disableAll?this.uncheckedSerialize():this.checkedSerialize(e)};ie.prototype.uncheckedSerialize=ie.prototype.toString=function(){return this.toBuffer().toString("hex")};ie.prototype.checkedSerialize=function(e){var t=this.getSerializationError(e);if(t)throw t.message+=" - For more information please see: https://github.com/bitpay/bitcore/blob/master/packages/bitcore-lib/docs/transaction.md#serialization-checks",t;return this.uncheckedSerialize()};ie.prototype.invalidSatoshis=function(){for(var e=!1,t=0;t<this.outputs.length;t++)this.outputs[t].invalidSatoshis()&&(e=!0);return e};ie.prototype.getSerializationError=function(e){if(e=e||{},this.invalidSatoshis())return new jr.Transaction.InvalidSatoshis;var t=this._getUnspentValue(),r;return t<0?e.disableMoreOutputThanInput||(r=new jr.Transaction.InvalidOutputAmountSum):r=this._hasFeeError(e,t),r||this._hasDustOutputs(e)||this._isMissingSignatures(e)};ie.prototype._hasFeeError=function(e,t){if(this._fee!=null&&this._fee!==t)return new jr.Transaction.FeeError.Different("Unspent value is "+t+" but specified fee is "+this._fee);if(!e.disableLargeFees){var r=Math.floor(ie.FEE_SECURITY_MARGIN*this._estimateFee());if(t>r)return this._missingChange()?new jr.Transaction.ChangeAddressMissing("Fee is too large and no change address was provided"):new jr.Transaction.FeeError.TooLarge("expected less than "+r+" but got "+t)}if(!e.disableSmallFees){var i=Math.ceil(this._estimateFee()/ie.FEE_SECURITY_MARGIN);if(t<i)return new jr.Transaction.FeeError.TooSmall("expected more than "+i+" but got "+t)}};ie.prototype._missingChange=function(){return!this._changeScript};ie.prototype._hasDustOutputs=function(e){if(!e.disableDustOutputs){var t,r;for(t in this.outputs)if(r=this.outputs[t],r.satoshis<ie.DUST_AMOUNT&&!r.script.isDataOut())return new jr.Transaction.DustOutputs}};ie.prototype._isMissingSignatures=function(e){if(!e.disableIsFullySigned&&!this.isFullySigned())return new jr.Transaction.MissingSignatures};ie.prototype.inspect=function(){return"<Transaction: "+this.uncheckedSerialize()+">"};ie.prototype.toBuffer=function(e){var t=new au;return this.toBufferWriter(t,e).toBuffer()};ie.prototype.hasWitnesses=function(){for(var e=0;e<this.inputs.length;e++)if(this.inputs[e].hasWitnesses())return!0;return!1};ie.prototype.toBufferWriter=function(e,t){e.writeInt32LE(this.version);let r=this.hasWitnesses();r&&!t&&e.write(Buffer.from("0001","hex")),e.writeVarintNum(this.inputs?this.inputs.length:0);for(let i of this.inputs||[])i.toBufferWriter(e);e.writeVarintNum(this.outputs?this.outputs.length:0);for(let i of this.outputs||[])i.toBufferWriter(e);if(r&&!t)for(let i of this.inputs){let n=i.getWitnesses();e.writeVarintNum(n.length);for(let o=0;o<n.length;o++)e.writeVarintNum(n[o].length),e.write(n[o])}return e.writeUInt32LE(this.nLockTime),e};ie.prototype.fromBuffer=function(e){var t=new cv(e);return this.fromBufferReader(t)};ie.prototype.fromBufferReader=function(e){vr.checkArgument(!e.finished(),"No transaction data received"),this.version=e.readInt32LE();var t=e.readVarintNum(),r=!1;t===0&&e.buf[e.pos]!==0&&(e.pos+=1,r=!0,t=e.readVarintNum());for(var i=0;i<t;i++){var n=wr.fromBufferReader(e);this.inputs.push(n)}for(var o=e.readVarintNum(),u=0;u<o;u++)this.outputs.push(Ya.fromBufferReader(e));if(r)for(var m=0;m<t;m++){for(var _=e.readVarintNum(),w=[],I=0;I<_;I++){var T=e.readVarintNum(),N=e.read(T);w.push(N)}this.inputs[m].setWitnesses(w)}return this.nLockTime=e.readUInt32LE(),this};ie.prototype.toObject=ie.prototype.toJSON=function(){var t=[];this.inputs.forEach(function(n){t.push(n.toObject())});var r=[];this.outputs.forEach(function(n){r.push(n.toObject())});var i={hash:this.hash,version:this.version,inputs:t,outputs:r,nLockTime:this.nLockTime};return this._changeScript&&(i.changeScript=this._changeScript.toString()),this._changeIndex!=null&&(i.changeIndex=this._changeIndex),this._fee!=null&&(i.fee=this._fee),i};ie.prototype.fromObject=function(t,r){vr.checkArgument($a.isObject(t)||t instanceof ie);var i;t instanceof ie?i=t.toObject():i=t;for(let u of i.inputs||[]){if(!u.output||!u.output.script){this.uncheckedAddInput(new wr(u));continue}var n=new Ga(u.output.script),o;if((n.isScriptHashOut()||n.isWitnessScriptHashOut())&&u.publicKeys&&u.threshold)o=new wr.MultiSigScriptHash(u,u.publicKeys,u.threshold,u.signatures,r);else if(n.isPublicKeyHashOut()||n.isWitnessPublicKeyHashOut()||n.isScriptHashOut())o=new wr.PublicKeyHash(u);else if(n.isPublicKeyOut())o=new wr.PublicKey(u);else throw new jr.Transaction.Input.UnsupportedScript(u.output.script);this.addInput(o)}for(let u of i.outputs||[])this.addOutput(new Ya(u));return i.changeIndex&&(this._changeIndex=i.changeIndex),i.changeScript&&(this._changeScript=new Ga(i.changeScript)),i.fee&&(this._fee=i.fee),this.nLockTime=i.nLockTime,this.version=i.version,this._checkConsistency(t),this};ie.prototype._checkConsistency=function(e){this._changeIndex!=null&&(vr.checkState(this._changeScript,"Change script is expected."),vr.checkState(this.outputs[this._changeIndex],"Change index points to undefined output."),vr.checkState(this.outputs[this._changeIndex].script.toString()===this._changeScript.toString(),"Change output has an unexpected script.")),e&&e.hash&&vr.checkState(e.hash===this.hash,"Hash in object does not match transaction hash.")};ie.prototype.lockUntilDate=function(e){if(vr.checkArgument(e),!isNaN(e)&&e<ie.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new jr.Transaction.LockTimeTooEarly;$a.isDate(e)&&(e=e.getTime()/1e3);for(var t=0;t<this.inputs.length;t++)this.inputs[t].sequenceNumber===wr.DEFAULT_SEQNUMBER&&(this.inputs[t].sequenceNumber=wr.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=e,this};ie.prototype.lockUntilBlockHeight=function(e){if(vr.checkArgument(!isNaN(e)),e>=ie.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new jr.Transaction.BlockHeightTooHigh;if(e<0)throw new jr.Transaction.NLockTimeOutOfRange;for(var t=0;t<this.inputs.length;t++)this.inputs[t].sequenceNumber===wr.DEFAULT_SEQNUMBER&&(this.inputs[t].sequenceNumber=wr.DEFAULT_LOCKTIME_SEQNUMBER);return this.nLockTime=e,this};ie.prototype.getLockTime=function(){return this.nLockTime?this.nLockTime<ie.NLOCKTIME_BLOCKHEIGHT_LIMIT?this.nLockTime:new Date(1e3*this.nLockTime):null};ie.prototype.fromString=function(e){this.fromBuffer(u7.Buffer.from(e,"hex"))};ie.prototype._newTransaction=function(){this.version=Ow,this.nLockTime=y7};ie.prototype.from=function(e,t,r,i){if(Array.isArray(e)){for(let o of e)this.from(o,t,r,i);return this}return this.inputs.some(function(o){return o.prevTxId.toString("hex")===e.txId&&o.outputIndex===e.outputIndex})?this:(t&&r?this._fromMultisigUtxo(e,t,r,i):this._fromNonP2SH(e,i),this)};ie.prototype.associateInputs=function(e,t,r,i={}){let n=[];for(let o of e){let u=this.inputs.findIndex(m=>m.prevTxId.toString("hex")===o.txId&&m.outputIndex===o.outputIndex);if(n.push(u),u>=0){let m=this.inputs[u].sequenceNumber;this.inputs[u]=this._getInputFrom(o,t,r,i),this.inputs[u].sequenceNumber=m}}return n};ie.prototype._selectInputType=function(e,t,r){var i;return e=new Aw(e),t&&r?e.script.isMultisigOut()?i=x7:(e.script.isScriptHashOut()||e.script.isWitnessScriptHashOut())&&(i=g7):e.script.isPublicKeyHashOut()||e.script.isWitnessPublicKeyHashOut()||e.script.isScriptHashOut()?i=m7:e.script.isTaproot()?i=b7:e.script.isPublicKeyOut()?i=v7:i=wr,i};ie.prototype._getInputFrom=function(e,t,r,i={}){e=new Aw(e);let n=this._selectInputType(e,t,r),o={output:new Ya({script:e.script,satoshis:e.satoshis}),prevTxId:e.txId,outputIndex:e.outputIndex,sequenceNumber:i.sequenceNumber,script:Ga.empty()},u=t&&r?[t,r,!1,i]:[];return new n(o,...u)};ie.prototype._fromNonP2SH=function(e,t){let r=this._getInputFrom(e,null,null,t);this.addInput(r)};ie.prototype._fromMultisigUtxo=function(e,t,r,i){vr.checkArgument(r<=t.length,"Number of required signatures must be greater than the number of public keys");let n=this._getInputFrom(e,t,r,i);this.addInput(n)};ie.prototype.addInput=function(e,t,r){if(vr.checkArgumentType(e,wr,"input"),!e.output&&(t==null||r==null))throw new jr.Transaction.NeedMoreInfo("Need information about the UTXO script and satoshis");return!e.output&&t&&r!=null&&(t=t instanceof Ga?t:new Ga(t),vr.checkArgumentType(r,"number","satoshis"),e.output=new Ya({script:t,satoshis:r})),this.uncheckedAddInput(e)};ie.prototype.uncheckedAddInput=function(e){return vr.checkArgumentType(e,wr,"input"),this.inputs.push(e),this._inputAmount=void 0,this._updateChangeOutput(),this};ie.prototype.hasAllUtxoInfo=function(){return this.inputs.every(function(e){return!!e.output})};ie.prototype.fee=function(e){return vr.checkArgument(!isNaN(e),"amount must be a number"),this._fee=e,this._updateChangeOutput(),this};ie.prototype.feePerKb=function(e){return vr.checkArgument(!isNaN(e),"amount must be a number"),this._feePerKb=e,this._updateChangeOutput(),this};ie.prototype.feePerByte=function(e){return vr.checkArgument(!isNaN(e),"amount must be a number"),this._feePerByte=e,this._updateChangeOutput(),this};ie.prototype.change=function(e){return vr.checkArgument(e,"address is required"),this._changeScript=Ga.fromAddress(e),this._updateChangeOutput(),this};ie.prototype.getChangeOutput=function(){return this._changeIndex!=null?this.outputs[this._changeIndex]:null};ie.prototype.to=function(e,t){if(Array.isArray(e)){for(let r of e)this.to(r.address,r.satoshis);return this}return vr.checkArgument(nh.isNaturalNumber(t),"Amount is expected to be a positive integer"),this.addOutput(new Ya({script:Ga(new d7(e)),satoshis:t})),this};ie.prototype.addData=function(e){return this.addOutput(new Ya({script:Ga.buildDataOut(e),satoshis:0})),this};ie.prototype.addOutput=function(e){return vr.checkArgumentType(e,Ya,"output"),this._addOutput(e),this._updateChangeOutput(),this};ie.prototype.clearOutputs=function(){return this.outputs=[],this._clearSignatures(),this._outputAmount=void 0,this._changeIndex=void 0,this._updateChangeOutput(),this};ie.prototype._addOutput=function(e){this.outputs.push(e),this._outputAmount=void 0};ie.prototype._getOutputAmount=function(){if(this._outputAmount==null){var e=this;this._outputAmount=0;for(let t of this.outputs||[])e._outputAmount+=t.satoshis}return this._outputAmount};ie.prototype._getInputAmount=function(){return this._inputAmount==null&&(this._inputAmount=$a.sumBy(this.inputs,function(e){if(e.output==null)throw new jr.Transaction.Input.MissingPreviousOutput;return e.output.satoshis})),this._inputAmount};ie.prototype._updateChangeOutput=function(e){if(this._changeScript){e||this._clearSignatures(),this._changeIndex!=null&&this._removeOutput(this._changeIndex);var t=this._getUnspentValue(),r=this.getFee(),i=t-r;i>ie.DUST_AMOUNT?(this._changeIndex=this.outputs.length,this._addOutput(new Ya({script:this._changeScript,satoshis:i}))):this._changeIndex=void 0}};ie.prototype.getFee=function(){return this.isCoinbase()?0:this._fee!=null?this._fee:this._changeScript?this._estimateFee():this._getUnspentValue()};ie.prototype._estimateFee=function(){let e=this._estimateSize(),t=this._getUnspentValue(),r=this._feePerByte||(this._feePerKb||ie.FEE_PER_KB)/1e3;function i(u){return u*r}let n=Math.ceil(i(e)),o=Math.ceil(i(e)+i(this._estimateSizeOfChangeOutput()));return!this._changeScript||t<=o?n:o};ie.prototype._estimateSizeOfChangeOutput=function(){if(!this._changeScript)return 0;let e=this._changeScript.toBuffer().length;return 8+au.varintBufNum(e).length+e};ie.prototype._getUnspentValue=function(){return this._getInputAmount()-this._getOutputAmount()};ie.prototype._clearSignatures=function(){for(let e of this.inputs||[])e.clearSignatures()};ie.prototype._estimateSize=function(){let e=4;this.hasWitnesses()&&(e+=.5),e+=au.varintBufNum(this.inputs.length).length;for(let t of this.inputs||[])e+=t._estimateSize();e+=au.varintBufNum(this.outputs.length).length;for(let t of this.outputs||[])e+=t.calculateSize();return e+=4,Math.ceil(e)};ie.prototype._calculateSize=function(){return this.toBuffer().length};ie.prototype._calculateVSize=function(e){let t=this._calculateWeight()/4;return e?t:Math.ceil(t)};ie.prototype._calculateWeight=function(){return this.toBuffer(!0).length*3+this.toBuffer(!1).length};ie.prototype._removeOutput=function(e){var t=this.outputs[e];this.outputs=$a.without(this.outputs,t),this._outputAmount=void 0};ie.prototype.removeOutput=function(e){this._removeOutput(e),this._updateChangeOutput()};ie.prototype.sort=function(){return this.sortInputs(function(e){var t=Array.prototype.concat.apply([],e);let r=0;return t.forEach(i=>{i.i=r++}),t.sort(function(i,n){return Rw(i.prevTxId,n.prevTxId)||i.outputIndex-n.outputIndex||i.i-n.i}),t}),this.sortOutputs(function(e){var t=Array.prototype.concat.apply([],e);let r=0;return t.forEach(i=>{i.i=r++}),t.sort(function(i,n){return i.satoshis-n.satoshis||Rw(i.script.toBuffer(),n.script.toBuffer())||i.i-n.i}),t}),this};ie.prototype.shuffleOutputs=function(){return this.sortOutputs($a.shuffle)};ie.prototype.sortOutputs=function(e){var t=e(this.outputs);return this._newOutputOrder(t)};ie.prototype.sortInputs=function(e){return this.inputs=e(this.inputs),this._clearSignatures(),this};ie.prototype._newOutputOrder=function(e){var t=this.outputs.length!==e.length||$a.difference(this.outputs,e).length!==0;if(t)throw new jr.Transaction.InvalidSorting;if(this._changeIndex!=null){var r=this.outputs[this._changeIndex];this._changeIndex=e.indexOf(r)}return this.outputs=e,this};ie.prototype.removeInput=function(e,t){var r;if(!t&&!isNaN(e)?r=e:r=this.inputs.findIndex(function(n){return n.prevTxId.toString("hex")===e&&n.outputIndex===t}),r<0||r>=this.inputs.length)throw new jr.Transaction.InvalidIndex(r,this.inputs.length);var i=this.inputs[r];this.inputs=$a.without(this.inputs,i),this._inputAmount=void 0,this._updateChangeOutput()};ie.prototype.sign=function(e,t,r,i){if(vr.checkState(this.hasAllUtxoInfo(),"Not all utxo information is available to sign the transaction."),Array.isArray(e)){for(let n of e)this.sign(n,t,r,i);return this}for(let n of this.getSignatures(e,t,r,i))this.applySignature(n,r);return this};ie.prototype.getSignatures=function(e,t,r,i){typeof i=="string"&&(i=Buffer.from(i,"hex")),e=new _7(e);let n=[],o=uv.sha256ripemd160(e.publicKey.toBuffer());for(let u=0;u<this.inputs.length;u++){let m=this.inputs[u];for(let _ of m.getSignatures(this,e,u,t,o,r,i))n.push(_)}return n};ie.prototype.applySignature=function(e,t){return this.inputs[e.inputIndex].addSignature(this,e,t),this};ie.prototype.isFullySigned=function(){for(let e of this.inputs||[])if(e.isFullySigned===wr.prototype.isFullySigned)throw new jr.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction");return this.inputs.every(function(e){return e.isFullySigned()})};ie.prototype.isValidSignature=function(e,t){if(this.inputs[e.inputIndex].isValidSignature===wr.prototype.isValidSignature)throw new jr.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction");return this.inputs[e.inputIndex].isValidSignature(this,e,t)};ie.prototype.checkEcdsaSignature=function(e,t,r,i,n){var o=i.toBuffer(),u=new au;u.writeVarintNum(o.length),u.write(o);var m;n?(vr.checkState(nh.isNaturalNumber(n),"satoshis needs to be a natural number"),m=new au().writeUInt64LEBN(new ih(n)).toBuffer()):m=this.inputs[r].getSatoshisBuffer();var _=p7.verify(this,e,t,r,u.toBuffer(),m);return _};ie.prototype.checkSchnorrSignature=function(e,t,r,i,n){if(vr.isType(t,"PublicKey")&&(t=t.point.x.toBuffer()),vr.checkArgument(t&&t.length===32,"Schnorr signatures have 32-byte public keys. The caller is responsible for enforcing this."),Buffer.isBuffer(e)){if(e.length!==64&&e.length!==65)return!1;e=su.fromSchnorr(e)}return vr.checkArgument(e.isSchnorr,"Signature must be schnorr"),!!h7.verify(this,e,t,i,r,n)};ie.prototype.verifySignature=function(e,t,r,i,n,o,u){switch(n==null&&(n=su.Version.BASE),n){case su.Version.WITNESS_V0:return this.checkEcdsaSignature(e,t,r,i,o);case su.Version.TAPROOT:case su.Version.TAPSCRIPT:return this.checkSchnorrSignature(e,t,r,n,u);case su.Version.BASE:default:return l7.verify(this,e,t,r,i)}};ie.prototype.verify=function(){if(this.inputs.length===0)return"transaction txins empty";if(this.outputs.length===0)return"transaction txouts empty";for(var e=new ih(0),t=0;t<this.outputs.length;t++){var r=this.outputs[t];if(r.invalidSatoshis())return"transaction txout "+t+" satoshis is invalid";if(r._satoshisBN.gt(new ih(ie.MAX_MONEY,10)))return"transaction txout "+t+" greater than MAX_MONEY";if(e=e.add(r._satoshisBN),e.gt(new ih(ie.MAX_MONEY)))return"transaction txout "+t+" total output greater than MAX_MONEY"}if(this.toBuffer().length>w7)return"transaction over the maximum block size";var i={};for(t=0;t<this.inputs.length;t++){var n=this.inputs[t],o=n.prevTxId+":"+n.outputIndex;if(i[o]!=null)return"transaction input "+t+" duplicate input";i[o]=!0}var u=this.isCoinbase();if(u){var m=this.inputs[0]._scriptBuffer;if(m.length<2||m.length>100)return"coinbase transaction script size invalid"}else for(t=0;t<this.inputs.length;t++)if(this.inputs[t].isNull())return"transaction input "+t+" has null input";return!0};ie.prototype.isCoinbase=function(){return this.inputs.length===1&&this.inputs[0].isNull()};ie.prototype.isRBF=function(){for(var e=0;e<this.inputs.length;e++){var t=this.inputs[e];if(t.sequenceNumber<wr.MAXINT-1)return!0}return!1};ie.prototype.enableRBF=function(){for(var e=0;e<this.inputs.length;e++){var t=this.inputs[e];t.sequenceNumber>=wr.MAXINT-1&&(t.sequenceNumber=wr.DEFAULT_RBF_SEQNUMBER)}return this};ie.prototype.setVersion=function(e){return vr.checkArgument(nh.isNaturalNumber(e)&&e<=Ow,"Wrong version number"),this.version=e,this};Pw.exports=ie});var mf=X((tq,Za)=>{Za.exports=Zp();Za.exports.Input=Qp();Za.exports.Output=hs();Za.exports.UnspentOutput=ov();Za.exports.Signature=Fo();Za.exports.Sighash=Js();Za.exports.SighashWitness=Qc()});var Hm=X((rq,Bw)=>{"use strict";var ou=yt(),dn=Bm(),W=Fp(),Fe=Zr(),Vo=Lr(),_t=li(),cu=Cn(),mn=xt(),E7=Qc(),I7=jp(),sh=ti(),Nw=Zs(),j=function e(t){if(!(this instanceof e))return new e(t);t?(this.initialize(),this.set(t)):this.initialize()};j.prototype.verifyWitnessProgram=function(e,t,r,i,n,o){var u=new dn,m=[];if(e===0)if(t.length===j.WITNESS_V0_SCRIPTHASH_SIZE){if(r.length===0)return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY",!1;var _=r[r.length-1];u=new dn(_);var w=Vo.sha256(_);return w.toString("hex")!==t.toString("hex")?(this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH",!1):(m=r.slice(0,-1),this.executeWitnessScript(u,m,_t.Version.WITNESS_V0,i,n))}else return t.length===j.WITNESS_V0_KEYHASH_SIZE?r.length!==2?(this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH",!1):(u.add(W.OP_DUP),u.add(W.OP_HASH160),u.add(t),u.add(W.OP_EQUALVERIFY),u.add(W.OP_CHECKSIG),m=r,this.executeWitnessScript(u,m,_t.Version.WITNESS_V0,i,n)):(this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH",!1);else if(e===1&&t.length==j.WITNESS_V1_TAPROOT_SIZE&&!o){let I={annexPresent:!1};if(!(n&j.SCRIPT_VERIFY_TAPROOT))return!0;if(m=Array.from(r),m.length==0)return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY",!1;if(m.length>=2&&m[m.length-1].length&&m[m.length-1][0]===dn.ANNEX_TAG){let T=m.pop(),N=new sh;N.writeVarintNum(T.length),N.write(T),I.annexHash=Vo.sha256(N.toBuffer()),I.annexPresent=!0}if(I.annexInit=!0,m.length===1)return this.checkSchnorrSignature(m[0],t,_t.Version.TAPROOT,I);{let T=m.pop(),N=m.pop();if(T.length<j.TAPROOT_CONTROL_BASE_SIZE||T.length>j.TAPROOT_CONTROL_MAX_SIZE||(T.length-j.TAPROOT_CONTROL_BASE_SIZE)%j.TAPROOT_CONTROL_NODE_SIZE!=0)return this.errstr="SCRIPT_ERR_TAPROOT_WRONG_CONTROL_SIZE",!1;if(I.tapleafHash=j.computeTapleafHash(T[0]&j.TAPROOT_LEAF_MASK,N),!j.verifyTaprootCommitment(T,t,I.tapleafHash))return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH",!1;if(I.tapleafHashInit=!0,(T[0]&j.TAPROOT_LEAF_MASK)===j.TAPROOT_LEAF_TAPSCRIPT){let C;{let B=new sh;B.writeVarintNum(r.length);for(let U of r)B.writeVarintNum(U.length),B.write(U);C=B.toBuffer().length}try{u=new dn(N)}catch{return this.errstr="SCRIPT_ERR_BAD_OPCODE",!1}return I.validationWeightLeft=C+dn.VALIDATION_WEIGHT_OFFSET,I.validationWeightLeftInit=!0,this.executeWitnessScript(u,m,_t.Version.TAPSCRIPT,i,n,I)}return n&j.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_TAPROOT_VERSION?(this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_TAPROOT_VERSION",!1):!0}}else if(n&j.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM",!1;return!0};j.prototype.executeWitnessScript=function(e,t,r,i,n,o){if(r===_t.Version.TAPSCRIPT){for(let m of e.chunks)if(W.isOpSuccess(m.opcodenum))return n&j.SCRIPT_VERIFY_DISCOURAGE_OP_SUCCESS?(this.errstr="SCRIPT_ERR_DISCOURAGE_OP_SUCCESS",!1):!0;if(t.length>j.MAX_STACK_SIZE)return this.errstr="SCRIPT_ERR_STACK_SIZE",!1}if(t.length&&t.some(m=>m.length>j.MAX_SCRIPT_ELEMENT_SIZE))return this.errstr="SCRIPT_ERR_PUSH_SIZE",!1;if(this.initialize(),this.set({script:e,stack:t,sigversion:r,satoshis:i,flags:n,execdata:o}),!this.evaluate())return!1;if(this.stack.length!==1)return this.errstr="SCRIPT_ERR_EVAL_FALSE",!1;var u=this.stack[this.stack.length-1];return j.castToBool(u)?!0:(this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_STACK",!1)};j.prototype.verify=function(e,t,r,i,n,o,u){var m=mf();ou.isUndefined(r)&&(r=new m),ou.isUndefined(i)&&(i=0),ou.isUndefined(n)&&(n=0),ou.isUndefined(o)&&(o=null),ou.isUndefined(u)&&(u=0),this.set({script:e,tx:r,nin:i,sigversion:_t.Version.BASE,satoshis:0,flags:n});var _;if(n&j.SCRIPT_VERIFY_SIGPUSHONLY&&!e.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(!this.evaluate())return!1;n&j.SCRIPT_VERIFY_P2SH&&(_=this.stack.slice());var w=this.stack;if(this.initialize(),this.set({script:t,stack:w,tx:r,nin:i,flags:n}),!this.evaluate())return!1;if(this.stack.length===0)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_RESULT",!1;var I=this.stack[this.stack.length-1];if(!j.castToBool(I))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_STACK",!1;var T=!1;if(n&j.SCRIPT_VERIFY_WITNESS){var N={};if(t.isWitnessProgram(N)){if(T=!0,e.toBuffer().length!==0)return this.errstr="SCRIPT_ERR_WITNESS_MALLEATED",!1;if(!this.verifyWitnessProgram(N.version,N.program,o,u,this.flags,!1))return!1}}if(n&j.SCRIPT_VERIFY_P2SH&&t.isScriptHashOut()){if(!e.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(_.length===0)throw new Error("internal error - stack copy empty");var C=_[_.length-1],B=dn.fromBuffer(C);if(_.pop(),this.initialize(),this.set({script:B,stack:_,tx:r,nin:i,flags:n}),!this.evaluate())return!1;if(_.length===0)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_P2SH_STACK",!1;if(!j.castToBool(_[_.length-1]))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_P2SH_STACK",!1;if(n&j.SCRIPT_VERIFY_WITNESS){var U={};if(B.isWitnessProgram(U)){T=!0;var Z=new dn;if(Z.add(B.toBuffer()),e.toHex()!==Z.toHex())return this.errstr="SCRIPT_ERR_WITNESS_MALLEATED_P2SH",!1;if(!this.verifyWitnessProgram(U.version,U.program,o,u,this.flags,!0))return!1;w=[w[0]]}}}if(this.flags&j.SCRIPT_VERIFY_CLEANSTACK){if(!(this.flags&j.SCRIPT_VERIFY_P2SH)||!(this.flags&j.SCRIPT_VERIFY_WITNESS))throw"flags & SCRIPT_VERIFY_P2SH";if(_.length!=1)return this.errstr="SCRIPT_ERR_CLEANSTACK",!1}return this.flags&j.SCRIPT_VERIFY_WITNESS&&!T&&o.length>0?(this.errstr="SCRIPT_ERR_WITNESS_UNEXPECTED",!1):!0};Bw.exports=j;j.prototype.initialize=function(e){this.stack=[],this.altstack=[],this.pc=0,this.satoshis=0,this.sigversion=_t.Version.BASE,this.pbegincodehash=0,this.nOpCount=0,this.vfExec=[],this.errstr="",this.flags=0,this.execdata={}};j.prototype.set=function(e){this.script=e.script||this.script,this.tx=e.tx||this.tx,this.nin=typeof e.nin>"u"?this.nin:parseInt(e.nin),this.stack=e.stack||this.stack,this.altstack=e.altstack||this.altstack,this.pc=typeof e.pc>"u"?this.pc:e.pc,this.pbegincodehash=typeof e.pbegincodehash>"u"?this.pbegincodehash:e.pbegincodehash,this.sigversion=typeof e.sigversion>"u"?this.sigversion:e.sigversion,this.satoshis=typeof e.satoshis>"u"?this.satoshis:e.satoshis,this.nOpCount=typeof e.nOpCount>"u"?this.nOpCount:e.nOpCount,this.vfExec=e.vfExec||this.vfExec,this.errstr=e.errstr||this.errstr,this.flags=typeof e.flags>"u"?this.flags:e.flags,this.execdata=typeof e.execdata>"u"?this.execdata:e.execdata||{}};j.true=Buffer.from([1]);j.false=Buffer.from([]);j.MAX_SCRIPT_SIZE=1e4;j.MAX_STACK_SIZE=1e3;j.MAX_SCRIPT_ELEMENT_SIZE=520;j.LOCKTIME_THRESHOLD=5e8;j.LOCKTIME_THRESHOLD_BN=new Fe(j.LOCKTIME_THRESHOLD);j.SCRIPT_VERIFY_NONE=0;j.SCRIPT_VERIFY_P2SH=1;j.SCRIPT_VERIFY_STRICTENC=2;j.SCRIPT_VERIFY_DERSIG=4;j.SCRIPT_VERIFY_LOW_S=8;j.SCRIPT_VERIFY_NULLDUMMY=16;j.SCRIPT_VERIFY_SIGPUSHONLY=32;j.SCRIPT_VERIFY_MINIMALDATA=64;j.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS=128;j.SCRIPT_VERIFY_CLEANSTACK=256,j.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY=512;j.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY=1024;j.SCRIPT_VERIFY_WITNESS=2048;j.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM=4096;j.SCRIPT_VERIFY_MINIMALIF=8192;j.SCRIPT_VERIFY_NULLFAIL=16384;j.SCRIPT_VERIFY_WITNESS_PUBKEYTYPE=32768;j.SCRIPT_ENABLE_SIGHASH_FORKID=65536;j.SCRIPT_ENABLE_REPLAY_PROTECTION=1<<17;j.SCRIPT_VERIFY_CONST_SCRIPTCODE=65536;j.SCRIPT_VERIFY_TAPROOT=1<<17;j.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_TAPROOT_VERSION=1<<18;j.SCRIPT_VERIFY_DISCOURAGE_OP_SUCCESS=1<<19;j.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_PUBKEYTYPE=1<<20;j.SEQUENCE_LOCKTIME_DISABLE_FLAG=1<<31;j.SEQUENCE_LOCKTIME_TYPE_FLAG=1<<22;j.SEQUENCE_LOCKTIME_MASK=65535;j.WITNESS_V0_SCRIPTHASH_SIZE=32;j.WITNESS_V0_KEYHASH_SIZE=20;j.WITNESS_V1_TAPROOT_SIZE=32;j.TAPROOT_LEAF_MASK=254;j.TAPROOT_LEAF_TAPSCRIPT=192;j.TAPROOT_CONTROL_BASE_SIZE=33;j.TAPROOT_CONTROL_NODE_SIZE=32;j.TAPROOT_CONTROL_MAX_NODE_COUNT=128;j.TAPROOT_CONTROL_MAX_SIZE=j.TAPROOT_CONTROL_BASE_SIZE+j.TAPROOT_CONTROL_NODE_SIZE*j.TAPROOT_CONTROL_MAX_NODE_COUNT;j.PROTOCOL_VERSION=70016;j.castToBool=function(e){for(var t=0;t<e.length;t++)if(e[t]!==0)return!(t===e.length-1&&e[t]===128);return!1};j.prototype.checkSignatureEncoding=function(e){var t;if(e.length==0)return!0;if(this.flags&(j.SCRIPT_VERIFY_DERSIG|j.SCRIPT_VERIFY_LOW_S|j.SCRIPT_VERIFY_STRICTENC)&&!_t.isTxDER(e))return this.errstr="SCRIPT_ERR_SIG_DER_INVALID_FORMAT",!1;if(this.flags&j.SCRIPT_VERIFY_LOW_S){if(t=_t.fromTxFormat(e),!t.hasLowS())return this.errstr="SCRIPT_ERR_SIG_DER_HIGH_S",!1}else if(this.flags&j.SCRIPT_VERIFY_STRICTENC&&(t=_t.fromTxFormat(e),!t.hasDefinedHashtype()))return this.errstr="SCRIPT_ERR_SIG_HASHTYPE",!1;return!0};j.prototype.checkPubkeyEncoding=function(e){return this.flags&j.SCRIPT_VERIFY_STRICTENC&&!cu.isValid(e)?(this.errstr="SCRIPT_ERR_PUBKEYTYPE",!1):this.flags&j.SCRIPT_VERIFY_WITNESS_PUBKEYTYPE&&this.sigversion==_t.Version.WITNESS_V0&&!cu.fromBuffer(e).compressed?(this.errstr="SCRIPT_ERR_WITNESS_PUBKEYTYPE",!1):!0};j.prototype.checkEcdsaSignature=function(e,t,r,i,n){var o=i.toBuffer(),u=new sh;u.writeVarintNum(o.length),u.write(o),mn.checkState(JSUtil.isNaturalNumber(n));var m=new sh().writeUInt64LEBN(new Fe(n)).toBuffer(),_=E7.verify(this,e,t,r,u.toBuffer(),m);return _};j.prototype.checkSchnorrSignature=function(e,t,r,i){return mn.checkArgument(e&&Buffer.isBuffer(e),"Missing sig"),mn.checkArgument(t&&Buffer.isBuffer(t),"Missing pubkey"),mn.checkArgument(r,"Missing sigversion"),mn.checkArgument(i,"Missing execdata"),mn.checkArgument(t.length===32,"Schnorr signatures have 32-byte public keys. The caller is responsible for enforcing this."),e.length===64||e.length===65?e.length===65&&e[e.length-1]===_t.SIGHASH_DEFAULT?(this.errstr="SCRIPT_ERR_SCHNORR_SIG_HASHTYPE",!1):(e=_t.fromSchnorr(e),I7.verify(this.tx,e,t,r,this.nin,i)):(this.errstr="SCRIPT_ERR_SCHNORR_SIG_SIZE",!1)};j.prototype._evalChecksigPreTapscript=function(e,t){mn.checkArgument(this.sigversion===_t.Version.BASE||this.sigversion===_t.Version.WITNESS_V0,"sigversion must be base or witness_v0");let r={success:!1,result:!1},i=new dn().set({chunks:this.script.chunks.slice(this.pbegincodehash)});if(this.sigversion===_t.Version.BASE){let n=new dn().add(e),o=i.chunks.length;if(i.findAndDelete(n),o=o==i.chunks.length+1,o&&this.flags&j.SCRIPT_VERIFY_CONST_SCRIPTCODE)return this.errstr="SCRIPT_ERR_SIG_FINDANDDELETE",r}if(!this.checkSignatureEncoding(e)||!this.checkPubkeyEncoding(t))return r;try{let n=_t.fromTxFormat(e),o=cu.fromBuffer(t,!1);r.success=this.tx.verifySignature(n,o,this.nin,i,this.sigversion,this.satoshis)}catch{r.success=!1}return!r.success&&this.flags&j.SCRIPT_VERIFY_NULLFAIL&&e.length?(this.errstr="SCRIPT_ERR_SIG_NULLFAIL",r):(r.result=!0,r)};j.prototype._evalChecksigTapscript=function(e,t){mn.checkArgument(this.sigversion==_t.Version.TAPSCRIPT,"this.sigversion must by TAPSCRIPT");let r={success:e.length>0,result:!1};if(r.success&&(mn.checkState(this.execdata.validationWeightLeftInit,"validationWeightLeftInit is false"),this.execdata.validationWeightLeft-=dn.VALIDATION_WEIGHT_PER_SIGOP_PASSED,this.execdata.validationWeightLeft<0))return this.errstr="SCRIPT_ERR_TAPSCRIPT_VALIDATION_WEIGHT",r;if(t.length===0)return this.errstr="SCRIPT_ERR_PUBKEYTYPE",r;if(t.length==32){if(r.success&&!this.tx.checkSchnorrSignature(e,t,this.nin,this.sigversion,this.execdata))return this.errstr="SCRIPT_ERR_SCHNORR_SIG",r}else if(this.flags&j.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_PUBKEYTYPE)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_PUBKEYTYPE",r;return r.result=!0,r};j.prototype._evalCheckSig=function(e,t){switch(this.sigversion){case _t.Version.BASE:case _t.Version.WITNESS_V0:return this._evalChecksigPreTapscript(e,t);case _t.Version.TAPSCRIPT:return this._evalChecksigTapscript(e,t);case _t.Version.TAPROOT:throw new Error("Called evalCheckSig with a TAPROOT sigversion. Check your implementation")}};j.prototype.evaluate=function(){if(mn.checkArgument(this.sigversion==_t.Version.BASE||this.sigversion==_t.Version.WITNESS_V0||this.sigversion==_t.Version.TAPSCRIPT,"invalid sigversion"),(this.sigversion==_t.Version.BASE||this.sigversion==_t.Version.WITNESS_V0)&&this.script.toBuffer().length>j.MAX_SCRIPT_SIZE)return this.errstr="SCRIPT_ERR_SCRIPT_SIZE",!1;try{for(;this.pc<this.script.chunks.length;){var e=this.step();if(!e)return!1}}catch(t){return this.errstr="SCRIPT_ERR_UNKNOWN_ERROR: "+t,!1}return this.vfExec.length>0?(this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1):!0};j.prototype.checkLockTime=function(e){return!(!(this.tx.nLockTime<j.LOCKTIME_THRESHOLD&&e.lt(j.LOCKTIME_THRESHOLD_BN)||this.tx.nLockTime>=j.LOCKTIME_THRESHOLD&&e.gte(j.LOCKTIME_THRESHOLD_BN))||e.gt(new Fe(this.tx.nLockTime))||!this.tx.inputs[this.nin].isFinal())};j.prototype.checkSequence=function(e){var t=this.tx.inputs[this.nin].sequenceNumber;if(this.tx.version<2||t&j.SEQUENCE_LOCKTIME_DISABLE_FLAG)return!1;var r=j.SEQUENCE_LOCKTIME_TYPE_FLAG|j.SEQUENCE_LOCKTIME_MASK,i=new Fe(t&r),n=e.and(new Fe(r)),o=new Fe(j.SEQUENCE_LOCKTIME_TYPE_FLAG);return i.lt(o)&&n.lt(o)||i.gte(o)&&n.gte(o)?n.lte(i):!1};j.computeTapleafHash=function(e,t){let r=Nw.TAPLEAF;return r.writeUInt8(e),r.writeVarintNum(t.length),r.write(t),r.finalize()};j.computeTaprootMerkleRoot=function(e,t){let r=(e.length-j.TAPROOT_CONTROL_BASE_SIZE)/j.TAPROOT_CONTROL_NODE_SIZE,i=t;for(let n=0;n<r;++n){let o=Nw.TAPBRANCH,u=j.TAPROOT_CONTROL_BASE_SIZE+j.TAPROOT_CONTROL_NODE_SIZE*n,m=e.slice(u,u+j.TAPROOT_CONTROL_NODE_SIZE);Buffer.compare(i,m)===-1?(o.write(i),o.write(m)):(o.write(m),o.write(i)),i=o.finalize()}return i};j.verifyTaprootCommitment=function(e,t,r){mn.checkArgument(e.length>=j.TAPROOT_CONTROL_BASE_SIZE,"control too short"),mn.checkArgument(t.length>=32,"program is too short");try{let i=cu.fromX(!1,e.slice(1,j.TAPROOT_CONTROL_BASE_SIZE));let n=cu.fromX(!1,t),o=j.computeTaprootMerkleRoot(e,r);return n.checkTapTweak(i,o,e)}catch{return!1}};j.prototype.step=function(){var e=(this.flags&j.SCRIPT_VERIFY_MINIMALDATA)!==0,t=this.vfExec.indexOf(!1)===-1,r,i,n,o,u,m,_,w,I,T,N,C,B,U,Z,$,H;this.execdata=this.execdata||{},this.execdata.codeseparatorPosInit||(this.execdata.codeseparatorPos=new Fe(4294967295),this.execdata.codeseparatorPosInit=!0);var ee=this.script.chunks[this.pc];this.pc++;var ce=ee.opcodenum;if(ou.isUndefined(ce))return this.errstr="SCRIPT_ERR_UNDEFINED_OPCODE",!1;if(ee.buf&&ee.buf.length>j.MAX_SCRIPT_ELEMENT_SIZE)return this.errstr="SCRIPT_ERR_PUSH_SIZE",!1;if((this.sigversion===_t.Version.BASE||this.sigversion===_t.Version.WITNESS_V0)&&ce>W.OP_16&&++this.nOpCount>201)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;if(ce===W.OP_CAT||ce===W.OP_SUBSTR||ce===W.OP_LEFT||ce===W.OP_RIGHT||ce===W.OP_INVERT||ce===W.OP_AND||ce===W.OP_OR||ce===W.OP_XOR||ce===W.OP_2MUL||ce===W.OP_2DIV||ce===W.OP_MUL||ce===W.OP_DIV||ce===W.OP_MOD||ce===W.OP_LSHIFT||ce===W.OP_RSHIFT)return this.errstr="SCRIPT_ERR_DISABLED_OPCODE",!1;if(ce==W.OP_CODESEPARATOR&&this.sigversion===_t.Version.BASE&&this.flags&j.SCRIPT_VERIFY_CONST_SCRIPTCODE)return this.errstr="SCRIPT_ERR_OP_CODESEPARATOR",!1;if(t&&0<=ce&&ce<=W.OP_PUSHDATA4){if(e&&!this.script.checkMinimalPush(this.pc-1))return this.errstr="SCRIPT_ERR_MINIMALDATA",!1;if(!ee.buf)this.stack.push(j.false);else{if(ee.len!==ee.buf.length)throw new Error("Length of push value not equal to length of data");this.stack.push(ee.buf)}}else if(t||W.OP_IF<=ce&&ce<=W.OP_ENDIF)switch(ce){case W.OP_1NEGATE:case W.OP_1:case W.OP_2:case W.OP_3:case W.OP_4:case W.OP_5:case W.OP_6:case W.OP_7:case W.OP_8:case W.OP_9:case W.OP_10:case W.OP_11:case W.OP_12:case W.OP_13:case W.OP_14:case W.OP_15:case W.OP_16:u=ce-(W.OP_1-1),r=new Fe(u).toScriptNumBuffer(),this.stack.push(r);break;case W.OP_NOP:break;case W.OP_NOP2:case W.OP_CHECKLOCKTIMEVERIFY:if(!(this.flags&j.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY)){if(this.flags&j.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var ge=Fe.fromScriptNumBuffer(this.stack[this.stack.length-1],e,5);if(ge.lt(new Fe(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(!this.checkLockTime(ge))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case W.OP_NOP3:case W.OP_CHECKSEQUENCEVERIFY:if(!(this.flags&j.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY)){if(this.flags&j.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var Se=Fe.fromScriptNumBuffer(this.stack[this.stack.length-1],e,5);if(Se.lt(new Fe(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(Se&j.SEQUENCE_LOCKTIME_DISABLE_FLAG)break;if(!this.checkSequence(Se))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case W.OP_NOP1:case W.OP_NOP4:case W.OP_NOP5:case W.OP_NOP6:case W.OP_NOP7:case W.OP_NOP8:case W.OP_NOP9:case W.OP_NOP10:if(this.flags&j.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break;case W.OP_IF:case W.OP_NOTIF:{if($=!1,t){if(this.stack.length<1)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;if(r=this.stack[this.stack.length-1],this.sigversion===_t.Version.TAPSCRIPT&&(r.length>1||r.length===1&&r[0]!==1))return this.errstr="SCRIPT_ERR_TAPSCRIPT_MINIMALIF",!1;if(this.sigversion===_t.Version.WITNESS_V0&&this.flags&j.SCRIPT_VERIFY_MINIMALIF){if(r=this.stack[this.stack.length-1],r.length>1)return this.errstr="SCRIPT_ERR_MINIMALIF",!1;if(r.length==1&&r[0]!=1)return this.errstr="SCRIPT_ERR_MINIMALIF",!1}$=j.castToBool(r),ce===W.OP_NOTIF&&($=!$),this.stack.pop()}this.vfExec.push($)}break;case W.OP_ELSE:{if(this.vfExec.length===0)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec[this.vfExec.length-1]=!this.vfExec[this.vfExec.length-1]}break;case W.OP_ENDIF:{if(this.vfExec.length===0)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec.pop()}break;case W.OP_VERIFY:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(r=this.stack[this.stack.length-1],$=j.castToBool(r),$)this.stack.pop();else return this.errstr="SCRIPT_ERR_VERIFY",!1}break;case W.OP_RETURN:return this.errstr="SCRIPT_ERR_OP_RETURN",!1;case W.OP_TOALTSTACK:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.altstack.push(this.stack.pop())}break;case W.OP_FROMALTSTACK:{if(this.altstack.length<1)return this.errstr="SCRIPT_ERR_INVALID_ALTSTACK_OPERATION",!1;this.stack.push(this.altstack.pop())}break;case W.OP_2DROP:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop(),this.stack.pop()}break;case W.OP_2DUP:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;i=this.stack[this.stack.length-2],n=this.stack[this.stack.length-1],this.stack.push(i),this.stack.push(n)}break;case W.OP_3DUP:{if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;i=this.stack[this.stack.length-3],n=this.stack[this.stack.length-2];var me=this.stack[this.stack.length-1];this.stack.push(i),this.stack.push(n),this.stack.push(me)}break;case W.OP_2OVER:{if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;i=this.stack[this.stack.length-4],n=this.stack[this.stack.length-3],this.stack.push(i),this.stack.push(n)}break;case W.OP_2ROT:{if(this.stack.length<6)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;o=this.stack.splice(this.stack.length-6,2),this.stack.push(o[0]),this.stack.push(o[1])}break;case W.OP_2SWAP:{if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;o=this.stack.splice(this.stack.length-4,2),this.stack.push(o[0]),this.stack.push(o[1])}break;case W.OP_IFDUP:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;r=this.stack[this.stack.length-1],$=j.castToBool(r),$&&this.stack.push(r)}break;case W.OP_DEPTH:r=new Fe(this.stack.length).toScriptNumBuffer(),this.stack.push(r);break;case W.OP_DROP:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop()}break;case W.OP_DUP:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-1])}break;case W.OP_NIP:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,1)}break;case W.OP_OVER:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-2])}break;case W.OP_PICK:case W.OP_ROLL:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(r=this.stack[this.stack.length-1],w=Fe.fromScriptNumBuffer(r,e),u=w.toNumber(),this.stack.pop(),u<0||u>=this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;r=this.stack[this.stack.length-u-1],ce===W.OP_ROLL&&this.stack.splice(this.stack.length-u-1,1),this.stack.push(r)}break;case W.OP_ROT:{if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;m=this.stack[this.stack.length-3],_=this.stack[this.stack.length-2];var O=this.stack[this.stack.length-1];this.stack[this.stack.length-3]=_,this.stack[this.stack.length-2]=O,this.stack[this.stack.length-1]=m}break;case W.OP_SWAP:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;m=this.stack[this.stack.length-2],_=this.stack[this.stack.length-1],this.stack[this.stack.length-2]=_,this.stack[this.stack.length-1]=m}break;case W.OP_TUCK:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,0,this.stack[this.stack.length-1])}break;case W.OP_SIZE:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;w=new Fe(this.stack[this.stack.length-1].length),this.stack.push(w.toScriptNumBuffer())}break;case W.OP_EQUAL:case W.OP_EQUALVERIFY:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;i=this.stack[this.stack.length-2],n=this.stack[this.stack.length-1];var E=i.toString("hex")===n.toString("hex");if(this.stack.pop(),this.stack.pop(),this.stack.push(E?j.true:j.false),ce===W.OP_EQUALVERIFY)if(E)this.stack.pop();else return this.errstr="SCRIPT_ERR_EQUALVERIFY",!1}break;case W.OP_1ADD:case W.OP_1SUB:case W.OP_NEGATE:case W.OP_ABS:case W.OP_NOT:case W.OP_0NOTEQUAL:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(r=this.stack[this.stack.length-1],w=Fe.fromScriptNumBuffer(r,e),ce){case W.OP_1ADD:w=w.add(Fe.One);break;case W.OP_1SUB:w=w.sub(Fe.One);break;case W.OP_NEGATE:w=w.neg();break;case W.OP_ABS:w.cmp(Fe.Zero)<0&&(w=w.neg());break;case W.OP_NOT:w=new Fe((w.cmp(Fe.Zero)===0)+0);break;case W.OP_0NOTEQUAL:w=new Fe((w.cmp(Fe.Zero)!==0)+0);break}this.stack.pop(),this.stack.push(w.toScriptNumBuffer())}break;case W.OP_ADD:case W.OP_SUB:case W.OP_BOOLAND:case W.OP_BOOLOR:case W.OP_NUMEQUAL:case W.OP_NUMEQUALVERIFY:case W.OP_NUMNOTEQUAL:case W.OP_LESSTHAN:case W.OP_GREATERTHAN:case W.OP_LESSTHANOREQUAL:case W.OP_GREATERTHANOREQUAL:case W.OP_MIN:case W.OP_MAX:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(I=Fe.fromScriptNumBuffer(this.stack[this.stack.length-2],e),T=Fe.fromScriptNumBuffer(this.stack[this.stack.length-1],e),w=new Fe(0),ce){case W.OP_ADD:w=I.add(T);break;case W.OP_SUB:w=I.sub(T);break;case W.OP_BOOLAND:w=new Fe((I.cmp(Fe.Zero)!==0&&T.cmp(Fe.Zero)!==0)+0);break;case W.OP_BOOLOR:w=new Fe((I.cmp(Fe.Zero)!==0||T.cmp(Fe.Zero)!==0)+0);break;case W.OP_NUMEQUAL:w=new Fe((I.cmp(T)===0)+0);break;case W.OP_NUMEQUALVERIFY:w=new Fe((I.cmp(T)===0)+0);break;case W.OP_NUMNOTEQUAL:w=new Fe((I.cmp(T)!==0)+0);break;case W.OP_LESSTHAN:w=new Fe((I.cmp(T)<0)+0);break;case W.OP_GREATERTHAN:w=new Fe((I.cmp(T)>0)+0);break;case W.OP_LESSTHANOREQUAL:w=new Fe((I.cmp(T)<=0)+0);break;case W.OP_GREATERTHANOREQUAL:w=new Fe((I.cmp(T)>=0)+0);break;case W.OP_MIN:w=I.cmp(T)<0?I:T;break;case W.OP_MAX:w=I.cmp(T)>0?I:T;break}if(this.stack.pop(),this.stack.pop(),this.stack.push(w.toScriptNumBuffer()),ce===W.OP_NUMEQUALVERIFY)if(j.castToBool(this.stack[this.stack.length-1]))this.stack.pop();else return this.errstr="SCRIPT_ERR_NUMEQUALVERIFY",!1}break;case W.OP_WITHIN:{if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;I=Fe.fromScriptNumBuffer(this.stack[this.stack.length-3],e),T=Fe.fromScriptNumBuffer(this.stack[this.stack.length-2],e);var f=Fe.fromScriptNumBuffer(this.stack[this.stack.length-1],e);$=T.cmp(I)<=0&&I.cmp(f)<0,this.stack.pop(),this.stack.pop(),this.stack.pop(),this.stack.push($?j.true:j.false)}break;case W.OP_RIPEMD160:case W.OP_SHA1:case W.OP_SHA256:case W.OP_HASH160:case W.OP_HASH256:{if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;r=this.stack[this.stack.length-1];var c;ce===W.OP_RIPEMD160?c=Vo.ripemd160(r):ce===W.OP_SHA1?c=Vo.sha1(r):ce===W.OP_SHA256?c=Vo.sha256(r):ce===W.OP_HASH160?c=Vo.sha256ripemd160(r):ce===W.OP_HASH256&&(c=Vo.sha256sha256(r)),this.stack.pop(),this.stack.push(c)}break;case W.OP_CODESEPARATOR:this.pbegincodehash=this.pc,this.execdata.codeseparatorPos=this.pc-1;break;case W.OP_CHECKSIG:case W.OP_CHECKSIGVERIFY:{if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;N=this.stack[this.stack.length-2],C=this.stack[this.stack.length-1];let{success:A,result:D}=this._evalCheckSig(N,C);if(!D)return!1;if(this.stack.pop(),this.stack.pop(),this.stack.push(A?j.true:j.false),ce===W.OP_CHECKSIGVERIFY)if(A)this.stack.pop();else return this.errstr="SCRIPT_ERR_CHECKSIGVERIFY",!1}break;case W.OP_CHECKSIGADD:{if(this.sigversion==_t.Version.BASE||this.sigversion==_t.Version.WITNESS_V0)return this.errstr="SCRIPT_ERR_BAD_OPCODE",!1;if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;let A=this.stack[this.stack.length-3],D=this.stack[this.stack.length-2],V=this.stack[this.stack.length-1];D=Fe.fromScriptNumBuffer(D,e);let{success:Y,result:se}=this._evalCheckSig(A,V);if(!se)return!1;this.stack.pop(),this.stack.pop(),this.stack.pop(),this.stack.push(D.addn(Y?1:0).toScriptNumBuffer())}break;case W.OP_CHECKMULTISIG:case W.OP_CHECKMULTISIGVERIFY:{var p=1;if(this.stack.length<p)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var v=Fe.fromScriptNumBuffer(this.stack[this.stack.length-p],e).toNumber();if(v<0||v>20)return this.errstr="SCRIPT_ERR_PUBKEY_COUNT",!1;if(this.nOpCount+=v,this.nOpCount>201)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;var g=++p;p+=v;var x=v+2;if(this.stack.length<p)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var S=Fe.fromScriptNumBuffer(this.stack[this.stack.length-p],e).toNumber();if(S<0||S>v)return this.errstr="SCRIPT_ERR_SIG_COUNT",!1;var b=++p;if(p+=S,this.stack.length<p)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;B=new dn().set({chunks:this.script.chunks.slice(this.pbegincodehash)});for(var l=0;l<S;l++)N=this.stack[this.stack.length-b-l],B.findAndDelete(new dn().add(N));for(H=!0;H&&S>0;){if(N=this.stack[this.stack.length-b],C=this.stack[this.stack.length-g],!this.checkSignatureEncoding(N)||!this.checkPubkeyEncoding(C))return!1;var d;try{U=_t.fromTxFormat(N),Z=cu.fromBuffer(C,!1),d=this.tx.verifySignature(U,Z,this.nin,B,this.sigversion,this.satoshis,this.execdata)}catch{d=!1}d&&(b++,S--),g++,v--,S>v&&(H=!1)}for(;p-- >1;){if(!H&&this.flags&j.SCRIPT_VERIFY_NULLFAIL&&!x&&this.stack[this.stack.length-1].length)return this.errstr="SCRIPT_ERR_NULLFAIL",!1;x>0&&x--,this.stack.pop()}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(this.flags&j.SCRIPT_VERIFY_NULLDUMMY&&this.stack[this.stack.length-1].length)return this.errstr="SCRIPT_ERR_SIG_NULLDUMMY",!1;if(this.stack.pop(),this.stack.push(H?j.true:j.false),ce===W.OP_CHECKMULTISIGVERIFY)if(H)this.stack.pop();else return this.errstr="SCRIPT_ERR_CHECKMULTISIGVERIFY",!1}break;default:return this.errstr="SCRIPT_ERR_BAD_OPCODE",!1}return this.stack.length+this.altstack.length>j.MAX_STACK_SIZE?(this.errstr="SCRIPT_ERR_STACK_SIZE",!1):!0}});var ki=X((iq,lv)=>{lv.exports=Bm();lv.exports.Interpreter=Hm()});var Mn=X((nq,Lw)=>{"use strict";var ah=yt(),ia=xt(),T7=ji(),Mw=Kc(),vf=w2(),Pi=za(),oh=Lr(),Cw=Rr(),pv=Cn();function ue(e,t,r,i){if(!(this instanceof ue))return new ue(e,t,r);if(ah.isArray(e)&&ah.isNumber(t))return ue.createMultisig(e,t,r,!1,i);if(e instanceof ue)return e;if(ia.checkArgument(e,"First argument is required, please include address data.","guide/address.html"),t&&!Pi.get(t))throw new TypeError('Second argument must be "livenet" or "testnet".');if(r&&r!==ue.PayToPublicKeyHash&&r!==ue.PayToScriptHash&&r!==ue.PayToWitnessPublicKeyHash&&r!==ue.PayToWitnessScriptHash&&r!==ue.PayToTaproot)throw new TypeError('Third argument must be "pubkeyhash", "scripthash", "witnesspubkeyhash", "witnessscripthash", or "taproot".');var n=this._classifyArguments(e,t,r);return n.network=n.network||Pi.get(t)||Pi.defaultNetwork,n.type=n.type||r||ue.PayToPublicKeyHash,Cw.defineImmutable(this,{hashBuffer:n.hashBuffer,network:n.network,type:n.type}),this}ue.prototype._classifyArguments=function(e,t,r){if((e instanceof Buffer||e instanceof Uint8Array)&&(e.length===20||e.length===32))return ue._transformHash(e,t,r);if((e instanceof Buffer||e instanceof Uint8Array)&&e.length>=21)return ue._transformBuffer(e,t,r);if(e instanceof pv)return ue._transformPublicKey(e,t,r);if(e instanceof jo)return ue._transformScript(e,t);if(typeof e=="string")return ue._transformString(e,t,r);if(ah.isObject(e))return ue._transformObject(e);throw new TypeError("First argument is an unrecognized data format.")};ue.PayToPublicKeyHash="pubkeyhash";ue.PayToScriptHash="scripthash";ue.PayToWitnessPublicKeyHash="witnesspubkeyhash";ue.PayToWitnessScriptHash="witnessscripthash";ue.PayToTaproot="taproot";ue._transformHash=function(e,t,r){var i={};if(!(e instanceof Buffer)&&!(e instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(e.length!==20&&e.length!==32)throw new TypeError("Address hashbuffers must be either 20 or 32 bytes.");return i.hashBuffer=e,i.network=Pi.get(t)||Pi.defaultNetwork,i.type=r,i};ue._transformObject=function(e){return ia.checkArgument(e.hash||e.hashBuffer,"Must provide a `hash` or `hashBuffer` property"),ia.checkArgument(e.type,"Must provide a `type` property"),{hashBuffer:e.hash?Buffer.from(e.hash,"hex"):e.hashBuffer,network:Pi.get(e.network)||Pi.defaultNetwork,type:e.type}};ue._classifyFromVersion=function(e){var t={};if(e.length>21){var r=vf.decode(e.toString("utf8"));if(r.version!==0&&r.version!==1)throw new TypeError("Only witness v0 and v1 addresses are supported.");if(r.version===0)if(r.data.length===20)t.type=ue.PayToWitnessPublicKeyHash;else if(r.data.length===32)t.type=ue.PayToWitnessScriptHash;else throw new TypeError("Witness data must be either 20 or 32 bytes.");else if(r.version===1)if(r.data.length===32)t.type=ue.PayToTaproot;else throw new TypeError("Witness data must be 32 bytes for v1");t.network=Pi.get(r.prefix,"bech32prefix")}else{var i=Pi.get(e[0],"pubkeyhash"),n=Pi.get(e[0],"scripthash");i?(t.network=i,t.type=ue.PayToPublicKeyHash):n&&(t.network=n,t.type=ue.PayToScriptHash)}return t};ue._transformBuffer=function(e,t,r){var i={};if(!(e instanceof Buffer)&&!(e instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(e.length<21)throw new TypeError("Address buffer is incorrect length.");var n=Pi.get(t),o=ue._classifyFromVersion(e);if(t&&!n)throw new TypeError("Unknown network");if(!o.network||n&&n.xpubkey!==o.network.xpubkey)throw new TypeError("Address has mismatched network type.");if(!o.type||r&&r!==o.type)throw new TypeError("Address has mismatched type.");return e.length>21?i.hashBuffer=vf.decode(e.toString("utf8")).data:i.hashBuffer=e.slice(1),i.network=n||o.network,i.type=o.type,i};ue._transformPublicKey=function(e,t,r){var i={};if(!(e instanceof pv))throw new TypeError("Address must be an instance of PublicKey.");if(r&&r!==ue.PayToScriptHash&&r!==ue.PayToWitnessPublicKeyHash&&r!==ue.PayToPublicKeyHash&&r!==ue.PayToTaproot)throw new TypeError("Type must be either pubkeyhash, witnesspubkeyhash, scripthash, or taproot to transform public key.");if(!e.compressed&&(r===ue.PayToScriptHash||r===ue.PayToWitnessPublicKeyHash))throw new TypeError("Witness addresses must use compressed public keys.");return r===ue.PayToScriptHash?i.hashBuffer=oh.sha256ripemd160(jo.buildWitnessV0Out(e).toBuffer()):r===ue.PayToTaproot?i.hashBuffer=e.createTapTweak().tweakedPubKey:i.hashBuffer=oh.sha256ripemd160(e.toBuffer()),i.type=r||ue.PayToPublicKeyHash,i};ue._transformScript=function(e,t){ia.checkArgument(e instanceof jo,"script must be a Script instance");var r=e.getAddressInfo(t);if(!r)throw new T7.Script.CantDeriveAddress(e);return r};ue.createMultisig=function(e,t,r,i,n){if(r=r||e[0].network||Pi.defaultNetwork,n&&n!==ue.PayToScriptHash&&n!==ue.PayToWitnessScriptHash)throw new TypeError("Type must be either scripthash or witnessscripthash to create multisig.");if(i||n===ue.PayToWitnessScriptHash){e=ah.map(e,pv);for(var o=0;o<e.length;o++)if(!e[o].compressed)throw new TypeError("Witness addresses must use compressed public keys.")}var u=jo.buildMultisigOut(e,t);return i?ue.payingTo(jo.buildWitnessMultisigOutFromScript(u),r):ue.payingTo(u,r,n)};ue._transformString=function(e,t,r){if(typeof e!="string")throw new TypeError("data parameter supplied is not a string.");if(e.length>100)throw new TypeError("address string is too long");if(t&&!Pi.get(t))throw new TypeError("Unknown network");e=e.trim();try{var n=ue._transformBuffer(Buffer.from(e,"utf8"),t,r);return n}catch(o){if(r===ue.PayToWitnessPublicKeyHash||r===ue.PayToWitnessScriptHash||r===ue.PayToTaproot)throw o}var i=Mw.decode(e),n=ue._transformBuffer(i,t,r);return n};ue.fromPublicKey=function(e,t,r){var i=ue._transformPublicKey(e,t,r);return t=t||Pi.defaultNetwork,new ue(i.hashBuffer,t,i.type)};ue.fromPublicKeyHash=function(e,t){var r=ue._transformHash(e);return new ue(r.hashBuffer,t,ue.PayToPublicKeyHash)};ue.fromScriptHash=function(e,t,n){ia.checkArgument(e,"hash parameter is required");var i=ue._transformHash(e);if(n===ue.PayToWitnessScriptHash&&e.length!==32)throw new TypeError("Address hashbuffer must be exactly 32 bytes for v0 witness script hash.");var n=n||ue.PayToScriptHash;return new ue(i.hashBuffer,t,n)};ue.payingTo=function(e,t,n){ia.checkArgument(e,"script is required"),ia.checkArgument(e instanceof jo,"script must be instance of Script");var i;n===ue.PayToWitnessScriptHash?i=oh.sha256(e.toBuffer()):i=oh.sha256ripemd160(e.toBuffer());var n=n||ue.PayToScriptHash;return ue.fromScriptHash(i,t,n)};ue.fromScript=function(e,t){ia.checkArgument(e instanceof jo,"script must be a Script instance");var r=ue._transformScript(e,t);return new ue(r.hashBuffer,t,r.type)};ue.fromBuffer=function(e,t,r){var i=ue._transformBuffer(e,t,r);return new ue(i.hashBuffer,i.network,i.type)};ue.fromString=function(e,t,r){var i=ue._transformString(e,t,r);return new ue(i.hashBuffer,i.network,i.type)};ue.fromObject=function(t){ia.checkState(Cw.isHexa(t.hash),'Unexpected hash property, "'+t.hash+'", expected to be hex.');var r=Buffer.from(t.hash,"hex");return new ue(r,t.network,t.type)};ue.getValidationError=function(e,t,r){var i;try{new ue(e,t,r)}catch(n){i=n}return i};ue.isValid=function(e,t,r){return!ue.getValidationError(e,t,r)};ue.prototype.isPayToPublicKeyHash=function(){return this.type===ue.PayToPublicKeyHash};ue.prototype.isPayToScriptHash=function(){return this.type===ue.PayToScriptHash};ue.prototype.isPayToWitnessPublicKeyHash=function(){return this.type===ue.PayToWitnessPublicKeyHash};ue.prototype.isPayToWitnessScriptHash=function(){return this.type===ue.PayToWitnessScriptHash};ue.prototype.isPayToTaproot=function(){return this.type===ue.PayToTaproot};ue.prototype.toBuffer=function(){if(this.isPayToWitnessPublicKeyHash()||this.isPayToWitnessScriptHash())return Buffer.from(this.toString(),"utf8");var e=Buffer.from([this.network[this.type]]);return Buffer.concat([e,this.hashBuffer])};ue.prototype.toObject=ue.prototype.toJSON=function(){return{hash:this.hashBuffer.toString("hex"),type:this.type,network:this.network.toString()}};ue.prototype.toString=function(){if(this.isPayToWitnessPublicKeyHash()||this.isPayToWitnessScriptHash()||this.isPayToTaproot()){let e=this.network.bech32prefix,t=0,r=vf.encodings.BECH32;return this.isPayToTaproot()&&(t=1,r=vf.encodings.BECH32M),vf.encode(e,t,this.hashBuffer,r)}return Mw.encode(this.toBuffer())};ue.prototype.inspect=function(){return"<Address: "+this.toString()+", type: "+this.type+", network: "+this.network+">"};Lw.exports=ue;var jo=ki()});var gf=X((sq,Uw)=>{"use strict";function Wo(){}Wo.getRandomBuffer=function(e){return process.browser?Wo.getRandomBufferBrowser(e):Wo.getRandomBufferNode(e)};Wo.getRandomBufferNode=function(e){var t=require("crypto");return t.randomBytes(e)};Wo.getRandomBufferBrowser=function(e){if(!window.crypto&&!window.msCrypto)throw new Error("window.crypto not available");if(window.crypto&&window.crypto.getRandomValues)var t=window.crypto;else if(window.msCrypto&&window.msCrypto.getRandomValues)var t=window.msCrypto;else throw new Error("window.crypto.getRandomValues not available");var r=new Uint8Array(e);t.getRandomValues(r);var i=Buffer.from(r);return i};Wo.getPseudoRandomBuffer=function(e){for(var t=4294967296,r=Buffer.alloc(e),i,n=0;n<=e;n++){var o=Math.floor(n/4),u=n-o*4;u===0?(i=Math.random()*t,r[n]=i&255):r[n]=(i=i>>>8)&255}return r};Uw.exports=Wo});var Wa=X((aq,Fw)=>{"use strict";var ch=yt(),R7=Mn(),Dw=Kc(),sa=Zr(),qw=Rr(),na=za(),uh=qa(),A7=Cn(),O7=gf(),fh=xt(),k7=Zs();function rt(e,t){if(!(this instanceof rt))return new rt(e,t);if(e instanceof rt)return e;var r=this._classifyArguments(e,t);if(!r.bn||r.bn.cmp(new sa(0))===0)throw new TypeError("Number can not be equal to zero, undefined, null or false");if(!r.bn.lt(uh.getN()))throw new TypeError("Number must be less than N");if(typeof r.network>"u")throw new TypeError('Must specify the network ("livenet" or "testnet")');return qw.defineImmutable(this,{bn:r.bn,compressed:r.compressed,network:r.network}),Object.defineProperty(this,"publicKey",{configurable:!1,enumerable:!0,get:this.toPublicKey.bind(this)}),this}rt.prototype._classifyArguments=function(e,t){var r={compressed:!0,network:t?na.get(t):na.defaultNetwork};if(ch.isUndefined(e)||ch.isNull(e))r.bn=rt._getRandomBN();else if(e instanceof sa)r.bn=e;else if(e instanceof Buffer||e instanceof Uint8Array)r=rt._transformBuffer(e,t);else if(e.bn&&e.network)r=rt._transformObject(e);else if(!t&&na.get(e))r.bn=rt._getRandomBN(),r.network=na.get(e);else if(typeof e=="string")qw.isHexa(e)?r.bn=new sa(Buffer.from(e,"hex")):r=rt._transformWIF(e,t);else throw new TypeError("First argument is an unrecognized data type.");return r};rt._getRandomBN=function(){var e,t;do{var r=O7.getRandomBuffer(32);t=sa.fromBuffer(r),e=t.lt(uh.getN())}while(!e);return t};rt._transformBuffer=function(e,t){var r={};if(e.length===32)return rt._transformBNBuffer(e,t);if(r.network=na.get(e[0],"privatekey"),!r.network)throw new Error("Invalid network");if(t&&r.network!==na.get(t))throw new TypeError("Private key network mismatch");if(e.length===34&&e[33]===1)r.compressed=!0;else if(e.length===33)r.compressed=!1;else throw new Error("Length of buffer must be 33 (uncompressed) or 34 (compressed)");return r.bn=sa.fromBuffer(e.slice(1,33)),r};rt._transformBNBuffer=function(e,t){var r={};return r.network=na.get(t)||na.defaultNetwork,r.bn=sa.fromBuffer(e),r.compressed=!1,r};rt._transformWIF=function(e,t){return rt._transformBuffer(Dw.decode(e),t)};rt.fromBuffer=function(e,t){return new rt(e,t)};rt._transformObject=function(e){var t=new sa(e.bn,"hex"),r=na.get(e.network);return{bn:t,network:r,compressed:e.compressed}};rt.fromString=rt.fromWIF=function(e){return fh.checkArgument(ch.isString(e),"First argument is expected to be a string."),new rt(e)};rt.fromObject=function(e){return fh.checkArgument(ch.isObject(e),"First argument is expected to be an object."),new rt(e)};rt.fromRandom=function(e){var t=rt._getRandomBN();return new rt(t,e)};rt.getValidationError=function(e,t){var r;try{new rt(e,t)}catch(i){r=i}return r};rt.isValid=function(e,t){return e?!rt.getValidationError(e,t):!1};rt.prototype.toString=function(){return this.toBuffer().toString("hex")};rt.prototype.toWIF=function(){var e=this.network,t=this.compressed,r;return t?r=Buffer.concat([Buffer.from([e.privatekey]),this.bn.toBuffer({size:32}),Buffer.from([1])]):r=Buffer.concat([Buffer.from([e.privatekey]),this.bn.toBuffer({size:32})]),Dw.encode(r)};rt.prototype.toBigNumber=function(){return this.bn};rt.prototype.toBuffer=function(){return this.bn.toBuffer({size:32})};rt.prototype.toBufferNoPadding=function(){return this.bn.toBuffer()};rt.prototype.toPublicKey=function(){return this._pubkey||(this._pubkey=A7.fromPrivateKey(this)),this._pubkey};rt.prototype.toAddress=function(e,t){var r=this.toPublicKey();return R7.fromPublicKey(r,e||this.network,t)};rt.prototype.toObject=rt.prototype.toJSON=function(){return{bn:this.bn.toString("hex"),compressed:this.compressed,network:this.network.toString()}};rt.prototype.createTapTweak=function(e){let t=uh.getN(),r=uh.getG().mul(this.bn),i=r.y.isEven()?this.bn:t.sub(this.bn),n=new k7("TapTweak");n.write(r.x.toBuffer({size:32})),e&&(fh.checkArgument(Buffer.isBuffer(e)&&e.length===32,"merkleRoot must be 32 byte buffer"),n.write(e));let o=n.finalize();return fh.checkState(sa.fromBuffer(o).lt(t),"TapTweak hash failed secp256k1 order check"),{tweakedPrivKey:i.add(new sa(o)).mod(t).toBuffer({size:32})}};rt.prototype.inspect=function(){var e=this.compressed?"":", uncompressed";return"<PrivateKey: "+this.toString()+", network: "+this.network+e+">"};Fw.exports=rt});var Cn=X((oq,Vw)=>{"use strict";var Dn=Zr(),Xa=qa(),P7=Lr(),Hw=Rr(),zw=za(),hv=yt(),Ki=xt(),N7=Zs();function we(e,t){if(!(this instanceof we))return new we(e,t);if(Ki.checkArgument(e,"First argument is required, please include public key data."),e instanceof we)return e;t=t||{};var r=this._classifyArgs(e,t);return r.point.validate(),Hw.defineImmutable(this,{point:r.point,compressed:r.compressed,network:r.network||zw.defaultNetwork}),this}we.prototype._classifyArgs=function(e,t){var r={compressed:hv.isUndefined(t.compressed)||t.compressed};if(e instanceof Xa)r.point=e;else if(e.x&&e.y)r=we._transformObject(e);else if(typeof e=="string")r=we._transformDER(Buffer.from(e,"hex"));else if(we._isBuffer(e))r=we._transformDER(e);else if(we._isPrivateKey(e))r=we._transformPrivateKey(e);else throw new TypeError("First argument is an unrecognized data format.");return r.network||(r.network=hv.isUndefined(t.network)?void 0:zw.get(t.network)),r};we._isPrivateKey=function(e){var t=Wa();return e instanceof t};we._isBuffer=function(e){return e instanceof Buffer||e instanceof Uint8Array};we._transformPrivateKey=function(e){Ki.checkArgument(we._isPrivateKey(e),"Must be an instance of PrivateKey");var t={};return t.point=Xa.getG().mul(e.bn),t.compressed=e.compressed,t.network=e.network,t};we._transformDER=function(e,t){Ki.checkArgument(we._isBuffer(e),"Must be a hex buffer of DER encoded public key");var r={};t=hv.isUndefined(t)?!0:t;var i,n,o,u;if(e[0]===4||!t&&(e[0]===6||e[0]===7)){if(o=e.slice(1,33),u=e.slice(33,65),o.length!==32||u.length!==32||e.length!==65)throw new TypeError("Length of x and y must be 32 bytes");i=new Dn(o),n=new Dn(u),r.point=new Xa(i,n),r.compressed=!1}else if(e[0]===3)o=e.slice(1),i=new Dn(o),r=we._transformX(!0,i),r.compressed=!0;else if(e[0]===2)o=e.slice(1),i=new Dn(o),r=we._transformX(!1,i),r.compressed=!0;else throw new TypeError("Invalid DER format public key");return r};we._transformX=function(e,t){Ki.checkArgument(typeof e=="boolean","Must specify whether y is odd or not (true or false)");var r={};return r.point=Xa.fromX(e,t),r};we._transformObject=function(e){var t=new Dn(e.x,"hex"),r=new Dn(e.y,"hex"),i=new Xa(t,r);return new we(i,{compressed:e.compressed})};we.fromPrivateKey=function(e){Ki.checkArgument(we._isPrivateKey(e),"Must be an instance of PrivateKey");var t=we._transformPrivateKey(e);return new we(t.point,{compressed:t.compressed,network:t.network})};we.fromBuffer=function(e,t){return Ki.checkArgument(we._isBuffer(e),"Must be a hex buffer of DER encoded public key or 32 byte X coordinate (taproot)"),e.length===32?we.fromX(!1,e):we.fromDER(e,t)};we.fromDER=function(e,t){Ki.checkArgument(we._isBuffer(e),"Must be a hex buffer of DER encoded public key");var r=we._transformDER(e,t);return new we(r.point,{compressed:r.compressed})};we.fromPoint=function(e,t){return Ki.checkArgument(e instanceof Xa,"First argument must be an instance of Point."),new we(e,{compressed:t})};we.fromString=function(e,t){var r=Buffer.from(e,t||"hex"),i=we._transformDER(r);return new we(i.point,{compressed:i.compressed})};we.fromX=function(e,t){var r=we._transformX(e,t);return new we(r.point,{compressed:r.compressed})};we.fromTaproot=function(e){return typeof e=="string"&&Hw.isHexaString(e)&&(e=Buffer.from(e,"hex")),Ki.checkArgument(Buffer.isBuffer(e),"hexBuf must be a hex string or buffer"),Ki.checkArgument(e.length===32,"Taproot public keys must be 32 bytes"),new we.fromX(!1,e)};we.isValidTaproot=function(e){try{return!!we.fromTaproot(e)}catch{return!1}};we.prototype.computeTapTweakHash=function(e){let t=new N7("TapTweak");t.write(this.point.x.toBuffer({size:32})),e&&(Ki.checkArgument(Buffer.isBuffer(e)&&e.length===32,"merkleRoot must be 32 byte buffer"),t.write(e));let r=t.finalize(),i=Xa.getN();return Ki.checkState(Dn.fromBuffer(r).lt(i),"TapTweak hash failed secp256k1 order check"),r};we.prototype.checkTapTweak=function(e,t,r){Buffer.isBuffer(e)&&(e=we.fromTaproot(e));let i=e.computeTapTweakHash(t),o=e.point.liftX().add(this.point.curve.g.mul(Dn.fromBuffer(i)));return this.point.x.eq(o.x)&&o.y.mod(new Dn(2)).eq(new Dn(r[0]&1))};we.prototype.createTapTweak=function(e){Ki.checkArgument(e==null||Buffer.isBuffer(e)&&e.length===32,"merkleRoot must be a 32 byte buffer");let t=this.computeTapTweakHash(e);t=new Dn(t);let r=this.point.liftX().add(Xa.getG().mul(t));return{parity:r.y.isEven()?0:1,tweakedPubKey:r.x.toBuffer()}};we.getValidationError=function(e){var t;try{new we(e)}catch(r){t=r}return t};we.isValid=function(e){return!we.getValidationError(e)};we.prototype.toObject=we.prototype.toJSON=function(){return{x:this.point.getX().toString("hex",2),y:this.point.getY().toString("hex",2),compressed:this.compressed}};we.prototype.toBuffer=we.prototype.toDER=function(){var e=this.point.getX(),t=this.point.getY(),r=e.toBuffer({size:32}),i=t.toBuffer({size:32}),n;if(this.compressed){var o=i[i.length-1]%2;return o?n=Buffer.from([3]):n=Buffer.from([2]),Buffer.concat([n,r])}else return n=Buffer.from([4]),Buffer.concat([n,r,i])};we.prototype._getID=function(){return P7.sha256ripemd160(this.toBuffer())};we.prototype.toAddress=function(e,t){var r=Mn();return r.fromPublicKey(this,e||this.network,t)};we.prototype.toString=function(){return this.toDER().toString("hex")};we.prototype.inspect=function(){return"<PublicKey: "+this.toString()+(this.compressed?"":", uncompressed")+">"};Vw.exports=we});var uf=X((cq,vv)=>{"use strict";var Gi=Zr(),vn=qa(),jw=li(),Ww=Cn(),B7=gf(),Ja=Lr(),Kw=Yt(),dv=xt(),M7=function(e,t,r){for(var i=0;i<4;i++){var n;try{n=mv(e,t,i)}catch(o){console.error(o);continue}if(n.point.eq(r.point))return t.i=i,t.compressed=r.compressed,t}throw new Error("Unable to find valid recovery factor")},mv=function(e,t,r){dv.checkArgument(r===0||r===1||r===2||r===3,new Error("i must be equal to 0, 1, 2, or 3"));var i=Gi.fromBuffer(e),n=t.r,o=t.s,u=r&1,m=r>>1,_=vn.getN(),w=vn.getG(),I=m?n.add(_):n,T=vn.fromX(u,I),N=T.mul(_);if(!N.isInfinity())throw new Error("nR is not a valid curve point");var C=i.neg().umod(_),B=n.invm(_),U=T.mul(o).add(w.mul(C)).mul(B),Z=Ww.fromPoint(U,t.compressed);return Z},C7=function(e,t){return mv(e,t,t.i)},Gw=function(){var e=vn.getN(),t;do t=Gi.fromBuffer(B7.getRandomBuffer(32));while(!(t.lt(e)&&t.gt(Gi.Zero)));return t},$w=function(e,t,r){r||(r=0);var i=Buffer.alloc(32);i.fill(1);var n=Buffer.alloc(32);n.fill(0);var o=t.bn.toBuffer({size:32});n=Ja.sha256hmac(Buffer.concat([i,Buffer.from([0]),o,e]),n),i=Ja.sha256hmac(i,n),n=Ja.sha256hmac(Buffer.concat([i,Buffer.from([1]),o,e]),n),i=Ja.sha256hmac(i,n),i=Ja.sha256hmac(i,n);for(var u=Gi.fromBuffer(i),m=vn.getN(),_=0;_<r||!(u.lt(m)&&u.gt(Gi.Zero));_++)n=Ja.sha256hmac(Buffer.concat([i,Buffer.from([0])]),n),i=Ja.sha256hmac(i,n),i=Ja.sha256hmac(i,n),u=Gi.fromBuffer(i);return u},Yw=function(e){return e.gt(new Gi("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex"))&&(e=vn.getN().sub(e)),e},L7=function(e,t,r){let{endian:i="big",randomK:n=!1}=r||{};dv.checkState(Kw.isBuffer(e)&&e.length===32,"hashbuf must be a 32 byte buffer"),dv.checkState(t&&t.bn,"privkey must be a PrivateKey");var o=t.bn;e=Buffer.from(e),i==="little"&&e.reverse();var u=Gi.fromBuffer(e),m=vn.getN(),_=vn.getG(),w=0,I,T,N,C;do I=n?Gw():$w(e,t,w),w++,T=_.mul(I),N=T.x.umod(m),C=I.invm(m).mul(u.add(o.mul(N))).umod(m);while(N.cmp(Gi.Zero)<=0||C.cmp(Gi.Zero)<=0);return C=Yw(C),new jw({s:C,r:N,compressed:t.publicKey.compressed})},Zw=function(e,t,r,i){let{endian:n="big"}=i||{};if(!Kw.isBuffer(e)||e.length!==32)return"hashbuf must be a 32 byte buffer";var o=t.r,u=t.s;if(!(o.gt(Gi.Zero)&&o.lt(vn.getN()))||!(u.gt(Gi.Zero)&&u.lt(vn.getN())))return"r and s not in range";var m=Gi.fromBuffer(e,{endian:n}),_=vn.getN(),w=u.invm(_),I=w.mul(m).umod(_),T=w.mul(o).umod(_),N=vn.getG().mulAdd(I,r.point,T);if(N.isInfinity())return"p is infinity";if(N.getX().umod(_).cmp(o)!==0)return"Invalid signature"},U7=function(e,t,r,i){if(!r)throw new Error("pubkey required for signature verification");if(r=new Ww(r),!t)throw new Error("signature required for verification");return t=new jw(t),!Zw(e,t,r,i)};vv.exports={sign:L7,verify:U7,verificationError:Zw,calci:M7,recoverPublicKey:C7};vv.exports.__testing__={getDeterministicK:$w,getPublicKey:mv,getRandomK:Gw,toLowS:Yw}});var eS=X((uq,Qw)=>{"use strict";var Xw=ti(),Jw=ps(),D7=Zr(),qn=function e(t){if(!(this instanceof e))return new e(t);if(Buffer.isBuffer(t))this.buf=t;else if(typeof t=="number"){var r=t;this.fromNumber(r)}else if(t instanceof D7){var i=t;this.fromBN(i)}else if(t){var n=t;this.set(n)}};qn.prototype.set=function(e){return this.buf=e.buf||this.buf,this};qn.prototype.fromString=function(e){return this.set({buf:Buffer.from(e,"hex")}),this};qn.prototype.toString=function(){return this.buf.toString("hex")};qn.prototype.fromBuffer=function(e){return this.buf=e,this};qn.prototype.fromBufferReader=function(e){return this.buf=e.readVarintBuf(),this};qn.prototype.fromBN=function(e){return this.buf=Xw().writeVarintBN(e).concat(),this};qn.prototype.fromNumber=function(e){return this.buf=Xw().writeVarintNum(e).concat(),this};qn.prototype.toBuffer=function(){return this.buf};qn.prototype.toBN=function(){return Jw(this.buf).readVarintBN()};qn.prototype.toNumber=function(){return Jw(this.buf).readVarintNum()};Qw.exports=qn});var bf=X((lq,iS)=>{"use strict";var lh=yt(),xf=Zr(),uu=Yt(),ph=ps(),q7=ti(),F7=Lr(),fq=Rr(),tS=xt(),H7=486604799,mt=function e(t){if(!(this instanceof e))return new e(t);var r=e._from(t);return this.version=r.version,this.prevHash=r.prevHash,this.merkleRoot=r.merkleRoot,this.time=r.time,this.timestamp=r.time,this.bits=r.bits,this.nonce=r.nonce,r.hash&&tS.checkState(this.hash===r.hash,"Argument object hash property does not match block hash."),this};mt._from=function(t){var r={};if(uu.isBuffer(t))r=mt._fromBufferReader(ph(t));else if(lh.isObject(t))r=mt._fromObject(t);else throw new TypeError("Unrecognized argument for BlockHeader");return r};mt._fromObject=function(t){tS.checkArgument(t,"data is required");var r=t.prevHash,i=t.merkleRoot;lh.isString(t.prevHash)&&(r=uu.reverse(Buffer.from(t.prevHash,"hex"))),lh.isString(t.merkleRoot)&&(i=uu.reverse(Buffer.from(t.merkleRoot,"hex")));var n={hash:t.hash,version:t.version,prevHash:r,merkleRoot:i,time:t.time,timestamp:t.time,bits:t.bits,nonce:t.nonce};return n};mt.fromObject=function(t){var r=mt._fromObject(t);return new mt(r)};mt.fromRawBlock=function(t){uu.isBuffer(t)||(t=Buffer.from(t,"binary"));var r=ph(t);r.pos=mt.Constants.START_OF_HEADER;var i=mt._fromBufferReader(r);return new mt(i)};mt.fromBuffer=function(t){var r=mt._fromBufferReader(ph(t));return new mt(r)};mt.fromString=function(t){var r=Buffer.from(t,"hex");return mt.fromBuffer(r)};mt._fromBufferReader=function(t){var r={};return r.version=t.readInt32LE(),r.prevHash=t.read(32),r.merkleRoot=t.read(32),r.time=t.readUInt32LE(),r.bits=t.readUInt32LE(),r.nonce=t.readUInt32LE(),r};mt.fromBufferReader=function(t){var r=mt._fromBufferReader(t);return new mt(r)};mt.prototype.toObject=mt.prototype.toJSON=function(){return{hash:this.hash,version:this.version,prevHash:uu.reverse(this.prevHash).toString("hex"),merkleRoot:uu.reverse(this.merkleRoot).toString("hex"),time:this.time,bits:this.bits,nonce:this.nonce}};mt.prototype.toBuffer=function(){return this.toBufferWriter().concat()};mt.prototype.toString=function(){return this.toBuffer().toString("hex")};mt.prototype.toBufferWriter=function(t){return t||(t=new q7),t.writeInt32LE(this.version),t.write(this.prevHash),t.write(this.merkleRoot),t.writeUInt32LE(this.time),t.writeUInt32LE(this.bits),t.writeUInt32LE(this.nonce),t};mt.prototype.getTargetDifficulty=function(t){t=t||this.bits;for(var r=new xf(t&16777215),i=8*((t>>>24)-3);i-- >0;)r=r.mul(new xf(2));return r};mt.prototype.getDifficulty=function(){var t=this.getTargetDifficulty(H7).mul(new xf(Math.pow(10,8))),r=this.getTargetDifficulty(),i=t.div(r).toString(10),n=i.length-8;return i=i.slice(0,n)+"."+i.slice(n),parseFloat(i)};mt.prototype._getHash=function(){var t=this.toBuffer();return F7.sha256sha256(t)};var rS={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=ph(this._getHash()).readReverse().toString("hex")),this._id},set:lh.noop};Object.defineProperty(mt.prototype,"id",rS);Object.defineProperty(mt.prototype,"hash",rS);mt.prototype.validTimestamp=function(){var t=Math.round(new Date().getTime()/1e3);return!(this.time>t+mt.Constants.MAX_TIME_OFFSET)};mt.prototype.validProofOfWork=function(){var t=new xf(this.id,"hex"),r=this.getTargetDifficulty();return!(t.cmp(r)>0)};mt.prototype.inspect=function(){return"<BlockHeader "+this.id+">"};mt.Constants={START_OF_HEADER:8,MAX_TIME_OFFSET:2*60*60,LARGEST_HASH:new xf("10000000000000000000000000000000000000000000000000000000000000000","hex")};iS.exports=mt});var fS=X((pq,uS)=>{"use strict";var xv=yt(),sS=bf(),nS=Zr(),aS=Yt(),bv=ps(),z7=ti(),V7=Lr(),gv=mf(),oS=xt();function lt(e){return this instanceof lt?(xv.extend(this,lt._from(e)),this):new lt(e)}lt.MAX_BLOCK_SIZE=1e6;lt._from=function(t){var r={};if(aS.isBuffer(t))r=lt._fromBufferReader(bv(t));else if(xv.isObject(t))r=lt._fromObject(t);else throw new TypeError("Unrecognized argument for Block");return r};lt._fromObject=function(t){var r=[];t.transactions.forEach(function(n){n instanceof gv?r.push(n):r.push(gv().fromObject(n))});var i={header:sS.fromObject(t.header),transactions:r};return i};lt.fromObject=function(t){var r=lt._fromObject(t);return new lt(r)};lt._fromBufferReader=function(t){var r={};oS.checkState(!t.finished(),"No block data received"),r.header=sS.fromBufferReader(t);var i=t.readVarintNum();r.transactions=[];for(var n=0;n<i;n++)r.transactions.push(gv().fromBufferReader(t));return r};lt.fromBufferReader=function(t){oS.checkArgument(t,"br is required");var r=lt._fromBufferReader(t);return new lt(r)};lt.fromBuffer=function(t){return lt.fromBufferReader(new bv(t))};lt.fromString=function(t){var r=Buffer.from(t,"hex");return lt.fromBuffer(r)};lt.fromRawBlock=function(t){aS.isBuffer(t)||(t=Buffer.from(t,"binary"));var r=bv(t);r.pos=lt.Values.START_OF_BLOCK;var i=lt._fromBufferReader(r);return new lt(i)};lt.prototype.toObject=lt.prototype.toJSON=function(){var t=[];return this.transactions.forEach(function(r){t.push(r.toObject())}),{header:this.header.toObject(),transactions:t}};lt.prototype.toBuffer=function(){return this.toBufferWriter().concat()};lt.prototype.toString=function(){return this.toBuffer().toString("hex")};lt.prototype.toBufferWriter=function(t){t||(t=new z7),t.write(this.header.toBuffer()),t.writeVarintNum(this.transactions.length);for(var r=0;r<this.transactions.length;r++)this.transactions[r].toBufferWriter(t);return t};lt.prototype.getTransactionHashes=function(){var t=[];if(this.transactions.length===0)return[lt.Values.NULL_HASH];for(var r=0;r<this.transactions.length;r++)t.push(this.transactions[r]._getHash());return t};lt.prototype.getMerkleTree=function(){for(var t=this.getTransactionHashes(),r=0,i=this.transactions.length;i>1;i=Math.floor((i+1)/2)){for(var n=0;n<i;n+=2){var o=Math.min(n+1,i-1),u=Buffer.concat([t[r+n],t[r+o]]);t.push(V7.sha256sha256(u))}r+=i}return t};lt.prototype.getMerkleRoot=function(){var t=this.getMerkleTree();return t[t.length-1]};lt.prototype.validMerkleRoot=function(){var t=new nS(this.header.merkleRoot.toString("hex"),"hex"),r=new nS(this.getMerkleRoot().toString("hex"),"hex");return t.cmp(r)===0};lt.prototype._getHash=function(){return this.header._getHash()};var cS={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=this.header.id),this._id},set:xv.noop};Object.defineProperty(lt.prototype,"id",cS);Object.defineProperty(lt.prototype,"hash",cS);lt.prototype.inspect=function(){return"<Block "+this.id+">"};lt.Values={START_OF_BLOCK:8,NULL_HASH:Buffer.from("0000000000000000000000000000000000000000000000000000000000000000","hex")};uS.exports=lt});var Sv=X((dq,hS)=>{"use strict";var Ko=yt(),yv=bf(),wv=Yt(),pS=ps(),j7=ti(),W7=Lr(),hq=Rr(),lS=mf(),_v=ji(),Go=xt();function Sr(e){if(!(this instanceof Sr))return new Sr(e);var t={};if(wv.isBuffer(e))t=Sr._fromBufferReader(pS(e));else if(Ko.isObject(e)){var r;e.header instanceof yv?r=e.header:r=yv.fromObject(e.header),t={header:r,numTransactions:e.numTransactions,hashes:e.hashes,flags:e.flags}}else throw new TypeError("Unrecognized argument for MerkleBlock");return Ko.extend(this,t),this._flagBitsUsed=0,this._hashesUsed=0,this}Sr.fromBuffer=function(t){return Sr.fromBufferReader(pS(t))};Sr.fromBufferReader=function(t){return new Sr(Sr._fromBufferReader(t))};Sr.prototype.toBuffer=function(){return this.toBufferWriter().concat()};Sr.prototype.toBufferWriter=function(t){t||(t=new j7),t.write(this.header.toBuffer()),t.writeUInt32LE(this.numTransactions),t.writeVarintNum(this.hashes.length);for(var r=0;r<this.hashes.length;r++)t.write(Buffer.from(this.hashes[r],"hex"));for(t.writeVarintNum(this.flags.length),r=0;r<this.flags.length;r++)t.writeUInt8(this.flags[r]);return t};Sr.prototype.toObject=Sr.prototype.toJSON=function(){return{header:this.header.toObject(),numTransactions:this.numTransactions,hashes:this.hashes,flags:this.flags}};Sr.prototype.validMerkleTree=function(){if(Go.checkState(Ko.isArray(this.flags),"MerkleBlock flags is not an array"),Go.checkState(Ko.isArray(this.hashes),"MerkleBlock hashes is not an array"),this.hashes.length>this.numTransactions||this.flags.length*8<this.hashes.length)return!1;var t=this._calcTreeHeight(),r={hashesUsed:0,flagBitsUsed:0},i=this._traverseMerkleTree(t,0,r);return r.hashesUsed!==this.hashes.length?!1:wv.equals(i,this.header.merkleRoot)};Sr.prototype.filterdTxsHash=function(){if(Go.checkState(Ko.isArray(this.flags),"MerkleBlock flags is not an array"),Go.checkState(Ko.isArray(this.hashes),"MerkleBlock hashes is not an array"),this.hashes.length>this.numTransactions)throw new _v.MerkleBlock.InvalidMerkleTree;if(this.flags.length*8<this.hashes.length)throw new _v.MerkleBlock.InvalidMerkleTree;if(this.hashes.length===1)return[];var t=this._calcTreeHeight(),r={hashesUsed:0,flagBitsUsed:0},i=this._traverseMerkleTree(t,0,r,!0);if(r.hashesUsed!==this.hashes.length)throw new _v.MerkleBlock.InvalidMerkleTree;return i};Sr.prototype._traverseMerkleTree=function(t,r,i,o){i=i||{},i.txs=i.txs||[],i.flagBitsUsed=i.flagBitsUsed||0,i.hashesUsed=i.hashesUsed||0;var o=o||!1;if(i.flagBitsUsed>this.flags.length*8)return null;var u=this.flags[i.flagBitsUsed>>3]>>>(i.flagBitsUsed++&7)&1;if(t===0||!u){if(i.hashesUsed>=this.hashes.length)return null;var m=this.hashes[i.hashesUsed++];return t===0&&u&&i.txs.push(m),Buffer.from(m,"hex")}else{var _=this._traverseMerkleTree(t-1,r*2,i),w=_;return r*2+1<this._calcTreeWidth(t-1)&&(w=this._traverseMerkleTree(t-1,r*2+1,i)),o?i.txs:W7.sha256sha256(new Buffer.concat([_,w]))}};Sr.prototype._calcTreeWidth=function(t){return this.numTransactions+(1<<t)-1>>t};Sr.prototype._calcTreeHeight=function(){for(var t=0;this._calcTreeWidth(t)>1;)t++;return t};Sr.prototype.hasTransaction=function(t){Go.checkArgument(!Ko.isUndefined(t),"tx cannot be undefined"),Go.checkArgument(t instanceof lS||typeof t=="string",'Invalid tx given, tx must be a "string" or "Transaction"');var r=t;t instanceof lS&&(r=wv.reverse(Buffer.from(t.id,"hex")).toString("hex"));var i=[],n=this._calcTreeHeight();return this._traverseMerkleTree(n,0,{txs:i}),i.indexOf(r)!==-1};Sr._fromBufferReader=function(t){Go.checkState(!t.finished(),"No merkleblock data received");var r={};r.header=yv.fromBufferReader(t),r.numTransactions=t.readUInt32LE();var i=t.readVarintNum();r.hashes=[];for(var n=0;n<i;n++)r.hashes.push(t.read(32).toString("hex"));var o=t.readVarintNum();for(r.flags=[],n=0;n<o;n++)r.flags.push(t.readUInt8());return r};Sr.fromObject=function(t){return new Sr(t)};hS.exports=Sr});var dS=X((mq,hh)=>{hh.exports=fS();hh.exports.BlockHeader=bf();hh.exports.MerkleBlock=Sv()});var Iv=X((vq,yS)=>{"use strict";var Ur=yt(),vS=xt(),gS=Zr(),K7=af(),dh=Kc(),xS=Lr(),mh=Tv(),$o=za(),Ev=qa(),bS=Cn(),_S=ji(),_f=_S,Fn=_S.HDPublicKey,vh=require("assert"),mS=Rr(),Nt=Yt();function ne(e){if(e instanceof ne)return e;if(!(this instanceof ne))return new ne(e);if(e)if(Ur.isString(e)||Nt.isBuffer(e)){var t=ne.getSerializedError(e);if(t){if(Nt.isBuffer(e)&&!ne.getSerializedError(e.toString()))return this._buildFromSerialized(e.toString());if(t instanceof Fn.ArgumentIsPrivateExtended)return new mh(e).hdPublicKey;throw t}else return this._buildFromSerialized(e)}else{if(Ur.isObject(e))return e instanceof mh?this._buildFromPrivate(e):this._buildFromObject(e);throw new Fn.UnrecognizedArgument(e)}else throw new Fn.MustSupplyArgument}ne.isValidPath=function(e){if(Ur.isString(e)){var t=mh._getDerivationIndexes(e);return t!==null&&Ur.every(t,ne.isValidPath)}return Ur.isNumber(e)?e>=0&&e<ne.Hardened:!1};ne.prototype.derive=function(e,t){return this.deriveChild(e,t)};ne.prototype.deriveChild=function(e,t){if(Ur.isNumber(e))return this._deriveWithNumber(e,t);if(Ur.isString(e))return this._deriveFromString(e);throw new Fn.InvalidDerivationArgument(e)};ne.prototype._deriveWithNumber=function(e,t){if(e>=ne.Hardened||t)throw new Fn.InvalidIndexCantDeriveHardened;if(e<0)throw new Fn.InvalidPath(e);var r=Nt.integerAsBuffer(e),i=Nt.concat([this.publicKey.toBuffer(),r]),n=xS.sha512hmac(i,this._buffers.chainCode),o=gS.fromBuffer(n.slice(0,32),{size:32}),u=n.slice(32,64),m;try{m=bS.fromPoint(Ev.getG().mul(o).add(this.publicKey.point))}catch{return this._deriveWithNumber(e+1)}var _=new ne({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:u,publicKey:m});return _};ne.prototype._deriveFromString=function(e){if(Ur.includes(e,"'"))throw new Fn.InvalidIndexCantDeriveHardened;if(!ne.isValidPath(e))throw new Fn.InvalidPath(e);var t=mh._getDerivationIndexes(e),r=t.reduce(function(i,n){return i._deriveWithNumber(n)},this);return r};ne.isValidSerialized=function(e,t){return Ur.isNull(ne.getSerializedError(e,t))};ne.getSerializedError=function(e,t){if(!(Ur.isString(e)||Nt.isBuffer(e)))return new Fn.UnrecognizedArgument("expected buffer or string");if(!K7.validCharacters(e))return new _f.InvalidB58Char("(unknown)",e);try{e=dh.decode(e)}catch{return new _f.InvalidB58Checksum(e)}if(e.length!==ne.DataSize)return new Fn.InvalidLength(e);if(!Ur.isUndefined(t)){var r=ne._validateNetwork(e,t);if(r)return r}var i=Nt.integerFromBuffer(e.slice(0,4));return i===$o.livenet.xprivkey||i===$o.testnet.xprivkey?new Fn.ArgumentIsPrivateExtended:null};ne._validateNetwork=function(e,t){var r=$o.get(t);if(!r)return new _f.InvalidNetworkArgument(t);var i=e.slice(ne.VersionStart,ne.VersionEnd);return Nt.integerFromBuffer(i)!==r.xpubkey?new _f.InvalidNetwork(i):null};ne.prototype._buildFromPrivate=function(e){var t=Ur.clone(e._buffers),r=Ev.getG().mul(gS.fromBuffer(t.privateKey));return t.publicKey=Ev.pointToCompressed(r),t.version=Nt.integerAsBuffer($o.get(Nt.integerFromBuffer(t.version)).xpubkey),t.privateKey=void 0,t.checksum=void 0,t.xprivkey=void 0,this._buildFromBuffers(t)};ne.prototype._buildFromObject=function(e){var t={version:e.network?Nt.integerAsBuffer($o.get(e.network).xpubkey):e.version,depth:Ur.isNumber(e.depth)?Nt.integerAsSingleByteBuffer(e.depth):e.depth,parentFingerPrint:Ur.isNumber(e.parentFingerPrint)?Nt.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:Ur.isNumber(e.childIndex)?Nt.integerAsBuffer(e.childIndex):e.childIndex,chainCode:Ur.isString(e.chainCode)?Buffer.from(e.chainCode,"hex"):e.chainCode,publicKey:Ur.isString(e.publicKey)?Buffer.from(e.publicKey,"hex"):Nt.isBuffer(e.publicKey)?e.publicKey:e.publicKey.toBuffer(),checksum:Ur.isNumber(e.checksum)?Nt.integerAsBuffer(e.checksum):e.checksum};return this._buildFromBuffers(t)};ne.prototype._buildFromSerialized=function(e){var t=dh.decode(e),r={version:t.slice(ne.VersionStart,ne.VersionEnd),depth:t.slice(ne.DepthStart,ne.DepthEnd),parentFingerPrint:t.slice(ne.ParentFingerPrintStart,ne.ParentFingerPrintEnd),childIndex:t.slice(ne.ChildIndexStart,ne.ChildIndexEnd),chainCode:t.slice(ne.ChainCodeStart,ne.ChainCodeEnd),publicKey:t.slice(ne.PublicKeyStart,ne.PublicKeyEnd),checksum:t.slice(ne.ChecksumStart,ne.ChecksumEnd),xpubkey:e};return this._buildFromBuffers(r)};ne.prototype._buildFromBuffers=function(e){ne._validateBufferArguments(e),mS.defineImmutable(this,{_buffers:e});var t=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,e.publicKey],r=Nt.concat(t),i=dh.checksum(r);if(!e.checksum||!e.checksum.length)e.checksum=i;else if(e.checksum.toString("hex")!==i.toString("hex"))throw new _f.InvalidB58Checksum(r,i);var n=$o.get(Nt.integerFromBuffer(e.version)),o;o=dh.encode(Nt.concat(t)),e.xpubkey=Buffer.from(o);var u=new bS(e.publicKey,{network:n}),m=ne.ParentFingerPrintSize,_=xS.sha256ripemd160(u.toBuffer()).slice(0,m);return mS.defineImmutable(this,{xpubkey:o,network:n,depth:Nt.integerFromSingleByteBuffer(e.depth),publicKey:u,fingerPrint:_}),this};ne._validateBufferArguments=function(e){var t=function(r,i){var n=e[r];vh(Nt.isBuffer(n),r+" argument is not a buffer, it's "+typeof n),vh(n.length===i,r+" has not the expected size: found "+n.length+", expected "+i)};t("version",ne.VersionSize),t("depth",ne.DepthSize),t("parentFingerPrint",ne.ParentFingerPrintSize),t("childIndex",ne.ChildIndexSize),t("chainCode",ne.ChainCodeSize),t("publicKey",ne.PublicKeySize),e.checksum&&e.checksum.length&&t("checksum",ne.CheckSumSize)};ne.fromString=function(e){return vS.checkArgument(Ur.isString(e),"No valid string was provided"),new ne(e)};ne.fromObject=function(e){return vS.checkArgument(Ur.isObject(e),"No valid argument was provided"),new ne(e)};ne.prototype.toString=function(){return this.xpubkey};ne.prototype.inspect=function(){return"<HDPublicKey: "+this.xpubkey+">"};ne.prototype.toObject=ne.prototype.toJSON=function(){return{network:$o.get(Nt.integerFromBuffer(this._buffers.version)).name,depth:Nt.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:Nt.integerFromBuffer(this.fingerPrint),parentFingerPrint:Nt.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:Nt.integerFromBuffer(this._buffers.childIndex),chainCode:Nt.bufferToHex(this._buffers.chainCode),publicKey:this.publicKey.toString(),checksum:Nt.integerFromBuffer(this._buffers.checksum),xpubkey:this.xpubkey}};ne.fromBuffer=function(e){return new ne(e)};ne.prototype.toBuffer=function(){return Nt.copy(this._buffers.xpubkey)};ne.Hardened=2147483648;ne.RootElementAlias=["m","M"];ne.VersionSize=4;ne.DepthSize=1;ne.ParentFingerPrintSize=4;ne.ChildIndexSize=4;ne.ChainCodeSize=32;ne.PublicKeySize=33;ne.CheckSumSize=4;ne.DataSize=78;ne.SerializedByteSize=82;ne.VersionStart=0;ne.VersionEnd=ne.VersionStart+ne.VersionSize;ne.DepthStart=ne.VersionEnd;ne.DepthEnd=ne.DepthStart+ne.DepthSize;ne.ParentFingerPrintStart=ne.DepthEnd;ne.ParentFingerPrintEnd=ne.ParentFingerPrintStart+ne.ParentFingerPrintSize;ne.ChildIndexStart=ne.ParentFingerPrintEnd;ne.ChildIndexEnd=ne.ChildIndexStart+ne.ChildIndexSize;ne.ChainCodeStart=ne.ChildIndexEnd;ne.ChainCodeEnd=ne.ChainCodeStart+ne.ChainCodeSize;ne.PublicKeyStart=ne.ChainCodeEnd;ne.PublicKeyEnd=ne.PublicKeyStart+ne.PublicKeySize;ne.ChecksumStart=ne.PublicKeyEnd;ne.ChecksumEnd=ne.ChecksumStart+ne.CheckSumSize;vh(ne.PublicKeyEnd===ne.DataSize);vh(ne.ChecksumEnd===ne.SerializedByteSize);yS.exports=ne});var Tv=X((gq,RS)=>{"use strict";var gh=require("assert"),wS=require("buffer"),Nr=yt(),ES=xt(),IS=Zr(),G7=af(),yf=Kc(),Rv=Lr(),Yo=za(),$7=qa(),TS=Wa(),Y7=gf(),fu=ji(),ds=fu.HDPrivateKey,hr=Yt(),wf=Rr(),Z7=128,SS=1/8,X7=512;function J(e){if(e instanceof J)return e;if(!(this instanceof J))return new J(e);if(!e)return this._generateRandomly();if(Yo.get(e))return this._generateRandomly(e);if(Nr.isString(e)||hr.isBuffer(e))if(J.isValidSerialized(e))this._buildFromSerialized(e);else if(wf.isValidJSON(e))this._buildFromJSON(e);else if(hr.isBuffer(e)&&J.isValidSerialized(e.toString()))this._buildFromSerialized(e.toString());else throw J.getSerializedError(e);else if(Nr.isObject(e))this._buildFromObject(e);else throw new ds.UnrecognizedArgument(e)}J.isValidPath=function(e,t){if(Nr.isString(e)){var r=J._getDerivationIndexes(e);return r!==null&&Nr.every(r,J.isValidPath)}return Nr.isNumber(e)?(e<J.Hardened&&t===!0&&(e+=J.Hardened),e>=0&&e<J.MaxIndex):!1};J._getDerivationIndexes=function(e){var t=e.split("/");if(Nr.includes(J.RootElementAlias,e))return[];if(!Nr.includes(J.RootElementAlias,t[0]))return null;var r=t.slice(1).map(function(i){var n=i.slice(-1)==="'";if(n&&(i=i.slice(0,-1)),!i||i[0]==="-")return NaN;var o=+i;return n&&(o+=J.Hardened),o});return Nr.some(r,isNaN)?null:r};J.prototype.derive=function(e,t){return this.deriveNonCompliantChild(e,t)};J.prototype.deriveChild=function(e,t){if(Nr.isNumber(e))return this._deriveWithNumber(e,t);if(Nr.isString(e))return this._deriveFromString(e);throw new ds.InvalidDerivationArgument(e)};J.prototype.deriveNonCompliantChild=function(e,t){if(Nr.isNumber(e))return this._deriveWithNumber(e,t,!0);if(Nr.isString(e))return this._deriveFromString(e,!0);throw new ds.InvalidDerivationArgument(e)};J.prototype._deriveWithNumber=function(e,t,r){if(!J.isValidPath(e,t))throw new ds.InvalidPath(e);t=e>=J.Hardened?!0:t,e<J.Hardened&&t===!0&&(e+=J.Hardened);var i=hr.integerAsBuffer(e),n;if(t&&r){var o=this.privateKey.bn.toBuffer();n=hr.concat([Buffer.from([0]),o,i])}else if(t){var u=this.privateKey.bn.toBuffer({size:32});gh(u.length===32,"length of private key buffer is expected to be 32 bytes"),n=hr.concat([Buffer.from([0]),u,i])}else n=hr.concat([this.publicKey.toBuffer(),i]);var m=Rv.sha512hmac(n,this._buffers.chainCode),_=IS.fromBuffer(m.slice(0,32),{size:32}),w=m.slice(32,64),I=_.add(this.privateKey.toBigNumber()).umod($7.getN()).toBuffer({size:32});if(!TS.isValid(I))return this._deriveWithNumber(e+1,null,r);var T=new J({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:e,chainCode:w,privateKey:I});return T};J.prototype._deriveFromString=function(e,t){if(!J.isValidPath(e))throw new ds.InvalidPath(e);var r=J._getDerivationIndexes(e),i=r.reduce(function(n,o){return n._deriveWithNumber(o,null,t)},this);return i};J.isValidSerialized=function(e,t){return!J.getSerializedError(e,t)};J.getSerializedError=function(e,t){if(!(Nr.isString(e)||hr.isBuffer(e)))return new ds.UnrecognizedArgument("Expected string or buffer");if(!G7.validCharacters(e))return new fu.InvalidB58Char("(unknown)",e);try{e=yf.decode(e)}catch{return new fu.InvalidB58Checksum(e)}if(e.length!==J.DataLength)return new ds.InvalidLength(e);if(!Nr.isUndefined(t)){var r=J._validateNetwork(e,t);if(r)return r}return null};J._validateNetwork=function(e,t){var r=Yo.get(t);if(!r)return new fu.InvalidNetworkArgument(t);var i=e.slice(0,4);return hr.integerFromBuffer(i)!==r.xprivkey?new fu.InvalidNetwork(i):null};J.fromString=function(e){return ES.checkArgument(Nr.isString(e),"No valid string was provided"),new J(e)};J.fromObject=function(e){return ES.checkArgument(Nr.isObject(e),"No valid argument was provided"),new J(e)};J.prototype._buildFromJSON=function(e){return this._buildFromObject(JSON.parse(e))};J.prototype._buildFromObject=function(e){var t={version:e.network?hr.integerAsBuffer(Yo.get(e.network).xprivkey):e.version,depth:Nr.isNumber(e.depth)?hr.integerAsSingleByteBuffer(e.depth):e.depth,parentFingerPrint:Nr.isNumber(e.parentFingerPrint)?hr.integerAsBuffer(e.parentFingerPrint):e.parentFingerPrint,childIndex:Nr.isNumber(e.childIndex)?hr.integerAsBuffer(e.childIndex):e.childIndex,chainCode:Nr.isString(e.chainCode)?Buffer.from(e.chainCode,"hex"):e.chainCode,privateKey:Nr.isString(e.privateKey)&&wf.isHexa(e.privateKey)?Buffer.from(e.privateKey,"hex"):e.privateKey,checksum:e.checksum?e.checksum.length?e.checksum:hr.integerAsBuffer(e.checksum):void 0};return this._buildFromBuffers(t)};J.prototype._buildFromSerialized=function(e){var t=yf.decode(e),r={version:t.slice(J.VersionStart,J.VersionEnd),depth:t.slice(J.DepthStart,J.DepthEnd),parentFingerPrint:t.slice(J.ParentFingerPrintStart,J.ParentFingerPrintEnd),childIndex:t.slice(J.ChildIndexStart,J.ChildIndexEnd),chainCode:t.slice(J.ChainCodeStart,J.ChainCodeEnd),privateKey:t.slice(J.PrivateKeyStart,J.PrivateKeyEnd),checksum:t.slice(J.ChecksumStart,J.ChecksumEnd),xprivkey:e};return this._buildFromBuffers(r)};J.prototype._generateRandomly=function(e){return J.fromSeed(Y7.getRandomBuffer(64),e)};J.fromSeed=function(e,t){if(wf.isHexaString(e)&&(e=Buffer.from(e,"hex")),!Buffer.isBuffer(e))throw new ds.InvalidEntropyArgument(e);if(e.length<Z7*SS)throw new ds.InvalidEntropyArgument.NotEnoughEntropy(e);if(e.length>X7*SS)throw new ds.InvalidEntropyArgument.TooMuchEntropy(e);var r=Rv.sha512hmac(e,Buffer.from("Bitcoin seed"));return new J({network:Yo.get(t)||Yo.defaultNetwork,depth:0,parentFingerPrint:0,childIndex:0,privateKey:r.slice(0,32),chainCode:r.slice(32,64)})};J.prototype._calcHDPublicKey=function(){if(!this._hdPublicKey){var e=Iv();this._hdPublicKey=new e(this)}};J.prototype._buildFromBuffers=function(e){J._validateBufferArguments(e),wf.defineImmutable(this,{_buffers:e});var t=[e.version,e.depth,e.parentFingerPrint,e.childIndex,e.chainCode,hr.emptyBuffer(1),e.privateKey],r=wS.Buffer.concat(t);if(!e.checksum||!e.checksum.length)e.checksum=yf.checksum(r);else if(e.checksum.toString()!==yf.checksum(r).toString())throw new fu.InvalidB58Checksum(r);var i=Yo.get(hr.integerFromBuffer(e.version)),n;n=yf.encode(wS.Buffer.concat(t)),e.xprivkey=Buffer.from(n);var o=new TS(IS.fromBuffer(e.privateKey),i),u=o.toPublicKey(),m=J.ParentFingerPrintSize,_=Rv.sha256ripemd160(u.toBuffer()).slice(0,m);return wf.defineImmutable(this,{xprivkey:n,network:i,depth:hr.integerFromSingleByteBuffer(e.depth),privateKey:o,publicKey:u,fingerPrint:_}),this._hdPublicKey=null,Object.defineProperty(this,"hdPublicKey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey}}),Object.defineProperty(this,"xpubkey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey.xpubkey}}),this};J._validateBufferArguments=function(e){var t=function(r,i){var n=e[r];gh(hr.isBuffer(n),r+" argument is not a buffer"),gh(n.length===i,r+" has not the expected size: found "+n.length+", expected "+i)};t("version",J.VersionSize),t("depth",J.DepthSize),t("parentFingerPrint",J.ParentFingerPrintSize),t("childIndex",J.ChildIndexSize),t("chainCode",J.ChainCodeSize),t("privateKey",J.PrivateKeySize),e.checksum&&e.checksum.length&&t("checksum",J.CheckSumSize)};J.prototype.toString=function(){return this.xprivkey};J.prototype.inspect=function(){return"<HDPrivateKey: "+this.xprivkey+">"};J.prototype.toObject=J.prototype.toJSON=function(){return{network:Yo.get(hr.integerFromBuffer(this._buffers.version),"xprivkey").name,depth:hr.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:hr.integerFromBuffer(this.fingerPrint),parentFingerPrint:hr.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:hr.integerFromBuffer(this._buffers.childIndex),chainCode:hr.bufferToHex(this._buffers.chainCode),privateKey:this.privateKey.toBuffer().toString("hex"),checksum:hr.integerFromBuffer(this._buffers.checksum),xprivkey:this.xprivkey}};J.fromBuffer=function(e){return new J(e.toString())};J.prototype.toBuffer=function(){return hr.copy(this._buffers.xprivkey)};J.DefaultDepth=0;J.DefaultFingerprint=0;J.DefaultChildIndex=0;J.Hardened=2147483648;J.MaxIndex=2*J.Hardened;J.RootElementAlias=["m","M","m'","M'"];J.VersionSize=4;J.DepthSize=1;J.ParentFingerPrintSize=4;J.ChildIndexSize=4;J.ChainCodeSize=32;J.PrivateKeySize=32;J.CheckSumSize=4;J.DataLength=78;J.SerializedByteSize=82;J.VersionStart=0;J.VersionEnd=J.VersionStart+J.VersionSize;J.DepthStart=J.VersionEnd;J.DepthEnd=J.DepthStart+J.DepthSize;J.ParentFingerPrintStart=J.DepthEnd;J.ParentFingerPrintEnd=J.ParentFingerPrintStart+J.ParentFingerPrintSize;J.ChildIndexStart=J.ParentFingerPrintEnd;J.ChildIndexEnd=J.ChildIndexStart+J.ChildIndexSize;J.ChainCodeStart=J.ChildIndexEnd;J.ChainCodeEnd=J.ChainCodeStart+J.ChainCodeSize;J.PrivateKeyStart=J.ChainCodeEnd+1;J.PrivateKeyEnd=J.PrivateKeyStart+J.PrivateKeySize;J.ChecksumStart=J.PrivateKeyEnd;J.ChecksumEnd=J.ChecksumStart+J.CheckSumSize;gh(J.ChecksumEnd===J.SerializedByteSize);RS.exports=J});var kS=X((bq,OS)=>{"use strict";var Sf=yt(),J7=Wa(),Q7=Cn(),xh=Mn(),AS=ti(),Ef=uf(),Av=li(),e9=Lr().sha256sha256,t9=Rr(),Qa=xt();function Dr(e){return this instanceof Dr?(Qa.checkArgument(Sf.isString(e),"First argument should be a string"),this.message=e,this):new Dr(e)}Dr.MAGIC_BYTES=Buffer.from(`Bitcoin Signed Message:
23
+ `);Dr.prototype.magicHash=function(){var t=AS.varintBufNum(Dr.MAGIC_BYTES.length),r=Buffer.from(this.message),i=AS.varintBufNum(r.length),n=Buffer.concat([t,Dr.MAGIC_BYTES,i,r]),o=e9(n);return o};Dr.prototype._sign=function(t){Qa.checkArgument(t instanceof J7,"First argument should be an instance of PrivateKey");let r=this.magicHash(),i=Ef.sign(r,t,{randomK:!0});return Ef.calci(r,i,t.toPublicKey()),i};Dr.prototype.sign=function(t){var r=this._sign(t);return r.toCompact().toString("base64")};Dr.prototype._verify=function(t,r){Qa.checkArgument(t instanceof Q7,"First argument should be an instance of PublicKey"),Qa.checkArgument(r instanceof Av,"Second argument should be an instance of Signature");var i=this.magicHash(),n=Ef.verify(i,r,t);return n||(this.error="The signature was invalid"),n};Dr.prototype.verify=function(t,r){Qa.checkArgument(t),Qa.checkArgument(r&&Sf.isString(r)),Sf.isString(t)&&(t=xh.fromString(t));var i=Av.fromCompact(Buffer.from(r,"base64"));let n=this.magicHash();var o=Ef.recoverPublicKey(n,i),u=xh.fromPublicKey(o,t.network);return t.toString()!==u.toString()?(this.error="The signature did not match the message digest",!1):this._verify(o,i)};Dr.prototype.recoverPublicKey=function(t,r){Qa.checkArgument(t),Qa.checkArgument(r&&Sf.isString(r)),Sf.isString(t)&&(t=xh.fromString(t));var i=Av.fromCompact(Buffer.from(r,"base64"));let n=this.magicHash();var o=Ef.recoverPublicKey(n,i),u=xh.fromPublicKey(o,t.network);return t.toString()!==u.toString()&&(this.error="The signature did not match the message digest"),o.toString()};Dr.fromString=function(e){return new Dr(e)};Dr.fromJSON=function(t){return t9.isValidJSON(t)&&(t=JSON.parse(t)),new Dr(t.message)};Dr.prototype.toObject=function(){return{message:this.message}};Dr.prototype.toJSON=function(){return JSON.stringify(this.toObject())};Dr.prototype.toString=function(){return this.message};Dr.prototype.inspect=function(){return"<Message: "+this.toString()+">"};OS.exports=Dr;var xq=ki()});var LS=X((_q,CS)=>{"use strict";var NS=yt(),BS=require("url"),PS=Mn(),MS=th(),Br=function(e,t){if(!(this instanceof Br))return new Br(e,t);if(this.extras={},this.knownParams=t||[],this.address=this.network=this.amount=this.message=null,typeof e=="string"){var r=Br.parse(e);r.amount&&(r.amount=this._parseAmount(r.amount)),this._fromObject(r)}else if(typeof e=="object")this._fromObject(e);else throw new TypeError("Unrecognized data format.")};Br.fromString=function(t){if(typeof t!="string")throw new TypeError("Expected a string");return new Br(t)};Br.fromObject=function(t){return new Br(t)};Br.isValid=function(e,t){try{new Br(e,t)}catch{return!1}return!0};Br.parse=function(e){var t=BS.parse(e,!0);if(t.protocol!=="bitcoin:")throw new TypeError("Invalid bitcoin URI");var r=/[^:]*:\/?\/?([^?]*)/.exec(e);return t.query.address=r&&r[1]||void 0,t.query};Br.Members=["address","amount","message","label","r"];Br.prototype._fromObject=function(e){if(!PS.isValid(e.address))throw new TypeError("Invalid bitcoin address");this.address=new PS(e.address),this.network=this.address.network,this.amount=e.amount;for(var t in e)if(!(t==="address"||t==="amount")){if(/^req-/.exec(t)&&this.knownParams.indexOf(t)===-1)throw Error("Unknown required argument "+t);var r=Br.Members.indexOf(t)>-1?this:this.extras;r[t]=e[t]}};Br.prototype._parseAmount=function(e){if(e=Number(e),isNaN(e))throw new TypeError("Invalid amount");return MS.fromBTC(e).toSatoshis()};Br.prototype.toObject=Br.prototype.toJSON=function(){for(var t={},r=0;r<Br.Members.length;r++){var i=Br.Members[r];this.hasOwnProperty(i)&&typeof this[i]<"u"&&(t[i]=this[i].toString())}return NS.extend(t,this.extras),t};Br.prototype.toString=function(){var e={};return this.amount&&(e.amount=MS.fromSatoshis(this.amount).toBTC()),this.message&&(e.message=this.message),this.label&&(e.label=this.label),this.r&&(e.r=this.r),NS.extend(e,this.extras),BS.format({protocol:"bitcoin:",host:this.address,query:e})};Br.prototype.inspect=function(){return"<URI: "+this.toString()+">"};CS.exports=Br});var bh=X((yq,US)=>{"use strict";var Le=US.exports;Le.version="v"+s1().version;Le.versionGuard=function(e){if(e!==void 0){var t="More than one instance of bitcore-lib found. Please make sure to require bitcore-lib and check that submodules do not also include their own bitcore-lib dependency.";throw new Error(t)}};Le.versionGuard(global._bitcore);global._bitcore=Le.version;Le.crypto={};Le.crypto.BN=Zr();Le.crypto.ECDSA=uf();Le.crypto.Schnorr=Lm();Le.crypto.Hash=Lr();Le.crypto.Random=gf();Le.crypto.Point=qa();Le.crypto.Signature=li();Le.crypto.TaggedHash=Zs();Le.encoding={};Le.encoding.Base58=af();Le.encoding.Base58Check=Kc();Le.encoding.BufferReader=ps();Le.encoding.BufferWriter=ti();Le.encoding.Varint=eS();Le.util={};Le.util.buffer=Yt();Le.util.js=Rr();Le.util.preconditions=xt();Le.errors=ji();Le.Address=Mn();Le.Block=dS();Le.MerkleBlock=Sv();Le.BlockHeader=bf();Le.HDPrivateKey=Tv();Le.HDPublicKey=Iv();Le.Message=kS();Le.Networks=za();Le.Opcode=Fp();Le.PrivateKey=Wa();Le.PublicKey=Cn();Le.Script=ki();Le.Transaction=mf();Le.URI=LS();Le.Unit=th();Le.deps={};Le.deps.bnjs=j0();Le.deps.bs58=Rm();Le.deps.Buffer=Buffer;Le.deps.elliptic=ym();Le.deps._=yt();Le.Transaction.sighash=Js()});var XS=X((Rq,ZS)=>{var YS=require("stream").Stream,L9=require("util");ZS.exports=Hn;function Hn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}L9.inherits(Hn,YS);Hn.create=function(e,t){var r=new this;t=t||{};for(var i in t)r[i]=t[i];r.source=e;var n=e.emit;return e.emit=function(){return r._handleEmit(arguments),n.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(Hn.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});Hn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};Hn.prototype.resume=function(){this._released||this.release(),this.source.resume()};Hn.prototype.pause=function(){this.source.pause()};Hn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};Hn.prototype.pipe=function(){var e=YS.prototype.pipe.apply(this,arguments);return this.resume(),e};Hn.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};Hn.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var tE=X((Aq,eE)=>{var U9=require("util"),QS=require("stream").Stream,JS=XS();eE.exports=Er;function Er(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}U9.inherits(Er,QS);Er.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};Er.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};Er.prototype.append=function(e){var t=Er.isStreamLike(e);if(t){if(!(e instanceof JS)){var r=JS.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};Er.prototype.pipe=function(e,t){return QS.prototype.pipe.call(this,e,t),this.resume(),e};Er.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};Er.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var i=Er.isStreamLike(r);i&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};Er.prototype._pipeNext=function(e){this._currentStream=e;var t=Er.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};Er.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};Er.prototype.write=function(e){this.emit("data",e)};Er.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};Er.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};Er.prototype.end=function(){this._reset(),this.emit("end")};Er.prototype.destroy=function(){this._reset(),this.emit("close")};Er.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};Er.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};Er.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};Er.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var rE=X((Oq,D9)=>{D9.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var nE=X((kq,iE)=>{iE.exports=rE()});var oE=X(Ni=>{"use strict";var Eh=nE(),q9=require("path").extname,sE=/^\s*([^;\s]*)(?:;|\s|$)/,F9=/^text\//i;Ni.charset=aE;Ni.charsets={lookup:aE};Ni.contentType=H9;Ni.extension=z9;Ni.extensions=Object.create(null);Ni.lookup=V9;Ni.types=Object.create(null);j9(Ni.extensions,Ni.types);function aE(e){if(!e||typeof e!="string")return!1;var t=sE.exec(e),r=t&&Eh[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&F9.test(t[1])?"UTF-8":!1}function H9(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Ni.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Ni.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}function z9(e){if(!e||typeof e!="string")return!1;var t=sE.exec(e),r=t&&Ni.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}function V9(e){if(!e||typeof e!="string")return!1;var t=q9("x."+e).toLowerCase().substr(1);return t&&Ni.types[t]||!1}function j9(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Eh).forEach(function(n){var o=Eh[n],u=o.extensions;if(!(!u||!u.length)){e[n]=u;for(var m=0;m<u.length;m++){var _=u[m];if(t[_]){var w=r.indexOf(Eh[t[_]].source),I=r.indexOf(o.source);if(t[_]!=="application/octet-stream"&&(w>I||w===I&&t[_].substr(0,12)==="application/"))continue}t[_]=n}}})}});var uE=X((Nq,cE)=>{cE.exports=W9;function W9(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}});var Nv=X((Bq,lE)=>{var fE=uE();lE.exports=K9;function K9(e){var t=!1;return fE(function(){t=!0}),function(i,n){t?e(i,n):fE(function(){e(i,n)})}}});var Bv=X((Mq,pE)=>{pE.exports=G9;function G9(e){Object.keys(e.jobs).forEach($9.bind(e)),e.jobs={}}function $9(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}});var Mv=X((Cq,dE)=>{var hE=Nv(),Y9=Bv();dE.exports=Z9;function Z9(e,t,r,i){var n=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[n]=X9(t,n,e[n],function(o,u){n in r.jobs&&(delete r.jobs[n],o?Y9(r):r.results[n]=u,i(o,r.results))})}function X9(e,t,r,i){var n;return e.length==2?n=e(r,hE(i)):n=e(r,t,hE(i)),n}});var Cv=X((Lq,mE)=>{mE.exports=J9;function J9(e,t){var r=!Array.isArray(e),i={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&i.keyedList.sort(r?t:function(n,o){return t(e[n],e[o])}),i}});var Lv=X((Uq,vE)=>{var Q9=Bv(),eB=Nv();vE.exports=tB;function tB(e){Object.keys(this.jobs).length&&(this.index=this.size,Q9(this),eB(e)(null,this.results))}});var xE=X((Dq,gE)=>{var rB=Mv(),iB=Cv(),nB=Lv();gE.exports=sB;function sB(e,t,r){for(var i=iB(e);i.index<(i.keyedList||e).length;)rB(e,t,i,function(n,o){if(n){r(n,o);return}if(Object.keys(i.jobs).length===0){r(null,i.results);return}}),i.index++;return nB.bind(i,r)}});var Uv=X((qq,Ih)=>{var bE=Mv(),aB=Cv(),oB=Lv();Ih.exports=cB;Ih.exports.ascending=_E;Ih.exports.descending=uB;function cB(e,t,r,i){var n=aB(e,r);return bE(e,t,n,function o(u,m){if(u){i(u,m);return}if(n.index++,n.index<(n.keyedList||e).length){bE(e,t,n,o);return}i(null,n.results)}),oB.bind(n,i)}function _E(e,t){return e<t?-1:e>t?1:0}function uB(e,t){return-1*_E(e,t)}});var wE=X((Fq,yE)=>{var fB=Uv();yE.exports=lB;function lB(e,t,r){return fB(e,t,null,r)}});var EE=X((Hq,SE)=>{SE.exports={parallel:xE(),serial:wE(),serialOrdered:Uv()}});var TE=X((zq,IE)=>{IE.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var OE=X((Vq,AE)=>{var Hv=tE(),RE=require("util"),Dv=require("path"),pB=require("http"),hB=require("https"),dB=require("url").parse,mB=require("fs"),vB=require("stream").Stream,qv=oE(),gB=EE(),Fv=TE();AE.exports=wt;RE.inherits(wt,Hv);function wt(e){if(!(this instanceof wt))return new wt(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Hv.call(this),e=e||{};for(var t in e)this[t]=e[t]}wt.LINE_BREAK=`\r
24
+ `;wt.DEFAULT_CONTENT_TYPE="application/octet-stream";wt.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var i=Hv.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),RE.isArray(t)){this._error(new Error("Arrays are not supported."));return}var n=this._multiPartHeader(e,t,r),o=this._multiPartFooter();i(n),i(t),i(o),this._trackLength(n,t,r)};wt.prototype._trackLength=function(e,t,r){var i=0;r.knownLength!=null?i+=+r.knownLength:Buffer.isBuffer(t)?i=t.length:typeof t=="string"&&(i=Buffer.byteLength(t)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(e)+wt.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion"))&&!(t instanceof vB))&&(r.knownLength||this._valuesToMeasure.push(t))};wt.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):mB.stat(e.path,function(r,i){var n;if(r){t(r);return}n=i.size-(e.start?e.start:0),t(null,n)}):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",function(r){e.pause(),t(null,+r.headers["content-length"])}),e.resume()):t("Unknown stream")};wt.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var i=this._getContentDisposition(t,r),n=this._getContentType(t,r),o="",u={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(n||[])};typeof r.header=="object"&&Fv(u,r.header);var m;for(var _ in u)u.hasOwnProperty(_)&&(m=u[_],m!=null&&(Array.isArray(m)||(m=[m]),m.length&&(o+=_+": "+m.join("; ")+wt.LINE_BREAK)));return"--"+this.getBoundary()+wt.LINE_BREAK+o+wt.LINE_BREAK};wt.prototype._getContentDisposition=function(e,t){var r,i;return typeof t.filepath=="string"?r=Dv.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?r=Dv.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(r=Dv.basename(e.client._httpMessage.path||"")),r&&(i='filename="'+r+'"'),i};wt.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e.name&&(r=qv.lookup(e.name)),!r&&e.path&&(r=qv.lookup(e.path)),!r&&e.readable&&e.hasOwnProperty("httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=qv.lookup(t.filepath||t.filename)),!r&&typeof e=="object"&&(r=wt.DEFAULT_CONTENT_TYPE),r};wt.prototype._multiPartFooter=function(){return function(e){var t=wt.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};wt.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+wt.LINE_BREAK};wt.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(r[t.toLowerCase()]=e[t]);return r};wt.prototype.setBoundary=function(e){this._boundary=e};wt.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};wt.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,i=this._streams.length;r<i;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(wt.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};wt.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(Math.random()*10).toString(16);this._boundary=e};wt.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};wt.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};wt.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}gB.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,i){if(r){e(r);return}i.forEach(function(n){t+=n}),e(null,t)})};wt.prototype.submit=function(e,t){var r,i,n={method:"post"};return typeof e=="string"?(e=dB(e),i=Fv({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},n)):(i=Fv(e,n),i.port||(i.port=i.protocol=="https:"?443:80)),i.headers=this.getHeaders(e.headers),i.protocol=="https:"?r=hB.request(i):r=pB.request(i),this.getLength(function(o,u){if(o&&o!=="Unknown stream"){this._error(o);return}if(u&&r.setHeader("Content-Length",u),this.pipe(r),t){var m,_=function(w,I){return r.removeListener("error",_),r.removeListener("response",m),t.call(this,w,I)};m=_.bind(this,null),r.on("error",_),r.on("response",m)}}.bind(this)),r};wt.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};wt.prototype.toString=function(){return"[object FormData]"}});var WE=X(jE=>{"use strict";var BB=require("url").parse,MB={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},CB=String.prototype.endsWith||function(e){return e.length<=this.length&&this.indexOf(e,this.length-e.length)!==-1};function LB(e){var t=typeof e=="string"?BB(e):e||{},r=t.protocol,i=t.host,n=t.port;if(typeof i!="string"||!i||typeof r!="string"||(r=r.split(":",1)[0],i=i.replace(/:\d*$/,""),n=parseInt(n)||MB[r]||0,!UB(i,n)))return"";var o=vu("npm_config_"+r+"_proxy")||vu(r+"_proxy")||vu("npm_config_proxy")||vu("all_proxy");return o&&o.indexOf("://")===-1&&(o=r+"://"+o),o}function UB(e,t){var r=(vu("npm_config_no_proxy")||vu("no_proxy")).toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(i){if(!i)return!0;var n=i.match(/^(.+):(\d+)$/),o=n?n[1]:i,u=n?parseInt(n[2]):0;return u&&u!==t?!0:/^[.*]/.test(o)?(o.charAt(0)==="*"&&(o=o.slice(1)),!CB.call(e,o)):e!==o}):!0}function vu(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}jE.getProxyForUrl=LB});var GE=X((jF,KE)=>{var Pf;KE.exports=function(){if(!Pf){try{Pf=require("debug")("follow-redirects")}catch{}typeof Pf!="function"&&(Pf=function(){})}Pf.apply(null,arguments)}});var JE=X((WF,cg)=>{var Mf=require("url"),Nf=Mf.URL,DB=require("http"),qB=require("https"),tg=require("stream").Writable,rg=require("assert"),$E=GE(),ig=!1;try{rg(new Nf)}catch(e){ig=e.code==="ERR_INVALID_URL"}var FB=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],ng=["abort","aborted","connect","error","socket","timeout"],sg=Object.create(null);ng.forEach(function(e){sg[e]=function(t,r,i){this._redirectable.emit(e,t,r,i)}});var Jv=Cf("ERR_INVALID_URL","Invalid URL",TypeError),Qv=Cf("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),HB=Cf("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",Qv),zB=Cf("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),VB=Cf("ERR_STREAM_WRITE_AFTER_END","write after end"),jB=tg.prototype.destroy||ZE;function Bi(e,t){tg.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(i){try{r._processResponse(i)}catch(n){r.emit("error",n instanceof Qv?n:new Qv({cause:n}))}},this._performRequest()}Bi.prototype=Object.create(tg.prototype);Bi.prototype.abort=function(){og(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Bi.prototype.destroy=function(e){return og(this._currentRequest,e),jB.call(this,e),this};Bi.prototype.write=function(e,t,r){if(this._ending)throw new VB;if(!Jo(e)&&!GB(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Bf(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new zB),this.abort())};Bi.prototype.end=function(e,t,r){if(Bf(e)?(r=e,e=t=null):Bf(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var i=this,n=this._currentRequest;this.write(e,t,function(){i._ended=!0,n.end(null,null,r)}),this._ending=!0}};Bi.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};Bi.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};Bi.prototype.setTimeout=function(e,t){var r=this;function i(u){u.setTimeout(e),u.removeListener("timeout",u.destroy),u.addListener("timeout",u.destroy)}function n(u){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),o()},e),i(u)}function o(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",o),r.removeListener("error",o),r.removeListener("response",o),r.removeListener("close",o),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",n)}return t&&this.on("timeout",t),this.socket?n(this.socket):this._currentRequest.once("socket",n),this.on("socket",i),this.on("abort",o),this.on("error",o),this.on("response",o),this.on("close",o),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){Bi.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(Bi.prototype,e,{get:function(){return this._currentRequest[e]}})});Bi.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};Bi.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var n of ng)i.on(n,sg[n]);if(this._currentUrl=/^\//.test(this._options.path)?Mf.format(this._options):this._options.path,this._isRedirect){var o=0,u=this,m=this._requestBodyBuffers;(function _(w){if(i===u._currentRequest)if(w)u.emit("error",w);else if(o<m.length){var I=m[o++];i.finished||i.write(I.data,I.encoding,_)}else u._ended&&i.end()})()}};Bi.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(og(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new HB;var i,n=this._options.beforeRedirect;n&&(i=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var o=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Xv(/^content-/i,this._options.headers));var u=Xv(/^host$/i,this._options.headers),m=ag(this._currentUrl),_=u||m.host,w=/^\w+:/.test(r)?this._currentUrl:Mf.format(Object.assign(m,{host:_})),I=WB(r,w);if($E("redirecting to",I.href),this._isRedirect=!0,eg(I,this._options),(I.protocol!==m.protocol&&I.protocol!=="https:"||I.host!==_&&!KB(I.host,_))&&Xv(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Bf(n)){var T={headers:e.headers,statusCode:t},N={url:w,method:o,headers:i};n(this._options,T,N),this._sanitizeOptions(this._options)}this._performRequest()};function YE(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(i){var n=i+":",o=r[n]=e[i],u=t[i]=Object.create(o);function m(w,I,T){return $B(w)?w=eg(w):Jo(w)?w=eg(ag(w)):(T=I,I=XE(w),w={protocol:n}),Bf(I)&&(T=I,I=null),I=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},w,I),I.nativeProtocols=r,!Jo(I.host)&&!Jo(I.hostname)&&(I.hostname="::1"),rg.equal(I.protocol,n,"protocol mismatch"),$E("options",I),new Bi(I,T)}function _(w,I,T){var N=u.request(w,I,T);return N.end(),N}Object.defineProperties(u,{request:{value:m,configurable:!0,enumerable:!0,writable:!0},get:{value:_,configurable:!0,enumerable:!0,writable:!0}})}),t}function ZE(){}function ag(e){var t;if(ig)t=new Nf(e);else if(t=XE(Mf.parse(e)),!Jo(t.protocol))throw new Jv({input:e});return t}function WB(e,t){return ig?new Nf(e,t):ag(Mf.resolve(t,e))}function XE(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new Jv({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new Jv({input:e.href||e});return e}function eg(e,t){var r=t||{};for(var i of FB)r[i]=e[i];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function Xv(e,t){var r;for(var i in t)e.test(i)&&(r=t[i],delete t[i]);return r===null||typeof r>"u"?void 0:String(r).trim()}function Cf(e,t,r){function i(n){Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return i.prototype=new(r||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),i}function og(e,t){for(var r of ng)e.removeListener(r,sg[r]);e.on("error",ZE),e.destroy(t)}function KB(e,t){rg(Jo(e)&&Jo(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function Jo(e){return typeof e=="string"||e instanceof String}function Bf(e){return typeof e=="function"}function GB(e){return typeof e=="object"&&"length"in e}function $B(e){return Nf&&e instanceof Nf}cg.exports=YE({http:DB,https:qB});cg.exports.wrap=YE});var xI=X((G$,Qg)=>{"use strict";var WC=Object.prototype.hasOwnProperty,wi="~";function hl(){}Object.create&&(hl.prototype=Object.create(null),new hl().__proto__||(wi=!1));function KC(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function gI(e,t,r,i,n){if(typeof r!="function")throw new TypeError("The listener must be a function");var o=new KC(r,i||e,n),u=wi?wi+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],o]:e._events[u].push(o):(e._events[u]=o,e._eventsCount++),e}function fd(e,t){--e._eventsCount===0?e._events=new hl:delete e._events[t]}function di(){this._events=new hl,this._eventsCount=0}di.prototype.eventNames=function(){var t=[],r,i;if(this._eventsCount===0)return t;for(i in r=this._events)WC.call(r,i)&&t.push(wi?i.slice(1):i);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};di.prototype.listeners=function(t){var r=wi?wi+t:t,i=this._events[r];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,o=i.length,u=new Array(o);n<o;n++)u[n]=i[n].fn;return u};di.prototype.listenerCount=function(t){var r=wi?wi+t:t,i=this._events[r];return i?i.fn?1:i.length:0};di.prototype.emit=function(t,r,i,n,o,u){var m=wi?wi+t:t;if(!this._events[m])return!1;var _=this._events[m],w=arguments.length,I,T;if(_.fn){switch(_.once&&this.removeListener(t,_.fn,void 0,!0),w){case 1:return _.fn.call(_.context),!0;case 2:return _.fn.call(_.context,r),!0;case 3:return _.fn.call(_.context,r,i),!0;case 4:return _.fn.call(_.context,r,i,n),!0;case 5:return _.fn.call(_.context,r,i,n,o),!0;case 6:return _.fn.call(_.context,r,i,n,o,u),!0}for(T=1,I=new Array(w-1);T<w;T++)I[T-1]=arguments[T];_.fn.apply(_.context,I)}else{var N=_.length,C;for(T=0;T<N;T++)switch(_[T].once&&this.removeListener(t,_[T].fn,void 0,!0),w){case 1:_[T].fn.call(_[T].context);break;case 2:_[T].fn.call(_[T].context,r);break;case 3:_[T].fn.call(_[T].context,r,i);break;case 4:_[T].fn.call(_[T].context,r,i,n);break;default:if(!I)for(C=1,I=new Array(w-1);C<w;C++)I[C-1]=arguments[C];_[T].fn.apply(_[T].context,I)}}return!0};di.prototype.on=function(t,r,i){return gI(this,t,r,i,!1)};di.prototype.once=function(t,r,i){return gI(this,t,r,i,!0)};di.prototype.removeListener=function(t,r,i,n){var o=wi?wi+t:t;if(!this._events[o])return this;if(!r)return fd(this,o),this;var u=this._events[o];if(u.fn)u.fn===r&&(!n||u.once)&&(!i||u.context===i)&&fd(this,o);else{for(var m=0,_=[],w=u.length;m<w;m++)(u[m].fn!==r||n&&!u[m].once||i&&u[m].context!==i)&&_.push(u[m]);_.length?this._events[o]=_.length===1?_[0]:_:fd(this,o)}return this};di.prototype.removeAllListeners=function(t){var r;return t?(r=wi?wi+t:t,this._events[r]&&fd(this,r)):(this._events=new hl,this._eventsCount=0),this};di.prototype.off=di.prototype.removeListener;di.prototype.addListener=di.prototype.on;di.prefixed=wi;di.EventEmitter=di;typeof Qg<"u"&&(Qg.exports=di)});var ix=X((iX,II)=>{"use strict";var{Duplex:JC}=require("stream");function SI(e){e.emit("close")}function QC(){!this.destroyed&&this._writableState.finished&&this.destroy()}function EI(e){this.removeListener("error",EI),this.destroy(),this.listenerCount("error")===0&&this.emit("error",e)}function eL(e,t){let r=!0,i=new JC({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",function(o,u){let m=!u&&i._readableState.objectMode?o.toString():o;i.push(m)||e.pause()}),e.once("error",function(o){i.destroyed||(r=!1,i.destroy(o))}),e.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(n,o){if(e.readyState===e.CLOSED){o(n),process.nextTick(SI,i);return}let u=!1;e.once("error",function(_){u=!0,o(_)}),e.once("close",function(){u||o(n),process.nextTick(SI,i)}),r&&e.terminate()},i._final=function(n){if(e.readyState===e.CONNECTING){e.once("open",function(){i._final(n)});return}e._socket!==null&&(e._socket._writableState.finished?(n(),i._readableState.endEmitted&&i.destroy()):(e._socket.once("finish",function(){n()}),e.close()))},i._read=function(){e.isPaused&&e.resume()},i._write=function(n,o,u){if(e.readyState===e.CONNECTING){e.once("open",function(){i._write(n,o,u)});return}e.send(n,u)},i.on("end",QC),i.on("error",EI),i}II.exports=eL});var po=X((nX,TI)=>{"use strict";TI.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var dl=X((sX,hd)=>{"use strict";var{EMPTY_BUFFER:tL}=po(),nx=Buffer[Symbol.species];function rL(e,t){if(e.length===0)return tL;if(e.length===1)return e[0];let r=Buffer.allocUnsafe(t),i=0;for(let n=0;n<e.length;n++){let o=e[n];r.set(o,i),i+=o.length}return i<t?new nx(r.buffer,r.byteOffset,i):r}function RI(e,t,r,i,n){for(let o=0;o<n;o++)r[i+o]=e[o]^t[o&3]}function AI(e,t){for(let r=0;r<e.length;r++)e[r]^=t[r&3]}function iL(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)}function sx(e){if(sx.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=new nx(e):ArrayBuffer.isView(e)?t=new nx(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),sx.readOnly=!1),t}hd.exports={concat:rL,mask:RI,toArrayBuffer:iL,toBuffer:sx,unmask:AI};if(!process.env.WS_NO_BUFFER_UTIL)try{let e=require("bufferutil");hd.exports.mask=function(t,r,i,n,o){o<48?RI(t,r,i,n,o):e.mask(t,r,i,n,o)},hd.exports.unmask=function(t,r){t.length<32?AI(t,r):e.unmask(t,r)}}catch{}});var PI=X((aX,kI)=>{"use strict";var OI=Symbol("kDone"),ax=Symbol("kRun"),ox=class{constructor(t){this[OI]=()=>{this.pending--,this[ax]()},this.concurrency=t||1/0,this.jobs=[],this.pending=0}add(t){this.jobs.push(t),this[ax]()}[ax](){if(this.pending!==this.concurrency&&this.jobs.length){let t=this.jobs.shift();this.pending++,t(this[OI])}}};kI.exports=ox});var gl=X((oX,CI)=>{"use strict";var ml=require("zlib"),NI=dl(),nL=PI(),{kStatusCode:BI}=po(),sL=Buffer[Symbol.species],aL=Buffer.from([0,0,255,255]),vd=Symbol("permessage-deflate"),ma=Symbol("total-length"),vl=Symbol("callback"),ho=Symbol("buffers"),md=Symbol("error"),dd,cx=class{constructor(t,r,i){if(this._maxPayload=i|0,this._options=t||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!r,this._deflate=null,this._inflate=null,this.params=null,!dd){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;dd=new nL(n)}}static get extensionName(){return"permessage-deflate"}offer(){let t={};return this._options.serverNoContextTakeover&&(t.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(t.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(t.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?t.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(t.client_max_window_bits=!0),t}accept(t){return t=this.normalizeParams(t),this.params=this._isServer?this.acceptAsServer(t):this.acceptAsClient(t),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let t=this._deflate[vl];this._deflate.close(),this._deflate=null,t&&t(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(t){let r=this._options,i=t.find(n=>!(r.serverNoContextTakeover===!1&&n.server_no_context_takeover||n.server_max_window_bits&&(r.serverMaxWindowBits===!1||typeof r.serverMaxWindowBits=="number"&&r.serverMaxWindowBits>n.server_max_window_bits)||typeof r.clientMaxWindowBits=="number"&&!n.client_max_window_bits));if(!i)throw new Error("None of the extension offers can be accepted");return r.serverNoContextTakeover&&(i.server_no_context_takeover=!0),r.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof r.serverMaxWindowBits=="number"&&(i.server_max_window_bits=r.serverMaxWindowBits),typeof r.clientMaxWindowBits=="number"?i.client_max_window_bits=r.clientMaxWindowBits:(i.client_max_window_bits===!0||r.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(t){let r=t[0];if(this._options.clientNoContextTakeover===!1&&r.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!r.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(r.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&r.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return r}normalizeParams(t){return t.forEach(r=>{Object.keys(r).forEach(i=>{let n=r[i];if(n.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(n=n[0],i==="client_max_window_bits"){if(n!==!0){let o=+n;if(!Number.isInteger(o)||o<8||o>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=o}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else if(i==="server_max_window_bits"){let o=+n;if(!Number.isInteger(o)||o<8||o>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=o}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(n!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else throw new Error(`Unknown parameter "${i}"`);r[i]=n})}),t}decompress(t,r,i){dd.add(n=>{this._decompress(t,r,(o,u)=>{n(),i(o,u)})})}compress(t,r,i){dd.add(n=>{this._compress(t,r,(o,u)=>{n(),i(o,u)})})}_decompress(t,r,i){let n=this._isServer?"client":"server";if(!this._inflate){let o=`${n}_max_window_bits`,u=typeof this.params[o]!="number"?ml.Z_DEFAULT_WINDOWBITS:this.params[o];this._inflate=ml.createInflateRaw({...this._options.zlibInflateOptions,windowBits:u}),this._inflate[vd]=this,this._inflate[ma]=0,this._inflate[ho]=[],this._inflate.on("error",cL),this._inflate.on("data",MI)}this._inflate[vl]=i,this._inflate.write(t),r&&this._inflate.write(aL),this._inflate.flush(()=>{let o=this._inflate[md];if(o){this._inflate.close(),this._inflate=null,i(o);return}let u=NI.concat(this._inflate[ho],this._inflate[ma]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[ma]=0,this._inflate[ho]=[],r&&this.params[`${n}_no_context_takeover`]&&this._inflate.reset()),i(null,u)})}_compress(t,r,i){let n=this._isServer?"server":"client";if(!this._deflate){let o=`${n}_max_window_bits`,u=typeof this.params[o]!="number"?ml.Z_DEFAULT_WINDOWBITS:this.params[o];this._deflate=ml.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:u}),this._deflate[ma]=0,this._deflate[ho]=[],this._deflate.on("data",oL)}this._deflate[vl]=i,this._deflate.write(t),this._deflate.flush(ml.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let o=NI.concat(this._deflate[ho],this._deflate[ma]);r&&(o=new sL(o.buffer,o.byteOffset,o.length-4)),this._deflate[vl]=null,this._deflate[ma]=0,this._deflate[ho]=[],r&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),i(null,o)})}};CI.exports=cx;function oL(e){this[ho].push(e),this[ma]+=e.length}function MI(e){if(this[ma]+=e.length,this[vd]._maxPayload<1||this[ma]<=this[vd]._maxPayload){this[ho].push(e);return}this[md]=new RangeError("Max payload size exceeded"),this[md].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[md][BI]=1009,this.removeListener("data",MI),this.reset()}function cL(e){this[vd]._inflate=null,e[BI]=1007,this[vl](e)}});var xl=X((cX,gd)=>{"use strict";var{isUtf8:LI}=require("buffer"),uL=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function fL(e){return e>=1e3&&e<=1014&&e!==1004&&e!==1005&&e!==1006||e>=3e3&&e<=4999}function ux(e){let t=e.length,r=0;for(;r<t;)if(!(e[r]&128))r++;else if((e[r]&224)===192){if(r+1===t||(e[r+1]&192)!==128||(e[r]&254)===192)return!1;r+=2}else if((e[r]&240)===224){if(r+2>=t||(e[r+1]&192)!==128||(e[r+2]&192)!==128||e[r]===224&&(e[r+1]&224)===128||e[r]===237&&(e[r+1]&224)===160)return!1;r+=3}else if((e[r]&248)===240){if(r+3>=t||(e[r+1]&192)!==128||(e[r+2]&192)!==128||(e[r+3]&192)!==128||e[r]===240&&(e[r+1]&240)===128||e[r]===244&&e[r+1]>143||e[r]>244)return!1;r+=4}else return!1;return!0}gd.exports={isValidStatusCode:fL,isValidUTF8:ux,tokenChars:uL};if(LI)gd.exports.isValidUTF8=function(e){return e.length<24?ux(e):LI(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=require("utf-8-validate");gd.exports.isValidUTF8=function(t){return t.length<32?ux(t):e(t)}}catch{}});var _d=X((uX,VI)=>{"use strict";var{Writable:lL}=require("stream"),UI=gl(),{BINARY_TYPES:pL,EMPTY_BUFFER:DI,kStatusCode:hL,kWebSocket:dL}=po(),{concat:fx,toArrayBuffer:mL,unmask:vL}=dl(),{isValidStatusCode:gL,isValidUTF8:qI}=xl(),xd=Buffer[Symbol.species],Sn=0,FI=1,HI=2,zI=3,lx=4,px=5,bd=6,hx=class extends lL{constructor(t={}){super(),this._allowSynchronousEvents=t.allowSynchronousEvents!==void 0?t.allowSynchronousEvents:!0,this._binaryType=t.binaryType||pL[0],this._extensions=t.extensions||{},this._isServer=!!t.isServer,this._maxPayload=t.maxPayload|0,this._skipUTF8Validation=!!t.skipUTF8Validation,this[dL]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=Sn}_write(t,r,i){if(this._opcode===8&&this._state==Sn)return i();this._bufferedBytes+=t.length,this._buffers.push(t),this.startLoop(i)}consume(t){if(this._bufferedBytes-=t,t===this._buffers[0].length)return this._buffers.shift();if(t<this._buffers[0].length){let i=this._buffers[0];return this._buffers[0]=new xd(i.buffer,i.byteOffset+t,i.length-t),new xd(i.buffer,i.byteOffset,t)}let r=Buffer.allocUnsafe(t);do{let i=this._buffers[0],n=r.length-t;t>=i.length?r.set(this._buffers.shift(),n):(r.set(new Uint8Array(i.buffer,i.byteOffset,t),n),this._buffers[0]=new xd(i.buffer,i.byteOffset+t,i.length-t)),t-=i.length}while(t>0);return r}startLoop(t){this._loop=!0;do switch(this._state){case Sn:this.getInfo(t);break;case FI:this.getPayloadLength16(t);break;case HI:this.getPayloadLength64(t);break;case zI:this.getMask();break;case lx:this.getData(t);break;case px:case bd:this._loop=!1;return}while(this._loop);this._errored||t()}getInfo(t){if(this._bufferedBytes<2){this._loop=!1;return}let r=this.consume(2);if(r[0]&48){let n=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");t(n);return}let i=(r[0]&64)===64;if(i&&!this._extensions[UI.extensionName]){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(n);return}if(this._fin=(r[0]&128)===128,this._opcode=r[0]&15,this._payloadLength=r[1]&127,this._opcode===0){if(i){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(n);return}if(!this._fragmented){let n=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");t(n);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(n);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let n=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");t(n);return}if(i){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");t(n);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let n=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");t(n);return}}else{let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");t(n);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(r[1]&128)===128,this._isServer){if(!this._masked){let n=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");t(n);return}}else if(this._masked){let n=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");t(n);return}this._payloadLength===126?this._state=FI:this._payloadLength===127?this._state=HI:this.haveLength(t)}getPayloadLength16(t){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(t)}getPayloadLength64(t){if(this._bufferedBytes<8){this._loop=!1;return}let r=this.consume(8),i=r.readUInt32BE(0);if(i>Math.pow(2,21)-1){let n=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");t(n);return}this._payloadLength=i*Math.pow(2,32)+r.readUInt32BE(4),this.haveLength(t)}haveLength(t){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let r=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(r);return}this._masked?this._state=zI:this._state=lx}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=lx}getData(t){let r=DI;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}r=this.consume(this._payloadLength),this._masked&&this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3]&&vL(r,this._mask)}if(this._opcode>7){this.controlMessage(r,t);return}if(this._compressed){this._state=px,this.decompress(r,t);return}r.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(r)),this.dataMessage(t)}decompress(t,r){this._extensions[UI.extensionName].decompress(t,this._fin,(n,o)=>{if(n)return r(n);if(o.length){if(this._messageLength+=o.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let u=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");r(u);return}this._fragments.push(o)}this.dataMessage(r),this._state===Sn&&this.startLoop(r)})}dataMessage(t){if(!this._fin){this._state=Sn;return}let r=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let n;this._binaryType==="nodebuffer"?n=fx(i,r):this._binaryType==="arraybuffer"?n=mL(fx(i,r)):n=i,this._allowSynchronousEvents?(this.emit("message",n,!0),this._state=Sn):(this._state=bd,setImmediate(()=>{this.emit("message",n,!0),this._state=Sn,this.startLoop(t)}))}else{let n=fx(i,r);if(!this._skipUTF8Validation&&!qI(n)){let o=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(o);return}this._state===px||this._allowSynchronousEvents?(this.emit("message",n,!1),this._state=Sn):(this._state=bd,setImmediate(()=>{this.emit("message",n,!1),this._state=Sn,this.startLoop(t)}))}}controlMessage(t,r){if(this._opcode===8){if(t.length===0)this._loop=!1,this.emit("conclude",1005,DI),this.end();else{let i=t.readUInt16BE(0);if(!gL(i)){let o=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");r(o);return}let n=new xd(t.buffer,t.byteOffset+2,t.length-2);if(!this._skipUTF8Validation&&!qI(n)){let o=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");r(o);return}this._loop=!1,this.emit("conclude",i,n),this.end()}this._state=Sn;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",t),this._state=Sn):(this._state=bd,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",t),this._state=Sn,this.startLoop(r)}))}createError(t,r,i,n,o){this._loop=!1,this._errored=!0;let u=new t(i?`Invalid WebSocket frame: ${r}`:r);return Error.captureStackTrace(u,this.createError),u.code=o,u[hL]=n,u}};VI.exports=hx});var yd=X((lX,KI)=>{"use strict";var{Duplex:fX}=require("stream"),{randomFillSync:xL}=require("crypto"),jI=gl(),{EMPTY_BUFFER:bL}=po(),{isValidStatusCode:_L}=xl(),{mask:WI,toBuffer:ku}=dl(),$n=Symbol("kByteLength"),yL=Buffer.alloc(4),dx=class e{constructor(t,r,i){this._extensions=r||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=t,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._deflating=!1,this._queue=[]}static frame(t,r){let i,n=!1,o=2,u=!1;r.mask&&(i=r.maskBuffer||yL,r.generateMask?r.generateMask(i):xL(i,0,4),u=(i[0]|i[1]|i[2]|i[3])===0,o=6);let m;typeof t=="string"?(!r.mask||u)&&r[$n]!==void 0?m=r[$n]:(t=Buffer.from(t),m=t.length):(m=t.length,n=r.mask&&r.readOnly&&!u);let _=m;m>=65536?(o+=8,_=127):m>125&&(o+=2,_=126);let w=Buffer.allocUnsafe(n?m+o:o);return w[0]=r.fin?r.opcode|128:r.opcode,r.rsv1&&(w[0]|=64),w[1]=_,_===126?w.writeUInt16BE(m,2):_===127&&(w[2]=w[3]=0,w.writeUIntBE(m,4,6)),r.mask?(w[1]|=128,w[o-4]=i[0],w[o-3]=i[1],w[o-2]=i[2],w[o-1]=i[3],u?[w,t]:n?(WI(t,i,w,o,m),[w]):(WI(t,i,t,0,m),[w,t])):[w,t]}close(t,r,i,n){let o;if(t===void 0)o=bL;else{if(typeof t!="number"||!_L(t))throw new TypeError("First argument must be a valid error code number");if(r===void 0||!r.length)o=Buffer.allocUnsafe(2),o.writeUInt16BE(t,0);else{let m=Buffer.byteLength(r);if(m>123)throw new RangeError("The message must not be greater than 123 bytes");o=Buffer.allocUnsafe(2+m),o.writeUInt16BE(t,0),typeof r=="string"?o.write(r,2):o.set(r,2)}}let u={[$n]:o.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._deflating?this.enqueue([this.dispatch,o,!1,u,n]):this.sendFrame(e.frame(o,u),n)}ping(t,r,i){let n,o;if(typeof t=="string"?(n=Buffer.byteLength(t),o=!1):(t=ku(t),n=t.length,o=ku.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let u={[$n]:n,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:9,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,u,i]):this.sendFrame(e.frame(t,u),i)}pong(t,r,i){let n,o;if(typeof t=="string"?(n=Buffer.byteLength(t),o=!1):(t=ku(t),n=t.length,o=ku.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let u={[$n]:n,fin:!0,generateMask:this._generateMask,mask:r,maskBuffer:this._maskBuffer,opcode:10,readOnly:o,rsv1:!1};this._deflating?this.enqueue([this.dispatch,t,!1,u,i]):this.sendFrame(e.frame(t,u),i)}send(t,r,i){let n=this._extensions[jI.extensionName],o=r.binary?2:1,u=r.compress,m,_;if(typeof t=="string"?(m=Buffer.byteLength(t),_=!1):(t=ku(t),m=t.length,_=ku.readOnly),this._firstFragment?(this._firstFragment=!1,u&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(u=m>=n._threshold),this._compress=u):(u=!1,o=0),r.fin&&(this._firstFragment=!0),n){let w={[$n]:m,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:o,readOnly:_,rsv1:u};this._deflating?this.enqueue([this.dispatch,t,this._compress,w,i]):this.dispatch(t,this._compress,w,i)}else this.sendFrame(e.frame(t,{[$n]:m,fin:r.fin,generateMask:this._generateMask,mask:r.mask,maskBuffer:this._maskBuffer,opcode:o,readOnly:_,rsv1:!1}),i)}dispatch(t,r,i,n){if(!r){this.sendFrame(e.frame(t,i),n);return}let o=this._extensions[jI.extensionName];this._bufferedBytes+=i[$n],this._deflating=!0,o.compress(t,i.fin,(u,m)=>{if(this._socket.destroyed){let _=new Error("The socket was closed while data was being compressed");typeof n=="function"&&n(_);for(let w=0;w<this._queue.length;w++){let I=this._queue[w],T=I[I.length-1];typeof T=="function"&&T(_)}return}this._bufferedBytes-=i[$n],this._deflating=!1,i.readOnly=!1,this.sendFrame(e.frame(m,i),n),this.dequeue()})}dequeue(){for(;!this._deflating&&this._queue.length;){let t=this._queue.shift();this._bufferedBytes-=t[3][$n],Reflect.apply(t[0],this,t.slice(1))}}enqueue(t){this._bufferedBytes+=t[3][$n],this._queue.push(t)}sendFrame(t,r){t.length===2?(this._socket.cork(),this._socket.write(t[0]),this._socket.write(t[1],r),this._socket.uncork()):this._socket.write(t[0],r)}};KI.exports=dx});var tT=X((pX,eT)=>{"use strict";var{kForOnEventAttribute:bl,kListener:mx}=po(),GI=Symbol("kCode"),$I=Symbol("kData"),YI=Symbol("kError"),ZI=Symbol("kMessage"),XI=Symbol("kReason"),Pu=Symbol("kTarget"),JI=Symbol("kType"),QI=Symbol("kWasClean"),va=class{constructor(t){this[Pu]=null,this[JI]=t}get target(){return this[Pu]}get type(){return this[JI]}};Object.defineProperty(va.prototype,"target",{enumerable:!0});Object.defineProperty(va.prototype,"type",{enumerable:!0});var vc=class extends va{constructor(t,r={}){super(t),this[GI]=r.code===void 0?0:r.code,this[XI]=r.reason===void 0?"":r.reason,this[QI]=r.wasClean===void 0?!1:r.wasClean}get code(){return this[GI]}get reason(){return this[XI]}get wasClean(){return this[QI]}};Object.defineProperty(vc.prototype,"code",{enumerable:!0});Object.defineProperty(vc.prototype,"reason",{enumerable:!0});Object.defineProperty(vc.prototype,"wasClean",{enumerable:!0});var Nu=class extends va{constructor(t,r={}){super(t),this[YI]=r.error===void 0?null:r.error,this[ZI]=r.message===void 0?"":r.message}get error(){return this[YI]}get message(){return this[ZI]}};Object.defineProperty(Nu.prototype,"error",{enumerable:!0});Object.defineProperty(Nu.prototype,"message",{enumerable:!0});var _l=class extends va{constructor(t,r={}){super(t),this[$I]=r.data===void 0?null:r.data}get data(){return this[$I]}};Object.defineProperty(_l.prototype,"data",{enumerable:!0});var wL={addEventListener(e,t,r={}){for(let n of this.listeners(e))if(!r[bl]&&n[mx]===t&&!n[bl])return;let i;if(e==="message")i=function(o,u){let m=new _l("message",{data:u?o:o.toString()});m[Pu]=this,wd(t,this,m)};else if(e==="close")i=function(o,u){let m=new vc("close",{code:o,reason:u.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});m[Pu]=this,wd(t,this,m)};else if(e==="error")i=function(o){let u=new Nu("error",{error:o,message:o.message});u[Pu]=this,wd(t,this,u)};else if(e==="open")i=function(){let o=new va("open");o[Pu]=this,wd(t,this,o)};else return;i[bl]=!!r[bl],i[mx]=t,r.once?this.once(e,i):this.on(e,i)},removeEventListener(e,t){for(let r of this.listeners(e))if(r[mx]===t&&!r[bl]){this.removeListener(e,r);break}}};eT.exports={CloseEvent:vc,ErrorEvent:Nu,Event:va,EventTarget:wL,MessageEvent:_l};function wd(e,t,r){typeof e=="object"&&e.handleEvent?e.handleEvent.call(e,r):e.call(t,r)}});var vx=X((hX,rT)=>{"use strict";var{tokenChars:yl}=xl();function bs(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}function SL(e){let t=Object.create(null),r=Object.create(null),i=!1,n=!1,o=!1,u,m,_=-1,w=-1,I=-1,T=0;for(;T<e.length;T++)if(w=e.charCodeAt(T),u===void 0)if(I===-1&&yl[w]===1)_===-1&&(_=T);else if(T!==0&&(w===32||w===9))I===-1&&_!==-1&&(I=T);else if(w===59||w===44){if(_===-1)throw new SyntaxError(`Unexpected character at index ${T}`);I===-1&&(I=T);let C=e.slice(_,I);w===44?(bs(t,C,r),r=Object.create(null)):u=C,_=I=-1}else throw new SyntaxError(`Unexpected character at index ${T}`);else if(m===void 0)if(I===-1&&yl[w]===1)_===-1&&(_=T);else if(w===32||w===9)I===-1&&_!==-1&&(I=T);else if(w===59||w===44){if(_===-1)throw new SyntaxError(`Unexpected character at index ${T}`);I===-1&&(I=T),bs(r,e.slice(_,I),!0),w===44&&(bs(t,u,r),r=Object.create(null),u=void 0),_=I=-1}else if(w===61&&_!==-1&&I===-1)m=e.slice(_,T),_=I=-1;else throw new SyntaxError(`Unexpected character at index ${T}`);else if(n){if(yl[w]!==1)throw new SyntaxError(`Unexpected character at index ${T}`);_===-1?_=T:i||(i=!0),n=!1}else if(o)if(yl[w]===1)_===-1&&(_=T);else if(w===34&&_!==-1)o=!1,I=T;else if(w===92)n=!0;else throw new SyntaxError(`Unexpected character at index ${T}`);else if(w===34&&e.charCodeAt(T-1)===61)o=!0;else if(I===-1&&yl[w]===1)_===-1&&(_=T);else if(_!==-1&&(w===32||w===9))I===-1&&(I=T);else if(w===59||w===44){if(_===-1)throw new SyntaxError(`Unexpected character at index ${T}`);I===-1&&(I=T);let C=e.slice(_,I);i&&(C=C.replace(/\\/g,""),i=!1),bs(r,m,C),w===44&&(bs(t,u,r),r=Object.create(null),u=void 0),m=void 0,_=I=-1}else throw new SyntaxError(`Unexpected character at index ${T}`);if(_===-1||o||w===32||w===9)throw new SyntaxError("Unexpected end of input");I===-1&&(I=T);let N=e.slice(_,I);return u===void 0?bs(t,N,r):(m===void 0?bs(r,N,!0):i?bs(r,m,N.replace(/\\/g,"")):bs(r,m,N),bs(t,u,r)),t}function EL(e){return Object.keys(e).map(t=>{let r=e[t];return Array.isArray(r)||(r=[r]),r.map(i=>[t].concat(Object.keys(i).map(n=>{let o=i[n];return Array.isArray(o)||(o=[o]),o.map(u=>u===!0?n:`${n}=${u}`).join("; ")})).join("; ")).join(", ")}).join(", ")}rT.exports={format:EL,parse:SL}});var Td=X((vX,hT)=>{"use strict";var IL=require("events"),TL=require("https"),RL=require("http"),sT=require("net"),AL=require("tls"),{randomBytes:OL,createHash:kL}=require("crypto"),{Duplex:dX,Readable:mX}=require("stream"),{URL:gx}=require("url"),mo=gl(),PL=_d(),NL=yd(),{BINARY_TYPES:iT,EMPTY_BUFFER:Sd,GUID:BL,kForOnEventAttribute:xx,kListener:ML,kStatusCode:CL,kWebSocket:mi,NOOP:aT}=po(),{EventTarget:{addEventListener:LL,removeEventListener:UL}}=tT(),{format:DL,parse:qL}=vx(),{toBuffer:FL}=dl(),HL=30*1e3,oT=Symbol("kAborted"),bx=[8,13],ga=["CONNECTING","OPEN","CLOSING","CLOSED"],zL=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,Mr=class e extends IL{constructor(t,r,i){super(),this._binaryType=iT[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Sd,this._closeTimer=null,this._extensions={},this._paused=!1,this._protocol="",this._readyState=e.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,t!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,r===void 0?r=[]:Array.isArray(r)||(typeof r=="object"&&r!==null?(i=r,r=[]):r=[r]),cT(this,t,r,i)):(this._autoPong=i.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(t){iT.includes(t)&&(this._binaryType=t,this._receiver&&(this._receiver._binaryType=t))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(t,r,i){let n=new PL({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation});this._sender=new NL(t,this._extensions,i.generateMask),this._receiver=n,this._socket=t,n[mi]=this,t[mi]=this,n.on("conclude",WL),n.on("drain",KL),n.on("error",GL),n.on("message",$L),n.on("ping",YL),n.on("pong",ZL),t.setTimeout&&t.setTimeout(0),t.setNoDelay&&t.setNoDelay(),r.length>0&&t.unshift(r),t.on("close",fT),t.on("data",Id),t.on("end",lT),t.on("error",pT),this._readyState=e.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[mo.extensionName]&&this._extensions[mo.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=e.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(t,r){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){Ji(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===e.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=e.CLOSING,this._sender.close(t,r,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),this._closeTimer=setTimeout(this._socket.destroy.bind(this._socket),HL)}}pause(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!0,this._socket.pause())}ping(t,r,i){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(i=t,t=r=void 0):typeof r=="function"&&(i=r,r=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){_x(this,t,i);return}r===void 0&&(r=!this._isServer),this._sender.ping(t||Sd,r,i)}pong(t,r,i){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"?(i=t,t=r=void 0):typeof r=="function"&&(i=r,r=void 0),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){_x(this,t,i);return}r===void 0&&(r=!this._isServer),this._sender.pong(t||Sd,r,i)}resume(){this.readyState===e.CONNECTING||this.readyState===e.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(t,r,i){if(this.readyState===e.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof r=="function"&&(i=r,r={}),typeof t=="number"&&(t=t.toString()),this.readyState!==e.OPEN){_x(this,t,i);return}let n={binary:typeof t!="string",mask:!this._isServer,compress:!0,fin:!0,...r};this._extensions[mo.extensionName]||(n.compress=!1),this._sender.send(t||Sd,n,i)}terminate(){if(this.readyState!==e.CLOSED){if(this.readyState===e.CONNECTING){Ji(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=e.CLOSING,this._socket.destroy())}}};Object.defineProperty(Mr,"CONNECTING",{enumerable:!0,value:ga.indexOf("CONNECTING")});Object.defineProperty(Mr.prototype,"CONNECTING",{enumerable:!0,value:ga.indexOf("CONNECTING")});Object.defineProperty(Mr,"OPEN",{enumerable:!0,value:ga.indexOf("OPEN")});Object.defineProperty(Mr.prototype,"OPEN",{enumerable:!0,value:ga.indexOf("OPEN")});Object.defineProperty(Mr,"CLOSING",{enumerable:!0,value:ga.indexOf("CLOSING")});Object.defineProperty(Mr.prototype,"CLOSING",{enumerable:!0,value:ga.indexOf("CLOSING")});Object.defineProperty(Mr,"CLOSED",{enumerable:!0,value:ga.indexOf("CLOSED")});Object.defineProperty(Mr.prototype,"CLOSED",{enumerable:!0,value:ga.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(e=>{Object.defineProperty(Mr.prototype,e,{enumerable:!0})});["open","error","close","message"].forEach(e=>{Object.defineProperty(Mr.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[xx])return t[ML];return null},set(t){for(let r of this.listeners(e))if(r[xx]){this.removeListener(e,r);break}typeof t=="function"&&this.addEventListener(e,t,{[xx]:!0})}})});Mr.prototype.addEventListener=LL;Mr.prototype.removeEventListener=UL;hT.exports=Mr;function cT(e,t,r,i){let n={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:bx[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=n.autoPong,!bx.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${bx.join(", ")})`);let o;if(t instanceof gx)o=t;else try{o=new gx(t)}catch{throw new SyntaxError(`Invalid URL: ${t}`)}o.protocol==="http:"?o.protocol="ws:":o.protocol==="https:"&&(o.protocol="wss:"),e._url=o.href;let u=o.protocol==="wss:",m=o.protocol==="ws+unix:",_;if(o.protocol!=="ws:"&&!u&&!m?_=`The URL's protocol must be one of "ws:", "wss:", "http:", "https", or "ws+unix:"`:m&&!o.pathname?_="The URL's pathname is empty":o.hash&&(_="The URL contains a fragment identifier"),_){let U=new SyntaxError(_);if(e._redirects===0)throw U;Ed(e,U);return}let w=u?443:80,I=OL(16).toString("base64"),T=u?TL.request:RL.request,N=new Set,C;if(n.createConnection=n.createConnection||(u?jL:VL),n.defaultPort=n.defaultPort||w,n.port=o.port||w,n.host=o.hostname.startsWith("[")?o.hostname.slice(1,-1):o.hostname,n.headers={...n.headers,"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":I,Connection:"Upgrade",Upgrade:"websocket"},n.path=o.pathname+o.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(C=new mo(n.perMessageDeflate!==!0?n.perMessageDeflate:{},!1,n.maxPayload),n.headers["Sec-WebSocket-Extensions"]=DL({[mo.extensionName]:C.offer()})),r.length){for(let U of r){if(typeof U!="string"||!zL.test(U)||N.has(U))throw new SyntaxError("An invalid or duplicated subprotocol was specified");N.add(U)}n.headers["Sec-WebSocket-Protocol"]=r.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(o.username||o.password)&&(n.auth=`${o.username}:${o.password}`),m){let U=n.path.split(":");n.socketPath=U[0],n.path=U[1]}let B;if(n.followRedirects){if(e._redirects===0){e._originalIpc=m,e._originalSecure=u,e._originalHostOrSocketPath=m?n.socketPath:o.host;let U=i&&i.headers;if(i={...i,headers:{}},U)for(let[Z,$]of Object.entries(U))i.headers[Z.toLowerCase()]=$}else if(e.listenerCount("redirect")===0){let U=m?e._originalIpc?n.socketPath===e._originalHostOrSocketPath:!1:e._originalIpc?!1:o.host===e._originalHostOrSocketPath;(!U||e._originalSecure&&!u)&&(delete n.headers.authorization,delete n.headers.cookie,U||delete n.headers.host,n.auth=void 0)}n.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(n.auth).toString("base64")),B=e._req=T(n),e._redirects&&e.emit("redirect",e.url,B)}else B=e._req=T(n);n.timeout&&B.on("timeout",()=>{Ji(e,B,"Opening handshake has timed out")}),B.on("error",U=>{B===null||B[oT]||(B=e._req=null,Ed(e,U))}),B.on("response",U=>{let Z=U.headers.location,$=U.statusCode;if(Z&&n.followRedirects&&$>=300&&$<400){if(++e._redirects>n.maxRedirects){Ji(e,B,"Maximum redirects exceeded");return}B.abort();let H;try{H=new gx(Z,t)}catch{let ce=new SyntaxError(`Invalid URL: ${Z}`);Ed(e,ce);return}cT(e,H,r,i)}else e.emit("unexpected-response",B,U)||Ji(e,B,`Unexpected server response: ${U.statusCode}`)}),B.on("upgrade",(U,Z,$)=>{if(e.emit("upgrade",U),e.readyState!==Mr.CONNECTING)return;if(B=e._req=null,U.headers.upgrade.toLowerCase()!=="websocket"){Ji(e,Z,"Invalid Upgrade header");return}let H=kL("sha1").update(I+BL).digest("base64");if(U.headers["sec-websocket-accept"]!==H){Ji(e,Z,"Invalid Sec-WebSocket-Accept header");return}let ee=U.headers["sec-websocket-protocol"],ce;if(ee!==void 0?N.size?N.has(ee)||(ce="Server sent an invalid subprotocol"):ce="Server sent a subprotocol but none was requested":N.size&&(ce="Server sent no subprotocol"),ce){Ji(e,Z,ce);return}ee&&(e._protocol=ee);let ge=U.headers["sec-websocket-extensions"];if(ge!==void 0){if(!C){Ji(e,Z,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let Se;try{Se=qL(ge)}catch{Ji(e,Z,"Invalid Sec-WebSocket-Extensions header");return}let me=Object.keys(Se);if(me.length!==1||me[0]!==mo.extensionName){Ji(e,Z,"Server indicated an extension that was not requested");return}try{C.accept(Se[mo.extensionName])}catch{Ji(e,Z,"Invalid Sec-WebSocket-Extensions header");return}e._extensions[mo.extensionName]=C}e.setSocket(Z,$,{allowSynchronousEvents:n.allowSynchronousEvents,generateMask:n.generateMask,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})}),n.finishRequest?n.finishRequest(B,e):B.end()}function Ed(e,t){e._readyState=Mr.CLOSING,e.emit("error",t),e.emitClose()}function VL(e){return e.path=e.socketPath,sT.connect(e)}function jL(e){return e.path=void 0,!e.servername&&e.servername!==""&&(e.servername=sT.isIP(e.host)?"":e.host),AL.connect(e)}function Ji(e,t,r){e._readyState=Mr.CLOSING;let i=new Error(r);Error.captureStackTrace(i,Ji),t.setHeader?(t[oT]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(Ed,e,i)):(t.destroy(i),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function _x(e,t,r){if(t){let i=FL(t).length;e._socket?e._sender._bufferedBytes+=i:e._bufferedAmount+=i}if(r){let i=new Error(`WebSocket is not open: readyState ${e.readyState} (${ga[e.readyState]})`);process.nextTick(r,i)}}function WL(e,t){let r=this[mi];r._closeFrameReceived=!0,r._closeMessage=t,r._closeCode=e,r._socket[mi]!==void 0&&(r._socket.removeListener("data",Id),process.nextTick(uT,r._socket),e===1005?r.close():r.close(e,t))}function KL(){let e=this[mi];e.isPaused||e._socket.resume()}function GL(e){let t=this[mi];t._socket[mi]!==void 0&&(t._socket.removeListener("data",Id),process.nextTick(uT,t._socket),t.close(e[CL])),t.emit("error",e)}function nT(){this[mi].emitClose()}function $L(e,t){this[mi].emit("message",e,t)}function YL(e){let t=this[mi];t._autoPong&&t.pong(e,!this._isServer,aT),t.emit("ping",e)}function ZL(e){this[mi].emit("pong",e)}function uT(e){e.resume()}function fT(){let e=this[mi];this.removeListener("close",fT),this.removeListener("data",Id),this.removeListener("end",lT),e._readyState=Mr.CLOSING;let t;!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&(t=e._socket.read())!==null&&e._receiver.write(t),e._receiver.end(),this[mi]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",nT),e._receiver.on("finish",nT))}function Id(e){this[mi]._receiver.write(e)||this.pause()}function lT(){let e=this[mi];e._readyState=Mr.CLOSING,e._receiver.end(),this.end()}function pT(){let e=this[mi];this.removeListener("error",pT),this.on("error",aT),e&&(e._readyState=Mr.CLOSING,this.destroy())}});var mT=X((gX,dT)=>{"use strict";var{tokenChars:XL}=xl();function JL(e){let t=new Set,r=-1,i=-1,n=0;for(n;n<e.length;n++){let u=e.charCodeAt(n);if(i===-1&&XL[u]===1)r===-1&&(r=n);else if(n!==0&&(u===32||u===9))i===-1&&r!==-1&&(i=n);else if(u===44){if(r===-1)throw new SyntaxError(`Unexpected character at index ${n}`);i===-1&&(i=n);let m=e.slice(r,i);if(t.has(m))throw new SyntaxError(`The "${m}" subprotocol is duplicated`);t.add(m),r=i=-1}else throw new SyntaxError(`Unexpected character at index ${n}`)}if(r===-1||i!==-1)throw new SyntaxError("Unexpected end of input");let o=e.slice(r,n);if(t.has(o))throw new SyntaxError(`The "${o}" subprotocol is duplicated`);return t.add(o),t}dT.exports={parse:JL}});var wx=X((bX,yT)=>{"use strict";var QL=require("events"),Rd=require("http"),{Duplex:xX}=require("stream"),{createHash:eU}=require("crypto"),vT=vx(),gc=gl(),tU=mT(),rU=Td(),{GUID:iU,kWebSocket:nU}=po(),sU=/^[+/0-9A-Za-z]{22}==$/,gT=0,xT=1,_T=2,yx=class extends QL{constructor(t,r){if(super(),t={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:rU,...t},t.port==null&&!t.server&&!t.noServer||t.port!=null&&(t.server||t.noServer)||t.server&&t.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(t.port!=null?(this._server=Rd.createServer((i,n)=>{let o=Rd.STATUS_CODES[426];n.writeHead(426,{"Content-Length":o.length,"Content-Type":"text/plain"}),n.end(o)}),this._server.listen(t.port,t.host,t.backlog,r)):t.server&&(this._server=t.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=aU(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,o,u)=>{this.handleUpgrade(n,o,u,i)}})}t.perMessageDeflate===!0&&(t.perMessageDeflate={}),t.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=t,this._state=gT}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(t){if(this._state===_T){t&&this.once("close",()=>{t(new Error("The server is not running"))}),process.nextTick(wl,this);return}if(t&&this.once("close",t),this._state!==xT)if(this._state=xT,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(wl,this):process.nextTick(wl,this);else{let r=this._server;this._removeListeners(),this._removeListeners=this._server=null,r.close(()=>{wl(this)})}}shouldHandle(t){if(this.options.path){let r=t.url.indexOf("?");if((r!==-1?t.url.slice(0,r):t.url)!==this.options.path)return!1}return!0}handleUpgrade(t,r,i,n){r.on("error",bT);let o=t.headers["sec-websocket-key"],u=+t.headers["sec-websocket-version"];if(t.method!=="GET"){xc(this,t,r,405,"Invalid HTTP method");return}if(t.headers.upgrade.toLowerCase()!=="websocket"){xc(this,t,r,400,"Invalid Upgrade header");return}if(!o||!sU.test(o)){xc(this,t,r,400,"Missing or invalid Sec-WebSocket-Key header");return}if(u!==8&&u!==13){xc(this,t,r,400,"Missing or invalid Sec-WebSocket-Version header");return}if(!this.shouldHandle(t)){Sl(r,400);return}let m=t.headers["sec-websocket-protocol"],_=new Set;if(m!==void 0)try{_=tU.parse(m)}catch{xc(this,t,r,400,"Invalid Sec-WebSocket-Protocol header");return}let w=t.headers["sec-websocket-extensions"],I={};if(this.options.perMessageDeflate&&w!==void 0){let T=new gc(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let N=vT.parse(w);N[gc.extensionName]&&(T.accept(N[gc.extensionName]),I[gc.extensionName]=T)}catch{xc(this,t,r,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let T={origin:t.headers[`${u===8?"sec-websocket-origin":"origin"}`],secure:!!(t.socket.authorized||t.socket.encrypted),req:t};if(this.options.verifyClient.length===2){this.options.verifyClient(T,(N,C,B,U)=>{if(!N)return Sl(r,C||401,B,U);this.completeUpgrade(I,o,_,t,r,i,n)});return}if(!this.options.verifyClient(T))return Sl(r,401)}this.completeUpgrade(I,o,_,t,r,i,n)}completeUpgrade(t,r,i,n,o,u,m){if(!o.readable||!o.writable)return o.destroy();if(o[nU])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>gT)return Sl(o,503);let w=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${eU("sha1").update(r+iU).digest("base64")}`],I=new this.options.WebSocket(null,void 0,this.options);if(i.size){let T=this.options.handleProtocols?this.options.handleProtocols(i,n):i.values().next().value;T&&(w.push(`Sec-WebSocket-Protocol: ${T}`),I._protocol=T)}if(t[gc.extensionName]){let T=t[gc.extensionName].params,N=vT.format({[gc.extensionName]:[T]});w.push(`Sec-WebSocket-Extensions: ${N}`),I._extensions=t}this.emit("headers",w,n),o.write(w.concat(`\r
25
25
  `).join(`\r
26
- `)),a.removeListener("error",PT),T.setSocket(a,u,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(T),T.on("close",()=>{this.clients.delete(T),this._shouldEmitClose&&!this.clients.size&&process.nextTick(Kl,this)})),h(T,n)}};MT.exports=ox;function XF(e,t){for(let r of Object.keys(t))e.on(r,t[r]);return function(){for(let i of Object.keys(t))e.removeListener(i,t[i])}}function Kl(e){e._state=BT,e.emit("close")}function PT(){this.destroy()}function Gl(e,t,r,i){r=r||Zd.STATUS_CODES[t],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(r),...i},e.once("finish",e.destroy),e.end(`HTTP/1.1 ${t} ${Zd.STATUS_CODES[t]}\r
26
+ `)),o.removeListener("error",bT),I.setSocket(o,u,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(I),I.on("close",()=>{this.clients.delete(I),this._shouldEmitClose&&!this.clients.size&&process.nextTick(wl,this)})),m(I,n)}};yT.exports=yx;function aU(e,t){for(let r of Object.keys(t))e.on(r,t[r]);return function(){for(let i of Object.keys(t))e.removeListener(i,t[i])}}function wl(e){e._state=_T,e.emit("close")}function bT(){this.destroy()}function Sl(e,t,r,i){r=r||Rd.STATUS_CODES[t],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(r),...i},e.once("finish",e.destroy),e.end(`HTTP/1.1 ${t} ${Rd.STATUS_CODES[t]}\r
27
27
  `+Object.keys(i).map(n=>`${n}: ${i[n]}`).join(`\r
28
28
  `)+`\r
29
29
  \r
30
- `+r)}function _c(e,t,r,i,n){if(e.listenerCount("wsClientError")){let a=new Error(n);Error.captureStackTrace(a,_c),e.emit("wsClientError",a,r,t)}else Gl(r,i,n)}});var UT=V((fre,DT)=>{"use strict";var _a=Yd();_a.createWebSocketStream=jb();_a.Server=cx();_a.Receiver=Vd();_a.Sender=Wd();_a.WebSocket=_a;_a.WebSocketServer=_a.Server;DT.exports=_a});var FT=V((lre,qT)=>{"use strict";qT.exports=UT()});var fH={};Na(fH,{Provider:()=>rs,assets:()=>bx,bitcore:()=>lH,models:()=>xx,services:()=>yx,types:()=>dx,utils:()=>vx});module.exports=$7(fH);var zT=yr(vt(),1),Pn=yr(jh(),1);function Xf(e,t){return function(){return e.apply(t,arguments)}}var{toString:WC}=Object.prototype,{getPrototypeOf:gg}=Object,Wh=(e=>t=>{let r=WC.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ys=e=>(e=e.toLowerCase(),t=>Wh(t)===e),Kh=e=>t=>typeof t===e,{isArray:Eu}=Array,Yf=Kh("undefined");function KC(e){return e!==null&&!Yf(e)&&e.constructor!==null&&!Yf(e.constructor)&&Tn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Q3=ys("ArrayBuffer");function GC(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Q3(e.buffer),t}var $C=Kh("string"),Tn=Kh("function"),eE=Kh("number"),Gh=e=>e!==null&&typeof e=="object",XC=e=>e===!0||e===!1,Vh=e=>{if(Wh(e)!=="object")return!1;let t=gg(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},YC=ys("Date"),ZC=ys("File"),JC=ys("Blob"),QC=ys("FileList"),eL=e=>Gh(e)&&Tn(e.pipe),tL=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Tn(e.append)&&((t=Wh(e))==="formdata"||t==="object"&&Tn(e.toString)&&e.toString()==="[object FormData]"))},rL=ys("URLSearchParams"),iL=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Zf(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,n;if(typeof e!="object"&&(e=[e]),Eu(e))for(i=0,n=e.length;i<n;i++)t.call(null,e[i],i,e);else{let a=r?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length,h;for(i=0;i<u;i++)h=a[i],t.call(null,e[h],h,e)}}function tE(e,t){t=t.toLowerCase();let r=Object.keys(e),i=r.length,n;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}var rE=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,iE=e=>!Yf(e)&&e!==rE;function vg(){let{caseless:e}=iE(this)&&this||{},t={},r=(i,n)=>{let a=e&&tE(t,n)||n;Vh(t[a])&&Vh(i)?t[a]=vg(t[a],i):Vh(i)?t[a]=vg({},i):Eu(i)?t[a]=i.slice():t[a]=i};for(let i=0,n=arguments.length;i<n;i++)arguments[i]&&Zf(arguments[i],r);return t}var nL=(e,t,r,{allOwnKeys:i}={})=>(Zf(t,(n,a)=>{r&&Tn(n)?e[a]=Xf(n,r):e[a]=n},{allOwnKeys:i}),e),sL=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),aL=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},oL=(e,t,r,i)=>{let n,a,u,h={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),a=n.length;a-- >0;)u=n[a],(!i||i(u,e,t))&&!h[u]&&(t[u]=e[u],h[u]=!0);e=r!==!1&&gg(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},cL=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let i=e.indexOf(t,r);return i!==-1&&i===r},uL=e=>{if(!e)return null;if(Eu(e))return e;let t=e.length;if(!eE(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},fL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&gg(Uint8Array)),lL=(e,t)=>{let i=(e&&e[Symbol.iterator]).call(e),n;for(;(n=i.next())&&!n.done;){let a=n.value;t.call(e,a[0],a[1])}},pL=(e,t)=>{let r,i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},hL=ys("HTMLFormElement"),dL=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,n){return i.toUpperCase()+n}),Z3=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),mL=ys("RegExp"),nE=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),i={};Zf(r,(n,a)=>{let u;(u=t(n,a,e))!==!1&&(i[a]=u||n)}),Object.defineProperties(e,i)},vL=e=>{nE(e,(t,r)=>{if(Tn(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let i=e[r];if(Tn(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},gL=(e,t)=>{let r={},i=n=>{n.forEach(a=>{r[a]=!0})};return Eu(e)?i(e):i(String(e).split(t)),r},bL=()=>{},xL=(e,t)=>(e=+e,Number.isFinite(e)?e:t),mg="abcdefghijklmnopqrstuvwxyz",J3="0123456789",sE={DIGIT:J3,ALPHA:mg,ALPHA_DIGIT:mg+mg.toUpperCase()+J3},_L=(e=16,t=sE.ALPHA_DIGIT)=>{let r="",{length:i}=t;for(;e--;)r+=t[Math.random()*i|0];return r};function yL(e){return!!(e&&Tn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var wL=e=>{let t=new Array(10),r=(i,n)=>{if(Gh(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[n]=i;let a=Eu(i)?[]:{};return Zf(i,(u,h)=>{let b=r(u,n+1);!Yf(b)&&(a[h]=b)}),t[n]=void 0,a}}return i};return r(e,0)},SL=ys("AsyncFunction"),EL=e=>e&&(Gh(e)||Tn(e))&&Tn(e.then)&&Tn(e.catch),z={isArray:Eu,isArrayBuffer:Q3,isBuffer:KC,isFormData:tL,isArrayBufferView:GC,isString:$C,isNumber:eE,isBoolean:XC,isObject:Gh,isPlainObject:Vh,isUndefined:Yf,isDate:YC,isFile:ZC,isBlob:JC,isRegExp:mL,isFunction:Tn,isStream:eL,isURLSearchParams:rL,isTypedArray:fL,isFileList:QC,forEach:Zf,merge:vg,extend:nL,trim:iL,stripBOM:sL,inherits:aL,toFlatObject:oL,kindOf:Wh,kindOfTest:ys,endsWith:cL,toArray:uL,forEachEntry:lL,matchAll:pL,isHTMLForm:hL,hasOwnProperty:Z3,hasOwnProp:Z3,reduceDescriptors:nE,freezeMethods:vL,toObjectSet:gL,toCamelCase:dL,noop:bL,toFiniteNumber:xL,findKey:tE,global:rE,isContextDefined:iE,ALPHABET:sE,generateString:_L,isSpecCompliantForm:yL,toJSONObject:wL,isAsyncFn:SL,isThenable:EL};function Tu(e,t,r,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),n&&(this.response=n)}z.inherits(Tu,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var aE=Tu.prototype,oE={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{oE[e]={value:e}});Object.defineProperties(Tu,oE);Object.defineProperty(aE,"isAxiosError",{value:!0});Tu.from=(e,t,r,i,n,a)=>{let u=Object.create(aE);return z.toFlatObject(e,u,function(b){return b!==Error.prototype},h=>h!=="isAxiosError"),Tu.call(u,e.message,t,r,i,n),u.cause=e,u.name=e.name,a&&Object.assign(u,a),u};var Se=Tu;var jE=yr(zE(),1),Yh=jE.default;function Ag(e){return z.isPlainObject(e)||z.isArray(e)}function WE(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function VE(e,t,r){return e?e.concat(t).map(function(n,a){return n=WE(n),!r&&a?"["+n+"]":n}).join(r?".":""):t}function oD(e){return z.isArray(e)&&!e.some(Ag)}var cD=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function uD(e,t,r){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new(Yh||FormData),r=z.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(L,X){return!z.isUndefined(X[L])});let i=r.metaTokens,n=r.visitor||T,a=r.dots,u=r.indexes,b=(r.Blob||typeof Blob<"u"&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(n))throw new TypeError("visitor must be a function");function w(P){if(P===null)return"";if(z.isDate(P))return P.toISOString();if(!b&&z.isBlob(P))throw new Se("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(P)||z.isTypedArray(P)?b&&typeof Blob=="function"?new Blob([P]):Buffer.from(P):P}function T(P,L,X){let W=P;if(P&&!X&&typeof P=="object"){if(z.endsWith(L,"{}"))L=i?L:L.slice(0,-2),P=JSON.stringify(P);else if(z.isArray(P)&&oD(P)||(z.isFileList(P)||z.endsWith(L,"[]"))&&(W=z.toArray(P)))return L=WE(L),W.forEach(function(ee,fe){!(z.isUndefined(ee)||ee===null)&&t.append(u===!0?VE([L],fe,a):u===null?L:L+"[]",w(ee))}),!1}return Ag(P)?!0:(t.append(VE(X,L,a),w(P)),!1)}let I=[],B=Object.assign(cD,{defaultVisitor:T,convertValue:w,isVisitable:Ag});function M(P,L){if(!z.isUndefined(P)){if(I.indexOf(P)!==-1)throw Error("Circular reference detected in "+L.join("."));I.push(P),z.forEach(P,function(W,q){(!(z.isUndefined(W)||W===null)&&n.call(t,W,z.isString(q)?q.trim():q,L,B))===!0&&M(W,L?L.concat(q):[q])}),I.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return M(e),t}var ro=uD;function KE(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function GE(e,t){this._pairs=[],e&&ro(e,this,t)}var $E=GE.prototype;$E.append=function(t,r){this._pairs.push([t,r])};$E.toString=function(t){let r=t?function(i){return t.call(this,i,KE)}:KE;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var XE=GE;function fD(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Jo(e,t,r){if(!t)return e;let i=r&&r.encode||fD,n=r&&r.serialize,a;if(n?a=n(t,r):a=z.isURLSearchParams(t)?t.toString():new XE(t,r).toString(i),a){let u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}var Og=class{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(i){i!==null&&t(i)})}},kg=Og;var Iu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var YE=yr(require("url"),1),ZE=YE.default.URLSearchParams;var JE={isNode:!0,classes:{URLSearchParams:ZE,FormData:Yh,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};var Ng={};Na(Ng,{hasBrowserEnv:()=>QE,hasStandardBrowserEnv:()=>lD,hasStandardBrowserWebWorkerEnv:()=>pD});var QE=typeof window<"u"&&typeof document<"u",lD=(e=>QE&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),pD=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function";var Kr={...Ng,...JE};function Pg(e,t){return ro(e,new Kr.classes.URLSearchParams,Object.assign({visitor:function(r,i,n,a){return Kr.isNode&&z.isBuffer(r)?(this.append(i,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function hD(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function dD(e){let t={},r=Object.keys(e),i,n=r.length,a;for(i=0;i<n;i++)a=r[i],t[a]=e[a];return t}function mD(e){function t(r,i,n,a){let u=r[a++];if(u==="__proto__")return!0;let h=Number.isFinite(+u),b=a>=r.length;return u=!u&&z.isArray(n)?n.length:u,b?(z.hasOwnProp(n,u)?n[u]=[n[u],i]:n[u]=i,!h):((!n[u]||!z.isObject(n[u]))&&(n[u]=[]),t(r,i,n[u],a)&&z.isArray(n[u])&&(n[u]=dD(n[u])),!h)}if(z.isFormData(e)&&z.isFunction(e.entries)){let r={};return z.forEachEntry(e,(i,n)=>{t(hD(i),n,r,0)}),r}return null}var Zh=mD;function vD(e,t,r){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}var Bg={transitional:Iu,adapter:["xhr","http"],transformRequest:[function(t,r){let i=r.getContentType()||"",n=i.indexOf("application/json")>-1,a=z.isObject(t);if(a&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return n?JSON.stringify(Zh(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Pg(t,this.formSerializer).toString();if((h=z.isFileList(t))||i.indexOf("multipart/form-data")>-1){let b=this.env&&this.env.FormData;return ro(h?{"files[]":t}:t,b&&new b,this.formSerializer)}}return a||n?(r.setContentType("application/json",!1),vD(t)):t}],transformResponse:[function(t){let r=this.transitional||Bg.transitional,i=r&&r.forcedJSONParsing,n=this.responseType==="json";if(t&&z.isString(t)&&(i&&!this.responseType||n)){let u=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(h){if(u)throw h.name==="SyntaxError"?Se.from(h,Se.ERR_BAD_RESPONSE,this,null,this.response):h}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Kr.classes.FormData,Blob:Kr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch"],e=>{Bg.headers[e]={}});var Ru=Bg;var gD=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),e6=e=>{let t={},r,i,n;return e&&e.split(`
31
- `).forEach(function(u){n=u.indexOf(":"),r=u.substring(0,n).trim().toLowerCase(),i=u.substring(n+1).trim(),!(!r||t[r]&&gD[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t};var t6=Symbol("internals");function Jf(e){return e&&String(e).trim().toLowerCase()}function Jh(e){return e===!1||e==null?e:z.isArray(e)?e.map(Jh):String(e)}function bD(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}var xD=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Mg(e,t,r,i,n){if(z.isFunction(i))return i.call(this,t,r);if(n&&(t=r),!!z.isString(t)){if(z.isString(i))return t.indexOf(i)!==-1;if(z.isRegExp(i))return i.test(t)}}function _D(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function yD(e,t){let r=z.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(n,a,u){return this[i].call(this,t,n,a,u)},configurable:!0})})}var Au=class{constructor(t){t&&this.set(t)}set(t,r,i){let n=this;function a(h,b,w){let T=Jf(b);if(!T)throw new Error("header name must be a non-empty string");let I=z.findKey(n,T);(!I||n[I]===void 0||w===!0||w===void 0&&n[I]!==!1)&&(n[I||b]=Jh(h))}let u=(h,b)=>z.forEach(h,(w,T)=>a(w,T,b));return z.isPlainObject(t)||t instanceof this.constructor?u(t,r):z.isString(t)&&(t=t.trim())&&!xD(t)?u(e6(t),r):t!=null&&a(r,t,i),this}get(t,r){if(t=Jf(t),t){let i=z.findKey(this,t);if(i){let n=this[i];if(!r)return n;if(r===!0)return bD(n);if(z.isFunction(r))return r.call(this,n,i);if(z.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Jf(t),t){let i=z.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||Mg(this,this[i],i,r)))}return!1}delete(t,r){let i=this,n=!1;function a(u){if(u=Jf(u),u){let h=z.findKey(i,u);h&&(!r||Mg(i,i[h],h,r))&&(delete i[h],n=!0)}}return z.isArray(t)?t.forEach(a):a(t),n}clear(t){let r=Object.keys(this),i=r.length,n=!1;for(;i--;){let a=r[i];(!t||Mg(this,this[a],a,t,!0))&&(delete this[a],n=!0)}return n}normalize(t){let r=this,i={};return z.forEach(this,(n,a)=>{let u=z.findKey(i,a);if(u){r[u]=Jh(n),delete r[a];return}let h=t?_D(a):String(a).trim();h!==a&&delete r[a],r[h]=Jh(n),i[h]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return z.forEach(this,(i,n)=>{i!=null&&i!==!1&&(r[n]=t&&z.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
32
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let i=new this(t);return r.forEach(n=>i.set(n)),i}static accessor(t){let i=(this[t6]=this[t6]={accessors:{}}).accessors,n=this.prototype;function a(u){let h=Jf(u);i[h]||(yD(n,u),i[h]=!0)}return z.isArray(t)?t.forEach(a):a(t),this}};Au.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);z.reduceDescriptors(Au.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[r]=i}}});z.freezeMethods(Au);var Gr=Au;function Qf(e,t){let r=this||Ru,i=t||r,n=Gr.from(i.headers),a=i.data;return z.forEach(e,function(h){a=h.call(r,a,n.normalize(),t?t.status:void 0)}),n.normalize(),a}function el(e){return!!(e&&e.__CANCEL__)}function r6(e,t,r){Se.call(this,e??"canceled",Se.ERR_CANCELED,t,r),this.name="CanceledError"}z.inherits(r6,Se,{__CANCEL__:!0});var Xn=r6;function io(e,t,r){let i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new Se("Request failed with status code "+r.status,[Se.ERR_BAD_REQUEST,Se.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Cg(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Lg(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Qo(e,t){return e&&!Cg(t)?Lg(e,t):t}var T6=yr(n6(),1),I6=yr(require("http"),1),R6=yr(require("https"),1),A6=yr(require("util"),1),O6=yr(l6(),1),ca=yr(require("zlib"),1);var tc="1.6.8";function al(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var UD=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function Xg(e,t,r){let i=r&&r.Blob||Kr.classes.Blob,n=al(e);if(t===void 0&&i&&(t=!0),n==="data"){e=n.length?e.slice(n.length+1):e;let a=UD.exec(e);if(!a)throw new Se("Invalid URL",Se.ERR_INVALID_URL);let u=a[1],h=a[2],b=a[3],w=Buffer.from(decodeURIComponent(b),h?"base64":"utf8");if(t){if(!i)throw new Se("Blob is not supported",Se.ERR_NOT_SUPPORT);return new i([w],{type:u})}return w}throw new Se("Unsupported protocol "+n,Se.ERR_NOT_SUPPORT)}var rc=yr(require("stream"),1);var h6=yr(require("stream"),1);function qD(e,t){let r=0,i=1e3/t,n=null;return function(u,h){let b=Date.now();if(u||b-r>i)return n&&(clearTimeout(n),n=null),r=b,e.apply(null,h);n||(n=setTimeout(()=>(n=null,r=Date.now(),e.apply(null,h)),i-(b-r)))}}var p6=qD;function FD(e,t){e=e||10;let r=new Array(e),i=new Array(e),n=0,a=0,u;return t=t!==void 0?t:1e3,function(b){let w=Date.now(),T=i[a];u||(u=w),r[n]=b,i[n]=w;let I=a,B=0;for(;I!==n;)B+=r[I++],I=I%e;if(n=(n+1)%e,n===a&&(a=(a+1)%e),w-u<t)return;let M=T&&w-T;return M?Math.round(B*1e3/M):void 0}}var Qh=FD;var ed=Symbol("internals"),Yg=class extends h6.default.Transform{constructor(t){t=z.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(h,b)=>!z.isUndefined(b[h])),super({readableHighWaterMark:t.chunkSize});let r=this,i=this[ed]={length:t.length,timeWindow:t.timeWindow,ticksRate:t.ticksRate,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},n=Qh(i.ticksRate*t.samplesCount,i.timeWindow);this.on("newListener",h=>{h==="progress"&&(i.isCaptured||(i.isCaptured=!0))});let a=0;i.updateProgress=p6(function(){let b=i.length,w=i.bytesSeen,T=w-a;if(!T||r.destroyed)return;let I=n(T);a=w,process.nextTick(()=>{r.emit("progress",{loaded:w,total:b,progress:b?w/b:void 0,bytes:T,rate:I||void 0,estimated:I&&b&&w<=b?(b-w)/I:void 0})})},i.ticksRate);let u=()=>{i.updateProgress(!0)};this.once("end",u),this.once("error",u)}_read(t){let r=this[ed];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,i){let n=this,a=this[ed],u=a.maxRate,h=this.readableHighWaterMark,b=a.timeWindow,w=1e3/b,T=u/w,I=a.minChunkSize!==!1?Math.max(a.minChunkSize,T*.01):0;function B(P,L){let X=Buffer.byteLength(P);a.bytesSeen+=X,a.bytes+=X,a.isCaptured&&a.updateProgress(),n.push(P)?process.nextTick(L):a.onReadCallback=()=>{a.onReadCallback=null,process.nextTick(L)}}let M=(P,L)=>{let X=Buffer.byteLength(P),W=null,q=h,ee,fe=0;if(u){let _e=Date.now();(!a.ts||(fe=_e-a.ts)>=b)&&(a.ts=_e,ee=T-a.bytes,a.bytes=ee<0?-ee:0,fe=0),ee=T-a.bytes}if(u){if(ee<=0)return setTimeout(()=>{L(null,P)},b-fe);ee<q&&(q=ee)}q&&X>q&&X-q>I&&(W=P.subarray(q),P=P.subarray(0,q)),B(P,W?()=>{process.nextTick(L,null,W)}:L)};M(t,function P(L,X){if(L)return i(L);X?M(X,P):i(null)})}setLength(t){return this[ed].length=+t,this}},Zg=Yg;var k6=require("events");var m6=require("util"),v6=require("stream");var{asyncIterator:d6}=Symbol,HD=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[d6]?yield*e[d6]():yield e},td=HD;var zD=z.ALPHABET.ALPHA_DIGIT+"-_",ol=new m6.TextEncoder,no=`\r
33
- `,jD=ol.encode(no),VD=2,Jg=class{constructor(t,r){let{escapeName:i}=this.constructor,n=z.isString(r),a=`Content-Disposition: form-data; name="${i(t)}"${!n&&r.name?`; filename="${i(r.name)}"`:""}${no}`;n?r=ol.encode(String(r).replace(/\r?\n|\r\n?/g,no)):a+=`Content-Type: ${r.type||"application/octet-stream"}${no}`,this.headers=ol.encode(a+no),this.contentLength=n?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+VD,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;z.isTypedArray(t)?yield t:yield*td(t),yield jD}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},WD=(e,t,r)=>{let{tag:i="form-data-boundary",size:n=25,boundary:a=i+"-"+z.generateString(n,zD)}=r||{};if(!z.isFormData(e))throw TypeError("FormData instance required");if(a.length<1||a.length>70)throw Error("boundary must be 10-70 characters long");let u=ol.encode("--"+a+no),h=ol.encode("--"+a+"--"+no+no),b=h.byteLength,w=Array.from(e.entries()).map(([I,B])=>{let M=new Jg(I,B);return b+=M.size,M});b+=u.byteLength*w.length,b=z.toFiniteNumber(b);let T={"Content-Type":`multipart/form-data; boundary=${a}`};return Number.isFinite(b)&&(T["Content-Length"]=b),t&&t(T),v6.Readable.from(async function*(){for(let I of w)yield u,yield*I.encode();yield h}())},g6=WD;var b6=yr(require("stream"),1),Qg=class extends b6.default.Transform{__transform(t,r,i){this.push(t),i()}_transform(t,r,i){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let n=Buffer.alloc(2);n[0]=120,n[1]=156,this.push(n,r)}this.__transform(t,r,i)}},x6=Qg;var KD=(e,t)=>z.isAsyncFn(e)?function(...r){let i=r.pop();e.apply(this,r).then(n=>{try{t?i(null,...t(n)):i(null,n)}catch(a){i(a)}},i)}:e,_6=KD;var y6={flush:ca.default.constants.Z_SYNC_FLUSH,finishFlush:ca.default.constants.Z_SYNC_FLUSH},GD={flush:ca.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:ca.default.constants.BROTLI_OPERATION_FLUSH},w6=z.isFunction(ca.default.createBrotliDecompress),{http:$D,https:XD}=O6.default,YD=/https:?/,S6=Kr.protocols.map(e=>e+":");function ZD(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function N6(e,t,r){let i=t;if(!i&&i!==!1){let n=(0,T6.getProxyForUrl)(r);n&&(i=new URL(n))}if(i){if(i.username&&(i.auth=(i.username||"")+":"+(i.password||"")),i.auth){(i.auth.username||i.auth.password)&&(i.auth=(i.auth.username||"")+":"+(i.auth.password||""));let a=Buffer.from(i.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+a}e.headers.host=e.hostname+(e.port?":"+e.port:"");let n=i.hostname||i.host;e.hostname=n,e.host=n,e.port=i.port,e.path=r,i.protocol&&(e.protocol=i.protocol.includes(":")?i.protocol:`${i.protocol}:`)}e.beforeRedirects.proxy=function(a){N6(a,t,a.href)}}var JD=typeof process<"u"&&z.kindOf(process)==="process",QD=e=>new Promise((t,r)=>{let i,n,a=(b,w)=>{n||(n=!0,i&&i(b,w))},u=b=>{a(b),t(b)},h=b=>{a(b,!0),r(b)};e(u,h,b=>i=b).catch(h)}),eU=({address:e,family:t})=>{if(!z.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},E6=(e,t)=>eU(z.isObject(e)?e:{address:e,family:t}),P6=JD&&function(t){return QD(async function(i,n,a){let{data:u,lookup:h,family:b}=t,{responseType:w,responseEncoding:T}=t,I=t.method.toUpperCase(),B,M=!1,P;if(h){let _=_6(h,l=>z.isArray(l)?l:[l]);h=(l,m,A)=>{_(l,m,(U,j,Z)=>{if(U)return A(U);let se=z.isArray(j)?j.map(ae=>E6(ae)):[E6(j,Z)];m.all?A(U,se):A(U,se[0].address,se[0].family)})}}let L=new k6.EventEmitter,X=()=>{t.cancelToken&&t.cancelToken.unsubscribe(W),t.signal&&t.signal.removeEventListener("abort",W),L.removeAllListeners()};a((_,l)=>{B=!0,l&&(M=!0,X())});function W(_){L.emit("abort",!_||_.type?new Xn(null,t,P):_)}L.once("abort",n),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(W),t.signal&&(t.signal.aborted?W():t.signal.addEventListener("abort",W)));let q=Qo(t.baseURL,t.url),ee=new URL(q,"http://localhost"),fe=ee.protocol||S6[0];if(fe==="data:"){let _;if(I!=="GET")return io(i,n,{status:405,statusText:"method not allowed",headers:{},config:t});try{_=Xg(t.url,w==="blob",{Blob:t.env&&t.env.Blob})}catch(l){throw Se.from(l,Se.ERR_BAD_REQUEST,t)}return w==="text"?(_=_.toString(T),(!T||T==="utf8")&&(_=z.stripBOM(_))):w==="stream"&&(_=rc.default.Readable.from(_)),io(i,n,{data:_,status:200,statusText:"OK",headers:new Gr,config:t})}if(S6.indexOf(fe)===-1)return n(new Se("Unsupported protocol "+fe,Se.ERR_BAD_REQUEST,t));let _e=Gr.from(t.headers).normalize();_e.set("User-Agent","axios/"+tc,!1);let Te=t.onDownloadProgress,be=t.onUploadProgress,O=t.maxRate,E,f;if(z.isSpecCompliantForm(u)){let _=_e.getContentType(/boundary=([-_\w\d]{10,70})/i);u=g6(u,l=>{_e.set(l)},{tag:`axios-${tc}-boundary`,boundary:_&&_[1]||void 0})}else if(z.isFormData(u)&&z.isFunction(u.getHeaders)){if(_e.set(u.getHeaders()),!_e.hasContentLength())try{let _=await A6.default.promisify(u.getLength).call(u);Number.isFinite(_)&&_>=0&&_e.setContentLength(_)}catch{}}else if(z.isBlob(u))u.size&&_e.setContentType(u.type||"application/octet-stream"),_e.setContentLength(u.size||0),u=rc.default.Readable.from(td(u));else if(u&&!z.isStream(u)){if(!Buffer.isBuffer(u))if(z.isArrayBuffer(u))u=Buffer.from(new Uint8Array(u));else if(z.isString(u))u=Buffer.from(u,"utf-8");else return n(new Se("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",Se.ERR_BAD_REQUEST,t));if(_e.setContentLength(u.length,!1),t.maxBodyLength>-1&&u.length>t.maxBodyLength)return n(new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,t))}let c=z.toFiniteNumber(_e.getContentLength());z.isArray(O)?(E=O[0],f=O[1]):E=f=O,u&&(be||E)&&(z.isStream(u)||(u=rc.default.Readable.from(u,{objectMode:!1})),u=rc.default.pipeline([u,new Zg({length:c,maxRate:z.toFiniteNumber(E)})],z.noop),be&&u.on("progress",_=>{be(Object.assign(_,{upload:!0}))}));let p;if(t.auth){let _=t.auth.username||"",l=t.auth.password||"";p=_+":"+l}if(!p&&ee.username){let _=ee.username,l=ee.password;p=_+":"+l}p&&_e.delete("authorization");let v;try{v=Jo(ee.pathname+ee.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(_){let l=new Error(_.message);return l.config=t,l.url=t.url,l.exists=!0,n(l)}_e.set("Accept-Encoding","gzip, compress, deflate"+(w6?", br":""),!1);let g={path:v,method:I,headers:_e.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:p,protocol:fe,family:b,beforeRedirect:ZD,beforeRedirects:{}};!z.isUndefined(h)&&(g.lookup=h),t.socketPath?g.socketPath=t.socketPath:(g.hostname=ee.hostname,g.port=ee.port,N6(g,t.proxy,fe+"//"+ee.hostname+(ee.port?":"+ee.port:"")+g.path));let x,S=YD.test(g.protocol);if(g.agent=S?t.httpsAgent:t.httpAgent,t.transport?x=t.transport:t.maxRedirects===0?x=S?R6.default:I6.default:(t.maxRedirects&&(g.maxRedirects=t.maxRedirects),t.beforeRedirect&&(g.beforeRedirects.config=t.beforeRedirect),x=S?XD:$D),t.maxBodyLength>-1?g.maxBodyLength=t.maxBodyLength:g.maxBodyLength=1/0,t.insecureHTTPParser&&(g.insecureHTTPParser=t.insecureHTTPParser),P=x.request(g,function(l){if(P.destroyed)return;let m=[l],A=+l.headers["content-length"];if(Te){let ae=new Zg({length:z.toFiniteNumber(A),maxRate:z.toFiniteNumber(f)});Te&&ae.on("progress",he=>{Te(Object.assign(he,{download:!0}))}),m.push(ae)}let U=l,j=l.req||P;if(t.decompress!==!1&&l.headers["content-encoding"])switch((I==="HEAD"||l.statusCode===204)&&delete l.headers["content-encoding"],(l.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":m.push(ca.default.createUnzip(y6)),delete l.headers["content-encoding"];break;case"deflate":m.push(new x6),m.push(ca.default.createUnzip(y6)),delete l.headers["content-encoding"];break;case"br":w6&&(m.push(ca.default.createBrotliDecompress(GD)),delete l.headers["content-encoding"])}U=m.length>1?rc.default.pipeline(m,z.noop):m[0];let Z=rc.default.finished(U,()=>{Z(),X()}),se={status:l.statusCode,statusText:l.statusMessage,headers:new Gr(l.headers),config:t,request:j};if(w==="stream")se.data=U,io(i,n,se);else{let ae=[],he=0;U.on("data",function(me){ae.push(me),he+=me.length,t.maxContentLength>-1&&he>t.maxContentLength&&(M=!0,U.destroy(),n(new Se("maxContentLength size of "+t.maxContentLength+" exceeded",Se.ERR_BAD_RESPONSE,t,j)))}),U.on("aborted",function(){if(M)return;let me=new Se("maxContentLength size of "+t.maxContentLength+" exceeded",Se.ERR_BAD_RESPONSE,t,j);U.destroy(me),n(me)}),U.on("error",function(me){P.destroyed||n(Se.from(me,null,t,j))}),U.on("end",function(){try{let me=ae.length===1?ae[0]:Buffer.concat(ae);w!=="arraybuffer"&&(me=me.toString(T),(!T||T==="utf8")&&(me=z.stripBOM(me))),se.data=me}catch(me){return n(Se.from(me,null,t,se.request,se))}io(i,n,se)})}L.once("abort",ae=>{U.destroyed||(U.emit("error",ae),U.destroy())})}),L.once("abort",_=>{n(_),P.destroy(_)}),P.on("error",function(l){n(Se.from(l,null,t,P))}),P.on("socket",function(l){l.setKeepAlive(!0,1e3*60)}),t.timeout){let _=parseInt(t.timeout,10);if(Number.isNaN(_)){n(new Se("error trying to parse `config.timeout` to int",Se.ERR_BAD_OPTION_VALUE,t,P));return}P.setTimeout(_,function(){if(B)return;let m=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",A=t.transitional||Iu;t.timeoutErrorMessage&&(m=t.timeoutErrorMessage),n(new Se(m,A.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,t,P)),W()})}if(z.isStream(u)){let _=!1,l=!1;u.on("end",()=>{_=!0}),u.once("error",m=>{l=!0,P.destroy(m)}),u.on("close",()=>{!_&&!l&&W(new Xn("Request stream has been aborted",t,P))}),u.pipe(P)}else P.end(u)})};var B6=Kr.hasStandardBrowserEnv?{write(e,t,r,i,n,a){let u=[e+"="+encodeURIComponent(t)];z.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),z.isString(i)&&u.push("path="+i),z.isString(n)&&u.push("domain="+n),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var M6=Kr.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),i;function n(a){let u=a;return t&&(r.setAttribute("href",u),u=r.href),r.setAttribute("href",u),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=n(window.location.href),function(u){let h=z.isString(u)?n(u):u;return h.protocol===i.protocol&&h.host===i.host}}():function(){return function(){return!0}}();function C6(e,t){let r=0,i=Qh(50,250);return n=>{let a=n.loaded,u=n.lengthComputable?n.total:void 0,h=a-r,b=i(h),w=a<=u;r=a;let T={loaded:a,total:u,progress:u?a/u:void 0,bytes:h,rate:b||void 0,estimated:b&&u&&w?(u-a)/b:void 0,event:n};T[t?"download":"upload"]=!0,e(T)}}var tU=typeof XMLHttpRequest<"u",L6=tU&&function(e){return new Promise(function(r,i){let n=e.data,a=Gr.from(e.headers).normalize(),{responseType:u,withXSRFToken:h}=e,b;function w(){e.cancelToken&&e.cancelToken.unsubscribe(b),e.signal&&e.signal.removeEventListener("abort",b)}let T;if(z.isFormData(n)){if(Kr.hasStandardBrowserEnv||Kr.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((T=a.getContentType())!==!1){let[L,...X]=T?T.split(";").map(W=>W.trim()).filter(Boolean):[];a.setContentType([L||"multipart/form-data",...X].join("; "))}}let I=new XMLHttpRequest;if(e.auth){let L=e.auth.username||"",X=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(L+":"+X))}let B=Qo(e.baseURL,e.url);I.open(e.method.toUpperCase(),Jo(B,e.params,e.paramsSerializer),!0),I.timeout=e.timeout;function M(){if(!I)return;let L=Gr.from("getAllResponseHeaders"in I&&I.getAllResponseHeaders()),W={data:!u||u==="text"||u==="json"?I.responseText:I.response,status:I.status,statusText:I.statusText,headers:L,config:e,request:I};io(function(ee){r(ee),w()},function(ee){i(ee),w()},W),I=null}if("onloadend"in I?I.onloadend=M:I.onreadystatechange=function(){!I||I.readyState!==4||I.status===0&&!(I.responseURL&&I.responseURL.indexOf("file:")===0)||setTimeout(M)},I.onabort=function(){I&&(i(new Se("Request aborted",Se.ECONNABORTED,e,I)),I=null)},I.onerror=function(){i(new Se("Network Error",Se.ERR_NETWORK,e,I)),I=null},I.ontimeout=function(){let X=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",W=e.transitional||Iu;e.timeoutErrorMessage&&(X=e.timeoutErrorMessage),i(new Se(X,W.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,e,I)),I=null},Kr.hasStandardBrowserEnv&&(h&&z.isFunction(h)&&(h=h(e)),h||h!==!1&&M6(B))){let L=e.xsrfHeaderName&&e.xsrfCookieName&&B6.read(e.xsrfCookieName);L&&a.set(e.xsrfHeaderName,L)}n===void 0&&a.setContentType(null),"setRequestHeader"in I&&z.forEach(a.toJSON(),function(X,W){I.setRequestHeader(W,X)}),z.isUndefined(e.withCredentials)||(I.withCredentials=!!e.withCredentials),u&&u!=="json"&&(I.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&I.addEventListener("progress",C6(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&I.upload&&I.upload.addEventListener("progress",C6(e.onUploadProgress)),(e.cancelToken||e.signal)&&(b=L=>{I&&(i(!L||L.type?new Xn(null,e,I):L),I.abort(),I=null)},e.cancelToken&&e.cancelToken.subscribe(b),e.signal&&(e.signal.aborted?b():e.signal.addEventListener("abort",b)));let P=al(B);if(P&&Kr.protocols.indexOf(P)===-1){i(new Se("Unsupported protocol "+P+":",Se.ERR_BAD_REQUEST,e));return}I.send(n||null)})};var eb={http:P6,xhr:L6};z.forEach(eb,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var D6=e=>`- ${e}`,rU=e=>z.isFunction(e)||e===null||e===!1,rd={getAdapter:e=>{e=z.isArray(e)?e:[e];let{length:t}=e,r,i,n={};for(let a=0;a<t;a++){r=e[a];let u;if(i=r,!rU(r)&&(i=eb[(u=String(r)).toLowerCase()],i===void 0))throw new Se(`Unknown adapter '${u}'`);if(i)break;n[u||"#"+a]=i}if(!i){let a=Object.entries(n).map(([h,b])=>`adapter ${h} `+(b===!1?"is not supported by the environment":"is not available in the build")),u=t?a.length>1?`since :
34
- `+a.map(D6).join(`
35
- `):" "+D6(a[0]):"as no adapter specified";throw new Se("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i},adapters:eb};function tb(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Xn(null,e)}function id(e){return tb(e),e.headers=Gr.from(e.headers),e.data=Qf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rd.getAdapter(e.adapter||Ru.adapter)(e).then(function(i){return tb(e),i.data=Qf.call(e,e.transformResponse,i),i.headers=Gr.from(i.headers),i},function(i){return el(i)||(tb(e),i&&i.response&&(i.response.data=Qf.call(e,e.transformResponse,i.response),i.response.headers=Gr.from(i.response.headers))),Promise.reject(i)})}var U6=e=>e instanceof Gr?{...e}:e;function ua(e,t){t=t||{};let r={};function i(w,T,I){return z.isPlainObject(w)&&z.isPlainObject(T)?z.merge.call({caseless:I},w,T):z.isPlainObject(T)?z.merge({},T):z.isArray(T)?T.slice():T}function n(w,T,I){if(z.isUndefined(T)){if(!z.isUndefined(w))return i(void 0,w,I)}else return i(w,T,I)}function a(w,T){if(!z.isUndefined(T))return i(void 0,T)}function u(w,T){if(z.isUndefined(T)){if(!z.isUndefined(w))return i(void 0,w)}else return i(void 0,T)}function h(w,T,I){if(I in t)return i(w,T);if(I in e)return i(void 0,w)}let b={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:h,headers:(w,T)=>n(U6(w),U6(T),!0)};return z.forEach(Object.keys(Object.assign({},e,t)),function(T){let I=b[T]||n,B=I(e[T],t[T],T);z.isUndefined(B)&&I!==h||(r[T]=B)}),r}var rb={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{rb[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});var q6={};rb.transitional=function(t,r,i){function n(a,u){return"[Axios v"+tc+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,h)=>{if(t===!1)throw new Se(n(u," has been removed"+(r?" in "+r:"")),Se.ERR_DEPRECATED);return r&&!q6[u]&&(q6[u]=!0,console.warn(n(u," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,u,h):!0}};function iU(e,t,r){if(typeof e!="object")throw new Se("options must be an object",Se.ERR_BAD_OPTION_VALUE);let i=Object.keys(e),n=i.length;for(;n-- >0;){let a=i[n],u=t[a];if(u){let h=e[a],b=h===void 0||u(h,a,e);if(b!==!0)throw new Se("option "+a+" must be "+b,Se.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Se("Unknown option "+a,Se.ERR_BAD_OPTION)}}var nd={assertOptions:iU,validators:rb};var so=nd.validators,ku=class{constructor(t){this.defaults=t,this.interceptors={request:new kg,response:new kg}}async request(t,r){try{return await this._request(t,r)}catch(i){if(i instanceof Error){let n;Error.captureStackTrace?Error.captureStackTrace(n={}):n=new Error;let a=n.stack?n.stack.replace(/^.+\n/,""):"";i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=`
36
- `+a):i.stack=a}throw i}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=ua(this.defaults,r);let{transitional:i,paramsSerializer:n,headers:a}=r;i!==void 0&&nd.assertOptions(i,{silentJSONParsing:so.transitional(so.boolean),forcedJSONParsing:so.transitional(so.boolean),clarifyTimeoutError:so.transitional(so.boolean)},!1),n!=null&&(z.isFunction(n)?r.paramsSerializer={serialize:n}:nd.assertOptions(n,{encode:so.function,serialize:so.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let u=a&&z.merge(a.common,a[r.method]);a&&z.forEach(["delete","get","head","post","put","patch","common"],P=>{delete a[P]}),r.headers=Gr.concat(u,a);let h=[],b=!0;this.interceptors.request.forEach(function(L){typeof L.runWhen=="function"&&L.runWhen(r)===!1||(b=b&&L.synchronous,h.unshift(L.fulfilled,L.rejected))});let w=[];this.interceptors.response.forEach(function(L){w.push(L.fulfilled,L.rejected)});let T,I=0,B;if(!b){let P=[id.bind(this),void 0];for(P.unshift.apply(P,h),P.push.apply(P,w),B=P.length,T=Promise.resolve(r);I<B;)T=T.then(P[I++],P[I++]);return T}B=h.length;let M=r;for(I=0;I<B;){let P=h[I++],L=h[I++];try{M=P(M)}catch(X){L.call(this,X);break}}try{T=id.call(this,M)}catch(P){return Promise.reject(P)}for(I=0,B=w.length;I<B;)T=T.then(w[I++],w[I++]);return T}getUri(t){t=ua(this.defaults,t);let r=Qo(t.baseURL,t.url);return Jo(r,t.params,t.paramsSerializer)}};z.forEach(["delete","get","head","options"],function(t){ku.prototype[t]=function(r,i){return this.request(ua(i||{},{method:t,url:r,data:(i||{}).data}))}});z.forEach(["post","put","patch"],function(t){function r(i){return function(a,u,h){return this.request(ua(h||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}ku.prototype[t]=r(),ku.prototype[t+"Form"]=r(!0)});var cl=ku;var ib=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});let i=this;this.promise.then(n=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](n);i._listeners=null}),this.promise.then=n=>{let a,u=new Promise(h=>{i.subscribe(h),a=h}).then(n);return u.cancel=function(){i.unsubscribe(a)},u},t(function(a,u,h){i.reason||(i.reason=new Xn(a,u,h),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new e(function(n){t=n}),cancel:t}}},F6=ib;function nb(e){return function(r){return e.apply(null,r)}}function sb(e){return z.isObject(e)&&e.isAxiosError===!0}var ab={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ab).forEach(([e,t])=>{ab[t]=e});var H6=ab;function z6(e){let t=new cl(e),r=Xf(cl.prototype.request,t);return z.extend(r,cl.prototype,t,{allOwnKeys:!0}),z.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return z6(ua(e,n))},r}var Fr=z6(Ru);Fr.Axios=cl;Fr.CanceledError=Xn;Fr.CancelToken=F6;Fr.isCancel=el;Fr.VERSION=tc;Fr.toFormData=ro;Fr.AxiosError=Se;Fr.Cancel=Fr.CanceledError;Fr.all=function(t){return Promise.all(t)};Fr.spread=nb;Fr.isAxiosError=sb;Fr.mergeConfig=ua;Fr.AxiosHeaders=Gr;Fr.formToJSON=e=>Zh(z.isHTMLForm(e)?new FormData(e):e);Fr.getAdapter=rd.getAdapter;Fr.HttpStatusCode=H6;Fr.default=Fr;var In=Fr;var{Axios:JK,AxiosError:QK,CanceledError:eG,isCancel:tG,CancelToken:rG,VERSION:iG,all:nG,Cancel:sG,isAxiosError:aG,spread:oG,toFormData:cG,AxiosHeaders:uG,HttpStatusCode:fG,formToJSON:lG,getAdapter:pG,mergeConfig:hG}=In;function Nu(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function nU(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}function sU(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function sd(e,...t){if(!sU(e))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function aU(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Nu(e.outputLen),Nu(e.blockLen)}function ad(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")}function ob(e,t){sd(e);let r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}var oU={number:Nu,bool:nU,bytes:sd,hash:aU,exists:ad,output:ob},od=oU;var cd=BigInt(4294967295),j6=BigInt(32);function cU(e,t=!1){return t?{h:Number(e&cd),l:Number(e>>j6&cd)}:{h:Number(e>>j6&cd)|0,l:Number(e&cd)|0}}function V6(e,t=!1){let r=new Uint32Array(e.length),i=new Uint32Array(e.length);for(let n=0;n<e.length;n++){let{h:a,l:u}=cU(e[n],t);[r[n],i[n]]=[a,u]}return[r,i]}var W6=(e,t,r)=>e<<r|t>>>32-r,K6=(e,t,r)=>t<<r|e>>>32-r,G6=(e,t,r)=>t<<r-32|e>>>64-r,$6=(e,t,r)=>e<<r-32|t>>>64-r;var X6=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));function uU(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}var fU=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!fU)throw new Error("Non little-endian hardware is not supported");function Pu(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function fd(e){if(typeof e=="string"&&(e=Pu(e)),!uU(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}var ud=class{clone(){return this._cloneInto()}},gG={}.toString;function Y6(e){let t=i=>e().update(fd(i)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Z6(e){let t=(i,n)=>e(n).update(fd(i)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=i=>e(i),t}var[e4,t4,r4]=[[],[],[]],lU=BigInt(0),ul=BigInt(1),pU=BigInt(2),hU=BigInt(7),dU=BigInt(256),mU=BigInt(113);for(let e=0,t=ul,r=1,i=0;e<24;e++){[r,i]=[i,(2*r+3*i)%5],e4.push(2*(5*i+r)),t4.push((e+1)*(e+2)/2%64);let n=lU;for(let a=0;a<7;a++)t=(t<<ul^(t>>hU)*mU)%dU,t&pU&&(n^=ul<<(ul<<BigInt(a))-ul);r4.push(n)}var[vU,gU]=V6(r4,!0),J6=(e,t,r)=>r>32?G6(e,t,r):W6(e,t,r),Q6=(e,t,r)=>r>32?$6(e,t,r):K6(e,t,r);function bU(e,t=24){let r=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let u=0;u<10;u++)r[u]=e[u]^e[u+10]^e[u+20]^e[u+30]^e[u+40];for(let u=0;u<10;u+=2){let h=(u+8)%10,b=(u+2)%10,w=r[b],T=r[b+1],I=J6(w,T,1)^r[h],B=Q6(w,T,1)^r[h+1];for(let M=0;M<50;M+=10)e[u+M]^=I,e[u+M+1]^=B}let n=e[2],a=e[3];for(let u=0;u<24;u++){let h=t4[u],b=J6(n,a,h),w=Q6(n,a,h),T=e4[u];n=e[T],a=e[T+1],e[T]=b,e[T+1]=w}for(let u=0;u<50;u+=10){for(let h=0;h<10;h++)r[h]=e[u+h];for(let h=0;h<10;h++)e[u+h]^=~r[(h+2)%10]&r[(h+4)%10]}e[0]^=vU[i],e[1]^=gU[i]}r.fill(0)}var ld=class e extends ud{constructor(t,r,i,n=!1,a=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=i,this.enableXOF=n,this.rounds=a,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Nu(i),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=X6(this.state)}keccak(){bU(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){ad(this);let{blockLen:r,state:i}=this;t=fd(t);let n=t.length;for(let a=0;a<n;){let u=Math.min(r-this.pos,n-a);for(let h=0;h<u;h++)i[this.pos++]^=t[a++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:r,pos:i,blockLen:n}=this;t[i]^=r,r&128&&i===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){ad(this,!1),sd(t),this.finish();let r=this.state,{blockLen:i}=this;for(let n=0,a=t.length;n<a;){this.posOut>=i&&this.keccak();let u=Math.min(i-this.posOut,a-n);t.set(r.subarray(this.posOut,this.posOut+u),n),this.posOut+=u,n+=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 Nu(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(ob(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){let{blockLen:r,suffix:i,outputLen:n,rounds:a,enableXOF:u}=this;return t||(t=new e(r,i,n,u,a)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=a,t.suffix=i,t.outputLen=n,t.enableXOF=u,t.destroyed=this.destroyed,t}},ao=(e,t,r)=>Y6(()=>new ld(t,e,r)),wG=ao(6,144,224/8),SG=ao(6,136,256/8),EG=ao(6,104,384/8),TG=ao(6,72,512/8),i4=ao(1,144,224/8),cb=ao(1,136,256/8),n4=ao(1,104,384/8),s4=ao(1,72,512/8),a4=(e,t,r)=>Z6((i={})=>new ld(t,e,i.dkLen===void 0?r:i.dkLen,!0)),IG=a4(31,168,128/8),RG=a4(31,136,256/8);var PG=od.bool,BG=od.bytes;function fl(e){return t=>(od.bytes(t),e(t))}var MG=(()=>{let e=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,t=typeof module<"u"&&typeof module.require=="function"&&module.require.bind(module);return{node:t&&!e?t("crypto"):void 0,web:e}})();var qG=fl(i4),ll=(()=>{let e=fl(cb);return e.create=cb.create,e})(),FG=fl(n4),HG=fl(s4);var $r=class extends Error{constructor(t,r){super(t),this.innerError=r,this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(new.target.constructor):this.stack=new Error().stack}static convertToString(t,r=!1){if(t==null)return"undefined";let i=JSON.stringify(t,(n,a)=>typeof a=="bigint"?a.toString():a);return r&&["bigint","string"].includes(typeof t)?i.replace(/['\\"]+/g,""):i}toJSON(){return{name:this.name,code:this.code,message:this.message,innerError:this.innerError}}},fa=class extends $r{constructor(t,r){super(`Invalid value given "${$r.convertToString(t,!0)}". Error: ${r}.`),this.name=this.constructor.name}};var oo=class extends fa{constructor(t){super(t,"can not parse as byte data"),this.code=1002}},pl=class extends fa{constructor(t){super(t,"can not parse as number data"),this.code=1003}};var pd=class extends fa{constructor(t){super(t,"can not be converted to hex"),this.code=1006}};var o4="An Rpc error has occured with a code of *code*",Qi={[-32700]:{message:"Parse error",description:"Invalid JSON"},[-32600]:{message:"Invalid request",description:"JSON is not a valid request object "},[-32601]:{message:"Method not found",description:"Method does not exist "},[-32602]:{message:"Invalid params",description:"Invalid method parameters"},[-32603]:{message:"Internal error",description:"Internal JSON-RPC error"},[-32e3]:{message:"Invalid input",description:"Missing or invalid parameters"},[-32001]:{message:"Resource not found",description:"Requested resource not found"},[-32002]:{message:"Resource unavailable",description:"Requested resource not available"},[-32003]:{message:"Transaction rejected",description:"Transaction creation failed"},[-32004]:{message:"Method not supported",description:"Method is not implemented"},[-32005]:{message:"Limit exceeded",description:"Request exceeds defined limit"},[-32006]:{message:"JSON-RPC version not supported",description:"Version of JSON-RPC protocol is not supported"},[4001]:{name:"User Rejected Request",message:"The user rejected the request."},[4100]:{name:"Unauthorized",message:"The requested method and/or account has not been authorized by the user."},[4200]:{name:"Unsupported Method",message:"The Provider does not support the requested method."},[4900]:{name:"Disconnected",message:"The Provider is disconnected from all chains."},[4901]:{name:"Chain Disconnected",message:"The Provider is not connected to the requested chain."},"0-999":{name:"",message:"Not used."},1e3:{name:"Normal Closure",message:"The connection successfully completed the purpose for which it was created."},1001:{name:"Going Away",message:"The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection."},1002:{name:"Protocol error",message:"The endpoint is terminating the connection due to a protocol error."},1003:{name:"Unsupported Data",message:"The connection is being terminated because the endpoint received data of a type it cannot accept. (For example, a text-only endpoint received binary data.)"},1004:{name:"Reserved",message:"Reserved. A meaning might be defined in the future."},1005:{name:"No Status Rcvd",message:"Reserved. Indicates that no status code was provided even though one was expected."},1006:{name:"Abnormal Closure",message:"Reserved. Indicates that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected."},1007:{name:"Invalid frame payload data",message:"The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message)."},1008:{name:"Policy Violation",message:"The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable."},1009:{name:"Message Too Big",message:"The endpoint is terminating the connection because a data frame was received that is too large."},1010:{name:"Mandatory Ext.",message:"The client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't."},1011:{name:"Internal Error",message:"The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request."},1012:{name:"Service Restart",message:"The server is terminating the connection because it is restarting."},1013:{name:"Try Again Later",message:"The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients."},1014:{name:"Bad Gateway",message:"The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code."},1015:{name:"TLS handshake",message:"Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified)."},"1016-2999":{name:"",message:"For definition by future revisions of the WebSocket Protocol specification, and for definition by extension specifications."},"3000-3999":{name:"",message:"For use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by the WebSocket protocol."},"4000-4999":{name:"",message:"For private use, and thus can't be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol."}};var Fi=class extends $r{constructor(t,r){super(r??o4.replace("*code*",t.error.code.toString())),this.code=t.error.code,this.id=t.id,this.jsonrpc=t.jsonrpc,this.jsonRpcError=t.error}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{error:this.jsonRpcError,id:this.id,jsonRpc:this.jsonrpc})}};var ub=class extends Fi{constructor(t){super(t,Qi[-32700].message),this.code=-32700}},fb=class extends Fi{constructor(t){super(t,Qi[-32600].message),this.code=-32600}},lb=class extends Fi{constructor(t){super(t,Qi[-32601].message),this.code=-32601}},pb=class extends Fi{constructor(t){super(t,Qi[-32602].message),this.code=-32602}},hb=class extends Fi{constructor(t){super(t,Qi[-32603].message),this.code=-32603}},db=class extends Fi{constructor(t){super(t,Qi[-32e3].message),this.code=-32e3}},mb=class extends Fi{constructor(t){super(t,Qi[-32004].message),this.code=-32004}},vb=class extends Fi{constructor(t){super(t,Qi[-32002].message),this.code=-32002}},gb=class extends Fi{constructor(t){super(t,Qi[-32001].message),this.code=-32001}},bb=class extends Fi{constructor(t){super(t,Qi[-32006].message),this.code=-32006}},xb=class extends Fi{constructor(t){super(t,Qi[-32003].message),this.code=-32003}},_b=class extends Fi{constructor(t){super(t,Qi[-32005].message),this.code=-32005}},en=new Map;en.set(-32700,{error:ub});en.set(-32600,{error:fb});en.set(-32601,{error:lb});en.set(-32602,{error:pb});en.set(-32603,{error:hb});en.set(-32e3,{error:db});en.set(-32004,{error:mb});en.set(-32002,{error:vb});en.set(-32003,{error:xb});en.set(-32001,{error:gb});en.set(-32006,{error:bb});en.set(-32005,{error:_b});var hd=class extends $r{constructor(t){super(`Format for the type ${t} is unsupported`),this.type=t,this.code=1200}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type})}};var Et;(function(e){e.assertEqual=n=>n;function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let a={};for(let u of n)a[u]=u;return a},e.getValidEnumValues=n=>{let a=e.objectKeys(n).filter(h=>typeof n[n[h]]!="number"),u={};for(let h of a)u[h]=n[h];return e.objectValues(u)},e.objectValues=n=>e.objectKeys(n).map(function(a){return n[a]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let a=[];for(let u in n)Object.prototype.hasOwnProperty.call(n,u)&&a.push(u);return a},e.find=(n,a)=>{for(let u of n)if(a(u))return u},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function i(n,a=" | "){return n.map(u=>typeof u=="string"?`'${u}'`:u).join(a)}e.joinValues=i,e.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(Et||(Et={}));var wb;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(wb||(wb={}));var xe=Et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),co=e=>{switch(typeof e){case"undefined":return xe.undefined;case"string":return xe.string;case"number":return isNaN(e)?xe.nan:xe.number;case"boolean":return xe.boolean;case"function":return xe.function;case"bigint":return xe.bigint;case"symbol":return xe.symbol;case"object":return Array.isArray(e)?xe.array:e===null?xe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?xe.promise:typeof Map<"u"&&e instanceof Map?xe.map:typeof Set<"u"&&e instanceof Set?xe.set:typeof Date<"u"&&e instanceof Date?xe.date:xe.object;default:return xe.unknown}},le=Et.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),OU=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),tn=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let r=t||function(a){return a.message},i={_errors:[]},n=a=>{for(let u of a.issues)if(u.code==="invalid_union")u.unionErrors.map(n);else if(u.code==="invalid_return_type")n(u.returnTypeError);else if(u.code==="invalid_arguments")n(u.argumentsError);else if(u.path.length===0)i._errors.push(r(u));else{let h=i,b=0;for(;b<u.path.length;){let w=u.path[b];b===u.path.length-1?(h[w]=h[w]||{_errors:[]},h[w]._errors.push(r(u))):h[w]=h[w]||{_errors:[]},h=h[w],b++}}};return n(this),i}toString(){return this.message}get message(){return JSON.stringify(this.issues,Et.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},i=[];for(let n of this.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}};tn.create=e=>new tn(e);var Tl=(e,t)=>{let r;switch(e.code){case le.invalid_type:e.received===xe.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case le.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Et.jsonStringifyReplacer)}`;break;case le.unrecognized_keys:r=`Unrecognized key(s) in object: ${Et.joinValues(e.keys,", ")}`;break;case le.invalid_union:r="Invalid input";break;case le.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Et.joinValues(e.options)}`;break;case le.invalid_enum_value:r=`Invalid enum value. Expected ${Et.joinValues(e.options)}, received '${e.received}'`;break;case le.invalid_arguments:r="Invalid function arguments";break;case le.invalid_return_type:r="Invalid function return type";break;case le.invalid_date:r="Invalid date";break;case le.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Et.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case le.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case le.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case le.custom:r="Invalid input";break;case le.invalid_intersection_types:r="Intersection results could not be merged";break;case le.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case le.not_finite:r="Number must be finite";break;default:r=t.defaultError,Et.assertNever(e)}return{message:r}},f4=Tl;function kU(e){f4=e}function md(){return f4}var vd=e=>{let{data:t,path:r,errorMaps:i,issueData:n}=e,a=[...r,...n.path||[]],u={...n,path:a},h="",b=i.filter(w=>!!w).slice().reverse();for(let w of b)h=w(u,{data:t,defaultError:h}).message;return{...n,path:a,message:n.message||h}},NU=[];function we(e,t){let r=vd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,md(),Tl].filter(i=>!!i)});e.common.issues.push(r)}var di=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let i=[];for(let n of r){if(n.status==="aborted")return Ve;n.status==="dirty"&&t.dirty(),i.push(n.value)}return{status:t.value,value:i}}static async mergeObjectAsync(t,r){let i=[];for(let n of r)i.push({key:await n.key,value:await n.value});return e.mergeObjectSync(t,i)}static mergeObjectSync(t,r){let i={};for(let n of r){let{key:a,value:u}=n;if(a.status==="aborted"||u.status==="aborted")return Ve;a.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof u.value<"u"||n.alwaysSet)&&(i[a.value]=u.value)}return{status:t.value,value:i}}},Ve=Object.freeze({status:"aborted"}),l4=e=>({status:"dirty",value:e}),Si=e=>({status:"valid",value:e}),Sb=e=>e.status==="aborted",Eb=e=>e.status==="dirty",Il=e=>e.status==="valid",gd=e=>typeof Promise<"u"&&e instanceof Promise,ke;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ke||(ke={}));var Rn=class{constructor(t,r,i,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=i,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},c4=(e,t)=>{if(Il(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new tn(e.common.issues);return this._error=r,this._error}}};function it(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:i,description:n}=e;if(t&&(r||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(u,h)=>u.code!=="invalid_type"?{message:h.defaultError}:typeof h.data>"u"?{message:i??h.defaultError}:{message:r??h.defaultError},description:n}}var nt=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return co(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:co(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new di,ctx:{common:t.parent.common,data:t.data,parsedType:co(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(gd(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let i=this.safeParse(t,r);if(i.success)return i.data;throw i.error}safeParse(t,r){var i;let n={common:{issues:[],async:(i=r?.async)!==null&&i!==void 0?i:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:co(t)},a=this._parseSync({data:t,path:n.path,parent:n});return c4(n,a)}async parseAsync(t,r){let i=await this.safeParseAsync(t,r);if(i.success)return i.data;throw i.error}async safeParseAsync(t,r){let i={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:co(t)},n=this._parse({data:t,path:i.path,parent:i}),a=await(gd(n)?n:Promise.resolve(n));return c4(i,a)}refine(t,r){let i=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,a)=>{let u=t(n),h=()=>a.addIssue({code:le.custom,...i(n)});return typeof Promise<"u"&&u instanceof Promise?u.then(b=>b?!0:(h(),!1)):u?!0:(h(),!1)})}refinement(t,r){return this._refinement((i,n)=>t(i)?!0:(n.addIssue(typeof r=="function"?r(i,n):r),!1))}_refinement(t){return new rn({schema:this,typeName:Ce.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Yn.create(this,this._def)}nullable(){return ha.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pa.create(this,this._def)}promise(){return lo.create(this,this._def)}or(t){return uc.create([this,t],this._def)}and(t){return fc.create(this,t,this._def)}transform(t){return new rn({...it(this._def),schema:this,typeName:Ce.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new mc({...it(this._def),innerType:this,defaultValue:r,typeName:Ce.ZodDefault})}brand(){return new yd({typeName:Ce.ZodBranded,type:this,...it(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Uu({...it(this._def),innerType:this,catchValue:r,typeName:Ce.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Rl.create(this,t)}readonly(){return Fu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},PU=/^c[^\s-]{8,}$/i,BU=/^[a-z][a-z0-9]*$/,MU=/^[0-9A-HJKMNP-TV-Z]{26}$/,CU=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,LU=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,DU="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",yb,UU=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,qU=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,FU=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function HU(e,t){return!!((t==="v4"||!t)&&UU.test(e)||(t==="v6"||!t)&&qU.test(e))}var uo=class e extends nt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==xe.string){let a=this._getOrReturnCtx(t);return we(a,{code:le.invalid_type,expected:xe.string,received:a.parsedType}),Ve}let i=new di,n;for(let a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(n=this._getOrReturnCtx(t,n),we(n,{code:le.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="max")t.data.length>a.value&&(n=this._getOrReturnCtx(t,n),we(n,{code:le.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),i.dirty());else if(a.kind==="length"){let u=t.data.length>a.value,h=t.data.length<a.value;(u||h)&&(n=this._getOrReturnCtx(t,n),u?we(n,{code:le.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):h&&we(n,{code:le.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),i.dirty())}else if(a.kind==="email")LU.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"email",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="emoji")yb||(yb=new RegExp(DU,"u")),yb.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"emoji",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="uuid")CU.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"uuid",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid")PU.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"cuid",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="cuid2")BU.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"cuid2",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="ulid")MU.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"ulid",code:le.invalid_string,message:a.message}),i.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),we(n,{validation:"url",code:le.invalid_string,message:a.message}),i.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"regex",code:le.invalid_string,message:a.message}),i.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(n=this._getOrReturnCtx(t,n),we(n,{code:le.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),i.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(n=this._getOrReturnCtx(t,n),we(n,{code:le.invalid_string,validation:{startsWith:a.value},message:a.message}),i.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(n=this._getOrReturnCtx(t,n),we(n,{code:le.invalid_string,validation:{endsWith:a.value},message:a.message}),i.dirty()):a.kind==="datetime"?FU(a).test(t.data)||(n=this._getOrReturnCtx(t,n),we(n,{code:le.invalid_string,validation:"datetime",message:a.message}),i.dirty()):a.kind==="ip"?HU(t.data,a.version)||(n=this._getOrReturnCtx(t,n),we(n,{validation:"ip",code:le.invalid_string,message:a.message}),i.dirty()):Et.assertNever(a);return{status:i.value,value:t.data}}_regex(t,r,i){return this.refinement(n=>t.test(n),{validation:r,code:le.invalid_string,...ke.errToObj(i)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ke.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ke.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ke.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ke.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ke.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ke.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ke.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ke.errToObj(t)})}datetime(t){var r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(r=t?.offset)!==null&&r!==void 0?r:!1,...ke.errToObj(t?.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...ke.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...ke.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...ke.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...ke.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...ke.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...ke.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...ke.errToObj(r)})}nonempty(t){return this.min(1,ke.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};uo.create=e=>{var t;return new uo({checks:[],typeName:Ce.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...it(e)})};function zU(e,t){let r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=r>i?r:i,a=parseInt(e.toFixed(n).replace(".","")),u=parseInt(t.toFixed(n).replace(".",""));return a%u/Math.pow(10,n)}var ic=class e extends nt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==xe.number){let a=this._getOrReturnCtx(t);return we(a,{code:le.invalid_type,expected:xe.number,received:a.parsedType}),Ve}let i,n=new di;for(let a of this._def.checks)a.kind==="int"?Et.isInteger(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{code:le.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?zU(t.data,a.value)!==0&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(i=this._getOrReturnCtx(t,i),we(i,{code:le.not_finite,message:a.message}),n.dirty()):Et.assertNever(a);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,ke.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ke.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ke.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ke.toString(r))}setLimit(t,r,i,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:i,message:ke.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Et.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(t===null||i.value<t)&&(t=i.value)}return Number.isFinite(r)&&Number.isFinite(t)}};ic.create=e=>new ic({checks:[],typeName:Ce.ZodNumber,coerce:e?.coerce||!1,...it(e)});var nc=class e extends nt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==xe.bigint){let a=this._getOrReturnCtx(t);return we(a,{code:le.invalid_type,expected:xe.bigint,received:a.parsedType}),Ve}let i,n=new di;for(let a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(i=this._getOrReturnCtx(t,i),we(i,{code:le.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):Et.assertNever(a);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,ke.toString(r))}gt(t,r){return this.setLimit("min",t,!1,ke.toString(r))}lte(t,r){return this.setLimit("max",t,!0,ke.toString(r))}lt(t,r){return this.setLimit("max",t,!1,ke.toString(r))}setLimit(t,r,i,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:i,message:ke.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};nc.create=e=>{var t;return new nc({checks:[],typeName:Ce.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...it(e)})};var sc=class extends nt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==xe.boolean){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.boolean,received:i.parsedType}),Ve}return Si(t.data)}};sc.create=e=>new sc({typeName:Ce.ZodBoolean,coerce:e?.coerce||!1,...it(e)});var ac=class e extends nt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==xe.date){let a=this._getOrReturnCtx(t);return we(a,{code:le.invalid_type,expected:xe.date,received:a.parsedType}),Ve}if(isNaN(t.data.getTime())){let a=this._getOrReturnCtx(t);return we(a,{code:le.invalid_date}),Ve}let i=new di,n;for(let a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(n=this._getOrReturnCtx(t,n),we(n,{code:le.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),i.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(n=this._getOrReturnCtx(t,n),we(n,{code:le.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),i.dirty()):Et.assertNever(a);return{status:i.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:ke.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:ke.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};ac.create=e=>new ac({checks:[],coerce:e?.coerce||!1,typeName:Ce.ZodDate,...it(e)});var Mu=class extends nt{_parse(t){if(this._getType(t)!==xe.symbol){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.symbol,received:i.parsedType}),Ve}return Si(t.data)}};Mu.create=e=>new Mu({typeName:Ce.ZodSymbol,...it(e)});var oc=class extends nt{_parse(t){if(this._getType(t)!==xe.undefined){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.undefined,received:i.parsedType}),Ve}return Si(t.data)}};oc.create=e=>new oc({typeName:Ce.ZodUndefined,...it(e)});var cc=class extends nt{_parse(t){if(this._getType(t)!==xe.null){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.null,received:i.parsedType}),Ve}return Si(t.data)}};cc.create=e=>new cc({typeName:Ce.ZodNull,...it(e)});var fo=class extends nt{constructor(){super(...arguments),this._any=!0}_parse(t){return Si(t.data)}};fo.create=e=>new fo({typeName:Ce.ZodAny,...it(e)});var la=class extends nt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Si(t.data)}};la.create=e=>new la({typeName:Ce.ZodUnknown,...it(e)});var Zn=class extends nt{_parse(t){let r=this._getOrReturnCtx(t);return we(r,{code:le.invalid_type,expected:xe.never,received:r.parsedType}),Ve}};Zn.create=e=>new Zn({typeName:Ce.ZodNever,...it(e)});var Cu=class extends nt{_parse(t){if(this._getType(t)!==xe.undefined){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.void,received:i.parsedType}),Ve}return Si(t.data)}};Cu.create=e=>new Cu({typeName:Ce.ZodVoid,...it(e)});var pa=class e extends nt{_parse(t){let{ctx:r,status:i}=this._processInputParams(t),n=this._def;if(r.parsedType!==xe.array)return we(r,{code:le.invalid_type,expected:xe.array,received:r.parsedType}),Ve;if(n.exactLength!==null){let u=r.data.length>n.exactLength.value,h=r.data.length<n.exactLength.value;(u||h)&&(we(r,{code:u?le.too_big:le.too_small,minimum:h?n.exactLength.value:void 0,maximum:u?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),i.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(we(r,{code:le.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(we(r,{code:le.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((u,h)=>n.type._parseAsync(new Rn(r,u,r.path,h)))).then(u=>di.mergeArray(i,u));let a=[...r.data].map((u,h)=>n.type._parseSync(new Rn(r,u,r.path,h)));return di.mergeArray(i,a)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:ke.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:ke.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:ke.toString(r)}})}nonempty(t){return this.min(1,t)}};pa.create=(e,t)=>new pa({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ce.ZodArray,...it(t)});function Bu(e){if(e instanceof Hi){let t={};for(let r in e.shape){let i=e.shape[r];t[r]=Yn.create(Bu(i))}return new Hi({...e._def,shape:()=>t})}else return e instanceof pa?new pa({...e._def,type:Bu(e.element)}):e instanceof Yn?Yn.create(Bu(e.unwrap())):e instanceof ha?ha.create(Bu(e.unwrap())):e instanceof ws?ws.create(e.items.map(t=>Bu(t))):e}var Hi=class e extends nt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=Et.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==xe.object){let w=this._getOrReturnCtx(t);return we(w,{code:le.invalid_type,expected:xe.object,received:w.parsedType}),Ve}let{status:i,ctx:n}=this._processInputParams(t),{shape:a,keys:u}=this._getCached(),h=[];if(!(this._def.catchall instanceof Zn&&this._def.unknownKeys==="strip"))for(let w in n.data)u.includes(w)||h.push(w);let b=[];for(let w of u){let T=a[w],I=n.data[w];b.push({key:{status:"valid",value:w},value:T._parse(new Rn(n,I,n.path,w)),alwaysSet:w in n.data})}if(this._def.catchall instanceof Zn){let w=this._def.unknownKeys;if(w==="passthrough")for(let T of h)b.push({key:{status:"valid",value:T},value:{status:"valid",value:n.data[T]}});else if(w==="strict")h.length>0&&(we(n,{code:le.unrecognized_keys,keys:h}),i.dirty());else if(w!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let w=this._def.catchall;for(let T of h){let I=n.data[T];b.push({key:{status:"valid",value:T},value:w._parse(new Rn(n,I,n.path,T)),alwaysSet:T in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let w=[];for(let T of b){let I=await T.key;w.push({key:I,value:await T.value,alwaysSet:T.alwaysSet})}return w}).then(w=>di.mergeObjectSync(i,w)):di.mergeObjectSync(i,b)}get shape(){return this._def.shape()}strict(t){return ke.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,i)=>{var n,a,u,h;let b=(u=(a=(n=this._def).errorMap)===null||a===void 0?void 0:a.call(n,r,i).message)!==null&&u!==void 0?u:i.defaultError;return r.code==="unrecognized_keys"?{message:(h=ke.errToObj(t).message)!==null&&h!==void 0?h:b}:{message:b}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ce.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};return Et.objectKeys(t).forEach(i=>{t[i]&&this.shape[i]&&(r[i]=this.shape[i])}),new e({...this._def,shape:()=>r})}omit(t){let r={};return Et.objectKeys(this.shape).forEach(i=>{t[i]||(r[i]=this.shape[i])}),new e({...this._def,shape:()=>r})}deepPartial(){return Bu(this)}partial(t){let r={};return Et.objectKeys(this.shape).forEach(i=>{let n=this.shape[i];t&&!t[i]?r[i]=n:r[i]=n.optional()}),new e({...this._def,shape:()=>r})}required(t){let r={};return Et.objectKeys(this.shape).forEach(i=>{if(t&&!t[i])r[i]=this.shape[i];else{let a=this.shape[i];for(;a instanceof Yn;)a=a._def.innerType;r[i]=a}}),new e({...this._def,shape:()=>r})}keyof(){return p4(Et.objectKeys(this.shape))}};Hi.create=(e,t)=>new Hi({shape:()=>e,unknownKeys:"strip",catchall:Zn.create(),typeName:Ce.ZodObject,...it(t)});Hi.strictCreate=(e,t)=>new Hi({shape:()=>e,unknownKeys:"strict",catchall:Zn.create(),typeName:Ce.ZodObject,...it(t)});Hi.lazycreate=(e,t)=>new Hi({shape:e,unknownKeys:"strip",catchall:Zn.create(),typeName:Ce.ZodObject,...it(t)});var uc=class extends nt{_parse(t){let{ctx:r}=this._processInputParams(t),i=this._def.options;function n(a){for(let h of a)if(h.result.status==="valid")return h.result;for(let h of a)if(h.result.status==="dirty")return r.common.issues.push(...h.ctx.common.issues),h.result;let u=a.map(h=>new tn(h.ctx.common.issues));return we(r,{code:le.invalid_union,unionErrors:u}),Ve}if(r.common.async)return Promise.all(i.map(async a=>{let u={...r,common:{...r.common,issues:[]},parent:null};return{result:await a._parseAsync({data:r.data,path:r.path,parent:u}),ctx:u}})).then(n);{let a,u=[];for(let b of i){let w={...r,common:{...r.common,issues:[]},parent:null},T=b._parseSync({data:r.data,path:r.path,parent:w});if(T.status==="valid")return T;T.status==="dirty"&&!a&&(a={result:T,ctx:w}),w.common.issues.length&&u.push(w.common.issues)}if(a)return r.common.issues.push(...a.ctx.common.issues),a.result;let h=u.map(b=>new tn(b));return we(r,{code:le.invalid_union,unionErrors:h}),Ve}}get options(){return this._def.options}};uc.create=(e,t)=>new uc({options:e,typeName:Ce.ZodUnion,...it(t)});var dd=e=>e instanceof lc?dd(e.schema):e instanceof rn?dd(e.innerType()):e instanceof pc?[e.value]:e instanceof hc?e.options:e instanceof dc?Object.keys(e.enum):e instanceof mc?dd(e._def.innerType):e instanceof oc?[void 0]:e instanceof cc?[null]:null,bd=class e extends nt{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.object)return we(r,{code:le.invalid_type,expected:xe.object,received:r.parsedType}),Ve;let i=this.discriminator,n=r.data[i],a=this.optionsMap.get(n);return a?r.common.async?a._parseAsync({data:r.data,path:r.path,parent:r}):a._parseSync({data:r.data,path:r.path,parent:r}):(we(r,{code:le.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),Ve)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,i){let n=new Map;for(let a of r){let u=dd(a.shape[t]);if(!u)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let h of u){if(n.has(h))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(h)}`);n.set(h,a)}}return new e({typeName:Ce.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...it(i)})}};function Tb(e,t){let r=co(e),i=co(t);if(e===t)return{valid:!0,data:e};if(r===xe.object&&i===xe.object){let n=Et.objectKeys(t),a=Et.objectKeys(e).filter(h=>n.indexOf(h)!==-1),u={...e,...t};for(let h of a){let b=Tb(e[h],t[h]);if(!b.valid)return{valid:!1};u[h]=b.data}return{valid:!0,data:u}}else if(r===xe.array&&i===xe.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let a=0;a<e.length;a++){let u=e[a],h=t[a],b=Tb(u,h);if(!b.valid)return{valid:!1};n.push(b.data)}return{valid:!0,data:n}}else return r===xe.date&&i===xe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var fc=class extends nt{_parse(t){let{status:r,ctx:i}=this._processInputParams(t),n=(a,u)=>{if(Sb(a)||Sb(u))return Ve;let h=Tb(a.value,u.value);return h.valid?((Eb(a)||Eb(u))&&r.dirty(),{status:r.value,value:h.data}):(we(i,{code:le.invalid_intersection_types}),Ve)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([a,u])=>n(a,u)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};fc.create=(e,t,r)=>new fc({left:e,right:t,typeName:Ce.ZodIntersection,...it(r)});var ws=class e extends nt{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==xe.array)return we(i,{code:le.invalid_type,expected:xe.array,received:i.parsedType}),Ve;if(i.data.length<this._def.items.length)return we(i,{code:le.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ve;!this._def.rest&&i.data.length>this._def.items.length&&(we(i,{code:le.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let a=[...i.data].map((u,h)=>{let b=this._def.items[h]||this._def.rest;return b?b._parse(new Rn(i,u,i.path,h)):null}).filter(u=>!!u);return i.common.async?Promise.all(a).then(u=>di.mergeArray(r,u)):di.mergeArray(r,a)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};ws.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ws({items:e,typeName:Ce.ZodTuple,rest:null,...it(t)})};var xd=class e extends nt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==xe.object)return we(i,{code:le.invalid_type,expected:xe.object,received:i.parsedType}),Ve;let n=[],a=this._def.keyType,u=this._def.valueType;for(let h in i.data)n.push({key:a._parse(new Rn(i,h,i.path,h)),value:u._parse(new Rn(i,i.data[h],i.path,h))});return i.common.async?di.mergeObjectAsync(r,n):di.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,i){return r instanceof nt?new e({keyType:t,valueType:r,typeName:Ce.ZodRecord,...it(i)}):new e({keyType:uo.create(),valueType:t,typeName:Ce.ZodRecord,...it(r)})}},Lu=class extends nt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==xe.map)return we(i,{code:le.invalid_type,expected:xe.map,received:i.parsedType}),Ve;let n=this._def.keyType,a=this._def.valueType,u=[...i.data.entries()].map(([h,b],w)=>({key:n._parse(new Rn(i,h,i.path,[w,"key"])),value:a._parse(new Rn(i,b,i.path,[w,"value"]))}));if(i.common.async){let h=new Map;return Promise.resolve().then(async()=>{for(let b of u){let w=await b.key,T=await b.value;if(w.status==="aborted"||T.status==="aborted")return Ve;(w.status==="dirty"||T.status==="dirty")&&r.dirty(),h.set(w.value,T.value)}return{status:r.value,value:h}})}else{let h=new Map;for(let b of u){let w=b.key,T=b.value;if(w.status==="aborted"||T.status==="aborted")return Ve;(w.status==="dirty"||T.status==="dirty")&&r.dirty(),h.set(w.value,T.value)}return{status:r.value,value:h}}}};Lu.create=(e,t,r)=>new Lu({valueType:t,keyType:e,typeName:Ce.ZodMap,...it(r)});var Du=class e extends nt{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==xe.set)return we(i,{code:le.invalid_type,expected:xe.set,received:i.parsedType}),Ve;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&(we(i,{code:le.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&(we(i,{code:le.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let a=this._def.valueType;function u(b){let w=new Set;for(let T of b){if(T.status==="aborted")return Ve;T.status==="dirty"&&r.dirty(),w.add(T.value)}return{status:r.value,value:w}}let h=[...i.data.values()].map((b,w)=>a._parse(new Rn(i,b,i.path,w)));return i.common.async?Promise.all(h).then(b=>u(b)):u(h)}min(t,r){return new e({...this._def,minSize:{value:t,message:ke.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:ke.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Du.create=(e,t)=>new Du({valueType:e,minSize:null,maxSize:null,typeName:Ce.ZodSet,...it(t)});var _d=class e extends nt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.function)return we(r,{code:le.invalid_type,expected:xe.function,received:r.parsedType}),Ve;function i(h,b){return vd({data:h,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,md(),Tl].filter(w=>!!w),issueData:{code:le.invalid_arguments,argumentsError:b}})}function n(h,b){return vd({data:h,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,md(),Tl].filter(w=>!!w),issueData:{code:le.invalid_return_type,returnTypeError:b}})}let a={errorMap:r.common.contextualErrorMap},u=r.data;if(this._def.returns instanceof lo){let h=this;return Si(async function(...b){let w=new tn([]),T=await h._def.args.parseAsync(b,a).catch(M=>{throw w.addIssue(i(b,M)),w}),I=await Reflect.apply(u,this,T);return await h._def.returns._def.type.parseAsync(I,a).catch(M=>{throw w.addIssue(n(I,M)),w})})}else{let h=this;return Si(function(...b){let w=h._def.args.safeParse(b,a);if(!w.success)throw new tn([i(b,w.error)]);let T=Reflect.apply(u,this,w.data),I=h._def.returns.safeParse(T,a);if(!I.success)throw new tn([n(T,I.error)]);return I.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:ws.create(t).rest(la.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,i){return new e({args:t||ws.create([]).rest(la.create()),returns:r||la.create(),typeName:Ce.ZodFunction,...it(i)})}},lc=class extends nt{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};lc.create=(e,t)=>new lc({getter:e,typeName:Ce.ZodLazy,...it(t)});var pc=class extends nt{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return we(r,{received:r.data,code:le.invalid_literal,expected:this._def.value}),Ve}return{status:"valid",value:t.data}}get value(){return this._def.value}};pc.create=(e,t)=>new pc({value:e,typeName:Ce.ZodLiteral,...it(t)});function p4(e,t){return new hc({values:e,typeName:Ce.ZodEnum,...it(t)})}var hc=class e extends nt{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),i=this._def.values;return we(r,{expected:Et.joinValues(i),received:r.parsedType,code:le.invalid_type}),Ve}if(this._def.values.indexOf(t.data)===-1){let r=this._getOrReturnCtx(t),i=this._def.values;return we(r,{received:r.data,code:le.invalid_enum_value,options:i}),Ve}return Si(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t){return e.create(t)}exclude(t){return e.create(this.options.filter(r=>!t.includes(r)))}};hc.create=p4;var dc=class extends nt{_parse(t){let r=Et.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(t);if(i.parsedType!==xe.string&&i.parsedType!==xe.number){let n=Et.objectValues(r);return we(i,{expected:Et.joinValues(n),received:i.parsedType,code:le.invalid_type}),Ve}if(r.indexOf(t.data)===-1){let n=Et.objectValues(r);return we(i,{received:i.data,code:le.invalid_enum_value,options:n}),Ve}return Si(t.data)}get enum(){return this._def.values}};dc.create=(e,t)=>new dc({values:e,typeName:Ce.ZodNativeEnum,...it(t)});var lo=class extends nt{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==xe.promise&&r.common.async===!1)return we(r,{code:le.invalid_type,expected:xe.promise,received:r.parsedType}),Ve;let i=r.parsedType===xe.promise?r.data:Promise.resolve(r.data);return Si(i.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};lo.create=(e,t)=>new lo({type:e,typeName:Ce.ZodPromise,...it(t)});var rn=class extends nt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:i}=this._processInputParams(t),n=this._def.effect||null,a={addIssue:u=>{we(i,u),u.fatal?r.abort():r.dirty()},get path(){return i.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){let u=n.transform(i.data,a);return i.common.issues.length?{status:"dirty",value:i.data}:i.common.async?Promise.resolve(u).then(h=>this._def.schema._parseAsync({data:h,path:i.path,parent:i})):this._def.schema._parseSync({data:u,path:i.path,parent:i})}if(n.type==="refinement"){let u=h=>{let b=n.refinement(h,a);if(i.common.async)return Promise.resolve(b);if(b instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return h};if(i.common.async===!1){let h=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return h.status==="aborted"?Ve:(h.status==="dirty"&&r.dirty(),u(h.value),{status:r.value,value:h.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(h=>h.status==="aborted"?Ve:(h.status==="dirty"&&r.dirty(),u(h.value).then(()=>({status:r.value,value:h.value}))))}if(n.type==="transform")if(i.common.async===!1){let u=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Il(u))return u;let h=n.transform(u.value,a);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:h}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(u=>Il(u)?Promise.resolve(n.transform(u.value,a)).then(h=>({status:r.value,value:h})):u);Et.assertNever(n)}};rn.create=(e,t,r)=>new rn({schema:e,typeName:Ce.ZodEffects,effect:t,...it(r)});rn.createWithPreprocess=(e,t,r)=>new rn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ce.ZodEffects,...it(r)});var Yn=class extends nt{_parse(t){return this._getType(t)===xe.undefined?Si(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Yn.create=(e,t)=>new Yn({innerType:e,typeName:Ce.ZodOptional,...it(t)});var ha=class extends nt{_parse(t){return this._getType(t)===xe.null?Si(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ha.create=(e,t)=>new ha({innerType:e,typeName:Ce.ZodNullable,...it(t)});var mc=class extends nt{_parse(t){let{ctx:r}=this._processInputParams(t),i=r.data;return r.parsedType===xe.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};mc.create=(e,t)=>new mc({innerType:e,typeName:Ce.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...it(t)});var Uu=class extends nt{_parse(t){let{ctx:r}=this._processInputParams(t),i={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return gd(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new tn(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new tn(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};Uu.create=(e,t)=>new Uu({innerType:e,typeName:Ce.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...it(t)});var qu=class extends nt{_parse(t){if(this._getType(t)!==xe.nan){let i=this._getOrReturnCtx(t);return we(i,{code:le.invalid_type,expected:xe.nan,received:i.parsedType}),Ve}return{status:"valid",value:t.data}}};qu.create=e=>new qu({typeName:Ce.ZodNaN,...it(e)});var jU=Symbol("zod_brand"),yd=class extends nt{_parse(t){let{ctx:r}=this._processInputParams(t),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}},Rl=class e extends nt{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.common.async)return(async()=>{let a=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?Ve:a.status==="dirty"?(r.dirty(),l4(a.value)):this._def.out._parseAsync({data:a.value,path:i.path,parent:i})})();{let n=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?Ve:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:i.path,parent:i})}}static create(t,r){return new e({in:t,out:r,typeName:Ce.ZodPipeline})}},Fu=class extends nt{_parse(t){let r=this._def.innerType._parse(t);return Il(r)&&(r.value=Object.freeze(r.value)),r}};Fu.create=(e,t)=>new Fu({innerType:e,typeName:Ce.ZodReadonly,...it(t)});var h4=(e,t={},r)=>e?fo.create().superRefine((i,n)=>{var a,u;if(!e(i)){let h=typeof t=="function"?t(i):typeof t=="string"?{message:t}:t,b=(u=(a=h.fatal)!==null&&a!==void 0?a:r)!==null&&u!==void 0?u:!0,w=typeof h=="string"?{message:h}:h;n.addIssue({code:"custom",...w,fatal:b})}}):fo.create(),VU={object:Hi.lazycreate},Ce;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ce||(Ce={}));var WU=(e,t={message:`Input not instance of ${e.name}`})=>h4(r=>r instanceof e,t),d4=uo.create,m4=ic.create,KU=qu.create,GU=nc.create,v4=sc.create,$U=ac.create,XU=Mu.create,YU=oc.create,ZU=cc.create,JU=fo.create,QU=la.create,eq=Zn.create,tq=Cu.create,rq=pa.create,iq=Hi.create,nq=Hi.strictCreate,sq=uc.create,aq=bd.create,oq=fc.create,cq=ws.create,uq=xd.create,fq=Lu.create,lq=Du.create,pq=_d.create,hq=lc.create,dq=pc.create,mq=hc.create,vq=dc.create,gq=lo.create,u4=rn.create,bq=Yn.create,xq=ha.create,_q=rn.createWithPreprocess,yq=Rl.create,wq=()=>d4().optional(),Sq=()=>m4().optional(),Eq=()=>v4().optional(),Tq={string:e=>uo.create({...e,coerce:!0}),number:e=>ic.create({...e,coerce:!0}),boolean:e=>sc.create({...e,coerce:!0}),bigint:e=>nc.create({...e,coerce:!0}),date:e=>ac.create({...e,coerce:!0})},Iq=Ve,Jn=Object.freeze({__proto__:null,defaultErrorMap:Tl,setErrorMap:kU,getErrorMap:md,makeIssue:vd,EMPTY_PATH:NU,addIssueToContext:we,ParseStatus:di,INVALID:Ve,DIRTY:l4,OK:Si,isAborted:Sb,isDirty:Eb,isValid:Il,isAsync:gd,get util(){return Et},get objectUtil(){return wb},ZodParsedType:xe,getParsedType:co,ZodType:nt,ZodString:uo,ZodNumber:ic,ZodBigInt:nc,ZodBoolean:sc,ZodDate:ac,ZodSymbol:Mu,ZodUndefined:oc,ZodNull:cc,ZodAny:fo,ZodUnknown:la,ZodNever:Zn,ZodVoid:Cu,ZodArray:pa,ZodObject:Hi,ZodUnion:uc,ZodDiscriminatedUnion:bd,ZodIntersection:fc,ZodTuple:ws,ZodRecord:xd,ZodMap:Lu,ZodSet:Du,ZodFunction:_d,ZodLazy:lc,ZodLiteral:pc,ZodEnum:hc,ZodNativeEnum:dc,ZodPromise:lo,ZodEffects:rn,ZodTransformer:rn,ZodOptional:Yn,ZodNullable:ha,ZodDefault:mc,ZodCatch:Uu,ZodNaN:qu,BRAND:jU,ZodBranded:yd,ZodPipeline:Rl,ZodReadonly:Fu,custom:h4,Schema:nt,ZodSchema:nt,late:VU,get ZodFirstPartyTypeKind(){return Ce},coerce:Tq,any:JU,array:rq,bigint:GU,boolean:v4,date:$U,discriminatedUnion:aq,effect:u4,enum:mq,function:pq,instanceof:WU,intersection:oq,lazy:hq,literal:dq,map:fq,nan:KU,nativeEnum:vq,never:eq,null:ZU,nullable:xq,number:m4,object:iq,oboolean:Eq,onumber:Sq,optional:bq,ostring:wq,pipeline:yq,preprocess:_q,promise:gq,record:uq,set:lq,strictObject:nq,string:d4,symbol:XU,transformer:u4,tuple:cq,undefined:YU,union:sq,unknown:QU,void:tq,NEVER:Iq,ZodIssueCode:le,quotelessJson:OU,ZodError:tn});var Aq=e=>e.message?e.message:"unspecified error",da=class extends $r{constructor(t){super(),this.code=1100,this.errors=t,super.message=`Web3 validator found ${t.length} error[s]:
30
+ `+r)}function xc(e,t,r,i,n){if(e.listenerCount("wsClientError")){let o=new Error(n);Error.captureStackTrace(o,xc),e.emit("wsClientError",o,r,t)}else Sl(r,i,n)}});var IT=X((nJ,ET)=>{"use strict";var xa=Td();xa.createWebSocketStream=ix();xa.Server=wx();xa.Receiver=_d();xa.Sender=yd();xa.WebSocket=xa;xa.WebSocketServer=xa.Server;ET.exports=xa});var RT=X((sJ,TT)=>{"use strict";TT.exports=IT()});var yU={};Oa(yU,{Provider:()=>Yn,assets:()=>Nx,bitcore:()=>wU,models:()=>Bx,services:()=>Cx,types:()=>Ax,utils:()=>kx});module.exports=C5(yU);var OT=_r(yt(),1),Nd=_r(bh(),1);function If(e,t){return function(){return e.apply(t,arguments)}}var{toString:r9}=Object.prototype,{getPrototypeOf:Pv}=Object,yh=(e=>t=>{let r=r9.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ms=e=>(e=e.toLowerCase(),t=>yh(t)===e),wh=e=>t=>typeof t===e,{isArray:lu}=Array,Tf=wh("undefined");function i9(e){return e!==null&&!Tf(e)&&e.constructor!==null&&!Tf(e.constructor)&&gn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var FS=ms("ArrayBuffer");function n9(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&FS(e.buffer),t}var s9=wh("string"),gn=wh("function"),HS=wh("number"),Sh=e=>e!==null&&typeof e=="object",a9=e=>e===!0||e===!1,_h=e=>{if(yh(e)!=="object")return!1;let t=Pv(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},o9=ms("Date"),c9=ms("File"),u9=ms("Blob"),f9=ms("FileList"),l9=e=>Sh(e)&&gn(e.pipe),p9=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||gn(e.append)&&((t=yh(e))==="formdata"||t==="object"&&gn(e.toString)&&e.toString()==="[object FormData]"))},h9=ms("URLSearchParams"),d9=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Rf(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,n;if(typeof e!="object"&&(e=[e]),lu(e))for(i=0,n=e.length;i<n;i++)t.call(null,e[i],i,e);else{let o=r?Object.getOwnPropertyNames(e):Object.keys(e),u=o.length,m;for(i=0;i<u;i++)m=o[i],t.call(null,e[m],m,e)}}function zS(e,t){t=t.toLowerCase();let r=Object.keys(e),i=r.length,n;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}var VS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,jS=e=>!Tf(e)&&e!==VS;function kv(){let{caseless:e}=jS(this)&&this||{},t={},r=(i,n)=>{let o=e&&zS(t,n)||n;_h(t[o])&&_h(i)?t[o]=kv(t[o],i):_h(i)?t[o]=kv({},i):lu(i)?t[o]=i.slice():t[o]=i};for(let i=0,n=arguments.length;i<n;i++)arguments[i]&&Rf(arguments[i],r);return t}var m9=(e,t,r,{allOwnKeys:i}={})=>(Rf(t,(n,o)=>{r&&gn(n)?e[o]=If(n,r):e[o]=n},{allOwnKeys:i}),e),v9=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),g9=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},x9=(e,t,r,i)=>{let n,o,u,m={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),o=n.length;o-- >0;)u=n[o],(!i||i(u,e,t))&&!m[u]&&(t[u]=e[u],m[u]=!0);e=r!==!1&&Pv(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},b9=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let i=e.indexOf(t,r);return i!==-1&&i===r},_9=e=>{if(!e)return null;if(lu(e))return e;let t=e.length;if(!HS(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},y9=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Pv(Uint8Array)),w9=(e,t)=>{let i=(e&&e[Symbol.iterator]).call(e),n;for(;(n=i.next())&&!n.done;){let o=n.value;t.call(e,o[0],o[1])}},S9=(e,t)=>{let r,i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},E9=ms("HTMLFormElement"),I9=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,n){return i.toUpperCase()+n}),DS=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),T9=ms("RegExp"),WS=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),i={};Rf(r,(n,o)=>{let u;(u=t(n,o,e))!==!1&&(i[o]=u||n)}),Object.defineProperties(e,i)},R9=e=>{WS(e,(t,r)=>{if(gn(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let i=e[r];if(gn(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},A9=(e,t)=>{let r={},i=n=>{n.forEach(o=>{r[o]=!0})};return lu(e)?i(e):i(String(e).split(t)),r},O9=()=>{},k9=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Ov="abcdefghijklmnopqrstuvwxyz",qS="0123456789",KS={DIGIT:qS,ALPHA:Ov,ALPHA_DIGIT:Ov+Ov.toUpperCase()+qS},P9=(e=16,t=KS.ALPHA_DIGIT)=>{let r="",{length:i}=t;for(;e--;)r+=t[Math.random()*i|0];return r};function N9(e){return!!(e&&gn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var B9=e=>{let t=new Array(10),r=(i,n)=>{if(Sh(i)){if(t.indexOf(i)>=0)return;if(!("toJSON"in i)){t[n]=i;let o=lu(i)?[]:{};return Rf(i,(u,m)=>{let _=r(u,n+1);!Tf(_)&&(o[m]=_)}),t[n]=void 0,o}}return i};return r(e,0)},M9=ms("AsyncFunction"),C9=e=>e&&(Sh(e)||gn(e))&&gn(e.then)&&gn(e.catch),z={isArray:lu,isArrayBuffer:FS,isBuffer:i9,isFormData:p9,isArrayBufferView:n9,isString:s9,isNumber:HS,isBoolean:a9,isObject:Sh,isPlainObject:_h,isUndefined:Tf,isDate:o9,isFile:c9,isBlob:u9,isRegExp:T9,isFunction:gn,isStream:l9,isURLSearchParams:h9,isTypedArray:y9,isFileList:f9,forEach:Rf,merge:kv,extend:m9,trim:d9,stripBOM:v9,inherits:g9,toFlatObject:x9,kindOf:yh,kindOfTest:ms,endsWith:b9,toArray:_9,forEachEntry:w9,matchAll:S9,isHTMLForm:E9,hasOwnProperty:DS,hasOwnProp:DS,reduceDescriptors:WS,freezeMethods:R9,toObjectSet:A9,toCamelCase:I9,noop:O9,toFiniteNumber:k9,findKey:zS,global:VS,isContextDefined:jS,ALPHABET:KS,generateString:P9,isSpecCompliantForm:N9,toJSONObject:B9,isAsyncFn:M9,isThenable:C9};function pu(e,t,r,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),n&&(this.response=n)}z.inherits(pu,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:z.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var GS=pu.prototype,$S={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{$S[e]={value:e}});Object.defineProperties(pu,$S);Object.defineProperty(GS,"isAxiosError",{value:!0});pu.from=(e,t,r,i,n,o)=>{let u=Object.create(GS);return z.toFlatObject(e,u,function(_){return _!==Error.prototype},m=>m!=="isAxiosError"),pu.call(u,e.message,t,r,i,n),u.cause=e,u.name=e.name,o&&Object.assign(u,o),u};var _e=pu;var kE=_r(OE(),1),Th=kE.default;function zv(e){return z.isPlainObject(e)||z.isArray(e)}function NE(e){return z.endsWith(e,"[]")?e.slice(0,-2):e}function PE(e,t,r){return e?e.concat(t).map(function(n,o){return n=NE(n),!r&&o?"["+n+"]":n}).join(r?".":""):t}function xB(e){return z.isArray(e)&&!e.some(zv)}var bB=z.toFlatObject(z,{},null,function(t){return/^is[A-Z]/.test(t)});function _B(e,t,r){if(!z.isObject(e))throw new TypeError("target must be an object");t=t||new(Th||FormData),r=z.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(U,Z){return!z.isUndefined(Z[U])});let i=r.metaTokens,n=r.visitor||I,o=r.dots,u=r.indexes,_=(r.Blob||typeof Blob<"u"&&Blob)&&z.isSpecCompliantForm(t);if(!z.isFunction(n))throw new TypeError("visitor must be a function");function w(B){if(B===null)return"";if(z.isDate(B))return B.toISOString();if(!_&&z.isBlob(B))throw new _e("Blob is not supported. Use a Buffer instead.");return z.isArrayBuffer(B)||z.isTypedArray(B)?_&&typeof Blob=="function"?new Blob([B]):Buffer.from(B):B}function I(B,U,Z){let $=B;if(B&&!Z&&typeof B=="object"){if(z.endsWith(U,"{}"))U=i?U:U.slice(0,-2),B=JSON.stringify(B);else if(z.isArray(B)&&xB(B)||(z.isFileList(B)||z.endsWith(U,"[]"))&&($=z.toArray(B)))return U=NE(U),$.forEach(function(ee,ce){!(z.isUndefined(ee)||ee===null)&&t.append(u===!0?PE([U],ce,o):u===null?U:U+"[]",w(ee))}),!1}return zv(B)?!0:(t.append(PE(Z,U,o),w(B)),!1)}let T=[],N=Object.assign(bB,{defaultVisitor:I,convertValue:w,isVisitable:zv});function C(B,U){if(!z.isUndefined(B)){if(T.indexOf(B)!==-1)throw Error("Circular reference detected in "+U.join("."));T.push(B),z.forEach(B,function($,H){(!(z.isUndefined($)||$===null)&&n.call(t,$,z.isString(H)?H.trim():H,U,N))===!0&&C($,U?U.concat(H):[H])}),T.pop()}}if(!z.isObject(e))throw new TypeError("data must be an object");return C(e),t}var eo=_B;function BE(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function ME(e,t){this._pairs=[],e&&eo(e,this,t)}var CE=ME.prototype;CE.append=function(t,r){this._pairs.push([t,r])};CE.toString=function(t){let r=t?function(i){return t.call(this,i,BE)}:BE;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};var LE=ME;function yB(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Zo(e,t,r){if(!t)return e;let i=r&&r.encode||yB,n=r&&r.serialize,o;if(n?o=n(t,r):o=z.isURLSearchParams(t)?t.toString():new LE(t,r).toString(i),o){let u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Vv=class{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){z.forEach(this.handlers,function(i){i!==null&&t(i)})}},jv=Vv;var hu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var UE=_r(require("url"),1),DE=UE.default.URLSearchParams;var qE={isNode:!0,classes:{URLSearchParams:DE,FormData:Th,Blob:typeof Blob<"u"&&Blob||null},protocols:["http","https","file","data"]};var Wv={};Oa(Wv,{hasBrowserEnv:()=>FE,hasStandardBrowserEnv:()=>wB,hasStandardBrowserWebWorkerEnv:()=>SB});var FE=typeof window<"u"&&typeof document<"u",wB=(e=>FE&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),SB=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function";var Wr={...Wv,...qE};function Kv(e,t){return eo(e,new Wr.classes.URLSearchParams,Object.assign({visitor:function(r,i,n,o){return Wr.isNode&&z.isBuffer(r)?(this.append(i,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function EB(e){return z.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function IB(e){let t={},r=Object.keys(e),i,n=r.length,o;for(i=0;i<n;i++)o=r[i],t[o]=e[o];return t}function TB(e){function t(r,i,n,o){let u=r[o++];if(u==="__proto__")return!0;let m=Number.isFinite(+u),_=o>=r.length;return u=!u&&z.isArray(n)?n.length:u,_?(z.hasOwnProp(n,u)?n[u]=[n[u],i]:n[u]=i,!m):((!n[u]||!z.isObject(n[u]))&&(n[u]=[]),t(r,i,n[u],o)&&z.isArray(n[u])&&(n[u]=IB(n[u])),!m)}if(z.isFormData(e)&&z.isFunction(e.entries)){let r={};return z.forEachEntry(e,(i,n)=>{t(EB(i),n,r,0)}),r}return null}var Rh=TB;function RB(e,t,r){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}var Gv={transitional:hu,adapter:["xhr","http"],transformRequest:[function(t,r){let i=r.getContentType()||"",n=i.indexOf("application/json")>-1,o=z.isObject(t);if(o&&z.isHTMLForm(t)&&(t=new FormData(t)),z.isFormData(t))return n?JSON.stringify(Rh(t)):t;if(z.isArrayBuffer(t)||z.isBuffer(t)||z.isStream(t)||z.isFile(t)||z.isBlob(t))return t;if(z.isArrayBufferView(t))return t.buffer;if(z.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let m;if(o){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Kv(t,this.formSerializer).toString();if((m=z.isFileList(t))||i.indexOf("multipart/form-data")>-1){let _=this.env&&this.env.FormData;return eo(m?{"files[]":t}:t,_&&new _,this.formSerializer)}}return o||n?(r.setContentType("application/json",!1),RB(t)):t}],transformResponse:[function(t){let r=this.transitional||Gv.transitional,i=r&&r.forcedJSONParsing,n=this.responseType==="json";if(t&&z.isString(t)&&(i&&!this.responseType||n)){let u=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(m){if(u)throw m.name==="SyntaxError"?_e.from(m,_e.ERR_BAD_RESPONSE,this,null,this.response):m}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Wr.classes.FormData,Blob:Wr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};z.forEach(["delete","get","head","post","put","patch"],e=>{Gv.headers[e]={}});var du=Gv;var AB=z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),HE=e=>{let t={},r,i,n;return e&&e.split(`
31
+ `).forEach(function(u){n=u.indexOf(":"),r=u.substring(0,n).trim().toLowerCase(),i=u.substring(n+1).trim(),!(!r||t[r]&&AB[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t};var zE=Symbol("internals");function Af(e){return e&&String(e).trim().toLowerCase()}function Ah(e){return e===!1||e==null?e:z.isArray(e)?e.map(Ah):String(e)}function OB(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}var kB=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function $v(e,t,r,i,n){if(z.isFunction(i))return i.call(this,t,r);if(n&&(t=r),!!z.isString(t)){if(z.isString(i))return t.indexOf(i)!==-1;if(z.isRegExp(i))return i.test(t)}}function PB(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function NB(e,t){let r=z.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(n,o,u){return this[i].call(this,t,n,o,u)},configurable:!0})})}var mu=class{constructor(t){t&&this.set(t)}set(t,r,i){let n=this;function o(m,_,w){let I=Af(_);if(!I)throw new Error("header name must be a non-empty string");let T=z.findKey(n,I);(!T||n[T]===void 0||w===!0||w===void 0&&n[T]!==!1)&&(n[T||_]=Ah(m))}let u=(m,_)=>z.forEach(m,(w,I)=>o(w,I,_));return z.isPlainObject(t)||t instanceof this.constructor?u(t,r):z.isString(t)&&(t=t.trim())&&!kB(t)?u(HE(t),r):t!=null&&o(r,t,i),this}get(t,r){if(t=Af(t),t){let i=z.findKey(this,t);if(i){let n=this[i];if(!r)return n;if(r===!0)return OB(n);if(z.isFunction(r))return r.call(this,n,i);if(z.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Af(t),t){let i=z.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||$v(this,this[i],i,r)))}return!1}delete(t,r){let i=this,n=!1;function o(u){if(u=Af(u),u){let m=z.findKey(i,u);m&&(!r||$v(i,i[m],m,r))&&(delete i[m],n=!0)}}return z.isArray(t)?t.forEach(o):o(t),n}clear(t){let r=Object.keys(this),i=r.length,n=!1;for(;i--;){let o=r[i];(!t||$v(this,this[o],o,t,!0))&&(delete this[o],n=!0)}return n}normalize(t){let r=this,i={};return z.forEach(this,(n,o)=>{let u=z.findKey(i,o);if(u){r[u]=Ah(n),delete r[o];return}let m=t?PB(o):String(o).trim();m!==o&&delete r[o],r[m]=Ah(n),i[m]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return z.forEach(this,(i,n)=>{i!=null&&i!==!1&&(r[n]=t&&z.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
32
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let i=new this(t);return r.forEach(n=>i.set(n)),i}static accessor(t){let i=(this[zE]=this[zE]={accessors:{}}).accessors,n=this.prototype;function o(u){let m=Af(u);i[m]||(NB(n,u),i[m]=!0)}return z.isArray(t)?t.forEach(o):o(t),this}};mu.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);z.reduceDescriptors(mu.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[r]=i}}});z.freezeMethods(mu);var Kr=mu;function Of(e,t){let r=this||du,i=t||r,n=Kr.from(i.headers),o=i.data;return z.forEach(e,function(m){o=m.call(r,o,n.normalize(),t?t.status:void 0)}),n.normalize(),o}function kf(e){return!!(e&&e.__CANCEL__)}function VE(e,t,r){_e.call(this,e??"canceled",_e.ERR_CANCELED,t,r),this.name="CanceledError"}z.inherits(VE,_e,{__CANCEL__:!0});var zn=VE;function to(e,t,r){let i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new _e("Request failed with status code "+r.status,[_e.ERR_BAD_REQUEST,_e.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Yv(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Zv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Xo(e,t){return e&&!Yv(t)?Zv(e,t):t}var p3=_r(WE(),1),h3=_r(require("http"),1),d3=_r(require("https"),1),m3=_r(require("util"),1),v3=_r(JE(),1),aa=_r(require("zlib"),1);var Qo="1.6.8";function Lf(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var YB=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function ug(e,t,r){let i=r&&r.Blob||Wr.classes.Blob,n=Lf(e);if(t===void 0&&i&&(t=!0),n==="data"){e=n.length?e.slice(n.length+1):e;let o=YB.exec(e);if(!o)throw new _e("Invalid URL",_e.ERR_INVALID_URL);let u=o[1],m=o[2],_=o[3],w=Buffer.from(decodeURIComponent(_),m?"base64":"utf8");if(t){if(!i)throw new _e("Blob is not supported",_e.ERR_NOT_SUPPORT);return new i([w],{type:u})}return w}throw new _e("Unsupported protocol "+n,_e.ERR_NOT_SUPPORT)}var ec=_r(require("stream"),1);var e3=_r(require("stream"),1);function ZB(e,t){let r=0,i=1e3/t,n=null;return function(u,m){let _=Date.now();if(u||_-r>i)return n&&(clearTimeout(n),n=null),r=_,e.apply(null,m);n||(n=setTimeout(()=>(n=null,r=Date.now(),e.apply(null,m)),i-(_-r)))}}var QE=ZB;function XB(e,t){e=e||10;let r=new Array(e),i=new Array(e),n=0,o=0,u;return t=t!==void 0?t:1e3,function(_){let w=Date.now(),I=i[o];u||(u=w),r[n]=_,i[n]=w;let T=o,N=0;for(;T!==n;)N+=r[T++],T=T%e;if(n=(n+1)%e,n===o&&(o=(o+1)%e),w-u<t)return;let C=I&&w-I;return C?Math.round(N*1e3/C):void 0}}var Oh=XB;var kh=Symbol("internals"),fg=class extends e3.default.Transform{constructor(t){t=z.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(m,_)=>!z.isUndefined(_[m])),super({readableHighWaterMark:t.chunkSize});let r=this,i=this[kh]={length:t.length,timeWindow:t.timeWindow,ticksRate:t.ticksRate,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null},n=Oh(i.ticksRate*t.samplesCount,i.timeWindow);this.on("newListener",m=>{m==="progress"&&(i.isCaptured||(i.isCaptured=!0))});let o=0;i.updateProgress=QE(function(){let _=i.length,w=i.bytesSeen,I=w-o;if(!I||r.destroyed)return;let T=n(I);o=w,process.nextTick(()=>{r.emit("progress",{loaded:w,total:_,progress:_?w/_:void 0,bytes:I,rate:T||void 0,estimated:T&&_&&w<=_?(_-w)/T:void 0})})},i.ticksRate);let u=()=>{i.updateProgress(!0)};this.once("end",u),this.once("error",u)}_read(t){let r=this[kh];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,i){let n=this,o=this[kh],u=o.maxRate,m=this.readableHighWaterMark,_=o.timeWindow,w=1e3/_,I=u/w,T=o.minChunkSize!==!1?Math.max(o.minChunkSize,I*.01):0;function N(B,U){let Z=Buffer.byteLength(B);o.bytesSeen+=Z,o.bytes+=Z,o.isCaptured&&o.updateProgress(),n.push(B)?process.nextTick(U):o.onReadCallback=()=>{o.onReadCallback=null,process.nextTick(U)}}let C=(B,U)=>{let Z=Buffer.byteLength(B),$=null,H=m,ee,ce=0;if(u){let ge=Date.now();(!o.ts||(ce=ge-o.ts)>=_)&&(o.ts=ge,ee=I-o.bytes,o.bytes=ee<0?-ee:0,ce=0),ee=I-o.bytes}if(u){if(ee<=0)return setTimeout(()=>{U(null,B)},_-ce);ee<H&&(H=ee)}H&&Z>H&&Z-H>T&&($=B.subarray(H),B=B.subarray(0,H)),N(B,$?()=>{process.nextTick(U,null,$)}:U)};C(t,function B(U,Z){if(U)return i(U);Z?C(Z,B):i(null)})}setLength(t){return this[kh].length=+t,this}},lg=fg;var g3=require("events");var r3=require("util"),i3=require("stream");var{asyncIterator:t3}=Symbol,JB=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[t3]?yield*e[t3]():yield e},Ph=JB;var QB=z.ALPHABET.ALPHA_DIGIT+"-_",Uf=new r3.TextEncoder,ro=`\r
33
+ `,eM=Uf.encode(ro),tM=2,pg=class{constructor(t,r){let{escapeName:i}=this.constructor,n=z.isString(r),o=`Content-Disposition: form-data; name="${i(t)}"${!n&&r.name?`; filename="${i(r.name)}"`:""}${ro}`;n?r=Uf.encode(String(r).replace(/\r?\n|\r\n?/g,ro)):o+=`Content-Type: ${r.type||"application/octet-stream"}${ro}`,this.headers=Uf.encode(o+ro),this.contentLength=n?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+tM,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;z.isTypedArray(t)?yield t:yield*Ph(t),yield eM}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},rM=(e,t,r)=>{let{tag:i="form-data-boundary",size:n=25,boundary:o=i+"-"+z.generateString(n,QB)}=r||{};if(!z.isFormData(e))throw TypeError("FormData instance required");if(o.length<1||o.length>70)throw Error("boundary must be 10-70 characters long");let u=Uf.encode("--"+o+ro),m=Uf.encode("--"+o+"--"+ro+ro),_=m.byteLength,w=Array.from(e.entries()).map(([T,N])=>{let C=new pg(T,N);return _+=C.size,C});_+=u.byteLength*w.length,_=z.toFiniteNumber(_);let I={"Content-Type":`multipart/form-data; boundary=${o}`};return Number.isFinite(_)&&(I["Content-Length"]=_),t&&t(I),i3.Readable.from(async function*(){for(let T of w)yield u,yield*T.encode();yield m}())},n3=rM;var s3=_r(require("stream"),1),hg=class extends s3.default.Transform{__transform(t,r,i){this.push(t),i()}_transform(t,r,i){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let n=Buffer.alloc(2);n[0]=120,n[1]=156,this.push(n,r)}this.__transform(t,r,i)}},a3=hg;var iM=(e,t)=>z.isAsyncFn(e)?function(...r){let i=r.pop();e.apply(this,r).then(n=>{try{t?i(null,...t(n)):i(null,n)}catch(o){i(o)}},i)}:e,o3=iM;var c3={flush:aa.default.constants.Z_SYNC_FLUSH,finishFlush:aa.default.constants.Z_SYNC_FLUSH},nM={flush:aa.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:aa.default.constants.BROTLI_OPERATION_FLUSH},u3=z.isFunction(aa.default.createBrotliDecompress),{http:sM,https:aM}=v3.default,oM=/https:?/,f3=Wr.protocols.map(e=>e+":");function cM(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function x3(e,t,r){let i=t;if(!i&&i!==!1){let n=(0,p3.getProxyForUrl)(r);n&&(i=new URL(n))}if(i){if(i.username&&(i.auth=(i.username||"")+":"+(i.password||"")),i.auth){(i.auth.username||i.auth.password)&&(i.auth=(i.auth.username||"")+":"+(i.auth.password||""));let o=Buffer.from(i.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+o}e.headers.host=e.hostname+(e.port?":"+e.port:"");let n=i.hostname||i.host;e.hostname=n,e.host=n,e.port=i.port,e.path=r,i.protocol&&(e.protocol=i.protocol.includes(":")?i.protocol:`${i.protocol}:`)}e.beforeRedirects.proxy=function(o){x3(o,t,o.href)}}var uM=typeof process<"u"&&z.kindOf(process)==="process",fM=e=>new Promise((t,r)=>{let i,n,o=(_,w)=>{n||(n=!0,i&&i(_,w))},u=_=>{o(_),t(_)},m=_=>{o(_,!0),r(_)};e(u,m,_=>i=_).catch(m)}),lM=({address:e,family:t})=>{if(!z.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},l3=(e,t)=>lM(z.isObject(e)?e:{address:e,family:t}),b3=uM&&function(t){return fM(async function(i,n,o){let{data:u,lookup:m,family:_}=t,{responseType:w,responseEncoding:I}=t,T=t.method.toUpperCase(),N,C=!1,B;if(m){let b=o3(m,l=>z.isArray(l)?l:[l]);m=(l,d,A)=>{b(l,d,(D,V,Y)=>{if(D)return A(D);let se=z.isArray(V)?V.map(ae=>l3(ae)):[l3(V,Y)];d.all?A(D,se):A(D,se[0].address,se[0].family)})}}let U=new g3.EventEmitter,Z=()=>{t.cancelToken&&t.cancelToken.unsubscribe($),t.signal&&t.signal.removeEventListener("abort",$),U.removeAllListeners()};o((b,l)=>{N=!0,l&&(C=!0,Z())});function $(b){U.emit("abort",!b||b.type?new zn(null,t,B):b)}U.once("abort",n),(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe($),t.signal&&(t.signal.aborted?$():t.signal.addEventListener("abort",$)));let H=Xo(t.baseURL,t.url),ee=new URL(H,"http://localhost"),ce=ee.protocol||f3[0];if(ce==="data:"){let b;if(T!=="GET")return to(i,n,{status:405,statusText:"method not allowed",headers:{},config:t});try{b=ug(t.url,w==="blob",{Blob:t.env&&t.env.Blob})}catch(l){throw _e.from(l,_e.ERR_BAD_REQUEST,t)}return w==="text"?(b=b.toString(I),(!I||I==="utf8")&&(b=z.stripBOM(b))):w==="stream"&&(b=ec.default.Readable.from(b)),to(i,n,{data:b,status:200,statusText:"OK",headers:new Kr,config:t})}if(f3.indexOf(ce)===-1)return n(new _e("Unsupported protocol "+ce,_e.ERR_BAD_REQUEST,t));let ge=Kr.from(t.headers).normalize();ge.set("User-Agent","axios/"+Qo,!1);let Se=t.onDownloadProgress,me=t.onUploadProgress,O=t.maxRate,E,f;if(z.isSpecCompliantForm(u)){let b=ge.getContentType(/boundary=([-_\w\d]{10,70})/i);u=n3(u,l=>{ge.set(l)},{tag:`axios-${Qo}-boundary`,boundary:b&&b[1]||void 0})}else if(z.isFormData(u)&&z.isFunction(u.getHeaders)){if(ge.set(u.getHeaders()),!ge.hasContentLength())try{let b=await m3.default.promisify(u.getLength).call(u);Number.isFinite(b)&&b>=0&&ge.setContentLength(b)}catch{}}else if(z.isBlob(u))u.size&&ge.setContentType(u.type||"application/octet-stream"),ge.setContentLength(u.size||0),u=ec.default.Readable.from(Ph(u));else if(u&&!z.isStream(u)){if(!Buffer.isBuffer(u))if(z.isArrayBuffer(u))u=Buffer.from(new Uint8Array(u));else if(z.isString(u))u=Buffer.from(u,"utf-8");else return n(new _e("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",_e.ERR_BAD_REQUEST,t));if(ge.setContentLength(u.length,!1),t.maxBodyLength>-1&&u.length>t.maxBodyLength)return n(new _e("Request body larger than maxBodyLength limit",_e.ERR_BAD_REQUEST,t))}let c=z.toFiniteNumber(ge.getContentLength());z.isArray(O)?(E=O[0],f=O[1]):E=f=O,u&&(me||E)&&(z.isStream(u)||(u=ec.default.Readable.from(u,{objectMode:!1})),u=ec.default.pipeline([u,new lg({length:c,maxRate:z.toFiniteNumber(E)})],z.noop),me&&u.on("progress",b=>{me(Object.assign(b,{upload:!0}))}));let p;if(t.auth){let b=t.auth.username||"",l=t.auth.password||"";p=b+":"+l}if(!p&&ee.username){let b=ee.username,l=ee.password;p=b+":"+l}p&&ge.delete("authorization");let v;try{v=Zo(ee.pathname+ee.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(b){let l=new Error(b.message);return l.config=t,l.url=t.url,l.exists=!0,n(l)}ge.set("Accept-Encoding","gzip, compress, deflate"+(u3?", br":""),!1);let g={path:v,method:T,headers:ge.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:p,protocol:ce,family:_,beforeRedirect:cM,beforeRedirects:{}};!z.isUndefined(m)&&(g.lookup=m),t.socketPath?g.socketPath=t.socketPath:(g.hostname=ee.hostname,g.port=ee.port,x3(g,t.proxy,ce+"//"+ee.hostname+(ee.port?":"+ee.port:"")+g.path));let x,S=oM.test(g.protocol);if(g.agent=S?t.httpsAgent:t.httpAgent,t.transport?x=t.transport:t.maxRedirects===0?x=S?d3.default:h3.default:(t.maxRedirects&&(g.maxRedirects=t.maxRedirects),t.beforeRedirect&&(g.beforeRedirects.config=t.beforeRedirect),x=S?aM:sM),t.maxBodyLength>-1?g.maxBodyLength=t.maxBodyLength:g.maxBodyLength=1/0,t.insecureHTTPParser&&(g.insecureHTTPParser=t.insecureHTTPParser),B=x.request(g,function(l){if(B.destroyed)return;let d=[l],A=+l.headers["content-length"];if(Se){let ae=new lg({length:z.toFiniteNumber(A),maxRate:z.toFiniteNumber(f)});Se&&ae.on("progress",pe=>{Se(Object.assign(pe,{download:!0}))}),d.push(ae)}let D=l,V=l.req||B;if(t.decompress!==!1&&l.headers["content-encoding"])switch((T==="HEAD"||l.statusCode===204)&&delete l.headers["content-encoding"],(l.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":d.push(aa.default.createUnzip(c3)),delete l.headers["content-encoding"];break;case"deflate":d.push(new a3),d.push(aa.default.createUnzip(c3)),delete l.headers["content-encoding"];break;case"br":u3&&(d.push(aa.default.createBrotliDecompress(nM)),delete l.headers["content-encoding"])}D=d.length>1?ec.default.pipeline(d,z.noop):d[0];let Y=ec.default.finished(D,()=>{Y(),Z()}),se={status:l.statusCode,statusText:l.statusMessage,headers:new Kr(l.headers),config:t,request:V};if(w==="stream")se.data=D,to(i,n,se);else{let ae=[],pe=0;D.on("data",function(de){ae.push(de),pe+=de.length,t.maxContentLength>-1&&pe>t.maxContentLength&&(C=!0,D.destroy(),n(new _e("maxContentLength size of "+t.maxContentLength+" exceeded",_e.ERR_BAD_RESPONSE,t,V)))}),D.on("aborted",function(){if(C)return;let de=new _e("maxContentLength size of "+t.maxContentLength+" exceeded",_e.ERR_BAD_RESPONSE,t,V);D.destroy(de),n(de)}),D.on("error",function(de){B.destroyed||n(_e.from(de,null,t,V))}),D.on("end",function(){try{let de=ae.length===1?ae[0]:Buffer.concat(ae);w!=="arraybuffer"&&(de=de.toString(I),(!I||I==="utf8")&&(de=z.stripBOM(de))),se.data=de}catch(de){return n(_e.from(de,null,t,se.request,se))}to(i,n,se)})}U.once("abort",ae=>{D.destroyed||(D.emit("error",ae),D.destroy())})}),U.once("abort",b=>{n(b),B.destroy(b)}),B.on("error",function(l){n(_e.from(l,null,t,B))}),B.on("socket",function(l){l.setKeepAlive(!0,1e3*60)}),t.timeout){let b=parseInt(t.timeout,10);if(Number.isNaN(b)){n(new _e("error trying to parse `config.timeout` to int",_e.ERR_BAD_OPTION_VALUE,t,B));return}B.setTimeout(b,function(){if(N)return;let d=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",A=t.transitional||hu;t.timeoutErrorMessage&&(d=t.timeoutErrorMessage),n(new _e(d,A.clarifyTimeoutError?_e.ETIMEDOUT:_e.ECONNABORTED,t,B)),$()})}if(z.isStream(u)){let b=!1,l=!1;u.on("end",()=>{b=!0}),u.once("error",d=>{l=!0,B.destroy(d)}),u.on("close",()=>{!b&&!l&&$(new zn("Request stream has been aborted",t,B))}),u.pipe(B)}else B.end(u)})};var _3=Wr.hasStandardBrowserEnv?{write(e,t,r,i,n,o){let u=[e+"="+encodeURIComponent(t)];z.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),z.isString(i)&&u.push("path="+i),z.isString(n)&&u.push("domain="+n),o===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};var y3=Wr.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),i;function n(o){let u=o;return t&&(r.setAttribute("href",u),u=r.href),r.setAttribute("href",u),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return i=n(window.location.href),function(u){let m=z.isString(u)?n(u):u;return m.protocol===i.protocol&&m.host===i.host}}():function(){return function(){return!0}}();function w3(e,t){let r=0,i=Oh(50,250);return n=>{let o=n.loaded,u=n.lengthComputable?n.total:void 0,m=o-r,_=i(m),w=o<=u;r=o;let I={loaded:o,total:u,progress:u?o/u:void 0,bytes:m,rate:_||void 0,estimated:_&&u&&w?(u-o)/_:void 0,event:n};I[t?"download":"upload"]=!0,e(I)}}var pM=typeof XMLHttpRequest<"u",S3=pM&&function(e){return new Promise(function(r,i){let n=e.data,o=Kr.from(e.headers).normalize(),{responseType:u,withXSRFToken:m}=e,_;function w(){e.cancelToken&&e.cancelToken.unsubscribe(_),e.signal&&e.signal.removeEventListener("abort",_)}let I;if(z.isFormData(n)){if(Wr.hasStandardBrowserEnv||Wr.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((I=o.getContentType())!==!1){let[U,...Z]=I?I.split(";").map($=>$.trim()).filter(Boolean):[];o.setContentType([U||"multipart/form-data",...Z].join("; "))}}let T=new XMLHttpRequest;if(e.auth){let U=e.auth.username||"",Z=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(U+":"+Z))}let N=Xo(e.baseURL,e.url);T.open(e.method.toUpperCase(),Zo(N,e.params,e.paramsSerializer),!0),T.timeout=e.timeout;function C(){if(!T)return;let U=Kr.from("getAllResponseHeaders"in T&&T.getAllResponseHeaders()),$={data:!u||u==="text"||u==="json"?T.responseText:T.response,status:T.status,statusText:T.statusText,headers:U,config:e,request:T};to(function(ee){r(ee),w()},function(ee){i(ee),w()},$),T=null}if("onloadend"in T?T.onloadend=C:T.onreadystatechange=function(){!T||T.readyState!==4||T.status===0&&!(T.responseURL&&T.responseURL.indexOf("file:")===0)||setTimeout(C)},T.onabort=function(){T&&(i(new _e("Request aborted",_e.ECONNABORTED,e,T)),T=null)},T.onerror=function(){i(new _e("Network Error",_e.ERR_NETWORK,e,T)),T=null},T.ontimeout=function(){let Z=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",$=e.transitional||hu;e.timeoutErrorMessage&&(Z=e.timeoutErrorMessage),i(new _e(Z,$.clarifyTimeoutError?_e.ETIMEDOUT:_e.ECONNABORTED,e,T)),T=null},Wr.hasStandardBrowserEnv&&(m&&z.isFunction(m)&&(m=m(e)),m||m!==!1&&y3(N))){let U=e.xsrfHeaderName&&e.xsrfCookieName&&_3.read(e.xsrfCookieName);U&&o.set(e.xsrfHeaderName,U)}n===void 0&&o.setContentType(null),"setRequestHeader"in T&&z.forEach(o.toJSON(),function(Z,$){T.setRequestHeader($,Z)}),z.isUndefined(e.withCredentials)||(T.withCredentials=!!e.withCredentials),u&&u!=="json"&&(T.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&T.addEventListener("progress",w3(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&T.upload&&T.upload.addEventListener("progress",w3(e.onUploadProgress)),(e.cancelToken||e.signal)&&(_=U=>{T&&(i(!U||U.type?new zn(null,e,T):U),T.abort(),T=null)},e.cancelToken&&e.cancelToken.subscribe(_),e.signal&&(e.signal.aborted?_():e.signal.addEventListener("abort",_)));let B=Lf(N);if(B&&Wr.protocols.indexOf(B)===-1){i(new _e("Unsupported protocol "+B+":",_e.ERR_BAD_REQUEST,e));return}T.send(n||null)})};var dg={http:b3,xhr:S3};z.forEach(dg,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var E3=e=>`- ${e}`,hM=e=>z.isFunction(e)||e===null||e===!1,Nh={getAdapter:e=>{e=z.isArray(e)?e:[e];let{length:t}=e,r,i,n={};for(let o=0;o<t;o++){r=e[o];let u;if(i=r,!hM(r)&&(i=dg[(u=String(r)).toLowerCase()],i===void 0))throw new _e(`Unknown adapter '${u}'`);if(i)break;n[u||"#"+o]=i}if(!i){let o=Object.entries(n).map(([m,_])=>`adapter ${m} `+(_===!1?"is not supported by the environment":"is not available in the build")),u=t?o.length>1?`since :
34
+ `+o.map(E3).join(`
35
+ `):" "+E3(o[0]):"as no adapter specified";throw new _e("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i},adapters:dg};function mg(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zn(null,e)}function Bh(e){return mg(e),e.headers=Kr.from(e.headers),e.data=Of.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Nh.getAdapter(e.adapter||du.adapter)(e).then(function(i){return mg(e),i.data=Of.call(e,e.transformResponse,i),i.headers=Kr.from(i.headers),i},function(i){return kf(i)||(mg(e),i&&i.response&&(i.response.data=Of.call(e,e.transformResponse,i.response),i.response.headers=Kr.from(i.response.headers))),Promise.reject(i)})}var I3=e=>e instanceof Kr?{...e}:e;function oa(e,t){t=t||{};let r={};function i(w,I,T){return z.isPlainObject(w)&&z.isPlainObject(I)?z.merge.call({caseless:T},w,I):z.isPlainObject(I)?z.merge({},I):z.isArray(I)?I.slice():I}function n(w,I,T){if(z.isUndefined(I)){if(!z.isUndefined(w))return i(void 0,w,T)}else return i(w,I,T)}function o(w,I){if(!z.isUndefined(I))return i(void 0,I)}function u(w,I){if(z.isUndefined(I)){if(!z.isUndefined(w))return i(void 0,w)}else return i(void 0,I)}function m(w,I,T){if(T in t)return i(w,I);if(T in e)return i(void 0,w)}let _={url:o,method:o,data:o,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:m,headers:(w,I)=>n(I3(w),I3(I),!0)};return z.forEach(Object.keys(Object.assign({},e,t)),function(I){let T=_[I]||n,N=T(e[I],t[I],I);z.isUndefined(N)&&T!==m||(r[I]=N)}),r}var vg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{vg[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});var T3={};vg.transitional=function(t,r,i){function n(o,u){return"[Axios v"+Qo+"] Transitional option '"+o+"'"+u+(i?". "+i:"")}return(o,u,m)=>{if(t===!1)throw new _e(n(u," has been removed"+(r?" in "+r:"")),_e.ERR_DEPRECATED);return r&&!T3[u]&&(T3[u]=!0,console.warn(n(u," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,u,m):!0}};function dM(e,t,r){if(typeof e!="object")throw new _e("options must be an object",_e.ERR_BAD_OPTION_VALUE);let i=Object.keys(e),n=i.length;for(;n-- >0;){let o=i[n],u=t[o];if(u){let m=e[o],_=m===void 0||u(m,o,e);if(_!==!0)throw new _e("option "+o+" must be "+_,_e.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new _e("Unknown option "+o,_e.ERR_BAD_OPTION)}}var Mh={assertOptions:dM,validators:vg};var io=Mh.validators,gu=class{constructor(t){this.defaults=t,this.interceptors={request:new jv,response:new jv}}async request(t,r){try{return await this._request(t,r)}catch(i){if(i instanceof Error){let n;Error.captureStackTrace?Error.captureStackTrace(n={}):n=new Error;let o=n.stack?n.stack.replace(/^.+\n/,""):"";i.stack?o&&!String(i.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(i.stack+=`
36
+ `+o):i.stack=o}throw i}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=oa(this.defaults,r);let{transitional:i,paramsSerializer:n,headers:o}=r;i!==void 0&&Mh.assertOptions(i,{silentJSONParsing:io.transitional(io.boolean),forcedJSONParsing:io.transitional(io.boolean),clarifyTimeoutError:io.transitional(io.boolean)},!1),n!=null&&(z.isFunction(n)?r.paramsSerializer={serialize:n}:Mh.assertOptions(n,{encode:io.function,serialize:io.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let u=o&&z.merge(o.common,o[r.method]);o&&z.forEach(["delete","get","head","post","put","patch","common"],B=>{delete o[B]}),r.headers=Kr.concat(u,o);let m=[],_=!0;this.interceptors.request.forEach(function(U){typeof U.runWhen=="function"&&U.runWhen(r)===!1||(_=_&&U.synchronous,m.unshift(U.fulfilled,U.rejected))});let w=[];this.interceptors.response.forEach(function(U){w.push(U.fulfilled,U.rejected)});let I,T=0,N;if(!_){let B=[Bh.bind(this),void 0];for(B.unshift.apply(B,m),B.push.apply(B,w),N=B.length,I=Promise.resolve(r);T<N;)I=I.then(B[T++],B[T++]);return I}N=m.length;let C=r;for(T=0;T<N;){let B=m[T++],U=m[T++];try{C=B(C)}catch(Z){U.call(this,Z);break}}try{I=Bh.call(this,C)}catch(B){return Promise.reject(B)}for(T=0,N=w.length;T<N;)I=I.then(w[T++],w[T++]);return I}getUri(t){t=oa(this.defaults,t);let r=Xo(t.baseURL,t.url);return Zo(r,t.params,t.paramsSerializer)}};z.forEach(["delete","get","head","options"],function(t){gu.prototype[t]=function(r,i){return this.request(oa(i||{},{method:t,url:r,data:(i||{}).data}))}});z.forEach(["post","put","patch"],function(t){function r(i){return function(o,u,m){return this.request(oa(m||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:o,data:u}))}}gu.prototype[t]=r(),gu.prototype[t+"Form"]=r(!0)});var Df=gu;var gg=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});let i=this;this.promise.then(n=>{if(!i._listeners)return;let o=i._listeners.length;for(;o-- >0;)i._listeners[o](n);i._listeners=null}),this.promise.then=n=>{let o,u=new Promise(m=>{i.subscribe(m),o=m}).then(n);return u.cancel=function(){i.unsubscribe(o)},u},t(function(o,u,m){i.reason||(i.reason=new zn(o,u,m),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new e(function(n){t=n}),cancel:t}}},R3=gg;function xg(e){return function(r){return e.apply(null,r)}}function bg(e){return z.isObject(e)&&e.isAxiosError===!0}var _g={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(_g).forEach(([e,t])=>{_g[t]=e});var A3=_g;function O3(e){let t=new Df(e),r=If(Df.prototype.request,t);return z.extend(r,Df.prototype,t,{allOwnKeys:!0}),z.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return O3(oa(e,n))},r}var qr=O3(du);qr.Axios=Df;qr.CanceledError=zn;qr.CancelToken=R3;qr.isCancel=kf;qr.VERSION=Qo;qr.toFormData=eo;qr.AxiosError=_e;qr.Cancel=qr.CanceledError;qr.all=function(t){return Promise.all(t)};qr.spread=xg;qr.isAxiosError=bg;qr.mergeConfig=oa;qr.AxiosHeaders=Kr;qr.formToJSON=e=>Rh(z.isHTMLForm(e)?new FormData(e):e);qr.getAdapter=Nh.getAdapter;qr.HttpStatusCode=A3;qr.default=qr;var xn=qr;var{Axios:Kz,AxiosError:Gz,CanceledError:$z,isCancel:Yz,CancelToken:Zz,VERSION:Xz,all:Jz,Cancel:Qz,isAxiosError:eV,spread:tV,toFormData:rV,AxiosHeaders:iV,HttpStatusCode:nV,formToJSON:sV,getAdapter:aV,mergeConfig:oV}=xn;function xu(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function mM(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}function vM(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Ch(e,...t){if(!vM(e))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function gM(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");xu(e.outputLen),xu(e.blockLen)}function Lh(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")}function yg(e,t){Ch(e);let r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}var xM={number:xu,bool:mM,bytes:Ch,hash:gM,exists:Lh,output:yg},Uh=xM;var Dh=BigInt(4294967295),k3=BigInt(32);function bM(e,t=!1){return t?{h:Number(e&Dh),l:Number(e>>k3&Dh)}:{h:Number(e>>k3&Dh)|0,l:Number(e&Dh)|0}}function P3(e,t=!1){let r=new Uint32Array(e.length),i=new Uint32Array(e.length);for(let n=0;n<e.length;n++){let{h:o,l:u}=bM(e[n],t);[r[n],i[n]]=[o,u]}return[r,i]}var N3=(e,t,r)=>e<<r|t>>>32-r,B3=(e,t,r)=>t<<r|e>>>32-r,M3=(e,t,r)=>t<<r-32|e>>>64-r,C3=(e,t,r)=>e<<r-32|t>>>64-r;var L3=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));function _M(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}var yM=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!yM)throw new Error("Non little-endian hardware is not supported");function bu(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function Fh(e){if(typeof e=="string"&&(e=bu(e)),!_M(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}var qh=class{clone(){return this._cloneInto()}},lV={}.toString;function U3(e){let t=i=>e().update(Fh(i)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function D3(e){let t=(i,n)=>e(n).update(Fh(i)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=i=>e(i),t}var[H3,z3,V3]=[[],[],[]],wM=BigInt(0),qf=BigInt(1),SM=BigInt(2),EM=BigInt(7),IM=BigInt(256),TM=BigInt(113);for(let e=0,t=qf,r=1,i=0;e<24;e++){[r,i]=[i,(2*r+3*i)%5],H3.push(2*(5*i+r)),z3.push((e+1)*(e+2)/2%64);let n=wM;for(let o=0;o<7;o++)t=(t<<qf^(t>>EM)*TM)%IM,t&SM&&(n^=qf<<(qf<<BigInt(o))-qf);V3.push(n)}var[RM,AM]=P3(V3,!0),q3=(e,t,r)=>r>32?M3(e,t,r):N3(e,t,r),F3=(e,t,r)=>r>32?C3(e,t,r):B3(e,t,r);function OM(e,t=24){let r=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let u=0;u<10;u++)r[u]=e[u]^e[u+10]^e[u+20]^e[u+30]^e[u+40];for(let u=0;u<10;u+=2){let m=(u+8)%10,_=(u+2)%10,w=r[_],I=r[_+1],T=q3(w,I,1)^r[m],N=F3(w,I,1)^r[m+1];for(let C=0;C<50;C+=10)e[u+C]^=T,e[u+C+1]^=N}let n=e[2],o=e[3];for(let u=0;u<24;u++){let m=z3[u],_=q3(n,o,m),w=F3(n,o,m),I=H3[u];n=e[I],o=e[I+1],e[I]=_,e[I+1]=w}for(let u=0;u<50;u+=10){for(let m=0;m<10;m++)r[m]=e[u+m];for(let m=0;m<10;m++)e[u+m]^=~r[(m+2)%10]&r[(m+4)%10]}e[0]^=RM[i],e[1]^=AM[i]}r.fill(0)}var Hh=class e extends qh{constructor(t,r,i,n=!1,o=24){if(super(),this.blockLen=t,this.suffix=r,this.outputLen=i,this.enableXOF=n,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,xu(i),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=L3(this.state)}keccak(){OM(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){Lh(this);let{blockLen:r,state:i}=this;t=Fh(t);let n=t.length;for(let o=0;o<n;){let u=Math.min(r-this.pos,n-o);for(let m=0;m<u;m++)i[this.pos++]^=t[o++];this.pos===r&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:t,suffix:r,pos:i,blockLen:n}=this;t[i]^=r,r&128&&i===n-1&&this.keccak(),t[n-1]^=128,this.keccak()}writeInto(t){Lh(this,!1),Ch(t),this.finish();let r=this.state,{blockLen:i}=this;for(let n=0,o=t.length;n<o;){this.posOut>=i&&this.keccak();let u=Math.min(i-this.posOut,o-n);t.set(r.subarray(this.posOut,this.posOut+u),n),this.posOut+=u,n+=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 xu(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(yg(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){let{blockLen:r,suffix:i,outputLen:n,rounds:o,enableXOF:u}=this;return t||(t=new e(r,i,n,u,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=i,t.outputLen=n,t.enableXOF=u,t.destroyed=this.destroyed,t}},no=(e,t,r)=>U3(()=>new Hh(t,e,r)),vV=no(6,144,224/8),gV=no(6,136,256/8),xV=no(6,104,384/8),bV=no(6,72,512/8),j3=no(1,144,224/8),wg=no(1,136,256/8),W3=no(1,104,384/8),K3=no(1,72,512/8),G3=(e,t,r)=>D3((i={})=>new Hh(t,e,i.dkLen===void 0?r:i.dkLen,!0)),_V=G3(31,168,128/8),yV=G3(31,136,256/8);var TV=Uh.bool,RV=Uh.bytes;function Ff(e){return t=>(Uh.bytes(t),e(t))}var AV=(()=>{let e=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0,t=typeof module<"u"&&typeof module.require=="function"&&module.require.bind(module);return{node:t&&!e?t("crypto"):void 0,web:e}})();var BV=Ff(j3),Hf=(()=>{let e=Ff(wg);return e.create=wg.create,e})(),MV=Ff(W3),CV=Ff(K3);var Gr=class extends Error{constructor(t,r){super(t),this.innerError=r,this.name=this.constructor.name,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(new.target.constructor):this.stack=new Error().stack}static convertToString(t,r=!1){if(t==null)return"undefined";let i=JSON.stringify(t,(n,o)=>typeof o=="bigint"?o.toString():o);return r&&["bigint","string"].includes(typeof t)?i.replace(/['\\"]+/g,""):i}toJSON(){return{name:this.name,code:this.code,message:this.message,innerError:this.innerError}}},ca=class extends Gr{constructor(t,r){super(`Invalid value given "${Gr.convertToString(t,!0)}". Error: ${r}.`),this.name=this.constructor.name}};var so=class extends ca{constructor(t){super(t,"can not parse as byte data"),this.code=1002}},zf=class extends ca{constructor(t){super(t,"can not parse as number data"),this.code=1003}};var zh=class extends ca{constructor(t){super(t,"can not be converted to hex"),this.code=1006}};var $3="An Rpc error has occured with a code of *code*",$i={[-32700]:{message:"Parse error",description:"Invalid JSON"},[-32600]:{message:"Invalid request",description:"JSON is not a valid request object "},[-32601]:{message:"Method not found",description:"Method does not exist "},[-32602]:{message:"Invalid params",description:"Invalid method parameters"},[-32603]:{message:"Internal error",description:"Internal JSON-RPC error"},[-32e3]:{message:"Invalid input",description:"Missing or invalid parameters"},[-32001]:{message:"Resource not found",description:"Requested resource not found"},[-32002]:{message:"Resource unavailable",description:"Requested resource not available"},[-32003]:{message:"Transaction rejected",description:"Transaction creation failed"},[-32004]:{message:"Method not supported",description:"Method is not implemented"},[-32005]:{message:"Limit exceeded",description:"Request exceeds defined limit"},[-32006]:{message:"JSON-RPC version not supported",description:"Version of JSON-RPC protocol is not supported"},[4001]:{name:"User Rejected Request",message:"The user rejected the request."},[4100]:{name:"Unauthorized",message:"The requested method and/or account has not been authorized by the user."},[4200]:{name:"Unsupported Method",message:"The Provider does not support the requested method."},[4900]:{name:"Disconnected",message:"The Provider is disconnected from all chains."},[4901]:{name:"Chain Disconnected",message:"The Provider is not connected to the requested chain."},"0-999":{name:"",message:"Not used."},1e3:{name:"Normal Closure",message:"The connection successfully completed the purpose for which it was created."},1001:{name:"Going Away",message:"The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection."},1002:{name:"Protocol error",message:"The endpoint is terminating the connection due to a protocol error."},1003:{name:"Unsupported Data",message:"The connection is being terminated because the endpoint received data of a type it cannot accept. (For example, a text-only endpoint received binary data.)"},1004:{name:"Reserved",message:"Reserved. A meaning might be defined in the future."},1005:{name:"No Status Rcvd",message:"Reserved. Indicates that no status code was provided even though one was expected."},1006:{name:"Abnormal Closure",message:"Reserved. Indicates that a connection was closed abnormally (that is, with no close frame being sent) when a status code is expected."},1007:{name:"Invalid frame payload data",message:"The endpoint is terminating the connection because a message was received that contained inconsistent data (e.g., non-UTF-8 data within a text message)."},1008:{name:"Policy Violation",message:"The endpoint is terminating the connection because it received a message that violates its policy. This is a generic status code, used when codes 1003 and 1009 are not suitable."},1009:{name:"Message Too Big",message:"The endpoint is terminating the connection because a data frame was received that is too large."},1010:{name:"Mandatory Ext.",message:"The client is terminating the connection because it expected the server to negotiate one or more extension, but the server didn't."},1011:{name:"Internal Error",message:"The server is terminating the connection because it encountered an unexpected condition that prevented it from fulfilling the request."},1012:{name:"Service Restart",message:"The server is terminating the connection because it is restarting."},1013:{name:"Try Again Later",message:"The server is terminating the connection due to a temporary condition, e.g. it is overloaded and is casting off some of its clients."},1014:{name:"Bad Gateway",message:"The server was acting as a gateway or proxy and received an invalid response from the upstream server. This is similar to 502 HTTP Status Code."},1015:{name:"TLS handshake",message:"Reserved. Indicates that the connection was closed due to a failure to perform a TLS handshake (e.g., the server certificate can't be verified)."},"1016-2999":{name:"",message:"For definition by future revisions of the WebSocket Protocol specification, and for definition by extension specifications."},"3000-3999":{name:"",message:"For use by libraries, frameworks, and applications. These status codes are registered directly with IANA. The interpretation of these codes is undefined by the WebSocket protocol."},"4000-4999":{name:"",message:"For private use, and thus can't be registered. Such codes can be used by prior agreements between WebSocket applications. The interpretation of these codes is undefined by the WebSocket protocol."}};var Mi=class extends Gr{constructor(t,r){super(r??$3.replace("*code*",t.error.code.toString())),this.code=t.error.code,this.id=t.id,this.jsonrpc=t.jsonrpc,this.jsonRpcError=t.error}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{error:this.jsonRpcError,id:this.id,jsonRpc:this.jsonrpc})}};var Sg=class extends Mi{constructor(t){super(t,$i[-32700].message),this.code=-32700}},Eg=class extends Mi{constructor(t){super(t,$i[-32600].message),this.code=-32600}},Ig=class extends Mi{constructor(t){super(t,$i[-32601].message),this.code=-32601}},Tg=class extends Mi{constructor(t){super(t,$i[-32602].message),this.code=-32602}},Rg=class extends Mi{constructor(t){super(t,$i[-32603].message),this.code=-32603}},Ag=class extends Mi{constructor(t){super(t,$i[-32e3].message),this.code=-32e3}},Og=class extends Mi{constructor(t){super(t,$i[-32004].message),this.code=-32004}},kg=class extends Mi{constructor(t){super(t,$i[-32002].message),this.code=-32002}},Pg=class extends Mi{constructor(t){super(t,$i[-32001].message),this.code=-32001}},Ng=class extends Mi{constructor(t){super(t,$i[-32006].message),this.code=-32006}},Bg=class extends Mi{constructor(t){super(t,$i[-32003].message),this.code=-32003}},Mg=class extends Mi{constructor(t){super(t,$i[-32005].message),this.code=-32005}},Yi=new Map;Yi.set(-32700,{error:Sg});Yi.set(-32600,{error:Eg});Yi.set(-32601,{error:Ig});Yi.set(-32602,{error:Tg});Yi.set(-32603,{error:Rg});Yi.set(-32e3,{error:Ag});Yi.set(-32004,{error:Og});Yi.set(-32002,{error:kg});Yi.set(-32003,{error:Bg});Yi.set(-32001,{error:Pg});Yi.set(-32006,{error:Ng});Yi.set(-32005,{error:Mg});var Vh=class extends Gr{constructor(t){super(`Format for the type ${t} is unsupported`),this.type=t,this.code=1200}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{type:this.type})}};var Et;(function(e){e.assertEqual=n=>n;function t(n){}e.assertIs=t;function r(n){throw new Error}e.assertNever=r,e.arrayToEnum=n=>{let o={};for(let u of n)o[u]=u;return o},e.getValidEnumValues=n=>{let o=e.objectKeys(n).filter(m=>typeof n[n[m]]!="number"),u={};for(let m of o)u[m]=n[m];return e.objectValues(u)},e.objectValues=n=>e.objectKeys(n).map(function(o){return n[o]}),e.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{let o=[];for(let u in n)Object.prototype.hasOwnProperty.call(n,u)&&o.push(u);return o},e.find=(n,o)=>{for(let u of n)if(o(u))return u},e.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&isFinite(n)&&Math.floor(n)===n;function i(n,o=" | "){return n.map(u=>typeof u=="string"?`'${u}'`:u).join(o)}e.joinValues=i,e.jsonStringifyReplacer=(n,o)=>typeof o=="bigint"?o.toString():o})(Et||(Et={}));var Lg;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Lg||(Lg={}));var ve=Et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ao=e=>{switch(typeof e){case"undefined":return ve.undefined;case"string":return ve.string;case"number":return isNaN(e)?ve.nan:ve.number;case"boolean":return ve.boolean;case"function":return ve.function;case"bigint":return ve.bigint;case"symbol":return ve.symbol;case"object":return Array.isArray(e)?ve.array:e===null?ve.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ve.promise:typeof Map<"u"&&e instanceof Map?ve.map:typeof Set<"u"&&e instanceof Set?ve.set:typeof Date<"u"&&e instanceof Date?ve.date:ve.object;default:return ve.unknown}},fe=Et.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),FM=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Zi=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let r=t||function(o){return o.message},i={_errors:[]},n=o=>{for(let u of o.issues)if(u.code==="invalid_union")u.unionErrors.map(n);else if(u.code==="invalid_return_type")n(u.returnTypeError);else if(u.code==="invalid_arguments")n(u.argumentsError);else if(u.path.length===0)i._errors.push(r(u));else{let m=i,_=0;for(;_<u.path.length;){let w=u.path[_];_===u.path.length-1?(m[w]=m[w]||{_errors:[]},m[w]._errors.push(r(u))):m[w]=m[w]||{_errors:[]},m=m[w],_++}}};return n(this),i}toString(){return this.message}get message(){return JSON.stringify(this.issues,Et.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){let r={},i=[];for(let n of this.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):i.push(t(n));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}};Zi.create=e=>new Zi(e);var tl=(e,t)=>{let r;switch(e.code){case fe.invalid_type:e.received===ve.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case fe.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Et.jsonStringifyReplacer)}`;break;case fe.unrecognized_keys:r=`Unrecognized key(s) in object: ${Et.joinValues(e.keys,", ")}`;break;case fe.invalid_union:r="Invalid input";break;case fe.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Et.joinValues(e.options)}`;break;case fe.invalid_enum_value:r=`Invalid enum value. Expected ${Et.joinValues(e.options)}, received '${e.received}'`;break;case fe.invalid_arguments:r="Invalid function arguments";break;case fe.invalid_return_type:r="Invalid function return type";break;case fe.invalid_date:r="Invalid date";break;case fe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Et.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case fe.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case fe.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case fe.custom:r="Invalid input";break;case fe.invalid_intersection_types:r="Intersection results could not be merged";break;case fe.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case fe.not_finite:r="Number must be finite";break;default:r=t.defaultError,Et.assertNever(e)}return{message:r}},X3=tl;function HM(e){X3=e}function Wh(){return X3}var Kh=e=>{let{data:t,path:r,errorMaps:i,issueData:n}=e,o=[...r,...n.path||[]],u={...n,path:o},m="",_=i.filter(w=>!!w).slice().reverse();for(let w of _)m=w(u,{data:t,defaultError:m}).message;return{...n,path:o,message:n.message||m}},zM=[];function be(e,t){let r=Kh({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Wh(),tl].filter(i=>!!i)});e.common.issues.push(r)}var hi=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){let i=[];for(let n of r){if(n.status==="aborted")return ze;n.status==="dirty"&&t.dirty(),i.push(n.value)}return{status:t.value,value:i}}static async mergeObjectAsync(t,r){let i=[];for(let n of r)i.push({key:await n.key,value:await n.value});return e.mergeObjectSync(t,i)}static mergeObjectSync(t,r){let i={};for(let n of r){let{key:o,value:u}=n;if(o.status==="aborted"||u.status==="aborted")return ze;o.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof u.value<"u"||n.alwaysSet)&&(i[o.value]=u.value)}return{status:t.value,value:i}}},ze=Object.freeze({status:"aborted"}),J3=e=>({status:"dirty",value:e}),yi=e=>({status:"valid",value:e}),Ug=e=>e.status==="aborted",Dg=e=>e.status==="dirty",rl=e=>e.status==="valid",Gh=e=>typeof Promise<"u"&&e instanceof Promise,Ae;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ae||(Ae={}));var bn=class{constructor(t,r,i,n){this._cachedPath=[],this.parent=t,this.data=r,this._path=i,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},Y3=(e,t)=>{if(rl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let r=new Zi(e.common.issues);return this._error=r,this._error}}};function it(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:i,description:n}=e;if(t&&(r||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:n}:{errorMap:(u,m)=>u.code!=="invalid_type"?{message:m.defaultError}:typeof m.data>"u"?{message:i??m.defaultError}:{message:r??m.defaultError},description:n}}var nt=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return ao(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:ao(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new hi,ctx:{common:t.parent.common,data:t.data,parsedType:ao(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let r=this._parse(t);if(Gh(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){let r=this._parse(t);return Promise.resolve(r)}parse(t,r){let i=this.safeParse(t,r);if(i.success)return i.data;throw i.error}safeParse(t,r){var i;let n={common:{issues:[],async:(i=r?.async)!==null&&i!==void 0?i:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ao(t)},o=this._parseSync({data:t,path:n.path,parent:n});return Y3(n,o)}async parseAsync(t,r){let i=await this.safeParseAsync(t,r);if(i.success)return i.data;throw i.error}async safeParseAsync(t,r){let i={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ao(t)},n=this._parse({data:t,path:i.path,parent:i}),o=await(Gh(n)?n:Promise.resolve(n));return Y3(i,o)}refine(t,r){let i=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,o)=>{let u=t(n),m=()=>o.addIssue({code:fe.custom,...i(n)});return typeof Promise<"u"&&u instanceof Promise?u.then(_=>_?!0:(m(),!1)):u?!0:(m(),!1)})}refinement(t,r){return this._refinement((i,n)=>t(i)?!0:(n.addIssue(typeof r=="function"?r(i,n):r),!1))}_refinement(t){return new Xi({schema:this,typeName:Ne.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Vn.create(this,this._def)}nullable(){return la.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return fa.create(this,this._def)}promise(){return uo.create(this,this._def)}or(t){return oc.create([this,t],this._def)}and(t){return cc.create(this,t,this._def)}transform(t){return new Xi({...it(this._def),schema:this,typeName:Ne.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let r=typeof t=="function"?t:()=>t;return new hc({...it(this._def),innerType:this,defaultValue:r,typeName:Ne.ZodDefault})}brand(){return new Xh({typeName:Ne.ZodBranded,type:this,...it(this._def)})}catch(t){let r=typeof t=="function"?t:()=>t;return new Iu({...it(this._def),innerType:this,catchValue:r,typeName:Ne.ZodCatch})}describe(t){let r=this.constructor;return new r({...this._def,description:t})}pipe(t){return il.create(this,t)}readonly(){return Ru.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},VM=/^c[^\s-]{8,}$/i,jM=/^[a-z][a-z0-9]*$/,WM=/^[0-9A-HJKMNP-TV-Z]{26}$/,KM=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,GM=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,$M="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",Cg,YM=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,ZM=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,XM=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function JM(e,t){return!!((t==="v4"||!t)&&YM.test(e)||(t==="v6"||!t)&&ZM.test(e))}var oo=class e extends nt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ve.string){let o=this._getOrReturnCtx(t);return be(o,{code:fe.invalid_type,expected:ve.string,received:o.parsedType}),ze}let i=new hi,n;for(let o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(n=this._getOrReturnCtx(t,n),be(n,{code:fe.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="max")t.data.length>o.value&&(n=this._getOrReturnCtx(t,n),be(n,{code:fe.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),i.dirty());else if(o.kind==="length"){let u=t.data.length>o.value,m=t.data.length<o.value;(u||m)&&(n=this._getOrReturnCtx(t,n),u?be(n,{code:fe.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):m&&be(n,{code:fe.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),i.dirty())}else if(o.kind==="email")GM.test(t.data)||(n=this._getOrReturnCtx(t,n),be(n,{validation:"email",code:fe.invalid_string,message:o.message}),i.dirty());else if(o.kind==="emoji")Cg||(Cg=new RegExp($M,"u")),Cg.test(t.data)||(n=this._getOrReturnCtx(t,n),be(n,{validation:"emoji",code:fe.invalid_string,message:o.message}),i.dirty());else if(o.kind==="uuid")KM.test(t.data)||(n=this._getOrReturnCtx(t,n),be(n,{validation:"uuid",code:fe.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid")VM.test(t.data)||(n=this._getOrReturnCtx(t,n),be(n,{validation:"cuid",code:fe.invalid_string,message:o.message}),i.dirty());else if(o.kind==="cuid2")jM.test(t.data)||(n=this._getOrReturnCtx(t,n),be(n,{validation:"cuid2",code:fe.invalid_string,message:o.message}),i.dirty());else if(o.kind==="ulid")WM.test(t.data)||(n=this._getOrReturnCtx(t,n),be(n,{validation:"ulid",code:fe.invalid_string,message:o.message}),i.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{n=this._getOrReturnCtx(t,n),be(n,{validation:"url",code:fe.invalid_string,message:o.message}),i.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(n=this._getOrReturnCtx(t,n),be(n,{validation:"regex",code:fe.invalid_string,message:o.message}),i.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(n=this._getOrReturnCtx(t,n),be(n,{code:fe.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),i.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(n=this._getOrReturnCtx(t,n),be(n,{code:fe.invalid_string,validation:{startsWith:o.value},message:o.message}),i.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(n=this._getOrReturnCtx(t,n),be(n,{code:fe.invalid_string,validation:{endsWith:o.value},message:o.message}),i.dirty()):o.kind==="datetime"?XM(o).test(t.data)||(n=this._getOrReturnCtx(t,n),be(n,{code:fe.invalid_string,validation:"datetime",message:o.message}),i.dirty()):o.kind==="ip"?JM(t.data,o.version)||(n=this._getOrReturnCtx(t,n),be(n,{validation:"ip",code:fe.invalid_string,message:o.message}),i.dirty()):Et.assertNever(o);return{status:i.value,value:t.data}}_regex(t,r,i){return this.refinement(n=>t.test(n),{validation:r,code:fe.invalid_string,...Ae.errToObj(i)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ae.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ae.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ae.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ae.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ae.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ae.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ae.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ae.errToObj(t)})}datetime(t){var r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(r=t?.offset)!==null&&r!==void 0?r:!1,...Ae.errToObj(t?.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ae.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r?.position,...Ae.errToObj(r?.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ae.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ae.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ae.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ae.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ae.errToObj(r)})}nonempty(t){return this.min(1,Ae.errToObj(t))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};oo.create=e=>{var t;return new oo({checks:[],typeName:Ne.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...it(e)})};function QM(e,t){let r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=r>i?r:i,o=parseInt(e.toFixed(n).replace(".","")),u=parseInt(t.toFixed(n).replace(".",""));return o%u/Math.pow(10,n)}var tc=class e extends nt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ve.number){let o=this._getOrReturnCtx(t);return be(o,{code:fe.invalid_type,expected:ve.number,received:o.parsedType}),ze}let i,n=new hi;for(let o of this._def.checks)o.kind==="int"?Et.isInteger(t.data)||(i=this._getOrReturnCtx(t,i),be(i,{code:fe.invalid_type,expected:"integer",received:"float",message:o.message}),n.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(i=this._getOrReturnCtx(t,i),be(i,{code:fe.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(i=this._getOrReturnCtx(t,i),be(i,{code:fe.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="multipleOf"?QM(t.data,o.value)!==0&&(i=this._getOrReturnCtx(t,i),be(i,{code:fe.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(i=this._getOrReturnCtx(t,i),be(i,{code:fe.not_finite,message:o.message}),n.dirty()):Et.assertNever(o);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ae.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ae.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ae.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ae.toString(r))}setLimit(t,r,i,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:i,message:Ae.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ae.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ae.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ae.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ae.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ae.toString(t)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Et.isInteger(t.value))}get isFinite(){let t=null,r=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(t===null||i.value<t)&&(t=i.value)}return Number.isFinite(r)&&Number.isFinite(t)}};tc.create=e=>new tc({checks:[],typeName:Ne.ZodNumber,coerce:e?.coerce||!1,...it(e)});var rc=class e extends nt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ve.bigint){let o=this._getOrReturnCtx(t);return be(o,{code:fe.invalid_type,expected:ve.bigint,received:o.parsedType}),ze}let i,n=new hi;for(let o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(i=this._getOrReturnCtx(t,i),be(i,{code:fe.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(i=this._getOrReturnCtx(t,i),be(i,{code:fe.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(i=this._getOrReturnCtx(t,i),be(i,{code:fe.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):Et.assertNever(o);return{status:n.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ae.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ae.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ae.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ae.toString(r))}setLimit(t,r,i,n){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:i,message:Ae.toString(n)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ae.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ae.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ae.toString(r)})}get minValue(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}};rc.create=e=>{var t;return new rc({checks:[],typeName:Ne.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...it(e)})};var ic=class extends nt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ve.boolean){let i=this._getOrReturnCtx(t);return be(i,{code:fe.invalid_type,expected:ve.boolean,received:i.parsedType}),ze}return yi(t.data)}};ic.create=e=>new ic({typeName:Ne.ZodBoolean,coerce:e?.coerce||!1,...it(e)});var nc=class e extends nt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ve.date){let o=this._getOrReturnCtx(t);return be(o,{code:fe.invalid_type,expected:ve.date,received:o.parsedType}),ze}if(isNaN(t.data.getTime())){let o=this._getOrReturnCtx(t);return be(o,{code:fe.invalid_date}),ze}let i=new hi,n;for(let o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(n=this._getOrReturnCtx(t,n),be(n,{code:fe.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),i.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(n=this._getOrReturnCtx(t,n),be(n,{code:fe.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),i.dirty()):Et.assertNever(o);return{status:i.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ae.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ae.toString(r)})}get minDate(){let t=null;for(let r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}};nc.create=e=>new nc({checks:[],coerce:e?.coerce||!1,typeName:Ne.ZodDate,...it(e)});var yu=class extends nt{_parse(t){if(this._getType(t)!==ve.symbol){let i=this._getOrReturnCtx(t);return be(i,{code:fe.invalid_type,expected:ve.symbol,received:i.parsedType}),ze}return yi(t.data)}};yu.create=e=>new yu({typeName:Ne.ZodSymbol,...it(e)});var sc=class extends nt{_parse(t){if(this._getType(t)!==ve.undefined){let i=this._getOrReturnCtx(t);return be(i,{code:fe.invalid_type,expected:ve.undefined,received:i.parsedType}),ze}return yi(t.data)}};sc.create=e=>new sc({typeName:Ne.ZodUndefined,...it(e)});var ac=class extends nt{_parse(t){if(this._getType(t)!==ve.null){let i=this._getOrReturnCtx(t);return be(i,{code:fe.invalid_type,expected:ve.null,received:i.parsedType}),ze}return yi(t.data)}};ac.create=e=>new ac({typeName:Ne.ZodNull,...it(e)});var co=class extends nt{constructor(){super(...arguments),this._any=!0}_parse(t){return yi(t.data)}};co.create=e=>new co({typeName:Ne.ZodAny,...it(e)});var ua=class extends nt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return yi(t.data)}};ua.create=e=>new ua({typeName:Ne.ZodUnknown,...it(e)});var jn=class extends nt{_parse(t){let r=this._getOrReturnCtx(t);return be(r,{code:fe.invalid_type,expected:ve.never,received:r.parsedType}),ze}};jn.create=e=>new jn({typeName:Ne.ZodNever,...it(e)});var wu=class extends nt{_parse(t){if(this._getType(t)!==ve.undefined){let i=this._getOrReturnCtx(t);return be(i,{code:fe.invalid_type,expected:ve.void,received:i.parsedType}),ze}return yi(t.data)}};wu.create=e=>new wu({typeName:Ne.ZodVoid,...it(e)});var fa=class e extends nt{_parse(t){let{ctx:r,status:i}=this._processInputParams(t),n=this._def;if(r.parsedType!==ve.array)return be(r,{code:fe.invalid_type,expected:ve.array,received:r.parsedType}),ze;if(n.exactLength!==null){let u=r.data.length>n.exactLength.value,m=r.data.length<n.exactLength.value;(u||m)&&(be(r,{code:u?fe.too_big:fe.too_small,minimum:m?n.exactLength.value:void 0,maximum:u?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),i.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(be(r,{code:fe.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(be(r,{code:fe.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((u,m)=>n.type._parseAsync(new bn(r,u,r.path,m)))).then(u=>hi.mergeArray(i,u));let o=[...r.data].map((u,m)=>n.type._parseSync(new bn(r,u,r.path,m)));return hi.mergeArray(i,o)}get element(){return this._def.type}min(t,r){return new e({...this._def,minLength:{value:t,message:Ae.toString(r)}})}max(t,r){return new e({...this._def,maxLength:{value:t,message:Ae.toString(r)}})}length(t,r){return new e({...this._def,exactLength:{value:t,message:Ae.toString(r)}})}nonempty(t){return this.min(1,t)}};fa.create=(e,t)=>new fa({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ne.ZodArray,...it(t)});function _u(e){if(e instanceof Ci){let t={};for(let r in e.shape){let i=e.shape[r];t[r]=Vn.create(_u(i))}return new Ci({...e._def,shape:()=>t})}else return e instanceof fa?new fa({...e._def,type:_u(e.element)}):e instanceof Vn?Vn.create(_u(e.unwrap())):e instanceof la?la.create(_u(e.unwrap())):e instanceof vs?vs.create(e.items.map(t=>_u(t))):e}var Ci=class e extends nt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),r=Et.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==ve.object){let w=this._getOrReturnCtx(t);return be(w,{code:fe.invalid_type,expected:ve.object,received:w.parsedType}),ze}let{status:i,ctx:n}=this._processInputParams(t),{shape:o,keys:u}=this._getCached(),m=[];if(!(this._def.catchall instanceof jn&&this._def.unknownKeys==="strip"))for(let w in n.data)u.includes(w)||m.push(w);let _=[];for(let w of u){let I=o[w],T=n.data[w];_.push({key:{status:"valid",value:w},value:I._parse(new bn(n,T,n.path,w)),alwaysSet:w in n.data})}if(this._def.catchall instanceof jn){let w=this._def.unknownKeys;if(w==="passthrough")for(let I of m)_.push({key:{status:"valid",value:I},value:{status:"valid",value:n.data[I]}});else if(w==="strict")m.length>0&&(be(n,{code:fe.unrecognized_keys,keys:m}),i.dirty());else if(w!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let w=this._def.catchall;for(let I of m){let T=n.data[I];_.push({key:{status:"valid",value:I},value:w._parse(new bn(n,T,n.path,I)),alwaysSet:I in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let w=[];for(let I of _){let T=await I.key;w.push({key:T,value:await I.value,alwaysSet:I.alwaysSet})}return w}).then(w=>hi.mergeObjectSync(i,w)):hi.mergeObjectSync(i,_)}get shape(){return this._def.shape()}strict(t){return Ae.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,i)=>{var n,o,u,m;let _=(u=(o=(n=this._def).errorMap)===null||o===void 0?void 0:o.call(n,r,i).message)!==null&&u!==void 0?u:i.defaultError;return r.code==="unrecognized_keys"?{message:(m=Ae.errToObj(t).message)!==null&&m!==void 0?m:_}:{message:_}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ne.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let r={};return Et.objectKeys(t).forEach(i=>{t[i]&&this.shape[i]&&(r[i]=this.shape[i])}),new e({...this._def,shape:()=>r})}omit(t){let r={};return Et.objectKeys(this.shape).forEach(i=>{t[i]||(r[i]=this.shape[i])}),new e({...this._def,shape:()=>r})}deepPartial(){return _u(this)}partial(t){let r={};return Et.objectKeys(this.shape).forEach(i=>{let n=this.shape[i];t&&!t[i]?r[i]=n:r[i]=n.optional()}),new e({...this._def,shape:()=>r})}required(t){let r={};return Et.objectKeys(this.shape).forEach(i=>{if(t&&!t[i])r[i]=this.shape[i];else{let o=this.shape[i];for(;o instanceof Vn;)o=o._def.innerType;r[i]=o}}),new e({...this._def,shape:()=>r})}keyof(){return Q3(Et.objectKeys(this.shape))}};Ci.create=(e,t)=>new Ci({shape:()=>e,unknownKeys:"strip",catchall:jn.create(),typeName:Ne.ZodObject,...it(t)});Ci.strictCreate=(e,t)=>new Ci({shape:()=>e,unknownKeys:"strict",catchall:jn.create(),typeName:Ne.ZodObject,...it(t)});Ci.lazycreate=(e,t)=>new Ci({shape:e,unknownKeys:"strip",catchall:jn.create(),typeName:Ne.ZodObject,...it(t)});var oc=class extends nt{_parse(t){let{ctx:r}=this._processInputParams(t),i=this._def.options;function n(o){for(let m of o)if(m.result.status==="valid")return m.result;for(let m of o)if(m.result.status==="dirty")return r.common.issues.push(...m.ctx.common.issues),m.result;let u=o.map(m=>new Zi(m.ctx.common.issues));return be(r,{code:fe.invalid_union,unionErrors:u}),ze}if(r.common.async)return Promise.all(i.map(async o=>{let u={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:u}),ctx:u}})).then(n);{let o,u=[];for(let _ of i){let w={...r,common:{...r.common,issues:[]},parent:null},I=_._parseSync({data:r.data,path:r.path,parent:w});if(I.status==="valid")return I;I.status==="dirty"&&!o&&(o={result:I,ctx:w}),w.common.issues.length&&u.push(w.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;let m=u.map(_=>new Zi(_));return be(r,{code:fe.invalid_union,unionErrors:m}),ze}}get options(){return this._def.options}};oc.create=(e,t)=>new oc({options:e,typeName:Ne.ZodUnion,...it(t)});var jh=e=>e instanceof uc?jh(e.schema):e instanceof Xi?jh(e.innerType()):e instanceof fc?[e.value]:e instanceof lc?e.options:e instanceof pc?Object.keys(e.enum):e instanceof hc?jh(e._def.innerType):e instanceof sc?[void 0]:e instanceof ac?[null]:null,$h=class e extends nt{_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.object)return be(r,{code:fe.invalid_type,expected:ve.object,received:r.parsedType}),ze;let i=this.discriminator,n=r.data[i],o=this.optionsMap.get(n);return o?r.common.async?o._parseAsync({data:r.data,path:r.path,parent:r}):o._parseSync({data:r.data,path:r.path,parent:r}):(be(r,{code:fe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),ze)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,i){let n=new Map;for(let o of r){let u=jh(o.shape[t]);if(!u)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let m of u){if(n.has(m))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(m)}`);n.set(m,o)}}return new e({typeName:Ne.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:n,...it(i)})}};function qg(e,t){let r=ao(e),i=ao(t);if(e===t)return{valid:!0,data:e};if(r===ve.object&&i===ve.object){let n=Et.objectKeys(t),o=Et.objectKeys(e).filter(m=>n.indexOf(m)!==-1),u={...e,...t};for(let m of o){let _=qg(e[m],t[m]);if(!_.valid)return{valid:!1};u[m]=_.data}return{valid:!0,data:u}}else if(r===ve.array&&i===ve.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let o=0;o<e.length;o++){let u=e[o],m=t[o],_=qg(u,m);if(!_.valid)return{valid:!1};n.push(_.data)}return{valid:!0,data:n}}else return r===ve.date&&i===ve.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var cc=class extends nt{_parse(t){let{status:r,ctx:i}=this._processInputParams(t),n=(o,u)=>{if(Ug(o)||Ug(u))return ze;let m=qg(o.value,u.value);return m.valid?((Dg(o)||Dg(u))&&r.dirty(),{status:r.value,value:m.data}):(be(i,{code:fe.invalid_intersection_types}),ze)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([o,u])=>n(o,u)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};cc.create=(e,t,r)=>new cc({left:e,right:t,typeName:Ne.ZodIntersection,...it(r)});var vs=class e extends nt{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==ve.array)return be(i,{code:fe.invalid_type,expected:ve.array,received:i.parsedType}),ze;if(i.data.length<this._def.items.length)return be(i,{code:fe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ze;!this._def.rest&&i.data.length>this._def.items.length&&(be(i,{code:fe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let o=[...i.data].map((u,m)=>{let _=this._def.items[m]||this._def.rest;return _?_._parse(new bn(i,u,i.path,m)):null}).filter(u=>!!u);return i.common.async?Promise.all(o).then(u=>hi.mergeArray(r,u)):hi.mergeArray(r,o)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};vs.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new vs({items:e,typeName:Ne.ZodTuple,rest:null,...it(t)})};var Yh=class e extends nt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==ve.object)return be(i,{code:fe.invalid_type,expected:ve.object,received:i.parsedType}),ze;let n=[],o=this._def.keyType,u=this._def.valueType;for(let m in i.data)n.push({key:o._parse(new bn(i,m,i.path,m)),value:u._parse(new bn(i,i.data[m],i.path,m))});return i.common.async?hi.mergeObjectAsync(r,n):hi.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(t,r,i){return r instanceof nt?new e({keyType:t,valueType:r,typeName:Ne.ZodRecord,...it(i)}):new e({keyType:oo.create(),valueType:t,typeName:Ne.ZodRecord,...it(r)})}},Su=class extends nt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==ve.map)return be(i,{code:fe.invalid_type,expected:ve.map,received:i.parsedType}),ze;let n=this._def.keyType,o=this._def.valueType,u=[...i.data.entries()].map(([m,_],w)=>({key:n._parse(new bn(i,m,i.path,[w,"key"])),value:o._parse(new bn(i,_,i.path,[w,"value"]))}));if(i.common.async){let m=new Map;return Promise.resolve().then(async()=>{for(let _ of u){let w=await _.key,I=await _.value;if(w.status==="aborted"||I.status==="aborted")return ze;(w.status==="dirty"||I.status==="dirty")&&r.dirty(),m.set(w.value,I.value)}return{status:r.value,value:m}})}else{let m=new Map;for(let _ of u){let w=_.key,I=_.value;if(w.status==="aborted"||I.status==="aborted")return ze;(w.status==="dirty"||I.status==="dirty")&&r.dirty(),m.set(w.value,I.value)}return{status:r.value,value:m}}}};Su.create=(e,t,r)=>new Su({valueType:t,keyType:e,typeName:Ne.ZodMap,...it(r)});var Eu=class e extends nt{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.parsedType!==ve.set)return be(i,{code:fe.invalid_type,expected:ve.set,received:i.parsedType}),ze;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&(be(i,{code:fe.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&(be(i,{code:fe.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());let o=this._def.valueType;function u(_){let w=new Set;for(let I of _){if(I.status==="aborted")return ze;I.status==="dirty"&&r.dirty(),w.add(I.value)}return{status:r.value,value:w}}let m=[...i.data.values()].map((_,w)=>o._parse(new bn(i,_,i.path,w)));return i.common.async?Promise.all(m).then(_=>u(_)):u(m)}min(t,r){return new e({...this._def,minSize:{value:t,message:Ae.toString(r)}})}max(t,r){return new e({...this._def,maxSize:{value:t,message:Ae.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}};Eu.create=(e,t)=>new Eu({valueType:e,minSize:null,maxSize:null,typeName:Ne.ZodSet,...it(t)});var Zh=class e extends nt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.function)return be(r,{code:fe.invalid_type,expected:ve.function,received:r.parsedType}),ze;function i(m,_){return Kh({data:m,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Wh(),tl].filter(w=>!!w),issueData:{code:fe.invalid_arguments,argumentsError:_}})}function n(m,_){return Kh({data:m,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Wh(),tl].filter(w=>!!w),issueData:{code:fe.invalid_return_type,returnTypeError:_}})}let o={errorMap:r.common.contextualErrorMap},u=r.data;if(this._def.returns instanceof uo){let m=this;return yi(async function(..._){let w=new Zi([]),I=await m._def.args.parseAsync(_,o).catch(C=>{throw w.addIssue(i(_,C)),w}),T=await Reflect.apply(u,this,I);return await m._def.returns._def.type.parseAsync(T,o).catch(C=>{throw w.addIssue(n(T,C)),w})})}else{let m=this;return yi(function(..._){let w=m._def.args.safeParse(_,o);if(!w.success)throw new Zi([i(_,w.error)]);let I=Reflect.apply(u,this,w.data),T=m._def.returns.safeParse(I,o);if(!T.success)throw new Zi([n(I,T.error)]);return T.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:vs.create(t).rest(ua.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,i){return new e({args:t||vs.create([]).rest(ua.create()),returns:r||ua.create(),typeName:Ne.ZodFunction,...it(i)})}},uc=class extends nt{get schema(){return this._def.getter()}_parse(t){let{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};uc.create=(e,t)=>new uc({getter:e,typeName:Ne.ZodLazy,...it(t)});var fc=class extends nt{_parse(t){if(t.data!==this._def.value){let r=this._getOrReturnCtx(t);return be(r,{received:r.data,code:fe.invalid_literal,expected:this._def.value}),ze}return{status:"valid",value:t.data}}get value(){return this._def.value}};fc.create=(e,t)=>new fc({value:e,typeName:Ne.ZodLiteral,...it(t)});function Q3(e,t){return new lc({values:e,typeName:Ne.ZodEnum,...it(t)})}var lc=class e extends nt{_parse(t){if(typeof t.data!="string"){let r=this._getOrReturnCtx(t),i=this._def.values;return be(r,{expected:Et.joinValues(i),received:r.parsedType,code:fe.invalid_type}),ze}if(this._def.values.indexOf(t.data)===-1){let r=this._getOrReturnCtx(t),i=this._def.values;return be(r,{received:r.data,code:fe.invalid_enum_value,options:i}),ze}return yi(t.data)}get options(){return this._def.values}get enum(){let t={};for(let r of this._def.values)t[r]=r;return t}get Values(){let t={};for(let r of this._def.values)t[r]=r;return t}get Enum(){let t={};for(let r of this._def.values)t[r]=r;return t}extract(t){return e.create(t)}exclude(t){return e.create(this.options.filter(r=>!t.includes(r)))}};lc.create=Q3;var pc=class extends nt{_parse(t){let r=Et.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(t);if(i.parsedType!==ve.string&&i.parsedType!==ve.number){let n=Et.objectValues(r);return be(i,{expected:Et.joinValues(n),received:i.parsedType,code:fe.invalid_type}),ze}if(r.indexOf(t.data)===-1){let n=Et.objectValues(r);return be(i,{received:i.data,code:fe.invalid_enum_value,options:n}),ze}return yi(t.data)}get enum(){return this._def.values}};pc.create=(e,t)=>new pc({values:e,typeName:Ne.ZodNativeEnum,...it(t)});var uo=class extends nt{unwrap(){return this._def.type}_parse(t){let{ctx:r}=this._processInputParams(t);if(r.parsedType!==ve.promise&&r.common.async===!1)return be(r,{code:fe.invalid_type,expected:ve.promise,received:r.parsedType}),ze;let i=r.parsedType===ve.promise?r.data:Promise.resolve(r.data);return yi(i.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};uo.create=(e,t)=>new uo({type:e,typeName:Ne.ZodPromise,...it(t)});var Xi=class extends nt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:r,ctx:i}=this._processInputParams(t),n=this._def.effect||null,o={addIssue:u=>{be(i,u),u.fatal?r.abort():r.dirty()},get path(){return i.path}};if(o.addIssue=o.addIssue.bind(o),n.type==="preprocess"){let u=n.transform(i.data,o);return i.common.issues.length?{status:"dirty",value:i.data}:i.common.async?Promise.resolve(u).then(m=>this._def.schema._parseAsync({data:m,path:i.path,parent:i})):this._def.schema._parseSync({data:u,path:i.path,parent:i})}if(n.type==="refinement"){let u=m=>{let _=n.refinement(m,o);if(i.common.async)return Promise.resolve(_);if(_ instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return m};if(i.common.async===!1){let m=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return m.status==="aborted"?ze:(m.status==="dirty"&&r.dirty(),u(m.value),{status:r.value,value:m.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(m=>m.status==="aborted"?ze:(m.status==="dirty"&&r.dirty(),u(m.value).then(()=>({status:r.value,value:m.value}))))}if(n.type==="transform")if(i.common.async===!1){let u=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!rl(u))return u;let m=n.transform(u.value,o);if(m instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:m}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(u=>rl(u)?Promise.resolve(n.transform(u.value,o)).then(m=>({status:r.value,value:m})):u);Et.assertNever(n)}};Xi.create=(e,t,r)=>new Xi({schema:e,typeName:Ne.ZodEffects,effect:t,...it(r)});Xi.createWithPreprocess=(e,t,r)=>new Xi({schema:t,effect:{type:"preprocess",transform:e},typeName:Ne.ZodEffects,...it(r)});var Vn=class extends nt{_parse(t){return this._getType(t)===ve.undefined?yi(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Vn.create=(e,t)=>new Vn({innerType:e,typeName:Ne.ZodOptional,...it(t)});var la=class extends nt{_parse(t){return this._getType(t)===ve.null?yi(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};la.create=(e,t)=>new la({innerType:e,typeName:Ne.ZodNullable,...it(t)});var hc=class extends nt{_parse(t){let{ctx:r}=this._processInputParams(t),i=r.data;return r.parsedType===ve.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};hc.create=(e,t)=>new hc({innerType:e,typeName:Ne.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...it(t)});var Iu=class extends nt{_parse(t){let{ctx:r}=this._processInputParams(t),i={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Gh(n)?n.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Zi(i.common.issues)},input:i.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Zi(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};Iu.create=(e,t)=>new Iu({innerType:e,typeName:Ne.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...it(t)});var Tu=class extends nt{_parse(t){if(this._getType(t)!==ve.nan){let i=this._getOrReturnCtx(t);return be(i,{code:fe.invalid_type,expected:ve.nan,received:i.parsedType}),ze}return{status:"valid",value:t.data}}};Tu.create=e=>new Tu({typeName:Ne.ZodNaN,...it(e)});var eC=Symbol("zod_brand"),Xh=class extends nt{_parse(t){let{ctx:r}=this._processInputParams(t),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}},il=class e extends nt{_parse(t){let{status:r,ctx:i}=this._processInputParams(t);if(i.common.async)return(async()=>{let o=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return o.status==="aborted"?ze:o.status==="dirty"?(r.dirty(),J3(o.value)):this._def.out._parseAsync({data:o.value,path:i.path,parent:i})})();{let n=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?ze:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:i.path,parent:i})}}static create(t,r){return new e({in:t,out:r,typeName:Ne.ZodPipeline})}},Ru=class extends nt{_parse(t){let r=this._def.innerType._parse(t);return rl(r)&&(r.value=Object.freeze(r.value)),r}};Ru.create=(e,t)=>new Ru({innerType:e,typeName:Ne.ZodReadonly,...it(t)});var eI=(e,t={},r)=>e?co.create().superRefine((i,n)=>{var o,u;if(!e(i)){let m=typeof t=="function"?t(i):typeof t=="string"?{message:t}:t,_=(u=(o=m.fatal)!==null&&o!==void 0?o:r)!==null&&u!==void 0?u:!0,w=typeof m=="string"?{message:m}:m;n.addIssue({code:"custom",...w,fatal:_})}}):co.create(),tC={object:Ci.lazycreate},Ne;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ne||(Ne={}));var rC=(e,t={message:`Input not instance of ${e.name}`})=>eI(r=>r instanceof e,t),tI=oo.create,rI=tc.create,iC=Tu.create,nC=rc.create,iI=ic.create,sC=nc.create,aC=yu.create,oC=sc.create,cC=ac.create,uC=co.create,fC=ua.create,lC=jn.create,pC=wu.create,hC=fa.create,dC=Ci.create,mC=Ci.strictCreate,vC=oc.create,gC=$h.create,xC=cc.create,bC=vs.create,_C=Yh.create,yC=Su.create,wC=Eu.create,SC=Zh.create,EC=uc.create,IC=fc.create,TC=lc.create,RC=pc.create,AC=uo.create,Z3=Xi.create,OC=Vn.create,kC=la.create,PC=Xi.createWithPreprocess,NC=il.create,BC=()=>tI().optional(),MC=()=>rI().optional(),CC=()=>iI().optional(),LC={string:e=>oo.create({...e,coerce:!0}),number:e=>tc.create({...e,coerce:!0}),boolean:e=>ic.create({...e,coerce:!0}),bigint:e=>rc.create({...e,coerce:!0}),date:e=>nc.create({...e,coerce:!0})},UC=ze,Wn=Object.freeze({__proto__:null,defaultErrorMap:tl,setErrorMap:HM,getErrorMap:Wh,makeIssue:Kh,EMPTY_PATH:zM,addIssueToContext:be,ParseStatus:hi,INVALID:ze,DIRTY:J3,OK:yi,isAborted:Ug,isDirty:Dg,isValid:rl,isAsync:Gh,get util(){return Et},get objectUtil(){return Lg},ZodParsedType:ve,getParsedType:ao,ZodType:nt,ZodString:oo,ZodNumber:tc,ZodBigInt:rc,ZodBoolean:ic,ZodDate:nc,ZodSymbol:yu,ZodUndefined:sc,ZodNull:ac,ZodAny:co,ZodUnknown:ua,ZodNever:jn,ZodVoid:wu,ZodArray:fa,ZodObject:Ci,ZodUnion:oc,ZodDiscriminatedUnion:$h,ZodIntersection:cc,ZodTuple:vs,ZodRecord:Yh,ZodMap:Su,ZodSet:Eu,ZodFunction:Zh,ZodLazy:uc,ZodLiteral:fc,ZodEnum:lc,ZodNativeEnum:pc,ZodPromise:uo,ZodEffects:Xi,ZodTransformer:Xi,ZodOptional:Vn,ZodNullable:la,ZodDefault:hc,ZodCatch:Iu,ZodNaN:Tu,BRAND:eC,ZodBranded:Xh,ZodPipeline:il,ZodReadonly:Ru,custom:eI,Schema:nt,ZodSchema:nt,late:tC,get ZodFirstPartyTypeKind(){return Ne},coerce:LC,any:uC,array:hC,bigint:nC,boolean:iI,date:sC,discriminatedUnion:gC,effect:Z3,enum:TC,function:SC,instanceof:rC,intersection:xC,lazy:EC,literal:IC,map:yC,nan:iC,nativeEnum:RC,never:lC,null:cC,nullable:kC,number:rI,object:dC,oboolean:CC,onumber:MC,optional:OC,ostring:BC,pipeline:NC,preprocess:PC,promise:AC,record:_C,set:wC,strictObject:mC,string:tI,symbol:aC,transformer:Z3,tuple:bC,undefined:oC,union:vC,unknown:fC,void:pC,NEVER:UC,ZodIssueCode:fe,quotelessJson:FM,ZodError:Zi});var qC=e=>e.message?e.message:"unspecified error",pa=class extends Gr{constructor(t){super(),this.code=1100,this.errors=t,super.message=`Web3 validator found ${t.length} error[s]:
37
37
  ${this._compileErrors().join(`
38
- `)}`}_compileErrors(){return this.errors.map(Aq)}};var Qn={};Na(Qn,{abiSchemaToJsonSchema:()=>Ed,codePointToInt:()=>_4,ensureIfUint8Array:()=>Nb,ethAbiToJsonSchema:()=>Ab,fetchArrayElement:()=>Ob,hexToNumber:()=>Td,hexToUint8Array:()=>Id,numberToHex:()=>kb,padLeft:()=>y4,parseBaseType:()=>Ss,transformJsonDataToAbiFormat:()=>Sd,uint8ArrayToHexString:()=>Al});var g4=["bool","int","uint","bytes","string","address","tuple"];var Ib=e=>typeof e=="object"&&"type"in e&&"name"in e;var b4=e=>typeof e=="string",mr=e=>typeof e=="string"&&/^((-)?0x[0-9a-f]+|(0x))$/i.test(e);var wd=e=>typeof e=="number"||typeof e=="bigint"||typeof e=="string"&&/^((-0x|0x|-)?[0-9a-f]+|(0x))$/i.test(e);var Oq=["hex","number","blockNumber","blockNumberOrTag","filter","bloom"],Ss=e=>{let t=e.replace(/ /,""),r,i=!1,n=[];if(e.includes("[")&&(t=t.slice(0,t.indexOf("[")),n=[...e.matchAll(/(?:\[(\d*)\])/g)].map(a=>parseInt(a[1],10)).map(a=>Number.isNaN(a)?-1:a),i=n.length>0),g4.includes(t))return{baseType:t,isArray:i,baseTypeSize:r,arraySizes:n};if(t.startsWith("int"))r=parseInt(t.substring(3),10),t="int";else if(t.startsWith("uint"))r=parseInt(e.substring(4),10),t="uint";else if(t.startsWith("bytes"))r=parseInt(t.substring(5),10),t="bytes";else return{baseType:void 0,isArray:!1,baseTypeSize:void 0,arraySizes:n};return{baseType:t,isArray:i,baseTypeSize:r,arraySizes:n}},Rb=(e,t={})=>{if(Object.keys(t).includes("type"))throw new da([{keyword:"eth",message:'Either "eth" or "type" can be presented in schema',params:{eth:e},instancePath:"",schemaPath:""}]);let{baseType:i,baseTypeSize:n}=Ss(e);if(!i&&!Oq.includes(e))throw new da([{keyword:"eth",message:`Eth data type "${e}" is not valid`,params:{eth:e},instancePath:"",schemaPath:""}]);if(i){if(i==="tuple")throw new Error('"tuple" type is not implemented directly.');return{format:`${i}${n??""}`,required:!0}}return e?{format:e,required:!0}:{}},Ed=(e,t="/0")=>{let r={type:"array",items:[],maxItems:e.length,minItems:e.length};for(let[i,n]of e.entries()){let a,u,h=[];Ib(n)?(a=n.type,u=n.name,h=n.components):typeof n=="string"?(a=n,u=`${t}/${i}`):Array.isArray(n)&&(n[0]&&typeof n[0]=="string"&&n[0].startsWith("tuple")&&!Array.isArray(n[0])&&n[1]&&Array.isArray(n[1])?(a=n[0],u=`${t}/${i}`,h=n[1]):(a="tuple",u=`${t}/${i}`,h=n));let{baseType:b,isArray:w,arraySizes:T}=Ss(a),I,B=r;for(let M=T.length-1;M>0;M-=1)I={type:"array",items:[],maxItems:T[M],minItems:T[M]},T[M]<0&&(delete I.maxItems,delete I.minItems),Array.isArray(B.items)?B.items.length===0?B.items=I:B.items.push(I):B.items=[B.items,I],B=I;if(b==="tuple"&&!w){let M=Ed(h,u);M.$id=u,B.items.push(M)}else if(b==="tuple"&&w){let M=T[0],P={$id:u,type:"array",items:Ed(h,u),maxItems:M,minItems:M};M<0&&(delete P.maxItems,delete P.minItems),B.items.push(P)}else if(w){let M=T[0],P={type:"array",$id:u,items:Rb(String(b)),minItems:M,maxItems:M};M<0&&(delete P.maxItems,delete P.minItems),B.items.push(P)}else Array.isArray(B.items)?B.items.push(Object.assign({$id:u},Rb(a))):B.items.items.push(Object.assign({$id:u},Rb(a)));B=r}return r},Ab=e=>Ed(e),Ob=(e,t)=>t===1?e:Ob(e[0],t-1),Sd=(e,t,r)=>{let i=[];for(let[n,a]of e.entries()){let u,h,b=[];Ib(a)?(u=a.type,h=a.name,b=a.components):typeof a=="string"?u=a:Array.isArray(a)&&(a[1]&&Array.isArray(a[1])?(u=a[0],b=a[1]):(u="tuple",b=a));let{baseType:w,isArray:T,arraySizes:I}=Ss(u),B=Array.isArray(t)?t[n]:t[h];if(w==="tuple"&&!T)i.push(Sd(b,B,r));else if(w==="tuple"&&T){let M=[];for(let P of B)if(I.length>1){let L=Ob(P,I.length-1),X=[];for(let W of L)X.push(Sd(b,W,r));M.push(X)}else M.push(Sd(b,P,r));i.push(M)}else i.push(B)}return r=r??[],r.push(...i),r},_4=e=>{if(e>=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error(`Invalid code point: ${e}`)},Td=e=>{if(!mr(e))throw new Error("Invalid hex string");let[t,r]=e.startsWith("-")?[!0,e.slice(1)]:[!1,e],i=BigInt(r);return i>Number.MAX_SAFE_INTEGER?t?-i:i:i<Number.MIN_SAFE_INTEGER?i:t?-1*Number(i):Number(i)},kb=e=>{if((typeof e=="number"||typeof e=="bigint")&&e<0)return`-0x${e.toString(16).slice(1)}`;if((typeof e=="number"||typeof e=="bigint")&&e>=0)return`0x${e.toString(16)}`;if(typeof e=="string"&&mr(e)){let[t,r]=e.startsWith("-")?[!0,e.slice(1)]:[!1,e],i=r.split(/^(-)?0(x|X)/).slice(-1)[0];return`${t?"-":""}0x${i.replace(/^0+/,"").toLowerCase()}`}if(typeof e=="string"&&!mr(e))return kb(BigInt(e));throw new pl(e)},y4=(e,t,r="0")=>{if(typeof e=="string"&&!mr(e))return e.padStart(t,r);let i=typeof e=="string"&&mr(e)?e:kb(e),[n,a]=i.startsWith("-")?["-0x",i.slice(3)]:["0x",i.slice(2)];return`${n}${a.padStart(t,r)}`};function Al(e){let t="0x";for(let r of e){let i=r.toString(16);t+=i.length===1?`0${i}`:i}return t}var ma={zero:48,nine:57,A:65,F:70,a:97,f:102};function x4(e){if(e>=ma.zero&&e<=ma.nine)return e-ma.zero;if(e>=ma.A&&e<=ma.F)return e-(ma.A-10);if(e>=ma.a&&e<=ma.f)return e-(ma.a-10)}function Id(e){let t=0;if(e.startsWith("0")&&(e[1]==="x"||e[1]==="X")&&(t=2),e.length%2!==0)throw new oo(`hex string has odd length: ${e}`);let r=(e.length-t)/2,i=new Uint8Array(r);for(let n=0,a=t;n<r;n+=1){let u=x4(e.charCodeAt(a++)),h=x4(e.charCodeAt(a++));if(u===void 0||h===void 0)throw new oo(`Invalid byte sequence ("${e[a-2]}${e[a-1]}" in "${e}").`);i[n]=u*16+h}return i}function Nb(e){var t;return!(e instanceof Uint8Array)&&((t=e?.constructor)===null||t===void 0?void 0:t.name)==="Uint8Array"?Uint8Array.from(e):e}var Rd=e=>{var t;return e instanceof Uint8Array||((t=e?.constructor)===null||t===void 0?void 0:t.name)==="Uint8Array"},Pb=(e,t={abiType:"bytes"})=>{if(typeof e!="string"&&!Array.isArray(e)&&!Rd(e)||typeof e=="string"&&mr(e)&&e.startsWith("-")||typeof e=="string"&&!mr(e))return!1;let r;if(typeof e=="string"){if(e.length%2!==0)return!1;r=Id(e)}else if(Array.isArray(e)){if(e.some(i=>i<0||i>255||!Number.isInteger(i)))return!1;r=new Uint8Array(e)}else r=e;if(t?.abiType){let{baseTypeSize:i}=Ss(t.abiType);return i?r.length===i:!0}return t?.size?r.length===t?.size:!0};var w4=e=>{if(!/^(0x)?[0-9a-f]{40}$/i.test(e))return!1;let t=e.slice(2),r=Pu(t.toLowerCase()),i=Al(ll(Nb(r))).slice(2);for(let n=0;n<40;n+=1)if(parseInt(i[n],16)>7&&t[n].toUpperCase()!==t[n]||parseInt(i[n],16)<=7&&t[n].toLowerCase()!==t[n])return!1;return!0},Es=(e,t=!0)=>{if(typeof e!="string"&&!Rd(e))return!1;let r;return Rd(e)?r=Al(e):typeof e=="string"&&!mr(e)?r=e.toLowerCase().startsWith("0x")?e:`0x${e}`:r=e,/^(0x)?[0-9a-f]{40}$/i.test(r)?/^(0x|0X)?[0-9a-f]{40}$/.test(r)||/^(0x|0X)?[0-9A-F]{40}$/.test(r)?!0:t?w4(r):!0:!1};var Ol;(function(e){e.NUMBER="NUMBER_NUMBER",e.HEX="NUMBER_HEX",e.STR="NUMBER_STR",e.BIGINT="NUMBER_BIGINT"})(Ol||(Ol={}));var kl;(function(e){e.HEX="BYTES_HEX",e.UINT8ARRAY="BYTES_UINT8ARRAY"})(kl||(kl={}));var fZ={number:Ol.BIGINT,bytes:kl.HEX},lZ={number:Ol.HEX,bytes:kl.HEX};var Nl;(function(e){e.EARLIEST="earliest",e.LATEST="latest",e.PENDING="pending",e.SAFE="safe",e.FINALIZED="finalized"})(Nl||(Nl={}));var S4;(function(e){e.chainstart="chainstart",e.frontier="frontier",e.homestead="homestead",e.dao="dao",e.tangerineWhistle="tangerineWhistle",e.spuriousDragon="spuriousDragon",e.byzantium="byzantium",e.constantinople="constantinople",e.petersburg="petersburg",e.istanbul="istanbul",e.muirGlacier="muirGlacier",e.berlin="berlin",e.london="london",e.altair="altair",e.arrowGlacier="arrowGlacier",e.grayGlacier="grayGlacier",e.bellatrix="bellatrix",e.merge="merge",e.capella="capella",e.shanghai="shanghai"})(S4||(S4={}));var E4=Object.getPrototypeOf(Uint8Array);var T4=function(e,t,r,i){function n(a){return a instanceof r?a:new r(function(u){u(a)})}return new(r||(r=Promise))(function(a,u){function h(T){try{w(i.next(T))}catch(I){u(I)}}function b(T){try{w(i.throw(T))}catch(I){u(I)}}function w(T){T.done?a(T.value):n(T.value).then(h,b)}w((i=i.apply(e,t||[])).next())})},I4=Symbol.for("web3/base-provider"),Bb=class e{static isWeb3Provider(t){return t instanceof e||!!(t&&t[I4])}get[I4](){return!0}send(t,r){this.request(t).then(i=>{r(null,i)}).catch(i=>{r(i)})}sendAsync(t){return T4(this,void 0,void 0,function*(){return this.request(t)})}asEIP1193Provider(){let t=Object.create(this),r=t.request;return t.request=function(n){return T4(this,void 0,void 0,function*(){return(yield r(n)).result})},t.asEIP1193Provider=void 0,t}};var Ad=(e,t)=>{let r=e;for(let i=1;i<t;i+=1)r*=e;return r},po=(e,t={abiType:"uint"})=>{if(!["number","string","bigint"].includes(typeof e)||typeof e=="string"&&e.length===0)return!1;let r;if(t?.abiType){let{baseTypeSize:n}=Ss(t.abiType);n&&(r=n)}else t.bitSize&&(r=t.bitSize);let i=Ad(BigInt(2),BigInt(r??256))-BigInt(1);try{let n=typeof e=="string"&&mr(e)?BigInt(Td(e)):BigInt(e);return n>=0&&n<=i}catch{return!1}},vc=(e,t={abiType:"int"})=>{if(!["number","string","bigint"].includes(typeof e)||typeof e=="number"&&e>Number.MAX_SAFE_INTEGER)return!1;let r;if(t?.abiType){let{baseTypeSize:a,baseType:u}=Ss(t.abiType);if(u!=="int")return!1;a&&(r=a)}else t.bitSize&&(r=t.bitSize);let i=Ad(BigInt(2),BigInt((r??256)-1)),n=BigInt(-1)*Ad(BigInt(2),BigInt((r??256)-1));try{let a=typeof e=="string"&&mr(e)?BigInt(Td(e)):BigInt(e);return a>=n&&a<=i}catch{return!1}},R4=e=>!!(vc(e)||typeof e=="string"&&/[0-9.]/.test(e)&&e.indexOf(".")===e.lastIndexOf(".")||typeof e=="number");var Mb=e=>po(e),Od=e=>Object.values(Nl).includes(e),Pl=e=>Od(e)||Mb(e);var kd=e=>typeof e!="string"||!/^(0x)?[0-9a-f]{512}$/i.test(e)?!1:!!(/^(0x)?[0-9a-f]{512}$/.test(e)||/^(0x)?[0-9A-F]{512}$/.test(e));var A4=e=>["number","string","boolean"].includes(typeof e)?typeof e=="boolean"?!0:typeof e=="string"&&!mr(e)?e==="1"||e==="0":typeof e=="string"&&mr(e)?e==="0x1"||e==="0x0":e===1||e===0:!1;var zi=e=>e==null;var Nd=e=>typeof e!="string"||!/^(0x)?[0-9a-f]{64}$/i.test(e)?!1:!!(/^(0x)?[0-9a-f]{64}$/.test(e)||/^(0x)?[0-9A-F]{64}$/.test(e));var O4=e=>{let t=["fromBlock","toBlock","address","topics","blockHash"];if(zi(e)||typeof e!="object"||!Object.keys(e).every(r=>t.includes(r))||!zi(e.fromBlock)&&!Pl(e.fromBlock)||!zi(e.toBlock)&&!Pl(e.toBlock))return!1;if(!zi(e.address)){if(Array.isArray(e.address)){if(!e.address.every(r=>Es(r)))return!1}else if(!Es(e.address))return!1}return!(!zi(e.topics)&&!e.topics.every(r=>zi(r)?!0:Array.isArray(r)?r.every(i=>Nd(i)):!!Nd(r)))};var Hu={address:e=>Es(e),bloom:e=>kd(e),blockNumber:e=>Mb(e),blockTag:e=>Od(e),blockNumberOrTag:e=>Pl(e),bool:e=>A4(e),bytes:e=>Pb(e),filter:e=>O4(e),hex:e=>mr(e),uint:e=>po(e),int:e=>vc(e),number:e=>R4(e),string:e=>b4(e)};for(let e=8;e<=256;e+=8)Hu[`int${e}`]=t=>vc(t,{bitSize:e}),Hu[`uint${e}`]=t=>po(t,{bitSize:e});for(let e=1;e<=32;e+=1)Hu[`bytes${e}`]=t=>Pb(t,{size:e});Hu.bytes256=Hu.bytes;var Cb=Hu;var Bl=e=>{if((!e?.type||e?.type==="object")&&e?.properties){let t={};for(let r of Object.keys(e.properties)){let i=Bl(e.properties[r]);i&&(t[r]=i)}return Array.isArray(e.required)?Jn.object(t).partial().required(e.required.reduce((r,i)=>Object.assign(Object.assign({},r),{[i]:!0}),{})):Jn.object(t).partial()}if(e?.type==="array"&&e?.items){if(Array.isArray(e.items)&&e.items.length>0){let t=[];for(let r of e.items){let i=Bl(r);i&&t.push(i)}return Jn.tuple(t)}return Jn.array(Bl(e.items))}if(e.oneOf&&Array.isArray(e.oneOf))return Jn.union(e.oneOf.map(t=>Bl(t)));if(e?.format){if(!Cb[e.format])throw new hd(e.format);return Jn.any().refine(Cb[e.format],t=>({params:{value:t,format:e.format}}))}return e?.type&&e?.type!=="object"&&typeof Jn[String(e.type)]=="function"?Jn[String(e.type)]():Jn.object({data:Jn.any()}).partial()},Pd=class e{static factory(){return e.validatorInstance||(e.validatorInstance=new e),e.validatorInstance}validate(t,r,i){var n,a;let h=Bl(t).safeParse(r);if(!h.success){let b=this.convertErrors((a=(n=h.error)===null||n===void 0?void 0:n.issues)!==null&&a!==void 0?a:[]);if(b){if(i?.silent)return b;throw new da(b)}}}convertErrors(t){if(t&&Array.isArray(t)&&t.length>0)return t.map(r=>{var i;let n,a,u,h;h=r.path.join("/");let b=String(r.path[r.path.length-1]),w=r.path.join("/");if(r.code===le.too_big)a="maxItems",h=`${w}/maxItems`,u={limit:r.maximum},n=`must NOT have more than ${r.maximum} items`;else if(r.code===le.too_small)a="minItems",h=`${w}/minItems`,u={limit:r.minimum},n=`must NOT have fewer than ${r.minimum} items`;else if(r.code===le.custom){let{value:T,format:I}=(i=r.params)!==null&&i!==void 0?i:{};typeof T>"u"?n=`value at "/${h}" is required`:n=`value "${typeof T=="object"?JSON.stringify(T):T}" at "/${h}" must pass "${I}" validation`,u={value:T}}return{keyword:a??b,instancePath:w?`/${w}`:"",schemaPath:h?`#${h}`:"#",params:u??{value:r.message},message:n??r.message}})}};var Bd=class{constructor(){this._validator=Pd.factory()}validateJSONSchema(t,r,i){return this._validator.validate(t,r,i)}validate(t,r,i={silent:!1}){var n,a;let u=Ab(t);if(!(Array.isArray(u.items)&&((n=u.items)===null||n===void 0?void 0:n.length)===0&&r.length===0)){if(Array.isArray(u.items)&&((a=u.items)===null||a===void 0?void 0:a.length)===0&&r.length!==0)throw new da([{instancePath:"/0",schemaPath:"/",keyword:"required",message:"empty schema against data can not be validated",params:r}]);return this._validator.validate(u,r,i)}}};var Ml=new Bd;function Lb(e){var t;return e instanceof Uint8Array||((t=e?.constructor)===null||t===void 0?void 0:t.name)==="Uint8Array"}var ZJ={noether:BigInt(0),wei:BigInt(1),kwei:BigInt(1e3),Kwei:BigInt(1e3),babbage:BigInt(1e3),femtoether:BigInt(1e3),mwei:BigInt(1e6),Mwei:BigInt(1e6),lovelace:BigInt(1e6),picoether:BigInt(1e6),gwei:BigInt(1e9),Gwei:BigInt(1e9),shannon:BigInt(1e9),nanoether:BigInt(1e9),nano:BigInt(1e9),szabo:BigInt(1e12),microether:BigInt(1e12),micro:BigInt(1e12),finney:BigInt(1e15),milliether:BigInt(1e15),milli:BigInt(1e15),ether:BigInt("1000000000000000000"),kether:BigInt("1000000000000000000000"),grand:BigInt("1000000000000000000000"),mether:BigInt("1000000000000000000000000"),gether:BigInt("1000000000000000000000000000"),tether:BigInt("1000000000000000000000000000000")},Ub=e=>{if(Ml.validate(["bytes"],[e]),Lb(e))return e;if(Array.isArray(e))return new Uint8Array(e);if(typeof e=="string")return Qn.hexToUint8Array(e);throw new oo(e)},{uint8ArrayToHexString:Bq}=Qn,Cl=e=>Bq(Ub(e));var zu=(e,t)=>{typeof e!="bigint"&&Ml.validate(["int"],[e]);let r=Qn.numberToHex(e);return t&&(!r.startsWith("-")&&r.length%2===1?r="0x0".concat(r.slice(2)):r.length%2===0&&r.startsWith("-")&&(r="-0x0".concat(r.slice(3)))),r};var Db=e=>{Ml.validate(["string"],[e]);let t=e.replace(/^(?:\u0000)/,"");return t=t.replace(/(?:\u0000)$/,""),Cl(new TextEncoder().encode(t))};var Ll=(e,t)=>{if(typeof e=="string"&&Es(e))return t?"address":`0x${e.toLowerCase().replace(/^0x/i,"")}`;if(typeof e=="boolean")return t?"bool":e?"0x01":"0x00";if(typeof e=="number")return t?e<0?"int256":"uint256":zu(e);if(typeof e=="bigint")return t?"bigint":zu(e);if(typeof e=="object"&&e)return t?"string":Db(JSON.stringify(e));if(typeof e=="string"){if(e.startsWith("-0x")||e.startsWith("-0X"))return t?"int256":zu(e);if(mr(e))return t?"bytes":e;if(wd(e)&&!vc(e)&&!po(e))return t?"bytes":`0x${e}`;if(wd(e)&&!vc(e)&&po(e))return t?"uint":zu(e);if(!Number.isFinite(e))return t?"string":Db(e)}throw new pd(e)};var P4=yr(N4(),1);var{parseBaseType:PQ}=Qn;var Uq;Uq=Symbol.toStringTag;var qq=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,Fb=Math.ceil,On=Math.floor,ji="[BigNumber Error] ",M4=ji+"Number primitive has more than 15 significant digits: ",es=1e14,tt=14,Hb=9007199254740991,zb=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],ho=1e7,ri=1e9;function C4(e){var t,r,i,n=q.prototype={constructor:q,toString:null,valueOf:null},a=new q(1),u=20,h=4,b=-7,w=21,T=-1e7,I=1e7,B=!1,M=1,P=0,L={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},X="0123456789abcdefghijklmnopqrstuvwxyz",W=!0;function q(O,E){var f,c,p,v,g,x,S,_,l=this;if(!(l instanceof q))return new q(O,E);if(E==null){if(O&&O._isBigNumber===!0){l.s=O.s,!O.c||O.e>I?l.c=l.e=null:O.e<T?l.c=[l.e=0]:(l.e=O.e,l.c=O.c.slice());return}if((x=typeof O=="number")&&O*0==0){if(l.s=1/O<0?(O=-O,-1):1,O===~~O){for(v=0,g=O;g>=10;g/=10,v++);v>I?l.c=l.e=null:(l.e=v,l.c=[O]);return}_=String(O)}else{if(!qq.test(_=String(O)))return i(l,_,x);l.s=_.charCodeAt(0)==45?(_=_.slice(1),-1):1}(v=_.indexOf("."))>-1&&(_=_.replace(".","")),(g=_.search(/e/i))>0?(v<0&&(v=g),v+=+_.slice(g+1),_=_.substring(0,g)):v<0&&(v=_.length)}else{if(xr(E,2,X.length,"Base"),E==10&&W)return l=new q(O),Te(l,u+l.e+1,h);if(_=String(O),x=typeof O=="number"){if(O*0!=0)return i(l,_,x,E);if(l.s=1/O<0?(_=_.slice(1),-1):1,q.DEBUG&&_.replace(/^0\.0*|\./,"").length>15)throw Error(M4+O)}else l.s=_.charCodeAt(0)===45?(_=_.slice(1),-1):1;for(f=X.slice(0,E),v=g=0,S=_.length;g<S;g++)if(f.indexOf(c=_.charAt(g))<0){if(c=="."){if(g>v){v=S;continue}}else if(!p&&(_==_.toUpperCase()&&(_=_.toLowerCase())||_==_.toLowerCase()&&(_=_.toUpperCase()))){p=!0,g=-1,v=0;continue}return i(l,String(O),x,E)}x=!1,_=r(_,E,10,l.s),(v=_.indexOf("."))>-1?_=_.replace(".",""):v=_.length}for(g=0;_.charCodeAt(g)===48;g++);for(S=_.length;_.charCodeAt(--S)===48;);if(_=_.slice(g,++S)){if(S-=g,x&&q.DEBUG&&S>15&&(O>Hb||O!==On(O)))throw Error(M4+l.s*O);if((v=v-g-1)>I)l.c=l.e=null;else if(v<T)l.c=[l.e=0];else{if(l.e=v,l.c=[],g=(v+1)%tt,v<0&&(g+=tt),g<S){for(g&&l.c.push(+_.slice(0,g)),S-=tt;g<S;)l.c.push(+_.slice(g,g+=tt));g=tt-(_=_.slice(g)).length}else g-=S;for(;g--;_+="0");l.c.push(+_)}}else l.c=[l.e=0]}q.clone=C4,q.ROUND_UP=0,q.ROUND_DOWN=1,q.ROUND_CEIL=2,q.ROUND_FLOOR=3,q.ROUND_HALF_UP=4,q.ROUND_HALF_DOWN=5,q.ROUND_HALF_EVEN=6,q.ROUND_HALF_CEIL=7,q.ROUND_HALF_FLOOR=8,q.EUCLID=9,q.config=q.set=function(O){var E,f;if(O!=null)if(typeof O=="object"){if(O.hasOwnProperty(E="DECIMAL_PLACES")&&(f=O[E],xr(f,0,ri,E),u=f),O.hasOwnProperty(E="ROUNDING_MODE")&&(f=O[E],xr(f,0,8,E),h=f),O.hasOwnProperty(E="EXPONENTIAL_AT")&&(f=O[E],f&&f.pop?(xr(f[0],-ri,0,E),xr(f[1],0,ri,E),b=f[0],w=f[1]):(xr(f,-ri,ri,E),b=-(w=f<0?-f:f))),O.hasOwnProperty(E="RANGE"))if(f=O[E],f&&f.pop)xr(f[0],-ri,-1,E),xr(f[1],1,ri,E),T=f[0],I=f[1];else if(xr(f,-ri,ri,E),f)T=-(I=f<0?-f:f);else throw Error(ji+E+" cannot be zero: "+f);if(O.hasOwnProperty(E="CRYPTO"))if(f=O[E],f===!!f)if(f)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))B=f;else throw B=!f,Error(ji+"crypto unavailable");else B=f;else throw Error(ji+E+" not true or false: "+f);if(O.hasOwnProperty(E="MODULO_MODE")&&(f=O[E],xr(f,0,9,E),M=f),O.hasOwnProperty(E="POW_PRECISION")&&(f=O[E],xr(f,0,ri,E),P=f),O.hasOwnProperty(E="FORMAT"))if(f=O[E],typeof f=="object")L=f;else throw Error(ji+E+" not an object: "+f);if(O.hasOwnProperty(E="ALPHABET"))if(f=O[E],typeof f=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(f))W=f.slice(0,10)=="0123456789",X=f;else throw Error(ji+E+" invalid: "+f)}else throw Error(ji+"Object expected: "+O);return{DECIMAL_PLACES:u,ROUNDING_MODE:h,EXPONENTIAL_AT:[b,w],RANGE:[T,I],CRYPTO:B,MODULO_MODE:M,POW_PRECISION:P,FORMAT:L,ALPHABET:X}},q.isBigNumber=function(O){if(!O||O._isBigNumber!==!0)return!1;if(!q.DEBUG)return!0;var E,f,c=O.c,p=O.e,v=O.s;e:if({}.toString.call(c)=="[object Array]"){if((v===1||v===-1)&&p>=-ri&&p<=ri&&p===On(p)){if(c[0]===0){if(p===0&&c.length===1)return!0;break e}if(E=(p+1)%tt,E<1&&(E+=tt),String(c[0]).length==E){for(E=0;E<c.length;E++)if(f=c[E],f<0||f>=es||f!==On(f))break e;if(f!==0)return!0}}}else if(c===null&&p===null&&(v===null||v===1||v===-1))return!0;throw Error(ji+"Invalid BigNumber: "+O)},q.maximum=q.max=function(){return fe(arguments,-1)},q.minimum=q.min=function(){return fe(arguments,1)},q.random=function(){var O=9007199254740992,E=Math.random()*O&2097151?function(){return On(Math.random()*O)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(f){var c,p,v,g,x,S=0,_=[],l=new q(a);if(f==null?f=u:xr(f,0,ri),g=Fb(f/tt),B)if(crypto.getRandomValues){for(c=crypto.getRandomValues(new Uint32Array(g*=2));S<g;)x=c[S]*131072+(c[S+1]>>>11),x>=9e15?(p=crypto.getRandomValues(new Uint32Array(2)),c[S]=p[0],c[S+1]=p[1]):(_.push(x%1e14),S+=2);S=g/2}else if(crypto.randomBytes){for(c=crypto.randomBytes(g*=7);S<g;)x=(c[S]&31)*281474976710656+c[S+1]*1099511627776+c[S+2]*4294967296+c[S+3]*16777216+(c[S+4]<<16)+(c[S+5]<<8)+c[S+6],x>=9e15?crypto.randomBytes(7).copy(c,S):(_.push(x%1e14),S+=7);S=g/7}else throw B=!1,Error(ji+"crypto unavailable");if(!B)for(;S<g;)x=E(),x<9e15&&(_[S++]=x%1e14);for(g=_[--S],f%=tt,g&&f&&(x=zb[tt-f],_[S]=On(g/x)*x);_[S]===0;_.pop(),S--);if(S<0)_=[v=0];else{for(v=-1;_[0]===0;_.splice(0,1),v-=tt);for(S=1,x=_[0];x>=10;x/=10,S++);S<tt&&(v-=tt-S)}return l.e=v,l.c=_,l}}(),q.sum=function(){for(var O=1,E=arguments,f=new q(E[0]);O<E.length;)f=f.plus(E[O++]);return f},r=function(){var O="0123456789";function E(f,c,p,v){for(var g,x=[0],S,_=0,l=f.length;_<l;){for(S=x.length;S--;x[S]*=c);for(x[0]+=v.indexOf(f.charAt(_++)),g=0;g<x.length;g++)x[g]>p-1&&(x[g+1]==null&&(x[g+1]=0),x[g+1]+=x[g]/p|0,x[g]%=p)}return x.reverse()}return function(f,c,p,v,g){var x,S,_,l,m,A,U,j,Z=f.indexOf("."),se=u,ae=h;for(Z>=0&&(l=P,P=0,f=f.replace(".",""),j=new q(c),A=j.pow(f.length-Z),P=l,j.c=E(va(An(A.c),A.e,"0"),10,p,O),j.e=j.c.length),U=E(f,c,p,g?(x=X,O):(x=O,X)),_=l=U.length;U[--l]==0;U.pop());if(!U[0])return x.charAt(0);if(Z<0?--_:(A.c=U,A.e=_,A.s=v,A=t(A,j,se,ae,p),U=A.c,m=A.r,_=A.e),S=_+se+1,Z=U[S],l=p/2,m=m||S<0||U[S+1]!=null,m=ae<4?(Z!=null||m)&&(ae==0||ae==(A.s<0?3:2)):Z>l||Z==l&&(ae==4||m||ae==6&&U[S-1]&1||ae==(A.s<0?8:7)),S<1||!U[0])f=m?va(x.charAt(1),-se,x.charAt(0)):x.charAt(0);else{if(U.length=S,m)for(--p;++U[--S]>p;)U[S]=0,S||(++_,U=[1].concat(U));for(l=U.length;!U[--l];);for(Z=0,f="";Z<=l;f+=x.charAt(U[Z++]));f=va(f,_,x.charAt(0))}return f}}(),t=function(){function O(c,p,v){var g,x,S,_,l=0,m=c.length,A=p%ho,U=p/ho|0;for(c=c.slice();m--;)S=c[m]%ho,_=c[m]/ho|0,g=U*S+_*A,x=A*S+g%ho*ho+l,l=(x/v|0)+(g/ho|0)+U*_,c[m]=x%v;return l&&(c=[l].concat(c)),c}function E(c,p,v,g){var x,S;if(v!=g)S=v>g?1:-1;else for(x=S=0;x<v;x++)if(c[x]!=p[x]){S=c[x]>p[x]?1:-1;break}return S}function f(c,p,v,g){for(var x=0;v--;)c[v]-=x,x=c[v]<p[v]?1:0,c[v]=x*g+c[v]-p[v];for(;!c[0]&&c.length>1;c.splice(0,1));}return function(c,p,v,g,x){var S,_,l,m,A,U,j,Z,se,ae,he,Ee,me,dt,St,Oe,st,rt=c.s==p.s?1:-1,Re=c.c,Ae=p.c;if(!Re||!Re[0]||!Ae||!Ae[0])return new q(!c.s||!p.s||(Re?Ae&&Re[0]==Ae[0]:!Ae)?NaN:Re&&Re[0]==0||!Ae?rt*0:rt/0);for(Z=new q(rt),se=Z.c=[],_=c.e-p.e,rt=v+_+1,x||(x=es,_=kn(c.e/tt)-kn(p.e/tt),rt=rt/tt|0),l=0;Ae[l]==(Re[l]||0);l++);if(Ae[l]>(Re[l]||0)&&_--,rt<0)se.push(1),m=!0;else{for(dt=Re.length,Oe=Ae.length,l=0,rt+=2,A=On(x/(Ae[0]+1)),A>1&&(Ae=O(Ae,A,x),Re=O(Re,A,x),Oe=Ae.length,dt=Re.length),me=Oe,ae=Re.slice(0,Oe),he=ae.length;he<Oe;ae[he++]=0);st=Ae.slice(),st=[0].concat(st),St=Ae[0],Ae[1]>=x/2&&St++;do{if(A=0,S=E(Ae,ae,Oe,he),S<0){if(Ee=ae[0],Oe!=he&&(Ee=Ee*x+(ae[1]||0)),A=On(Ee/St),A>1)for(A>=x&&(A=x-1),U=O(Ae,A,x),j=U.length,he=ae.length;E(U,ae,j,he)==1;)A--,f(U,Oe<j?st:Ae,j,x),j=U.length,S=1;else A==0&&(S=A=1),U=Ae.slice(),j=U.length;if(j<he&&(U=[0].concat(U)),f(ae,U,he,x),he=ae.length,S==-1)for(;E(Ae,ae,Oe,he)<1;)A++,f(ae,Oe<he?st:Ae,he,x),he=ae.length}else S===0&&(A++,ae=[0]);se[l++]=A,ae[0]?ae[he++]=Re[me]||0:(ae=[Re[me]],he=1)}while((me++<dt||ae[0]!=null)&&rt--);m=ae[0]!=null,se[0]||se.splice(0,1)}if(x==es){for(l=1,rt=se[0];rt>=10;rt/=10,l++);Te(Z,v+(Z.e=l+_*tt-1)+1,g,m)}else Z.e=_,Z.r=+m;return Z}}();function ee(O,E,f,c){var p,v,g,x,S;if(f==null?f=h:xr(f,0,8),!O.c)return O.toString();if(p=O.c[0],g=O.e,E==null)S=An(O.c),S=c==1||c==2&&(g<=b||g>=w)?Ld(S,g):va(S,g,"0");else if(O=Te(new q(O),E,f),v=O.e,S=An(O.c),x=S.length,c==1||c==2&&(E<=v||v<=b)){for(;x<E;S+="0",x++);S=Ld(S,v)}else if(E-=g,S=va(S,v,"0"),v+1>x){if(--E>0)for(S+=".";E--;S+="0");}else if(E+=v-x,E>0)for(v+1==x&&(S+=".");E--;S+="0");return O.s<0&&p?"-"+S:S}function fe(O,E){for(var f,c,p=1,v=new q(O[0]);p<O.length;p++)c=new q(O[p]),(!c.s||(f=gc(v,c))===E||f===0&&v.s===E)&&(v=c);return v}function _e(O,E,f){for(var c=1,p=E.length;!E[--p];E.pop());for(p=E[0];p>=10;p/=10,c++);return(f=c+f*tt-1)>I?O.c=O.e=null:f<T?O.c=[O.e=0]:(O.e=f,O.c=E),O}i=function(){var O=/^(-?)0([xbo])(?=\w[\w.]*$)/i,E=/^([^.]+)\.$/,f=/^\.([^.]+)$/,c=/^-?(Infinity|NaN)$/,p=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(v,g,x,S){var _,l=x?g:g.replace(p,"");if(c.test(l))v.s=isNaN(l)?null:l<0?-1:1;else{if(!x&&(l=l.replace(O,function(m,A,U){return _=(U=U.toLowerCase())=="x"?16:U=="b"?2:8,!S||S==_?A:m}),S&&(_=S,l=l.replace(E,"$1").replace(f,"0.$1")),g!=l))return new q(l,_);if(q.DEBUG)throw Error(ji+"Not a"+(S?" base "+S:"")+" number: "+g);v.s=null}v.c=v.e=null}}();function Te(O,E,f,c){var p,v,g,x,S,_,l,m=O.c,A=zb;if(m){e:{for(p=1,x=m[0];x>=10;x/=10,p++);if(v=E-p,v<0)v+=tt,g=E,S=m[_=0],l=On(S/A[p-g-1]%10);else if(_=Fb((v+1)/tt),_>=m.length)if(c){for(;m.length<=_;m.push(0));S=l=0,p=1,v%=tt,g=v-tt+1}else break e;else{for(S=x=m[_],p=1;x>=10;x/=10,p++);v%=tt,g=v-tt+p,l=g<0?0:On(S/A[p-g-1]%10)}if(c=c||E<0||m[_+1]!=null||(g<0?S:S%A[p-g-1]),c=f<4?(l||c)&&(f==0||f==(O.s<0?3:2)):l>5||l==5&&(f==4||c||f==6&&(v>0?g>0?S/A[p-g]:0:m[_-1])%10&1||f==(O.s<0?8:7)),E<1||!m[0])return m.length=0,c?(E-=O.e+1,m[0]=A[(tt-E%tt)%tt],O.e=-E||0):m[0]=O.e=0,O;if(v==0?(m.length=_,x=1,_--):(m.length=_+1,x=A[tt-v],m[_]=g>0?On(S/A[p-g]%A[g])*x:0),c)for(;;)if(_==0){for(v=1,g=m[0];g>=10;g/=10,v++);for(g=m[0]+=x,x=1;g>=10;g/=10,x++);v!=x&&(O.e++,m[0]==es&&(m[0]=1));break}else{if(m[_]+=x,m[_]!=es)break;m[_--]=0,x=1}for(v=m.length;m[--v]===0;m.pop());}O.e>I?O.c=O.e=null:O.e<T&&(O.c=[O.e=0])}return O}function be(O){var E,f=O.e;return f===null?O.toString():(E=An(O.c),E=f<=b||f>=w?Ld(E,f):va(E,f,"0"),O.s<0?"-"+E:E)}return n.absoluteValue=n.abs=function(){var O=new q(this);return O.s<0&&(O.s=1),O},n.comparedTo=function(O,E){return gc(this,new q(O,E))},n.decimalPlaces=n.dp=function(O,E){var f,c,p,v=this;if(O!=null)return xr(O,0,ri),E==null?E=h:xr(E,0,8),Te(new q(v),O+v.e+1,E);if(!(f=v.c))return null;if(c=((p=f.length-1)-kn(this.e/tt))*tt,p=f[p])for(;p%10==0;p/=10,c--);return c<0&&(c=0),c},n.dividedBy=n.div=function(O,E){return t(this,new q(O,E),u,h)},n.dividedToIntegerBy=n.idiv=function(O,E){return t(this,new q(O,E),0,1)},n.exponentiatedBy=n.pow=function(O,E){var f,c,p,v,g,x,S,_,l,m=this;if(O=new q(O),O.c&&!O.isInteger())throw Error(ji+"Exponent not an integer: "+be(O));if(E!=null&&(E=new q(E)),x=O.e>14,!m.c||!m.c[0]||m.c[0]==1&&!m.e&&m.c.length==1||!O.c||!O.c[0])return l=new q(Math.pow(+be(m),x?O.s*(2-Cd(O)):+be(O))),E?l.mod(E):l;if(S=O.s<0,E){if(E.c?!E.c[0]:!E.s)return new q(NaN);c=!S&&m.isInteger()&&E.isInteger(),c&&(m=m.mod(E))}else{if(O.e>9&&(m.e>0||m.e<-1||(m.e==0?m.c[0]>1||x&&m.c[1]>=24e7:m.c[0]<8e13||x&&m.c[0]<=9999975e7)))return v=m.s<0&&Cd(O)?-0:0,m.e>-1&&(v=1/v),new q(S?1/v:v);P&&(v=Fb(P/tt+2))}for(x?(f=new q(.5),S&&(O.s=1),_=Cd(O)):(p=Math.abs(+be(O)),_=p%2),l=new q(a);;){if(_){if(l=l.times(m),!l.c)break;v?l.c.length>v&&(l.c.length=v):c&&(l=l.mod(E))}if(p){if(p=On(p/2),p===0)break;_=p%2}else if(O=O.times(f),Te(O,O.e+1,1),O.e>14)_=Cd(O);else{if(p=+be(O),p===0)break;_=p%2}m=m.times(m),v?m.c&&m.c.length>v&&(m.c.length=v):c&&(m=m.mod(E))}return c?l:(S&&(l=a.div(l)),E?l.mod(E):v?Te(l,P,h,g):l)},n.integerValue=function(O){var E=new q(this);return O==null?O=h:xr(O,0,8),Te(E,E.e+1,O)},n.isEqualTo=n.eq=function(O,E){return gc(this,new q(O,E))===0},n.isFinite=function(){return!!this.c},n.isGreaterThan=n.gt=function(O,E){return gc(this,new q(O,E))>0},n.isGreaterThanOrEqualTo=n.gte=function(O,E){return(E=gc(this,new q(O,E)))===1||E===0},n.isInteger=function(){return!!this.c&&kn(this.e/tt)>this.c.length-2},n.isLessThan=n.lt=function(O,E){return gc(this,new q(O,E))<0},n.isLessThanOrEqualTo=n.lte=function(O,E){return(E=gc(this,new q(O,E)))===-1||E===0},n.isNaN=function(){return!this.s},n.isNegative=function(){return this.s<0},n.isPositive=function(){return this.s>0},n.isZero=function(){return!!this.c&&this.c[0]==0},n.minus=function(O,E){var f,c,p,v,g=this,x=g.s;if(O=new q(O,E),E=O.s,!x||!E)return new q(NaN);if(x!=E)return O.s=-E,g.plus(O);var S=g.e/tt,_=O.e/tt,l=g.c,m=O.c;if(!S||!_){if(!l||!m)return l?(O.s=-E,O):new q(m?g:NaN);if(!l[0]||!m[0])return m[0]?(O.s=-E,O):new q(l[0]?g:h==3?-0:0)}if(S=kn(S),_=kn(_),l=l.slice(),x=S-_){for((v=x<0)?(x=-x,p=l):(_=S,p=m),p.reverse(),E=x;E--;p.push(0));p.reverse()}else for(c=(v=(x=l.length)<(E=m.length))?x:E,x=E=0;E<c;E++)if(l[E]!=m[E]){v=l[E]<m[E];break}if(v&&(p=l,l=m,m=p,O.s=-O.s),E=(c=m.length)-(f=l.length),E>0)for(;E--;l[f++]=0);for(E=es-1;c>x;){if(l[--c]<m[c]){for(f=c;f&&!l[--f];l[f]=E);--l[f],l[c]+=es}l[c]-=m[c]}for(;l[0]==0;l.splice(0,1),--_);return l[0]?_e(O,l,_):(O.s=h==3?-1:1,O.c=[O.e=0],O)},n.modulo=n.mod=function(O,E){var f,c,p=this;return O=new q(O,E),!p.c||!O.s||O.c&&!O.c[0]?new q(NaN):!O.c||p.c&&!p.c[0]?new q(p):(M==9?(c=O.s,O.s=1,f=t(p,O,0,3),O.s=c,f.s*=c):f=t(p,O,0,M),O=p.minus(f.times(O)),!O.c[0]&&M==1&&(O.s=p.s),O)},n.multipliedBy=n.times=function(O,E){var f,c,p,v,g,x,S,_,l,m,A,U,j,Z,se,ae=this,he=ae.c,Ee=(O=new q(O,E)).c;if(!he||!Ee||!he[0]||!Ee[0])return!ae.s||!O.s||he&&!he[0]&&!Ee||Ee&&!Ee[0]&&!he?O.c=O.e=O.s=null:(O.s*=ae.s,!he||!Ee?O.c=O.e=null:(O.c=[0],O.e=0)),O;for(c=kn(ae.e/tt)+kn(O.e/tt),O.s*=ae.s,S=he.length,m=Ee.length,S<m&&(j=he,he=Ee,Ee=j,p=S,S=m,m=p),p=S+m,j=[];p--;j.push(0));for(Z=es,se=ho,p=m;--p>=0;){for(f=0,A=Ee[p]%se,U=Ee[p]/se|0,g=S,v=p+g;v>p;)_=he[--g]%se,l=he[g]/se|0,x=U*_+l*A,_=A*_+x%se*se+j[v]+f,f=(_/Z|0)+(x/se|0)+U*l,j[v--]=_%Z;j[v]=f}return f?++c:j.splice(0,1),_e(O,j,c)},n.negated=function(){var O=new q(this);return O.s=-O.s||null,O},n.plus=function(O,E){var f,c=this,p=c.s;if(O=new q(O,E),E=O.s,!p||!E)return new q(NaN);if(p!=E)return O.s=-E,c.minus(O);var v=c.e/tt,g=O.e/tt,x=c.c,S=O.c;if(!v||!g){if(!x||!S)return new q(p/0);if(!x[0]||!S[0])return S[0]?O:new q(x[0]?c:p*0)}if(v=kn(v),g=kn(g),x=x.slice(),p=v-g){for(p>0?(g=v,f=S):(p=-p,f=x),f.reverse();p--;f.push(0));f.reverse()}for(p=x.length,E=S.length,p-E<0&&(f=S,S=x,x=f,E=p),p=0;E;)p=(x[--E]=x[E]+S[E]+p)/es|0,x[E]=es===x[E]?0:x[E]%es;return p&&(x=[p].concat(x),++g),_e(O,x,g)},n.precision=n.sd=function(O,E){var f,c,p,v=this;if(O!=null&&O!==!!O)return xr(O,1,ri),E==null?E=h:xr(E,0,8),Te(new q(v),O,E);if(!(f=v.c))return null;if(p=f.length-1,c=p*tt+1,p=f[p]){for(;p%10==0;p/=10,c--);for(p=f[0];p>=10;p/=10,c++);}return O&&v.e+1>c&&(c=v.e+1),c},n.shiftedBy=function(O){return xr(O,-Hb,Hb),this.times("1e"+O)},n.squareRoot=n.sqrt=function(){var O,E,f,c,p,v=this,g=v.c,x=v.s,S=v.e,_=u+4,l=new q("0.5");if(x!==1||!g||!g[0])return new q(!x||x<0&&(!g||g[0])?NaN:g?v:1/0);if(x=Math.sqrt(+be(v)),x==0||x==1/0?(E=An(g),(E.length+S)%2==0&&(E+="0"),x=Math.sqrt(+E),S=kn((S+1)/2)-(S<0||S%2),x==1/0?E="5e"+S:(E=x.toExponential(),E=E.slice(0,E.indexOf("e")+1)+S),f=new q(E)):f=new q(x+""),f.c[0]){for(S=f.e,x=S+_,x<3&&(x=0);;)if(p=f,f=l.times(p.plus(t(v,p,_,1))),An(p.c).slice(0,x)===(E=An(f.c)).slice(0,x))if(f.e<S&&--x,E=E.slice(x-3,x+1),E=="9999"||!c&&E=="4999"){if(!c&&(Te(p,p.e+u+2,0),p.times(p).eq(v))){f=p;break}_+=4,x+=4,c=1}else{(!+E||!+E.slice(1)&&E.charAt(0)=="5")&&(Te(f,f.e+u+2,1),O=!f.times(f).eq(v));break}}return Te(f,f.e+u+1,h,O)},n.toExponential=function(O,E){return O!=null&&(xr(O,0,ri),O++),ee(this,O,E,1)},n.toFixed=function(O,E){return O!=null&&(xr(O,0,ri),O=O+this.e+1),ee(this,O,E)},n.toFormat=function(O,E,f){var c,p=this;if(f==null)O!=null&&E&&typeof E=="object"?(f=E,E=null):O&&typeof O=="object"?(f=O,O=E=null):f=L;else if(typeof f!="object")throw Error(ji+"Argument not an object: "+f);if(c=p.toFixed(O,E),p.c){var v,g=c.split("."),x=+f.groupSize,S=+f.secondaryGroupSize,_=f.groupSeparator||"",l=g[0],m=g[1],A=p.s<0,U=A?l.slice(1):l,j=U.length;if(S&&(v=x,x=S,S=v,j-=v),x>0&&j>0){for(v=j%x||x,l=U.substr(0,v);v<j;v+=x)l+=_+U.substr(v,x);S>0&&(l+=_+U.slice(v)),A&&(l="-"+l)}c=m?l+(f.decimalSeparator||"")+((S=+f.fractionGroupSize)?m.replace(new RegExp("\\d{"+S+"}\\B","g"),"$&"+(f.fractionGroupSeparator||"")):m):l}return(f.prefix||"")+c+(f.suffix||"")},n.toFraction=function(O){var E,f,c,p,v,g,x,S,_,l,m,A,U=this,j=U.c;if(O!=null&&(x=new q(O),!x.isInteger()&&(x.c||x.s!==1)||x.lt(a)))throw Error(ji+"Argument "+(x.isInteger()?"out of range: ":"not an integer: ")+be(x));if(!j)return new q(U);for(E=new q(a),_=f=new q(a),c=S=new q(a),A=An(j),v=E.e=A.length-U.e-1,E.c[0]=zb[(g=v%tt)<0?tt+g:g],O=!O||x.comparedTo(E)>0?v>0?E:_:x,g=I,I=1/0,x=new q(A),S.c[0]=0;l=t(x,E,0,1),p=f.plus(l.times(c)),p.comparedTo(O)!=1;)f=c,c=p,_=S.plus(l.times(p=_)),S=p,E=x.minus(l.times(p=E)),x=p;return p=t(O.minus(f),c,0,1),S=S.plus(p.times(_)),f=f.plus(p.times(c)),S.s=_.s=U.s,v=v*2,m=t(_,c,v,h).minus(U).abs().comparedTo(t(S,f,v,h).minus(U).abs())<1?[_,c]:[S,f],I=g,m},n.toNumber=function(){return+be(this)},n.toPrecision=function(O,E){return O!=null&&xr(O,1,ri),ee(this,O,E,2)},n.toString=function(O){var E,f=this,c=f.s,p=f.e;return p===null?c?(E="Infinity",c<0&&(E="-"+E)):E="NaN":(O==null?E=p<=b||p>=w?Ld(An(f.c),p):va(An(f.c),p,"0"):O===10&&W?(f=Te(new q(f),u+p+1,h),E=va(An(f.c),f.e,"0")):(xr(O,2,X.length,"Base"),E=r(va(An(f.c),p,"0"),10,O,c,!0)),c<0&&f.c[0]&&(E="-"+E)),E},n.valueOf=n.toJSON=function(){return be(this)},n._isBigNumber=!0,n[Symbol.toStringTag]="BigNumber",n[Symbol.for("nodejs.util.inspect.custom")]=n.valueOf,e!=null&&q.set(e),q}function kn(e){var t=e|0;return e>0||e===t?t:t-1}function An(e){for(var t,r,i=1,n=e.length,a=e[0]+"";i<n;){for(t=e[i++]+"",r=tt-t.length;r--;t="0"+t);a+=t}for(n=a.length;a.charCodeAt(--n)===48;);return a.slice(0,n+1||1)}function gc(e,t){var r,i,n=e.c,a=t.c,u=e.s,h=t.s,b=e.e,w=t.e;if(!u||!h)return null;if(r=n&&!n[0],i=a&&!a[0],r||i)return r?i?0:-h:u;if(u!=h)return u;if(r=u<0,i=b==w,!n||!a)return i?0:!n^r?1:-1;if(!i)return b>w^r?1:-1;for(h=(b=n.length)<(w=a.length)?b:w,u=0;u<h;u++)if(n[u]!=a[u])return n[u]>a[u]^r?1:-1;return b==w?0:b>w^r?1:-1}function xr(e,t,r,i){if(e<t||e>r||e!==On(e))throw Error(ji+(i||"Argument")+(typeof e=="number"?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function Cd(e){var t=e.c.length-1;return kn(e.e/tt)==t&&e.c[t]%2!=0}function Ld(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function va(e,t,r){var i,n;if(t<0){for(n=r+".";++t;n+=r);e=n+e}else if(i=e.length,++t>i){for(n=r,t-=i;--t;n+=r);e+=n}else t<i&&(e=e.slice(0,t)+"."+e.slice(t));return e}var Fq=C4(),Hr=Fq;var YF=yr(jb(),1),ZF=yr(Vd(),1),JF=yr(Wd(),1),ux=yr(Yd(),1),QF=yr(cx(),1);var fx="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",eH=(e,t)=>{let r="1"+"0".repeat(t),i=new Hr(e.toString(10),10);return Ll(i.times(r).toString(16))},tH=(e,t)=>{let r="1"+"0".repeat(t),i=new Hr(e.toString(),10);return parseFloat(i.dividedBy(r).toString())},rH=e=>{typeof e=="string"&&(e=new Uint8Array(Buffer.from(e)));let t=[],r=BigInt("0x"+Buffer.from(e).toString("hex"));for(;r>BigInt(0);){let i=Number(r%BigInt(58));t.unshift(fx[i]),r=r/BigInt(58)}for(let i=0;i<e.length&&e[i]===0;i++)t.unshift(fx[0]);return t.join("")},iH=e=>{let t=BigInt(0);for(let n=0;n<e.length;n++)t=t*BigInt(58)+BigInt(fx.indexOf(e[n]));let r=t.toString(16),i=r.length%2===0?r:"0"+r;return new Uint8Array(Buffer.from(i,"hex"))},nH=e=>Buffer.from(e).toString("utf8"),sH=e=>Buffer.from(e,"utf8"),aH=e=>!isNaN(Number(e)),lx=async e=>{await new Promise(t=>setTimeout(t,e))},px=(e,t)=>JSON.stringify(e)===JSON.stringify(t),oH=e=>{let[t,r]=e.toExponential().split("e").map(n=>parseFloat(n)),i=(t*Math.pow(10,r)).toString();return i=parseFloat(i).toString(),i},$l=async e=>await new Promise((t,r)=>{let i;typeof window<"u"?i=new WebSocket(e):i=new ux.default(e),i.onopen=()=>{t(!0),i.close()},i.onerror=n=>{r(new Error(n.message)),i.close()}}),Jd={add:(e,t,r=18)=>parseFloat(new Hr(e).plus(new Hr(t)).toFixed(r)),sub:(e,t,r=18)=>parseFloat(new Hr(e).minus(new Hr(t)).toFixed(r)),mul:(e,t,r=18)=>parseFloat(new Hr(e).times(new Hr(t)).toFixed(r)),div:(e,t,r=18)=>parseFloat(new Hr(e).div(new Hr(t)).toFixed(r)),pow:(e,t,r=18)=>parseFloat(new Hr(e).pow(t).toFixed(r)),sqrt:(e,t=18)=>parseFloat(new Hr(e).sqrt().toFixed(t)),abs:(e,t=18)=>parseFloat(new Hr(e).absoluteValue().toFixed(t)),ceil:(e,t=18)=>parseFloat(new Hr(e).integerValue(Hr.ROUND_CEIL).toFixed(t)),floor:(e,t=18)=>parseFloat(new Hr(e).integerValue(Hr.ROUND_FLOOR).toFixed(t)),round:(e,t=18)=>parseFloat(new Hr(e).integerValue(Hr.ROUND_HALF_UP).toFixed(t))},cH=()=>typeof window>"u"?!1:function(e){return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(e.substr(0,4)))}(navigator.userAgent||navigator.vendor||window.opera),uH=()=>{if(typeof window>"u")return!1;let e=window.navigator;if(window.WebViewJavascriptBridge||window.webkit&&window.webkit.messageHandlers||e.userAgent.match(/WebView/i))return!0;let t=e.standalone,r=e.userAgent.toLowerCase(),i=/safari/.test(r);return/iphone|ipod|ipad/.test(r)?!t&&!i:r.includes("wv")};var dx={};Na(dx,{AssetDirectionEnum:()=>hx,ErrorTypeEnum:()=>Xl,TransactionListenerProcessIndex:()=>t0,TransactionStatusEnum:()=>e0,TransactionTypeEnum:()=>Qd,WalletPlatformEnum:()=>CT});var hx=(r=>(r.INCOMING="INCOMING",r.OUTGOING="OUTGOING",r))(hx||{}),Qd=(a=>(a.GENERAL="GENERAL",a.CONTRACT="CONTRACT",a.COIN="COIN",a.TOKEN="TOKEN",a.NFT="NFT",a))(Qd||{}),e0=(i=>(i.FAILED="FAILED",i.PENDING="PENDING",i.CONFIRMED="CONFIRMED",i))(e0||{}),Xl=(c=>(c.RPC_TIMEOUT="RPC_TIMEOUT",c.RPC_REQUEST_ERROR="RPC_REQUEST_ERROR",c.RPC_ACCESS_DENIED="RPC_ACCESS_DENIED",c.WS_URL_NOT_DEFINED="WS_URL_NOT_DEFINED",c.WS_CONNECTION_FAILED="WS_CONNECTION_FAILED",c.UNACCEPTED_CHAIN="UNACCEPTED_CHAIN",c.UNAUTHORIZED_ADDRESS="UNAUTHORIZED_ADDRESS",c.INSUFFICIENT_BALANCE="INSUFFICIENT_BALANCE",c.INVALID_AMOUNT="INVALID_AMOUNT",c.INVALID_ADDRESS="INVALID_ADDRESS",c.INVALID_PRIVATE_KEY="INVALID_PRIVATE_KEY",c.INVALID_PUBLIC_KEY="INVALID_PUBLIC_KEY",c.INVALID_TRANSACTION_ID="INVALID_TRANSACTION_ID",c.PROVIDER_IS_REQUIRED="PROVIDER_IS_REQUIRED",c.PROVIDER_IS_NOT_INITIALIZED="PROVIDER_IS_NOT_INITIALIZED",c.PROVIDER_IS_ALREADY_INITIALIZED="PROVIDER_IS_ALREADY_INITIALIZED",c.WALLET_ALREADY_PROCESSING="WALLET_ALREADY_PROCESSING",c.WALLET_CONNECT_REJECTED="WALLET_CONNECT_REJECTED",c.WALLET_REQUEST_REJECTED="WALLET_REQUEST_REJECTED",c.WALLET_CONNECTION_FAILED="WALLET_CONNECTION_FAILED",c.WALLET_CONNECTION_TIMEOUT="WALLET_CONNECTION_TIMEOUT",c.TRANSACTION_CREATION_FAILED="TRANSACTION_CREATION_FAILED",c.TRANSACTION_NOT_FOUND="TRANSACTION_NOT_FOUND",c.CLOSED_WALLETCONNECT_MODAL="CLOSED_WALLETCONNECT_MODAL",c.PROJECT_ID_IS_REQUIRED="PROJECT_ID_IS_REQUIRED",c.METADATA_IS_REQUIRED="METADATA_IS_REQUIRED",c.CONFIG_IS_REQUIRED="CONFIG_IS_REQUIRED",c))(Xl||{}),CT=(n=>(n.BROWSER="BROWSER",n.MOBILE="MOBILE",n.DESKTOP="DESKTOP",n.UNIVERSAL="UNIVERSAL",n))(CT||{});var t0={GENERAL:"generalProcess",CONTRACT:"contractProcess",COIN:"coinProcess",TOKEN:"tokenProcess",NFT:"nftProcess"};var rs=class e{network;api;explorer;wsUrl;blockCypherToken;defaultBlockCypherToken="49d43a59a4f24d31a9731eb067ab971c";static _instance;constructor(t){this.update(t)}static get instance(){if(e._instance===void 0)throw new Error("PROVIDER_IS_NOT_INITIALIZED");return e._instance}static initialize(t){if(e._instance!==void 0)throw new Error("PROVIDER_IS_ALREADY_INITIALIZED");e._instance=new e(t)}async checkRpcConnection(t){try{let r=await In.get(t??this.createEndpoint("blocks/tip/height"));return r.status!==200?new Error(r.statusText+": "+JSON.stringify(r.data)):!0}catch(r){return r}}async checkWsConnection(t){try{let r=await $l(t??this.wsUrl);return r instanceof Error?r:!0}catch(r){return r}}update(t){this.network=t,e._instance=this;let r=this.network.testnet??!1;if(this.blockCypherToken=this.network.blockCypherToken,r){this.api="https://blockstream.info/testnet/api/",this.explorer="https://blockstream.info/testnet/";let i=this.network.blockCypherToken??this.defaultBlockCypherToken;this.wsUrl="wss://socket.blockcypher.com/v1/btc/test3?token="+i}else this.api="https://blockstream.info/api/",this.explorer="https://blockstream.info/",this.network.blockCypherToken!==void 0?this.wsUrl="wss://socket.blockcypher.com/v1/btc/main?token="+this.network.blockCypherToken:this.wsUrl="wss://ws.blockchain.info/inv";this.network.rpcUrl=this.api,this.network.wsUrl=this.wsUrl}createEndpoint(t){return this.api+t}isTestnet(){return this.network?.testnet??!1}};var lH=yr(jh(),1);var bx={};Na(bx,{Coin:()=>gx});var vx={};Na(vx,{base58Decode:()=>iH,base58Encode:()=>rH,bufferToString:()=>nH,checkWebSocket:()=>$l,fromSatoshi:()=>Is,hexToNumber:()=>tH,isMobile:()=>cH,isNumeric:()=>aH,isWebview:()=>uH,math:()=>Jd,numberToHex:()=>eH,objectsEqual:()=>px,sleep:()=>lx,stringToBuffer:()=>sH,toHex:()=>Ll,toReadableString:()=>oH,toSatoshi:()=>mx});var Is=e=>Jd.div(e,1e8,8),mx=e=>Jd.mul(e,1e8,8);var yc=yr(jh(),1);var Yl=class{rawData;signedData;provider;constructor(t,r){this.rawData=t,this.provider=r??rs.instance}async sign(t){return this.rawData.bitcoreLib.sign(t),this.signedData=this.rawData.bitcoreLib.serialize(),this}async send(){try{return(await In({method:"POST",url:this.provider.createEndpoint("tx"),data:this.signedData})).data}catch(t){throw new Error(JSON.stringify(t.response?.data))}}getRawData(){return this.rawData}getSignedData(){return this.signedData??""}};var gx=class{provider;constructor(t){this.provider=t??rs.instance}getName(){return"Bitcoin"}getSymbol(){return"BTC"}getDecimals(){return 8}async getBalance(t){let r=this.provider.createEndpoint("address/"+t),i=await In.get(r).then(a=>a.data),n=i.chain_stats.funded_txo_sum-i.chain_stats.spent_txo_sum;return Is(n)}async transfer(t,r,i){if(i<0)throw new Error("INVALID_AMOUNT");if(i>await this.getBalance(t))throw new Error("INSUFFICIENT_BALANCE");if(t===r)throw new Error("INVALID_ADDRESS");let n=[],a=new yc.Transaction,u=new yc.Address(t),h=mx(i),b=await In.get(this.provider.createEndpoint("address/"+t+"/utxo")).then(w=>w.data);for(let w of b)n.push(new yc.Transaction.UnspentOutput({txId:w.txid,satoshis:w.value,address:u,outputIndex:w.vout,script:yc.Script.fromAddress(u)}));return a.from(n),a.change(t),a.to(r,h),new Yl({sender:t,receiver:r,amount:h,bitcoreLib:a})}};var xx={};Na(xx,{CoinTransaction:()=>Zl,Transaction:()=>wc});var LT=0,wc=class{id;provider;data=null;constructor(t,r){this.id=t,this.provider=r??rs.instance}async getData(){if(this.data!==null)return this.data;try{let t=(await In.get(this.provider.createEndpoint("tx/"+this.id))).data;return t?.txid!==this.id?this.data=null:this.data=t}catch(t){if(String(t?.response?.data).includes("Transaction not found")){if(LT>5)throw new Error("TRANSACTION_NOT_FOUND");return LT++,await lx(2e3),await this.getData()}throw new Error("RPC_REQUEST_ERROR")}}async wait(t=4e3){return await new Promise((r,i)=>{let n=async()=>{try{let a=await this.getStatus();if(a==="CONFIRMED"){r("CONFIRMED");return}else if(a==="FAILED"){i("FAILED");return}setTimeout(n,t)}catch{i("FAILED")}};n()})}getId(){return this.id}async getType(){return"COIN"}getUrl(){return this.provider.explorer+"tx/"+this.id}async getSigner(){return(await this.getData())?.vin[0].prevout.scriptpubkey_address??""}async getFee(){let t=await this.getData();return Is(t?.fee??0)}async getBlockNumber(){return(await this.getData())?.status?.block_height??0}async getBlockTimestamp(){return(await this.getData())?.status?.block_time??0}async getBlockConfirmationCount(){let t=await this.getData();return t===null?0:(await In.get(this.provider.createEndpoint("blocks/tip/height"))).data-t?.status?.block_height}async getStatus(){let t=await this.getData();return t===null?"PENDING":t.status?.block_height!==void 0?t.status.confirmed?"CONFIRMED":"FAILED":"PENDING"}};var Zl=class extends wc{async getReceiver(){return(await this.getData())?.vout[0].scriptpubkey_address??""}async getSender(){return await this.getSigner()}async getAmount(){let t=await this.getData();return Is(t?.vout[0].value??0)}async verifyTransfer(t,r,i){if(await this.getStatus()==="PENDING")return"PENDING";if(await this.getAmount()!==i)return"FAILED";if(t==="INCOMING"){if((await this.getReceiver()).toLowerCase()!==r.toLowerCase())return"FAILED"}else if((await this.getSender()).toLowerCase()!==r.toLowerCase())return"FAILED";return"CONFIRMED"}};var yx={};Na(yx,{TransactionListener:()=>_x,TransactionSigner:()=>Yl});var HT=yr(FT(),1);var _x=class{type;provider;status=!1;callbacks=[];triggeredTransactions=[];filter;webSocket;dynamicStop=()=>{};constructor(t,r,i){this.type=t,this.filter=r??{},this.provider=i??rs.instance}stop(){this.status&&(this.status=!1,this.dynamicStop())}start(){this.status||(this.status=!0,this[t0[this.type]]())}getStatus(){return this.status}async on(t){if(this.webSocket===void 0)try{await $l(this.provider.wsUrl),this.webSocket=new HT.default(this.provider.wsUrl)}catch(r){throw new Error("WebSocket connection is not available"+(r instanceof Error?": "+r.message:""))}return this.start(),this.callbacks.push(t),!0}trigger(t){this.triggeredTransactions.includes(t.id)||(this.triggeredTransactions.push(t.id),this.callbacks.forEach(r=>{r(t)}))}isBlockCypherProcess(){return this.provider.isTestnet()||this.provider.blockCypherToken!==void 0}createMessage(t){let r;if(this.isBlockCypherProcess()){let i={event:"unconfirmed-tx",token:this.provider.blockCypherToken??this.provider.defaultBlockCypherToken};t!==void 0&&(i.address=t),r=JSON.stringify(i)}else r=JSON.stringify({op:"unconfirmed_sub"});return this.dynamicStop=()=>{this.isBlockCypherProcess()||this.webSocket.send(JSON.stringify({op:"unconfirmed_unsub"})),this.webSocket.close()},r}getValues(t){let r={txId:""};return this.isBlockCypherProcess()?(r.txId=t.hash,r.sender=t.inputs[0].addresses[0],r.receiver=t.outputs[0].addresses[0],r.amount=Is(t.outputs[0].value)):(r.txId=t.x.hash,r.receiver=t.x.out[0].addr,r.sender=t.x.inputs[0].prev_out.addr,r.amount=Is(t.x.out[0].value)),r}generalProcess(){let t=this.createMessage();this.webSocket.addEventListener("open",()=>{this.webSocket.send(t)}),this.webSocket.addEventListener("message",async r=>{let i=this.getValues(JSON.parse(r.data));this.filter?.signer!==void 0&&i.sender!==this.filter.signer.toLowerCase()||this.trigger(new wc(i.txId))})}contractProcess(){throw new Error("This method is not implemented for Bitcoin.")}coinProcess(){let t=this.filter;if(t.signer!==void 0&&t.sender!==void 0&&t.signer!==t.sender)throw new Error("Sender and signer must be the same in coin transactions. Or only one of them can be defined.");let r=t.sender??t.signer,i=this.createMessage(t.receiver);this.webSocket.addEventListener("open",()=>{this.webSocket.send(i)}),this.webSocket.addEventListener("message",async n=>{let a=JSON.parse(n.data),u={},h={};if(String(a.event).includes("events limit reached"))throw new Error("BlockCypher events limit reached.");let b=this.getValues(a);if(r!==void 0&&(u.sender=r.toLowerCase(),h.sender=b.sender?.toLowerCase()),t.receiver!==void 0&&(u.receiver=t.receiver.toLowerCase(),h.receiver=b.receiver?.toLowerCase()),!px(u,h))return;let w=new Zl(b.txId);t.amount!==void 0&&b.amount!==t.amount||this.trigger(w)})}tokenProcess(){throw new Error("This method is not implemented for Bitcoin.")}nftProcess(){throw new Error("This method is not implemented for Bitcoin.")}};Pn.Address.prototype._classifyArguments=function(e,t,r){if((e instanceof Buffer||e instanceof Uint8Array)&&(e.length===20||e.length===32))return Pn.Address._transformHash(e,t,r);if((e instanceof Buffer||e instanceof Uint8Array)&&e.length>=21)return Pn.Address._transformBuffer(e,t,r);if(e instanceof Pn.PublicKey)return Pn.Address._transformPublicKey(e,t,r);if(e instanceof Pn.Script)return Pn.Address._transformScript(e,t);if(typeof e=="string")return Pn.Address._transformString(e,t,r);if(zT.default.isObject(e))return Pn.Address._transformObject(e);throw new TypeError("First argument is an unrecognized data format.")};0&&(module.exports={Provider,assets,bitcore,models,services,types,utils});
38
+ `)}`}_compileErrors(){return this.errors.map(qC)}};var Kn={};Oa(Kn,{abiSchemaToJsonSchema:()=>ed,codePointToInt:()=>oI,ensureIfUint8Array:()=>Wg,ethAbiToJsonSchema:()=>zg,fetchArrayElement:()=>Vg,hexToNumber:()=>td,hexToUint8Array:()=>rd,numberToHex:()=>jg,padLeft:()=>cI,parseBaseType:()=>gs,transformJsonDataToAbiFormat:()=>Qh,uint8ArrayToHexString:()=>nl});var nI=["bool","int","uint","bytes","string","address","tuple"];var Fg=e=>typeof e=="object"&&"type"in e&&"name"in e;var sI=e=>typeof e=="string",dr=e=>typeof e=="string"&&/^((-)?0x[0-9a-f]+|(0x))$/i.test(e);var Jh=e=>typeof e=="number"||typeof e=="bigint"||typeof e=="string"&&/^((-0x|0x|-)?[0-9a-f]+|(0x))$/i.test(e);var FC=["hex","number","blockNumber","blockNumberOrTag","filter","bloom"],gs=e=>{let t=e.replace(/ /,""),r,i=!1,n=[];if(e.includes("[")&&(t=t.slice(0,t.indexOf("[")),n=[...e.matchAll(/(?:\[(\d*)\])/g)].map(o=>parseInt(o[1],10)).map(o=>Number.isNaN(o)?-1:o),i=n.length>0),nI.includes(t))return{baseType:t,isArray:i,baseTypeSize:r,arraySizes:n};if(t.startsWith("int"))r=parseInt(t.substring(3),10),t="int";else if(t.startsWith("uint"))r=parseInt(e.substring(4),10),t="uint";else if(t.startsWith("bytes"))r=parseInt(t.substring(5),10),t="bytes";else return{baseType:void 0,isArray:!1,baseTypeSize:void 0,arraySizes:n};return{baseType:t,isArray:i,baseTypeSize:r,arraySizes:n}},Hg=(e,t={})=>{if(Object.keys(t).includes("type"))throw new pa([{keyword:"eth",message:'Either "eth" or "type" can be presented in schema',params:{eth:e},instancePath:"",schemaPath:""}]);let{baseType:i,baseTypeSize:n}=gs(e);if(!i&&!FC.includes(e))throw new pa([{keyword:"eth",message:`Eth data type "${e}" is not valid`,params:{eth:e},instancePath:"",schemaPath:""}]);if(i){if(i==="tuple")throw new Error('"tuple" type is not implemented directly.');return{format:`${i}${n??""}`,required:!0}}return e?{format:e,required:!0}:{}},ed=(e,t="/0")=>{let r={type:"array",items:[],maxItems:e.length,minItems:e.length};for(let[i,n]of e.entries()){let o,u,m=[];Fg(n)?(o=n.type,u=n.name,m=n.components):typeof n=="string"?(o=n,u=`${t}/${i}`):Array.isArray(n)&&(n[0]&&typeof n[0]=="string"&&n[0].startsWith("tuple")&&!Array.isArray(n[0])&&n[1]&&Array.isArray(n[1])?(o=n[0],u=`${t}/${i}`,m=n[1]):(o="tuple",u=`${t}/${i}`,m=n));let{baseType:_,isArray:w,arraySizes:I}=gs(o),T,N=r;for(let C=I.length-1;C>0;C-=1)T={type:"array",items:[],maxItems:I[C],minItems:I[C]},I[C]<0&&(delete T.maxItems,delete T.minItems),Array.isArray(N.items)?N.items.length===0?N.items=T:N.items.push(T):N.items=[N.items,T],N=T;if(_==="tuple"&&!w){let C=ed(m,u);C.$id=u,N.items.push(C)}else if(_==="tuple"&&w){let C=I[0],B={$id:u,type:"array",items:ed(m,u),maxItems:C,minItems:C};C<0&&(delete B.maxItems,delete B.minItems),N.items.push(B)}else if(w){let C=I[0],B={type:"array",$id:u,items:Hg(String(_)),minItems:C,maxItems:C};C<0&&(delete B.maxItems,delete B.minItems),N.items.push(B)}else Array.isArray(N.items)?N.items.push(Object.assign({$id:u},Hg(o))):N.items.items.push(Object.assign({$id:u},Hg(o)));N=r}return r},zg=e=>ed(e),Vg=(e,t)=>t===1?e:Vg(e[0],t-1),Qh=(e,t,r)=>{let i=[];for(let[n,o]of e.entries()){let u,m,_=[];Fg(o)?(u=o.type,m=o.name,_=o.components):typeof o=="string"?u=o:Array.isArray(o)&&(o[1]&&Array.isArray(o[1])?(u=o[0],_=o[1]):(u="tuple",_=o));let{baseType:w,isArray:I,arraySizes:T}=gs(u),N=Array.isArray(t)?t[n]:t[m];if(w==="tuple"&&!I)i.push(Qh(_,N,r));else if(w==="tuple"&&I){let C=[];for(let B of N)if(T.length>1){let U=Vg(B,T.length-1),Z=[];for(let $ of U)Z.push(Qh(_,$,r));C.push(Z)}else C.push(Qh(_,B,r));i.push(C)}else i.push(N)}return r=r??[],r.push(...i),r},oI=e=>{if(e>=48&&e<=57)return e-48;if(e>=65&&e<=70)return e-55;if(e>=97&&e<=102)return e-87;throw new Error(`Invalid code point: ${e}`)},td=e=>{if(!dr(e))throw new Error("Invalid hex string");let[t,r]=e.startsWith("-")?[!0,e.slice(1)]:[!1,e],i=BigInt(r);return i>Number.MAX_SAFE_INTEGER?t?-i:i:i<Number.MIN_SAFE_INTEGER?i:t?-1*Number(i):Number(i)},jg=e=>{if((typeof e=="number"||typeof e=="bigint")&&e<0)return`-0x${e.toString(16).slice(1)}`;if((typeof e=="number"||typeof e=="bigint")&&e>=0)return`0x${e.toString(16)}`;if(typeof e=="string"&&dr(e)){let[t,r]=e.startsWith("-")?[!0,e.slice(1)]:[!1,e],i=r.split(/^(-)?0(x|X)/).slice(-1)[0];return`${t?"-":""}0x${i.replace(/^0+/,"").toLowerCase()}`}if(typeof e=="string"&&!dr(e))return jg(BigInt(e));throw new zf(e)},cI=(e,t,r="0")=>{if(typeof e=="string"&&!dr(e))return e.padStart(t,r);let i=typeof e=="string"&&dr(e)?e:jg(e),[n,o]=i.startsWith("-")?["-0x",i.slice(3)]:["0x",i.slice(2)];return`${n}${o.padStart(t,r)}`};function nl(e){let t="0x";for(let r of e){let i=r.toString(16);t+=i.length===1?`0${i}`:i}return t}var ha={zero:48,nine:57,A:65,F:70,a:97,f:102};function aI(e){if(e>=ha.zero&&e<=ha.nine)return e-ha.zero;if(e>=ha.A&&e<=ha.F)return e-(ha.A-10);if(e>=ha.a&&e<=ha.f)return e-(ha.a-10)}function rd(e){let t=0;if(e.startsWith("0")&&(e[1]==="x"||e[1]==="X")&&(t=2),e.length%2!==0)throw new so(`hex string has odd length: ${e}`);let r=(e.length-t)/2,i=new Uint8Array(r);for(let n=0,o=t;n<r;n+=1){let u=aI(e.charCodeAt(o++)),m=aI(e.charCodeAt(o++));if(u===void 0||m===void 0)throw new so(`Invalid byte sequence ("${e[o-2]}${e[o-1]}" in "${e}").`);i[n]=u*16+m}return i}function Wg(e){var t;return!(e instanceof Uint8Array)&&((t=e?.constructor)===null||t===void 0?void 0:t.name)==="Uint8Array"?Uint8Array.from(e):e}var id=e=>{var t;return e instanceof Uint8Array||((t=e?.constructor)===null||t===void 0?void 0:t.name)==="Uint8Array"},Kg=(e,t={abiType:"bytes"})=>{if(typeof e!="string"&&!Array.isArray(e)&&!id(e)||typeof e=="string"&&dr(e)&&e.startsWith("-")||typeof e=="string"&&!dr(e))return!1;let r;if(typeof e=="string"){if(e.length%2!==0)return!1;r=rd(e)}else if(Array.isArray(e)){if(e.some(i=>i<0||i>255||!Number.isInteger(i)))return!1;r=new Uint8Array(e)}else r=e;if(t?.abiType){let{baseTypeSize:i}=gs(t.abiType);return i?r.length===i:!0}return t?.size?r.length===t?.size:!0};var uI=e=>{if(!/^(0x)?[0-9a-f]{40}$/i.test(e))return!1;let t=e.slice(2),r=bu(t.toLowerCase()),i=nl(Hf(Wg(r))).slice(2);for(let n=0;n<40;n+=1)if(parseInt(i[n],16)>7&&t[n].toUpperCase()!==t[n]||parseInt(i[n],16)<=7&&t[n].toLowerCase()!==t[n])return!1;return!0},xs=(e,t=!0)=>{if(typeof e!="string"&&!id(e))return!1;let r;return id(e)?r=nl(e):typeof e=="string"&&!dr(e)?r=e.toLowerCase().startsWith("0x")?e:`0x${e}`:r=e,/^(0x)?[0-9a-f]{40}$/i.test(r)?/^(0x|0X)?[0-9a-f]{40}$/.test(r)||/^(0x|0X)?[0-9A-F]{40}$/.test(r)?!0:t?uI(r):!0:!1};var sl;(function(e){e.NUMBER="NUMBER_NUMBER",e.HEX="NUMBER_HEX",e.STR="NUMBER_STR",e.BIGINT="NUMBER_BIGINT"})(sl||(sl={}));var al;(function(e){e.HEX="BYTES_HEX",e.UINT8ARRAY="BYTES_UINT8ARRAY"})(al||(al={}));var nG={number:sl.BIGINT,bytes:al.HEX},sG={number:sl.HEX,bytes:al.HEX};var ol;(function(e){e.EARLIEST="earliest",e.LATEST="latest",e.PENDING="pending",e.SAFE="safe",e.FINALIZED="finalized"})(ol||(ol={}));var fI;(function(e){e.chainstart="chainstart",e.frontier="frontier",e.homestead="homestead",e.dao="dao",e.tangerineWhistle="tangerineWhistle",e.spuriousDragon="spuriousDragon",e.byzantium="byzantium",e.constantinople="constantinople",e.petersburg="petersburg",e.istanbul="istanbul",e.muirGlacier="muirGlacier",e.berlin="berlin",e.london="london",e.altair="altair",e.arrowGlacier="arrowGlacier",e.grayGlacier="grayGlacier",e.bellatrix="bellatrix",e.merge="merge",e.capella="capella",e.shanghai="shanghai"})(fI||(fI={}));var lI=Object.getPrototypeOf(Uint8Array);var pI=function(e,t,r,i){function n(o){return o instanceof r?o:new r(function(u){u(o)})}return new(r||(r=Promise))(function(o,u){function m(I){try{w(i.next(I))}catch(T){u(T)}}function _(I){try{w(i.throw(I))}catch(T){u(T)}}function w(I){I.done?o(I.value):n(I.value).then(m,_)}w((i=i.apply(e,t||[])).next())})},hI=Symbol.for("web3/base-provider"),Gg=class e{static isWeb3Provider(t){return t instanceof e||!!(t&&t[hI])}get[hI](){return!0}send(t,r){this.request(t).then(i=>{r(null,i)}).catch(i=>{r(i)})}sendAsync(t){return pI(this,void 0,void 0,function*(){return this.request(t)})}asEIP1193Provider(){let t=Object.create(this),r=t.request;return t.request=function(n){return pI(this,void 0,void 0,function*(){return(yield r(n)).result})},t.asEIP1193Provider=void 0,t}};var nd=(e,t)=>{let r=e;for(let i=1;i<t;i+=1)r*=e;return r},fo=(e,t={abiType:"uint"})=>{if(!["number","string","bigint"].includes(typeof e)||typeof e=="string"&&e.length===0)return!1;let r;if(t?.abiType){let{baseTypeSize:n}=gs(t.abiType);n&&(r=n)}else t.bitSize&&(r=t.bitSize);let i=nd(BigInt(2),BigInt(r??256))-BigInt(1);try{let n=typeof e=="string"&&dr(e)?BigInt(td(e)):BigInt(e);return n>=0&&n<=i}catch{return!1}},dc=(e,t={abiType:"int"})=>{if(!["number","string","bigint"].includes(typeof e)||typeof e=="number"&&e>Number.MAX_SAFE_INTEGER)return!1;let r;if(t?.abiType){let{baseTypeSize:o,baseType:u}=gs(t.abiType);if(u!=="int")return!1;o&&(r=o)}else t.bitSize&&(r=t.bitSize);let i=nd(BigInt(2),BigInt((r??256)-1)),n=BigInt(-1)*nd(BigInt(2),BigInt((r??256)-1));try{let o=typeof e=="string"&&dr(e)?BigInt(td(e)):BigInt(e);return o>=n&&o<=i}catch{return!1}},dI=e=>!!(dc(e)||typeof e=="string"&&/[0-9.]/.test(e)&&e.indexOf(".")===e.lastIndexOf(".")||typeof e=="number");var $g=e=>fo(e),sd=e=>Object.values(ol).includes(e),cl=e=>sd(e)||$g(e);var ad=e=>typeof e!="string"||!/^(0x)?[0-9a-f]{512}$/i.test(e)?!1:!!(/^(0x)?[0-9a-f]{512}$/.test(e)||/^(0x)?[0-9A-F]{512}$/.test(e));var mI=e=>["number","string","boolean"].includes(typeof e)?typeof e=="boolean"?!0:typeof e=="string"&&!dr(e)?e==="1"||e==="0":typeof e=="string"&&dr(e)?e==="0x1"||e==="0x0":e===1||e===0:!1;var Li=e=>e==null;var od=e=>typeof e!="string"||!/^(0x)?[0-9a-f]{64}$/i.test(e)?!1:!!(/^(0x)?[0-9a-f]{64}$/.test(e)||/^(0x)?[0-9A-F]{64}$/.test(e));var vI=e=>{let t=["fromBlock","toBlock","address","topics","blockHash"];if(Li(e)||typeof e!="object"||!Object.keys(e).every(r=>t.includes(r))||!Li(e.fromBlock)&&!cl(e.fromBlock)||!Li(e.toBlock)&&!cl(e.toBlock))return!1;if(!Li(e.address)){if(Array.isArray(e.address)){if(!e.address.every(r=>xs(r)))return!1}else if(!xs(e.address))return!1}return!(!Li(e.topics)&&!e.topics.every(r=>Li(r)?!0:Array.isArray(r)?r.every(i=>od(i)):!!od(r)))};var Au={address:e=>xs(e),bloom:e=>ad(e),blockNumber:e=>$g(e),blockTag:e=>sd(e),blockNumberOrTag:e=>cl(e),bool:e=>mI(e),bytes:e=>Kg(e),filter:e=>vI(e),hex:e=>dr(e),uint:e=>fo(e),int:e=>dc(e),number:e=>dI(e),string:e=>sI(e)};for(let e=8;e<=256;e+=8)Au[`int${e}`]=t=>dc(t,{bitSize:e}),Au[`uint${e}`]=t=>fo(t,{bitSize:e});for(let e=1;e<=32;e+=1)Au[`bytes${e}`]=t=>Kg(t,{size:e});Au.bytes256=Au.bytes;var Yg=Au;var ul=e=>{if((!e?.type||e?.type==="object")&&e?.properties){let t={};for(let r of Object.keys(e.properties)){let i=ul(e.properties[r]);i&&(t[r]=i)}return Array.isArray(e.required)?Wn.object(t).partial().required(e.required.reduce((r,i)=>Object.assign(Object.assign({},r),{[i]:!0}),{})):Wn.object(t).partial()}if(e?.type==="array"&&e?.items){if(Array.isArray(e.items)&&e.items.length>0){let t=[];for(let r of e.items){let i=ul(r);i&&t.push(i)}return Wn.tuple(t)}return Wn.array(ul(e.items))}if(e.oneOf&&Array.isArray(e.oneOf))return Wn.union(e.oneOf.map(t=>ul(t)));if(e?.format){if(!Yg[e.format])throw new Vh(e.format);return Wn.any().refine(Yg[e.format],t=>({params:{value:t,format:e.format}}))}return e?.type&&e?.type!=="object"&&typeof Wn[String(e.type)]=="function"?Wn[String(e.type)]():Wn.object({data:Wn.any()}).partial()},cd=class e{static factory(){return e.validatorInstance||(e.validatorInstance=new e),e.validatorInstance}validate(t,r,i){var n,o;let m=ul(t).safeParse(r);if(!m.success){let _=this.convertErrors((o=(n=m.error)===null||n===void 0?void 0:n.issues)!==null&&o!==void 0?o:[]);if(_){if(i?.silent)return _;throw new pa(_)}}}convertErrors(t){if(t&&Array.isArray(t)&&t.length>0)return t.map(r=>{var i;let n,o,u,m;m=r.path.join("/");let _=String(r.path[r.path.length-1]),w=r.path.join("/");if(r.code===fe.too_big)o="maxItems",m=`${w}/maxItems`,u={limit:r.maximum},n=`must NOT have more than ${r.maximum} items`;else if(r.code===fe.too_small)o="minItems",m=`${w}/minItems`,u={limit:r.minimum},n=`must NOT have fewer than ${r.minimum} items`;else if(r.code===fe.custom){let{value:I,format:T}=(i=r.params)!==null&&i!==void 0?i:{};typeof I>"u"?n=`value at "/${m}" is required`:n=`value "${typeof I=="object"?JSON.stringify(I):I}" at "/${m}" must pass "${T}" validation`,u={value:I}}return{keyword:o??_,instancePath:w?`/${w}`:"",schemaPath:m?`#${m}`:"#",params:u??{value:r.message},message:n??r.message}})}};var ud=class{constructor(){this._validator=cd.factory()}validateJSONSchema(t,r,i){return this._validator.validate(t,r,i)}validate(t,r,i={silent:!1}){var n,o;let u=zg(t);if(!(Array.isArray(u.items)&&((n=u.items)===null||n===void 0?void 0:n.length)===0&&r.length===0)){if(Array.isArray(u.items)&&((o=u.items)===null||o===void 0?void 0:o.length)===0&&r.length!==0)throw new pa([{instancePath:"/0",schemaPath:"/",keyword:"required",message:"empty schema against data can not be validated",params:r}]);return this._validator.validate(u,r,i)}}};var fl=new ud;function Zg(e){var t;return e instanceof Uint8Array||((t=e?.constructor)===null||t===void 0?void 0:t.name)==="Uint8Array"}var W$={noether:BigInt(0),wei:BigInt(1),kwei:BigInt(1e3),Kwei:BigInt(1e3),babbage:BigInt(1e3),femtoether:BigInt(1e3),mwei:BigInt(1e6),Mwei:BigInt(1e6),lovelace:BigInt(1e6),picoether:BigInt(1e6),gwei:BigInt(1e9),Gwei:BigInt(1e9),shannon:BigInt(1e9),nanoether:BigInt(1e9),nano:BigInt(1e9),szabo:BigInt(1e12),microether:BigInt(1e12),micro:BigInt(1e12),finney:BigInt(1e15),milliether:BigInt(1e15),milli:BigInt(1e15),ether:BigInt("1000000000000000000"),kether:BigInt("1000000000000000000000"),grand:BigInt("1000000000000000000000"),mether:BigInt("1000000000000000000000000"),gether:BigInt("1000000000000000000000000000"),tether:BigInt("1000000000000000000000000000000")},Jg=e=>{if(fl.validate(["bytes"],[e]),Zg(e))return e;if(Array.isArray(e))return new Uint8Array(e);if(typeof e=="string")return Kn.hexToUint8Array(e);throw new so(e)},{uint8ArrayToHexString:jC}=Kn,ll=e=>jC(Jg(e));var Ou=(e,t)=>{typeof e!="bigint"&&fl.validate(["int"],[e]);let r=Kn.numberToHex(e);return t&&(!r.startsWith("-")&&r.length%2===1?r="0x0".concat(r.slice(2)):r.length%2===0&&r.startsWith("-")&&(r="-0x0".concat(r.slice(3)))),r};var Xg=e=>{fl.validate(["string"],[e]);let t=e.replace(/^(?:\u0000)/,"");return t=t.replace(/(?:\u0000)$/,""),ll(new TextEncoder().encode(t))};var pl=(e,t)=>{if(typeof e=="string"&&xs(e))return t?"address":`0x${e.toLowerCase().replace(/^0x/i,"")}`;if(typeof e=="boolean")return t?"bool":e?"0x01":"0x00";if(typeof e=="number")return t?e<0?"int256":"uint256":Ou(e);if(typeof e=="bigint")return t?"bigint":Ou(e);if(typeof e=="object"&&e)return t?"string":Xg(JSON.stringify(e));if(typeof e=="string"){if(e.startsWith("-0x")||e.startsWith("-0X"))return t?"int256":Ou(e);if(dr(e))return t?"bytes":e;if(Jh(e)&&!dc(e)&&!fo(e))return t?"bytes":`0x${e}`;if(Jh(e)&&!dc(e)&&fo(e))return t?"uint":Ou(e);if(!Number.isFinite(e))return t?"string":Xg(e)}throw new zh(e)};var bI=_r(xI(),1);var{parseBaseType:TY}=Kn;var YC;YC=Symbol.toStringTag;var ZC=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,ex=Math.ceil,yn=Math.floor,Ui="[BigNumber Error] ",yI=Ui+"Number primitive has more than 15 significant digits: ",Gn=1e14,Qe=14,tx=9007199254740991,rx=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],lo=1e7,ri=1e9;function wI(e){var t,r,i,n=H.prototype={constructor:H,toString:null,valueOf:null},o=new H(1),u=20,m=4,_=-7,w=21,I=-1e7,T=1e7,N=!1,C=1,B=0,U={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},Z="0123456789abcdefghijklmnopqrstuvwxyz",$=!0;function H(O,E){var f,c,p,v,g,x,S,b,l=this;if(!(l instanceof H))return new H(O,E);if(E==null){if(O&&O._isBigNumber===!0){l.s=O.s,!O.c||O.e>T?l.c=l.e=null:O.e<I?l.c=[l.e=0]:(l.e=O.e,l.c=O.c.slice());return}if((x=typeof O=="number")&&O*0==0){if(l.s=1/O<0?(O=-O,-1):1,O===~~O){for(v=0,g=O;g>=10;g/=10,v++);v>T?l.c=l.e=null:(l.e=v,l.c=[O]);return}b=String(O)}else{if(!ZC.test(b=String(O)))return i(l,b,x);l.s=b.charCodeAt(0)==45?(b=b.slice(1),-1):1}(v=b.indexOf("."))>-1&&(b=b.replace(".","")),(g=b.search(/e/i))>0?(v<0&&(v=g),v+=+b.slice(g+1),b=b.substring(0,g)):v<0&&(v=b.length)}else{if(xr(E,2,Z.length,"Base"),E==10&&$)return l=new H(O),Se(l,u+l.e+1,m);if(b=String(O),x=typeof O=="number"){if(O*0!=0)return i(l,b,x,E);if(l.s=1/O<0?(b=b.slice(1),-1):1,H.DEBUG&&b.replace(/^0\.0*|\./,"").length>15)throw Error(yI+O)}else l.s=b.charCodeAt(0)===45?(b=b.slice(1),-1):1;for(f=Z.slice(0,E),v=g=0,S=b.length;g<S;g++)if(f.indexOf(c=b.charAt(g))<0){if(c=="."){if(g>v){v=S;continue}}else if(!p&&(b==b.toUpperCase()&&(b=b.toLowerCase())||b==b.toLowerCase()&&(b=b.toUpperCase()))){p=!0,g=-1,v=0;continue}return i(l,String(O),x,E)}x=!1,b=r(b,E,10,l.s),(v=b.indexOf("."))>-1?b=b.replace(".",""):v=b.length}for(g=0;b.charCodeAt(g)===48;g++);for(S=b.length;b.charCodeAt(--S)===48;);if(b=b.slice(g,++S)){if(S-=g,x&&H.DEBUG&&S>15&&(O>tx||O!==yn(O)))throw Error(yI+l.s*O);if((v=v-g-1)>T)l.c=l.e=null;else if(v<I)l.c=[l.e=0];else{if(l.e=v,l.c=[],g=(v+1)%Qe,v<0&&(g+=Qe),g<S){for(g&&l.c.push(+b.slice(0,g)),S-=Qe;g<S;)l.c.push(+b.slice(g,g+=Qe));g=Qe-(b=b.slice(g)).length}else g-=S;for(;g--;b+="0");l.c.push(+b)}}else l.c=[l.e=0]}H.clone=wI,H.ROUND_UP=0,H.ROUND_DOWN=1,H.ROUND_CEIL=2,H.ROUND_FLOOR=3,H.ROUND_HALF_UP=4,H.ROUND_HALF_DOWN=5,H.ROUND_HALF_EVEN=6,H.ROUND_HALF_CEIL=7,H.ROUND_HALF_FLOOR=8,H.EUCLID=9,H.config=H.set=function(O){var E,f;if(O!=null)if(typeof O=="object"){if(O.hasOwnProperty(E="DECIMAL_PLACES")&&(f=O[E],xr(f,0,ri,E),u=f),O.hasOwnProperty(E="ROUNDING_MODE")&&(f=O[E],xr(f,0,8,E),m=f),O.hasOwnProperty(E="EXPONENTIAL_AT")&&(f=O[E],f&&f.pop?(xr(f[0],-ri,0,E),xr(f[1],0,ri,E),_=f[0],w=f[1]):(xr(f,-ri,ri,E),_=-(w=f<0?-f:f))),O.hasOwnProperty(E="RANGE"))if(f=O[E],f&&f.pop)xr(f[0],-ri,-1,E),xr(f[1],1,ri,E),I=f[0],T=f[1];else if(xr(f,-ri,ri,E),f)I=-(T=f<0?-f:f);else throw Error(Ui+E+" cannot be zero: "+f);if(O.hasOwnProperty(E="CRYPTO"))if(f=O[E],f===!!f)if(f)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))N=f;else throw N=!f,Error(Ui+"crypto unavailable");else N=f;else throw Error(Ui+E+" not true or false: "+f);if(O.hasOwnProperty(E="MODULO_MODE")&&(f=O[E],xr(f,0,9,E),C=f),O.hasOwnProperty(E="POW_PRECISION")&&(f=O[E],xr(f,0,ri,E),B=f),O.hasOwnProperty(E="FORMAT"))if(f=O[E],typeof f=="object")U=f;else throw Error(Ui+E+" not an object: "+f);if(O.hasOwnProperty(E="ALPHABET"))if(f=O[E],typeof f=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(f))$=f.slice(0,10)=="0123456789",Z=f;else throw Error(Ui+E+" invalid: "+f)}else throw Error(Ui+"Object expected: "+O);return{DECIMAL_PLACES:u,ROUNDING_MODE:m,EXPONENTIAL_AT:[_,w],RANGE:[I,T],CRYPTO:N,MODULO_MODE:C,POW_PRECISION:B,FORMAT:U,ALPHABET:Z}},H.isBigNumber=function(O){if(!O||O._isBigNumber!==!0)return!1;if(!H.DEBUG)return!0;var E,f,c=O.c,p=O.e,v=O.s;e:if({}.toString.call(c)=="[object Array]"){if((v===1||v===-1)&&p>=-ri&&p<=ri&&p===yn(p)){if(c[0]===0){if(p===0&&c.length===1)return!0;break e}if(E=(p+1)%Qe,E<1&&(E+=Qe),String(c[0]).length==E){for(E=0;E<c.length;E++)if(f=c[E],f<0||f>=Gn||f!==yn(f))break e;if(f!==0)return!0}}}else if(c===null&&p===null&&(v===null||v===1||v===-1))return!0;throw Error(Ui+"Invalid BigNumber: "+O)},H.maximum=H.max=function(){return ce(arguments,-1)},H.minimum=H.min=function(){return ce(arguments,1)},H.random=function(){var O=9007199254740992,E=Math.random()*O&2097151?function(){return yn(Math.random()*O)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(f){var c,p,v,g,x,S=0,b=[],l=new H(o);if(f==null?f=u:xr(f,0,ri),g=ex(f/Qe),N)if(crypto.getRandomValues){for(c=crypto.getRandomValues(new Uint32Array(g*=2));S<g;)x=c[S]*131072+(c[S+1]>>>11),x>=9e15?(p=crypto.getRandomValues(new Uint32Array(2)),c[S]=p[0],c[S+1]=p[1]):(b.push(x%1e14),S+=2);S=g/2}else if(crypto.randomBytes){for(c=crypto.randomBytes(g*=7);S<g;)x=(c[S]&31)*281474976710656+c[S+1]*1099511627776+c[S+2]*4294967296+c[S+3]*16777216+(c[S+4]<<16)+(c[S+5]<<8)+c[S+6],x>=9e15?crypto.randomBytes(7).copy(c,S):(b.push(x%1e14),S+=7);S=g/7}else throw N=!1,Error(Ui+"crypto unavailable");if(!N)for(;S<g;)x=E(),x<9e15&&(b[S++]=x%1e14);for(g=b[--S],f%=Qe,g&&f&&(x=rx[Qe-f],b[S]=yn(g/x)*x);b[S]===0;b.pop(),S--);if(S<0)b=[v=0];else{for(v=-1;b[0]===0;b.splice(0,1),v-=Qe);for(S=1,x=b[0];x>=10;x/=10,S++);S<Qe&&(v-=Qe-S)}return l.e=v,l.c=b,l}}(),H.sum=function(){for(var O=1,E=arguments,f=new H(E[0]);O<E.length;)f=f.plus(E[O++]);return f},r=function(){var O="0123456789";function E(f,c,p,v){for(var g,x=[0],S,b=0,l=f.length;b<l;){for(S=x.length;S--;x[S]*=c);for(x[0]+=v.indexOf(f.charAt(b++)),g=0;g<x.length;g++)x[g]>p-1&&(x[g+1]==null&&(x[g+1]=0),x[g+1]+=x[g]/p|0,x[g]%=p)}return x.reverse()}return function(f,c,p,v,g){var x,S,b,l,d,A,D,V,Y=f.indexOf("."),se=u,ae=m;for(Y>=0&&(l=B,B=0,f=f.replace(".",""),V=new H(c),A=V.pow(f.length-Y),B=l,V.c=E(da(_n(A.c),A.e,"0"),10,p,O),V.e=V.c.length),D=E(f,c,p,g?(x=Z,O):(x=O,Z)),b=l=D.length;D[--l]==0;D.pop());if(!D[0])return x.charAt(0);if(Y<0?--b:(A.c=D,A.e=b,A.s=v,A=t(A,V,se,ae,p),D=A.c,d=A.r,b=A.e),S=b+se+1,Y=D[S],l=p/2,d=d||S<0||D[S+1]!=null,d=ae<4?(Y!=null||d)&&(ae==0||ae==(A.s<0?3:2)):Y>l||Y==l&&(ae==4||d||ae==6&&D[S-1]&1||ae==(A.s<0?8:7)),S<1||!D[0])f=d?da(x.charAt(1),-se,x.charAt(0)):x.charAt(0);else{if(D.length=S,d)for(--p;++D[--S]>p;)D[S]=0,S||(++b,D=[1].concat(D));for(l=D.length;!D[--l];);for(Y=0,f="";Y<=l;f+=x.charAt(D[Y++]));f=da(f,b,x.charAt(0))}return f}}(),t=function(){function O(c,p,v){var g,x,S,b,l=0,d=c.length,A=p%lo,D=p/lo|0;for(c=c.slice();d--;)S=c[d]%lo,b=c[d]/lo|0,g=D*S+b*A,x=A*S+g%lo*lo+l,l=(x/v|0)+(g/lo|0)+D*b,c[d]=x%v;return l&&(c=[l].concat(c)),c}function E(c,p,v,g){var x,S;if(v!=g)S=v>g?1:-1;else for(x=S=0;x<v;x++)if(c[x]!=p[x]){S=c[x]>p[x]?1:-1;break}return S}function f(c,p,v,g){for(var x=0;v--;)c[v]-=x,x=c[v]<p[v]?1:0,c[v]=x*g+c[v]-p[v];for(;!c[0]&&c.length>1;c.splice(0,1));}return function(c,p,v,g,x){var S,b,l,d,A,D,V,Y,se,ae,pe,ye,de,ht,St,Re,st,et=c.s==p.s?1:-1,Ie=c.c,Te=p.c;if(!Ie||!Ie[0]||!Te||!Te[0])return new H(!c.s||!p.s||(Ie?Te&&Ie[0]==Te[0]:!Te)?NaN:Ie&&Ie[0]==0||!Te?et*0:et/0);for(Y=new H(et),se=Y.c=[],b=c.e-p.e,et=v+b+1,x||(x=Gn,b=wn(c.e/Qe)-wn(p.e/Qe),et=et/Qe|0),l=0;Te[l]==(Ie[l]||0);l++);if(Te[l]>(Ie[l]||0)&&b--,et<0)se.push(1),d=!0;else{for(ht=Ie.length,Re=Te.length,l=0,et+=2,A=yn(x/(Te[0]+1)),A>1&&(Te=O(Te,A,x),Ie=O(Ie,A,x),Re=Te.length,ht=Ie.length),de=Re,ae=Ie.slice(0,Re),pe=ae.length;pe<Re;ae[pe++]=0);st=Te.slice(),st=[0].concat(st),St=Te[0],Te[1]>=x/2&&St++;do{if(A=0,S=E(Te,ae,Re,pe),S<0){if(ye=ae[0],Re!=pe&&(ye=ye*x+(ae[1]||0)),A=yn(ye/St),A>1)for(A>=x&&(A=x-1),D=O(Te,A,x),V=D.length,pe=ae.length;E(D,ae,V,pe)==1;)A--,f(D,Re<V?st:Te,V,x),V=D.length,S=1;else A==0&&(S=A=1),D=Te.slice(),V=D.length;if(V<pe&&(D=[0].concat(D)),f(ae,D,pe,x),pe=ae.length,S==-1)for(;E(Te,ae,Re,pe)<1;)A++,f(ae,Re<pe?st:Te,pe,x),pe=ae.length}else S===0&&(A++,ae=[0]);se[l++]=A,ae[0]?ae[pe++]=Ie[de]||0:(ae=[Ie[de]],pe=1)}while((de++<ht||ae[0]!=null)&&et--);d=ae[0]!=null,se[0]||se.splice(0,1)}if(x==Gn){for(l=1,et=se[0];et>=10;et/=10,l++);Se(Y,v+(Y.e=l+b*Qe-1)+1,g,d)}else Y.e=b,Y.r=+d;return Y}}();function ee(O,E,f,c){var p,v,g,x,S;if(f==null?f=m:xr(f,0,8),!O.c)return O.toString();if(p=O.c[0],g=O.e,E==null)S=_n(O.c),S=c==1||c==2&&(g<=_||g>=w)?pd(S,g):da(S,g,"0");else if(O=Se(new H(O),E,f),v=O.e,S=_n(O.c),x=S.length,c==1||c==2&&(E<=v||v<=_)){for(;x<E;S+="0",x++);S=pd(S,v)}else if(E-=g,S=da(S,v,"0"),v+1>x){if(--E>0)for(S+=".";E--;S+="0");}else if(E+=v-x,E>0)for(v+1==x&&(S+=".");E--;S+="0");return O.s<0&&p?"-"+S:S}function ce(O,E){for(var f,c,p=1,v=new H(O[0]);p<O.length;p++)c=new H(O[p]),(!c.s||(f=mc(v,c))===E||f===0&&v.s===E)&&(v=c);return v}function ge(O,E,f){for(var c=1,p=E.length;!E[--p];E.pop());for(p=E[0];p>=10;p/=10,c++);return(f=c+f*Qe-1)>T?O.c=O.e=null:f<I?O.c=[O.e=0]:(O.e=f,O.c=E),O}i=function(){var O=/^(-?)0([xbo])(?=\w[\w.]*$)/i,E=/^([^.]+)\.$/,f=/^\.([^.]+)$/,c=/^-?(Infinity|NaN)$/,p=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(v,g,x,S){var b,l=x?g:g.replace(p,"");if(c.test(l))v.s=isNaN(l)?null:l<0?-1:1;else{if(!x&&(l=l.replace(O,function(d,A,D){return b=(D=D.toLowerCase())=="x"?16:D=="b"?2:8,!S||S==b?A:d}),S&&(b=S,l=l.replace(E,"$1").replace(f,"0.$1")),g!=l))return new H(l,b);if(H.DEBUG)throw Error(Ui+"Not a"+(S?" base "+S:"")+" number: "+g);v.s=null}v.c=v.e=null}}();function Se(O,E,f,c){var p,v,g,x,S,b,l,d=O.c,A=rx;if(d){e:{for(p=1,x=d[0];x>=10;x/=10,p++);if(v=E-p,v<0)v+=Qe,g=E,S=d[b=0],l=yn(S/A[p-g-1]%10);else if(b=ex((v+1)/Qe),b>=d.length)if(c){for(;d.length<=b;d.push(0));S=l=0,p=1,v%=Qe,g=v-Qe+1}else break e;else{for(S=x=d[b],p=1;x>=10;x/=10,p++);v%=Qe,g=v-Qe+p,l=g<0?0:yn(S/A[p-g-1]%10)}if(c=c||E<0||d[b+1]!=null||(g<0?S:S%A[p-g-1]),c=f<4?(l||c)&&(f==0||f==(O.s<0?3:2)):l>5||l==5&&(f==4||c||f==6&&(v>0?g>0?S/A[p-g]:0:d[b-1])%10&1||f==(O.s<0?8:7)),E<1||!d[0])return d.length=0,c?(E-=O.e+1,d[0]=A[(Qe-E%Qe)%Qe],O.e=-E||0):d[0]=O.e=0,O;if(v==0?(d.length=b,x=1,b--):(d.length=b+1,x=A[Qe-v],d[b]=g>0?yn(S/A[p-g]%A[g])*x:0),c)for(;;)if(b==0){for(v=1,g=d[0];g>=10;g/=10,v++);for(g=d[0]+=x,x=1;g>=10;g/=10,x++);v!=x&&(O.e++,d[0]==Gn&&(d[0]=1));break}else{if(d[b]+=x,d[b]!=Gn)break;d[b--]=0,x=1}for(v=d.length;d[--v]===0;d.pop());}O.e>T?O.c=O.e=null:O.e<I&&(O.c=[O.e=0])}return O}function me(O){var E,f=O.e;return f===null?O.toString():(E=_n(O.c),E=f<=_||f>=w?pd(E,f):da(E,f,"0"),O.s<0?"-"+E:E)}return n.absoluteValue=n.abs=function(){var O=new H(this);return O.s<0&&(O.s=1),O},n.comparedTo=function(O,E){return mc(this,new H(O,E))},n.decimalPlaces=n.dp=function(O,E){var f,c,p,v=this;if(O!=null)return xr(O,0,ri),E==null?E=m:xr(E,0,8),Se(new H(v),O+v.e+1,E);if(!(f=v.c))return null;if(c=((p=f.length-1)-wn(this.e/Qe))*Qe,p=f[p])for(;p%10==0;p/=10,c--);return c<0&&(c=0),c},n.dividedBy=n.div=function(O,E){return t(this,new H(O,E),u,m)},n.dividedToIntegerBy=n.idiv=function(O,E){return t(this,new H(O,E),0,1)},n.exponentiatedBy=n.pow=function(O,E){var f,c,p,v,g,x,S,b,l,d=this;if(O=new H(O),O.c&&!O.isInteger())throw Error(Ui+"Exponent not an integer: "+me(O));if(E!=null&&(E=new H(E)),x=O.e>14,!d.c||!d.c[0]||d.c[0]==1&&!d.e&&d.c.length==1||!O.c||!O.c[0])return l=new H(Math.pow(+me(d),x?O.s*(2-ld(O)):+me(O))),E?l.mod(E):l;if(S=O.s<0,E){if(E.c?!E.c[0]:!E.s)return new H(NaN);c=!S&&d.isInteger()&&E.isInteger(),c&&(d=d.mod(E))}else{if(O.e>9&&(d.e>0||d.e<-1||(d.e==0?d.c[0]>1||x&&d.c[1]>=24e7:d.c[0]<8e13||x&&d.c[0]<=9999975e7)))return v=d.s<0&&ld(O)?-0:0,d.e>-1&&(v=1/v),new H(S?1/v:v);B&&(v=ex(B/Qe+2))}for(x?(f=new H(.5),S&&(O.s=1),b=ld(O)):(p=Math.abs(+me(O)),b=p%2),l=new H(o);;){if(b){if(l=l.times(d),!l.c)break;v?l.c.length>v&&(l.c.length=v):c&&(l=l.mod(E))}if(p){if(p=yn(p/2),p===0)break;b=p%2}else if(O=O.times(f),Se(O,O.e+1,1),O.e>14)b=ld(O);else{if(p=+me(O),p===0)break;b=p%2}d=d.times(d),v?d.c&&d.c.length>v&&(d.c.length=v):c&&(d=d.mod(E))}return c?l:(S&&(l=o.div(l)),E?l.mod(E):v?Se(l,B,m,g):l)},n.integerValue=function(O){var E=new H(this);return O==null?O=m:xr(O,0,8),Se(E,E.e+1,O)},n.isEqualTo=n.eq=function(O,E){return mc(this,new H(O,E))===0},n.isFinite=function(){return!!this.c},n.isGreaterThan=n.gt=function(O,E){return mc(this,new H(O,E))>0},n.isGreaterThanOrEqualTo=n.gte=function(O,E){return(E=mc(this,new H(O,E)))===1||E===0},n.isInteger=function(){return!!this.c&&wn(this.e/Qe)>this.c.length-2},n.isLessThan=n.lt=function(O,E){return mc(this,new H(O,E))<0},n.isLessThanOrEqualTo=n.lte=function(O,E){return(E=mc(this,new H(O,E)))===-1||E===0},n.isNaN=function(){return!this.s},n.isNegative=function(){return this.s<0},n.isPositive=function(){return this.s>0},n.isZero=function(){return!!this.c&&this.c[0]==0},n.minus=function(O,E){var f,c,p,v,g=this,x=g.s;if(O=new H(O,E),E=O.s,!x||!E)return new H(NaN);if(x!=E)return O.s=-E,g.plus(O);var S=g.e/Qe,b=O.e/Qe,l=g.c,d=O.c;if(!S||!b){if(!l||!d)return l?(O.s=-E,O):new H(d?g:NaN);if(!l[0]||!d[0])return d[0]?(O.s=-E,O):new H(l[0]?g:m==3?-0:0)}if(S=wn(S),b=wn(b),l=l.slice(),x=S-b){for((v=x<0)?(x=-x,p=l):(b=S,p=d),p.reverse(),E=x;E--;p.push(0));p.reverse()}else for(c=(v=(x=l.length)<(E=d.length))?x:E,x=E=0;E<c;E++)if(l[E]!=d[E]){v=l[E]<d[E];break}if(v&&(p=l,l=d,d=p,O.s=-O.s),E=(c=d.length)-(f=l.length),E>0)for(;E--;l[f++]=0);for(E=Gn-1;c>x;){if(l[--c]<d[c]){for(f=c;f&&!l[--f];l[f]=E);--l[f],l[c]+=Gn}l[c]-=d[c]}for(;l[0]==0;l.splice(0,1),--b);return l[0]?ge(O,l,b):(O.s=m==3?-1:1,O.c=[O.e=0],O)},n.modulo=n.mod=function(O,E){var f,c,p=this;return O=new H(O,E),!p.c||!O.s||O.c&&!O.c[0]?new H(NaN):!O.c||p.c&&!p.c[0]?new H(p):(C==9?(c=O.s,O.s=1,f=t(p,O,0,3),O.s=c,f.s*=c):f=t(p,O,0,C),O=p.minus(f.times(O)),!O.c[0]&&C==1&&(O.s=p.s),O)},n.multipliedBy=n.times=function(O,E){var f,c,p,v,g,x,S,b,l,d,A,D,V,Y,se,ae=this,pe=ae.c,ye=(O=new H(O,E)).c;if(!pe||!ye||!pe[0]||!ye[0])return!ae.s||!O.s||pe&&!pe[0]&&!ye||ye&&!ye[0]&&!pe?O.c=O.e=O.s=null:(O.s*=ae.s,!pe||!ye?O.c=O.e=null:(O.c=[0],O.e=0)),O;for(c=wn(ae.e/Qe)+wn(O.e/Qe),O.s*=ae.s,S=pe.length,d=ye.length,S<d&&(V=pe,pe=ye,ye=V,p=S,S=d,d=p),p=S+d,V=[];p--;V.push(0));for(Y=Gn,se=lo,p=d;--p>=0;){for(f=0,A=ye[p]%se,D=ye[p]/se|0,g=S,v=p+g;v>p;)b=pe[--g]%se,l=pe[g]/se|0,x=D*b+l*A,b=A*b+x%se*se+V[v]+f,f=(b/Y|0)+(x/se|0)+D*l,V[v--]=b%Y;V[v]=f}return f?++c:V.splice(0,1),ge(O,V,c)},n.negated=function(){var O=new H(this);return O.s=-O.s||null,O},n.plus=function(O,E){var f,c=this,p=c.s;if(O=new H(O,E),E=O.s,!p||!E)return new H(NaN);if(p!=E)return O.s=-E,c.minus(O);var v=c.e/Qe,g=O.e/Qe,x=c.c,S=O.c;if(!v||!g){if(!x||!S)return new H(p/0);if(!x[0]||!S[0])return S[0]?O:new H(x[0]?c:p*0)}if(v=wn(v),g=wn(g),x=x.slice(),p=v-g){for(p>0?(g=v,f=S):(p=-p,f=x),f.reverse();p--;f.push(0));f.reverse()}for(p=x.length,E=S.length,p-E<0&&(f=S,S=x,x=f,E=p),p=0;E;)p=(x[--E]=x[E]+S[E]+p)/Gn|0,x[E]=Gn===x[E]?0:x[E]%Gn;return p&&(x=[p].concat(x),++g),ge(O,x,g)},n.precision=n.sd=function(O,E){var f,c,p,v=this;if(O!=null&&O!==!!O)return xr(O,1,ri),E==null?E=m:xr(E,0,8),Se(new H(v),O,E);if(!(f=v.c))return null;if(p=f.length-1,c=p*Qe+1,p=f[p]){for(;p%10==0;p/=10,c--);for(p=f[0];p>=10;p/=10,c++);}return O&&v.e+1>c&&(c=v.e+1),c},n.shiftedBy=function(O){return xr(O,-tx,tx),this.times("1e"+O)},n.squareRoot=n.sqrt=function(){var O,E,f,c,p,v=this,g=v.c,x=v.s,S=v.e,b=u+4,l=new H("0.5");if(x!==1||!g||!g[0])return new H(!x||x<0&&(!g||g[0])?NaN:g?v:1/0);if(x=Math.sqrt(+me(v)),x==0||x==1/0?(E=_n(g),(E.length+S)%2==0&&(E+="0"),x=Math.sqrt(+E),S=wn((S+1)/2)-(S<0||S%2),x==1/0?E="5e"+S:(E=x.toExponential(),E=E.slice(0,E.indexOf("e")+1)+S),f=new H(E)):f=new H(x+""),f.c[0]){for(S=f.e,x=S+b,x<3&&(x=0);;)if(p=f,f=l.times(p.plus(t(v,p,b,1))),_n(p.c).slice(0,x)===(E=_n(f.c)).slice(0,x))if(f.e<S&&--x,E=E.slice(x-3,x+1),E=="9999"||!c&&E=="4999"){if(!c&&(Se(p,p.e+u+2,0),p.times(p).eq(v))){f=p;break}b+=4,x+=4,c=1}else{(!+E||!+E.slice(1)&&E.charAt(0)=="5")&&(Se(f,f.e+u+2,1),O=!f.times(f).eq(v));break}}return Se(f,f.e+u+1,m,O)},n.toExponential=function(O,E){return O!=null&&(xr(O,0,ri),O++),ee(this,O,E,1)},n.toFixed=function(O,E){return O!=null&&(xr(O,0,ri),O=O+this.e+1),ee(this,O,E)},n.toFormat=function(O,E,f){var c,p=this;if(f==null)O!=null&&E&&typeof E=="object"?(f=E,E=null):O&&typeof O=="object"?(f=O,O=E=null):f=U;else if(typeof f!="object")throw Error(Ui+"Argument not an object: "+f);if(c=p.toFixed(O,E),p.c){var v,g=c.split("."),x=+f.groupSize,S=+f.secondaryGroupSize,b=f.groupSeparator||"",l=g[0],d=g[1],A=p.s<0,D=A?l.slice(1):l,V=D.length;if(S&&(v=x,x=S,S=v,V-=v),x>0&&V>0){for(v=V%x||x,l=D.substr(0,v);v<V;v+=x)l+=b+D.substr(v,x);S>0&&(l+=b+D.slice(v)),A&&(l="-"+l)}c=d?l+(f.decimalSeparator||"")+((S=+f.fractionGroupSize)?d.replace(new RegExp("\\d{"+S+"}\\B","g"),"$&"+(f.fractionGroupSeparator||"")):d):l}return(f.prefix||"")+c+(f.suffix||"")},n.toFraction=function(O){var E,f,c,p,v,g,x,S,b,l,d,A,D=this,V=D.c;if(O!=null&&(x=new H(O),!x.isInteger()&&(x.c||x.s!==1)||x.lt(o)))throw Error(Ui+"Argument "+(x.isInteger()?"out of range: ":"not an integer: ")+me(x));if(!V)return new H(D);for(E=new H(o),b=f=new H(o),c=S=new H(o),A=_n(V),v=E.e=A.length-D.e-1,E.c[0]=rx[(g=v%Qe)<0?Qe+g:g],O=!O||x.comparedTo(E)>0?v>0?E:b:x,g=T,T=1/0,x=new H(A),S.c[0]=0;l=t(x,E,0,1),p=f.plus(l.times(c)),p.comparedTo(O)!=1;)f=c,c=p,b=S.plus(l.times(p=b)),S=p,E=x.minus(l.times(p=E)),x=p;return p=t(O.minus(f),c,0,1),S=S.plus(p.times(b)),f=f.plus(p.times(c)),S.s=b.s=D.s,v=v*2,d=t(b,c,v,m).minus(D).abs().comparedTo(t(S,f,v,m).minus(D).abs())<1?[b,c]:[S,f],T=g,d},n.toNumber=function(){return+me(this)},n.toPrecision=function(O,E){return O!=null&&xr(O,1,ri),ee(this,O,E,2)},n.toString=function(O){var E,f=this,c=f.s,p=f.e;return p===null?c?(E="Infinity",c<0&&(E="-"+E)):E="NaN":(O==null?E=p<=_||p>=w?pd(_n(f.c),p):da(_n(f.c),p,"0"):O===10&&$?(f=Se(new H(f),u+p+1,m),E=da(_n(f.c),f.e,"0")):(xr(O,2,Z.length,"Base"),E=r(da(_n(f.c),p,"0"),10,O,c,!0)),c<0&&f.c[0]&&(E="-"+E)),E},n.valueOf=n.toJSON=function(){return me(this)},n._isBigNumber=!0,n[Symbol.toStringTag]="BigNumber",n[Symbol.for("nodejs.util.inspect.custom")]=n.valueOf,e!=null&&H.set(e),H}function wn(e){var t=e|0;return e>0||e===t?t:t-1}function _n(e){for(var t,r,i=1,n=e.length,o=e[0]+"";i<n;){for(t=e[i++]+"",r=Qe-t.length;r--;t="0"+t);o+=t}for(n=o.length;o.charCodeAt(--n)===48;);return o.slice(0,n+1||1)}function mc(e,t){var r,i,n=e.c,o=t.c,u=e.s,m=t.s,_=e.e,w=t.e;if(!u||!m)return null;if(r=n&&!n[0],i=o&&!o[0],r||i)return r?i?0:-m:u;if(u!=m)return u;if(r=u<0,i=_==w,!n||!o)return i?0:!n^r?1:-1;if(!i)return _>w^r?1:-1;for(m=(_=n.length)<(w=o.length)?_:w,u=0;u<m;u++)if(n[u]!=o[u])return n[u]>o[u]^r?1:-1;return _==w?0:_>w^r?1:-1}function xr(e,t,r,i){if(e<t||e>r||e!==yn(e))throw Error(Ui+(i||"Argument")+(typeof e=="number"?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function ld(e){var t=e.c.length-1;return wn(e.e/Qe)==t&&e.c[t]%2!=0}function pd(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function da(e,t,r){var i,n;if(t<0){for(n=r+".";++t;n+=r);e=n+e}else if(i=e.length,++t>i){for(n=r,t-=i;--t;n+=r);e+=n}else t<i&&(e=e.slice(0,t)+"."+e.slice(t));return e}var XC=wI(),Fr=XC;var oU=_r(ix(),1),cU=_r(_d(),1),uU=_r(yd(),1),Sx=_r(Td(),1),fU=_r(wx(),1);var Ex="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",lU=(e,t)=>{let r="1"+"0".repeat(t),i=new Fr(e.toString(10),10);return pl(i.times(r).toString(16))},pU=(e,t)=>{let r="1"+"0".repeat(t),i=new Fr(e.toString(),10);return parseFloat(i.dividedBy(r).toString())},hU=e=>{typeof e=="string"&&(e=new Uint8Array(Buffer.from(e)));let t=[],r=BigInt("0x"+Buffer.from(e).toString("hex"));for(;r>BigInt(0);){let i=Number(r%BigInt(58));t.unshift(Ex[i]),r=r/BigInt(58)}for(let i=0;i<e.length&&e[i]===0;i++)t.unshift(Ex[0]);return t.join("")},dU=e=>{let t=BigInt(0);for(let n=0;n<e.length;n++)t=t*BigInt(58)+BigInt(Ex.indexOf(e[n]));let r=t.toString(16),i=r.length%2===0?r:"0"+r;return new Uint8Array(Buffer.from(i,"hex"))},mU=e=>Buffer.from(e).toString("utf8"),vU=e=>Buffer.from(e,"utf8"),gU=e=>!isNaN(Number(e)),Ix=async e=>{await new Promise(t=>setTimeout(t,e))},Tx=(e,t)=>JSON.stringify(e)===JSON.stringify(t),xU=e=>{let[t,r]=e.toExponential().split("e").map(n=>parseFloat(n)),i=(t*Math.pow(10,r)).toString();return i=parseFloat(i).toString(),i},El=async e=>await new Promise((t,r)=>{let i;typeof window<"u"?i=new WebSocket(e):i=new Sx.default(e),i.onopen=()=>{t(!0),i.close()},i.onerror=n=>{r(new Error(n.message)),i.close()}}),Ad={add:(e,t,r=18)=>parseFloat(new Fr(e).plus(new Fr(t)).toFixed(r)),sub:(e,t,r=18)=>parseFloat(new Fr(e).minus(new Fr(t)).toFixed(r)),mul:(e,t,r=18)=>parseFloat(new Fr(e).times(new Fr(t)).toFixed(r)),div:(e,t,r=18)=>parseFloat(new Fr(e).div(new Fr(t)).toFixed(r)),pow:(e,t,r=18)=>parseFloat(new Fr(e).pow(t).toFixed(r)),sqrt:(e,t=18)=>parseFloat(new Fr(e).sqrt().toFixed(t)),abs:(e,t=18)=>parseFloat(new Fr(e).absoluteValue().toFixed(t)),ceil:(e,t=18)=>parseFloat(new Fr(e).integerValue(Fr.ROUND_CEIL).toFixed(t)),floor:(e,t=18)=>parseFloat(new Fr(e).integerValue(Fr.ROUND_FLOOR).toFixed(t)),round:(e,t=18)=>parseFloat(new Fr(e).integerValue(Fr.ROUND_HALF_UP).toFixed(t))},bU=()=>typeof window>"u"?!1:function(e){return!!(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(e.substr(0,4)))}(navigator.userAgent||navigator.vendor||window.opera),_U=()=>{if(typeof window>"u")return!1;let e=window.navigator;if(window.WebViewJavascriptBridge||window.webkit&&window.webkit.messageHandlers||e.userAgent.match(/WebView/i))return!0;let t=e.standalone,r=e.userAgent.toLowerCase(),i=/safari/.test(r);return/iphone|ipod|ipad/.test(r)?!t&&!i:r.includes("wv")};var Ax={};Oa(Ax,{AssetDirectionEnum:()=>Rx,ErrorTypeEnum:()=>Il,TransactionListenerProcessIndex:()=>Pd,TransactionStatusEnum:()=>kd,TransactionTypeEnum:()=>Od,WalletPlatformEnum:()=>wT});var Rx=(r=>(r.INCOMING="INCOMING",r.OUTGOING="OUTGOING",r))(Rx||{}),Od=(o=>(o.GENERAL="GENERAL",o.CONTRACT="CONTRACT",o.COIN="COIN",o.TOKEN="TOKEN",o.NFT="NFT",o))(Od||{}),kd=(i=>(i.FAILED="FAILED",i.PENDING="PENDING",i.CONFIRMED="CONFIRMED",i))(kd||{}),Il=(c=>(c.RPC_TIMEOUT="RPC_TIMEOUT",c.RPC_REQUEST_ERROR="RPC_REQUEST_ERROR",c.RPC_ACCESS_DENIED="RPC_ACCESS_DENIED",c.WS_URL_NOT_DEFINED="WS_URL_NOT_DEFINED",c.WS_CONNECTION_FAILED="WS_CONNECTION_FAILED",c.UNACCEPTED_CHAIN="UNACCEPTED_CHAIN",c.UNAUTHORIZED_ADDRESS="UNAUTHORIZED_ADDRESS",c.INSUFFICIENT_BALANCE="INSUFFICIENT_BALANCE",c.INVALID_AMOUNT="INVALID_AMOUNT",c.INVALID_ADDRESS="INVALID_ADDRESS",c.INVALID_PRIVATE_KEY="INVALID_PRIVATE_KEY",c.INVALID_PUBLIC_KEY="INVALID_PUBLIC_KEY",c.INVALID_TRANSACTION_ID="INVALID_TRANSACTION_ID",c.PROVIDER_IS_REQUIRED="PROVIDER_IS_REQUIRED",c.PROVIDER_IS_NOT_INITIALIZED="PROVIDER_IS_NOT_INITIALIZED",c.PROVIDER_IS_ALREADY_INITIALIZED="PROVIDER_IS_ALREADY_INITIALIZED",c.WALLET_ALREADY_PROCESSING="WALLET_ALREADY_PROCESSING",c.WALLET_CONNECT_REJECTED="WALLET_CONNECT_REJECTED",c.WALLET_REQUEST_REJECTED="WALLET_REQUEST_REJECTED",c.WALLET_CONNECTION_FAILED="WALLET_CONNECTION_FAILED",c.WALLET_CONNECTION_TIMEOUT="WALLET_CONNECTION_TIMEOUT",c.TRANSACTION_CREATION_FAILED="TRANSACTION_CREATION_FAILED",c.TRANSACTION_NOT_FOUND="TRANSACTION_NOT_FOUND",c.CLOSED_WALLETCONNECT_MODAL="CLOSED_WALLETCONNECT_MODAL",c.PROJECT_ID_IS_REQUIRED="PROJECT_ID_IS_REQUIRED",c.METADATA_IS_REQUIRED="METADATA_IS_REQUIRED",c.CONFIG_IS_REQUIRED="CONFIG_IS_REQUIRED",c))(Il||{}),wT=(n=>(n.BROWSER="BROWSER",n.MOBILE="MOBILE",n.DESKTOP="DESKTOP",n.UNIVERSAL="UNIVERSAL",n))(wT||{});var Pd={GENERAL:"generalProcess",CONTRACT:"contractProcess",COIN:"coinProcess",TOKEN:"tokenProcess",NFT:"nftProcess"};var Yn=class e{network;api;explorer;wsUrl;blockCypherToken;defaultBlockCypherToken="49d43a59a4f24d31a9731eb067ab971c";static _instance;constructor(t){this.update(t)}static get instance(){if(e._instance===void 0)throw new Error("PROVIDER_IS_NOT_INITIALIZED");return e._instance}static initialize(t){if(e._instance!==void 0)throw new Error("PROVIDER_IS_ALREADY_INITIALIZED");e._instance=new e(t)}async checkRpcConnection(t){try{let r=await xn.get(t??this.createEndpoint("blocks/tip/height"));return r.status!==200?new Error(r.statusText+": "+JSON.stringify(r.data)):!0}catch(r){return r}}async checkWsConnection(t){try{let r=await El(t??this.wsUrl);return r instanceof Error?r:!0}catch(r){return r}}update(t){this.network=t,e._instance=this;let r=this.network.testnet??!1;if(this.blockCypherToken=this.network.blockCypherToken,r){this.api="https://blockstream.info/testnet/api/",this.explorer="https://blockstream.info/testnet/";let i=this.network.blockCypherToken??this.defaultBlockCypherToken;this.wsUrl="wss://socket.blockcypher.com/v1/btc/test3?token="+i}else this.api="https://blockstream.info/api/",this.explorer="https://blockstream.info/",this.network.blockCypherToken!==void 0?this.wsUrl="wss://socket.blockcypher.com/v1/btc/main?token="+this.network.blockCypherToken:this.wsUrl="wss://ws.blockchain.info/inv";this.network.rpcUrl=this.api,this.network.wsUrl=this.wsUrl}createEndpoint(t){return this.api+t}isTestnet(){return this.network?.testnet??!1}};var wU=_r(bh(),1);var Nx={};Oa(Nx,{Coin:()=>Px});var Rl=_r(bh(),1);var kx={};Oa(kx,{base58Decode:()=>dU,base58Encode:()=>hU,bufferToString:()=>mU,checkWebSocket:()=>El,fromSatoshi:()=>_s,hexToNumber:()=>pU,isMobile:()=>bU,isNumeric:()=>gU,isWebview:()=>_U,math:()=>Ad,numberToHex:()=>lU,objectsEqual:()=>Tx,sleep:()=>Ix,stringToBuffer:()=>vU,toHex:()=>pl,toReadableString:()=>xU,toSatoshi:()=>Ox});var _s=e=>Ad.div(e,1e8,8),Ox=e=>Ad.mul(e,1e8,8);var Tl=class{rawData;signedData;provider;constructor(t,r){this.rawData=t,this.provider=r??Yn.instance}async sign(t){return this.rawData.bitcoreLib.sign(t),this.signedData=this.rawData.bitcoreLib.serialize(),this}async send(){try{return(await xn({method:"POST",url:this.provider.createEndpoint("tx"),data:this.signedData})).data}catch(t){throw new Error(JSON.stringify(t.response?.data))}}getRawData(){return this.rawData}getSignedData(){return this.signedData??""}};var Px=class{provider;constructor(t){this.provider=t??Yn.instance}getName(){return"Bitcoin"}getSymbol(){return"BTC"}getDecimals(){return 8}async getBalance(t){let r=this.provider.createEndpoint("address/"+t),i=await xn.get(r).then(o=>o.data),n=i.chain_stats.funded_txo_sum-i.chain_stats.spent_txo_sum;return _s(n)}async transfer(t,r,i){if(i<0)throw new Error("INVALID_AMOUNT");if(i>await this.getBalance(t))throw new Error("INSUFFICIENT_BALANCE");if(t===r)throw new Error("INVALID_ADDRESS");let n=[],o=new Rl.default.Transaction,u=new Rl.default.Address(t),m=Ox(i),_=await xn.get(this.provider.createEndpoint("address/"+t+"/utxo")).then(w=>w.data);for(let w of _)n.push(new Rl.default.Transaction.UnspentOutput({txId:w.txid,satoshis:w.value,address:u,outputIndex:w.vout,script:Rl.default.Script.fromAddress(u)}));return o.from(n),o.change(t),o.to(r,m),new Tl({sender:t,receiver:r,amount:m,bitcoreLib:o})}};var Bx={};Oa(Bx,{CoinTransaction:()=>Al,Transaction:()=>bc});var ST=0,bc=class{id;provider;data=null;constructor(t,r){this.id=t,this.provider=r??Yn.instance}async getData(){if(this.data!==null)return this.data;try{let t=(await xn.get(this.provider.createEndpoint("tx/"+this.id))).data;return t?.txid!==this.id?this.data=null:this.data=t}catch(t){if(console.error("MC Bitcoin TX getData",t),String(t?.response?.data).includes("Transaction not found")){if(ST>5)throw new Error("TRANSACTION_NOT_FOUND");return ST++,await Ix(2e3),await this.getData()}throw new Error("RPC_REQUEST_ERROR")}}async wait(t=4e3){return await new Promise((r,i)=>{let n=async()=>{try{let o=await this.getStatus();if(o==="CONFIRMED"){r("CONFIRMED");return}else if(o==="FAILED"){i("FAILED");return}setTimeout(n,t)}catch(o){console.error("MC Bitcoin TX wait",o),i("FAILED")}};n()})}getId(){return this.id}async getType(){return"COIN"}getUrl(){return this.provider.explorer+"tx/"+this.id}async getSigner(){return(await this.getData())?.vin[0].prevout.scriptpubkey_address??""}async getFee(){let t=await this.getData();return _s(t?.fee??0)}async getBlockNumber(){return(await this.getData())?.status?.block_height??0}async getBlockTimestamp(){return(await this.getData())?.status?.block_time??0}async getBlockConfirmationCount(){let t=await this.getData();return t===null?0:(await xn.get(this.provider.createEndpoint("blocks/tip/height"))).data-t?.status?.block_height}async getStatus(){let t=await this.getData();return t===null?"PENDING":t.status?.block_height!==void 0?t.status.confirmed?"CONFIRMED":"FAILED":"PENDING"}};var Al=class extends bc{async getReceiver(){return(await this.getData())?.vout[0].scriptpubkey_address??""}async getSender(){return await this.getSigner()}async getAmount(){let t=await this.getData();return _s(t?.vout[0].value??0)}async verifyTransfer(t,r,i){if(await this.getStatus()==="PENDING")return"PENDING";if(await this.getAmount()!==i)return"FAILED";if(t==="INCOMING"){if((await this.getReceiver()).toLowerCase()!==r.toLowerCase())return"FAILED"}else if((await this.getSender()).toLowerCase()!==r.toLowerCase())return"FAILED";return"CONFIRMED"}};var Cx={};Oa(Cx,{TransactionListener:()=>Mx,TransactionSigner:()=>Tl});var AT=_r(RT(),1);var Mx=class{type;provider;status=!1;callbacks=[];triggeredTransactions=[];filter;webSocket;dynamicStop=()=>{};constructor(t,r,i){this.type=t,this.filter=r??{},this.provider=i??Yn.instance}stop(){this.status&&(this.status=!1,this.dynamicStop())}start(){this.status||(this.status=!0,this[Pd[this.type]]())}getStatus(){return this.status}async on(t){if(this.webSocket===void 0)try{await El(this.provider.wsUrl),this.webSocket=new AT.default(this.provider.wsUrl)}catch(r){throw new Error("WebSocket connection is not available"+(r instanceof Error?": "+r.message:""))}return this.start(),this.callbacks.push(t),!0}trigger(t){this.triggeredTransactions.includes(t.id)||(this.triggeredTransactions.push(t.id),this.callbacks.forEach(r=>{r(t)}))}isBlockCypherProcess(){return this.provider.isTestnet()||this.provider.blockCypherToken!==void 0}createMessage(t){let r;if(this.isBlockCypherProcess()){let i={event:"unconfirmed-tx",token:this.provider.blockCypherToken??this.provider.defaultBlockCypherToken};t!==void 0&&(i.address=t),r=JSON.stringify(i)}else r=JSON.stringify({op:"unconfirmed_sub"});return this.dynamicStop=()=>{this.isBlockCypherProcess()||this.webSocket.send(JSON.stringify({op:"unconfirmed_unsub"})),this.webSocket.close()},r}getValues(t){let r={txId:""};return this.isBlockCypherProcess()?(r.txId=t.hash,r.sender=t.inputs[0].addresses[0],r.receiver=t.outputs[0].addresses[0],r.amount=_s(t.outputs[0].value)):(r.txId=t.x.hash,r.receiver=t.x.out[0].addr,r.sender=t.x.inputs[0].prev_out.addr,r.amount=_s(t.x.out[0].value)),r}generalProcess(){let t=this.createMessage();this.webSocket.addEventListener("open",()=>{this.webSocket.send(t)}),this.webSocket.addEventListener("message",async r=>{let i=this.getValues(JSON.parse(r.data));this.filter?.signer!==void 0&&i.sender?.toLowerCase()!==this.filter.signer.toLowerCase()||this.trigger(new bc(i.txId))})}contractProcess(){throw new Error("This method is not implemented for Bitcoin.")}coinProcess(){let t=this.filter;if(t.signer!==void 0&&t.sender!==void 0&&t.signer!==t.sender)throw new Error("Sender and signer must be the same in coin transactions. Or only one of them can be defined.");let r=t.sender??t.signer,i=this.createMessage(t.receiver);this.webSocket.addEventListener("open",()=>{this.webSocket.send(i)}),this.webSocket.addEventListener("message",async n=>{let o=JSON.parse(n.data),u={},m={};if(String(o.event).includes("events limit reached"))throw new Error("BlockCypher events limit reached.");let _=this.getValues(o);if(r!==void 0&&(u.sender=r.toLowerCase(),m.sender=_.sender?.toLowerCase()),t.receiver!==void 0&&(u.receiver=t.receiver.toLowerCase(),m.receiver=_.receiver?.toLowerCase()),!Tx(u,m))return;let w=new Al(_.txId);t.amount!==void 0&&_.amount!==t.amount||this.trigger(w)})}tokenProcess(){throw new Error("This method is not implemented for Bitcoin.")}nftProcess(){throw new Error("This method is not implemented for Bitcoin.")}};Nd.default.Address.prototype._classifyArguments=function(e,t,r){if((e instanceof Buffer||e instanceof Uint8Array)&&(e.length===20||e.length===32))return Address._transformHash(e,t,r);if((e instanceof Buffer||e instanceof Uint8Array)&&e.length>=21)return Address._transformBuffer(e,t,r);if(e instanceof Nd.default.PublicKey)return Address._transformPublicKey(e,t,r);if(e instanceof Nd.default.Script)return Address._transformScript(e,t);if(typeof e=="string")return Address._transformString(e,t,r);if(OT.default.isObject(e))return Address._transformObject(e);throw new TypeError("First argument is an unrecognized data format.")};0&&(module.exports={Provider,assets,bitcore,models,services,types,utils});
39
39
  /*! Bundled license information:
40
40
 
41
41
  lodash/lodash.js:
@@ -48,18 +48,15 @@ lodash/lodash.js:
48
48
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
49
49
  *)
50
50
 
51
+ bitcore-lib/lib/crypto/signature.js:
52
+ (*!< Taproot only; implied when sighash byte is missing, and equivalent to SIGHASH_ALL *)
53
+
51
54
  safe-buffer/index.js:
52
55
  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
53
56
 
54
- js-sha256/src/sha256.js:
55
- (**
56
- * [js-sha256]{@link https://github.com/emn178/js-sha256}
57
- *
58
- * @version 0.9.0
59
- * @author Chen, Yi-Cyuan [emn178@gmail.com]
60
- * @copyright Chen, Yi-Cyuan 2014-2017
61
- * @license MIT
62
- *)
57
+ bitcore-lib/lib/script/interpreter.js:
58
+ (*! The internal pubkey (x-only, so no Y coordinate parity). *)
59
+ (*! The output pubkey (taken from the scriptPubKey). *)
63
60
 
64
61
  mime-db/index.js:
65
62
  (*!