@rechargeapps/storefront-client 0.5.3 → 0.6.1
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/README.md +6 -0
- package/dist/cjs/api/address.js +45 -0
- package/dist/cjs/api/address.js.map +1 -0
- package/dist/cjs/api/auth.js +5 -11
- package/dist/cjs/api/auth.js.map +1 -1
- package/dist/cjs/api/user.js +41 -0
- package/dist/cjs/api/user.js.map +1 -0
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utils/request.js +3 -7
- package/dist/cjs/utils/request.js.map +1 -1
- package/dist/cjs/utils/session.js +34 -0
- package/dist/cjs/utils/session.js.map +1 -0
- package/dist/esm/api/address.js +35 -0
- package/dist/esm/api/address.js.map +1 -0
- package/dist/esm/api/auth.js +5 -7
- package/dist/esm/api/auth.js.map +1 -1
- package/dist/esm/api/user.js +35 -0
- package/dist/esm/api/user.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/request.js +3 -3
- package/dist/esm/utils/request.js.map +1 -1
- package/dist/esm/utils/session.js +24 -0
- package/dist/esm/utils/session.js.map +1 -0
- package/dist/index.d.ts +214 -23
- package/dist/umd/recharge-storefront-client.min.js +11 -11
- package/dist/umd/recharge-storefront-client.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
(function(te,Ze){typeof exports=="object"&&typeof module<"u"?module.exports=Ze():typeof define=="function"&&define.amd?define(Ze):(te=typeof globalThis<"u"?globalThis:te||self,te.recharge=Ze())})(this,function(){"use strict";var te=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ze(r){var e=r.default;if(typeof e=="function"){var t=function(){return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var j=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof j<"u"&&j,
|
|
2
|
-
`)===0?n.substr(1,n.length):n}).forEach(function(n){var i=n.split(":"),a=i.shift().trim();if(a){var o=i.join(":").trim();e.append(a,o)}}),e}hi.call(_e.prototype);function W(r,e){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=e.status===void 0?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText===void 0?"":""+e.statusText,this.headers=new B(e.headers),this.url=e.url||"",this._initBody(r)}hi.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new B(this.headers),url:this.url})},W.error=function(){var r=new W(null,{status:0,statusText:""});return r.type="error",r};var mf=[301,302,303,307,308];W.redirect=function(r,e){if(mf.indexOf(e)===-1)throw new RangeError("Invalid status code");return new W(null,{status:e,headers:{location:r}})};var me=j.DOMException;try{new me}catch{me=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},me.prototype=Object.create(Error.prototype),me.prototype.constructor=me}function yi(r,e){return new Promise(function(t,n){var i=new _e(r,e);if(i.signal&&i.signal.aborted)return n(new me("Aborted","AbortError"));var a=new XMLHttpRequest;function o(){a.abort()}a.onload=function(){var s={status:a.status,statusText:a.statusText,headers:_f(a.getAllResponseHeaders()||"")};s.url="responseURL"in a?a.responseURL:s.headers.get("X-Request-URL");var c="response"in a?a.response:a.responseText;setTimeout(function(){t(new W(c,s))},0)},a.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},a.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},a.onabort=function(){setTimeout(function(){n(new me("Aborted","AbortError"))},0)};function f(s){try{return s===""&&j.location.href?j.location.href:s}catch{return s}}a.open(i.method,f(i.url),!0),i.credentials==="include"?a.withCredentials=!0:i.credentials==="omit"&&(a.withCredentials=!1),"responseType"in a&&(V.blob?a.responseType="blob":V.arrayBuffer&&i.headers.get("Content-Type")&&i.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(a.responseType="arraybuffer")),e&&typeof e.headers=="object"&&!(e.headers instanceof B)?Object.getOwnPropertyNames(e.headers).forEach(function(s){a.setRequestHeader(s,Dt(e.headers[s]))}):i.headers.forEach(function(s,c){a.setRequestHeader(c,s)}),i.signal&&(i.signal.addEventListener("abort",o),a.onreadystatechange=function(){a.readyState===4&&i.signal.removeEventListener("abort",o)}),a.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}yi.polyfill=!0,j.fetch||(j.fetch=yi,j.Headers=B,j.Request=_e,j.Response=W),self.fetch.bind(self);/*! js-cookie v3.0.1 | MIT */function xr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)r[n]=t[n]}return r}var bf={read:function(r){return r[0]==='"'&&(r=r.slice(1,-1)),r.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(r){return encodeURIComponent(r).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Lt(r,e){function t(i,a,o){if(!(typeof document>"u")){o=xr({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var f="";for(var s in o)!o[s]||(f+="; "+s,o[s]!==!0&&(f+="="+o[s].split(";")[0]));return document.cookie=i+"="+r.write(a,i)+f}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var a=document.cookie?document.cookie.split("; "):[],o={},f=0;f<a.length;f++){var s=a[f].split("="),c=s.slice(1).join("=");try{var l=decodeURIComponent(s[0]);if(o[l]=r.read(c,l),i===l)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:n,remove:function(i,a){t(i,"",xr({},a,{expires:-1}))},withAttributes:function(i){return Lt(this.converter,xr({},this.attributes,i))},withConverter:function(i){return Lt(xr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(r)}})}var Pr=Lt(bf,{path:"/"}),wf=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==i||o.enumerable!==!0)return!1}return!0},di=typeof Symbol<"u"&&Symbol,$f=wf,Ef=function(){return typeof di!="function"||typeof Symbol!="function"||typeof di("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:$f()},Of="Function.prototype.bind called on incompatible ",jt=Array.prototype.slice,Af=Object.prototype.toString,Sf="[object Function]",Tf=function(e){var t=this;if(typeof t!="function"||Af.call(t)!==Sf)throw new TypeError(Of+t);for(var n=jt.call(arguments,1),i,a=function(){if(this instanceof i){var l=t.apply(this,n.concat(jt.call(arguments)));return Object(l)===l?l:this}else return t.apply(e,n.concat(jt.call(arguments)))},o=Math.max(0,t.length-n.length),f=[],s=0;s<o;s++)f.push("$"+s);if(i=Function("binder","return function ("+f.join(",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var c=function(){};c.prototype=t.prototype,i.prototype=new c,c.prototype=null}return i},If=Tf,kt=Function.prototype.bind||If,xf=kt,Pf=xf.call(Function.call,Object.prototype.hasOwnProperty),I,Re=SyntaxError,vi=Function,Me=TypeError,Vt=function(r){try{return vi('"use strict"; return ('+r+").constructor;")()}catch{}},be=Object.getOwnPropertyDescriptor;if(be)try{be({},"")}catch{be=null}var qt=function(){throw new Me},Ff=be?function(){try{return arguments.callee,qt}catch{try{return be(arguments,"callee").get}catch{return qt}}}():qt,Be=Ef(),ce=Object.getPrototypeOf||function(r){return r.__proto__},Ue={},Rf=typeof Uint8Array>"u"?I:ce(Uint8Array),De={"%AggregateError%":typeof AggregateError>"u"?I:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?I:ArrayBuffer,"%ArrayIteratorPrototype%":Be?ce([][Symbol.iterator]()):I,"%AsyncFromSyncIteratorPrototype%":I,"%AsyncFunction%":Ue,"%AsyncGenerator%":Ue,"%AsyncGeneratorFunction%":Ue,"%AsyncIteratorPrototype%":Ue,"%Atomics%":typeof Atomics>"u"?I:Atomics,"%BigInt%":typeof BigInt>"u"?I:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?I:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?I:Float32Array,"%Float64Array%":typeof Float64Array>"u"?I:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?I:FinalizationRegistry,"%Function%":vi,"%GeneratorFunction%":Ue,"%Int8Array%":typeof Int8Array>"u"?I:Int8Array,"%Int16Array%":typeof Int16Array>"u"?I:Int16Array,"%Int32Array%":typeof Int32Array>"u"?I:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Be?ce(ce([][Symbol.iterator]())):I,"%JSON%":typeof JSON=="object"?JSON:I,"%Map%":typeof Map>"u"?I:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Be?I:ce(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?I:Promise,"%Proxy%":typeof Proxy>"u"?I:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?I:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?I:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Be?I:ce(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?I:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Be?ce(""[Symbol.iterator]()):I,"%Symbol%":Be?Symbol:I,"%SyntaxError%":Re,"%ThrowTypeError%":Ff,"%TypedArray%":Rf,"%TypeError%":Me,"%Uint8Array%":typeof Uint8Array>"u"?I:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?I:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?I:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?I:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?I:WeakMap,"%WeakRef%":typeof WeakRef>"u"?I:WeakRef,"%WeakSet%":typeof WeakSet>"u"?I:WeakSet},Mf=function r(e){var t;if(e==="%AsyncFunction%")t=Vt("async function () {}");else if(e==="%GeneratorFunction%")t=Vt("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Vt("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&(t=ce(i.prototype))}return De[e]=t,t},gi={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Qe=kt,Fr=Pf,Bf=Qe.call(Function.call,Array.prototype.concat),Uf=Qe.call(Function.apply,Array.prototype.splice),_i=Qe.call(Function.call,String.prototype.replace),Rr=Qe.call(Function.call,String.prototype.slice),Df=Qe.call(Function.call,RegExp.prototype.exec),Nf=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Cf=/\\(\\)?/g,Lf=function(e){var t=Rr(e,0,1),n=Rr(e,-1);if(t==="%"&&n!=="%")throw new Re("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Re("invalid intrinsic syntax, expected opening `%`");var i=[];return _i(e,Nf,function(a,o,f,s){i[i.length]=f?_i(s,Cf,"$1"):o||a}),i},jf=function(e,t){var n=e,i;if(Fr(gi,n)&&(i=gi[n],n="%"+i[0]+"%"),Fr(De,n)){var a=De[n];if(a===Ue&&(a=Mf(n)),typeof a>"u"&&!t)throw new Me("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new Re("intrinsic "+e+" does not exist!")},Gt=function(e,t){if(typeof e!="string"||e.length===0)throw new Me("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Me('"allowMissing" argument must be a boolean');if(Df(/^%?[^%]*%?$/g,e)===null)throw new Re("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Lf(e),i=n.length>0?n[0]:"",a=jf("%"+i+"%",t),o=a.name,f=a.value,s=!1,c=a.alias;c&&(i=c[0],Uf(n,Bf([0,1],c)));for(var l=1,u=!0;l<n.length;l+=1){var p=n[l],d=Rr(p,0,1),_=Rr(p,-1);if((d==='"'||d==="'"||d==="`"||_==='"'||_==="'"||_==="`")&&d!==_)throw new Re("property names with quotes must have matching quotes");if((p==="constructor"||!u)&&(s=!0),i+="."+p,o="%"+i+"%",Fr(De,o))f=De[o];else if(f!=null){if(!(p in f)){if(!t)throw new Me("base intrinsic for "+e+" exists, but the property is not available.");return}if(be&&l+1>=n.length){var E=be(f,p);u=!!E,u&&"get"in E&&!("originalValue"in E.get)?f=E.get:f=f[p]}else u=Fr(f,p),f=f[p];u&&!s&&(De[o]=f)}}return f},mi={exports:{}};(function(r){var e=kt,t=Gt,n=t("%Function.prototype.apply%"),i=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(i,n),o=t("%Object.getOwnPropertyDescriptor%",!0),f=t("%Object.defineProperty%",!0),s=t("%Math.max%");if(f)try{f({},"a",{value:1})}catch{f=null}r.exports=function(u){var p=a(e,i,arguments);if(o&&f){var d=o(p,"length");d.configurable&&f(p,"length",{value:1+s(0,u.length-(arguments.length-1))})}return p};var c=function(){return a(e,n,arguments)};f?f(r.exports,"apply",{value:c}):r.exports.apply=c})(mi);var bi=Gt,wi=mi.exports,kf=wi(bi("String.prototype.indexOf")),Vf=function(e,t){var n=bi(e,!!t);return typeof n=="function"&&kf(e,".prototype.")>-1?wi(n):n},Ne=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},z=[],G=[],qf=typeof Uint8Array<"u"?Uint8Array:Array,Ht=!1;function $i(){Ht=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)z[e]=r[e],G[r.charCodeAt(e)]=e;G["-".charCodeAt(0)]=62,G["_".charCodeAt(0)]=63}function Gf(r){Ht||$i();var e,t,n,i,a,o,f=r.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=r[f-2]==="="?2:r[f-1]==="="?1:0,o=new qf(f*3/4-a),n=a>0?f-4:f;var s=0;for(e=0,t=0;e<n;e+=4,t+=3)i=G[r.charCodeAt(e)]<<18|G[r.charCodeAt(e+1)]<<12|G[r.charCodeAt(e+2)]<<6|G[r.charCodeAt(e+3)],o[s++]=i>>16&255,o[s++]=i>>8&255,o[s++]=i&255;return a===2?(i=G[r.charCodeAt(e)]<<2|G[r.charCodeAt(e+1)]>>4,o[s++]=i&255):a===1&&(i=G[r.charCodeAt(e)]<<10|G[r.charCodeAt(e+1)]<<4|G[r.charCodeAt(e+2)]>>2,o[s++]=i>>8&255,o[s++]=i&255),o}function Hf(r){return z[r>>18&63]+z[r>>12&63]+z[r>>6&63]+z[r&63]}function Wf(r,e,t){for(var n,i=[],a=e;a<t;a+=3)n=(r[a]<<16)+(r[a+1]<<8)+r[a+2],i.push(Hf(n));return i.join("")}function Ei(r){Ht||$i();for(var e,t=r.length,n=t%3,i="",a=[],o=16383,f=0,s=t-n;f<s;f+=o)a.push(Wf(r,f,f+o>s?s:f+o));return n===1?(e=r[t-1],i+=z[e>>2],i+=z[e<<4&63],i+="=="):n===2&&(e=(r[t-2]<<8)+r[t-1],i+=z[e>>10],i+=z[e>>4&63],i+=z[e<<2&63],i+="="),a.push(i),a.join("")}function Mr(r,e,t,n,i){var a,o,f=i*8-n-1,s=(1<<f)-1,c=s>>1,l=-7,u=t?i-1:0,p=t?-1:1,d=r[e+u];for(u+=p,a=d&(1<<-l)-1,d>>=-l,l+=f;l>0;a=a*256+r[e+u],u+=p,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=o*256+r[e+u],u+=p,l-=8);if(a===0)a=1-c;else{if(a===s)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-c}return(d?-1:1)*o*Math.pow(2,a-n)}function Oi(r,e,t,n,i,a){var o,f,s,c=a*8-i-1,l=(1<<c)-1,u=l>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,_=n?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-o))<1&&(o--,s*=2),o+u>=1?e+=p/s:e+=p*Math.pow(2,1-u),e*s>=2&&(o++,s/=2),o+u>=l?(f=0,o=l):o+u>=1?(f=(e*s-1)*Math.pow(2,i),o=o+u):(f=e*Math.pow(2,u-1)*Math.pow(2,i),o=0));i>=8;r[t+d]=f&255,d+=_,f/=256,i-=8);for(o=o<<i|f,c+=i;c>0;r[t+d]=o&255,d+=_,o/=256,c-=8);r[t+d-_]|=E*128}var zf={}.toString,Ai=Array.isArray||function(r){return zf.call(r)=="[object Array]"};/*!
|
|
1
|
+
(function(te,Ze){typeof exports=="object"&&typeof module<"u"?module.exports=Ze():typeof define=="function"&&define.amd?define(Ze):(te=typeof globalThis<"u"?globalThis:te||self,te.recharge=Ze())})(this,function(){"use strict";var te=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ze(r){var e=r.default;if(typeof e=="function"){var t=function(){return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var j=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof j<"u"&&j,q={searchParams:"URLSearchParams"in j,iterable:"Symbol"in j&&"iterator"in Symbol,blob:"FileReader"in j&&"Blob"in j&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in j,arrayBuffer:"ArrayBuffer"in j};function cs(r){return r&&DataView.prototype.isPrototypeOf(r)}if(q.arrayBuffer)var ls=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],ps=ArrayBuffer.isView||function(r){return r&&ls.indexOf(Object.prototype.toString.call(r))>-1};function Je(r){if(typeof r!="string"&&(r=String(r)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(r)||r==="")throw new TypeError('Invalid character in header field name: "'+r+'"');return r.toLowerCase()}function Dt(r){return typeof r!="string"&&(r=String(r)),r}function Nt(r){var e={next:function(){var t=r.shift();return{done:t===void 0,value:t}}};return q.iterable&&(e[Symbol.iterator]=function(){return e}),e}function B(r){this.map={},r instanceof B?r.forEach(function(e,t){this.append(t,e)},this):Array.isArray(r)?r.forEach(function(e){this.append(e[0],e[1])},this):r&&Object.getOwnPropertyNames(r).forEach(function(e){this.append(e,r[e])},this)}B.prototype.append=function(r,e){r=Je(r),e=Dt(e);var t=this.map[r];this.map[r]=t?t+", "+e:e},B.prototype.delete=function(r){delete this.map[Je(r)]},B.prototype.get=function(r){return r=Je(r),this.has(r)?this.map[r]:null},B.prototype.has=function(r){return this.map.hasOwnProperty(Je(r))},B.prototype.set=function(r,e){this.map[Je(r)]=Dt(e)},B.prototype.forEach=function(r,e){for(var t in this.map)this.map.hasOwnProperty(t)&&r.call(e,this.map[t],t,this)},B.prototype.keys=function(){var r=[];return this.forEach(function(e,t){r.push(t)}),Nt(r)},B.prototype.values=function(){var r=[];return this.forEach(function(e){r.push(e)}),Nt(r)},B.prototype.entries=function(){var r=[];return this.forEach(function(e,t){r.push([t,e])}),Nt(r)},q.iterable&&(B.prototype[Symbol.iterator]=B.prototype.entries);function Ct(r){if(r.bodyUsed)return Promise.reject(new TypeError("Already read"));r.bodyUsed=!0}function pi(r){return new Promise(function(e,t){r.onload=function(){e(r.result)},r.onerror=function(){t(r.error)}})}function hs(r){var e=new FileReader,t=pi(e);return e.readAsArrayBuffer(r),t}function ys(r){var e=new FileReader,t=pi(e);return e.readAsText(r),t}function ds(r){for(var e=new Uint8Array(r),t=new Array(e.length),n=0;n<e.length;n++)t[n]=String.fromCharCode(e[n]);return t.join("")}function hi(r){if(r.slice)return r.slice(0);var e=new Uint8Array(r.byteLength);return e.set(new Uint8Array(r)),e.buffer}function yi(){return this.bodyUsed=!1,this._initBody=function(r){this.bodyUsed=this.bodyUsed,this._bodyInit=r,r?typeof r=="string"?this._bodyText=r:q.blob&&Blob.prototype.isPrototypeOf(r)?this._bodyBlob=r:q.formData&&FormData.prototype.isPrototypeOf(r)?this._bodyFormData=r:q.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)?this._bodyText=r.toString():q.arrayBuffer&&q.blob&&cs(r)?(this._bodyArrayBuffer=hi(r.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):q.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(r)||ps(r))?this._bodyArrayBuffer=hi(r):this._bodyText=r=Object.prototype.toString.call(r):this._bodyText="",this.headers.get("content-type")||(typeof r=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):q.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},q.blob&&(this.blob=function(){var r=Ct(this);if(r)return r;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var r=Ct(this);return r||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(hs)}),this.text=function(){var r=Ct(this);if(r)return r;if(this._bodyBlob)return ys(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(ds(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},q.formData&&(this.formData=function(){return this.text().then(_s)}),this.json=function(){return this.text().then(JSON.parse)},this}var vs=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function gs(r){var e=r.toUpperCase();return vs.indexOf(e)>-1?e:r}function _e(r,e){if(!(this instanceof _e))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e=e||{};var t=e.body;if(r instanceof _e){if(r.bodyUsed)throw new TypeError("Already read");this.url=r.url,this.credentials=r.credentials,e.headers||(this.headers=new B(r.headers)),this.method=r.method,this.mode=r.mode,this.signal=r.signal,!t&&r._bodyInit!=null&&(t=r._bodyInit,r.bodyUsed=!0)}else this.url=String(r);if(this.credentials=e.credentials||this.credentials||"same-origin",(e.headers||!this.headers)&&(this.headers=new B(e.headers)),this.method=gs(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&t)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(t),(this.method==="GET"||this.method==="HEAD")&&(e.cache==="no-store"||e.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}_e.prototype.clone=function(){return new _e(this,{body:this._bodyInit})};function _s(r){var e=new FormData;return r.trim().split("&").forEach(function(t){if(t){var n=t.split("="),i=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(a))}}),e}function ms(r){var e=new B,t=r.replace(/\r?\n[\t ]+/g," ");return t.split("\r").map(function(n){return n.indexOf(`
|
|
2
|
+
`)===0?n.substr(1,n.length):n}).forEach(function(n){var i=n.split(":"),a=i.shift().trim();if(a){var o=i.join(":").trim();e.append(a,o)}}),e}yi.call(_e.prototype);function W(r,e){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=e.status===void 0?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText===void 0?"":""+e.statusText,this.headers=new B(e.headers),this.url=e.url||"",this._initBody(r)}yi.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new B(this.headers),url:this.url})},W.error=function(){var r=new W(null,{status:0,statusText:""});return r.type="error",r};var bs=[301,302,303,307,308];W.redirect=function(r,e){if(bs.indexOf(e)===-1)throw new RangeError("Invalid status code");return new W(null,{status:e,headers:{location:r}})};var me=j.DOMException;try{new me}catch{me=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},me.prototype=Object.create(Error.prototype),me.prototype.constructor=me}function di(r,e){return new Promise(function(t,n){var i=new _e(r,e);if(i.signal&&i.signal.aborted)return n(new me("Aborted","AbortError"));var a=new XMLHttpRequest;function o(){a.abort()}a.onload=function(){var f={status:a.status,statusText:a.statusText,headers:ms(a.getAllResponseHeaders()||"")};f.url="responseURL"in a?a.responseURL:f.headers.get("X-Request-URL");var c="response"in a?a.response:a.responseText;setTimeout(function(){t(new W(c,f))},0)},a.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},a.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},a.onabort=function(){setTimeout(function(){n(new me("Aborted","AbortError"))},0)};function s(f){try{return f===""&&j.location.href?j.location.href:f}catch{return f}}a.open(i.method,s(i.url),!0),i.credentials==="include"?a.withCredentials=!0:i.credentials==="omit"&&(a.withCredentials=!1),"responseType"in a&&(q.blob?a.responseType="blob":q.arrayBuffer&&i.headers.get("Content-Type")&&i.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(a.responseType="arraybuffer")),e&&typeof e.headers=="object"&&!(e.headers instanceof B)?Object.getOwnPropertyNames(e.headers).forEach(function(f){a.setRequestHeader(f,Dt(e.headers[f]))}):i.headers.forEach(function(f,c){a.setRequestHeader(c,f)}),i.signal&&(i.signal.addEventListener("abort",o),a.onreadystatechange=function(){a.readyState===4&&i.signal.removeEventListener("abort",o)}),a.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}di.polyfill=!0,j.fetch||(j.fetch=di,j.Headers=B,j.Request=_e,j.Response=W),self.fetch.bind(self);var ws=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==i||o.enumerable!==!0)return!1}return!0},vi=typeof Symbol<"u"&&Symbol,$s=ws,Es=function(){return typeof vi!="function"||typeof Symbol!="function"||typeof vi("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:$s()},Os="Function.prototype.bind called on incompatible ",Lt=Array.prototype.slice,As=Object.prototype.toString,Ss="[object Function]",Is=function(e){var t=this;if(typeof t!="function"||As.call(t)!==Ss)throw new TypeError(Os+t);for(var n=Lt.call(arguments,1),i,a=function(){if(this instanceof i){var l=t.apply(this,n.concat(Lt.call(arguments)));return Object(l)===l?l:this}else return t.apply(e,n.concat(Lt.call(arguments)))},o=Math.max(0,t.length-n.length),s=[],f=0;f<o;f++)s.push("$"+f);if(i=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var c=function(){};c.prototype=t.prototype,i.prototype=new c,c.prototype=null}return i},Ts=Is,jt=Function.prototype.bind||Ts,xs=jt,Ps=xs.call(Function.call,Object.prototype.hasOwnProperty),T,Re=SyntaxError,gi=Function,Me=TypeError,kt=function(r){try{return gi('"use strict"; return ('+r+").constructor;")()}catch{}},be=Object.getOwnPropertyDescriptor;if(be)try{be({},"")}catch{be=null}var qt=function(){throw new Me},Fs=be?function(){try{return arguments.callee,qt}catch{try{return be(arguments,"callee").get}catch{return qt}}}():qt,Be=Es(),ce=Object.getPrototypeOf||function(r){return r.__proto__},Ue={},Rs=typeof Uint8Array>"u"?T:ce(Uint8Array),De={"%AggregateError%":typeof AggregateError>"u"?T:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?T:ArrayBuffer,"%ArrayIteratorPrototype%":Be?ce([][Symbol.iterator]()):T,"%AsyncFromSyncIteratorPrototype%":T,"%AsyncFunction%":Ue,"%AsyncGenerator%":Ue,"%AsyncGeneratorFunction%":Ue,"%AsyncIteratorPrototype%":Ue,"%Atomics%":typeof Atomics>"u"?T:Atomics,"%BigInt%":typeof BigInt>"u"?T:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?T:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?T:Float32Array,"%Float64Array%":typeof Float64Array>"u"?T:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?T:FinalizationRegistry,"%Function%":gi,"%GeneratorFunction%":Ue,"%Int8Array%":typeof Int8Array>"u"?T:Int8Array,"%Int16Array%":typeof Int16Array>"u"?T:Int16Array,"%Int32Array%":typeof Int32Array>"u"?T:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Be?ce(ce([][Symbol.iterator]())):T,"%JSON%":typeof JSON=="object"?JSON:T,"%Map%":typeof Map>"u"?T:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Be?T:ce(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?T:Promise,"%Proxy%":typeof Proxy>"u"?T:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?T:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?T:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Be?T:ce(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?T:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Be?ce(""[Symbol.iterator]()):T,"%Symbol%":Be?Symbol:T,"%SyntaxError%":Re,"%ThrowTypeError%":Fs,"%TypedArray%":Rs,"%TypeError%":Me,"%Uint8Array%":typeof Uint8Array>"u"?T:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?T:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?T:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?T:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?T:WeakMap,"%WeakRef%":typeof WeakRef>"u"?T:WeakRef,"%WeakSet%":typeof WeakSet>"u"?T:WeakSet},Ms=function r(e){var t;if(e==="%AsyncFunction%")t=kt("async function () {}");else if(e==="%GeneratorFunction%")t=kt("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=kt("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&(t=ce(i.prototype))}return De[e]=t,t},_i={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Qe=jt,xr=Ps,Bs=Qe.call(Function.call,Array.prototype.concat),Us=Qe.call(Function.apply,Array.prototype.splice),mi=Qe.call(Function.call,String.prototype.replace),Pr=Qe.call(Function.call,String.prototype.slice),Ds=Qe.call(Function.call,RegExp.prototype.exec),Ns=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Cs=/\\(\\)?/g,Ls=function(e){var t=Pr(e,0,1),n=Pr(e,-1);if(t==="%"&&n!=="%")throw new Re("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Re("invalid intrinsic syntax, expected opening `%`");var i=[];return mi(e,Ns,function(a,o,s,f){i[i.length]=s?mi(f,Cs,"$1"):o||a}),i},js=function(e,t){var n=e,i;if(xr(_i,n)&&(i=_i[n],n="%"+i[0]+"%"),xr(De,n)){var a=De[n];if(a===Ue&&(a=Ms(n)),typeof a>"u"&&!t)throw new Me("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new Re("intrinsic "+e+" does not exist!")},Vt=function(e,t){if(typeof e!="string"||e.length===0)throw new Me("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Me('"allowMissing" argument must be a boolean');if(Ds(/^%?[^%]*%?$/g,e)===null)throw new Re("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Ls(e),i=n.length>0?n[0]:"",a=js("%"+i+"%",t),o=a.name,s=a.value,f=!1,c=a.alias;c&&(i=c[0],Us(n,Bs([0,1],c)));for(var l=1,u=!0;l<n.length;l+=1){var p=n[l],d=Pr(p,0,1),_=Pr(p,-1);if((d==='"'||d==="'"||d==="`"||_==='"'||_==="'"||_==="`")&&d!==_)throw new Re("property names with quotes must have matching quotes");if((p==="constructor"||!u)&&(f=!0),i+="."+p,o="%"+i+"%",xr(De,o))s=De[o];else if(s!=null){if(!(p in s)){if(!t)throw new Me("base intrinsic for "+e+" exists, but the property is not available.");return}if(be&&l+1>=n.length){var E=be(s,p);u=!!E,u&&"get"in E&&!("originalValue"in E.get)?s=E.get:s=s[p]}else u=xr(s,p),s=s[p];u&&!f&&(De[o]=s)}}return s},bi={exports:{}};(function(r){var e=jt,t=Vt,n=t("%Function.prototype.apply%"),i=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(i,n),o=t("%Object.getOwnPropertyDescriptor%",!0),s=t("%Object.defineProperty%",!0),f=t("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}r.exports=function(u){var p=a(e,i,arguments);if(o&&s){var d=o(p,"length");d.configurable&&s(p,"length",{value:1+f(0,u.length-(arguments.length-1))})}return p};var c=function(){return a(e,n,arguments)};s?s(r.exports,"apply",{value:c}):r.exports.apply=c})(bi);var wi=Vt,$i=bi.exports,ks=$i(wi("String.prototype.indexOf")),qs=function(e,t){var n=wi(e,!!t);return typeof n=="function"&&ks(e,".prototype.")>-1?$i(n):n},Ne=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},z=[],G=[],Vs=typeof Uint8Array<"u"?Uint8Array:Array,Gt=!1;function Ei(){Gt=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)z[e]=r[e],G[r.charCodeAt(e)]=e;G["-".charCodeAt(0)]=62,G["_".charCodeAt(0)]=63}function Gs(r){Gt||Ei();var e,t,n,i,a,o,s=r.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=r[s-2]==="="?2:r[s-1]==="="?1:0,o=new Vs(s*3/4-a),n=a>0?s-4:s;var f=0;for(e=0,t=0;e<n;e+=4,t+=3)i=G[r.charCodeAt(e)]<<18|G[r.charCodeAt(e+1)]<<12|G[r.charCodeAt(e+2)]<<6|G[r.charCodeAt(e+3)],o[f++]=i>>16&255,o[f++]=i>>8&255,o[f++]=i&255;return a===2?(i=G[r.charCodeAt(e)]<<2|G[r.charCodeAt(e+1)]>>4,o[f++]=i&255):a===1&&(i=G[r.charCodeAt(e)]<<10|G[r.charCodeAt(e+1)]<<4|G[r.charCodeAt(e+2)]>>2,o[f++]=i>>8&255,o[f++]=i&255),o}function Hs(r){return z[r>>18&63]+z[r>>12&63]+z[r>>6&63]+z[r&63]}function Ws(r,e,t){for(var n,i=[],a=e;a<t;a+=3)n=(r[a]<<16)+(r[a+1]<<8)+r[a+2],i.push(Hs(n));return i.join("")}function Oi(r){Gt||Ei();for(var e,t=r.length,n=t%3,i="",a=[],o=16383,s=0,f=t-n;s<f;s+=o)a.push(Ws(r,s,s+o>f?f:s+o));return n===1?(e=r[t-1],i+=z[e>>2],i+=z[e<<4&63],i+="=="):n===2&&(e=(r[t-2]<<8)+r[t-1],i+=z[e>>10],i+=z[e>>4&63],i+=z[e<<2&63],i+="="),a.push(i),a.join("")}function Fr(r,e,t,n,i){var a,o,s=i*8-n-1,f=(1<<s)-1,c=f>>1,l=-7,u=t?i-1:0,p=t?-1:1,d=r[e+u];for(u+=p,a=d&(1<<-l)-1,d>>=-l,l+=s;l>0;a=a*256+r[e+u],u+=p,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=o*256+r[e+u],u+=p,l-=8);if(a===0)a=1-c;else{if(a===f)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-c}return(d?-1:1)*o*Math.pow(2,a-n)}function Ai(r,e,t,n,i,a){var o,s,f,c=a*8-i-1,l=(1<<c)-1,u=l>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,_=n?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-o))<1&&(o--,f*=2),o+u>=1?e+=p/f:e+=p*Math.pow(2,1-u),e*f>=2&&(o++,f/=2),o+u>=l?(s=0,o=l):o+u>=1?(s=(e*f-1)*Math.pow(2,i),o=o+u):(s=e*Math.pow(2,u-1)*Math.pow(2,i),o=0));i>=8;r[t+d]=s&255,d+=_,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;r[t+d]=o&255,d+=_,o/=256,c-=8);r[t+d-_]|=E*128}var zs={}.toString,Si=Array.isArray||function(r){return zs.call(r)=="[object Array]"};/*!
|
|
3
3
|
* The buffer module from node.js, for the browser.
|
|
4
4
|
*
|
|
5
5
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
6
6
|
* @license MIT
|
|
7
|
-
*/var Xf=50;y.TYPED_ARRAY_SUPPORT=Ne.TYPED_ARRAY_SUPPORT!==void 0?Ne.TYPED_ARRAY_SUPPORT:!0,Br();function Br(){return y.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ne(r,e){if(Br()<e)throw new RangeError("Invalid typed array length");return y.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=y.prototype):(r===null&&(r=new y(e)),r.length=e),r}function y(r,e,t){if(!y.TYPED_ARRAY_SUPPORT&&!(this instanceof y))return new y(r,e,t);if(typeof r=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return Wt(this,r)}return Si(this,r,e,t)}y.poolSize=8192,y._augment=function(r){return r.__proto__=y.prototype,r};function Si(r,e,t,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?Zf(r,e,t,n):typeof e=="string"?Kf(r,e,t):Jf(r,e)}y.from=function(r,e,t){return Si(null,r,e,t)},y.TYPED_ARRAY_SUPPORT&&(y.prototype.__proto__=Uint8Array.prototype,y.__proto__=Uint8Array);function Ti(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function Yf(r,e,t,n){return Ti(e),e<=0?ne(r,e):t!==void 0?typeof n=="string"?ne(r,e).fill(t,n):ne(r,e).fill(t):ne(r,e)}y.alloc=function(r,e,t){return Yf(null,r,e,t)};function Wt(r,e){if(Ti(e),r=ne(r,e<0?0:Xt(e)|0),!y.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}y.allocUnsafe=function(r){return Wt(null,r)},y.allocUnsafeSlow=function(r){return Wt(null,r)};function Kf(r,e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!y.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=Ii(e,t)|0;r=ne(r,n);var i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function zt(r,e){var t=e.length<0?0:Xt(e.length)|0;r=ne(r,t);for(var n=0;n<t;n+=1)r[n]=e[n]&255;return r}function Zf(r,e,t,n){if(e.byteLength,t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");return t===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,t):e=new Uint8Array(e,t,n),y.TYPED_ARRAY_SUPPORT?(r=e,r.__proto__=y.prototype):r=zt(r,e),r}function Jf(r,e){if(X(e)){var t=Xt(e.length)|0;return r=ne(r,t),r.length===0||e.copy(r,0,0,t),r}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||gs(e.length)?ne(r,0):zt(r,e);if(e.type==="Buffer"&&Ai(e.data))return zt(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Xt(r){if(r>=Br())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Br().toString(16)+" bytes");return r|0}y.isBuffer=_s;function X(r){return!!(r!=null&&r._isBuffer)}y.compare=function(e,t){if(!X(e)||!X(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,a=0,o=Math.min(n,i);a<o;++a)if(e[a]!==t[a]){n=e[a],i=t[a];break}return n<i?-1:i<n?1:0},y.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},y.concat=function(e,t){if(!Ai(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return y.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=y.allocUnsafe(t),a=0;for(n=0;n<e.length;++n){var o=e[n];if(!X(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};function Ii(r,e){if(X(r))return r.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var t=r.length;if(t===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return Nr(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Ni(r).length;default:if(n)return Nr(r).length;e=(""+e).toLowerCase(),n=!0}}y.byteLength=Ii;function Qf(r,e,t){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return ss(this,e,t);case"utf8":case"utf-8":return Ri(this,e,t);case"ascii":return us(this,e,t);case"latin1":case"binary":return fs(this,e,t);case"base64":return as(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return cs(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}y.prototype._isBuffer=!0;function we(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}y.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)we(this,t,t+1);return this},y.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)we(this,t,t+3),we(this,t+1,t+2);return this},y.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)we(this,t,t+7),we(this,t+1,t+6),we(this,t+2,t+5),we(this,t+3,t+4);return this},y.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Ri(this,0,e):Qf.apply(this,arguments)},y.prototype.equals=function(e){if(!X(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:y.compare(this,e)===0},y.prototype.inspect=function(){var e="",t=Xf;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},y.prototype.compare=function(e,t,n,i,a){if(!X(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),t<0||n>e.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&t>=n)return 0;if(i>=a)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,a>>>=0,this===e)return 0;for(var o=a-i,f=n-t,s=Math.min(o,f),c=this.slice(i,a),l=e.slice(t,n),u=0;u<s;++u)if(c[u]!==l[u]){o=c[u],f=l[u];break}return o<f?-1:f<o?1:0};function xi(r,e,t,n,i){if(r.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=i?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(i)return-1;t=r.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof e=="string"&&(e=y.from(e,n)),X(e))return e.length===0?-1:Pi(r,e,t,n,i);if(typeof e=="number")return e=e&255,y.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):Pi(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Pi(r,e,t,n,i){var a=1,o=r.length,f=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||e.length<2)return-1;a=2,o/=2,f/=2,t/=2}function s(d,_){return a===1?d[_]:d.readUInt16BE(_*a)}var c;if(i){var l=-1;for(c=t;c<o;c++)if(s(r,c)===s(e,l===-1?0:c-l)){if(l===-1&&(l=c),c-l+1===f)return l*a}else l!==-1&&(c-=c-l),l=-1}else for(t+f>o&&(t=o-f),c=t;c>=0;c--){for(var u=!0,p=0;p<f;p++)if(s(r,c+p)!==s(e,p)){u=!1;break}if(u)return c}return-1}y.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},y.prototype.indexOf=function(e,t,n){return xi(this,e,t,n,!0)},y.prototype.lastIndexOf=function(e,t,n){return xi(this,e,t,n,!1)};function es(r,e,t,n){t=Number(t)||0;var i=r.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;var a=e.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var f=parseInt(e.substr(o*2,2),16);if(isNaN(f))return o;r[t+o]=f}return o}function rs(r,e,t,n){return Cr(Nr(e,r.length-t),r,t,n)}function Fi(r,e,t,n){return Cr(ds(e),r,t,n)}function ts(r,e,t,n){return Fi(r,e,t,n)}function ns(r,e,t,n){return Cr(Ni(e),r,t,n)}function is(r,e,t,n){return Cr(vs(e,r.length-t),r,t,n)}y.prototype.write=function(e,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var a=this.length-t;if((n===void 0||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return es(this,e,t,n);case"utf8":case"utf-8":return rs(this,e,t,n);case"ascii":return Fi(this,e,t,n);case"latin1":case"binary":return ts(this,e,t,n);case"base64":return ns(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return is(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function as(r,e,t){return e===0&&t===r.length?Ei(r):Ei(r.slice(e,t))}function Ri(r,e,t){t=Math.min(r.length,t);for(var n=[],i=e;i<t;){var a=r[i],o=null,f=a>239?4:a>223?3:a>191?2:1;if(i+f<=t){var s,c,l,u;switch(f){case 1:a<128&&(o=a);break;case 2:s=r[i+1],(s&192)===128&&(u=(a&31)<<6|s&63,u>127&&(o=u));break;case 3:s=r[i+1],c=r[i+2],(s&192)===128&&(c&192)===128&&(u=(a&15)<<12|(s&63)<<6|c&63,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:s=r[i+1],c=r[i+2],l=r[i+3],(s&192)===128&&(c&192)===128&&(l&192)===128&&(u=(a&15)<<18|(s&63)<<12|(c&63)<<6|l&63,u>65535&&u<1114112&&(o=u))}}o===null?(o=65533,f=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=f}return os(n)}var Mi=4096;function os(r){var e=r.length;if(e<=Mi)return String.fromCharCode.apply(String,r);for(var t="",n=0;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=Mi));return t}function us(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]&127);return n}function fs(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]);return n}function ss(r,e,t){var n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);for(var i="",a=e;a<t;++a)i+=ys(r[a]);return i}function cs(r,e,t){for(var n=r.slice(e,t),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}y.prototype.slice=function(e,t){var n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var i;if(y.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=y.prototype;else{var a=t-e;i=new y(a,void 0);for(var o=0;o<a;++o)i[o]=this[o+e]}return i};function U(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}y.prototype.readUIntLE=function(e,t,n){e=e|0,t=t|0,n||U(e,t,this.length);for(var i=this[e],a=1,o=0;++o<t&&(a*=256);)i+=this[e+o]*a;return i},y.prototype.readUIntBE=function(e,t,n){e=e|0,t=t|0,n||U(e,t,this.length);for(var i=this[e+--t],a=1;t>0&&(a*=256);)i+=this[e+--t]*a;return i},y.prototype.readUInt8=function(e,t){return t||U(e,1,this.length),this[e]},y.prototype.readUInt16LE=function(e,t){return t||U(e,2,this.length),this[e]|this[e+1]<<8},y.prototype.readUInt16BE=function(e,t){return t||U(e,2,this.length),this[e]<<8|this[e+1]},y.prototype.readUInt32LE=function(e,t){return t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},y.prototype.readUInt32BE=function(e,t){return t||U(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},y.prototype.readIntLE=function(e,t,n){e=e|0,t=t|0,n||U(e,t,this.length);for(var i=this[e],a=1,o=0;++o<t&&(a*=256);)i+=this[e+o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*t)),i},y.prototype.readIntBE=function(e,t,n){e=e|0,t=t|0,n||U(e,t,this.length);for(var i=t,a=1,o=this[e+--i];i>0&&(a*=256);)o+=this[e+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*t)),o},y.prototype.readInt8=function(e,t){return t||U(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},y.prototype.readInt16LE=function(e,t){t||U(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},y.prototype.readInt16BE=function(e,t){t||U(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},y.prototype.readInt32LE=function(e,t){return t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},y.prototype.readInt32BE=function(e,t){return t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},y.prototype.readFloatLE=function(e,t){return t||U(e,4,this.length),Mr(this,e,!0,23,4)},y.prototype.readFloatBE=function(e,t){return t||U(e,4,this.length),Mr(this,e,!1,23,4)},y.prototype.readDoubleLE=function(e,t){return t||U(e,8,this.length),Mr(this,e,!0,52,8)},y.prototype.readDoubleBE=function(e,t){return t||U(e,8,this.length),Mr(this,e,!1,52,8)};function q(r,e,t,n,i,a){if(!X(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}y.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;q(this,e,t,n,a,0)}var o=1,f=0;for(this[t]=e&255;++f<n&&(o*=256);)this[t+f]=e/o&255;return t+n},y.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;q(this,e,t,n,a,0)}var o=n-1,f=1;for(this[t+o]=e&255;--o>=0&&(f*=256);)this[t+o]=e/f&255;return t+n},y.prototype.writeUInt8=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,1,255,0),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};function Ur(r,e,t,n){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(r.length-t,2);i<a;++i)r[t+i]=(e&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}y.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Ur(this,e,t,!0),t+2},y.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Ur(this,e,t,!1),t+2};function Dr(r,e,t,n){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(r.length-t,4);i<a;++i)r[t+i]=e>>>(n?i:3-i)*8&255}y.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255):Dr(this,e,t,!0),t+4},y.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Dr(this,e,t,!1),t+4},y.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t|0,!i){var a=Math.pow(2,8*n-1);q(this,e,t,n,a-1,-a)}var o=0,f=1,s=0;for(this[t]=e&255;++o<n&&(f*=256);)e<0&&s===0&&this[t+o-1]!==0&&(s=1),this[t+o]=(e/f>>0)-s&255;return t+n},y.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=t|0,!i){var a=Math.pow(2,8*n-1);q(this,e,t,n,a-1,-a)}var o=n-1,f=1,s=0;for(this[t+o]=e&255;--o>=0&&(f*=256);)e<0&&s===0&&this[t+o+1]!==0&&(s=1),this[t+o]=(e/f>>0)-s&255;return t+n},y.prototype.writeInt8=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,1,127,-128),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e&255,t+1},y.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Ur(this,e,t,!0),t+2},y.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Ur(this,e,t,!1),t+2},y.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,4,2147483647,-2147483648),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Dr(this,e,t,!0),t+4},y.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Dr(this,e,t,!1),t+4};function Bi(r,e,t,n,i,a){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Ui(r,e,t,n,i){return i||Bi(r,e,t,4),Oi(r,e,t,n,23,4),t+4}y.prototype.writeFloatLE=function(e,t,n){return Ui(this,e,t,!0,n)},y.prototype.writeFloatBE=function(e,t,n){return Ui(this,e,t,!1,n)};function Di(r,e,t,n,i){return i||Bi(r,e,t,8),Oi(r,e,t,n,52,8),t+8}y.prototype.writeDoubleLE=function(e,t,n){return Di(this,e,t,!0,n)},y.prototype.writeDoubleBE=function(e,t,n){return Di(this,e,t,!1,n)},y.prototype.copy=function(e,t,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var a=i-n,o;if(this===e&&n<t&&t<i)for(o=a-1;o>=0;--o)e[o+t]=this[o+n];else if(a<1e3||!y.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},y.prototype.fill=function(e,t,n,i){if(typeof e=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),e.length===1){var a=e.charCodeAt(0);a<256&&(e=a)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!y.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof e=="number"&&(e=e&255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var o;if(typeof e=="number")for(o=t;o<n;++o)this[o]=e;else{var f=X(e)?e:Nr(new y(e,i).toString()),s=f.length;for(o=0;o<n-t;++o)this[o+t]=f[o%s]}return this};var ls=/[^+\/0-9A-Za-z-_]/g;function ps(r){if(r=hs(r).replace(ls,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function hs(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function ys(r){return r<16?"0"+r.toString(16):r.toString(16)}function Nr(r,e){e=e||1/0;for(var t,n=r.length,i=null,a=[],o=0;o<n;++o){if(t=r.charCodeAt(o),t>55295&&t<57344){if(!i){if(t>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=t;continue}if(t<56320){(e-=3)>-1&&a.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,t<128){if((e-=1)<0)break;a.push(t)}else if(t<2048){if((e-=2)<0)break;a.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;a.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;a.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return a}function ds(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function vs(r,e){for(var t,n,i,a=[],o=0;o<r.length&&!((e-=2)<0);++o)t=r.charCodeAt(o),n=t>>8,i=t%256,a.push(i),a.push(n);return a}function Ni(r){return Gf(ps(r))}function Cr(r,e,t,n){for(var i=0;i<n&&!(i+t>=e.length||i>=r.length);++i)e[i+t]=r[i];return i}function gs(r){return r!==r}function _s(r){return r!=null&&(!!r._isBuffer||Ci(r)||ms(r))}function Ci(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function ms(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Ci(r.slice(0,0))}function Li(){throw new Error("setTimeout has not been defined")}function ji(){throw new Error("clearTimeout has not been defined")}var le=Li,pe=ji;typeof Ne.setTimeout=="function"&&(le=setTimeout),typeof Ne.clearTimeout=="function"&&(pe=clearTimeout);function ki(r){if(le===setTimeout)return setTimeout(r,0);if((le===Li||!le)&&setTimeout)return le=setTimeout,setTimeout(r,0);try{return le(r,0)}catch{try{return le.call(null,r,0)}catch{return le.call(this,r,0)}}}function bs(r){if(pe===clearTimeout)return clearTimeout(r);if((pe===ji||!pe)&&clearTimeout)return pe=clearTimeout,clearTimeout(r);try{return pe(r)}catch{try{return pe.call(null,r)}catch{return pe.call(this,r)}}}var ie=[],Ce=!1,$e,Lr=-1;function ws(){!Ce||!$e||(Ce=!1,$e.length?ie=$e.concat(ie):Lr=-1,ie.length&&Vi())}function Vi(){if(!Ce){var r=ki(ws);Ce=!0;for(var e=ie.length;e;){for($e=ie,ie=[];++Lr<e;)$e&&$e[Lr].run();Lr=-1,e=ie.length}$e=null,Ce=!1,bs(r)}}function $s(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];ie.push(new qi(r,e)),ie.length===1&&!Ce&&ki(Vi)}function qi(r,e){this.fun=r,this.array=e}qi.prototype.run=function(){this.fun.apply(null,this.array)};var Es="browser",Os="browser",As=!0,Ss={},Ts=[],Is="",xs={},Ps={},Fs={};function Ee(){}var Rs=Ee,Ms=Ee,Bs=Ee,Us=Ee,Ds=Ee,Ns=Ee,Cs=Ee;function Ls(r){throw new Error("process.binding is not supported")}function js(){return"/"}function ks(r){throw new Error("process.chdir is not supported")}function Vs(){return 0}var Le=Ne.performance||{},qs=Le.now||Le.mozNow||Le.msNow||Le.oNow||Le.webkitNow||function(){return new Date().getTime()};function Gs(r){var e=qs.call(Le)*.001,t=Math.floor(e),n=Math.floor(e%1*1e9);return r&&(t=t-r[0],n=n-r[1],n<0&&(t--,n+=1e9)),[t,n]}var Hs=new Date;function Ws(){var r=new Date,e=r-Hs;return e/1e3}var jr={nextTick:$s,title:Es,browser:As,env:Ss,argv:Ts,version:Is,versions:xs,on:Rs,addListener:Ms,once:Bs,off:Us,removeListener:Ds,removeAllListeners:Ns,emit:Cs,binding:Ls,cwd:js,chdir:ks,umask:Vs,hrtime:Gs,platform:Os,release:Ps,config:Fs,uptime:Ws},Yt;typeof Object.create=="function"?Yt=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:Yt=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};var Gi=Yt,zs=/%[sdj%]/g;function kr(r){if(!rr(r)){for(var e=[],t=0;t<arguments.length;t++)e.push(Y(arguments[t]));return e.join(" ")}for(var t=1,n=arguments,i=n.length,a=String(r).replace(zs,function(f){if(f==="%%")return"%";if(t>=i)return f;switch(f){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch{return"[Circular]"}default:return f}}),o=n[t];t<i;o=n[++t])er(o)||!Oe(o)?a+=" "+o:a+=" "+Y(o);return a}function Kt(r,e){if(K(Ne.process))return function(){return Kt(r,e).apply(this,arguments)};if(jr.noDeprecation===!0)return r;var t=!1;function n(){if(!t){if(jr.throwDeprecation)throw new Error(e);jr.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return n}var Vr={},Zt;function Hi(r){if(K(Zt)&&(Zt=jr.env.NODE_DEBUG||""),r=r.toUpperCase(),!Vr[r])if(new RegExp("\\b"+r+"\\b","i").test(Zt)){var e=0;Vr[r]=function(){var t=kr.apply(null,arguments);console.error("%s %d: %s",r,e,t)}}else Vr[r]=function(){};return Vr[r]}function Y(r,e){var t={seen:[],stylize:Ys};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),Gr(e)?t.showHidden=e:e&&an(t,e),K(t.showHidden)&&(t.showHidden=!1),K(t.depth)&&(t.depth=2),K(t.colors)&&(t.colors=!1),K(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=Xs),qr(t,r,t.depth)}Y.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Y.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Xs(r,e){var t=Y.styles[e];return t?"\x1B["+Y.colors[t][0]+"m"+r+"\x1B["+Y.colors[t][1]+"m":r}function Ys(r,e){return r}function Ks(r){var e={};return r.forEach(function(t,n){e[t]=!0}),e}function qr(r,e,t){if(r.customInspect&&e&&ir(e.inspect)&&e.inspect!==Y&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(t,r);return rr(n)||(n=qr(r,n,t)),n}var i=Zs(r,e);if(i)return i;var a=Object.keys(e),o=Ks(a);if(r.showHidden&&(a=Object.getOwnPropertyNames(e)),nr(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return Jt(e);if(a.length===0){if(ir(e)){var f=e.name?": "+e.name:"";return r.stylize("[Function"+f+"]","special")}if(tr(e))return r.stylize(RegExp.prototype.toString.call(e),"regexp");if(Hr(e))return r.stylize(Date.prototype.toString.call(e),"date");if(nr(e))return Jt(e)}var s="",c=!1,l=["{","}"];if(en(e)&&(c=!0,l=["[","]"]),ir(e)){var u=e.name?": "+e.name:"";s=" [Function"+u+"]"}if(tr(e)&&(s=" "+RegExp.prototype.toString.call(e)),Hr(e)&&(s=" "+Date.prototype.toUTCString.call(e)),nr(e)&&(s=" "+Jt(e)),a.length===0&&(!c||e.length==0))return l[0]+s+l[1];if(t<0)return tr(e)?r.stylize(RegExp.prototype.toString.call(e),"regexp"):r.stylize("[Object]","special");r.seen.push(e);var p;return c?p=Js(r,e,t,o,a):p=a.map(function(d){return Qt(r,e,t,o,d,c)}),r.seen.pop(),Qs(p,s,l)}function Zs(r,e){if(K(e))return r.stylize("undefined","undefined");if(rr(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if(rn(e))return r.stylize(""+e,"number");if(Gr(e))return r.stylize(""+e,"boolean");if(er(e))return r.stylize("null","null")}function Jt(r){return"["+Error.prototype.toString.call(r)+"]"}function Js(r,e,t,n,i){for(var a=[],o=0,f=e.length;o<f;++o)Zi(e,String(o))?a.push(Qt(r,e,t,n,String(o),!0)):a.push("");return i.forEach(function(s){s.match(/^\d+$/)||a.push(Qt(r,e,t,n,s,!0))}),a}function Qt(r,e,t,n,i,a){var o,f,s;if(s=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},s.get?s.set?f=r.stylize("[Getter/Setter]","special"):f=r.stylize("[Getter]","special"):s.set&&(f=r.stylize("[Setter]","special")),Zi(n,i)||(o="["+i+"]"),f||(r.seen.indexOf(s.value)<0?(er(t)?f=qr(r,s.value,null):f=qr(r,s.value,t-1),f.indexOf(`
|
|
8
|
-
`)>-1&&(a?
|
|
7
|
+
*/var Xs=50;y.TYPED_ARRAY_SUPPORT=Ne.TYPED_ARRAY_SUPPORT!==void 0?Ne.TYPED_ARRAY_SUPPORT:!0,Rr();function Rr(){return y.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ne(r,e){if(Rr()<e)throw new RangeError("Invalid typed array length");return y.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=y.prototype):(r===null&&(r=new y(e)),r.length=e),r}function y(r,e,t){if(!y.TYPED_ARRAY_SUPPORT&&!(this instanceof y))return new y(r,e,t);if(typeof r=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return Ht(this,r)}return Ii(this,r,e,t)}y.poolSize=8192,y._augment=function(r){return r.__proto__=y.prototype,r};function Ii(r,e,t,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?Zs(r,e,t,n):typeof e=="string"?Ks(r,e,t):Js(r,e)}y.from=function(r,e,t){return Ii(null,r,e,t)},y.TYPED_ARRAY_SUPPORT&&(y.prototype.__proto__=Uint8Array.prototype,y.__proto__=Uint8Array);function Ti(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function Ys(r,e,t,n){return Ti(e),e<=0?ne(r,e):t!==void 0?typeof n=="string"?ne(r,e).fill(t,n):ne(r,e).fill(t):ne(r,e)}y.alloc=function(r,e,t){return Ys(null,r,e,t)};function Ht(r,e){if(Ti(e),r=ne(r,e<0?0:zt(e)|0),!y.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}y.allocUnsafe=function(r){return Ht(null,r)},y.allocUnsafeSlow=function(r){return Ht(null,r)};function Ks(r,e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!y.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=xi(e,t)|0;r=ne(r,n);var i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function Wt(r,e){var t=e.length<0?0:zt(e.length)|0;r=ne(r,t);for(var n=0;n<t;n+=1)r[n]=e[n]&255;return r}function Zs(r,e,t,n){if(e.byteLength,t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");return t===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,t):e=new Uint8Array(e,t,n),y.TYPED_ARRAY_SUPPORT?(r=e,r.__proto__=y.prototype):r=Wt(r,e),r}function Js(r,e){if(X(e)){var t=zt(e.length)|0;return r=ne(r,t),r.length===0||e.copy(r,0,0,t),r}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||_f(e.length)?ne(r,0):Wt(r,e);if(e.type==="Buffer"&&Si(e.data))return Wt(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function zt(r){if(r>=Rr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Rr().toString(16)+" bytes");return r|0}y.isBuffer=mf;function X(r){return!!(r!=null&&r._isBuffer)}y.compare=function(e,t){if(!X(e)||!X(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,a=0,o=Math.min(n,i);a<o;++a)if(e[a]!==t[a]){n=e[a],i=t[a];break}return n<i?-1:i<n?1:0},y.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},y.concat=function(e,t){if(!Si(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return y.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=y.allocUnsafe(t),a=0;for(n=0;n<e.length;++n){var o=e[n];if(!X(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};function xi(r,e){if(X(r))return r.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var t=r.length;if(t===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return Ur(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Ci(r).length;default:if(n)return Ur(r).length;e=(""+e).toLowerCase(),n=!0}}y.byteLength=xi;function Qs(r,e,t){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return cf(this,e,t);case"utf8":case"utf-8":return Mi(this,e,t);case"ascii":return sf(this,e,t);case"latin1":case"binary":return ff(this,e,t);case"base64":return of(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lf(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}y.prototype._isBuffer=!0;function we(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}y.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)we(this,t,t+1);return this},y.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)we(this,t,t+3),we(this,t+1,t+2);return this},y.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)we(this,t,t+7),we(this,t+1,t+6),we(this,t+2,t+5),we(this,t+3,t+4);return this},y.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Mi(this,0,e):Qs.apply(this,arguments)},y.prototype.equals=function(e){if(!X(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:y.compare(this,e)===0},y.prototype.inspect=function(){var e="",t=Xs;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},y.prototype.compare=function(e,t,n,i,a){if(!X(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),t<0||n>e.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&t>=n)return 0;if(i>=a)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,a>>>=0,this===e)return 0;for(var o=a-i,s=n-t,f=Math.min(o,s),c=this.slice(i,a),l=e.slice(t,n),u=0;u<f;++u)if(c[u]!==l[u]){o=c[u],s=l[u];break}return o<s?-1:s<o?1:0};function Pi(r,e,t,n,i){if(r.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=i?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(i)return-1;t=r.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof e=="string"&&(e=y.from(e,n)),X(e))return e.length===0?-1:Fi(r,e,t,n,i);if(typeof e=="number")return e=e&255,y.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):Fi(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Fi(r,e,t,n,i){var a=1,o=r.length,s=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||e.length<2)return-1;a=2,o/=2,s/=2,t/=2}function f(d,_){return a===1?d[_]:d.readUInt16BE(_*a)}var c;if(i){var l=-1;for(c=t;c<o;c++)if(f(r,c)===f(e,l===-1?0:c-l)){if(l===-1&&(l=c),c-l+1===s)return l*a}else l!==-1&&(c-=c-l),l=-1}else for(t+s>o&&(t=o-s),c=t;c>=0;c--){for(var u=!0,p=0;p<s;p++)if(f(r,c+p)!==f(e,p)){u=!1;break}if(u)return c}return-1}y.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},y.prototype.indexOf=function(e,t,n){return Pi(this,e,t,n,!0)},y.prototype.lastIndexOf=function(e,t,n){return Pi(this,e,t,n,!1)};function ef(r,e,t,n){t=Number(t)||0;var i=r.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;var a=e.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(e.substr(o*2,2),16);if(isNaN(s))return o;r[t+o]=s}return o}function rf(r,e,t,n){return Dr(Ur(e,r.length-t),r,t,n)}function Ri(r,e,t,n){return Dr(vf(e),r,t,n)}function tf(r,e,t,n){return Ri(r,e,t,n)}function nf(r,e,t,n){return Dr(Ci(e),r,t,n)}function af(r,e,t,n){return Dr(gf(e,r.length-t),r,t,n)}y.prototype.write=function(e,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var a=this.length-t;if((n===void 0||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return ef(this,e,t,n);case"utf8":case"utf-8":return rf(this,e,t,n);case"ascii":return Ri(this,e,t,n);case"latin1":case"binary":return tf(this,e,t,n);case"base64":return nf(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return af(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function of(r,e,t){return e===0&&t===r.length?Oi(r):Oi(r.slice(e,t))}function Mi(r,e,t){t=Math.min(r.length,t);for(var n=[],i=e;i<t;){var a=r[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=t){var f,c,l,u;switch(s){case 1:a<128&&(o=a);break;case 2:f=r[i+1],(f&192)===128&&(u=(a&31)<<6|f&63,u>127&&(o=u));break;case 3:f=r[i+1],c=r[i+2],(f&192)===128&&(c&192)===128&&(u=(a&15)<<12|(f&63)<<6|c&63,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:f=r[i+1],c=r[i+2],l=r[i+3],(f&192)===128&&(c&192)===128&&(l&192)===128&&(u=(a&15)<<18|(f&63)<<12|(c&63)<<6|l&63,u>65535&&u<1114112&&(o=u))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=s}return uf(n)}var Bi=4096;function uf(r){var e=r.length;if(e<=Bi)return String.fromCharCode.apply(String,r);for(var t="",n=0;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=Bi));return t}function sf(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]&127);return n}function ff(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]);return n}function cf(r,e,t){var n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);for(var i="",a=e;a<t;++a)i+=df(r[a]);return i}function lf(r,e,t){for(var n=r.slice(e,t),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}y.prototype.slice=function(e,t){var n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var i;if(y.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=y.prototype;else{var a=t-e;i=new y(a,void 0);for(var o=0;o<a;++o)i[o]=this[o+e]}return i};function U(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}y.prototype.readUIntLE=function(e,t,n){e=e|0,t=t|0,n||U(e,t,this.length);for(var i=this[e],a=1,o=0;++o<t&&(a*=256);)i+=this[e+o]*a;return i},y.prototype.readUIntBE=function(e,t,n){e=e|0,t=t|0,n||U(e,t,this.length);for(var i=this[e+--t],a=1;t>0&&(a*=256);)i+=this[e+--t]*a;return i},y.prototype.readUInt8=function(e,t){return t||U(e,1,this.length),this[e]},y.prototype.readUInt16LE=function(e,t){return t||U(e,2,this.length),this[e]|this[e+1]<<8},y.prototype.readUInt16BE=function(e,t){return t||U(e,2,this.length),this[e]<<8|this[e+1]},y.prototype.readUInt32LE=function(e,t){return t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},y.prototype.readUInt32BE=function(e,t){return t||U(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},y.prototype.readIntLE=function(e,t,n){e=e|0,t=t|0,n||U(e,t,this.length);for(var i=this[e],a=1,o=0;++o<t&&(a*=256);)i+=this[e+o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*t)),i},y.prototype.readIntBE=function(e,t,n){e=e|0,t=t|0,n||U(e,t,this.length);for(var i=t,a=1,o=this[e+--i];i>0&&(a*=256);)o+=this[e+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*t)),o},y.prototype.readInt8=function(e,t){return t||U(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},y.prototype.readInt16LE=function(e,t){t||U(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},y.prototype.readInt16BE=function(e,t){t||U(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},y.prototype.readInt32LE=function(e,t){return t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},y.prototype.readInt32BE=function(e,t){return t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},y.prototype.readFloatLE=function(e,t){return t||U(e,4,this.length),Fr(this,e,!0,23,4)},y.prototype.readFloatBE=function(e,t){return t||U(e,4,this.length),Fr(this,e,!1,23,4)},y.prototype.readDoubleLE=function(e,t){return t||U(e,8,this.length),Fr(this,e,!0,52,8)},y.prototype.readDoubleBE=function(e,t){return t||U(e,8,this.length),Fr(this,e,!1,52,8)};function V(r,e,t,n,i,a){if(!X(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}y.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;V(this,e,t,n,a,0)}var o=1,s=0;for(this[t]=e&255;++s<n&&(o*=256);)this[t+s]=e/o&255;return t+n},y.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;V(this,e,t,n,a,0)}var o=n-1,s=1;for(this[t+o]=e&255;--o>=0&&(s*=256);)this[t+o]=e/s&255;return t+n},y.prototype.writeUInt8=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,1,255,0),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};function Mr(r,e,t,n){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(r.length-t,2);i<a;++i)r[t+i]=(e&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}y.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Mr(this,e,t,!0),t+2},y.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Mr(this,e,t,!1),t+2};function Br(r,e,t,n){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(r.length-t,4);i<a;++i)r[t+i]=e>>>(n?i:3-i)*8&255}y.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255):Br(this,e,t,!0),t+4},y.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Br(this,e,t,!1),t+4},y.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t|0,!i){var a=Math.pow(2,8*n-1);V(this,e,t,n,a-1,-a)}var o=0,s=1,f=0;for(this[t]=e&255;++o<n&&(s*=256);)e<0&&f===0&&this[t+o-1]!==0&&(f=1),this[t+o]=(e/s>>0)-f&255;return t+n},y.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=t|0,!i){var a=Math.pow(2,8*n-1);V(this,e,t,n,a-1,-a)}var o=n-1,s=1,f=0;for(this[t+o]=e&255;--o>=0&&(s*=256);)e<0&&f===0&&this[t+o+1]!==0&&(f=1),this[t+o]=(e/s>>0)-f&255;return t+n},y.prototype.writeInt8=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,1,127,-128),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e&255,t+1},y.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Mr(this,e,t,!0),t+2},y.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Mr(this,e,t,!1),t+2},y.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,2147483647,-2147483648),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Br(this,e,t,!0),t+4},y.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Br(this,e,t,!1),t+4};function Ui(r,e,t,n,i,a){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Di(r,e,t,n,i){return i||Ui(r,e,t,4),Ai(r,e,t,n,23,4),t+4}y.prototype.writeFloatLE=function(e,t,n){return Di(this,e,t,!0,n)},y.prototype.writeFloatBE=function(e,t,n){return Di(this,e,t,!1,n)};function Ni(r,e,t,n,i){return i||Ui(r,e,t,8),Ai(r,e,t,n,52,8),t+8}y.prototype.writeDoubleLE=function(e,t,n){return Ni(this,e,t,!0,n)},y.prototype.writeDoubleBE=function(e,t,n){return Ni(this,e,t,!1,n)},y.prototype.copy=function(e,t,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var a=i-n,o;if(this===e&&n<t&&t<i)for(o=a-1;o>=0;--o)e[o+t]=this[o+n];else if(a<1e3||!y.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},y.prototype.fill=function(e,t,n,i){if(typeof e=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),e.length===1){var a=e.charCodeAt(0);a<256&&(e=a)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!y.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof e=="number"&&(e=e&255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var o;if(typeof e=="number")for(o=t;o<n;++o)this[o]=e;else{var s=X(e)?e:Ur(new y(e,i).toString()),f=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%f]}return this};var pf=/[^+\/0-9A-Za-z-_]/g;function hf(r){if(r=yf(r).replace(pf,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function yf(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function df(r){return r<16?"0"+r.toString(16):r.toString(16)}function Ur(r,e){e=e||1/0;for(var t,n=r.length,i=null,a=[],o=0;o<n;++o){if(t=r.charCodeAt(o),t>55295&&t<57344){if(!i){if(t>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=t;continue}if(t<56320){(e-=3)>-1&&a.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,t<128){if((e-=1)<0)break;a.push(t)}else if(t<2048){if((e-=2)<0)break;a.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;a.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;a.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return a}function vf(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function gf(r,e){for(var t,n,i,a=[],o=0;o<r.length&&!((e-=2)<0);++o)t=r.charCodeAt(o),n=t>>8,i=t%256,a.push(i),a.push(n);return a}function Ci(r){return Gs(hf(r))}function Dr(r,e,t,n){for(var i=0;i<n&&!(i+t>=e.length||i>=r.length);++i)e[i+t]=r[i];return i}function _f(r){return r!==r}function mf(r){return r!=null&&(!!r._isBuffer||Li(r)||bf(r))}function Li(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function bf(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Li(r.slice(0,0))}function ji(){throw new Error("setTimeout has not been defined")}function ki(){throw new Error("clearTimeout has not been defined")}var le=ji,pe=ki;typeof Ne.setTimeout=="function"&&(le=setTimeout),typeof Ne.clearTimeout=="function"&&(pe=clearTimeout);function qi(r){if(le===setTimeout)return setTimeout(r,0);if((le===ji||!le)&&setTimeout)return le=setTimeout,setTimeout(r,0);try{return le(r,0)}catch{try{return le.call(null,r,0)}catch{return le.call(this,r,0)}}}function wf(r){if(pe===clearTimeout)return clearTimeout(r);if((pe===ki||!pe)&&clearTimeout)return pe=clearTimeout,clearTimeout(r);try{return pe(r)}catch{try{return pe.call(null,r)}catch{return pe.call(this,r)}}}var ie=[],Ce=!1,$e,Nr=-1;function $f(){!Ce||!$e||(Ce=!1,$e.length?ie=$e.concat(ie):Nr=-1,ie.length&&Vi())}function Vi(){if(!Ce){var r=qi($f);Ce=!0;for(var e=ie.length;e;){for($e=ie,ie=[];++Nr<e;)$e&&$e[Nr].run();Nr=-1,e=ie.length}$e=null,Ce=!1,wf(r)}}function Ef(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];ie.push(new Gi(r,e)),ie.length===1&&!Ce&&qi(Vi)}function Gi(r,e){this.fun=r,this.array=e}Gi.prototype.run=function(){this.fun.apply(null,this.array)};var Of="browser",Af="browser",Sf=!0,If={},Tf=[],xf="",Pf={},Ff={},Rf={};function Ee(){}var Mf=Ee,Bf=Ee,Uf=Ee,Df=Ee,Nf=Ee,Cf=Ee,Lf=Ee;function jf(r){throw new Error("process.binding is not supported")}function kf(){return"/"}function qf(r){throw new Error("process.chdir is not supported")}function Vf(){return 0}var Le=Ne.performance||{},Gf=Le.now||Le.mozNow||Le.msNow||Le.oNow||Le.webkitNow||function(){return new Date().getTime()};function Hf(r){var e=Gf.call(Le)*.001,t=Math.floor(e),n=Math.floor(e%1*1e9);return r&&(t=t-r[0],n=n-r[1],n<0&&(t--,n+=1e9)),[t,n]}var Wf=new Date;function zf(){var r=new Date,e=r-Wf;return e/1e3}var Cr={nextTick:Ef,title:Of,browser:Sf,env:If,argv:Tf,version:xf,versions:Pf,on:Mf,addListener:Bf,once:Uf,off:Df,removeListener:Nf,removeAllListeners:Cf,emit:Lf,binding:jf,cwd:kf,chdir:qf,umask:Vf,hrtime:Hf,platform:Af,release:Ff,config:Rf,uptime:zf},Xt;typeof Object.create=="function"?Xt=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:Xt=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};var Hi=Xt,Xf=/%[sdj%]/g;function Lr(r){if(!rr(r)){for(var e=[],t=0;t<arguments.length;t++)e.push(Y(arguments[t]));return e.join(" ")}for(var t=1,n=arguments,i=n.length,a=String(r).replace(Xf,function(s){if(s==="%%")return"%";if(t>=i)return s;switch(s){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch{return"[Circular]"}default:return s}}),o=n[t];t<i;o=n[++t])er(o)||!Oe(o)?a+=" "+o:a+=" "+Y(o);return a}function Yt(r,e){if(K(Ne.process))return function(){return Yt(r,e).apply(this,arguments)};if(Cr.noDeprecation===!0)return r;var t=!1;function n(){if(!t){if(Cr.throwDeprecation)throw new Error(e);Cr.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return n}var jr={},Kt;function Wi(r){if(K(Kt)&&(Kt=Cr.env.NODE_DEBUG||""),r=r.toUpperCase(),!jr[r])if(new RegExp("\\b"+r+"\\b","i").test(Kt)){var e=0;jr[r]=function(){var t=Lr.apply(null,arguments);console.error("%s %d: %s",r,e,t)}}else jr[r]=function(){};return jr[r]}function Y(r,e){var t={seen:[],stylize:Kf};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),qr(e)?t.showHidden=e:e&&nn(t,e),K(t.showHidden)&&(t.showHidden=!1),K(t.depth)&&(t.depth=2),K(t.colors)&&(t.colors=!1),K(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=Yf),kr(t,r,t.depth)}Y.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Y.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Yf(r,e){var t=Y.styles[e];return t?"\x1B["+Y.colors[t][0]+"m"+r+"\x1B["+Y.colors[t][1]+"m":r}function Kf(r,e){return r}function Zf(r){var e={};return r.forEach(function(t,n){e[t]=!0}),e}function kr(r,e,t){if(r.customInspect&&e&&ir(e.inspect)&&e.inspect!==Y&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(t,r);return rr(n)||(n=kr(r,n,t)),n}var i=Jf(r,e);if(i)return i;var a=Object.keys(e),o=Zf(a);if(r.showHidden&&(a=Object.getOwnPropertyNames(e)),nr(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return Zt(e);if(a.length===0){if(ir(e)){var s=e.name?": "+e.name:"";return r.stylize("[Function"+s+"]","special")}if(tr(e))return r.stylize(RegExp.prototype.toString.call(e),"regexp");if(Vr(e))return r.stylize(Date.prototype.toString.call(e),"date");if(nr(e))return Zt(e)}var f="",c=!1,l=["{","}"];if(Qt(e)&&(c=!0,l=["[","]"]),ir(e)){var u=e.name?": "+e.name:"";f=" [Function"+u+"]"}if(tr(e)&&(f=" "+RegExp.prototype.toString.call(e)),Vr(e)&&(f=" "+Date.prototype.toUTCString.call(e)),nr(e)&&(f=" "+Zt(e)),a.length===0&&(!c||e.length==0))return l[0]+f+l[1];if(t<0)return tr(e)?r.stylize(RegExp.prototype.toString.call(e),"regexp"):r.stylize("[Object]","special");r.seen.push(e);var p;return c?p=Qf(r,e,t,o,a):p=a.map(function(d){return Jt(r,e,t,o,d,c)}),r.seen.pop(),ec(p,f,l)}function Jf(r,e){if(K(e))return r.stylize("undefined","undefined");if(rr(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if(en(e))return r.stylize(""+e,"number");if(qr(e))return r.stylize(""+e,"boolean");if(er(e))return r.stylize("null","null")}function Zt(r){return"["+Error.prototype.toString.call(r)+"]"}function Qf(r,e,t,n,i){for(var a=[],o=0,s=e.length;o<s;++o)Ji(e,String(o))?a.push(Jt(r,e,t,n,String(o),!0)):a.push("");return i.forEach(function(f){f.match(/^\d+$/)||a.push(Jt(r,e,t,n,f,!0))}),a}function Jt(r,e,t,n,i,a){var o,s,f;if(f=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},f.get?f.set?s=r.stylize("[Getter/Setter]","special"):s=r.stylize("[Getter]","special"):f.set&&(s=r.stylize("[Setter]","special")),Ji(n,i)||(o="["+i+"]"),s||(r.seen.indexOf(f.value)<0?(er(t)?s=kr(r,f.value,null):s=kr(r,f.value,t-1),s.indexOf(`
|
|
8
|
+
`)>-1&&(a?s=s.split(`
|
|
9
9
|
`).map(function(c){return" "+c}).join(`
|
|
10
|
-
`).substr(2):
|
|
11
|
-
`+
|
|
10
|
+
`).substr(2):s=`
|
|
11
|
+
`+s.split(`
|
|
12
12
|
`).map(function(c){return" "+c}).join(`
|
|
13
|
-
`))):
|
|
13
|
+
`))):s=r.stylize("[Circular]","special")),K(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=r.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=r.stylize(o,"string"))}return o+": "+s}function ec(r,e,t){var n=r.reduce(function(i,a){return a.indexOf(`
|
|
14
14
|
`)>=0,i+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?t[0]+(e===""?"":e+`
|
|
15
15
|
`)+" "+r.join(`,
|
|
16
|
-
`)+" "+t[1]:t[0]+e+" "+r.join(", ")+" "+t[1]}function en(r){return Array.isArray(r)}function Gr(r){return typeof r=="boolean"}function er(r){return r===null}function Wi(r){return r==null}function rn(r){return typeof r=="number"}function rr(r){return typeof r=="string"}function zi(r){return typeof r=="symbol"}function K(r){return r===void 0}function tr(r){return Oe(r)&&tn(r)==="[object RegExp]"}function Oe(r){return typeof r=="object"&&r!==null}function Hr(r){return Oe(r)&&tn(r)==="[object Date]"}function nr(r){return Oe(r)&&(tn(r)==="[object Error]"||r instanceof Error)}function ir(r){return typeof r=="function"}function Xi(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r>"u"}function Yi(r){return y.isBuffer(r)}function tn(r){return Object.prototype.toString.call(r)}function nn(r){return r<10?"0"+r.toString(10):r.toString(10)}var ec=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function rc(){var r=new Date,e=[nn(r.getHours()),nn(r.getMinutes()),nn(r.getSeconds())].join(":");return[r.getDate(),ec[r.getMonth()],e].join(" ")}function Ki(){console.log("%s - %s",rc(),kr.apply(null,arguments))}function an(r,e){if(!e||!Oe(e))return r;for(var t=Object.keys(e),n=t.length;n--;)r[t[n]]=e[t[n]];return r}function Zi(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var tc={inherits:Gi,_extend:an,log:Ki,isBuffer:Yi,isPrimitive:Xi,isFunction:ir,isError:nr,isDate:Hr,isObject:Oe,isRegExp:tr,isUndefined:K,isSymbol:zi,isString:rr,isNumber:rn,isNullOrUndefined:Wi,isNull:er,isBoolean:Gr,isArray:en,inspect:Y,deprecate:Kt,format:kr,debuglog:Hi},nc=Object.freeze({__proto__:null,format:kr,deprecate:Kt,debuglog:Hi,inspect:Y,isArray:en,isBoolean:Gr,isNull:er,isNullOrUndefined:Wi,isNumber:rn,isString:rr,isSymbol:zi,isUndefined:K,isRegExp:tr,isObject:Oe,isDate:Hr,isError:nr,isFunction:ir,isPrimitive:Xi,isBuffer:Yi,log:Ki,inherits:Gi,_extend:an,default:tc}),ic=Ze(nc),ac=ic.inspect,on=typeof Map=="function"&&Map.prototype,un=Object.getOwnPropertyDescriptor&&on?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Wr=on&&un&&typeof un.get=="function"?un.get:null,oc=on&&Map.prototype.forEach,fn=typeof Set=="function"&&Set.prototype,sn=Object.getOwnPropertyDescriptor&&fn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,zr=fn&&sn&&typeof sn.get=="function"?sn.get:null,uc=fn&&Set.prototype.forEach,fc=typeof WeakMap=="function"&&WeakMap.prototype,ar=fc?WeakMap.prototype.has:null,sc=typeof WeakSet=="function"&&WeakSet.prototype,or=sc?WeakSet.prototype.has:null,cc=typeof WeakRef=="function"&&WeakRef.prototype,Ji=cc?WeakRef.prototype.deref:null,lc=Boolean.prototype.valueOf,pc=Object.prototype.toString,hc=Function.prototype.toString,yc=String.prototype.match,cn=String.prototype.slice,he=String.prototype.replace,dc=String.prototype.toUpperCase,Qi=String.prototype.toLowerCase,ea=RegExp.prototype.test,ra=Array.prototype.concat,Z=Array.prototype.join,vc=Array.prototype.slice,ta=Math.floor,ln=typeof BigInt=="function"?BigInt.prototype.valueOf:null,pn=Object.getOwnPropertySymbols,hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,je=typeof Symbol=="function"&&typeof Symbol.iterator=="object",k=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===je?"object":"symbol")?Symbol.toStringTag:null,na=Object.prototype.propertyIsEnumerable,ia=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function aa(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||ea.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-ta(-r):ta(r);if(n!==r){var i=String(n),a=cn.call(e,i.length+1);return he.call(i,t,"$&_")+"."+he.call(he.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return he.call(e,t,"$&_")}var yn=ac,oa=yn.custom,ua=ca(oa)?oa:null,gc=function r(e,t,n,i){var a=t||{};if(ye(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ye(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=ye(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ye(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ye(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var f=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return pa(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var s=String(e);return f?aa(e,s):s}if(typeof e=="bigint"){var c=String(e)+"n";return f?aa(e,c):c}var l=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=l&&l>0&&typeof e=="object")return dn(e)?"[Array]":"[Object]";var u=Uc(a,n);if(typeof i>"u")i=[];else if(la(i,e)>=0)return"[Circular]";function p(re,ge,se){if(ge&&(i=vc.call(i),i.push(ge)),se){var Ir={depth:a.depth};return ye(a,"quoteStyle")&&(Ir.quoteStyle=a.quoteStyle),r(re,Ir,n+1,i)}return r(re,a,n+1,i)}if(typeof e=="function"&&!sa(e)){var d=Sc(e),_=Xr(e,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(_.length>0?" { "+Z.call(_,", ")+" }":"")}if(ca(e)){var E=je?he.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):hn.call(e);return typeof e=="object"&&!je?ur(E):E}if(Rc(e)){for(var $="<"+Qi.call(String(e.nodeName)),b=e.attributes||[],S=0;S<b.length;S++)$+=" "+b[S].name+"="+fa(_c(b[S].value),"double",a);return $+=">",e.childNodes&&e.childNodes.length&&($+="..."),$+="</"+Qi.call(String(e.nodeName))+">",$}if(dn(e)){if(e.length===0)return"[]";var h=Xr(e,p);return u&&!Bc(h)?"["+gn(h,u)+"]":"[ "+Z.call(h,", ")+" ]"}if(bc(e)){var A=Xr(e,p);return!("cause"in Error.prototype)&&"cause"in e&&!na.call(e,"cause")?"{ ["+String(e)+"] "+Z.call(ra.call("[cause]: "+p(e.cause),A),", ")+" }":A.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Z.call(A,", ")+" }"}if(typeof e=="object"&&o){if(ua&&typeof e[ua]=="function"&&yn)return yn(e,{depth:l-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Tc(e)){var x=[];return oc.call(e,function(re,ge){x.push(p(ge,e,!0)+" => "+p(re,e))}),ha("Map",Wr.call(e),x,u)}if(Pc(e)){var R=[];return uc.call(e,function(re){R.push(p(re,e))}),ha("Set",zr.call(e),R,u)}if(Ic(e))return vn("WeakMap");if(Fc(e))return vn("WeakSet");if(xc(e))return vn("WeakRef");if($c(e))return ur(p(Number(e)));if(Oc(e))return ur(p(ln.call(e)));if(Ec(e))return ur(lc.call(e));if(wc(e))return ur(p(String(e)));if(!mc(e)&&!sa(e)){var m=Xr(e,p),v=ia?ia(e)===Object.prototype:e instanceof Object||e.constructor===Object,g=e instanceof Object?"":"null prototype",w=!v&&k&&Object(e)===e&&k in e?cn.call(de(e),8,-1):g?"Object":"",O=v||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",L=O+(w||g?"["+Z.call(ra.call([],w||[],g||[]),": ")+"] ":"");return m.length===0?L+"{}":u?L+"{"+gn(m,u)+"}":L+"{ "+Z.call(m,", ")+" }"}return String(e)};function fa(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function _c(r){return he.call(String(r),/"/g,""")}function dn(r){return de(r)==="[object Array]"&&(!k||!(typeof r=="object"&&k in r))}function mc(r){return de(r)==="[object Date]"&&(!k||!(typeof r=="object"&&k in r))}function sa(r){return de(r)==="[object RegExp]"&&(!k||!(typeof r=="object"&&k in r))}function bc(r){return de(r)==="[object Error]"&&(!k||!(typeof r=="object"&&k in r))}function wc(r){return de(r)==="[object String]"&&(!k||!(typeof r=="object"&&k in r))}function $c(r){return de(r)==="[object Number]"&&(!k||!(typeof r=="object"&&k in r))}function Ec(r){return de(r)==="[object Boolean]"&&(!k||!(typeof r=="object"&&k in r))}function ca(r){if(je)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!hn)return!1;try{return hn.call(r),!0}catch{}return!1}function Oc(r){if(!r||typeof r!="object"||!ln)return!1;try{return ln.call(r),!0}catch{}return!1}var Ac=Object.prototype.hasOwnProperty||function(r){return r in this};function ye(r,e){return Ac.call(r,e)}function de(r){return pc.call(r)}function Sc(r){if(r.name)return r.name;var e=yc.call(hc.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function la(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function Tc(r){if(!Wr||!r||typeof r!="object")return!1;try{Wr.call(r);try{zr.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function Ic(r){if(!ar||!r||typeof r!="object")return!1;try{ar.call(r,ar);try{or.call(r,or)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function xc(r){if(!Ji||!r||typeof r!="object")return!1;try{return Ji.call(r),!0}catch{}return!1}function Pc(r){if(!zr||!r||typeof r!="object")return!1;try{zr.call(r);try{Wr.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function Fc(r){if(!or||!r||typeof r!="object")return!1;try{or.call(r,or);try{ar.call(r,ar)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function Rc(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function pa(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return pa(cn.call(r,0,e.maxStringLength),e)+n}var i=he.call(he.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Mc);return fa(i,"single",e)}function Mc(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+dc.call(e.toString(16))}function ur(r){return"Object("+r+")"}function vn(r){return r+" { ? }"}function ha(r,e,t,n){var i=n?gn(t,n):Z.call(t,", ");return r+" ("+e+") {"+i+"}"}function Bc(r){for(var e=0;e<r.length;e++)if(la(r[e],`
|
|
17
|
-
`)>=0)return!1;return!0}function
|
|
16
|
+
`)+" "+t[1]:t[0]+e+" "+r.join(", ")+" "+t[1]}function Qt(r){return Array.isArray(r)}function qr(r){return typeof r=="boolean"}function er(r){return r===null}function zi(r){return r==null}function en(r){return typeof r=="number"}function rr(r){return typeof r=="string"}function Xi(r){return typeof r=="symbol"}function K(r){return r===void 0}function tr(r){return Oe(r)&&rn(r)==="[object RegExp]"}function Oe(r){return typeof r=="object"&&r!==null}function Vr(r){return Oe(r)&&rn(r)==="[object Date]"}function nr(r){return Oe(r)&&(rn(r)==="[object Error]"||r instanceof Error)}function ir(r){return typeof r=="function"}function Yi(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r>"u"}function Ki(r){return y.isBuffer(r)}function rn(r){return Object.prototype.toString.call(r)}function tn(r){return r<10?"0"+r.toString(10):r.toString(10)}var rc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function tc(){var r=new Date,e=[tn(r.getHours()),tn(r.getMinutes()),tn(r.getSeconds())].join(":");return[r.getDate(),rc[r.getMonth()],e].join(" ")}function Zi(){console.log("%s - %s",tc(),Lr.apply(null,arguments))}function nn(r,e){if(!e||!Oe(e))return r;for(var t=Object.keys(e),n=t.length;n--;)r[t[n]]=e[t[n]];return r}function Ji(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var nc={inherits:Hi,_extend:nn,log:Zi,isBuffer:Ki,isPrimitive:Yi,isFunction:ir,isError:nr,isDate:Vr,isObject:Oe,isRegExp:tr,isUndefined:K,isSymbol:Xi,isString:rr,isNumber:en,isNullOrUndefined:zi,isNull:er,isBoolean:qr,isArray:Qt,inspect:Y,deprecate:Yt,format:Lr,debuglog:Wi},ic=Object.freeze({__proto__:null,format:Lr,deprecate:Yt,debuglog:Wi,inspect:Y,isArray:Qt,isBoolean:qr,isNull:er,isNullOrUndefined:zi,isNumber:en,isString:rr,isSymbol:Xi,isUndefined:K,isRegExp:tr,isObject:Oe,isDate:Vr,isError:nr,isFunction:ir,isPrimitive:Yi,isBuffer:Ki,log:Zi,inherits:Hi,_extend:nn,default:nc}),ac=Ze(ic),oc=ac.inspect,an=typeof Map=="function"&&Map.prototype,on=Object.getOwnPropertyDescriptor&&an?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Gr=an&&on&&typeof on.get=="function"?on.get:null,uc=an&&Map.prototype.forEach,un=typeof Set=="function"&&Set.prototype,sn=Object.getOwnPropertyDescriptor&&un?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Hr=un&&sn&&typeof sn.get=="function"?sn.get:null,sc=un&&Set.prototype.forEach,fc=typeof WeakMap=="function"&&WeakMap.prototype,ar=fc?WeakMap.prototype.has:null,cc=typeof WeakSet=="function"&&WeakSet.prototype,or=cc?WeakSet.prototype.has:null,lc=typeof WeakRef=="function"&&WeakRef.prototype,Qi=lc?WeakRef.prototype.deref:null,pc=Boolean.prototype.valueOf,hc=Object.prototype.toString,yc=Function.prototype.toString,dc=String.prototype.match,fn=String.prototype.slice,he=String.prototype.replace,vc=String.prototype.toUpperCase,ea=String.prototype.toLowerCase,ra=RegExp.prototype.test,ta=Array.prototype.concat,Z=Array.prototype.join,gc=Array.prototype.slice,na=Math.floor,cn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ln=Object.getOwnPropertySymbols,pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,je=typeof Symbol=="function"&&typeof Symbol.iterator=="object",k=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===je?"object":"symbol")?Symbol.toStringTag:null,ia=Object.prototype.propertyIsEnumerable,aa=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function oa(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||ra.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-na(-r):na(r);if(n!==r){var i=String(n),a=fn.call(e,i.length+1);return he.call(i,t,"$&_")+"."+he.call(he.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return he.call(e,t,"$&_")}var hn=oc,ua=hn.custom,sa=la(ua)?ua:null,_c=function r(e,t,n,i){var a=t||{};if(ye(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ye(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=ye(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ye(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ye(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return ha(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var f=String(e);return s?oa(e,f):f}if(typeof e=="bigint"){var c=String(e)+"n";return s?oa(e,c):c}var l=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=l&&l>0&&typeof e=="object")return yn(e)?"[Array]":"[Object]";var u=Dc(a,n);if(typeof i>"u")i=[];else if(pa(i,e)>=0)return"[Circular]";function p(re,ge,fe){if(ge&&(i=gc.call(i),i.push(ge)),fe){var Tr={depth:a.depth};return ye(a,"quoteStyle")&&(Tr.quoteStyle=a.quoteStyle),r(re,Tr,n+1,i)}return r(re,a,n+1,i)}if(typeof e=="function"&&!ca(e)){var d=Ic(e),_=Wr(e,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(_.length>0?" { "+Z.call(_,", ")+" }":"")}if(la(e)){var E=je?he.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):pn.call(e);return typeof e=="object"&&!je?ur(E):E}if(Mc(e)){for(var $="<"+ea.call(String(e.nodeName)),b=e.attributes||[],S=0;S<b.length;S++)$+=" "+b[S].name+"="+fa(mc(b[S].value),"double",a);return $+=">",e.childNodes&&e.childNodes.length&&($+="..."),$+="</"+ea.call(String(e.nodeName))+">",$}if(yn(e)){if(e.length===0)return"[]";var h=Wr(e,p);return u&&!Uc(h)?"["+vn(h,u)+"]":"[ "+Z.call(h,", ")+" ]"}if(wc(e)){var A=Wr(e,p);return!("cause"in Error.prototype)&&"cause"in e&&!ia.call(e,"cause")?"{ ["+String(e)+"] "+Z.call(ta.call("[cause]: "+p(e.cause),A),", ")+" }":A.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Z.call(A,", ")+" }"}if(typeof e=="object"&&o){if(sa&&typeof e[sa]=="function"&&hn)return hn(e,{depth:l-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Tc(e)){var x=[];return uc.call(e,function(re,ge){x.push(p(ge,e,!0)+" => "+p(re,e))}),ya("Map",Gr.call(e),x,u)}if(Fc(e)){var R=[];return sc.call(e,function(re){R.push(p(re,e))}),ya("Set",Hr.call(e),R,u)}if(xc(e))return dn("WeakMap");if(Rc(e))return dn("WeakSet");if(Pc(e))return dn("WeakRef");if(Ec(e))return ur(p(Number(e)));if(Ac(e))return ur(p(cn.call(e)));if(Oc(e))return ur(pc.call(e));if($c(e))return ur(p(String(e)));if(!bc(e)&&!ca(e)){var m=Wr(e,p),v=aa?aa(e)===Object.prototype:e instanceof Object||e.constructor===Object,g=e instanceof Object?"":"null prototype",w=!v&&k&&Object(e)===e&&k in e?fn.call(de(e),8,-1):g?"Object":"",O=v||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",L=O+(w||g?"["+Z.call(ta.call([],w||[],g||[]),": ")+"] ":"");return m.length===0?L+"{}":u?L+"{"+vn(m,u)+"}":L+"{ "+Z.call(m,", ")+" }"}return String(e)};function fa(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function mc(r){return he.call(String(r),/"/g,""")}function yn(r){return de(r)==="[object Array]"&&(!k||!(typeof r=="object"&&k in r))}function bc(r){return de(r)==="[object Date]"&&(!k||!(typeof r=="object"&&k in r))}function ca(r){return de(r)==="[object RegExp]"&&(!k||!(typeof r=="object"&&k in r))}function wc(r){return de(r)==="[object Error]"&&(!k||!(typeof r=="object"&&k in r))}function $c(r){return de(r)==="[object String]"&&(!k||!(typeof r=="object"&&k in r))}function Ec(r){return de(r)==="[object Number]"&&(!k||!(typeof r=="object"&&k in r))}function Oc(r){return de(r)==="[object Boolean]"&&(!k||!(typeof r=="object"&&k in r))}function la(r){if(je)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!pn)return!1;try{return pn.call(r),!0}catch{}return!1}function Ac(r){if(!r||typeof r!="object"||!cn)return!1;try{return cn.call(r),!0}catch{}return!1}var Sc=Object.prototype.hasOwnProperty||function(r){return r in this};function ye(r,e){return Sc.call(r,e)}function de(r){return hc.call(r)}function Ic(r){if(r.name)return r.name;var e=dc.call(yc.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function pa(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function Tc(r){if(!Gr||!r||typeof r!="object")return!1;try{Gr.call(r);try{Hr.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function xc(r){if(!ar||!r||typeof r!="object")return!1;try{ar.call(r,ar);try{or.call(r,or)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function Pc(r){if(!Qi||!r||typeof r!="object")return!1;try{return Qi.call(r),!0}catch{}return!1}function Fc(r){if(!Hr||!r||typeof r!="object")return!1;try{Hr.call(r);try{Gr.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function Rc(r){if(!or||!r||typeof r!="object")return!1;try{or.call(r,or);try{ar.call(r,ar)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function Mc(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function ha(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return ha(fn.call(r,0,e.maxStringLength),e)+n}var i=he.call(he.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Bc);return fa(i,"single",e)}function Bc(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+vc.call(e.toString(16))}function ur(r){return"Object("+r+")"}function dn(r){return r+" { ? }"}function ya(r,e,t,n){var i=n?vn(t,n):Z.call(t,", ");return r+" ("+e+") {"+i+"}"}function Uc(r){for(var e=0;e<r.length;e++)if(pa(r[e],`
|
|
17
|
+
`)>=0)return!1;return!0}function Dc(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=Z.call(Array(r.indent+1)," ");else return null;return{base:t,prev:Z.call(Array(e+1),t)}}function vn(r,e){if(r.length===0)return"";var t=`
|
|
18
18
|
`+e.prev+e.base;return t+Z.call(r,","+t)+`
|
|
19
|
-
`+e.prev}function Xr(r,e){var t=dn(r),n=[];if(t){n.length=r.length;for(var i=0;i<r.length;i++)n[i]=ye(r,i)?e(r[i],r):""}var a=typeof pn=="function"?pn(r):[],o;if(je){o={};for(var f=0;f<a.length;f++)o["$"+a[f]]=a[f]}for(var s in r)!ye(r,s)||t&&String(Number(s))===s&&s<r.length||je&&o["$"+s]instanceof Symbol||(ea.call(/[^\w$]/,s)?n.push(e(s,r)+": "+e(r[s],r)):n.push(s+": "+e(r[s],r)));if(typeof pn=="function")for(var c=0;c<a.length;c++)na.call(r,a[c])&&n.push("["+e(a[c])+"]: "+e(r[a[c]],r));return n}var _n=Gt,ke=Vf,Dc=gc,Nc=_n("%TypeError%"),Yr=_n("%WeakMap%",!0),Kr=_n("%Map%",!0),Cc=ke("WeakMap.prototype.get",!0),Lc=ke("WeakMap.prototype.set",!0),jc=ke("WeakMap.prototype.has",!0),kc=ke("Map.prototype.get",!0),Vc=ke("Map.prototype.set",!0),qc=ke("Map.prototype.has",!0),mn=function(r,e){for(var t=r,n;(n=t.next)!==null;t=n)if(n.key===e)return t.next=n.next,n.next=r.next,r.next=n,n},Gc=function(r,e){var t=mn(r,e);return t&&t.value},Hc=function(r,e,t){var n=mn(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},Wc=function(r,e){return!!mn(r,e)},zc=function(){var e,t,n,i={assert:function(a){if(!i.has(a))throw new Nc("Side channel does not contain "+Dc(a))},get:function(a){if(Yr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Cc(e,a)}else if(Kr){if(t)return kc(t,a)}else if(n)return Gc(n,a)},has:function(a){if(Yr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return jc(e,a)}else if(Kr){if(t)return qc(t,a)}else if(n)return Wc(n,a);return!1},set:function(a,o){Yr&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new Yr),Lc(e,a,o)):Kr?(t||(t=new Kr),Vc(t,a,o)):(n||(n={key:{},next:null}),Hc(n,a,o))}};return i},Xc=String.prototype.replace,Yc=/%20/g,bn={RFC1738:"RFC1738",RFC3986:"RFC3986"},wn={default:bn.RFC3986,formatters:{RFC1738:function(r){return Xc.call(r,Yc,"+")},RFC3986:function(r){return String(r)}},RFC1738:bn.RFC1738,RFC3986:bn.RFC3986},Kc=wn,$n=Object.prototype.hasOwnProperty,Ae=Array.isArray,J=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),Zc=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Ae(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);t.obj[t.prop]=i}}},ya=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(n[i]=e[i]);return n},Jc=function r(e,t,n){if(!t)return e;if(typeof t!="object"){if(Ae(e))e.push(t);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!$n.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var i=e;return Ae(e)&&!Ae(t)&&(i=ya(e,n)),Ae(e)&&Ae(t)?(t.forEach(function(a,o){if($n.call(e,o)){var f=e[o];f&&typeof f=="object"&&a&&typeof a=="object"?e[o]=r(f,a,n):e.push(a)}else e[o]=a}),e):Object.keys(t).reduce(function(a,o){var f=t[o];return $n.call(a,o)?a[o]=r(a[o],f,n):a[o]=f,a},i)},Qc=function(e,t){return Object.keys(t).reduce(function(n,i){return n[i]=t[i],n},e)},el=function(r,e,t){var n=r.replace(/\+/g," ");if(t==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},rl=function(e,t,n,i,a){if(e.length===0)return e;var o=e;if(typeof e=="symbol"?o=Symbol.prototype.toString.call(e):typeof e!="string"&&(o=String(e)),n==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(l){return"%26%23"+parseInt(l.slice(2),16)+"%3B"});for(var f="",s=0;s<o.length;++s){var c=o.charCodeAt(s);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||a===Kc.RFC1738&&(c===40||c===41)){f+=o.charAt(s);continue}if(c<128){f=f+J[c];continue}if(c<2048){f=f+(J[192|c>>6]+J[128|c&63]);continue}if(c<55296||c>=57344){f=f+(J[224|c>>12]+J[128|c>>6&63]+J[128|c&63]);continue}s+=1,c=65536+((c&1023)<<10|o.charCodeAt(s)&1023),f+=J[240|c>>18]+J[128|c>>12&63]+J[128|c>>6&63]+J[128|c&63]}return f},tl=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],i=0;i<t.length;++i)for(var a=t[i],o=a.obj[a.prop],f=Object.keys(o),s=0;s<f.length;++s){var c=f[s],l=o[c];typeof l=="object"&&l!==null&&n.indexOf(l)===-1&&(t.push({obj:o,prop:c}),n.push(l))}return Zc(t),e},nl=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},il=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},al=function(e,t){return[].concat(e,t)},ol=function(e,t){if(Ae(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(t(e[i]));return n}return t(e)},da={arrayToObject:ya,assign:Qc,combine:al,compact:tl,decode:el,encode:rl,isBuffer:il,isRegExp:nl,maybeMap:ol,merge:Jc},va=zc,En=da,fr=wn,ul=Object.prototype.hasOwnProperty,ga={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},ae=Array.isArray,fl=String.prototype.split,sl=Array.prototype.push,_a=function(r,e){sl.apply(r,ae(e)?e:[e])},cl=Date.prototype.toISOString,ma=fr.default,N={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:En.encode,encodeValuesOnly:!1,format:ma,formatter:fr.formatters[ma],indices:!1,serializeDate:function(e){return cl.call(e)},skipNulls:!1,strictNullHandling:!1},ll=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},On={},pl=function r(e,t,n,i,a,o,f,s,c,l,u,p,d,_,E,$){for(var b=e,S=$,h=0,A=!1;(S=S.get(On))!==void 0&&!A;){var x=S.get(e);if(h+=1,typeof x<"u"){if(x===h)throw new RangeError("Cyclic object value");A=!0}typeof S.get(On)>"u"&&(h=0)}if(typeof s=="function"?b=s(t,b):b instanceof Date?b=u(b):n==="comma"&&ae(b)&&(b=En.maybeMap(b,function(ci){return ci instanceof Date?u(ci):ci})),b===null){if(a)return f&&!_?f(t,N.encoder,E,"key",p):t;b=""}if(ll(b)||En.isBuffer(b)){if(f){var R=_?t:f(t,N.encoder,E,"key",p);if(n==="comma"&&_){for(var m=fl.call(String(b),","),v="",g=0;g<m.length;++g)v+=(g===0?"":",")+d(f(m[g],N.encoder,E,"value",p));return[d(R)+(i&&ae(b)&&m.length===1?"[]":"")+"="+v]}return[d(R)+"="+d(f(b,N.encoder,E,"value",p))]}return[d(t)+"="+d(String(b))]}var w=[];if(typeof b>"u")return w;var O;if(n==="comma"&&ae(b))O=[{value:b.length>0?b.join(",")||null:void 0}];else if(ae(s))O=s;else{var L=Object.keys(b);O=c?L.sort(c):L}for(var re=i&&ae(b)&&b.length===1?t+"[]":t,ge=0;ge<O.length;++ge){var se=O[ge],Ir=typeof se=="object"&&typeof se.value<"u"?se.value:b[se];if(!(o&&Ir===null)){var s2=ae(b)?typeof n=="function"?n(re,se):re:re+(l?"."+se:"["+se+"]");$.set(e,h);var ff=va();ff.set(On,$),_a(w,r(Ir,s2,n,i,a,o,f,s,c,l,u,p,d,_,E,ff))}}return w},hl=function(e){if(!e)return N;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||N.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=fr.default;if(typeof e.format<"u"){if(!ul.call(fr.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=fr.formatters[n],a=N.filter;return(typeof e.filter=="function"||ae(e.filter))&&(a=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:N.addQueryPrefix,allowDots:typeof e.allowDots>"u"?N.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:N.charsetSentinel,delimiter:typeof e.delimiter>"u"?N.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:N.encode,encoder:typeof e.encoder=="function"?e.encoder:N.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:N.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:N.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:N.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:N.strictNullHandling}},yl=function(r,e){var t=r,n=hl(e),i,a;typeof n.filter=="function"?(a=n.filter,t=a("",t)):ae(n.filter)&&(a=n.filter,i=a);var o=[];if(typeof t!="object"||t===null)return"";var f;e&&e.arrayFormat in ga?f=e.arrayFormat:e&&"indices"in e?f=e.indices?"indices":"repeat":f="indices";var s=ga[f];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=s==="comma"&&e&&e.commaRoundTrip;i||(i=Object.keys(t)),n.sort&&i.sort(n.sort);for(var l=va(),u=0;u<i.length;++u){var p=i[u];n.skipNulls&&t[p]===null||_a(o,pl(t[p],p,s,c,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,l))}var d=o.join(n.delimiter),_=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),d.length>0?_+d:""},Ve=da,An=Object.prototype.hasOwnProperty,dl=Array.isArray,D={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Ve.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},vl=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},ba=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},gl="utf8=%26%2310003%3B",_l="utf8=%E2%9C%93",ml=function(e,t){var n={},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,a),f=-1,s,c=t.charset;if(t.charsetSentinel)for(s=0;s<o.length;++s)o[s].indexOf("utf8=")===0&&(o[s]===_l?c="utf-8":o[s]===gl&&(c="iso-8859-1"),f=s,s=o.length);for(s=0;s<o.length;++s)if(s!==f){var l=o[s],u=l.indexOf("]="),p=u===-1?l.indexOf("="):u+1,d,_;p===-1?(d=t.decoder(l,D.decoder,c,"key"),_=t.strictNullHandling?null:""):(d=t.decoder(l.slice(0,p),D.decoder,c,"key"),_=Ve.maybeMap(ba(l.slice(p+1),t),function(E){return t.decoder(E,D.decoder,c,"value")})),_&&t.interpretNumericEntities&&c==="iso-8859-1"&&(_=vl(_)),l.indexOf("[]=")>-1&&(_=dl(_)?[_]:_),An.call(n,d)?n[d]=Ve.combine(n[d],_):n[d]=_}return n},bl=function(r,e,t,n){for(var i=n?e:ba(e,t),a=r.length-1;a>=0;--a){var o,f=r[a];if(f==="[]"&&t.parseArrays)o=[].concat(i);else{o=t.plainObjects?Object.create(null):{};var s=f.charAt(0)==="["&&f.charAt(f.length-1)==="]"?f.slice(1,-1):f,c=parseInt(s,10);!t.parseArrays&&s===""?o={0:i}:!isNaN(c)&&f!==s&&String(c)===s&&c>=0&&t.parseArrays&&c<=t.arrayLimit?(o=[],o[c]=i):s!=="__proto__"&&(o[s]=i)}i=o}return i},wl=function(e,t,n,i){if(!!e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,f=/(\[[^[\]]*])/g,s=n.depth>0&&o.exec(a),c=s?a.slice(0,s.index):a,l=[];if(c){if(!n.plainObjects&&An.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var u=0;n.depth>0&&(s=f.exec(a))!==null&&u<n.depth;){if(u+=1,!n.plainObjects&&An.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+a.slice(s.index)+"]"),bl(l,t,n,i)}},$l=function(e){if(!e)return D;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?D.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?D.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:D.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:D.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:D.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:D.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:D.comma,decoder:typeof e.decoder=="function"?e.decoder:D.decoder,delimiter:typeof e.delimiter=="string"||Ve.isRegExp(e.delimiter)?e.delimiter:D.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:D.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:D.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:D.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:D.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:D.strictNullHandling}},El=function(r,e){var t=$l(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?ml(r,t):r,i=t.plainObjects?Object.create(null):{},a=Object.keys(n),o=0;o<a.length;++o){var f=a[o],s=wl(f,n[f],t,typeof r=="string");i=Ve.merge(i,s,t)}return t.allowSparse===!0?i:Ve.compact(i)},Ol=yl,Al=El,Sl=wn,Tl={formats:Sl,parse:Al,stringify:Ol};let wa={storeIdentifier:"",environment:"prod",apiKey:""};function Il(r){wa=r}function Sn(){return wa}const xl=r=>r==="stage"?"https://api.stage.rechargeapps.com":"https://api.rechargeapps.com",Pl=r=>r==="stage"?"https://static.stage.rechargecdn.com":"https://static.rechargecdn.com",Fl="/tools/recurring";var Rl=Object.defineProperty,$a=Object.getOwnPropertySymbols,Ml=Object.prototype.hasOwnProperty,Bl=Object.prototype.propertyIsEnumerable,Ea=(r,e,t)=>e in r?Rl(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Zr=(r,e)=>{for(var t in e||(e={}))Ml.call(e,t)&&Ea(r,t,e[t]);if($a)for(var t of $a(e))Bl.call(e,t)&&Ea(r,t,e[t]);return r};function Ul(r){return Tl.stringify(r,{encode:!1,indices:!1,arrayFormat:"comma"})}async function Jr(r,e,t={}){const n=Sn();return Se(r,`${Pl(n.environment)}/store/${n.storeIdentifier}${e}`,t)}async function T(r,e,{id:t,query:n,data:i,headers:a}={}){var o;const f=Sn(),s=(o=Pr.get("recharge-session"))!=null?o:f.apiKey;if(!s)throw new Error("No API Key or token found.");const c=xl(f.environment),l=Zr({"Content-Type":"application/json","X-Recharge-Access-Token":s,"X-Recharge-Version":"2021-11","X-Recharge-App":"storefront-client"},a||{}),u=Zr({shop_url:f.storeIdentifier},n);return Se(r,`${c}${e}`,{id:t,query:u,data:i,headers:l})}async function Tn(r,e,{id:t,query:n,data:i,headers:a}={}){const o=Zr({"Content-Type":"application/json","X-Recharge-App":"storefront-client"},a||{});return Se(r,`${Fl}${e}`,{id:t,query:n,data:i,headers:o})}async function Se(r,e,{id:t,query:n,data:i,headers:a}={}){let o=e.trim();if(t&&(o=[o,`${t}`.trim()].join("/")),n){let u;[o,u]=o.split("?");const p=[u,Ul(n)].join("&").replace(/^&/,"");o=`${o}${p?`?${p}`:""}`}let f;i&&r!=="get"&&(f=JSON.stringify(i));const s=Zr({Accept:"application/json"},a||{}),c=await fetch(o,{method:r,headers:s,body:f,mode:"cors"});let l;try{l=await c.json()}catch{}if(!c.ok)throw l&&l.error?new Error(`${c.status}: ${l.error}`):new Error("A connection error occurred while making the request");return l}function Dl(r){return T("get","/addresses",{query:r})}async function Nl(r){const{address:e}=await T("get","/addresses",{id:r});return e}async function Cl(r){const{address:e}=await T("post","/addresses",{data:r});return e}async function Ll(r,e){const{address:t}=await T("put","/addresses",{id:r,data:e});return t}function jl(r){return T("delete","/addresses",{id:r})}async function kl(r){const{address:e}=await T("post","/addresses/merge",{data:r});return e}async function Vl(r,e){const{charge:t}=await T("post",`/addresses/${r}/charges/skip`,{data:e});return t}var ql=Object.freeze({__proto__:null,listAddresses:Dl,getAddress:Nl,createAddress:Cl,updateAddress:Ll,deleteAddress:jl,mergeAddresses:kl,skipFutureCharge:Vl}),Gl=Object.freeze({__proto__:null,login:async()=>{const r=await Tn("get","/logged_in_customer_poc");if(r.api_token){const e=new Date;e.setHours(e.getHours()+1),Pr.set("recharge-session",r.api_token,{expires:e})}else Pr.remove("recharge-session");return!!r.api_token},logout:()=>{Pr.remove("recharge-session")}}),oe={},Qr={},Oa={},In={},ue={},Hl=typeof te=="object"&&te&&te.Object===Object&&te,Aa=Hl,Wl=Aa,zl=typeof self=="object"&&self&&self.Object===Object&&self,Xl=Wl||zl||Function("return this")(),Q=Xl,Yl=Q,Kl=Yl.Symbol,qe=Kl,Sa=qe,Ta=Object.prototype,Zl=Ta.hasOwnProperty,Jl=Ta.toString,sr=Sa?Sa.toStringTag:void 0;function Ql(r){var e=Zl.call(r,sr),t=r[sr];try{r[sr]=void 0;var n=!0}catch{}var i=Jl.call(r);return n&&(e?r[sr]=t:delete r[sr]),i}var ep=Ql,rp=Object.prototype,tp=rp.toString;function np(r){return tp.call(r)}var ip=np,Ia=qe,ap=ep,op=ip,up="[object Null]",fp="[object Undefined]",xa=Ia?Ia.toStringTag:void 0;function sp(r){return r==null?r===void 0?fp:up:xa&&xa in Object(r)?ap(r):op(r)}var fe=sp;function cp(r){return r!=null&&typeof r=="object"}var H=cp,lp=fe,pp=H,hp="[object Number]";function yp(r){return typeof r=="number"||pp(r)&&lp(r)==hp}var et=yp,M={},Pa={exports:{}};function dp(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var ve=dp,vp=fe,gp=ve,_p="[object AsyncFunction]",mp="[object Function]",bp="[object GeneratorFunction]",wp="[object Proxy]";function $p(r){if(!gp(r))return!1;var e=vp(r);return e==mp||e==bp||e==_p||e==wp}var xn=$p,Ep=Q,Op=Ep["__core-js_shared__"],Ap=Op,Pn=Ap,Fa=function(){var r=/[^.]+$/.exec(Pn&&Pn.keys&&Pn.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Sp(r){return!!Fa&&Fa in r}var Tp=Sp,Ip=Function.prototype,xp=Ip.toString;function Pp(r){if(r!=null){try{return xp.call(r)}catch{}try{return r+""}catch{}}return""}var Ra=Pp,Fp=xn,Rp=Tp,Mp=ve,Bp=Ra,Up=/[\\^$.*+?()[\]{}|]/g,Dp=/^\[object .+?Constructor\]$/,Np=Function.prototype,Cp=Object.prototype,Lp=Np.toString,jp=Cp.hasOwnProperty,kp=RegExp("^"+Lp.call(jp).replace(Up,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Vp(r){if(!Mp(r)||Rp(r))return!1;var e=Fp(r)?kp:Dp;return e.test(Bp(r))}var qp=Vp;function Gp(r,e){return r?.[e]}var Hp=Gp,Wp=qp,zp=Hp;function Xp(r,e){var t=zp(r,e);return Wp(t)?t:void 0}var Te=Xp,Yp=Te,Kp=function(){try{var r=Yp(Object,"defineProperty");return r({},"",{}),r}catch{}}(),Ma=Kp,Ba=Ma;function Zp(r,e,t){e=="__proto__"&&Ba?Ba(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}var Ua=Zp;function Jp(r,e){return r===e||r!==r&&e!==e}var rt=Jp,Qp=Ua,eh=rt,rh=Object.prototype,th=rh.hasOwnProperty;function nh(r,e,t){var n=r[e];(!(th.call(r,e)&&eh(n,t))||t===void 0&&!(e in r))&&Qp(r,e,t)}var Da=nh,ih=Da,ah=Ua;function oh(r,e,t,n){var i=!t;t||(t={});for(var a=-1,o=e.length;++a<o;){var f=e[a],s=n?n(t[f],r[f],f,t,r):void 0;s===void 0&&(s=r[f]),i?ah(t,f,s):ih(t,f,s)}return t}var Ge=oh;function uh(r){return r}var tt=uh;function fh(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}var sh=fh,ch=sh,Na=Math.max;function lh(r,e,t){return e=Na(e===void 0?r.length-1:e,0),function(){for(var n=arguments,i=-1,a=Na(n.length-e,0),o=Array(a);++i<a;)o[i]=n[e+i];i=-1;for(var f=Array(e+1);++i<e;)f[i]=n[i];return f[e]=t(o),ch(r,this,f)}}var Ca=lh;function ph(r){return function(){return r}}var hh=ph,yh=hh,La=Ma,dh=tt,vh=La?function(r,e){return La(r,"toString",{configurable:!0,enumerable:!1,value:yh(e),writable:!0})}:dh,gh=vh,_h=800,mh=16,bh=Date.now;function wh(r){var e=0,t=0;return function(){var n=bh(),i=mh-(n-t);if(t=n,i>0){if(++e>=_h)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var $h=wh,Eh=gh,Oh=$h,Ah=Oh(Eh),ja=Ah,Sh=tt,Th=Ca,Ih=ja;function xh(r,e){return Ih(Th(r,e,Sh),r+"")}var Ph=xh,Fh=9007199254740991;function Rh(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Fh}var Fn=Rh,Mh=xn,Bh=Fn;function Uh(r){return r!=null&&Bh(r.length)&&!Mh(r)}var cr=Uh,Dh=9007199254740991,Nh=/^(?:0|[1-9]\d*)$/;function Ch(r,e){var t=typeof r;return e=e??Dh,!!e&&(t=="number"||t!="symbol"&&Nh.test(r))&&r>-1&&r%1==0&&r<e}var Rn=Ch,Lh=rt,jh=cr,kh=Rn,Vh=ve;function qh(r,e,t){if(!Vh(t))return!1;var n=typeof e;return(n=="number"?jh(t)&&kh(e,t.length):n=="string"&&e in t)?Lh(t[e],r):!1}var ka=qh,Gh=Ph,Hh=ka;function Wh(r){return Gh(function(e,t){var n=-1,i=t.length,a=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(a=r.length>3&&typeof a=="function"?(i--,a):void 0,o&&Hh(t[0],t[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var f=t[n];f&&r(e,f,n,a)}return e})}var zh=Wh;function Xh(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var Va=Xh,Yh=fe,Kh=H,Zh="[object Arguments]";function Jh(r){return Kh(r)&&Yh(r)==Zh}var Qh=Jh,qa=Qh,ey=H,Ga=Object.prototype,ry=Ga.hasOwnProperty,ty=Ga.propertyIsEnumerable,ny=qa(function(){return arguments}())?qa:function(r){return ey(r)&&ry.call(r,"callee")&&!ty.call(r,"callee")},Mn=ny,iy=Array.isArray,C=iy,lr={exports:{}};function ay(){return!1}var oy=ay;(function(r,e){var t=Q,n=oy,i=e&&!e.nodeType&&e,a=i&&!0&&r&&!r.nodeType&&r,o=a&&a.exports===i,f=o?t.Buffer:void 0,s=f?f.isBuffer:void 0,c=s||n;r.exports=c})(lr,lr.exports);var uy=fe,fy=Fn,sy=H,cy="[object Arguments]",ly="[object Array]",py="[object Boolean]",hy="[object Date]",yy="[object Error]",dy="[object Function]",vy="[object Map]",gy="[object Number]",_y="[object Object]",my="[object RegExp]",by="[object Set]",wy="[object String]",$y="[object WeakMap]",Ey="[object ArrayBuffer]",Oy="[object DataView]",Ay="[object Float32Array]",Sy="[object Float64Array]",Ty="[object Int8Array]",Iy="[object Int16Array]",xy="[object Int32Array]",Py="[object Uint8Array]",Fy="[object Uint8ClampedArray]",Ry="[object Uint16Array]",My="[object Uint32Array]",F={};F[Ay]=F[Sy]=F[Ty]=F[Iy]=F[xy]=F[Py]=F[Fy]=F[Ry]=F[My]=!0,F[cy]=F[ly]=F[Ey]=F[py]=F[Oy]=F[hy]=F[yy]=F[dy]=F[vy]=F[gy]=F[_y]=F[my]=F[by]=F[wy]=F[$y]=!1;function By(r){return sy(r)&&fy(r.length)&&!!F[uy(r)]}var Uy=By;function Dy(r){return function(e){return r(e)}}var Bn=Dy,pr={exports:{}};(function(r,e){var t=Aa,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a&&t.process,f=function(){try{var s=i&&i.require&&i.require("util").types;return s||o&&o.binding&&o.binding("util")}catch{}}();r.exports=f})(pr,pr.exports);var Ny=Uy,Cy=Bn,Ha=pr.exports,Wa=Ha&&Ha.isTypedArray,Ly=Wa?Cy(Wa):Ny,za=Ly,jy=Va,ky=Mn,Vy=C,qy=lr.exports,Gy=Rn,Hy=za,Wy=Object.prototype,zy=Wy.hasOwnProperty;function Xy(r,e){var t=Vy(r),n=!t&&ky(r),i=!t&&!n&&qy(r),a=!t&&!n&&!i&&Hy(r),o=t||n||i||a,f=o?jy(r.length,String):[],s=f.length;for(var c in r)(e||zy.call(r,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Gy(c,s)))&&f.push(c);return f}var Xa=Xy,Yy=Object.prototype;function Ky(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Yy;return r===t}var Un=Ky;function Zy(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var Jy=Zy,Qy=ve,ed=Un,rd=Jy,td=Object.prototype,nd=td.hasOwnProperty;function id(r){if(!Qy(r))return rd(r);var e=ed(r),t=[];for(var n in r)n=="constructor"&&(e||!nd.call(r,n))||t.push(n);return t}var ad=id,od=Xa,ud=ad,fd=cr;function sd(r){return fd(r)?od(r,!0):ud(r)}var nt=sd,cd=Ge,ld=zh,pd=nt,hd=ld(function(r,e){cd(e,pd(e),r)}),yd=hd;(function(r){r.exports=yd})(Pa);var it={},Ie={};function dd(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(!e(r[t],t,r))return!1;return!0}var vd=dd;function gd(r){return function(e,t,n){for(var i=-1,a=Object(e),o=n(e),f=o.length;f--;){var s=o[r?f:++i];if(t(a[s],s,a)===!1)break}return e}}var _d=gd,md=_d,bd=md(),wd=bd;function $d(r,e){return function(t){return r(e(t))}}var Ya=$d,Ed=Ya,Od=Ed(Object.keys,Object),Ad=Od,Sd=Un,Td=Ad,Id=Object.prototype,xd=Id.hasOwnProperty;function Pd(r){if(!Sd(r))return Td(r);var e=[];for(var t in Object(r))xd.call(r,t)&&t!="constructor"&&e.push(t);return e}var Fd=Pd,Rd=Xa,Md=Fd,Bd=cr;function Ud(r){return Bd(r)?Rd(r):Md(r)}var He=Ud,Dd=wd,Nd=He;function Cd(r,e){return r&&Dd(r,e,Nd)}var Ld=Cd,jd=cr;function kd(r,e){return function(t,n){if(t==null)return t;if(!jd(t))return r(t,n);for(var i=t.length,a=e?i:-1,o=Object(t);(e?a--:++a<i)&&n(o[a],a,o)!==!1;);return t}}var Vd=kd,qd=Ld,Gd=Vd,Hd=Gd(qd),Dn=Hd,Wd=Dn;function zd(r,e){var t=!0;return Wd(r,function(n,i,a){return t=!!e(n,i,a),t}),t}var Xd=zd;function Yd(){this.__data__=[],this.size=0}var Kd=Yd,Zd=rt;function Jd(r,e){for(var t=r.length;t--;)if(Zd(r[t][0],e))return t;return-1}var at=Jd,Qd=at,ev=Array.prototype,rv=ev.splice;function tv(r){var e=this.__data__,t=Qd(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():rv.call(e,t,1),--this.size,!0}var nv=tv,iv=at;function av(r){var e=this.__data__,t=iv(e,r);return t<0?void 0:e[t][1]}var ov=av,uv=at;function fv(r){return uv(this.__data__,r)>-1}var sv=fv,cv=at;function lv(r,e){var t=this.__data__,n=cv(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}var pv=lv,hv=Kd,yv=nv,dv=ov,vv=sv,gv=pv;function We(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}We.prototype.clear=hv,We.prototype.delete=yv,We.prototype.get=dv,We.prototype.has=vv,We.prototype.set=gv;var ot=We,_v=ot;function mv(){this.__data__=new _v,this.size=0}var bv=mv;function wv(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}var $v=wv;function Ev(r){return this.__data__.get(r)}var Ov=Ev;function Av(r){return this.__data__.has(r)}var Sv=Av,Tv=Te,Iv=Q,xv=Tv(Iv,"Map"),Nn=xv,Pv=Te,Fv=Pv(Object,"create"),ut=Fv,Ka=ut;function Rv(){this.__data__=Ka?Ka(null):{},this.size=0}var Mv=Rv;function Bv(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var Uv=Bv,Dv=ut,Nv="__lodash_hash_undefined__",Cv=Object.prototype,Lv=Cv.hasOwnProperty;function jv(r){var e=this.__data__;if(Dv){var t=e[r];return t===Nv?void 0:t}return Lv.call(e,r)?e[r]:void 0}var kv=jv,Vv=ut,qv=Object.prototype,Gv=qv.hasOwnProperty;function Hv(r){var e=this.__data__;return Vv?e[r]!==void 0:Gv.call(e,r)}var Wv=Hv,zv=ut,Xv="__lodash_hash_undefined__";function Yv(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=zv&&e===void 0?Xv:e,this}var Kv=Yv,Zv=Mv,Jv=Uv,Qv=kv,eg=Wv,rg=Kv;function ze(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}ze.prototype.clear=Zv,ze.prototype.delete=Jv,ze.prototype.get=Qv,ze.prototype.has=eg,ze.prototype.set=rg;var tg=ze,Za=tg,ng=ot,ig=Nn;function ag(){this.size=0,this.__data__={hash:new Za,map:new(ig||ng),string:new Za}}var og=ag;function ug(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}var fg=ug,sg=fg;function cg(r,e){var t=r.__data__;return sg(e)?t[typeof e=="string"?"string":"hash"]:t.map}var ft=cg,lg=ft;function pg(r){var e=lg(this,r).delete(r);return this.size-=e?1:0,e}var hg=pg,yg=ft;function dg(r){return yg(this,r).get(r)}var vg=dg,gg=ft;function _g(r){return gg(this,r).has(r)}var mg=_g,bg=ft;function wg(r,e){var t=bg(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}var $g=wg,Eg=og,Og=hg,Ag=vg,Sg=mg,Tg=$g;function Xe(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Xe.prototype.clear=Eg,Xe.prototype.delete=Og,Xe.prototype.get=Ag,Xe.prototype.has=Sg,Xe.prototype.set=Tg;var Cn=Xe,Ig=ot,xg=Nn,Pg=Cn,Fg=200;function Rg(r,e){var t=this.__data__;if(t instanceof Ig){var n=t.__data__;if(!xg||n.length<Fg-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new Pg(n)}return t.set(r,e),this.size=t.size,this}var Mg=Rg,Bg=ot,Ug=bv,Dg=$v,Ng=Ov,Cg=Sv,Lg=Mg;function Ye(r){var e=this.__data__=new Bg(r);this.size=e.size}Ye.prototype.clear=Ug,Ye.prototype.delete=Dg,Ye.prototype.get=Ng,Ye.prototype.has=Cg,Ye.prototype.set=Lg;var Ln=Ye,jg="__lodash_hash_undefined__";function kg(r){return this.__data__.set(r,jg),this}var Vg=kg;function qg(r){return this.__data__.has(r)}var Gg=qg,Hg=Cn,Wg=Vg,zg=Gg;function st(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new Hg;++e<t;)this.add(r[e])}st.prototype.add=st.prototype.push=Wg,st.prototype.has=zg;var Xg=st;function Yg(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}var Kg=Yg;function Zg(r,e){return r.has(e)}var Jg=Zg,Qg=Xg,e_=Kg,r_=Jg,t_=1,n_=2;function i_(r,e,t,n,i,a){var o=t&t_,f=r.length,s=e.length;if(f!=s&&!(o&&s>f))return!1;var c=a.get(r),l=a.get(e);if(c&&l)return c==e&&l==r;var u=-1,p=!0,d=t&n_?new Qg:void 0;for(a.set(r,e),a.set(e,r);++u<f;){var _=r[u],E=e[u];if(n)var $=o?n(E,_,u,e,r,a):n(_,E,u,r,e,a);if($!==void 0){if($)continue;p=!1;break}if(d){if(!e_(e,function(b,S){if(!r_(d,S)&&(_===b||i(_,b,t,n,a)))return d.push(S)})){p=!1;break}}else if(!(_===E||i(_,E,t,n,a))){p=!1;break}}return a.delete(r),a.delete(e),p}var Ja=i_,a_=Q,o_=a_.Uint8Array,Qa=o_;function u_(r){var e=-1,t=Array(r.size);return r.forEach(function(n,i){t[++e]=[i,n]}),t}var f_=u_;function s_(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var c_=s_,eo=qe,ro=Qa,l_=rt,p_=Ja,h_=f_,y_=c_,d_=1,v_=2,g_="[object Boolean]",__="[object Date]",m_="[object Error]",b_="[object Map]",w_="[object Number]",$_="[object RegExp]",E_="[object Set]",O_="[object String]",A_="[object Symbol]",S_="[object ArrayBuffer]",T_="[object DataView]",to=eo?eo.prototype:void 0,jn=to?to.valueOf:void 0;function I_(r,e,t,n,i,a,o){switch(t){case T_:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case S_:return!(r.byteLength!=e.byteLength||!a(new ro(r),new ro(e)));case g_:case __:case w_:return l_(+r,+e);case m_:return r.name==e.name&&r.message==e.message;case $_:case O_:return r==e+"";case b_:var f=h_;case E_:var s=n&d_;if(f||(f=y_),r.size!=e.size&&!s)return!1;var c=o.get(r);if(c)return c==e;n|=v_,o.set(r,e);var l=p_(f(r),f(e),n,i,a,o);return o.delete(r),l;case A_:if(jn)return jn.call(r)==jn.call(e)}return!1}var x_=I_;function P_(r,e){for(var t=-1,n=e.length,i=r.length;++t<n;)r[i+t]=e[t];return r}var kn=P_,F_=kn,R_=C;function M_(r,e,t){var n=e(r);return R_(r)?n:F_(n,t(r))}var no=M_;function B_(r,e){for(var t=-1,n=r==null?0:r.length,i=0,a=[];++t<n;){var o=r[t];e(o,t,r)&&(a[i++]=o)}return a}var U_=B_;function D_(){return[]}var io=D_,N_=U_,C_=io,L_=Object.prototype,j_=L_.propertyIsEnumerable,ao=Object.getOwnPropertySymbols,k_=ao?function(r){return r==null?[]:(r=Object(r),N_(ao(r),function(e){return j_.call(r,e)}))}:C_,Vn=k_,V_=no,q_=Vn,G_=He;function H_(r){return V_(r,G_,q_)}var oo=H_,uo=oo,W_=1,z_=Object.prototype,X_=z_.hasOwnProperty;function Y_(r,e,t,n,i,a){var o=t&W_,f=uo(r),s=f.length,c=uo(e),l=c.length;if(s!=l&&!o)return!1;for(var u=s;u--;){var p=f[u];if(!(o?p in e:X_.call(e,p)))return!1}var d=a.get(r),_=a.get(e);if(d&&_)return d==e&&_==r;var E=!0;a.set(r,e),a.set(e,r);for(var $=o;++u<s;){p=f[u];var b=r[p],S=e[p];if(n)var h=o?n(S,b,p,e,r,a):n(b,S,p,r,e,a);if(!(h===void 0?b===S||i(b,S,t,n,a):h)){E=!1;break}$||($=p=="constructor")}if(E&&!$){var A=r.constructor,x=e.constructor;A!=x&&"constructor"in r&&"constructor"in e&&!(typeof A=="function"&&A instanceof A&&typeof x=="function"&&x instanceof x)&&(E=!1)}return a.delete(r),a.delete(e),E}var K_=Y_,Z_=Te,J_=Q,Q_=Z_(J_,"DataView"),em=Q_,rm=Te,tm=Q,nm=rm(tm,"Promise"),im=nm,am=Te,om=Q,um=am(om,"Set"),fm=um,sm=Te,cm=Q,lm=sm(cm,"WeakMap"),pm=lm,qn=em,Gn=Nn,Hn=im,Wn=fm,zn=pm,fo=fe,Ke=Ra,so="[object Map]",hm="[object Object]",co="[object Promise]",lo="[object Set]",po="[object WeakMap]",ho="[object DataView]",ym=Ke(qn),dm=Ke(Gn),vm=Ke(Hn),gm=Ke(Wn),_m=Ke(zn),xe=fo;(qn&&xe(new qn(new ArrayBuffer(1)))!=ho||Gn&&xe(new Gn)!=so||Hn&&xe(Hn.resolve())!=co||Wn&&xe(new Wn)!=lo||zn&&xe(new zn)!=po)&&(xe=function(r){var e=fo(r),t=e==hm?r.constructor:void 0,n=t?Ke(t):"";if(n)switch(n){case ym:return ho;case dm:return so;case vm:return co;case gm:return lo;case _m:return po}return e});var ct=xe,Xn=Ln,mm=Ja,bm=x_,wm=K_,yo=ct,vo=C,go=lr.exports,$m=za,Em=1,_o="[object Arguments]",mo="[object Array]",lt="[object Object]",Om=Object.prototype,bo=Om.hasOwnProperty;function Am(r,e,t,n,i,a){var o=vo(r),f=vo(e),s=o?mo:yo(r),c=f?mo:yo(e);s=s==_o?lt:s,c=c==_o?lt:c;var l=s==lt,u=c==lt,p=s==c;if(p&&go(r)){if(!go(e))return!1;o=!0,l=!1}if(p&&!l)return a||(a=new Xn),o||$m(r)?mm(r,e,t,n,i,a):bm(r,e,s,t,n,i,a);if(!(t&Em)){var d=l&&bo.call(r,"__wrapped__"),_=u&&bo.call(e,"__wrapped__");if(d||_){var E=d?r.value():r,$=_?e.value():e;return a||(a=new Xn),i(E,$,t,n,a)}}return p?(a||(a=new Xn),wm(r,e,t,n,i,a)):!1}var Sm=Am,Tm=Sm,wo=H;function $o(r,e,t,n,i){return r===e?!0:r==null||e==null||!wo(r)&&!wo(e)?r!==r&&e!==e:Tm(r,e,t,n,$o,i)}var Eo=$o,Im=Ln,xm=Eo,Pm=1,Fm=2;function Rm(r,e,t,n){var i=t.length,a=i,o=!n;if(r==null)return!a;for(r=Object(r);i--;){var f=t[i];if(o&&f[2]?f[1]!==r[f[0]]:!(f[0]in r))return!1}for(;++i<a;){f=t[i];var s=f[0],c=r[s],l=f[1];if(o&&f[2]){if(c===void 0&&!(s in r))return!1}else{var u=new Im;if(n)var p=n(c,l,s,r,e,u);if(!(p===void 0?xm(l,c,Pm|Fm,n,u):p))return!1}}return!0}var Mm=Rm,Bm=ve;function Um(r){return r===r&&!Bm(r)}var Oo=Um,Dm=Oo,Nm=He;function Cm(r){for(var e=Nm(r),t=e.length;t--;){var n=e[t],i=r[n];e[t]=[n,i,Dm(i)]}return e}var Lm=Cm;function jm(r,e){return function(t){return t==null?!1:t[r]===e&&(e!==void 0||r in Object(t))}}var Ao=jm,km=Mm,Vm=Lm,qm=Ao;function Gm(r){var e=Vm(r);return e.length==1&&e[0][2]?qm(e[0][0],e[0][1]):function(t){return t===r||km(t,r,e)}}var Hm=Gm,Wm=fe,zm=H,Xm="[object Symbol]";function Ym(r){return typeof r=="symbol"||zm(r)&&Wm(r)==Xm}var pt=Ym,Km=C,Zm=pt,Jm=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Qm=/^\w*$/;function e0(r,e){if(Km(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||Zm(r)?!0:Qm.test(r)||!Jm.test(r)||e!=null&&r in Object(e)}var Yn=e0,So=Cn,r0="Expected a function";function Kn(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(r0);var t=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=t.cache;if(a.has(i))return a.get(i);var o=r.apply(this,n);return t.cache=a.set(i,o)||a,o};return t.cache=new(Kn.Cache||So),t}Kn.Cache=So;var t0=Kn,n0=t0,i0=500;function a0(r){var e=n0(r,function(n){return t.size===i0&&t.clear(),n}),t=e.cache;return e}var o0=a0,u0=o0,f0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s0=/\\(\\)?/g,c0=u0(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(f0,function(t,n,i,a){e.push(i?a.replace(s0,"$1"):n||t)}),e}),l0=c0;function p0(r,e){for(var t=-1,n=r==null?0:r.length,i=Array(n);++t<n;)i[t]=e(r[t],t,r);return i}var ht=p0,To=qe,h0=ht,y0=C,d0=pt,v0=1/0,Io=To?To.prototype:void 0,xo=Io?Io.toString:void 0;function Po(r){if(typeof r=="string")return r;if(y0(r))return h0(r,Po)+"";if(d0(r))return xo?xo.call(r):"";var e=r+"";return e=="0"&&1/r==-v0?"-0":e}var g0=Po,_0=g0;function m0(r){return r==null?"":_0(r)}var b0=m0,w0=C,$0=Yn,E0=l0,O0=b0;function A0(r,e){return w0(r)?r:$0(r,e)?[r]:E0(O0(r))}var yt=A0,S0=pt,T0=1/0;function I0(r){if(typeof r=="string"||S0(r))return r;var e=r+"";return e=="0"&&1/r==-T0?"-0":e}var hr=I0,x0=yt,P0=hr;function F0(r,e){e=x0(e,r);for(var t=0,n=e.length;r!=null&&t<n;)r=r[P0(e[t++])];return t&&t==n?r:void 0}var Zn=F0,R0=Zn;function M0(r,e,t){var n=r==null?void 0:R0(r,e);return n===void 0?t:n}var B0=M0;function U0(r,e){return r!=null&&e in Object(r)}var D0=U0,N0=yt,C0=Mn,L0=C,j0=Rn,k0=Fn,V0=hr;function q0(r,e,t){e=N0(e,r);for(var n=-1,i=e.length,a=!1;++n<i;){var o=V0(e[n]);if(!(a=r!=null&&t(r,o)))break;r=r[o]}return a||++n!=i?a:(i=r==null?0:r.length,!!i&&k0(i)&&j0(o,i)&&(L0(r)||C0(r)))}var G0=q0,H0=D0,W0=G0;function z0(r,e){return r!=null&&W0(r,e,H0)}var X0=z0,Y0=Eo,K0=B0,Z0=X0,J0=Yn,Q0=Oo,eb=Ao,rb=hr,tb=1,nb=2;function ib(r,e){return J0(r)&&Q0(e)?eb(rb(r),e):function(t){var n=K0(t,r);return n===void 0&&n===e?Z0(t,r):Y0(e,n,tb|nb)}}var ab=ib;function ob(r){return function(e){return e?.[r]}}var ub=ob,fb=Zn;function sb(r){return function(e){return fb(e,r)}}var cb=sb,lb=ub,pb=cb,hb=Yn,yb=hr;function db(r){return hb(r)?lb(yb(r)):pb(r)}var vb=db,gb=Hm,_b=ab,mb=tt,bb=C,wb=vb;function $b(r){return typeof r=="function"?r:r==null?mb:typeof r=="object"?bb(r)?_b(r[0],r[1]):gb(r):wb(r)}var Fo=$b,Eb=vd,Ob=Xd,Ab=Fo,Sb=C,Tb=ka;function Ib(r,e,t){var n=Sb(r)?Eb:Ob;return t&&Tb(r,e,t)&&(e=void 0),n(r,Ab(e))}var Jn=Ib;Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.calculatePadding=Rb,Ie.slicePadding=Mb;var xb=Jn,Pb=Fb(xb);function Fb(r){return r&&r.__esModule?r:{default:r}}function Rb(r){switch(r%4){case 0:return 0;case 1:return 3;case 2:return 2;case 3:return 1;default:return null}}function Mb(r,e){var t=r.slice(e),n=(0,Pb.default)(t.buffer(),function(i){return i===0});if(n!==!0)throw new Error("XDR Read Error: invalid padding")}Object.defineProperty(it,"__esModule",{value:!0}),it.Cursor=void 0;var Bb=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Ub=Ie;function Db(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var Qn=function(){function r(e){Db(this,r),e instanceof y||(e=typeof e=="number"?y.alloc(e):y.from(e)),this._setBuffer(e),this.rewind()}return Bb(r,[{key:"_setBuffer",value:function(t){this._buffer=t,this.length=t.length}},{key:"buffer",value:function(){return this._buffer}},{key:"tap",value:function(t){return t(this),this}},{key:"clone",value:function(t){var n=new this.constructor(this.buffer());return n.seek(arguments.length===0?this.tell():t),n}},{key:"tell",value:function(){return this._index}},{key:"seek",value:function(t,n){return arguments.length===1&&(n=t,t="="),t==="+"?this._index+=n:t==="-"?this._index-=n:this._index=n,this}},{key:"rewind",value:function(){return this.seek(0)}},{key:"eof",value:function(){return this.tell()===this.buffer().length}},{key:"write",value:function(t,n,i){return this.seek("+",this.buffer().write(t,this.tell(),n,i))}},{key:"fill",value:function(t,n){return arguments.length===1&&(n=this.buffer().length-this.tell()),this.buffer().fill(t,this.tell(),this.tell()+n),this.seek("+",n),this}},{key:"slice",value:function(t){arguments.length===0&&(t=this.length-this.tell());var n=new this.constructor(this.buffer().slice(this.tell(),this.tell()+t));return this.seek("+",t),n}},{key:"copyFrom",value:function(t){var n=t instanceof y?t:t.buffer();return n.copy(this.buffer(),this.tell(),0,n.length),this.seek("+",n.length),this}},{key:"concat",value:function(t){t.forEach(function(i,a){i instanceof r&&(t[a]=i.buffer())}),t.unshift(this.buffer());var n=y.concat(t);return this._setBuffer(n),this}},{key:"toString",value:function(t,n){arguments.length===0?(t="utf8",n=this.buffer().length-this.tell()):arguments.length===1&&(n=this.buffer().length-this.tell());var i=this.buffer().toString(t,this.tell(),this.tell()+n);return this.seek("+",n),i}},{key:"writeBufferPadded",value:function(t){var n=(0,Ub.calculatePadding)(t.length),i=y.alloc(n);return this.copyFrom(new r(t)).copyFrom(new r(i))}}]),r}();[[1,["readInt8","readUInt8"]],[2,["readInt16BE","readInt16LE","readUInt16BE","readUInt16LE"]],[4,["readInt32BE","readInt32LE","readUInt32BE","readUInt32LE","readFloatBE","readFloatLE"]],[8,["readDoubleBE","readDoubleLE"]]].forEach(function(r){r[1].forEach(function(e){Qn.prototype[e]=function(){var n=this.buffer()[e](this.tell());return this.seek("+",r[0]),n}})}),[[1,["writeInt8","writeUInt8"]],[2,["writeInt16BE","writeInt16LE","writeUInt16BE","writeUInt16LE"]],[4,["writeInt32BE","writeInt32LE","writeUInt32BE","writeUInt32LE","writeFloatBE","writeFloatLE"]],[8,["writeDoubleBE","writeDoubleLE"]]].forEach(function(r){r[1].forEach(function(e){Qn.prototype[e]=function(n){return this.buffer()[e](n,this.tell()),this.seek("+",r[0]),this}})}),it.Cursor=Qn,Object.defineProperty(M,"__esModule",{value:!0}),M.default=qb;var Nb=Pa.exports,Ro=Bo(Nb),Cb=xn,Lb=Bo(Cb),Mo=it;function Bo(r){return r&&r.__esModule?r:{default:r}}var jb=Math.pow(2,16),kb={toXDR:function(e){var t=new Mo.Cursor(jb);this.write(e,t);var n=t.tell();return t.rewind(),t.slice(n).buffer()},fromXDR:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"raw",n=void 0;switch(t){case"raw":n=e;break;case"hex":n=y.from(e,"hex");break;case"base64":n=y.from(e,"base64");break;default:throw new Error("Invalid format "+t+', must be "raw", "hex", "base64"')}var i=new Mo.Cursor(n),a=this.read(i);return a},validateXDR:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"raw";try{return this.fromXDR(e,t),!0}catch{return!1}}},Vb={toXDR:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"raw",t=this.constructor.toXDR(this);switch(e){case"raw":return t;case"hex":return t.toString("hex");case"base64":return t.toString("base64");default:throw new Error("Invalid format "+e+', must be "raw", "hex", "base64"')}}};function qb(r){(0,Ro.default)(r,kb),(0,Lb.default)(r)&&(0,Ro.default)(r.prototype,Vb)}Object.defineProperty(ue,"__esModule",{value:!0}),ue.Int=void 0;var Gb=et,Uo=Do(Gb),Hb=M,Wb=Do(Hb);function Do(r){return r&&r.__esModule?r:{default:r}}var yr=ue.Int={read:function(e){return e.readInt32BE()},write:function(e,t){if(!(0,Uo.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");t.writeInt32BE(e)},isValid:function(e){return!(0,Uo.default)(e)||Math.floor(e)!==e?!1:e>=yr.MIN_VALUE&&e<=yr.MAX_VALUE}};yr.MAX_VALUE=Math.pow(2,31)-1,yr.MIN_VALUE=-Math.pow(2,31),(0,Wb.default)(yr);var dt={};function zb(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ei={exports:{}};(function(r){/**
|
|
19
|
+
`+e.prev}function Wr(r,e){var t=yn(r),n=[];if(t){n.length=r.length;for(var i=0;i<r.length;i++)n[i]=ye(r,i)?e(r[i],r):""}var a=typeof ln=="function"?ln(r):[],o;if(je){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var f in r)!ye(r,f)||t&&String(Number(f))===f&&f<r.length||je&&o["$"+f]instanceof Symbol||(ra.call(/[^\w$]/,f)?n.push(e(f,r)+": "+e(r[f],r)):n.push(f+": "+e(r[f],r)));if(typeof ln=="function")for(var c=0;c<a.length;c++)ia.call(r,a[c])&&n.push("["+e(a[c])+"]: "+e(r[a[c]],r));return n}var gn=Vt,ke=qs,Nc=_c,Cc=gn("%TypeError%"),zr=gn("%WeakMap%",!0),Xr=gn("%Map%",!0),Lc=ke("WeakMap.prototype.get",!0),jc=ke("WeakMap.prototype.set",!0),kc=ke("WeakMap.prototype.has",!0),qc=ke("Map.prototype.get",!0),Vc=ke("Map.prototype.set",!0),Gc=ke("Map.prototype.has",!0),_n=function(r,e){for(var t=r,n;(n=t.next)!==null;t=n)if(n.key===e)return t.next=n.next,n.next=r.next,r.next=n,n},Hc=function(r,e){var t=_n(r,e);return t&&t.value},Wc=function(r,e,t){var n=_n(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},zc=function(r,e){return!!_n(r,e)},Xc=function(){var e,t,n,i={assert:function(a){if(!i.has(a))throw new Cc("Side channel does not contain "+Nc(a))},get:function(a){if(zr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Lc(e,a)}else if(Xr){if(t)return qc(t,a)}else if(n)return Hc(n,a)},has:function(a){if(zr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return kc(e,a)}else if(Xr){if(t)return Gc(t,a)}else if(n)return zc(n,a);return!1},set:function(a,o){zr&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new zr),jc(e,a,o)):Xr?(t||(t=new Xr),Vc(t,a,o)):(n||(n={key:{},next:null}),Wc(n,a,o))}};return i},Yc=String.prototype.replace,Kc=/%20/g,mn={RFC1738:"RFC1738",RFC3986:"RFC3986"},bn={default:mn.RFC3986,formatters:{RFC1738:function(r){return Yc.call(r,Kc,"+")},RFC3986:function(r){return String(r)}},RFC1738:mn.RFC1738,RFC3986:mn.RFC3986},Zc=bn,wn=Object.prototype.hasOwnProperty,Ae=Array.isArray,J=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),Jc=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Ae(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);t.obj[t.prop]=i}}},da=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(n[i]=e[i]);return n},Qc=function r(e,t,n){if(!t)return e;if(typeof t!="object"){if(Ae(e))e.push(t);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!wn.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var i=e;return Ae(e)&&!Ae(t)&&(i=da(e,n)),Ae(e)&&Ae(t)?(t.forEach(function(a,o){if(wn.call(e,o)){var s=e[o];s&&typeof s=="object"&&a&&typeof a=="object"?e[o]=r(s,a,n):e.push(a)}else e[o]=a}),e):Object.keys(t).reduce(function(a,o){var s=t[o];return wn.call(a,o)?a[o]=r(a[o],s,n):a[o]=s,a},i)},el=function(e,t){return Object.keys(t).reduce(function(n,i){return n[i]=t[i],n},e)},rl=function(r,e,t){var n=r.replace(/\+/g," ");if(t==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},tl=function(e,t,n,i,a){if(e.length===0)return e;var o=e;if(typeof e=="symbol"?o=Symbol.prototype.toString.call(e):typeof e!="string"&&(o=String(e)),n==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(l){return"%26%23"+parseInt(l.slice(2),16)+"%3B"});for(var s="",f=0;f<o.length;++f){var c=o.charCodeAt(f);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||a===Zc.RFC1738&&(c===40||c===41)){s+=o.charAt(f);continue}if(c<128){s=s+J[c];continue}if(c<2048){s=s+(J[192|c>>6]+J[128|c&63]);continue}if(c<55296||c>=57344){s=s+(J[224|c>>12]+J[128|c>>6&63]+J[128|c&63]);continue}f+=1,c=65536+((c&1023)<<10|o.charCodeAt(f)&1023),s+=J[240|c>>18]+J[128|c>>12&63]+J[128|c>>6&63]+J[128|c&63]}return s},nl=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],i=0;i<t.length;++i)for(var a=t[i],o=a.obj[a.prop],s=Object.keys(o),f=0;f<s.length;++f){var c=s[f],l=o[c];typeof l=="object"&&l!==null&&n.indexOf(l)===-1&&(t.push({obj:o,prop:c}),n.push(l))}return Jc(t),e},il=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},al=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},ol=function(e,t){return[].concat(e,t)},ul=function(e,t){if(Ae(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(t(e[i]));return n}return t(e)},va={arrayToObject:da,assign:el,combine:ol,compact:nl,decode:rl,encode:tl,isBuffer:al,isRegExp:il,maybeMap:ul,merge:Qc},ga=Xc,$n=va,sr=bn,sl=Object.prototype.hasOwnProperty,_a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},ae=Array.isArray,fl=String.prototype.split,cl=Array.prototype.push,ma=function(r,e){cl.apply(r,ae(e)?e:[e])},ll=Date.prototype.toISOString,ba=sr.default,N={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:$n.encode,encodeValuesOnly:!1,format:ba,formatter:sr.formatters[ba],indices:!1,serializeDate:function(e){return ll.call(e)},skipNulls:!1,strictNullHandling:!1},pl=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},En={},hl=function r(e,t,n,i,a,o,s,f,c,l,u,p,d,_,E,$){for(var b=e,S=$,h=0,A=!1;(S=S.get(En))!==void 0&&!A;){var x=S.get(e);if(h+=1,typeof x<"u"){if(x===h)throw new RangeError("Cyclic object value");A=!0}typeof S.get(En)>"u"&&(h=0)}if(typeof f=="function"?b=f(t,b):b instanceof Date?b=u(b):n==="comma"&&ae(b)&&(b=$n.maybeMap(b,function(li){return li instanceof Date?u(li):li})),b===null){if(a)return s&&!_?s(t,N.encoder,E,"key",p):t;b=""}if(pl(b)||$n.isBuffer(b)){if(s){var R=_?t:s(t,N.encoder,E,"key",p);if(n==="comma"&&_){for(var m=fl.call(String(b),","),v="",g=0;g<m.length;++g)v+=(g===0?"":",")+d(s(m[g],N.encoder,E,"value",p));return[d(R)+(i&&ae(b)&&m.length===1?"[]":"")+"="+v]}return[d(R)+"="+d(s(b,N.encoder,E,"value",p))]}return[d(t)+"="+d(String(b))]}var w=[];if(typeof b>"u")return w;var O;if(n==="comma"&&ae(b))O=[{value:b.length>0?b.join(",")||null:void 0}];else if(ae(f))O=f;else{var L=Object.keys(b);O=c?L.sort(c):L}for(var re=i&&ae(b)&&b.length===1?t+"[]":t,ge=0;ge<O.length;++ge){var fe=O[ge],Tr=typeof fe=="object"&&typeof fe.value<"u"?fe.value:b[fe];if(!(o&&Tr===null)){var hT=ae(b)?typeof n=="function"?n(re,fe):re:re+(l?"."+fe:"["+fe+"]");$.set(e,h);var fs=ga();fs.set(En,$),ma(w,r(Tr,hT,n,i,a,o,s,f,c,l,u,p,d,_,E,fs))}}return w},yl=function(e){if(!e)return N;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||N.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=sr.default;if(typeof e.format<"u"){if(!sl.call(sr.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=sr.formatters[n],a=N.filter;return(typeof e.filter=="function"||ae(e.filter))&&(a=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:N.addQueryPrefix,allowDots:typeof e.allowDots>"u"?N.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:N.charsetSentinel,delimiter:typeof e.delimiter>"u"?N.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:N.encode,encoder:typeof e.encoder=="function"?e.encoder:N.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:N.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:N.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:N.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:N.strictNullHandling}},dl=function(r,e){var t=r,n=yl(e),i,a;typeof n.filter=="function"?(a=n.filter,t=a("",t)):ae(n.filter)&&(a=n.filter,i=a);var o=[];if(typeof t!="object"||t===null)return"";var s;e&&e.arrayFormat in _a?s=e.arrayFormat:e&&"indices"in e?s=e.indices?"indices":"repeat":s="indices";var f=_a[s];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=f==="comma"&&e&&e.commaRoundTrip;i||(i=Object.keys(t)),n.sort&&i.sort(n.sort);for(var l=ga(),u=0;u<i.length;++u){var p=i[u];n.skipNulls&&t[p]===null||ma(o,hl(t[p],p,f,c,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,l))}var d=o.join(n.delimiter),_=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),d.length>0?_+d:""},qe=va,On=Object.prototype.hasOwnProperty,vl=Array.isArray,D={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:qe.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},gl=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},wa=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},_l="utf8=%26%2310003%3B",ml="utf8=%E2%9C%93",bl=function(e,t){var n={},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,a),s=-1,f,c=t.charset;if(t.charsetSentinel)for(f=0;f<o.length;++f)o[f].indexOf("utf8=")===0&&(o[f]===ml?c="utf-8":o[f]===_l&&(c="iso-8859-1"),s=f,f=o.length);for(f=0;f<o.length;++f)if(f!==s){var l=o[f],u=l.indexOf("]="),p=u===-1?l.indexOf("="):u+1,d,_;p===-1?(d=t.decoder(l,D.decoder,c,"key"),_=t.strictNullHandling?null:""):(d=t.decoder(l.slice(0,p),D.decoder,c,"key"),_=qe.maybeMap(wa(l.slice(p+1),t),function(E){return t.decoder(E,D.decoder,c,"value")})),_&&t.interpretNumericEntities&&c==="iso-8859-1"&&(_=gl(_)),l.indexOf("[]=")>-1&&(_=vl(_)?[_]:_),On.call(n,d)?n[d]=qe.combine(n[d],_):n[d]=_}return n},wl=function(r,e,t,n){for(var i=n?e:wa(e,t),a=r.length-1;a>=0;--a){var o,s=r[a];if(s==="[]"&&t.parseArrays)o=[].concat(i);else{o=t.plainObjects?Object.create(null):{};var f=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,c=parseInt(f,10);!t.parseArrays&&f===""?o={0:i}:!isNaN(c)&&s!==f&&String(c)===f&&c>=0&&t.parseArrays&&c<=t.arrayLimit?(o=[],o[c]=i):f!=="__proto__"&&(o[f]=i)}i=o}return i},$l=function(e,t,n,i){if(!!e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,f=n.depth>0&&o.exec(a),c=f?a.slice(0,f.index):a,l=[];if(c){if(!n.plainObjects&&On.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var u=0;n.depth>0&&(f=s.exec(a))!==null&&u<n.depth;){if(u+=1,!n.plainObjects&&On.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(f[1])}return f&&l.push("["+a.slice(f.index)+"]"),wl(l,t,n,i)}},El=function(e){if(!e)return D;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?D.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?D.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:D.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:D.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:D.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:D.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:D.comma,decoder:typeof e.decoder=="function"?e.decoder:D.decoder,delimiter:typeof e.delimiter=="string"||qe.isRegExp(e.delimiter)?e.delimiter:D.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:D.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:D.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:D.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:D.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:D.strictNullHandling}},Ol=function(r,e){var t=El(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?bl(r,t):r,i=t.plainObjects?Object.create(null):{},a=Object.keys(n),o=0;o<a.length;++o){var s=a[o],f=$l(s,n[s],t,typeof r=="string");i=qe.merge(i,f,t)}return t.allowSparse===!0?i:qe.compact(i)},Al=dl,Sl=Ol,Il=bn,Tl={formats:Il,parse:Sl,stringify:Al};let $a={storeIdentifier:"",environment:"prod",apiKey:""};function xl(r){$a=r}function An(){return $a}const Pl=r=>r==="stage"?"https://api.stage.rechargeapps.com":"https://api.rechargeapps.com",Fl=r=>r==="stage"?"https://static.stage.rechargecdn.com":"https://static.rechargecdn.com",Rl="/tools/recurring";/*! js-cookie v3.0.1 | MIT */function Yr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)r[n]=t[n]}return r}var Ml={read:function(r){return r[0]==='"'&&(r=r.slice(1,-1)),r.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(r){return encodeURIComponent(r).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Sn(r,e){function t(i,a,o){if(!(typeof document>"u")){o=Yr({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var f in o)!o[f]||(s+="; "+f,o[f]!==!0&&(s+="="+o[f].split(";")[0]));return document.cookie=i+"="+r.write(a,i)+s}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var a=document.cookie?document.cookie.split("; "):[],o={},s=0;s<a.length;s++){var f=a[s].split("="),c=f.slice(1).join("=");try{var l=decodeURIComponent(f[0]);if(o[l]=r.read(c,l),i===l)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:n,remove:function(i,a){t(i,"",Yr({},a,{expires:-1}))},withAttributes:function(i){return Sn(this.converter,Yr({},this.attributes,i))},withConverter:function(i){return Sn(Yr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(r)}})}var In=Sn(Ml,{path:"/"});function Kr(){const r=In.get("recharge-session");if(r)try{return JSON.parse(r)}catch{return}}function Bl(r){const e=new Date;e.setHours(e.getHours()+1),In.set("recharge-session",JSON.stringify(r),{expires:e})}function Ea(){In.remove("recharge-session")}var Ul=Object.defineProperty,Oa=Object.getOwnPropertySymbols,Dl=Object.prototype.hasOwnProperty,Nl=Object.prototype.propertyIsEnumerable,Aa=(r,e,t)=>e in r?Ul(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Zr=(r,e)=>{for(var t in e||(e={}))Dl.call(e,t)&&Aa(r,t,e[t]);if(Oa)for(var t of Oa(e))Nl.call(e,t)&&Aa(r,t,e[t]);return r};function Cl(r){return Tl.stringify(r,{encode:!1,indices:!1,arrayFormat:"comma"})}async function Jr(r,e,t={}){const n=An();return Se(r,`${Fl(n.environment)}/store/${n.storeIdentifier}${e}`,t)}async function I(r,e,{id:t,query:n,data:i,headers:a}={}){var o,s;const f=An(),c=(s=(o=Kr())==null?void 0:o.apiToken)!=null?s:f.apiKey;if(!c)throw new Error("No API Key or token found.");const l=Pl(f.environment),u=Zr({"Content-Type":"application/json","X-Recharge-Access-Token":c,"X-Recharge-Version":"2021-11","X-Recharge-App":"storefront-client"},a||{}),p=Zr({shop_url:f.storeIdentifier},n);return Se(r,`${l}${e}`,{id:t,query:p,data:i,headers:u})}async function Tn(r,e,{id:t,query:n,data:i,headers:a}={}){const o=Zr({"Content-Type":"application/json","X-Recharge-App":"storefront-client"},a||{});return Se(r,`${Rl}${e}`,{id:t,query:n,data:i,headers:o})}async function Se(r,e,{id:t,query:n,data:i,headers:a}={}){let o=e.trim();if(t&&(o=[o,`${t}`.trim()].join("/")),n){let u;[o,u]=o.split("?");const p=[u,Cl(n)].join("&").replace(/^&/,"");o=`${o}${p?`?${p}`:""}`}let s;i&&r!=="get"&&(s=JSON.stringify(i));const f=Zr({Accept:"application/json"},a||{}),c=await fetch(o,{method:r,headers:f,body:s,mode:"cors"});let l;try{l=await c.json()}catch{}if(!c.ok)throw l&&l.error?new Error(`${c.status}: ${l.error}`):new Error("A connection error occurred while making the request");return l}function Ll(r){return I("get","/addresses",{query:r})}async function jl(r){const{address:e}=await I("get","/addresses",{id:r});return e}async function kl(r){const{address:e}=await I("post","/addresses",{data:r});return e}async function ql(r,e){const{address:t}=await I("put","/addresses",{id:r,data:e});return t}function Vl(r){return I("delete","/addresses",{id:r})}async function Gl(r){const{address:e}=await I("post","/addresses/merge",{data:r});return e}async function Hl(r,e){const{charge:t}=await I("post",`/addresses/${r}/charges/skip`,{data:e});return t}var Wl=Object.freeze({__proto__:null,listAddresses:Ll,getAddress:jl,createAddress:kl,updateAddress:ql,deleteAddress:Vl,mergeAddresses:Gl,skipFutureCharge:Hl}),zl=Object.freeze({__proto__:null,login:async()=>{const r=await Tn("get","/logged_in_customer_poc");return r.api_token&&r.customer_id?Bl({apiToken:r.api_token,userId:r.customer_id}):Ea(),!!r.api_token},logout:()=>{Ea()}}),oe={},Qr={},Sa={},xn={},ue={},Xl=typeof te=="object"&&te&&te.Object===Object&&te,Ia=Xl,Yl=Ia,Kl=typeof self=="object"&&self&&self.Object===Object&&self,Zl=Yl||Kl||Function("return this")(),Q=Zl,Jl=Q,Ql=Jl.Symbol,Ve=Ql,Ta=Ve,xa=Object.prototype,ep=xa.hasOwnProperty,rp=xa.toString,fr=Ta?Ta.toStringTag:void 0;function tp(r){var e=ep.call(r,fr),t=r[fr];try{r[fr]=void 0;var n=!0}catch{}var i=rp.call(r);return n&&(e?r[fr]=t:delete r[fr]),i}var np=tp,ip=Object.prototype,ap=ip.toString;function op(r){return ap.call(r)}var up=op,Pa=Ve,sp=np,fp=up,cp="[object Null]",lp="[object Undefined]",Fa=Pa?Pa.toStringTag:void 0;function pp(r){return r==null?r===void 0?lp:cp:Fa&&Fa in Object(r)?sp(r):fp(r)}var se=pp;function hp(r){return r!=null&&typeof r=="object"}var H=hp,yp=se,dp=H,vp="[object Number]";function gp(r){return typeof r=="number"||dp(r)&&yp(r)==vp}var et=gp,M={},Ra={exports:{}};function _p(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var ve=_p,mp=se,bp=ve,wp="[object AsyncFunction]",$p="[object Function]",Ep="[object GeneratorFunction]",Op="[object Proxy]";function Ap(r){if(!bp(r))return!1;var e=mp(r);return e==$p||e==Ep||e==wp||e==Op}var Pn=Ap,Sp=Q,Ip=Sp["__core-js_shared__"],Tp=Ip,Fn=Tp,Ma=function(){var r=/[^.]+$/.exec(Fn&&Fn.keys&&Fn.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function xp(r){return!!Ma&&Ma in r}var Pp=xp,Fp=Function.prototype,Rp=Fp.toString;function Mp(r){if(r!=null){try{return Rp.call(r)}catch{}try{return r+""}catch{}}return""}var Ba=Mp,Bp=Pn,Up=Pp,Dp=ve,Np=Ba,Cp=/[\\^$.*+?()[\]{}|]/g,Lp=/^\[object .+?Constructor\]$/,jp=Function.prototype,kp=Object.prototype,qp=jp.toString,Vp=kp.hasOwnProperty,Gp=RegExp("^"+qp.call(Vp).replace(Cp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Hp(r){if(!Dp(r)||Up(r))return!1;var e=Bp(r)?Gp:Lp;return e.test(Np(r))}var Wp=Hp;function zp(r,e){return r?.[e]}var Xp=zp,Yp=Wp,Kp=Xp;function Zp(r,e){var t=Kp(r,e);return Yp(t)?t:void 0}var Ie=Zp,Jp=Ie,Qp=function(){try{var r=Jp(Object,"defineProperty");return r({},"",{}),r}catch{}}(),Ua=Qp,Da=Ua;function eh(r,e,t){e=="__proto__"&&Da?Da(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}var Na=eh;function rh(r,e){return r===e||r!==r&&e!==e}var rt=rh,th=Na,nh=rt,ih=Object.prototype,ah=ih.hasOwnProperty;function oh(r,e,t){var n=r[e];(!(ah.call(r,e)&&nh(n,t))||t===void 0&&!(e in r))&&th(r,e,t)}var Ca=oh,uh=Ca,sh=Na;function fh(r,e,t,n){var i=!t;t||(t={});for(var a=-1,o=e.length;++a<o;){var s=e[a],f=n?n(t[s],r[s],s,t,r):void 0;f===void 0&&(f=r[s]),i?sh(t,s,f):uh(t,s,f)}return t}var Ge=fh;function ch(r){return r}var tt=ch;function lh(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}var ph=lh,hh=ph,La=Math.max;function yh(r,e,t){return e=La(e===void 0?r.length-1:e,0),function(){for(var n=arguments,i=-1,a=La(n.length-e,0),o=Array(a);++i<a;)o[i]=n[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=n[i];return s[e]=t(o),hh(r,this,s)}}var ja=yh;function dh(r){return function(){return r}}var vh=dh,gh=vh,ka=Ua,_h=tt,mh=ka?function(r,e){return ka(r,"toString",{configurable:!0,enumerable:!1,value:gh(e),writable:!0})}:_h,bh=mh,wh=800,$h=16,Eh=Date.now;function Oh(r){var e=0,t=0;return function(){var n=Eh(),i=$h-(n-t);if(t=n,i>0){if(++e>=wh)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var Ah=Oh,Sh=bh,Ih=Ah,Th=Ih(Sh),qa=Th,xh=tt,Ph=ja,Fh=qa;function Rh(r,e){return Fh(Ph(r,e,xh),r+"")}var Mh=Rh,Bh=9007199254740991;function Uh(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Bh}var Rn=Uh,Dh=Pn,Nh=Rn;function Ch(r){return r!=null&&Nh(r.length)&&!Dh(r)}var cr=Ch,Lh=9007199254740991,jh=/^(?:0|[1-9]\d*)$/;function kh(r,e){var t=typeof r;return e=e??Lh,!!e&&(t=="number"||t!="symbol"&&jh.test(r))&&r>-1&&r%1==0&&r<e}var Mn=kh,qh=rt,Vh=cr,Gh=Mn,Hh=ve;function Wh(r,e,t){if(!Hh(t))return!1;var n=typeof e;return(n=="number"?Vh(t)&&Gh(e,t.length):n=="string"&&e in t)?qh(t[e],r):!1}var Va=Wh,zh=Mh,Xh=Va;function Yh(r){return zh(function(e,t){var n=-1,i=t.length,a=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(a=r.length>3&&typeof a=="function"?(i--,a):void 0,o&&Xh(t[0],t[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var s=t[n];s&&r(e,s,n,a)}return e})}var Kh=Yh;function Zh(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var Ga=Zh,Jh=se,Qh=H,ey="[object Arguments]";function ry(r){return Qh(r)&&Jh(r)==ey}var ty=ry,Ha=ty,ny=H,Wa=Object.prototype,iy=Wa.hasOwnProperty,ay=Wa.propertyIsEnumerable,oy=Ha(function(){return arguments}())?Ha:function(r){return ny(r)&&iy.call(r,"callee")&&!ay.call(r,"callee")},Bn=oy,uy=Array.isArray,C=uy,lr={exports:{}};function sy(){return!1}var fy=sy;(function(r,e){var t=Q,n=fy,i=e&&!e.nodeType&&e,a=i&&!0&&r&&!r.nodeType&&r,o=a&&a.exports===i,s=o?t.Buffer:void 0,f=s?s.isBuffer:void 0,c=f||n;r.exports=c})(lr,lr.exports);var cy=se,ly=Rn,py=H,hy="[object Arguments]",yy="[object Array]",dy="[object Boolean]",vy="[object Date]",gy="[object Error]",_y="[object Function]",my="[object Map]",by="[object Number]",wy="[object Object]",$y="[object RegExp]",Ey="[object Set]",Oy="[object String]",Ay="[object WeakMap]",Sy="[object ArrayBuffer]",Iy="[object DataView]",Ty="[object Float32Array]",xy="[object Float64Array]",Py="[object Int8Array]",Fy="[object Int16Array]",Ry="[object Int32Array]",My="[object Uint8Array]",By="[object Uint8ClampedArray]",Uy="[object Uint16Array]",Dy="[object Uint32Array]",F={};F[Ty]=F[xy]=F[Py]=F[Fy]=F[Ry]=F[My]=F[By]=F[Uy]=F[Dy]=!0,F[hy]=F[yy]=F[Sy]=F[dy]=F[Iy]=F[vy]=F[gy]=F[_y]=F[my]=F[by]=F[wy]=F[$y]=F[Ey]=F[Oy]=F[Ay]=!1;function Ny(r){return py(r)&&ly(r.length)&&!!F[cy(r)]}var Cy=Ny;function Ly(r){return function(e){return r(e)}}var Un=Ly,pr={exports:{}};(function(r,e){var t=Ia,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a&&t.process,s=function(){try{var f=i&&i.require&&i.require("util").types;return f||o&&o.binding&&o.binding("util")}catch{}}();r.exports=s})(pr,pr.exports);var jy=Cy,ky=Un,za=pr.exports,Xa=za&&za.isTypedArray,qy=Xa?ky(Xa):jy,Ya=qy,Vy=Ga,Gy=Bn,Hy=C,Wy=lr.exports,zy=Mn,Xy=Ya,Yy=Object.prototype,Ky=Yy.hasOwnProperty;function Zy(r,e){var t=Hy(r),n=!t&&Gy(r),i=!t&&!n&&Wy(r),a=!t&&!n&&!i&&Xy(r),o=t||n||i||a,s=o?Vy(r.length,String):[],f=s.length;for(var c in r)(e||Ky.call(r,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||zy(c,f)))&&s.push(c);return s}var Ka=Zy,Jy=Object.prototype;function Qy(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Jy;return r===t}var Dn=Qy;function ed(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var rd=ed,td=ve,nd=Dn,id=rd,ad=Object.prototype,od=ad.hasOwnProperty;function ud(r){if(!td(r))return id(r);var e=nd(r),t=[];for(var n in r)n=="constructor"&&(e||!od.call(r,n))||t.push(n);return t}var sd=ud,fd=Ka,cd=sd,ld=cr;function pd(r){return ld(r)?fd(r,!0):cd(r)}var nt=pd,hd=Ge,yd=Kh,dd=nt,vd=yd(function(r,e){hd(e,dd(e),r)}),gd=vd;(function(r){r.exports=gd})(Ra);var it={},Te={};function _d(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(!e(r[t],t,r))return!1;return!0}var md=_d;function bd(r){return function(e,t,n){for(var i=-1,a=Object(e),o=n(e),s=o.length;s--;){var f=o[r?s:++i];if(t(a[f],f,a)===!1)break}return e}}var wd=bd,$d=wd,Ed=$d(),Od=Ed;function Ad(r,e){return function(t){return r(e(t))}}var Za=Ad,Sd=Za,Id=Sd(Object.keys,Object),Td=Id,xd=Dn,Pd=Td,Fd=Object.prototype,Rd=Fd.hasOwnProperty;function Md(r){if(!xd(r))return Pd(r);var e=[];for(var t in Object(r))Rd.call(r,t)&&t!="constructor"&&e.push(t);return e}var Bd=Md,Ud=Ka,Dd=Bd,Nd=cr;function Cd(r){return Nd(r)?Ud(r):Dd(r)}var He=Cd,Ld=Od,jd=He;function kd(r,e){return r&&Ld(r,e,jd)}var qd=kd,Vd=cr;function Gd(r,e){return function(t,n){if(t==null)return t;if(!Vd(t))return r(t,n);for(var i=t.length,a=e?i:-1,o=Object(t);(e?a--:++a<i)&&n(o[a],a,o)!==!1;);return t}}var Hd=Gd,Wd=qd,zd=Hd,Xd=zd(Wd),Nn=Xd,Yd=Nn;function Kd(r,e){var t=!0;return Yd(r,function(n,i,a){return t=!!e(n,i,a),t}),t}var Zd=Kd;function Jd(){this.__data__=[],this.size=0}var Qd=Jd,ev=rt;function rv(r,e){for(var t=r.length;t--;)if(ev(r[t][0],e))return t;return-1}var at=rv,tv=at,nv=Array.prototype,iv=nv.splice;function av(r){var e=this.__data__,t=tv(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():iv.call(e,t,1),--this.size,!0}var ov=av,uv=at;function sv(r){var e=this.__data__,t=uv(e,r);return t<0?void 0:e[t][1]}var fv=sv,cv=at;function lv(r){return cv(this.__data__,r)>-1}var pv=lv,hv=at;function yv(r,e){var t=this.__data__,n=hv(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}var dv=yv,vv=Qd,gv=ov,_v=fv,mv=pv,bv=dv;function We(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}We.prototype.clear=vv,We.prototype.delete=gv,We.prototype.get=_v,We.prototype.has=mv,We.prototype.set=bv;var ot=We,wv=ot;function $v(){this.__data__=new wv,this.size=0}var Ev=$v;function Ov(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}var Av=Ov;function Sv(r){return this.__data__.get(r)}var Iv=Sv;function Tv(r){return this.__data__.has(r)}var xv=Tv,Pv=Ie,Fv=Q,Rv=Pv(Fv,"Map"),Cn=Rv,Mv=Ie,Bv=Mv(Object,"create"),ut=Bv,Ja=ut;function Uv(){this.__data__=Ja?Ja(null):{},this.size=0}var Dv=Uv;function Nv(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var Cv=Nv,Lv=ut,jv="__lodash_hash_undefined__",kv=Object.prototype,qv=kv.hasOwnProperty;function Vv(r){var e=this.__data__;if(Lv){var t=e[r];return t===jv?void 0:t}return qv.call(e,r)?e[r]:void 0}var Gv=Vv,Hv=ut,Wv=Object.prototype,zv=Wv.hasOwnProperty;function Xv(r){var e=this.__data__;return Hv?e[r]!==void 0:zv.call(e,r)}var Yv=Xv,Kv=ut,Zv="__lodash_hash_undefined__";function Jv(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=Kv&&e===void 0?Zv:e,this}var Qv=Jv,eg=Dv,rg=Cv,tg=Gv,ng=Yv,ig=Qv;function ze(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}ze.prototype.clear=eg,ze.prototype.delete=rg,ze.prototype.get=tg,ze.prototype.has=ng,ze.prototype.set=ig;var ag=ze,Qa=ag,og=ot,ug=Cn;function sg(){this.size=0,this.__data__={hash:new Qa,map:new(ug||og),string:new Qa}}var fg=sg;function cg(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}var lg=cg,pg=lg;function hg(r,e){var t=r.__data__;return pg(e)?t[typeof e=="string"?"string":"hash"]:t.map}var st=hg,yg=st;function dg(r){var e=yg(this,r).delete(r);return this.size-=e?1:0,e}var vg=dg,gg=st;function _g(r){return gg(this,r).get(r)}var mg=_g,bg=st;function wg(r){return bg(this,r).has(r)}var $g=wg,Eg=st;function Og(r,e){var t=Eg(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}var Ag=Og,Sg=fg,Ig=vg,Tg=mg,xg=$g,Pg=Ag;function Xe(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Xe.prototype.clear=Sg,Xe.prototype.delete=Ig,Xe.prototype.get=Tg,Xe.prototype.has=xg,Xe.prototype.set=Pg;var Ln=Xe,Fg=ot,Rg=Cn,Mg=Ln,Bg=200;function Ug(r,e){var t=this.__data__;if(t instanceof Fg){var n=t.__data__;if(!Rg||n.length<Bg-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new Mg(n)}return t.set(r,e),this.size=t.size,this}var Dg=Ug,Ng=ot,Cg=Ev,Lg=Av,jg=Iv,kg=xv,qg=Dg;function Ye(r){var e=this.__data__=new Ng(r);this.size=e.size}Ye.prototype.clear=Cg,Ye.prototype.delete=Lg,Ye.prototype.get=jg,Ye.prototype.has=kg,Ye.prototype.set=qg;var jn=Ye,Vg="__lodash_hash_undefined__";function Gg(r){return this.__data__.set(r,Vg),this}var Hg=Gg;function Wg(r){return this.__data__.has(r)}var zg=Wg,Xg=Ln,Yg=Hg,Kg=zg;function ft(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new Xg;++e<t;)this.add(r[e])}ft.prototype.add=ft.prototype.push=Yg,ft.prototype.has=Kg;var Zg=ft;function Jg(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}var Qg=Jg;function e_(r,e){return r.has(e)}var r_=e_,t_=Zg,n_=Qg,i_=r_,a_=1,o_=2;function u_(r,e,t,n,i,a){var o=t&a_,s=r.length,f=e.length;if(s!=f&&!(o&&f>s))return!1;var c=a.get(r),l=a.get(e);if(c&&l)return c==e&&l==r;var u=-1,p=!0,d=t&o_?new t_:void 0;for(a.set(r,e),a.set(e,r);++u<s;){var _=r[u],E=e[u];if(n)var $=o?n(E,_,u,e,r,a):n(_,E,u,r,e,a);if($!==void 0){if($)continue;p=!1;break}if(d){if(!n_(e,function(b,S){if(!i_(d,S)&&(_===b||i(_,b,t,n,a)))return d.push(S)})){p=!1;break}}else if(!(_===E||i(_,E,t,n,a))){p=!1;break}}return a.delete(r),a.delete(e),p}var eo=u_,s_=Q,f_=s_.Uint8Array,ro=f_;function c_(r){var e=-1,t=Array(r.size);return r.forEach(function(n,i){t[++e]=[i,n]}),t}var l_=c_;function p_(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var h_=p_,to=Ve,no=ro,y_=rt,d_=eo,v_=l_,g_=h_,__=1,m_=2,b_="[object Boolean]",w_="[object Date]",$_="[object Error]",E_="[object Map]",O_="[object Number]",A_="[object RegExp]",S_="[object Set]",I_="[object String]",T_="[object Symbol]",x_="[object ArrayBuffer]",P_="[object DataView]",io=to?to.prototype:void 0,kn=io?io.valueOf:void 0;function F_(r,e,t,n,i,a,o){switch(t){case P_:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case x_:return!(r.byteLength!=e.byteLength||!a(new no(r),new no(e)));case b_:case w_:case O_:return y_(+r,+e);case $_:return r.name==e.name&&r.message==e.message;case A_:case I_:return r==e+"";case E_:var s=v_;case S_:var f=n&__;if(s||(s=g_),r.size!=e.size&&!f)return!1;var c=o.get(r);if(c)return c==e;n|=m_,o.set(r,e);var l=d_(s(r),s(e),n,i,a,o);return o.delete(r),l;case T_:if(kn)return kn.call(r)==kn.call(e)}return!1}var R_=F_;function M_(r,e){for(var t=-1,n=e.length,i=r.length;++t<n;)r[i+t]=e[t];return r}var qn=M_,B_=qn,U_=C;function D_(r,e,t){var n=e(r);return U_(r)?n:B_(n,t(r))}var ao=D_;function N_(r,e){for(var t=-1,n=r==null?0:r.length,i=0,a=[];++t<n;){var o=r[t];e(o,t,r)&&(a[i++]=o)}return a}var C_=N_;function L_(){return[]}var oo=L_,j_=C_,k_=oo,q_=Object.prototype,V_=q_.propertyIsEnumerable,uo=Object.getOwnPropertySymbols,G_=uo?function(r){return r==null?[]:(r=Object(r),j_(uo(r),function(e){return V_.call(r,e)}))}:k_,Vn=G_,H_=ao,W_=Vn,z_=He;function X_(r){return H_(r,z_,W_)}var so=X_,fo=so,Y_=1,K_=Object.prototype,Z_=K_.hasOwnProperty;function J_(r,e,t,n,i,a){var o=t&Y_,s=fo(r),f=s.length,c=fo(e),l=c.length;if(f!=l&&!o)return!1;for(var u=f;u--;){var p=s[u];if(!(o?p in e:Z_.call(e,p)))return!1}var d=a.get(r),_=a.get(e);if(d&&_)return d==e&&_==r;var E=!0;a.set(r,e),a.set(e,r);for(var $=o;++u<f;){p=s[u];var b=r[p],S=e[p];if(n)var h=o?n(S,b,p,e,r,a):n(b,S,p,r,e,a);if(!(h===void 0?b===S||i(b,S,t,n,a):h)){E=!1;break}$||($=p=="constructor")}if(E&&!$){var A=r.constructor,x=e.constructor;A!=x&&"constructor"in r&&"constructor"in e&&!(typeof A=="function"&&A instanceof A&&typeof x=="function"&&x instanceof x)&&(E=!1)}return a.delete(r),a.delete(e),E}var Q_=J_,em=Ie,rm=Q,tm=em(rm,"DataView"),nm=tm,im=Ie,am=Q,om=im(am,"Promise"),um=om,sm=Ie,fm=Q,cm=sm(fm,"Set"),lm=cm,pm=Ie,hm=Q,ym=pm(hm,"WeakMap"),dm=ym,Gn=nm,Hn=Cn,Wn=um,zn=lm,Xn=dm,co=se,Ke=Ba,lo="[object Map]",vm="[object Object]",po="[object Promise]",ho="[object Set]",yo="[object WeakMap]",vo="[object DataView]",gm=Ke(Gn),_m=Ke(Hn),mm=Ke(Wn),bm=Ke(zn),wm=Ke(Xn),xe=co;(Gn&&xe(new Gn(new ArrayBuffer(1)))!=vo||Hn&&xe(new Hn)!=lo||Wn&&xe(Wn.resolve())!=po||zn&&xe(new zn)!=ho||Xn&&xe(new Xn)!=yo)&&(xe=function(r){var e=co(r),t=e==vm?r.constructor:void 0,n=t?Ke(t):"";if(n)switch(n){case gm:return vo;case _m:return lo;case mm:return po;case bm:return ho;case wm:return yo}return e});var ct=xe,Yn=jn,$m=eo,Em=R_,Om=Q_,go=ct,_o=C,mo=lr.exports,Am=Ya,Sm=1,bo="[object Arguments]",wo="[object Array]",lt="[object Object]",Im=Object.prototype,$o=Im.hasOwnProperty;function Tm(r,e,t,n,i,a){var o=_o(r),s=_o(e),f=o?wo:go(r),c=s?wo:go(e);f=f==bo?lt:f,c=c==bo?lt:c;var l=f==lt,u=c==lt,p=f==c;if(p&&mo(r)){if(!mo(e))return!1;o=!0,l=!1}if(p&&!l)return a||(a=new Yn),o||Am(r)?$m(r,e,t,n,i,a):Em(r,e,f,t,n,i,a);if(!(t&Sm)){var d=l&&$o.call(r,"__wrapped__"),_=u&&$o.call(e,"__wrapped__");if(d||_){var E=d?r.value():r,$=_?e.value():e;return a||(a=new Yn),i(E,$,t,n,a)}}return p?(a||(a=new Yn),Om(r,e,t,n,i,a)):!1}var xm=Tm,Pm=xm,Eo=H;function Oo(r,e,t,n,i){return r===e?!0:r==null||e==null||!Eo(r)&&!Eo(e)?r!==r&&e!==e:Pm(r,e,t,n,Oo,i)}var Ao=Oo,Fm=jn,Rm=Ao,Mm=1,Bm=2;function Um(r,e,t,n){var i=t.length,a=i,o=!n;if(r==null)return!a;for(r=Object(r);i--;){var s=t[i];if(o&&s[2]?s[1]!==r[s[0]]:!(s[0]in r))return!1}for(;++i<a;){s=t[i];var f=s[0],c=r[f],l=s[1];if(o&&s[2]){if(c===void 0&&!(f in r))return!1}else{var u=new Fm;if(n)var p=n(c,l,f,r,e,u);if(!(p===void 0?Rm(l,c,Mm|Bm,n,u):p))return!1}}return!0}var Dm=Um,Nm=ve;function Cm(r){return r===r&&!Nm(r)}var So=Cm,Lm=So,jm=He;function km(r){for(var e=jm(r),t=e.length;t--;){var n=e[t],i=r[n];e[t]=[n,i,Lm(i)]}return e}var qm=km;function Vm(r,e){return function(t){return t==null?!1:t[r]===e&&(e!==void 0||r in Object(t))}}var Io=Vm,Gm=Dm,Hm=qm,Wm=Io;function zm(r){var e=Hm(r);return e.length==1&&e[0][2]?Wm(e[0][0],e[0][1]):function(t){return t===r||Gm(t,r,e)}}var Xm=zm,Ym=se,Km=H,Zm="[object Symbol]";function Jm(r){return typeof r=="symbol"||Km(r)&&Ym(r)==Zm}var pt=Jm,Qm=C,e0=pt,r0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,t0=/^\w*$/;function n0(r,e){if(Qm(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||e0(r)?!0:t0.test(r)||!r0.test(r)||e!=null&&r in Object(e)}var Kn=n0,To=Ln,i0="Expected a function";function Zn(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(i0);var t=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=t.cache;if(a.has(i))return a.get(i);var o=r.apply(this,n);return t.cache=a.set(i,o)||a,o};return t.cache=new(Zn.Cache||To),t}Zn.Cache=To;var a0=Zn,o0=a0,u0=500;function s0(r){var e=o0(r,function(n){return t.size===u0&&t.clear(),n}),t=e.cache;return e}var f0=s0,c0=f0,l0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p0=/\\(\\)?/g,h0=c0(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(l0,function(t,n,i,a){e.push(i?a.replace(p0,"$1"):n||t)}),e}),y0=h0;function d0(r,e){for(var t=-1,n=r==null?0:r.length,i=Array(n);++t<n;)i[t]=e(r[t],t,r);return i}var ht=d0,xo=Ve,v0=ht,g0=C,_0=pt,m0=1/0,Po=xo?xo.prototype:void 0,Fo=Po?Po.toString:void 0;function Ro(r){if(typeof r=="string")return r;if(g0(r))return v0(r,Ro)+"";if(_0(r))return Fo?Fo.call(r):"";var e=r+"";return e=="0"&&1/r==-m0?"-0":e}var b0=Ro,w0=b0;function $0(r){return r==null?"":w0(r)}var E0=$0,O0=C,A0=Kn,S0=y0,I0=E0;function T0(r,e){return O0(r)?r:A0(r,e)?[r]:S0(I0(r))}var yt=T0,x0=pt,P0=1/0;function F0(r){if(typeof r=="string"||x0(r))return r;var e=r+"";return e=="0"&&1/r==-P0?"-0":e}var hr=F0,R0=yt,M0=hr;function B0(r,e){e=R0(e,r);for(var t=0,n=e.length;r!=null&&t<n;)r=r[M0(e[t++])];return t&&t==n?r:void 0}var Jn=B0,U0=Jn;function D0(r,e,t){var n=r==null?void 0:U0(r,e);return n===void 0?t:n}var N0=D0;function C0(r,e){return r!=null&&e in Object(r)}var L0=C0,j0=yt,k0=Bn,q0=C,V0=Mn,G0=Rn,H0=hr;function W0(r,e,t){e=j0(e,r);for(var n=-1,i=e.length,a=!1;++n<i;){var o=H0(e[n]);if(!(a=r!=null&&t(r,o)))break;r=r[o]}return a||++n!=i?a:(i=r==null?0:r.length,!!i&&G0(i)&&V0(o,i)&&(q0(r)||k0(r)))}var z0=W0,X0=L0,Y0=z0;function K0(r,e){return r!=null&&Y0(r,e,X0)}var Z0=K0,J0=Ao,Q0=N0,eb=Z0,rb=Kn,tb=So,nb=Io,ib=hr,ab=1,ob=2;function ub(r,e){return rb(r)&&tb(e)?nb(ib(r),e):function(t){var n=Q0(t,r);return n===void 0&&n===e?eb(t,r):J0(e,n,ab|ob)}}var sb=ub;function fb(r){return function(e){return e?.[r]}}var cb=fb,lb=Jn;function pb(r){return function(e){return lb(e,r)}}var hb=pb,yb=cb,db=hb,vb=Kn,gb=hr;function _b(r){return vb(r)?yb(gb(r)):db(r)}var mb=_b,bb=Xm,wb=sb,$b=tt,Eb=C,Ob=mb;function Ab(r){return typeof r=="function"?r:r==null?$b:typeof r=="object"?Eb(r)?wb(r[0],r[1]):bb(r):Ob(r)}var Mo=Ab,Sb=md,Ib=Zd,Tb=Mo,xb=C,Pb=Va;function Fb(r,e,t){var n=xb(r)?Sb:Ib;return t&&Pb(r,e,t)&&(e=void 0),n(r,Tb(e))}var Qn=Fb;Object.defineProperty(Te,"__esModule",{value:!0}),Te.calculatePadding=Ub,Te.slicePadding=Db;var Rb=Qn,Mb=Bb(Rb);function Bb(r){return r&&r.__esModule?r:{default:r}}function Ub(r){switch(r%4){case 0:return 0;case 1:return 3;case 2:return 2;case 3:return 1;default:return null}}function Db(r,e){var t=r.slice(e),n=(0,Mb.default)(t.buffer(),function(i){return i===0});if(n!==!0)throw new Error("XDR Read Error: invalid padding")}Object.defineProperty(it,"__esModule",{value:!0}),it.Cursor=void 0;var Nb=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Cb=Te;function Lb(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var ei=function(){function r(e){Lb(this,r),e instanceof y||(e=typeof e=="number"?y.alloc(e):y.from(e)),this._setBuffer(e),this.rewind()}return Nb(r,[{key:"_setBuffer",value:function(t){this._buffer=t,this.length=t.length}},{key:"buffer",value:function(){return this._buffer}},{key:"tap",value:function(t){return t(this),this}},{key:"clone",value:function(t){var n=new this.constructor(this.buffer());return n.seek(arguments.length===0?this.tell():t),n}},{key:"tell",value:function(){return this._index}},{key:"seek",value:function(t,n){return arguments.length===1&&(n=t,t="="),t==="+"?this._index+=n:t==="-"?this._index-=n:this._index=n,this}},{key:"rewind",value:function(){return this.seek(0)}},{key:"eof",value:function(){return this.tell()===this.buffer().length}},{key:"write",value:function(t,n,i){return this.seek("+",this.buffer().write(t,this.tell(),n,i))}},{key:"fill",value:function(t,n){return arguments.length===1&&(n=this.buffer().length-this.tell()),this.buffer().fill(t,this.tell(),this.tell()+n),this.seek("+",n),this}},{key:"slice",value:function(t){arguments.length===0&&(t=this.length-this.tell());var n=new this.constructor(this.buffer().slice(this.tell(),this.tell()+t));return this.seek("+",t),n}},{key:"copyFrom",value:function(t){var n=t instanceof y?t:t.buffer();return n.copy(this.buffer(),this.tell(),0,n.length),this.seek("+",n.length),this}},{key:"concat",value:function(t){t.forEach(function(i,a){i instanceof r&&(t[a]=i.buffer())}),t.unshift(this.buffer());var n=y.concat(t);return this._setBuffer(n),this}},{key:"toString",value:function(t,n){arguments.length===0?(t="utf8",n=this.buffer().length-this.tell()):arguments.length===1&&(n=this.buffer().length-this.tell());var i=this.buffer().toString(t,this.tell(),this.tell()+n);return this.seek("+",n),i}},{key:"writeBufferPadded",value:function(t){var n=(0,Cb.calculatePadding)(t.length),i=y.alloc(n);return this.copyFrom(new r(t)).copyFrom(new r(i))}}]),r}();[[1,["readInt8","readUInt8"]],[2,["readInt16BE","readInt16LE","readUInt16BE","readUInt16LE"]],[4,["readInt32BE","readInt32LE","readUInt32BE","readUInt32LE","readFloatBE","readFloatLE"]],[8,["readDoubleBE","readDoubleLE"]]].forEach(function(r){r[1].forEach(function(e){ei.prototype[e]=function(){var n=this.buffer()[e](this.tell());return this.seek("+",r[0]),n}})}),[[1,["writeInt8","writeUInt8"]],[2,["writeInt16BE","writeInt16LE","writeUInt16BE","writeUInt16LE"]],[4,["writeInt32BE","writeInt32LE","writeUInt32BE","writeUInt32LE","writeFloatBE","writeFloatLE"]],[8,["writeDoubleBE","writeDoubleLE"]]].forEach(function(r){r[1].forEach(function(e){ei.prototype[e]=function(n){return this.buffer()[e](n,this.tell()),this.seek("+",r[0]),this}})}),it.Cursor=ei,Object.defineProperty(M,"__esModule",{value:!0}),M.default=Wb;var jb=Ra.exports,Bo=Do(jb),kb=Pn,qb=Do(kb),Uo=it;function Do(r){return r&&r.__esModule?r:{default:r}}var Vb=Math.pow(2,16),Gb={toXDR:function(e){var t=new Uo.Cursor(Vb);this.write(e,t);var n=t.tell();return t.rewind(),t.slice(n).buffer()},fromXDR:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"raw",n=void 0;switch(t){case"raw":n=e;break;case"hex":n=y.from(e,"hex");break;case"base64":n=y.from(e,"base64");break;default:throw new Error("Invalid format "+t+', must be "raw", "hex", "base64"')}var i=new Uo.Cursor(n),a=this.read(i);return a},validateXDR:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"raw";try{return this.fromXDR(e,t),!0}catch{return!1}}},Hb={toXDR:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"raw",t=this.constructor.toXDR(this);switch(e){case"raw":return t;case"hex":return t.toString("hex");case"base64":return t.toString("base64");default:throw new Error("Invalid format "+e+', must be "raw", "hex", "base64"')}}};function Wb(r){(0,Bo.default)(r,Gb),(0,qb.default)(r)&&(0,Bo.default)(r.prototype,Hb)}Object.defineProperty(ue,"__esModule",{value:!0}),ue.Int=void 0;var zb=et,No=Co(zb),Xb=M,Yb=Co(Xb);function Co(r){return r&&r.__esModule?r:{default:r}}var yr=ue.Int={read:function(e){return e.readInt32BE()},write:function(e,t){if(!(0,No.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");t.writeInt32BE(e)},isValid:function(e){return!(0,No.default)(e)||Math.floor(e)!==e?!1:e>=yr.MIN_VALUE&&e<=yr.MAX_VALUE}};yr.MAX_VALUE=Math.pow(2,31)-1,yr.MIN_VALUE=-Math.pow(2,31),(0,Yb.default)(yr);var dt={};function Kb(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ri={exports:{}};(function(r){/**
|
|
20
20
|
* @license Long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
|
|
21
21
|
* Released under the Apache License, Version 2.0
|
|
22
22
|
* see: https://github.com/dcodeIO/Long.js for details
|
|
23
|
-
*/(function(e,t){typeof zb=="function"&&!0&&r&&r.exports?r.exports=t():(e.dcodeIO=e.dcodeIO||{}).Long=t()})(te,function(){function e(l,u,p){this.low=l|0,this.high=u|0,this.unsigned=!!p}e.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=function(u){return(u&&u.__isLong__)===!0};var t={},n={};e.fromInt=function(u,p){var d,_;return p?(u=u>>>0,0<=u&&u<256&&(_=n[u],_)?_:(d=new e(u,(u|0)<0?-1:0,!0),0<=u&&u<256&&(n[u]=d),d)):(u=u|0,-128<=u&&u<128&&(_=t[u],_)?_:(d=new e(u,u<0?-1:0,!1),-128<=u&&u<128&&(t[u]=d),d))},e.fromNumber=function(u,p){return p=!!p,isNaN(u)||!isFinite(u)?e.ZERO:!p&&u<=-s?e.MIN_VALUE:!p&&u+1>=s?e.MAX_VALUE:p&&u>=f?e.MAX_UNSIGNED_VALUE:u<0?e.fromNumber(-u,p).negate():new e(u%o|0,u/o|0,p)},e.fromBits=function(u,p,d){return new e(u,p,d)},e.fromString=function(u,p,d){if(u.length===0)throw Error("number format error: empty string");if(u==="NaN"||u==="Infinity"||u==="+Infinity"||u==="-Infinity")return e.ZERO;if(typeof p=="number"&&(d=p,p=!1),d=d||10,d<2||36<d)throw Error("radix out of range: "+d);var _;if((_=u.indexOf("-"))>0)throw Error('number format error: interior "-" character: '+u);if(_===0)return e.fromString(u.substring(1),p,d).negate();for(var E=e.fromNumber(Math.pow(d,8)),$=e.ZERO,b=0;b<u.length;b+=8){var S=Math.min(8,u.length-b),h=parseInt(u.substring(b,b+S),d);if(S<8){var A=e.fromNumber(Math.pow(d,S));$=$.multiply(A).add(e.fromNumber(h))}else $=$.multiply(E),$=$.add(e.fromNumber(h))}return $.unsigned=p,$},e.fromValue=function(u){return u instanceof e?u:typeof u=="number"?e.fromNumber(u):typeof u=="string"?e.fromString(u):new e(u.low,u.high,u.unsigned)};var i=1<<16,a=1<<24,o=i*i,f=o*o,s=f/2,c=e.fromInt(a);return e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*o+(this.low>>>0):this.high*o+(this.low>>>0)},e.prototype.toString=function(u){if(u=u||10,u<2||36<u)throw RangeError("radix out of range: "+u);if(this.isZero())return"0";var p;if(this.isNegative())if(this.equals(e.MIN_VALUE)){var d=e.fromNumber(u),_=this.divide(d);return p=_.multiply(d).subtract(this),_.toString(u)+p.toInt().toString(u)}else return"-"+this.negate().toString(u);var E=e.fromNumber(Math.pow(u,6),this.unsigned);p=this;for(var $="";;){var b=p.divide(E),S=p.subtract(b.multiply(E)).toInt()>>>0,h=S.toString(u);if(p=b,p.isZero())return h+$;for(;h.length<6;)h="0"+h;$=""+h+$}},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(e.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var u=this.high!=0?this.high:this.low,p=31;p>0&&(u&1<<p)==0;p--);return this.high!=0?p+33:p+1},e.prototype.isZero=function(){return this.high===0&&this.low===0},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isOdd=function(){return(this.low&1)===1},e.prototype.isEven=function(){return(this.low&1)===0},e.prototype.equals=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.unsigned!==u.unsigned&&this.high>>>31===1&&u.high>>>31===1?!1:this.high===u.high&&this.low===u.low},e.eq=e.prototype.equals,e.prototype.notEquals=function(u){return!this.equals(u)},e.neq=e.prototype.notEquals,e.prototype.lessThan=function(u){return this.compare(u)<0},e.prototype.lt=e.prototype.lessThan,e.prototype.lessThanOrEqual=function(u){return this.compare(u)<=0},e.prototype.lte=e.prototype.lessThanOrEqual,e.prototype.greaterThan=function(u){return this.compare(u)>0},e.prototype.gt=e.prototype.greaterThan,e.prototype.greaterThanOrEqual=function(u){return this.compare(u)>=0},e.prototype.gte=e.prototype.greaterThanOrEqual,e.prototype.compare=function(u){if(e.isLong(u)||(u=e.fromValue(u)),this.equals(u))return 0;var p=this.isNegative(),d=u.isNegative();return p&&!d?-1:!p&&d?1:this.unsigned?u.high>>>0>this.high>>>0||u.high===this.high&&u.low>>>0>this.low>>>0?-1:1:this.subtract(u).isNegative()?-1:1},e.prototype.negate=function(){return!this.unsigned&&this.equals(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=e.prototype.negate,e.prototype.add=function(u){e.isLong(u)||(u=e.fromValue(u));var p=this.high>>>16,d=this.high&65535,_=this.low>>>16,E=this.low&65535,$=u.high>>>16,b=u.high&65535,S=u.low>>>16,h=u.low&65535,A=0,x=0,R=0,m=0;return m+=E+h,R+=m>>>16,m&=65535,R+=_+S,x+=R>>>16,R&=65535,x+=d+b,A+=x>>>16,x&=65535,A+=p+$,A&=65535,e.fromBits(R<<16|m,A<<16|x,this.unsigned)},e.prototype.subtract=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.add(u.negate())},e.prototype.sub=e.prototype.subtract,e.prototype.multiply=function(u){if(this.isZero()||(e.isLong(u)||(u=e.fromValue(u)),u.isZero()))return e.ZERO;if(this.equals(e.MIN_VALUE))return u.isOdd()?e.MIN_VALUE:e.ZERO;if(u.equals(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return u.isNegative()?this.negate().multiply(u.negate()):this.negate().multiply(u).negate();if(u.isNegative())return this.multiply(u.negate()).negate();if(this.lessThan(c)&&u.lessThan(c))return e.fromNumber(this.toNumber()*u.toNumber(),this.unsigned);var p=this.high>>>16,d=this.high&65535,_=this.low>>>16,E=this.low&65535,$=u.high>>>16,b=u.high&65535,S=u.low>>>16,h=u.low&65535,A=0,x=0,R=0,m=0;return m+=E*h,R+=m>>>16,m&=65535,R+=_*h,x+=R>>>16,R&=65535,R+=E*S,x+=R>>>16,R&=65535,x+=d*h,A+=x>>>16,x&=65535,x+=_*S,A+=x>>>16,x&=65535,x+=E*b,A+=x>>>16,x&=65535,A+=p*h+d*S+_*b+E*$,A&=65535,e.fromBits(R<<16|m,A<<16|x,this.unsigned)},e.prototype.mul=e.prototype.multiply,e.prototype.divide=function(u){if(e.isLong(u)||(u=e.fromValue(u)),u.isZero())throw new Error("division by zero");if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var p,d,_;if(this.equals(e.MIN_VALUE)){if(u.equals(e.ONE)||u.equals(e.NEG_ONE))return e.MIN_VALUE;if(u.equals(e.MIN_VALUE))return e.ONE;var E=this.shiftRight(1);return p=E.divide(u).shiftLeft(1),p.equals(e.ZERO)?u.isNegative()?e.ONE:e.NEG_ONE:(d=this.subtract(u.multiply(p)),_=p.add(d.divide(u)),_)}else if(u.equals(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return u.isNegative()?this.negate().divide(u.negate()):this.negate().divide(u).negate();if(u.isNegative())return this.divide(u.negate()).negate();for(_=e.ZERO,d=this;d.greaterThanOrEqual(u);){p=Math.max(1,Math.floor(d.toNumber()/u.toNumber()));for(var $=Math.ceil(Math.log(p)/Math.LN2),b=$<=48?1:Math.pow(2,$-48),S=e.fromNumber(p),h=S.multiply(u);h.isNegative()||h.greaterThan(d);)p-=b,S=e.fromNumber(p,this.unsigned),h=S.multiply(u);S.isZero()&&(S=e.ONE),_=_.add(S),d=d.subtract(h)}return _},e.prototype.div=e.prototype.divide,e.prototype.modulo=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.subtract(this.divide(u).multiply(u))},e.prototype.mod=e.prototype.modulo,e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.and=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low&u.low,this.high&u.high,this.unsigned)},e.prototype.or=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low|u.low,this.high|u.high,this.unsigned)},e.prototype.xor=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low^u.low,this.high^u.high,this.unsigned)},e.prototype.shiftLeft=function(u){return e.isLong(u)&&(u=u.toInt()),(u&=63)===0?this:u<32?e.fromBits(this.low<<u,this.high<<u|this.low>>>32-u,this.unsigned):e.fromBits(0,this.low<<u-32,this.unsigned)},e.prototype.shl=e.prototype.shiftLeft,e.prototype.shiftRight=function(u){return e.isLong(u)&&(u=u.toInt()),(u&=63)===0?this:u<32?e.fromBits(this.low>>>u|this.high<<32-u,this.high>>u,this.unsigned):e.fromBits(this.high>>u-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=e.prototype.shiftRight,e.prototype.shiftRightUnsigned=function(u){if(e.isLong(u)&&(u=u.toInt()),u&=63,u===0)return this;var p=this.high;if(u<32){var d=this.low;return e.fromBits(d>>>u|p<<32-u,p>>>u,this.unsigned)}else return u===32?e.fromBits(p,0,this.unsigned):e.fromBits(p>>>u-32,0,this.unsigned)},e.prototype.shru=e.prototype.shiftRightUnsigned,e.prototype.toSigned=function(){return this.unsigned?new e(this.low,this.high,!1):this},e.prototype.toUnsigned=function(){return this.unsigned?this:new e(this.low,this.high,!0)},e})})(ei),Object.defineProperty(dt,"__esModule",{value:!0}),dt.Hyper=void 0;var Xb=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),No=function r(e,t,n){e===null&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,t);if(i===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:r(a,t,n)}else{if("value"in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(n)}},Yb=ei.exports,dr=Co(Yb),Kb=M,Zb=Co(Kb);function Co(r){return r&&r.__esModule?r:{default:r}}function Jb(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function Qb(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function ew(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}var vr=dt.Hyper=function(r){ew(e,r),Xb(e,null,[{key:"read",value:function(n){var i=n.readInt32BE(),a=n.readInt32BE();return this.fromBits(a,i)}},{key:"write",value:function(n,i){if(!(n instanceof this))throw new Error("XDR Write Error: "+n+" is not a Hyper");i.writeInt32BE(n.high),i.writeInt32BE(n.low)}},{key:"fromString",value:function(n){if(!/^-?\d+$/.test(n))throw new Error("Invalid hyper string: "+n);var i=No(e.__proto__||Object.getPrototypeOf(e),"fromString",this).call(this,n,!1);return new this(i.low,i.high)}},{key:"fromBits",value:function(n,i){var a=No(e.__proto__||Object.getPrototypeOf(e),"fromBits",this).call(this,n,i,!1);return new this(a.low,a.high)}},{key:"isValid",value:function(n){return n instanceof this}}]);function e(t,n){return Jb(this,e),Qb(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!1))}return e}(dr.default);(0,Zb.default)(vr),vr.MAX_VALUE=new vr(dr.default.MAX_VALUE.low,dr.default.MAX_VALUE.high),vr.MIN_VALUE=new vr(dr.default.MIN_VALUE.low,dr.default.MIN_VALUE.high);var Pe={};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.UnsignedInt=void 0;var rw=et,Lo=jo(rw),tw=M,nw=jo(tw);function jo(r){return r&&r.__esModule?r:{default:r}}var gr=Pe.UnsignedInt={read:function(e){return e.readUInt32BE()},write:function(e,t){if(!(0,Lo.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");if(e<0)throw new Error("XDR Write Error: negative number "+e);t.writeUInt32BE(e)},isValid:function(e){return!(0,Lo.default)(e)||Math.floor(e)!==e?!1:e>=gr.MIN_VALUE&&e<=gr.MAX_VALUE}};gr.MAX_VALUE=Math.pow(2,32)-1,gr.MIN_VALUE=0,(0,nw.default)(gr);var vt={};Object.defineProperty(vt,"__esModule",{value:!0}),vt.UnsignedHyper=void 0;var iw=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),ko=function r(e,t,n){e===null&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,t);if(i===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:r(a,t,n)}else{if("value"in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(n)}},aw=ei.exports,_r=Vo(aw),ow=M,uw=Vo(ow);function Vo(r){return r&&r.__esModule?r:{default:r}}function fw(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function sw(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function cw(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}var mr=vt.UnsignedHyper=function(r){cw(e,r),iw(e,null,[{key:"read",value:function(n){var i=n.readInt32BE(),a=n.readInt32BE();return this.fromBits(a,i)}},{key:"write",value:function(n,i){if(!(n instanceof this))throw new Error("XDR Write Error: "+n+" is not an UnsignedHyper");i.writeInt32BE(n.high),i.writeInt32BE(n.low)}},{key:"fromString",value:function(n){if(!/^\d+$/.test(n))throw new Error("Invalid hyper string: "+n);var i=ko(e.__proto__||Object.getPrototypeOf(e),"fromString",this).call(this,n,!0);return new this(i.low,i.high)}},{key:"fromBits",value:function(n,i){var a=ko(e.__proto__||Object.getPrototypeOf(e),"fromBits",this).call(this,n,i,!0);return new this(a.low,a.high)}},{key:"isValid",value:function(n){return n instanceof this}}]);function e(t,n){return fw(this,e),sw(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!0))}return e}(_r.default);(0,uw.default)(mr),mr.MAX_VALUE=new mr(_r.default.MAX_UNSIGNED_VALUE.low,_r.default.MAX_UNSIGNED_VALUE.high),mr.MIN_VALUE=new mr(_r.default.MIN_VALUE.low,_r.default.MIN_VALUE.high);var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.Float=void 0;var lw=et,qo=Go(lw),pw=M,hw=Go(pw);function Go(r){return r&&r.__esModule?r:{default:r}}var yw=gt.Float={read:function(e){return e.readFloatBE()},write:function(e,t){if(!(0,qo.default)(e))throw new Error("XDR Write Error: not a number");t.writeFloatBE(e)},isValid:function(e){return(0,qo.default)(e)}};(0,hw.default)(yw);var _t={};Object.defineProperty(_t,"__esModule",{value:!0}),_t.Double=void 0;var dw=et,Ho=Wo(dw),vw=M,gw=Wo(vw);function Wo(r){return r&&r.__esModule?r:{default:r}}var _w=_t.Double={read:function(e){return e.readDoubleBE()},write:function(e,t){if(!(0,Ho.default)(e))throw new Error("XDR Write Error: not a number");t.writeDoubleBE(e)},isValid:function(e){return(0,Ho.default)(e)}};(0,gw.default)(_w);var mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.Quadruple=void 0;var mw=M,bw=ww(mw);function ww(r){return r&&r.__esModule?r:{default:r}}var $w=mt.Quadruple={read:function(){throw new Error("XDR Read Error: quadruple not supported")},write:function(){throw new Error("XDR Write Error: quadruple not supported")},isValid:function(){return!1}};(0,bw.default)($w);var br={},Ew=fe,Ow=H,Aw="[object Boolean]";function Sw(r){return r===!0||r===!1||Ow(r)&&Ew(r)==Aw}var Tw=Sw;Object.defineProperty(br,"__esModule",{value:!0}),br.Bool=void 0;var Iw=Tw,xw=Xo(Iw),zo=ue,Pw=M,Fw=Xo(Pw);function Xo(r){return r&&r.__esModule?r:{default:r}}var Rw=br.Bool={read:function(e){var t=zo.Int.read(e);switch(t){case 0:return!1;case 1:return!0;default:throw new Error("XDR Read Error: Got "+t+" when trying to read a bool")}},write:function(e,t){var n=e?1:0;return zo.Int.write(n,t)},isValid:function(e){return(0,xw.default)(e)}};(0,Fw.default)(Rw);var bt={},Mw=fe,Bw=C,Uw=H,Dw="[object String]";function Nw(r){return typeof r=="string"||!Bw(r)&&Uw(r)&&Mw(r)==Dw}var Yo=Nw;Object.defineProperty(bt,"__esModule",{value:!0}),bt.String=void 0;var Cw=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Lw=Yo,Ko=ri(Lw),jw=C,kw=ri(jw),Zo=ue,Vw=Pe,Jo=Ie,qw=M,Gw=ri(qw);function ri(r){return r&&r.__esModule?r:{default:r}}function Hw(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var Ww=bt.String=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vw.UnsignedInt.MAX_VALUE;Hw(this,r),this._maxLength=e}return Cw(r,[{key:"read",value:function(t){var n=Zo.Int.read(t);if(n>this._maxLength)throw new Error("XDR Read Error: Saw "+n+" length String,"+("max allowed is "+this._maxLength));var i=(0,Jo.calculatePadding)(n),a=t.slice(n);return(0,Jo.slicePadding)(t,i),a.buffer()}},{key:"readString",value:function(t){return this.read(t).toString("utf8")}},{key:"write",value:function(t,n){if(t.length>this._maxLength)throw new Error("XDR Write Error: Got "+t.length+" bytes,"+("max allows is "+this._maxLength));var i=void 0;(0,Ko.default)(t)?i=y.from(t,"utf8"):i=y.from(t),Zo.Int.write(i.length,n),n.writeBufferPadded(i)}},{key:"isValid",value:function(t){var n=void 0;if((0,Ko.default)(t))n=y.from(t,"utf8");else if((0,kw.default)(t)||y.isBuffer(t))n=y.from(t);else return!1;return n.length<=this._maxLength}}]),r}();(0,Gw.default)(Ww.prototype);var wt={};Object.defineProperty(wt,"__esModule",{value:!0}),wt.Opaque=void 0;var zw=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Qo=Ie,Xw=M,Yw=Kw(Xw);function Kw(r){return r&&r.__esModule?r:{default:r}}function Zw(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var Jw=wt.Opaque=function(){function r(e){Zw(this,r),this._length=e,this._padding=(0,Qo.calculatePadding)(e)}return zw(r,[{key:"read",value:function(t){var n=t.slice(this._length);return(0,Qo.slicePadding)(t,this._padding),n.buffer()}},{key:"write",value:function(t,n){if(t.length!==this._length)throw new Error("XDR Write Error: Got "+t.length+" bytes, expected "+this._length);n.writeBufferPadded(t)}},{key:"isValid",value:function(t){return y.isBuffer(t)&&t.length===this._length}}]),r}();(0,Yw.default)(Jw.prototype);var $t={};Object.defineProperty($t,"__esModule",{value:!0}),$t.VarOpaque=void 0;var Qw=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),eu=ue,e1=Pe,ru=Ie,r1=M,t1=n1(r1);function n1(r){return r&&r.__esModule?r:{default:r}}function i1(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var a1=$t.VarOpaque=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:e1.UnsignedInt.MAX_VALUE;i1(this,r),this._maxLength=e}return Qw(r,[{key:"read",value:function(t){var n=eu.Int.read(t);if(n>this._maxLength)throw new Error("XDR Read Error: Saw "+n+" length VarOpaque,"+("max allowed is "+this._maxLength));var i=(0,ru.calculatePadding)(n),a=t.slice(n);return(0,ru.slicePadding)(t,i),a.buffer()}},{key:"write",value:function(t,n){if(t.length>this._maxLength)throw new Error("XDR Write Error: Got "+t.length+" bytes,"+("max allows is "+this._maxLength));eu.Int.write(t.length,n),n.writeBufferPadded(t)}},{key:"isValid",value:function(t){return y.isBuffer(t)&&t.length<=this._maxLength}}]),r}();(0,t1.default)(a1.prototype);var Et={},Fe={exports:{}};function o1(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var tu=o1,u1=tt;function f1(r){return typeof r=="function"?r:u1}var nu=f1,s1=tu,c1=Dn,l1=nu,p1=C;function h1(r,e){var t=p1(r)?s1:c1;return t(r,l1(e))}var y1=h1;(function(r){r.exports=y1})(Fe);var d1=/\s/;function v1(r){for(var e=r.length;e--&&d1.test(r.charAt(e)););return e}var g1=v1,_1=g1,m1=/^\s+/;function b1(r){return r&&r.slice(0,_1(r)+1).replace(m1,"")}var w1=b1,$1=w1,iu=ve,E1=pt,au=0/0,O1=/^[-+]0x[0-9a-f]+$/i,A1=/^0b[01]+$/i,S1=/^0o[0-7]+$/i,T1=parseInt;function I1(r){if(typeof r=="number")return r;if(E1(r))return au;if(iu(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=iu(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=$1(r);var t=A1.test(r);return t||S1.test(r)?T1(r.slice(2),t?2:8):O1.test(r)?au:+r}var x1=I1,P1=x1,ou=1/0,F1=17976931348623157e292;function R1(r){if(!r)return r===0?r:0;if(r=P1(r),r===ou||r===-ou){var e=r<0?-1:1;return e*F1}return r===r?r:0}var M1=R1,B1=M1;function U1(r){var e=B1(r),t=e%1;return e===e?t?e-t:e:0}var D1=U1,N1=Va,C1=nu,L1=D1,j1=9007199254740991,ti=4294967295,k1=Math.min;function V1(r,e){if(r=L1(r),r<1||r>j1)return[];var t=ti,n=k1(r,ti);e=C1(e),r-=ti;for(var i=N1(n,e);++t<r;)e(t);return i}var uu=V1;Object.defineProperty(Et,"__esModule",{value:!0}),Et.Array=void 0;var q1=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),G1=Jn,H1=wr(G1),W1=Fe.exports,z1=wr(W1),X1=uu,Y1=wr(X1),K1=C,fu=wr(K1),Z1=M,J1=wr(Z1);function wr(r){return r&&r.__esModule?r:{default:r}}function Q1(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var e$=Et.Array=function(){function r(e,t){Q1(this,r),this._childType=e,this._length=t}return q1(r,[{key:"read",value:function(t){var n=this;return(0,Y1.default)(this._length,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,fu.default)(t))throw new Error("XDR Write Error: value is not array");if(t.length!==this._length)throw new Error("XDR Write Error: Got array of size "+t.length+","+("expected "+this._length));(0,z1.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,fu.default)(t)||t.length!==this._length?!1:(0,H1.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,J1.default)(e$.prototype);var Ot={};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.VarArray=void 0;var r$=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),t$=Jn,n$=$r(t$),i$=Fe.exports,a$=$r(i$),o$=uu,u$=$r(o$),f$=C,su=$r(f$),s$=Pe,cu=ue,c$=M,l$=$r(c$);function $r(r){return r&&r.__esModule?r:{default:r}}function p$(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var h$=Ot.VarArray=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s$.UnsignedInt.MAX_VALUE;p$(this,r),this._childType=e,this._maxLength=t}return r$(r,[{key:"read",value:function(t){var n=this,i=cu.Int.read(t);if(i>this._maxLength)throw new Error("XDR Read Error: Saw "+i+" length VarArray,"+("max allowed is "+this._maxLength));return(0,u$.default)(i,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,su.default)(t))throw new Error("XDR Write Error: value is not array");if(t.length>this._maxLength)throw new Error("XDR Write Error: Got array of size "+t.length+","+("max allowed is "+this._maxLength));cu.Int.write(t.length,n),(0,a$.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,su.default)(t)||t.length>this._maxLength?!1:(0,n$.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,l$.default)(h$.prototype);var At={};function y$(r){return r===null}var d$=y$;function v$(r){return r===void 0}var Er=v$;Object.defineProperty(At,"__esModule",{value:!0}),At.Option=void 0;var g$=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),_$=d$,lu=ni(_$),m$=Er,pu=ni(m$),hu=br,b$=M,w$=ni(b$);function ni(r){return r&&r.__esModule?r:{default:r}}function $$(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var E$=At.Option=function(){function r(e){$$(this,r),this._childType=e}return g$(r,[{key:"read",value:function(t){if(hu.Bool.read(t))return this._childType.read(t)}},{key:"write",value:function(t,n){var i=!((0,lu.default)(t)||(0,pu.default)(t));hu.Bool.write(i,n),i&&this._childType.write(t,n)}},{key:"isValid",value:function(t){return(0,lu.default)(t)||(0,pu.default)(t)?!0:this._childType.isValid(t)}}]),r}();(0,w$.default)(E$.prototype);var Or={};Object.defineProperty(Or,"__esModule",{value:!0}),Or.Void=void 0;var O$=Er,yu=du(O$),A$=M,S$=du(A$);function du(r){return r&&r.__esModule?r:{default:r}}var T$=Or.Void={read:function(){},write:function(e){if(!(0,yu.default)(e))throw new Error("XDR Write Error: trying to write value to a void slot")},isValid:function(e){return(0,yu.default)(e)}};(0,S$.default)(T$);var St={},I$=ht;function x$(r,e){return I$(e,function(t){return r[t]})}var P$=x$,F$=P$,R$=He;function M$(r){return r==null?[]:F$(r,R$(r))}var B$=M$;Object.defineProperty(St,"__esModule",{value:!0}),St.Enum=void 0;var U$=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),D$=Fe.exports,N$=ii(D$),C$=B$,L$=ii(C$),vu=ue,j$=M,k$=ii(j$);function ii(r){return r&&r.__esModule?r:{default:r}}function V$(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function q$(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function gu(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var G$=St.Enum=function(){function r(e,t){gu(this,r),this.name=e,this.value=t}return U$(r,null,[{key:"read",value:function(t){var n=vu.Int.read(t);if(!this._byValue.has(n))throw new Error("XDR Read Error: Unknown "+this.enumName+" member for value "+n);return this._byValue.get(n)}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: Unknown "+t+" is not a "+this.enumName);vu.Int.write(t.value,n)}},{key:"isValid",value:function(t){return t instanceof this}},{key:"members",value:function(){return this._members}},{key:"values",value:function(){return(0,L$.default)(this._members)}},{key:"fromName",value:function(t){var n=this._members[t];if(!n)throw new Error(t+" is not a member of "+this.enumName);return n}},{key:"fromValue",value:function(t){var n=this._byValue.get(t);if(!n)throw new Error(t+" is not a value of any member of "+this.enumName);return n}},{key:"create",value:function(t,n,i){var a=function(o){q$(f,o);function f(){return gu(this,f),V$(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(r);return a.enumName=n,t.results[n]=a,a._members={},a._byValue=new Map,(0,N$.default)(i,function(o,f){var s=new a(f,o);a._members[f]=s,a._byValue.set(o,s),a[f]=function(){return s}}),a}}]),r}();(0,k$.default)(G$);var Tt={},H$=Dn,W$=cr;function z$(r,e){var t=-1,n=W$(r)?Array(r.length):[];return H$(r,function(i,a,o){n[++t]=e(i,a,o)}),n}var X$=z$,Y$=ht,K$=Fo,Z$=X$,J$=C;function Q$(r,e){var t=J$(r)?Y$:Z$;return t(r,K$(e))}var eE=Q$;function rE(r){for(var e=-1,t=r==null?0:r.length,n={};++e<t;){var i=r[e];n[i[0]]=i[1]}return n}var tE=rE,Ar={};Object.defineProperty(Ar,"__esModule",{value:!0});var nE=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();function iE(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}Ar.Reference=function(){function r(){iE(this,r)}return nE(r,[{key:"resolve",value:function(){throw new Error("implement resolve in child class")}}]),r}(),Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.Struct=void 0;var It=function(){function r(e,t){var n=[],i=!0,a=!1,o=void 0;try{for(var f=e[Symbol.iterator](),s;!(i=(s=f.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(c){a=!0,o=c}finally{try{!i&&f.return&&f.return()}finally{if(a)throw o}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),aE=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),oE=Fe.exports,_u=Sr(oE),uE=eE,fE=Sr(uE),sE=Er,cE=Sr(sE),lE=tE,pE=Sr(lE),hE=Ar,yE=M,dE=Sr(yE);function Sr(r){return r&&r.__esModule?r:{default:r}}function vE(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function gE(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function mu(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var _E=Tt.Struct=function(){function r(e){mu(this,r),this._attributes=e||{}}return aE(r,null,[{key:"read",value:function(t){var n=(0,fE.default)(this._fields,function(i){var a=It(i,2),o=a[0],f=a[1],s=f.read(t);return[o,s]});return new this((0,pE.default)(n))}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: "+t+" is not a "+this.structName);(0,_u.default)(this._fields,function(i){var a=It(i,2),o=a[0],f=a[1],s=t._attributes[o];f.write(s,n)})}},{key:"isValid",value:function(t){return t instanceof this}},{key:"create",value:function(t,n,i){var a=function(o){gE(f,o);function f(){return mu(this,f),vE(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(r);return a.structName=n,t.results[n]=a,a._fields=i.map(function(o){var f=It(o,2),s=f[0],c=f[1];return c instanceof hE.Reference&&(c=c.resolve(t)),[s,c]}),(0,_u.default)(a._fields,function(o){var f=It(o,1),s=f[0];a.prototype[s]=mE(s)}),a}}]),r}();(0,dE.default)(_E);function mE(r){return function(t){return(0,cE.default)(t)||(this._attributes[r]=t),this._attributes[r]}}var xt={};Object.defineProperty(xt,"__esModule",{value:!0}),xt.Union=void 0;var bE=function(){function r(e,t){var n=[],i=!0,a=!1,o=void 0;try{for(var f=e[Symbol.iterator](),s;!(i=(s=f.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(c){a=!0,o=c}finally{try{!i&&f.return&&f.return()}finally{if(a)throw o}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),wE=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),$E=Fe.exports,Pt=Rt($E),EE=Er,bu=Rt(EE),OE=Yo,wu=Rt(OE),Ft=Or,ai=Ar,AE=M,SE=Rt(AE);function Rt(r){return r&&r.__esModule?r:{default:r}}function TE(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function IE(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function $u(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var xE=xt.Union=function(){function r(e,t){$u(this,r),this.set(e,t)}return wE(r,[{key:"set",value:function(t,n){(0,wu.default)(t)&&(t=this.constructor._switchOn.fromName(t)),this._switch=t,this._arm=this.constructor.armForSwitch(this._switch),this._armType=this.constructor.armTypeForArm(this._arm),this._value=n}},{key:"get",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._arm;if(this._arm!==Ft.Void&&this._arm!==t)throw new Error(t+" not set");return this._value}},{key:"switch",value:function(){return this._switch}},{key:"arm",value:function(){return this._arm}},{key:"armType",value:function(){return this._armType}},{key:"value",value:function(){return this._value}}],[{key:"armForSwitch",value:function(t){if(this._switches.has(t))return this._switches.get(t);if(this._defaultArm)return this._defaultArm;throw new Error("Bad union switch: "+t)}},{key:"armTypeForArm",value:function(t){return t===Ft.Void?Ft.Void:this._arms[t]}},{key:"read",value:function(t){var n=this._switchOn.read(t),i=this.armForSwitch(n),a=this.armTypeForArm(i),o=void 0;return(0,bu.default)(a)?o=i.read(t):o=a.read(t),new this(n,o)}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: "+t+" is not a "+this.unionName);this._switchOn.write(t.switch(),n),t.armType().write(t.value(),n)}},{key:"isValid",value:function(t){return t instanceof this}},{key:"create",value:function(t,n,i){var a=function(f){IE(s,f);function s(){return $u(this,s),TE(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments))}return s}(r);a.unionName=n,t.results[n]=a,i.switchOn instanceof ai.Reference?a._switchOn=i.switchOn.resolve(t):a._switchOn=i.switchOn,a._switches=new Map,a._arms={},(0,Pt.default)(i.arms,function(f,s){f instanceof ai.Reference&&(f=f.resolve(t)),a._arms[s]=f});var o=i.defaultArm;return o instanceof ai.Reference&&(o=o.resolve(t)),a._defaultArm=o,(0,Pt.default)(i.switches,function(f){var s=bE(f,2),c=s[0],l=s[1];(0,wu.default)(c)&&(c=a._switchOn.fromName(c)),a._switches.set(c,l)}),(0,bu.default)(a._switchOn.values)||(0,Pt.default)(a._switchOn.values(),function(f){a[f.name]=function(s){return new a(f,s)},a.prototype[f.name]=function(c){return this.set(f,c)}}),(0,Pt.default)(a._arms,function(f,s){f!==Ft.Void&&(a.prototype[s]=function(){return this.get(s)})}),a}}]),r}();(0,SE.default)(xE),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=ue;Object.keys(e).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return e[h]}})});var t=dt;Object.keys(t).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return t[h]}})});var n=Pe;Object.keys(n).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return n[h]}})});var i=vt;Object.keys(i).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return i[h]}})});var a=gt;Object.keys(a).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return a[h]}})});var o=_t;Object.keys(o).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return o[h]}})});var f=mt;Object.keys(f).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return f[h]}})});var s=br;Object.keys(s).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return s[h]}})});var c=bt;Object.keys(c).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return c[h]}})});var l=wt;Object.keys(l).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return l[h]}})});var u=$t;Object.keys(u).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return u[h]}})});var p=Et;Object.keys(p).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return p[h]}})});var d=Ot;Object.keys(d).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return d[h]}})});var _=At;Object.keys(_).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return _[h]}})});var E=Or;Object.keys(E).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return E[h]}})});var $=St;Object.keys($).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return $[h]}})});var b=Tt;Object.keys(b).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return b[h]}})});var S=xt;Object.keys(S).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return S[h]}})})}(In);var Eu={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=function(){function m(v,g){for(var w=0;w<g.length;w++){var O=g[w];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(v,O.key,O)}}return function(v,g,w){return g&&m(v.prototype,g),w&&m(v,w),v}}(),t=Ar;Object.keys(t).forEach(function(m){m==="default"||m==="__esModule"||Object.defineProperty(r,m,{enumerable:!0,get:function(){return t[m]}})}),r.config=_;var n=Er,i=l(n),a=Fe.exports,o=l(a),f=In,s=c(f);function c(m){if(m&&m.__esModule)return m;var v={};if(m!=null)for(var g in m)Object.prototype.hasOwnProperty.call(m,g)&&(v[g]=m[g]);return v.default=m,v}function l(m){return m&&m.__esModule?m:{default:m}}function u(m,v){if(!(m instanceof v))throw new TypeError("Cannot call a class as a function")}function p(m,v){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:m}function d(m,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);m.prototype=Object.create(v&&v.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(m,v):m.__proto__=v)}function _(m){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(m){var g=new R(v);m(g),g.resolve()}return v}var E=function(m){d(v,m);function v(g){u(this,v);var w=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return w.name=g,w}return e(v,[{key:"resolve",value:function(w){var O=w.definitions[this.name];return O.resolve(w)}}]),v}(t.Reference),$=function(m){d(v,m);function v(g,w){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;u(this,v);var L=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return L.childReference=g,L.length=w,L.variable=O,L}return e(v,[{key:"resolve",value:function(w){var O=this.childReference,L=this.length;return O instanceof t.Reference&&(O=O.resolve(w)),L instanceof t.Reference&&(L=L.resolve(w)),this.variable?new s.VarArray(O,L):new s.Array(O,L)}}]),v}(t.Reference),b=function(m){d(v,m);function v(g){u(this,v);var w=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return w.childReference=g,w.name=g.name,w}return e(v,[{key:"resolve",value:function(w){var O=this.childReference;return O instanceof t.Reference&&(O=O.resolve(w)),new s.Option(O)}}]),v}(t.Reference),S=function(m){d(v,m);function v(g,w){u(this,v);var O=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return O.sizedType=g,O.length=w,O}return e(v,[{key:"resolve",value:function(w){var O=this.length;return O instanceof t.Reference&&(O=O.resolve(w)),new this.sizedType(O)}}]),v}(t.Reference),h=function(){function m(v,g,w){u(this,m),this.constructor=v,this.name=g,this.config=w}return e(m,[{key:"resolve",value:function(g){return this.name in g.results?g.results[this.name]:this.constructor(g,this.name,this.config)}}]),m}();function A(m,v,g){return g instanceof t.Reference&&(g=g.resolve(m)),m.results[v]=g,g}function x(m,v,g){return m.results[v]=g,g}var R=function(){function m(v){u(this,m),this._destination=v,this._definitions={}}return e(m,[{key:"enum",value:function(g,w){var O=new h(s.Enum.create,g,w);this.define(g,O)}},{key:"struct",value:function(g,w){var O=new h(s.Struct.create,g,w);this.define(g,O)}},{key:"union",value:function(g,w){var O=new h(s.Union.create,g,w);this.define(g,O)}},{key:"typedef",value:function(g,w){var O=new h(A,g,w);this.define(g,O)}},{key:"const",value:function(g,w){var O=new h(x,g,w);this.define(g,O)}},{key:"void",value:function(){return s.Void}},{key:"bool",value:function(){return s.Bool}},{key:"int",value:function(){return s.Int}},{key:"hyper",value:function(){return s.Hyper}},{key:"uint",value:function(){return s.UnsignedInt}},{key:"uhyper",value:function(){return s.UnsignedHyper}},{key:"float",value:function(){return s.Float}},{key:"double",value:function(){return s.Double}},{key:"quadruple",value:function(){return s.Quadruple}},{key:"string",value:function(g){return new S(s.String,g)}},{key:"opaque",value:function(g){return new S(s.Opaque,g)}},{key:"varOpaque",value:function(g){return new S(s.VarOpaque,g)}},{key:"array",value:function(g,w){return new $(g,w)}},{key:"varArray",value:function(g,w){return new $(g,w,!0)}},{key:"option",value:function(g){return new b(g)}},{key:"define",value:function(g,w){if((0,i.default)(this._destination[g]))this._definitions[g]=w;else throw new Error("XDRTypes Error:"+g+" is already defined")}},{key:"lookup",value:function(g){return new E(g)}},{key:"resolve",value:function(){var g=this;(0,o.default)(this._definitions,function(w){w.resolve({definitions:g._definitions,results:g._destination})})}}]),m}()})(Eu),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=In;Object.keys(e).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[n]}})});var t=Eu;Object.keys(t).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[n]}})})}(Oa),Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.xdr=void 0;const PE=(0,Oa.config)(r=>{r.enum("EnvelopeType",{envelopeTypeBundle:0}),r.typedef("Uint32",r.uint()),r.typedef("Uint64",r.uhyper()),r.union("BundleItemExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("BundleItem",[["collectionId",r.lookup("Uint64")],["productId",r.lookup("Uint64")],["variantId",r.lookup("Uint64")],["sku",r.string()],["quantity",r.lookup("Uint32")],["ext",r.lookup("BundleItemExt")]]),r.union("BundleExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("Bundle",[["variantId",r.lookup("Uint64")],["items",r.varArray(r.lookup("BundleItem"),500)],["version",r.lookup("Uint32")],["ext",r.lookup("BundleExt")]]),r.union("BundleEnvelope",{switchOn:r.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeBundle","v1"]],arms:{v1:r.lookup("Bundle")}})});Qr.xdr=PE,Object.defineProperty(oe,"__esModule",{value:!0}),oe.decodeToLegacyBoxOrder=oe.encodeLegacyBoxOrder=oe.toBundle=Au=oe.toLineItemProperty=void 0;const ee=Qr;function Ou(r){let e={variantId:ee.xdr.Uint64.fromString(r.variantId.toString()),version:r.version||Math.floor(Date.now()/1e3),items:r.items.map(n=>new ee.xdr.BundleItem({collectionId:ee.xdr.Uint64.fromString(n.collectionId.toString()),productId:ee.xdr.Uint64.fromString(n.productId.toString()),variantId:ee.xdr.Uint64.fromString(n.variantId.toString()),sku:n.sku||"",quantity:n.quantity,ext:new ee.xdr.BundleItemExt(0)})),ext:new ee.xdr.BundleExt(0)};const t=new ee.xdr.Bundle(e);return ee.xdr.BundleEnvelope.envelopeTypeBundle(t).toXDR("base64")}var Au=oe.toLineItemProperty=Ou;function Su(r){const e=ee.xdr.BundleEnvelope.fromXDR(r,"base64").v1();return{variantId:e.variantId().toString(),version:e.version(),items:e.items().map(t=>({collectionId:t.collectionId().toString(),productId:t.productId().toString(),variantId:t.variantId().toString(),sku:t.sku().toString(),quantity:t.quantity()}))}}oe.toBundle=Su;function FE(r,e,t=1){const n={variantId:r.toString(),version:t,items:[]};for(const i in e)if(Object.hasOwnProperty.call(e,i)){const a=e[i];n.items.push({collectionId:a.dsId.toString(),productId:a.pId.toString(),variantId:a.vId.toString(),sku:a.sku||"",quantity:a.qty})}return Ou(n)}oe.encodeLegacyBoxOrder=FE;function RE(r){let e={};try{Su(r).items.forEach(n=>{e[n.variantId]={dsId:n.collectionId,pId:Number.parseInt(n.productId),vId:Number.parseInt(n.variantId),sku:n.sku,qty:n.quantity}})}catch{e=JSON.parse(y.from(r,"base64").toString())}return e}oe.decodeToLegacyBoxOrder=RE;var ME=Ge,BE=He;function UE(r,e){return r&&ME(e,BE(e),r)}var DE=UE,NE=Ge,CE=nt;function LE(r,e){return r&&NE(e,CE(e),r)}var jE=LE,oi={exports:{}};(function(r,e){var t=Q,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a?t.Buffer:void 0,f=o?o.allocUnsafe:void 0;function s(c,l){if(l)return c.slice();var u=c.length,p=f?f(u):new c.constructor(u);return c.copy(p),p}r.exports=s})(oi,oi.exports);function kE(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var VE=kE,qE=Ge,GE=Vn;function HE(r,e){return qE(r,GE(r),e)}var WE=HE,zE=Ya,XE=zE(Object.getPrototypeOf,Object),ui=XE,YE=kn,KE=ui,ZE=Vn,JE=io,QE=Object.getOwnPropertySymbols,eO=QE?function(r){for(var e=[];r;)YE(e,ZE(r)),r=KE(r);return e}:JE,Tu=eO,rO=Ge,tO=Tu;function nO(r,e){return rO(r,tO(r),e)}var iO=nO,aO=no,oO=Tu,uO=nt;function fO(r){return aO(r,uO,oO)}var Iu=fO,sO=Object.prototype,cO=sO.hasOwnProperty;function lO(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&cO.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var pO=lO,xu=Qa;function hO(r){var e=new r.constructor(r.byteLength);return new xu(e).set(new xu(r)),e}var fi=hO,yO=fi;function dO(r,e){var t=e?yO(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}var vO=dO,gO=/\w*$/;function _O(r){var e=new r.constructor(r.source,gO.exec(r));return e.lastIndex=r.lastIndex,e}var mO=_O,Pu=qe,Fu=Pu?Pu.prototype:void 0,Ru=Fu?Fu.valueOf:void 0;function bO(r){return Ru?Object(Ru.call(r)):{}}var wO=bO,$O=fi;function EO(r,e){var t=e?$O(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var OO=EO,AO=fi,SO=vO,TO=mO,IO=wO,xO=OO,PO="[object Boolean]",FO="[object Date]",RO="[object Map]",MO="[object Number]",BO="[object RegExp]",UO="[object Set]",DO="[object String]",NO="[object Symbol]",CO="[object ArrayBuffer]",LO="[object DataView]",jO="[object Float32Array]",kO="[object Float64Array]",VO="[object Int8Array]",qO="[object Int16Array]",GO="[object Int32Array]",HO="[object Uint8Array]",WO="[object Uint8ClampedArray]",zO="[object Uint16Array]",XO="[object Uint32Array]";function YO(r,e,t){var n=r.constructor;switch(e){case CO:return AO(r);case PO:case FO:return new n(+r);case LO:return SO(r,t);case jO:case kO:case VO:case qO:case GO:case HO:case WO:case zO:case XO:return xO(r,t);case RO:return new n;case MO:case DO:return new n(r);case BO:return TO(r);case UO:return new n;case NO:return IO(r)}}var KO=YO,ZO=ve,Mu=Object.create,JO=function(){function r(){}return function(e){if(!ZO(e))return{};if(Mu)return Mu(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}(),QO=JO,eA=QO,rA=ui,tA=Un;function nA(r){return typeof r.constructor=="function"&&!tA(r)?eA(rA(r)):{}}var iA=nA,aA=ct,oA=H,uA="[object Map]";function fA(r){return oA(r)&&aA(r)==uA}var sA=fA,cA=sA,lA=Bn,Bu=pr.exports,Uu=Bu&&Bu.isMap,pA=Uu?lA(Uu):cA,hA=pA,yA=ct,dA=H,vA="[object Set]";function gA(r){return dA(r)&&yA(r)==vA}var _A=gA,mA=_A,bA=Bn,Du=pr.exports,Nu=Du&&Du.isSet,wA=Nu?bA(Nu):mA,$A=wA,EA=Ln,OA=tu,AA=Da,SA=DE,TA=jE,IA=oi.exports,xA=VE,PA=WE,FA=iO,RA=oo,MA=Iu,BA=ct,UA=pO,DA=KO,NA=iA,CA=C,LA=lr.exports,jA=hA,kA=ve,VA=$A,qA=He,GA=nt,HA=1,WA=2,zA=4,Cu="[object Arguments]",XA="[object Array]",YA="[object Boolean]",KA="[object Date]",ZA="[object Error]",Lu="[object Function]",JA="[object GeneratorFunction]",QA="[object Map]",eS="[object Number]",ju="[object Object]",rS="[object RegExp]",tS="[object Set]",nS="[object String]",iS="[object Symbol]",aS="[object WeakMap]",oS="[object ArrayBuffer]",uS="[object DataView]",fS="[object Float32Array]",sS="[object Float64Array]",cS="[object Int8Array]",lS="[object Int16Array]",pS="[object Int32Array]",hS="[object Uint8Array]",yS="[object Uint8ClampedArray]",dS="[object Uint16Array]",vS="[object Uint32Array]",P={};P[Cu]=P[XA]=P[oS]=P[uS]=P[YA]=P[KA]=P[fS]=P[sS]=P[cS]=P[lS]=P[pS]=P[QA]=P[eS]=P[ju]=P[rS]=P[tS]=P[nS]=P[iS]=P[hS]=P[yS]=P[dS]=P[vS]=!0,P[ZA]=P[Lu]=P[aS]=!1;function Mt(r,e,t,n,i,a){var o,f=e&HA,s=e&WA,c=e&zA;if(t&&(o=i?t(r,n,i,a):t(r)),o!==void 0)return o;if(!kA(r))return r;var l=CA(r);if(l){if(o=UA(r),!f)return xA(r,o)}else{var u=BA(r),p=u==Lu||u==JA;if(LA(r))return IA(r,f);if(u==ju||u==Cu||p&&!i){if(o=s||p?{}:NA(r),!f)return s?FA(r,TA(o,r)):PA(r,SA(o,r))}else{if(!P[u])return i?r:{};o=DA(r,u,f)}}a||(a=new EA);var d=a.get(r);if(d)return d;a.set(r,o),VA(r)?r.forEach(function($){o.add(Mt($,e,t,$,r,a))}):jA(r)&&r.forEach(function($,b){o.set(b,Mt($,e,t,b,r,a))});var _=c?s?MA:RA:s?GA:qA,E=l?void 0:_(r);return OA(E||r,function($,b){E&&(b=$,$=r[b]),AA(o,b,Mt($,e,t,b,r,a))}),o}var gS=Mt;function _S(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var mS=_S;function bS(r,e,t){var n=-1,i=r.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=r[n+e];return a}var wS=bS,$S=Zn,ES=wS;function OS(r,e){return e.length<2?r:$S(r,ES(e,0,-1))}var AS=OS,SS=yt,TS=mS,IS=AS,xS=hr;function PS(r,e){return e=SS(e,r),r=IS(r,e),r==null||delete r[xS(TS(e))]}var FS=PS,RS=fe,MS=ui,BS=H,US="[object Object]",DS=Function.prototype,NS=Object.prototype,ku=DS.toString,CS=NS.hasOwnProperty,LS=ku.call(Object);function jS(r){if(!BS(r)||RS(r)!=US)return!1;var e=MS(r);if(e===null)return!0;var t=CS.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&ku.call(t)==LS}var kS=jS,VS=kS;function qS(r){return VS(r)?void 0:r}var GS=qS,Vu=qe,HS=Mn,WS=C,qu=Vu?Vu.isConcatSpreadable:void 0;function zS(r){return WS(r)||HS(r)||!!(qu&&r&&r[qu])}var XS=zS,YS=kn,KS=XS;function Gu(r,e,t,n,i){var a=-1,o=r.length;for(t||(t=KS),i||(i=[]);++a<o;){var f=r[a];e>0&&t(f)?e>1?Gu(f,e-1,t,n,i):YS(i,f):n||(i[i.length]=f)}return i}var ZS=Gu,JS=ZS;function QS(r){var e=r==null?0:r.length;return e?JS(r,1):[]}var eT=QS,rT=eT,tT=Ca,nT=ja;function iT(r){return nT(tT(r,void 0,rT),r+"")}var aT=iT,oT=ht,uT=gS,fT=FS,sT=yt,cT=Ge,lT=GS,pT=aT,hT=Iu,yT=1,dT=2,vT=4,gT=pT(function(r,e){var t={};if(r==null)return t;var n=!1;e=oT(e,function(a){return a=sT(a,r),n||(n=a.length>1),a}),cT(r,hT(r),t),n&&(t=uT(t,yT|dT|vT,lT));for(var i=e.length;i--;)fT(t,e[i]);return t}),_T=gT,mT=Object.defineProperty,bT=Object.defineProperties,wT=Object.getOwnPropertyDescriptors,Hu=Object.getOwnPropertySymbols,$T=Object.prototype.hasOwnProperty,ET=Object.prototype.propertyIsEnumerable,Wu=(r,e,t)=>e in r?mT(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,OT=(r,e)=>{for(var t in e||(e={}))$T.call(e,t)&&Wu(r,t,e[t]);if(Hu)for(var t of Hu(e))ET.call(e,t)&&Wu(r,t,e[t]);return r},AT=(r,e)=>bT(r,wT(e));function ST(r){try{return JSON.parse(r)}catch{return r}}function TT(r){return Object.entries(r).reduce((e,[t,n])=>AT(OT({},e),{[t]:ST(n)}),{})}var IT=Object.defineProperty,xT=Object.defineProperties,PT=Object.getOwnPropertyDescriptors,zu=Object.getOwnPropertySymbols,FT=Object.prototype.hasOwnProperty,RT=Object.prototype.propertyIsEnumerable,Xu=(r,e,t)=>e in r?IT(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Yu=(r,e)=>{for(var t in e||(e={}))FT.call(e,t)&&Xu(r,t,e[t]);if(zu)for(var t of zu(e))RT.call(e,t)&&Xu(r,t,e[t]);return r},Ku=(r,e)=>xT(r,PT(e));function Zu(r){var e;const t=TT(r),n=t.auto_inject===void 0?!0:t.auto_inject,i=(e=t.display_on)!=null?e:[],a=t.first_option==="autodeliver";return Ku(Yu({},_T(t,["display_on","first_option"])),{auto_inject:n,valid_pages:i,is_subscription_first:a,autoInject:n,validPages:i,isSubscriptionFirst:a})}function Ju(r){var e;const t=((e=r.subscription_options)==null?void 0:e.storefront_purchase_options)==="subscription_only";return Ku(Yu({},r),{is_subscription_only:t,isSubscriptionOnly:t})}function MT(r){return r.map(e=>{const t={};return Object.entries(e).forEach(([n,i])=>{t[n]=Ju(i)}),t})}const Bt="2020-12",BT={store_currency:{currency_code:"USD",currency_symbol:"$",decimal_separator:".",thousands_separator:",",currency_symbol_location:"left"}},Tr=new Map;function Ut(r,e){return Tr.has(r)||Tr.set(r,e()),Tr.get(r)}const si=async r=>{const{product:e}=await Ut(`product.${r}`,()=>Jr("get",`/product/${Bt}/${r}.json`));return Ju(e)},Qu=async()=>await Ut("storeSettings",()=>Jr("get",`/${Bt}/store_settings.json`).catch(()=>BT)),ef=async()=>{const{widget_settings:r}=await Ut("widgetSettings",()=>Jr("get",`/${Bt}/widget_settings.json`));return Zu(r)},rf=async()=>{const{products:r,widget_settings:e,store_settings:t,meta:n}=await Ut("productsAndSettings",()=>Jr("get",`/product/${Bt}/products.json`));return n?.status==="error"?Promise.reject(n.message):{products:MT(r),widget_settings:Zu(e),store_settings:t??{}}},UT=async()=>{const{products:r}=await rf();return r},DT=async r=>{const[e,t,n]=await Promise.all([si(r),Qu(),ef()]);return{product:e,store_settings:t,widget_settings:n,storeSettings:t,widgetSettings:n}},tf=async r=>{const{bundle_product:e}=await si(r);return e},nf=()=>Array.from(Tr.keys()).forEach(r=>Tr.delete(r));var NT=Object.freeze({__proto__:null,getProduct:si,getStoreSettings:Qu,getWidgetSettings:ef,getProductsAndSettings:rf,getProducts:UT,getProductAndSettings:DT,getBundleSettings:tf,resetCache:nf});const af="/bundling-storefront-manager";function CT(){return Math.ceil(Date.now()/1e3)}async function LT(){try{const{timestamp:r}=await Tn("get",`${af}/t`,{headers:{"X-Recharge-App":"storefront-client"}});return r}catch(r){return console.error(`Fetch failed: ${r}. Using client-side date.`),CT()}}const jT=async r=>{const e=Sn();if(!await of(r))throw new Error("Bundle selection is invalid.");const t=await LT(),n=Au({variantId:r.externalVariantId,version:t,items:r.selections.map(i=>({collectionId:i.collectionId,productId:i.externalProductId,variantId:i.externalVariantId,quantity:i.quantity,sku:""}))});try{const i=await Tn("post",`${af}/api/v1/bundles`,{data:{bundle:n},headers:{Origin:`https://${e.storeIdentifier}`}});if(!i.id||i.code!==200)throw new Error(`1: failed generating rb_id: ${JSON.stringify(i)}`);return i.id}catch(i){throw new Error(`2: failed generating rb_id ${i}`)}},of=async r=>{try{const e=await tf(r.externalProductId);return!!r&&!!e}catch{return console.error("Error fetching bundle settings"),!1}};var kT=Object.freeze({__proto__:null,getBundleId:jT,validateBundle:of});async function VT(r){const{charge:e}=await T("get","/charges",{id:r});return e}function qT(r){return T("get","/charges",{query:r})}async function GT(r,e){const{charge:t}=await T("post",`/charges/${r}/apply_discount`,{data:e});return t}async function HT(r){const{charge:e}=await T("post",`/charges/${r}/remove_discount`);return e}async function WT(r){const{charge:e}=await T("post",`/charges/${r}/skip`);return e}async function zT(r){const{charge:e}=await T("post",`/charges/${r}/unskip`);return e}async function XT(r,e){const{charge:t}=await T("post",`/charges/${r}/refund`,{data:e});return t}async function YT(r){const{charge:e}=await T("post",`/charges/${r}/process`);return e}async function KT(r){const{charge:e}=await T("post",`/charges/${r}/capture_payment`);return e}var ZT=Object.freeze({__proto__:null,getCharge:VT,listCharges:qT,applyDiscount:GT,removeDiscount:HT,skipCharge:WT,unskipCharge:zT,refundCharge:XT,processCharge:YT,captureCharge:KT});async function JT(r){const{membership:e}=await T("get","/memberships",{id:r});return e}function QT(r){return T("get","/memberships",{query:r})}async function e2(r,e){const{membership:t}=await T("post",`/memberships/${r}/cancel`,{data:e});return t}async function r2(r,e){const{membership:t}=await T("post",`/memberships/${r}/activate`,{data:e});return t}var t2=Object.freeze({__proto__:null,getMembership:JT,listMemberships:QT,cancelMembership:e2,activateMembership:r2}),n2=Object.freeze({__proto__:null,getOnetime:async r=>{const{onetime:e}=await T("get","/onetimes",{id:r});return e},listOnetimes:r=>T("get","/onetimes",{query:r}),createOnetime:async r=>{const{onetime:e}=await T("post","/onetimes",{data:r});return e},updateOnetime:async(r,e)=>{const{onetime:t}=await T("put","/onetimes",{id:r,data:e});return t},deleteOnetime:r=>T("delete","/onetime",{id:r})}),i2=Object.freeze({__proto__:null,getOrder:async r=>{const{order:e}=await T("get","/orders",{id:r});return e},listOrders:r=>T("get","/orders",{query:r})}),a2=Object.freeze({__proto__:null,getSubscription:async r=>{const{subscription:e}=await T("get","/subscriptions",{id:r});return e},listSubscriptions:r=>T("get","/subscriptions",{query:r}),createSubscription:async r=>{const{subscription:e}=await T("post","/subscriptions",{data:r});return e},updateSubscription:async(r,e,t)=>{const{subscription:n}=await T("put","/subscriptions",{id:r,data:e,query:t});return n},updateSubscriptionChargeDate:async(r,e)=>{const{subscription:t}=await T("post",`/subscriptions/${r}/set_next_charge_date`,{data:{date:e}});return t},updateSubscriptionAddress:async(r,e)=>{const{subscription:t}=await T("post",`/subscriptions/${r}/change_address`,{data:{address_id:e}});return t},cancelSubscription:async(r,e)=>{const{subscription:t}=await T("post",`/subscriptions/${r}/cancel`,{data:e});return t},activateSubscription:async r=>{const{subscription:e}=await T("post",`/subscriptions/${r}/activate`);return e}});const o2={get(r,e){return Se("get",r,e)},post(r,e){return Se("post",r,e)},put(r,e){return Se("put",r,e)},delete(r,e){return Se("delete",r,e)}};function u2(r){var e,t;if(r)return r;if((e=window?.Shopify)!=null&&e.shop)return window.Shopify.shop;let n=window?.domain;if(!n){const i=(t=location?.href.match(/(?:http[s]*:\/\/)*(.*?)\.(?=admin\.rechargeapps\.com)/i))==null?void 0:t[1].replace(/-sp$/,"");i&&(n=`${i}.myshopify.com`)}if(n)return n;throw new Error("No storeIdentifier was passed into init.")}function f2(r={}){const e=r;Il({storeIdentifier:u2(r.storeIdentifier),environment:e.environment?e.environment:"prod",apiKey:e.apiKey?e.apiKey:""}),nf()}const uf={init:f2,api:o2,address:ql,auth:Gl,bundle:kT,charge:ZT,cdn:NT,memberships:t2,onetime:n2,order:i2,subscription:a2};try{uf.init()}catch{}return uf});
|
|
23
|
+
*/(function(e,t){typeof Kb=="function"&&!0&&r&&r.exports?r.exports=t():(e.dcodeIO=e.dcodeIO||{}).Long=t()})(te,function(){function e(l,u,p){this.low=l|0,this.high=u|0,this.unsigned=!!p}e.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=function(u){return(u&&u.__isLong__)===!0};var t={},n={};e.fromInt=function(u,p){var d,_;return p?(u=u>>>0,0<=u&&u<256&&(_=n[u],_)?_:(d=new e(u,(u|0)<0?-1:0,!0),0<=u&&u<256&&(n[u]=d),d)):(u=u|0,-128<=u&&u<128&&(_=t[u],_)?_:(d=new e(u,u<0?-1:0,!1),-128<=u&&u<128&&(t[u]=d),d))},e.fromNumber=function(u,p){return p=!!p,isNaN(u)||!isFinite(u)?e.ZERO:!p&&u<=-f?e.MIN_VALUE:!p&&u+1>=f?e.MAX_VALUE:p&&u>=s?e.MAX_UNSIGNED_VALUE:u<0?e.fromNumber(-u,p).negate():new e(u%o|0,u/o|0,p)},e.fromBits=function(u,p,d){return new e(u,p,d)},e.fromString=function(u,p,d){if(u.length===0)throw Error("number format error: empty string");if(u==="NaN"||u==="Infinity"||u==="+Infinity"||u==="-Infinity")return e.ZERO;if(typeof p=="number"&&(d=p,p=!1),d=d||10,d<2||36<d)throw Error("radix out of range: "+d);var _;if((_=u.indexOf("-"))>0)throw Error('number format error: interior "-" character: '+u);if(_===0)return e.fromString(u.substring(1),p,d).negate();for(var E=e.fromNumber(Math.pow(d,8)),$=e.ZERO,b=0;b<u.length;b+=8){var S=Math.min(8,u.length-b),h=parseInt(u.substring(b,b+S),d);if(S<8){var A=e.fromNumber(Math.pow(d,S));$=$.multiply(A).add(e.fromNumber(h))}else $=$.multiply(E),$=$.add(e.fromNumber(h))}return $.unsigned=p,$},e.fromValue=function(u){return u instanceof e?u:typeof u=="number"?e.fromNumber(u):typeof u=="string"?e.fromString(u):new e(u.low,u.high,u.unsigned)};var i=1<<16,a=1<<24,o=i*i,s=o*o,f=s/2,c=e.fromInt(a);return e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*o+(this.low>>>0):this.high*o+(this.low>>>0)},e.prototype.toString=function(u){if(u=u||10,u<2||36<u)throw RangeError("radix out of range: "+u);if(this.isZero())return"0";var p;if(this.isNegative())if(this.equals(e.MIN_VALUE)){var d=e.fromNumber(u),_=this.divide(d);return p=_.multiply(d).subtract(this),_.toString(u)+p.toInt().toString(u)}else return"-"+this.negate().toString(u);var E=e.fromNumber(Math.pow(u,6),this.unsigned);p=this;for(var $="";;){var b=p.divide(E),S=p.subtract(b.multiply(E)).toInt()>>>0,h=S.toString(u);if(p=b,p.isZero())return h+$;for(;h.length<6;)h="0"+h;$=""+h+$}},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(e.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var u=this.high!=0?this.high:this.low,p=31;p>0&&(u&1<<p)==0;p--);return this.high!=0?p+33:p+1},e.prototype.isZero=function(){return this.high===0&&this.low===0},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isOdd=function(){return(this.low&1)===1},e.prototype.isEven=function(){return(this.low&1)===0},e.prototype.equals=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.unsigned!==u.unsigned&&this.high>>>31===1&&u.high>>>31===1?!1:this.high===u.high&&this.low===u.low},e.eq=e.prototype.equals,e.prototype.notEquals=function(u){return!this.equals(u)},e.neq=e.prototype.notEquals,e.prototype.lessThan=function(u){return this.compare(u)<0},e.prototype.lt=e.prototype.lessThan,e.prototype.lessThanOrEqual=function(u){return this.compare(u)<=0},e.prototype.lte=e.prototype.lessThanOrEqual,e.prototype.greaterThan=function(u){return this.compare(u)>0},e.prototype.gt=e.prototype.greaterThan,e.prototype.greaterThanOrEqual=function(u){return this.compare(u)>=0},e.prototype.gte=e.prototype.greaterThanOrEqual,e.prototype.compare=function(u){if(e.isLong(u)||(u=e.fromValue(u)),this.equals(u))return 0;var p=this.isNegative(),d=u.isNegative();return p&&!d?-1:!p&&d?1:this.unsigned?u.high>>>0>this.high>>>0||u.high===this.high&&u.low>>>0>this.low>>>0?-1:1:this.subtract(u).isNegative()?-1:1},e.prototype.negate=function(){return!this.unsigned&&this.equals(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=e.prototype.negate,e.prototype.add=function(u){e.isLong(u)||(u=e.fromValue(u));var p=this.high>>>16,d=this.high&65535,_=this.low>>>16,E=this.low&65535,$=u.high>>>16,b=u.high&65535,S=u.low>>>16,h=u.low&65535,A=0,x=0,R=0,m=0;return m+=E+h,R+=m>>>16,m&=65535,R+=_+S,x+=R>>>16,R&=65535,x+=d+b,A+=x>>>16,x&=65535,A+=p+$,A&=65535,e.fromBits(R<<16|m,A<<16|x,this.unsigned)},e.prototype.subtract=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.add(u.negate())},e.prototype.sub=e.prototype.subtract,e.prototype.multiply=function(u){if(this.isZero()||(e.isLong(u)||(u=e.fromValue(u)),u.isZero()))return e.ZERO;if(this.equals(e.MIN_VALUE))return u.isOdd()?e.MIN_VALUE:e.ZERO;if(u.equals(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return u.isNegative()?this.negate().multiply(u.negate()):this.negate().multiply(u).negate();if(u.isNegative())return this.multiply(u.negate()).negate();if(this.lessThan(c)&&u.lessThan(c))return e.fromNumber(this.toNumber()*u.toNumber(),this.unsigned);var p=this.high>>>16,d=this.high&65535,_=this.low>>>16,E=this.low&65535,$=u.high>>>16,b=u.high&65535,S=u.low>>>16,h=u.low&65535,A=0,x=0,R=0,m=0;return m+=E*h,R+=m>>>16,m&=65535,R+=_*h,x+=R>>>16,R&=65535,R+=E*S,x+=R>>>16,R&=65535,x+=d*h,A+=x>>>16,x&=65535,x+=_*S,A+=x>>>16,x&=65535,x+=E*b,A+=x>>>16,x&=65535,A+=p*h+d*S+_*b+E*$,A&=65535,e.fromBits(R<<16|m,A<<16|x,this.unsigned)},e.prototype.mul=e.prototype.multiply,e.prototype.divide=function(u){if(e.isLong(u)||(u=e.fromValue(u)),u.isZero())throw new Error("division by zero");if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var p,d,_;if(this.equals(e.MIN_VALUE)){if(u.equals(e.ONE)||u.equals(e.NEG_ONE))return e.MIN_VALUE;if(u.equals(e.MIN_VALUE))return e.ONE;var E=this.shiftRight(1);return p=E.divide(u).shiftLeft(1),p.equals(e.ZERO)?u.isNegative()?e.ONE:e.NEG_ONE:(d=this.subtract(u.multiply(p)),_=p.add(d.divide(u)),_)}else if(u.equals(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return u.isNegative()?this.negate().divide(u.negate()):this.negate().divide(u).negate();if(u.isNegative())return this.divide(u.negate()).negate();for(_=e.ZERO,d=this;d.greaterThanOrEqual(u);){p=Math.max(1,Math.floor(d.toNumber()/u.toNumber()));for(var $=Math.ceil(Math.log(p)/Math.LN2),b=$<=48?1:Math.pow(2,$-48),S=e.fromNumber(p),h=S.multiply(u);h.isNegative()||h.greaterThan(d);)p-=b,S=e.fromNumber(p,this.unsigned),h=S.multiply(u);S.isZero()&&(S=e.ONE),_=_.add(S),d=d.subtract(h)}return _},e.prototype.div=e.prototype.divide,e.prototype.modulo=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.subtract(this.divide(u).multiply(u))},e.prototype.mod=e.prototype.modulo,e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.and=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low&u.low,this.high&u.high,this.unsigned)},e.prototype.or=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low|u.low,this.high|u.high,this.unsigned)},e.prototype.xor=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low^u.low,this.high^u.high,this.unsigned)},e.prototype.shiftLeft=function(u){return e.isLong(u)&&(u=u.toInt()),(u&=63)===0?this:u<32?e.fromBits(this.low<<u,this.high<<u|this.low>>>32-u,this.unsigned):e.fromBits(0,this.low<<u-32,this.unsigned)},e.prototype.shl=e.prototype.shiftLeft,e.prototype.shiftRight=function(u){return e.isLong(u)&&(u=u.toInt()),(u&=63)===0?this:u<32?e.fromBits(this.low>>>u|this.high<<32-u,this.high>>u,this.unsigned):e.fromBits(this.high>>u-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=e.prototype.shiftRight,e.prototype.shiftRightUnsigned=function(u){if(e.isLong(u)&&(u=u.toInt()),u&=63,u===0)return this;var p=this.high;if(u<32){var d=this.low;return e.fromBits(d>>>u|p<<32-u,p>>>u,this.unsigned)}else return u===32?e.fromBits(p,0,this.unsigned):e.fromBits(p>>>u-32,0,this.unsigned)},e.prototype.shru=e.prototype.shiftRightUnsigned,e.prototype.toSigned=function(){return this.unsigned?new e(this.low,this.high,!1):this},e.prototype.toUnsigned=function(){return this.unsigned?this:new e(this.low,this.high,!0)},e})})(ri),Object.defineProperty(dt,"__esModule",{value:!0}),dt.Hyper=void 0;var Zb=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Lo=function r(e,t,n){e===null&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,t);if(i===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:r(a,t,n)}else{if("value"in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(n)}},Jb=ri.exports,dr=jo(Jb),Qb=M,ew=jo(Qb);function jo(r){return r&&r.__esModule?r:{default:r}}function rw(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function tw(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function nw(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}var vr=dt.Hyper=function(r){nw(e,r),Zb(e,null,[{key:"read",value:function(n){var i=n.readInt32BE(),a=n.readInt32BE();return this.fromBits(a,i)}},{key:"write",value:function(n,i){if(!(n instanceof this))throw new Error("XDR Write Error: "+n+" is not a Hyper");i.writeInt32BE(n.high),i.writeInt32BE(n.low)}},{key:"fromString",value:function(n){if(!/^-?\d+$/.test(n))throw new Error("Invalid hyper string: "+n);var i=Lo(e.__proto__||Object.getPrototypeOf(e),"fromString",this).call(this,n,!1);return new this(i.low,i.high)}},{key:"fromBits",value:function(n,i){var a=Lo(e.__proto__||Object.getPrototypeOf(e),"fromBits",this).call(this,n,i,!1);return new this(a.low,a.high)}},{key:"isValid",value:function(n){return n instanceof this}}]);function e(t,n){return rw(this,e),tw(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!1))}return e}(dr.default);(0,ew.default)(vr),vr.MAX_VALUE=new vr(dr.default.MAX_VALUE.low,dr.default.MAX_VALUE.high),vr.MIN_VALUE=new vr(dr.default.MIN_VALUE.low,dr.default.MIN_VALUE.high);var Pe={};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.UnsignedInt=void 0;var iw=et,ko=qo(iw),aw=M,ow=qo(aw);function qo(r){return r&&r.__esModule?r:{default:r}}var gr=Pe.UnsignedInt={read:function(e){return e.readUInt32BE()},write:function(e,t){if(!(0,ko.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");if(e<0)throw new Error("XDR Write Error: negative number "+e);t.writeUInt32BE(e)},isValid:function(e){return!(0,ko.default)(e)||Math.floor(e)!==e?!1:e>=gr.MIN_VALUE&&e<=gr.MAX_VALUE}};gr.MAX_VALUE=Math.pow(2,32)-1,gr.MIN_VALUE=0,(0,ow.default)(gr);var vt={};Object.defineProperty(vt,"__esModule",{value:!0}),vt.UnsignedHyper=void 0;var uw=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Vo=function r(e,t,n){e===null&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,t);if(i===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:r(a,t,n)}else{if("value"in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(n)}},sw=ri.exports,_r=Go(sw),fw=M,cw=Go(fw);function Go(r){return r&&r.__esModule?r:{default:r}}function lw(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function pw(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function hw(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}var mr=vt.UnsignedHyper=function(r){hw(e,r),uw(e,null,[{key:"read",value:function(n){var i=n.readInt32BE(),a=n.readInt32BE();return this.fromBits(a,i)}},{key:"write",value:function(n,i){if(!(n instanceof this))throw new Error("XDR Write Error: "+n+" is not an UnsignedHyper");i.writeInt32BE(n.high),i.writeInt32BE(n.low)}},{key:"fromString",value:function(n){if(!/^\d+$/.test(n))throw new Error("Invalid hyper string: "+n);var i=Vo(e.__proto__||Object.getPrototypeOf(e),"fromString",this).call(this,n,!0);return new this(i.low,i.high)}},{key:"fromBits",value:function(n,i){var a=Vo(e.__proto__||Object.getPrototypeOf(e),"fromBits",this).call(this,n,i,!0);return new this(a.low,a.high)}},{key:"isValid",value:function(n){return n instanceof this}}]);function e(t,n){return lw(this,e),pw(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!0))}return e}(_r.default);(0,cw.default)(mr),mr.MAX_VALUE=new mr(_r.default.MAX_UNSIGNED_VALUE.low,_r.default.MAX_UNSIGNED_VALUE.high),mr.MIN_VALUE=new mr(_r.default.MIN_VALUE.low,_r.default.MIN_VALUE.high);var gt={};Object.defineProperty(gt,"__esModule",{value:!0}),gt.Float=void 0;var yw=et,Ho=Wo(yw),dw=M,vw=Wo(dw);function Wo(r){return r&&r.__esModule?r:{default:r}}var gw=gt.Float={read:function(e){return e.readFloatBE()},write:function(e,t){if(!(0,Ho.default)(e))throw new Error("XDR Write Error: not a number");t.writeFloatBE(e)},isValid:function(e){return(0,Ho.default)(e)}};(0,vw.default)(gw);var _t={};Object.defineProperty(_t,"__esModule",{value:!0}),_t.Double=void 0;var _w=et,zo=Xo(_w),mw=M,bw=Xo(mw);function Xo(r){return r&&r.__esModule?r:{default:r}}var ww=_t.Double={read:function(e){return e.readDoubleBE()},write:function(e,t){if(!(0,zo.default)(e))throw new Error("XDR Write Error: not a number");t.writeDoubleBE(e)},isValid:function(e){return(0,zo.default)(e)}};(0,bw.default)(ww);var mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.Quadruple=void 0;var $w=M,Ew=Ow($w);function Ow(r){return r&&r.__esModule?r:{default:r}}var Aw=mt.Quadruple={read:function(){throw new Error("XDR Read Error: quadruple not supported")},write:function(){throw new Error("XDR Write Error: quadruple not supported")},isValid:function(){return!1}};(0,Ew.default)(Aw);var br={},Sw=se,Iw=H,Tw="[object Boolean]";function xw(r){return r===!0||r===!1||Iw(r)&&Sw(r)==Tw}var Pw=xw;Object.defineProperty(br,"__esModule",{value:!0}),br.Bool=void 0;var Fw=Pw,Rw=Ko(Fw),Yo=ue,Mw=M,Bw=Ko(Mw);function Ko(r){return r&&r.__esModule?r:{default:r}}var Uw=br.Bool={read:function(e){var t=Yo.Int.read(e);switch(t){case 0:return!1;case 1:return!0;default:throw new Error("XDR Read Error: Got "+t+" when trying to read a bool")}},write:function(e,t){var n=e?1:0;return Yo.Int.write(n,t)},isValid:function(e){return(0,Rw.default)(e)}};(0,Bw.default)(Uw);var bt={},Dw=se,Nw=C,Cw=H,Lw="[object String]";function jw(r){return typeof r=="string"||!Nw(r)&&Cw(r)&&Dw(r)==Lw}var Zo=jw;Object.defineProperty(bt,"__esModule",{value:!0}),bt.String=void 0;var kw=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),qw=Zo,Jo=ti(qw),Vw=C,Gw=ti(Vw),Qo=ue,Hw=Pe,eu=Te,Ww=M,zw=ti(Ww);function ti(r){return r&&r.__esModule?r:{default:r}}function Xw(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var Yw=bt.String=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Hw.UnsignedInt.MAX_VALUE;Xw(this,r),this._maxLength=e}return kw(r,[{key:"read",value:function(t){var n=Qo.Int.read(t);if(n>this._maxLength)throw new Error("XDR Read Error: Saw "+n+" length String,"+("max allowed is "+this._maxLength));var i=(0,eu.calculatePadding)(n),a=t.slice(n);return(0,eu.slicePadding)(t,i),a.buffer()}},{key:"readString",value:function(t){return this.read(t).toString("utf8")}},{key:"write",value:function(t,n){if(t.length>this._maxLength)throw new Error("XDR Write Error: Got "+t.length+" bytes,"+("max allows is "+this._maxLength));var i=void 0;(0,Jo.default)(t)?i=y.from(t,"utf8"):i=y.from(t),Qo.Int.write(i.length,n),n.writeBufferPadded(i)}},{key:"isValid",value:function(t){var n=void 0;if((0,Jo.default)(t))n=y.from(t,"utf8");else if((0,Gw.default)(t)||y.isBuffer(t))n=y.from(t);else return!1;return n.length<=this._maxLength}}]),r}();(0,zw.default)(Yw.prototype);var wt={};Object.defineProperty(wt,"__esModule",{value:!0}),wt.Opaque=void 0;var Kw=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),ru=Te,Zw=M,Jw=Qw(Zw);function Qw(r){return r&&r.__esModule?r:{default:r}}function e1(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var r1=wt.Opaque=function(){function r(e){e1(this,r),this._length=e,this._padding=(0,ru.calculatePadding)(e)}return Kw(r,[{key:"read",value:function(t){var n=t.slice(this._length);return(0,ru.slicePadding)(t,this._padding),n.buffer()}},{key:"write",value:function(t,n){if(t.length!==this._length)throw new Error("XDR Write Error: Got "+t.length+" bytes, expected "+this._length);n.writeBufferPadded(t)}},{key:"isValid",value:function(t){return y.isBuffer(t)&&t.length===this._length}}]),r}();(0,Jw.default)(r1.prototype);var $t={};Object.defineProperty($t,"__esModule",{value:!0}),$t.VarOpaque=void 0;var t1=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),tu=ue,n1=Pe,nu=Te,i1=M,a1=o1(i1);function o1(r){return r&&r.__esModule?r:{default:r}}function u1(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var s1=$t.VarOpaque=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:n1.UnsignedInt.MAX_VALUE;u1(this,r),this._maxLength=e}return t1(r,[{key:"read",value:function(t){var n=tu.Int.read(t);if(n>this._maxLength)throw new Error("XDR Read Error: Saw "+n+" length VarOpaque,"+("max allowed is "+this._maxLength));var i=(0,nu.calculatePadding)(n),a=t.slice(n);return(0,nu.slicePadding)(t,i),a.buffer()}},{key:"write",value:function(t,n){if(t.length>this._maxLength)throw new Error("XDR Write Error: Got "+t.length+" bytes,"+("max allows is "+this._maxLength));tu.Int.write(t.length,n),n.writeBufferPadded(t)}},{key:"isValid",value:function(t){return y.isBuffer(t)&&t.length<=this._maxLength}}]),r}();(0,a1.default)(s1.prototype);var Et={},Fe={exports:{}};function f1(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var iu=f1,c1=tt;function l1(r){return typeof r=="function"?r:c1}var au=l1,p1=iu,h1=Nn,y1=au,d1=C;function v1(r,e){var t=d1(r)?p1:h1;return t(r,y1(e))}var g1=v1;(function(r){r.exports=g1})(Fe);var _1=/\s/;function m1(r){for(var e=r.length;e--&&_1.test(r.charAt(e)););return e}var b1=m1,w1=b1,$1=/^\s+/;function E1(r){return r&&r.slice(0,w1(r)+1).replace($1,"")}var O1=E1,A1=O1,ou=ve,S1=pt,uu=0/0,I1=/^[-+]0x[0-9a-f]+$/i,T1=/^0b[01]+$/i,x1=/^0o[0-7]+$/i,P1=parseInt;function F1(r){if(typeof r=="number")return r;if(S1(r))return uu;if(ou(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=ou(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=A1(r);var t=T1.test(r);return t||x1.test(r)?P1(r.slice(2),t?2:8):I1.test(r)?uu:+r}var R1=F1,M1=R1,su=1/0,B1=17976931348623157e292;function U1(r){if(!r)return r===0?r:0;if(r=M1(r),r===su||r===-su){var e=r<0?-1:1;return e*B1}return r===r?r:0}var D1=U1,N1=D1;function C1(r){var e=N1(r),t=e%1;return e===e?t?e-t:e:0}var L1=C1,j1=Ga,k1=au,q1=L1,V1=9007199254740991,ni=4294967295,G1=Math.min;function H1(r,e){if(r=q1(r),r<1||r>V1)return[];var t=ni,n=G1(r,ni);e=k1(e),r-=ni;for(var i=j1(n,e);++t<r;)e(t);return i}var fu=H1;Object.defineProperty(Et,"__esModule",{value:!0}),Et.Array=void 0;var W1=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),z1=Qn,X1=wr(z1),Y1=Fe.exports,K1=wr(Y1),Z1=fu,J1=wr(Z1),Q1=C,cu=wr(Q1),e$=M,r$=wr(e$);function wr(r){return r&&r.__esModule?r:{default:r}}function t$(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var n$=Et.Array=function(){function r(e,t){t$(this,r),this._childType=e,this._length=t}return W1(r,[{key:"read",value:function(t){var n=this;return(0,J1.default)(this._length,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,cu.default)(t))throw new Error("XDR Write Error: value is not array");if(t.length!==this._length)throw new Error("XDR Write Error: Got array of size "+t.length+","+("expected "+this._length));(0,K1.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,cu.default)(t)||t.length!==this._length?!1:(0,X1.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,r$.default)(n$.prototype);var Ot={};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.VarArray=void 0;var i$=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),a$=Qn,o$=$r(a$),u$=Fe.exports,s$=$r(u$),f$=fu,c$=$r(f$),l$=C,lu=$r(l$),p$=Pe,pu=ue,h$=M,y$=$r(h$);function $r(r){return r&&r.__esModule?r:{default:r}}function d$(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var v$=Ot.VarArray=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p$.UnsignedInt.MAX_VALUE;d$(this,r),this._childType=e,this._maxLength=t}return i$(r,[{key:"read",value:function(t){var n=this,i=pu.Int.read(t);if(i>this._maxLength)throw new Error("XDR Read Error: Saw "+i+" length VarArray,"+("max allowed is "+this._maxLength));return(0,c$.default)(i,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,lu.default)(t))throw new Error("XDR Write Error: value is not array");if(t.length>this._maxLength)throw new Error("XDR Write Error: Got array of size "+t.length+","+("max allowed is "+this._maxLength));pu.Int.write(t.length,n),(0,s$.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,lu.default)(t)||t.length>this._maxLength?!1:(0,o$.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,y$.default)(v$.prototype);var At={};function g$(r){return r===null}var _$=g$;function m$(r){return r===void 0}var Er=m$;Object.defineProperty(At,"__esModule",{value:!0}),At.Option=void 0;var b$=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),w$=_$,hu=ii(w$),$$=Er,yu=ii($$),du=br,E$=M,O$=ii(E$);function ii(r){return r&&r.__esModule?r:{default:r}}function A$(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var S$=At.Option=function(){function r(e){A$(this,r),this._childType=e}return b$(r,[{key:"read",value:function(t){if(du.Bool.read(t))return this._childType.read(t)}},{key:"write",value:function(t,n){var i=!((0,hu.default)(t)||(0,yu.default)(t));du.Bool.write(i,n),i&&this._childType.write(t,n)}},{key:"isValid",value:function(t){return(0,hu.default)(t)||(0,yu.default)(t)?!0:this._childType.isValid(t)}}]),r}();(0,O$.default)(S$.prototype);var Or={};Object.defineProperty(Or,"__esModule",{value:!0}),Or.Void=void 0;var I$=Er,vu=gu(I$),T$=M,x$=gu(T$);function gu(r){return r&&r.__esModule?r:{default:r}}var P$=Or.Void={read:function(){},write:function(e){if(!(0,vu.default)(e))throw new Error("XDR Write Error: trying to write value to a void slot")},isValid:function(e){return(0,vu.default)(e)}};(0,x$.default)(P$);var St={},F$=ht;function R$(r,e){return F$(e,function(t){return r[t]})}var M$=R$,B$=M$,U$=He;function D$(r){return r==null?[]:B$(r,U$(r))}var N$=D$;Object.defineProperty(St,"__esModule",{value:!0}),St.Enum=void 0;var C$=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),L$=Fe.exports,j$=ai(L$),k$=N$,q$=ai(k$),_u=ue,V$=M,G$=ai(V$);function ai(r){return r&&r.__esModule?r:{default:r}}function H$(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function W$(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function mu(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var z$=St.Enum=function(){function r(e,t){mu(this,r),this.name=e,this.value=t}return C$(r,null,[{key:"read",value:function(t){var n=_u.Int.read(t);if(!this._byValue.has(n))throw new Error("XDR Read Error: Unknown "+this.enumName+" member for value "+n);return this._byValue.get(n)}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: Unknown "+t+" is not a "+this.enumName);_u.Int.write(t.value,n)}},{key:"isValid",value:function(t){return t instanceof this}},{key:"members",value:function(){return this._members}},{key:"values",value:function(){return(0,q$.default)(this._members)}},{key:"fromName",value:function(t){var n=this._members[t];if(!n)throw new Error(t+" is not a member of "+this.enumName);return n}},{key:"fromValue",value:function(t){var n=this._byValue.get(t);if(!n)throw new Error(t+" is not a value of any member of "+this.enumName);return n}},{key:"create",value:function(t,n,i){var a=function(o){W$(s,o);function s(){return mu(this,s),H$(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments))}return s}(r);return a.enumName=n,t.results[n]=a,a._members={},a._byValue=new Map,(0,j$.default)(i,function(o,s){var f=new a(s,o);a._members[s]=f,a._byValue.set(o,f),a[s]=function(){return f}}),a}}]),r}();(0,G$.default)(z$);var It={},X$=Nn,Y$=cr;function K$(r,e){var t=-1,n=Y$(r)?Array(r.length):[];return X$(r,function(i,a,o){n[++t]=e(i,a,o)}),n}var Z$=K$,J$=ht,Q$=Mo,eE=Z$,rE=C;function tE(r,e){var t=rE(r)?J$:eE;return t(r,Q$(e))}var nE=tE;function iE(r){for(var e=-1,t=r==null?0:r.length,n={};++e<t;){var i=r[e];n[i[0]]=i[1]}return n}var aE=iE,Ar={};Object.defineProperty(Ar,"__esModule",{value:!0});var oE=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();function uE(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}Ar.Reference=function(){function r(){uE(this,r)}return oE(r,[{key:"resolve",value:function(){throw new Error("implement resolve in child class")}}]),r}(),Object.defineProperty(It,"__esModule",{value:!0}),It.Struct=void 0;var Tt=function(){function r(e,t){var n=[],i=!0,a=!1,o=void 0;try{for(var s=e[Symbol.iterator](),f;!(i=(f=s.next()).done)&&(n.push(f.value),!(t&&n.length===t));i=!0);}catch(c){a=!0,o=c}finally{try{!i&&s.return&&s.return()}finally{if(a)throw o}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),sE=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),fE=Fe.exports,bu=Sr(fE),cE=nE,lE=Sr(cE),pE=Er,hE=Sr(pE),yE=aE,dE=Sr(yE),vE=Ar,gE=M,_E=Sr(gE);function Sr(r){return r&&r.__esModule?r:{default:r}}function mE(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function bE(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function wu(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var wE=It.Struct=function(){function r(e){wu(this,r),this._attributes=e||{}}return sE(r,null,[{key:"read",value:function(t){var n=(0,lE.default)(this._fields,function(i){var a=Tt(i,2),o=a[0],s=a[1],f=s.read(t);return[o,f]});return new this((0,dE.default)(n))}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: "+t+" is not a "+this.structName);(0,bu.default)(this._fields,function(i){var a=Tt(i,2),o=a[0],s=a[1],f=t._attributes[o];s.write(f,n)})}},{key:"isValid",value:function(t){return t instanceof this}},{key:"create",value:function(t,n,i){var a=function(o){bE(s,o);function s(){return wu(this,s),mE(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments))}return s}(r);return a.structName=n,t.results[n]=a,a._fields=i.map(function(o){var s=Tt(o,2),f=s[0],c=s[1];return c instanceof vE.Reference&&(c=c.resolve(t)),[f,c]}),(0,bu.default)(a._fields,function(o){var s=Tt(o,1),f=s[0];a.prototype[f]=$E(f)}),a}}]),r}();(0,_E.default)(wE);function $E(r){return function(t){return(0,hE.default)(t)||(this._attributes[r]=t),this._attributes[r]}}var xt={};Object.defineProperty(xt,"__esModule",{value:!0}),xt.Union=void 0;var EE=function(){function r(e,t){var n=[],i=!0,a=!1,o=void 0;try{for(var s=e[Symbol.iterator](),f;!(i=(f=s.next()).done)&&(n.push(f.value),!(t&&n.length===t));i=!0);}catch(c){a=!0,o=c}finally{try{!i&&s.return&&s.return()}finally{if(a)throw o}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),OE=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),AE=Fe.exports,Pt=Rt(AE),SE=Er,$u=Rt(SE),IE=Zo,Eu=Rt(IE),Ft=Or,oi=Ar,TE=M,xE=Rt(TE);function Rt(r){return r&&r.__esModule?r:{default:r}}function PE(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function FE(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function Ou(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var RE=xt.Union=function(){function r(e,t){Ou(this,r),this.set(e,t)}return OE(r,[{key:"set",value:function(t,n){(0,Eu.default)(t)&&(t=this.constructor._switchOn.fromName(t)),this._switch=t,this._arm=this.constructor.armForSwitch(this._switch),this._armType=this.constructor.armTypeForArm(this._arm),this._value=n}},{key:"get",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._arm;if(this._arm!==Ft.Void&&this._arm!==t)throw new Error(t+" not set");return this._value}},{key:"switch",value:function(){return this._switch}},{key:"arm",value:function(){return this._arm}},{key:"armType",value:function(){return this._armType}},{key:"value",value:function(){return this._value}}],[{key:"armForSwitch",value:function(t){if(this._switches.has(t))return this._switches.get(t);if(this._defaultArm)return this._defaultArm;throw new Error("Bad union switch: "+t)}},{key:"armTypeForArm",value:function(t){return t===Ft.Void?Ft.Void:this._arms[t]}},{key:"read",value:function(t){var n=this._switchOn.read(t),i=this.armForSwitch(n),a=this.armTypeForArm(i),o=void 0;return(0,$u.default)(a)?o=i.read(t):o=a.read(t),new this(n,o)}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: "+t+" is not a "+this.unionName);this._switchOn.write(t.switch(),n),t.armType().write(t.value(),n)}},{key:"isValid",value:function(t){return t instanceof this}},{key:"create",value:function(t,n,i){var a=function(s){FE(f,s);function f(){return Ou(this,f),PE(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(r);a.unionName=n,t.results[n]=a,i.switchOn instanceof oi.Reference?a._switchOn=i.switchOn.resolve(t):a._switchOn=i.switchOn,a._switches=new Map,a._arms={},(0,Pt.default)(i.arms,function(s,f){s instanceof oi.Reference&&(s=s.resolve(t)),a._arms[f]=s});var o=i.defaultArm;return o instanceof oi.Reference&&(o=o.resolve(t)),a._defaultArm=o,(0,Pt.default)(i.switches,function(s){var f=EE(s,2),c=f[0],l=f[1];(0,Eu.default)(c)&&(c=a._switchOn.fromName(c)),a._switches.set(c,l)}),(0,$u.default)(a._switchOn.values)||(0,Pt.default)(a._switchOn.values(),function(s){a[s.name]=function(f){return new a(s,f)},a.prototype[s.name]=function(c){return this.set(s,c)}}),(0,Pt.default)(a._arms,function(s,f){s!==Ft.Void&&(a.prototype[f]=function(){return this.get(f)})}),a}}]),r}();(0,xE.default)(RE),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=ue;Object.keys(e).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return e[h]}})});var t=dt;Object.keys(t).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return t[h]}})});var n=Pe;Object.keys(n).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return n[h]}})});var i=vt;Object.keys(i).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return i[h]}})});var a=gt;Object.keys(a).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return a[h]}})});var o=_t;Object.keys(o).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return o[h]}})});var s=mt;Object.keys(s).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return s[h]}})});var f=br;Object.keys(f).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return f[h]}})});var c=bt;Object.keys(c).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return c[h]}})});var l=wt;Object.keys(l).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return l[h]}})});var u=$t;Object.keys(u).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return u[h]}})});var p=Et;Object.keys(p).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return p[h]}})});var d=Ot;Object.keys(d).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return d[h]}})});var _=At;Object.keys(_).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return _[h]}})});var E=Or;Object.keys(E).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return E[h]}})});var $=St;Object.keys($).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return $[h]}})});var b=It;Object.keys(b).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return b[h]}})});var S=xt;Object.keys(S).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return S[h]}})})}(xn);var Au={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=function(){function m(v,g){for(var w=0;w<g.length;w++){var O=g[w];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(v,O.key,O)}}return function(v,g,w){return g&&m(v.prototype,g),w&&m(v,w),v}}(),t=Ar;Object.keys(t).forEach(function(m){m==="default"||m==="__esModule"||Object.defineProperty(r,m,{enumerable:!0,get:function(){return t[m]}})}),r.config=_;var n=Er,i=l(n),a=Fe.exports,o=l(a),s=xn,f=c(s);function c(m){if(m&&m.__esModule)return m;var v={};if(m!=null)for(var g in m)Object.prototype.hasOwnProperty.call(m,g)&&(v[g]=m[g]);return v.default=m,v}function l(m){return m&&m.__esModule?m:{default:m}}function u(m,v){if(!(m instanceof v))throw new TypeError("Cannot call a class as a function")}function p(m,v){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:m}function d(m,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);m.prototype=Object.create(v&&v.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(m,v):m.__proto__=v)}function _(m){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(m){var g=new R(v);m(g),g.resolve()}return v}var E=function(m){d(v,m);function v(g){u(this,v);var w=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return w.name=g,w}return e(v,[{key:"resolve",value:function(w){var O=w.definitions[this.name];return O.resolve(w)}}]),v}(t.Reference),$=function(m){d(v,m);function v(g,w){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;u(this,v);var L=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return L.childReference=g,L.length=w,L.variable=O,L}return e(v,[{key:"resolve",value:function(w){var O=this.childReference,L=this.length;return O instanceof t.Reference&&(O=O.resolve(w)),L instanceof t.Reference&&(L=L.resolve(w)),this.variable?new f.VarArray(O,L):new f.Array(O,L)}}]),v}(t.Reference),b=function(m){d(v,m);function v(g){u(this,v);var w=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return w.childReference=g,w.name=g.name,w}return e(v,[{key:"resolve",value:function(w){var O=this.childReference;return O instanceof t.Reference&&(O=O.resolve(w)),new f.Option(O)}}]),v}(t.Reference),S=function(m){d(v,m);function v(g,w){u(this,v);var O=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return O.sizedType=g,O.length=w,O}return e(v,[{key:"resolve",value:function(w){var O=this.length;return O instanceof t.Reference&&(O=O.resolve(w)),new this.sizedType(O)}}]),v}(t.Reference),h=function(){function m(v,g,w){u(this,m),this.constructor=v,this.name=g,this.config=w}return e(m,[{key:"resolve",value:function(g){return this.name in g.results?g.results[this.name]:this.constructor(g,this.name,this.config)}}]),m}();function A(m,v,g){return g instanceof t.Reference&&(g=g.resolve(m)),m.results[v]=g,g}function x(m,v,g){return m.results[v]=g,g}var R=function(){function m(v){u(this,m),this._destination=v,this._definitions={}}return e(m,[{key:"enum",value:function(g,w){var O=new h(f.Enum.create,g,w);this.define(g,O)}},{key:"struct",value:function(g,w){var O=new h(f.Struct.create,g,w);this.define(g,O)}},{key:"union",value:function(g,w){var O=new h(f.Union.create,g,w);this.define(g,O)}},{key:"typedef",value:function(g,w){var O=new h(A,g,w);this.define(g,O)}},{key:"const",value:function(g,w){var O=new h(x,g,w);this.define(g,O)}},{key:"void",value:function(){return f.Void}},{key:"bool",value:function(){return f.Bool}},{key:"int",value:function(){return f.Int}},{key:"hyper",value:function(){return f.Hyper}},{key:"uint",value:function(){return f.UnsignedInt}},{key:"uhyper",value:function(){return f.UnsignedHyper}},{key:"float",value:function(){return f.Float}},{key:"double",value:function(){return f.Double}},{key:"quadruple",value:function(){return f.Quadruple}},{key:"string",value:function(g){return new S(f.String,g)}},{key:"opaque",value:function(g){return new S(f.Opaque,g)}},{key:"varOpaque",value:function(g){return new S(f.VarOpaque,g)}},{key:"array",value:function(g,w){return new $(g,w)}},{key:"varArray",value:function(g,w){return new $(g,w,!0)}},{key:"option",value:function(g){return new b(g)}},{key:"define",value:function(g,w){if((0,i.default)(this._destination[g]))this._definitions[g]=w;else throw new Error("XDRTypes Error:"+g+" is already defined")}},{key:"lookup",value:function(g){return new E(g)}},{key:"resolve",value:function(){var g=this;(0,o.default)(this._definitions,function(w){w.resolve({definitions:g._definitions,results:g._destination})})}}]),m}()})(Au),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=xn;Object.keys(e).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[n]}})});var t=Au;Object.keys(t).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[n]}})})}(Sa),Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.xdr=void 0;const ME=(0,Sa.config)(r=>{r.enum("EnvelopeType",{envelopeTypeBundle:0}),r.typedef("Uint32",r.uint()),r.typedef("Uint64",r.uhyper()),r.union("BundleItemExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("BundleItem",[["collectionId",r.lookup("Uint64")],["productId",r.lookup("Uint64")],["variantId",r.lookup("Uint64")],["sku",r.string()],["quantity",r.lookup("Uint32")],["ext",r.lookup("BundleItemExt")]]),r.union("BundleExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("Bundle",[["variantId",r.lookup("Uint64")],["items",r.varArray(r.lookup("BundleItem"),500)],["version",r.lookup("Uint32")],["ext",r.lookup("BundleExt")]]),r.union("BundleEnvelope",{switchOn:r.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeBundle","v1"]],arms:{v1:r.lookup("Bundle")}})});Qr.xdr=ME,Object.defineProperty(oe,"__esModule",{value:!0}),oe.decodeToLegacyBoxOrder=oe.encodeLegacyBoxOrder=oe.toBundle=Iu=oe.toLineItemProperty=void 0;const ee=Qr;function Su(r){let e={variantId:ee.xdr.Uint64.fromString(r.variantId.toString()),version:r.version||Math.floor(Date.now()/1e3),items:r.items.map(n=>new ee.xdr.BundleItem({collectionId:ee.xdr.Uint64.fromString(n.collectionId.toString()),productId:ee.xdr.Uint64.fromString(n.productId.toString()),variantId:ee.xdr.Uint64.fromString(n.variantId.toString()),sku:n.sku||"",quantity:n.quantity,ext:new ee.xdr.BundleItemExt(0)})),ext:new ee.xdr.BundleExt(0)};const t=new ee.xdr.Bundle(e);return ee.xdr.BundleEnvelope.envelopeTypeBundle(t).toXDR("base64")}var Iu=oe.toLineItemProperty=Su;function Tu(r){const e=ee.xdr.BundleEnvelope.fromXDR(r,"base64").v1();return{variantId:e.variantId().toString(),version:e.version(),items:e.items().map(t=>({collectionId:t.collectionId().toString(),productId:t.productId().toString(),variantId:t.variantId().toString(),sku:t.sku().toString(),quantity:t.quantity()}))}}oe.toBundle=Tu;function BE(r,e,t=1){const n={variantId:r.toString(),version:t,items:[]};for(const i in e)if(Object.hasOwnProperty.call(e,i)){const a=e[i];n.items.push({collectionId:a.dsId.toString(),productId:a.pId.toString(),variantId:a.vId.toString(),sku:a.sku||"",quantity:a.qty})}return Su(n)}oe.encodeLegacyBoxOrder=BE;function UE(r){let e={};try{Tu(r).items.forEach(n=>{e[n.variantId]={dsId:n.collectionId,pId:Number.parseInt(n.productId),vId:Number.parseInt(n.variantId),sku:n.sku,qty:n.quantity}})}catch{e=JSON.parse(y.from(r,"base64").toString())}return e}oe.decodeToLegacyBoxOrder=UE;var DE=Ge,NE=He;function CE(r,e){return r&&DE(e,NE(e),r)}var LE=CE,jE=Ge,kE=nt;function qE(r,e){return r&&jE(e,kE(e),r)}var VE=qE,ui={exports:{}};(function(r,e){var t=Q,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a?t.Buffer:void 0,s=o?o.allocUnsafe:void 0;function f(c,l){if(l)return c.slice();var u=c.length,p=s?s(u):new c.constructor(u);return c.copy(p),p}r.exports=f})(ui,ui.exports);function GE(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var HE=GE,WE=Ge,zE=Vn;function XE(r,e){return WE(r,zE(r),e)}var YE=XE,KE=Za,ZE=KE(Object.getPrototypeOf,Object),si=ZE,JE=qn,QE=si,eO=Vn,rO=oo,tO=Object.getOwnPropertySymbols,nO=tO?function(r){for(var e=[];r;)JE(e,eO(r)),r=QE(r);return e}:rO,xu=nO,iO=Ge,aO=xu;function oO(r,e){return iO(r,aO(r),e)}var uO=oO,sO=ao,fO=xu,cO=nt;function lO(r){return sO(r,cO,fO)}var Pu=lO,pO=Object.prototype,hO=pO.hasOwnProperty;function yO(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&hO.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var dO=yO,Fu=ro;function vO(r){var e=new r.constructor(r.byteLength);return new Fu(e).set(new Fu(r)),e}var fi=vO,gO=fi;function _O(r,e){var t=e?gO(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}var mO=_O,bO=/\w*$/;function wO(r){var e=new r.constructor(r.source,bO.exec(r));return e.lastIndex=r.lastIndex,e}var $O=wO,Ru=Ve,Mu=Ru?Ru.prototype:void 0,Bu=Mu?Mu.valueOf:void 0;function EO(r){return Bu?Object(Bu.call(r)):{}}var OO=EO,AO=fi;function SO(r,e){var t=e?AO(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var IO=SO,TO=fi,xO=mO,PO=$O,FO=OO,RO=IO,MO="[object Boolean]",BO="[object Date]",UO="[object Map]",DO="[object Number]",NO="[object RegExp]",CO="[object Set]",LO="[object String]",jO="[object Symbol]",kO="[object ArrayBuffer]",qO="[object DataView]",VO="[object Float32Array]",GO="[object Float64Array]",HO="[object Int8Array]",WO="[object Int16Array]",zO="[object Int32Array]",XO="[object Uint8Array]",YO="[object Uint8ClampedArray]",KO="[object Uint16Array]",ZO="[object Uint32Array]";function JO(r,e,t){var n=r.constructor;switch(e){case kO:return TO(r);case MO:case BO:return new n(+r);case qO:return xO(r,t);case VO:case GO:case HO:case WO:case zO:case XO:case YO:case KO:case ZO:return RO(r,t);case UO:return new n;case DO:case LO:return new n(r);case NO:return PO(r);case CO:return new n;case jO:return FO(r)}}var QO=JO,eA=ve,Uu=Object.create,rA=function(){function r(){}return function(e){if(!eA(e))return{};if(Uu)return Uu(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}(),tA=rA,nA=tA,iA=si,aA=Dn;function oA(r){return typeof r.constructor=="function"&&!aA(r)?nA(iA(r)):{}}var uA=oA,sA=ct,fA=H,cA="[object Map]";function lA(r){return fA(r)&&sA(r)==cA}var pA=lA,hA=pA,yA=Un,Du=pr.exports,Nu=Du&&Du.isMap,dA=Nu?yA(Nu):hA,vA=dA,gA=ct,_A=H,mA="[object Set]";function bA(r){return _A(r)&&gA(r)==mA}var wA=bA,$A=wA,EA=Un,Cu=pr.exports,Lu=Cu&&Cu.isSet,OA=Lu?EA(Lu):$A,AA=OA,SA=jn,IA=iu,TA=Ca,xA=LE,PA=VE,FA=ui.exports,RA=HE,MA=YE,BA=uO,UA=so,DA=Pu,NA=ct,CA=dO,LA=QO,jA=uA,kA=C,qA=lr.exports,VA=vA,GA=ve,HA=AA,WA=He,zA=nt,XA=1,YA=2,KA=4,ju="[object Arguments]",ZA="[object Array]",JA="[object Boolean]",QA="[object Date]",eS="[object Error]",ku="[object Function]",rS="[object GeneratorFunction]",tS="[object Map]",nS="[object Number]",qu="[object Object]",iS="[object RegExp]",aS="[object Set]",oS="[object String]",uS="[object Symbol]",sS="[object WeakMap]",fS="[object ArrayBuffer]",cS="[object DataView]",lS="[object Float32Array]",pS="[object Float64Array]",hS="[object Int8Array]",yS="[object Int16Array]",dS="[object Int32Array]",vS="[object Uint8Array]",gS="[object Uint8ClampedArray]",_S="[object Uint16Array]",mS="[object Uint32Array]",P={};P[ju]=P[ZA]=P[fS]=P[cS]=P[JA]=P[QA]=P[lS]=P[pS]=P[hS]=P[yS]=P[dS]=P[tS]=P[nS]=P[qu]=P[iS]=P[aS]=P[oS]=P[uS]=P[vS]=P[gS]=P[_S]=P[mS]=!0,P[eS]=P[ku]=P[sS]=!1;function Mt(r,e,t,n,i,a){var o,s=e&XA,f=e&YA,c=e&KA;if(t&&(o=i?t(r,n,i,a):t(r)),o!==void 0)return o;if(!GA(r))return r;var l=kA(r);if(l){if(o=CA(r),!s)return RA(r,o)}else{var u=NA(r),p=u==ku||u==rS;if(qA(r))return FA(r,s);if(u==qu||u==ju||p&&!i){if(o=f||p?{}:jA(r),!s)return f?BA(r,PA(o,r)):MA(r,xA(o,r))}else{if(!P[u])return i?r:{};o=LA(r,u,s)}}a||(a=new SA);var d=a.get(r);if(d)return d;a.set(r,o),HA(r)?r.forEach(function($){o.add(Mt($,e,t,$,r,a))}):VA(r)&&r.forEach(function($,b){o.set(b,Mt($,e,t,b,r,a))});var _=c?f?DA:UA:f?zA:WA,E=l?void 0:_(r);return IA(E||r,function($,b){E&&(b=$,$=r[b]),TA(o,b,Mt($,e,t,b,r,a))}),o}var bS=Mt;function wS(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var $S=wS;function ES(r,e,t){var n=-1,i=r.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=r[n+e];return a}var OS=ES,AS=Jn,SS=OS;function IS(r,e){return e.length<2?r:AS(r,SS(e,0,-1))}var TS=IS,xS=yt,PS=$S,FS=TS,RS=hr;function MS(r,e){return e=xS(e,r),r=FS(r,e),r==null||delete r[RS(PS(e))]}var BS=MS,US=se,DS=si,NS=H,CS="[object Object]",LS=Function.prototype,jS=Object.prototype,Vu=LS.toString,kS=jS.hasOwnProperty,qS=Vu.call(Object);function VS(r){if(!NS(r)||US(r)!=CS)return!1;var e=DS(r);if(e===null)return!0;var t=kS.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Vu.call(t)==qS}var GS=VS,HS=GS;function WS(r){return HS(r)?void 0:r}var zS=WS,Gu=Ve,XS=Bn,YS=C,Hu=Gu?Gu.isConcatSpreadable:void 0;function KS(r){return YS(r)||XS(r)||!!(Hu&&r&&r[Hu])}var ZS=KS,JS=qn,QS=ZS;function Wu(r,e,t,n,i){var a=-1,o=r.length;for(t||(t=QS),i||(i=[]);++a<o;){var s=r[a];e>0&&t(s)?e>1?Wu(s,e-1,t,n,i):JS(i,s):n||(i[i.length]=s)}return i}var eI=Wu,rI=eI;function tI(r){var e=r==null?0:r.length;return e?rI(r,1):[]}var nI=tI,iI=nI,aI=ja,oI=qa;function uI(r){return oI(aI(r,void 0,iI),r+"")}var sI=uI,fI=ht,cI=bS,lI=BS,pI=yt,hI=Ge,yI=zS,dI=sI,vI=Pu,gI=1,_I=2,mI=4,bI=dI(function(r,e){var t={};if(r==null)return t;var n=!1;e=fI(e,function(a){return a=pI(a,r),n||(n=a.length>1),a}),hI(r,vI(r),t),n&&(t=cI(t,gI|_I|mI,yI));for(var i=e.length;i--;)lI(t,e[i]);return t}),wI=bI,$I=Object.defineProperty,EI=Object.defineProperties,OI=Object.getOwnPropertyDescriptors,zu=Object.getOwnPropertySymbols,AI=Object.prototype.hasOwnProperty,SI=Object.prototype.propertyIsEnumerable,Xu=(r,e,t)=>e in r?$I(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,II=(r,e)=>{for(var t in e||(e={}))AI.call(e,t)&&Xu(r,t,e[t]);if(zu)for(var t of zu(e))SI.call(e,t)&&Xu(r,t,e[t]);return r},TI=(r,e)=>EI(r,OI(e));function xI(r){try{return JSON.parse(r)}catch{return r}}function PI(r){return Object.entries(r).reduce((e,[t,n])=>TI(II({},e),{[t]:xI(n)}),{})}var FI=Object.defineProperty,RI=Object.defineProperties,MI=Object.getOwnPropertyDescriptors,Yu=Object.getOwnPropertySymbols,BI=Object.prototype.hasOwnProperty,UI=Object.prototype.propertyIsEnumerable,Ku=(r,e,t)=>e in r?FI(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Zu=(r,e)=>{for(var t in e||(e={}))BI.call(e,t)&&Ku(r,t,e[t]);if(Yu)for(var t of Yu(e))UI.call(e,t)&&Ku(r,t,e[t]);return r},Ju=(r,e)=>RI(r,MI(e));function Qu(r){var e;const t=PI(r),n=t.auto_inject===void 0?!0:t.auto_inject,i=(e=t.display_on)!=null?e:[],a=t.first_option==="autodeliver";return Ju(Zu({},wI(t,["display_on","first_option"])),{auto_inject:n,valid_pages:i,is_subscription_first:a,autoInject:n,validPages:i,isSubscriptionFirst:a})}function es(r){var e;const t=((e=r.subscription_options)==null?void 0:e.storefront_purchase_options)==="subscription_only";return Ju(Zu({},r),{is_subscription_only:t,isSubscriptionOnly:t})}function DI(r){return r.map(e=>{const t={};return Object.entries(e).forEach(([n,i])=>{t[n]=es(i)}),t})}const Bt="2020-12",NI={store_currency:{currency_code:"USD",currency_symbol:"$",decimal_separator:".",thousands_separator:",",currency_symbol_location:"left"}},Ir=new Map;function Ut(r,e){return Ir.has(r)||Ir.set(r,e()),Ir.get(r)}const ci=async r=>{const{product:e}=await Ut(`product.${r}`,()=>Jr("get",`/product/${Bt}/${r}.json`));return es(e)},rs=async()=>await Ut("storeSettings",()=>Jr("get",`/${Bt}/store_settings.json`).catch(()=>NI)),ts=async()=>{const{widget_settings:r}=await Ut("widgetSettings",()=>Jr("get",`/${Bt}/widget_settings.json`));return Qu(r)},ns=async()=>{const{products:r,widget_settings:e,store_settings:t,meta:n}=await Ut("productsAndSettings",()=>Jr("get",`/product/${Bt}/products.json`));return n?.status==="error"?Promise.reject(n.message):{products:DI(r),widget_settings:Qu(e),store_settings:t??{}}},CI=async()=>{const{products:r}=await ns();return r},LI=async r=>{const[e,t,n]=await Promise.all([ci(r),rs(),ts()]);return{product:e,store_settings:t,widget_settings:n,storeSettings:t,widgetSettings:n}},is=async r=>{const{bundle_product:e}=await ci(r);return e},as=()=>Array.from(Ir.keys()).forEach(r=>Ir.delete(r));var jI=Object.freeze({__proto__:null,getProduct:ci,getStoreSettings:rs,getWidgetSettings:ts,getProductsAndSettings:ns,getProducts:CI,getProductAndSettings:LI,getBundleSettings:is,resetCache:as});const os="/bundling-storefront-manager";function kI(){return Math.ceil(Date.now()/1e3)}async function qI(){try{const{timestamp:r}=await Tn("get",`${os}/t`,{headers:{"X-Recharge-App":"storefront-client"}});return r}catch(r){return console.error(`Fetch failed: ${r}. Using client-side date.`),kI()}}const VI=async r=>{const e=An();if(!await us(r))throw new Error("Bundle selection is invalid.");const t=await qI(),n=Iu({variantId:r.externalVariantId,version:t,items:r.selections.map(i=>({collectionId:i.collectionId,productId:i.externalProductId,variantId:i.externalVariantId,quantity:i.quantity,sku:""}))});try{const i=await Tn("post",`${os}/api/v1/bundles`,{data:{bundle:n},headers:{Origin:`https://${e.storeIdentifier}`}});if(!i.id||i.code!==200)throw new Error(`1: failed generating rb_id: ${JSON.stringify(i)}`);return i.id}catch(i){throw new Error(`2: failed generating rb_id ${i}`)}},us=async r=>{try{const e=await is(r.externalProductId);return!!r&&!!e}catch{return console.error("Error fetching bundle settings"),!1}};var GI=Object.freeze({__proto__:null,getBundleId:VI,validateBundle:us});async function HI(r){const{charge:e}=await I("get","/charges",{id:r});return e}function WI(r){return I("get","/charges",{query:r})}async function zI(r,e){const{charge:t}=await I("post",`/charges/${r}/apply_discount`,{data:e});return t}async function XI(r){const{charge:e}=await I("post",`/charges/${r}/remove_discount`);return e}async function YI(r){const{charge:e}=await I("post",`/charges/${r}/skip`);return e}async function KI(r){const{charge:e}=await I("post",`/charges/${r}/unskip`);return e}async function ZI(r,e){const{charge:t}=await I("post",`/charges/${r}/refund`,{data:e});return t}async function JI(r){const{charge:e}=await I("post",`/charges/${r}/process`);return e}async function QI(r){const{charge:e}=await I("post",`/charges/${r}/capture_payment`);return e}var eT=Object.freeze({__proto__:null,getCharge:HI,listCharges:WI,applyDiscount:zI,removeDiscount:XI,skipCharge:YI,unskipCharge:KI,refundCharge:ZI,processCharge:JI,captureCharge:QI});async function rT(r){const{membership:e}=await I("get","/memberships",{id:r});return e}function tT(r){return I("get","/memberships",{query:r})}async function nT(r,e){const{membership:t}=await I("post",`/memberships/${r}/cancel`,{data:e});return t}async function iT(r,e){const{membership:t}=await I("post",`/memberships/${r}/activate`,{data:e});return t}var aT=Object.freeze({__proto__:null,getMembership:rT,listMemberships:tT,cancelMembership:nT,activateMembership:iT}),oT=Object.freeze({__proto__:null,getOnetime:async r=>{const{onetime:e}=await I("get","/onetimes",{id:r});return e},listOnetimes:r=>I("get","/onetimes",{query:r}),createOnetime:async r=>{const{onetime:e}=await I("post","/onetimes",{data:r});return e},updateOnetime:async(r,e)=>{const{onetime:t}=await I("put","/onetimes",{id:r,data:e});return t},deleteOnetime:r=>I("delete","/onetime",{id:r})}),uT=Object.freeze({__proto__:null,getOrder:async r=>{const{order:e}=await I("get","/orders",{id:r});return e},listOrders:r=>I("get","/orders",{query:r})}),sT=Object.freeze({__proto__:null,getSubscription:async r=>{const{subscription:e}=await I("get","/subscriptions",{id:r});return e},listSubscriptions:r=>I("get","/subscriptions",{query:r}),createSubscription:async r=>{const{subscription:e}=await I("post","/subscriptions",{data:r});return e},updateSubscription:async(r,e,t)=>{const{subscription:n}=await I("put","/subscriptions",{id:r,data:e,query:t});return n},updateSubscriptionChargeDate:async(r,e)=>{const{subscription:t}=await I("post",`/subscriptions/${r}/set_next_charge_date`,{data:{date:e}});return t},updateSubscriptionAddress:async(r,e)=>{const{subscription:t}=await I("post",`/subscriptions/${r}/change_address`,{data:{address_id:e}});return t},cancelSubscription:async(r,e)=>{const{subscription:t}=await I("post",`/subscriptions/${r}/cancel`,{data:e});return t},activateSubscription:async r=>{const{subscription:e}=await I("post",`/subscriptions/${r}/activate`);return e}}),fT=Object.freeze({__proto__:null,getUser:async()=>{var r;const e=(r=Kr())==null?void 0:r.userId;if(!e)throw new Error("Not logged in.");const{customer:t}=await I("get","/customers",{id:e});return t},updateUser:async r=>{var e;const t=(e=Kr())==null?void 0:e.userId;if(!t)throw new Error("Not logged in.");const{customer:n}=await I("put","/customers",{id:t,data:r});return n},getDeliverySchedule:async r=>{var e;const t=(e=Kr())==null?void 0:e.userId;if(!t)throw new Error("Not logged in.");const{deliveries:n}=await I("get",`/customers/${t}/delivery_schedule`,{query:r});return n}});const cT={get(r,e){return Se("get",r,e)},post(r,e){return Se("post",r,e)},put(r,e){return Se("put",r,e)},delete(r,e){return Se("delete",r,e)}};function lT(r){var e,t;if(r)return r;if((e=window?.Shopify)!=null&&e.shop)return window.Shopify.shop;let n=window?.domain;if(!n){const i=(t=location?.href.match(/(?:http[s]*:\/\/)*(.*?)\.(?=admin\.rechargeapps\.com)/i))==null?void 0:t[1].replace(/-sp$/,"");i&&(n=`${i}.myshopify.com`)}if(n)return n;throw new Error("No storeIdentifier was passed into init.")}function pT(r={}){const e=r;xl({storeIdentifier:lT(r.storeIdentifier),environment:e.environment?e.environment:"prod",apiKey:e.apiKey?e.apiKey:""}),as()}const ss={init:pT,api:cT,address:Wl,auth:zl,bundle:GI,charge:eT,cdn:jI,memberships:aT,onetime:oT,order:uT,subscription:sT,user:fT};try{ss.init()}catch{}return ss});
|
|
24
24
|
//# sourceMappingURL=recharge-storefront-client.min.js.map
|