passkey-kit 0.0.1 → 0.0.2

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.
@@ -1,135 +0,0 @@
1
- var q0=Object.create;var _l=Object.defineProperty;var V0=Object.getOwnPropertyDescriptor;var K0=Object.getOwnPropertyNames;var H0=Object.getPrototypeOf,z0=Object.prototype.hasOwnProperty;var Wh=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Jt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$h=(e,t)=>{for(var n in t)_l(e,n,{get:t[n],enumerable:!0})},Al=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of K0(t))!z0.call(e,a)&&a!==n&&_l(e,a,{get:()=>t[a],enumerable:!(o=V0(t,a))||o.enumerable});return e},On=(e,t,n)=>(Al(e,t,"default"),n&&Al(n,t,"default")),po=(e,t,n)=>(n=e!=null?q0(H0(e)):{},Al(t||!e||!e.__esModule?_l(n,"default",{value:e,enumerable:!0}):n,e));var Jh=Jt(fu=>{"use strict";fu.byteLength=G0;fu.toByteArray=$0;fu.fromByteArray=J0;var Lo=[],vo=[],X0=typeof Uint8Array<"u"?Uint8Array:Array,El="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Ri=0,Qh=El.length;Ri<Qh;++Ri)Lo[Ri]=El[Ri],vo[El.charCodeAt(Ri)]=Ri;var Ri,Qh;vo[45]=62;vo[95]=63;function Yh(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");n===-1&&(n=t);var o=n===t?0:4-n%4;return[n,o]}function G0(e){var t=Yh(e),n=t[0],o=t[1];return(n+o)*3/4-o}function W0(e,t,n){return(t+n)*3/4-n}function $0(e){var t,n=Yh(e),o=n[0],a=n[1],i=new X0(W0(e,o,a)),s=0,f=a>0?o-4:o,u;for(u=0;u<f;u+=4)t=vo[e.charCodeAt(u)]<<18|vo[e.charCodeAt(u+1)]<<12|vo[e.charCodeAt(u+2)]<<6|vo[e.charCodeAt(u+3)],i[s++]=t>>16&255,i[s++]=t>>8&255,i[s++]=t&255;return a===2&&(t=vo[e.charCodeAt(u)]<<2|vo[e.charCodeAt(u+1)]>>4,i[s++]=t&255),a===1&&(t=vo[e.charCodeAt(u)]<<10|vo[e.charCodeAt(u+1)]<<4|vo[e.charCodeAt(u+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}function Q0(e){return Lo[e>>18&63]+Lo[e>>12&63]+Lo[e>>6&63]+Lo[e&63]}function Y0(e,t,n){for(var o,a=[],i=t;i<n;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),a.push(Q0(o));return a.join("")}function J0(e){for(var t,n=e.length,o=n%3,a=[],i=16383,s=0,f=n-o;s<f;s+=i)a.push(Y0(e,s,s+i>f?f:s+i));return o===1?(t=e[n-1],a.push(Lo[t>>2]+Lo[t<<4&63]+"==")):o===2&&(t=(e[n-2]<<8)+e[n-1],a.push(Lo[t>>10]+Lo[t>>4&63]+Lo[t<<2&63]+"=")),a.join("")}});var Zh=Jt(Tl=>{Tl.read=function(e,t,n,o,a){var i,s,f=a*8-o-1,u=(1<<f)-1,r=u>>1,_=-7,d=n?a-1:0,b=n?-1:1,T=e[t+d];for(d+=b,i=T&(1<<-_)-1,T>>=-_,_+=f;_>0;i=i*256+e[t+d],d+=b,_-=8);for(s=i&(1<<-_)-1,i>>=-_,_+=o;_>0;s=s*256+e[t+d],d+=b,_-=8);if(i===0)i=1-r;else{if(i===u)return s?NaN:(T?-1:1)*(1/0);s=s+Math.pow(2,o),i=i-r}return(T?-1:1)*s*Math.pow(2,i-o)};Tl.write=function(e,t,n,o,a,i){var s,f,u,r=i*8-a-1,_=(1<<r)-1,d=_>>1,b=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=o?0:i-1,w=o?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(f=isNaN(t)?1:0,s=_):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+d>=1?t+=b/u:t+=b*Math.pow(2,1-d),t*u>=2&&(s++,u/=2),s+d>=_?(f=0,s=_):s+d>=1?(f=(t*u-1)*Math.pow(2,a),s=s+d):(f=t*Math.pow(2,d-1)*Math.pow(2,a),s=0));a>=8;e[n+T]=f&255,T+=w,f/=256,a-=8);for(s=s<<a|f,r+=a;r>0;e[n+T]=s&255,T+=w,s/=256,r-=8);e[n+T-w]|=g*128}});var ts=Jt(aa=>{"use strict";var kl=Jh(),oa=Zh(),ed=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;aa.Buffer=Wt;aa.SlowBuffer=ob;aa.INSPECT_MAX_BYTES=50;var pu=2147483647;aa.kMaxLength=pu;Wt.TYPED_ARRAY_SUPPORT=Z0();!Wt.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Z0(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(Wt.prototype,"parent",{enumerable:!0,get:function(){if(Wt.isBuffer(this))return this.buffer}});Object.defineProperty(Wt.prototype,"offset",{enumerable:!0,get:function(){if(Wt.isBuffer(this))return this.byteOffset}});function Xo(e){if(e>pu)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,Wt.prototype),t}function Wt(e,t,n){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Rl(e)}return od(e,t,n)}Wt.poolSize=8192;function od(e,t,n){if(typeof e=="string")return tb(e,t);if(ArrayBuffer.isView(e))return rb(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(No(e,ArrayBuffer)||e&&No(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(No(e,SharedArrayBuffer)||e&&No(e.buffer,SharedArrayBuffer)))return Pl(e,t,n);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let o=e.valueOf&&e.valueOf();if(o!=null&&o!==e)return Wt.from(o,t,n);let a=nb(e);if(a)return a;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Wt.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}Wt.from=function(e,t,n){return od(e,t,n)};Object.setPrototypeOf(Wt.prototype,Uint8Array.prototype);Object.setPrototypeOf(Wt,Uint8Array);function id(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function eb(e,t,n){return id(e),e<=0?Xo(e):t!==void 0?typeof n=="string"?Xo(e).fill(t,n):Xo(e).fill(t):Xo(e)}Wt.alloc=function(e,t,n){return eb(e,t,n)};function Rl(e){return id(e),Xo(e<0?0:Il(e)|0)}Wt.allocUnsafe=function(e){return Rl(e)};Wt.allocUnsafeSlow=function(e){return Rl(e)};function tb(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Wt.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let n=ad(e,t)|0,o=Xo(n),a=o.write(e,t);return a!==n&&(o=o.slice(0,a)),o}function Ol(e){let t=e.length<0?0:Il(e.length)|0,n=Xo(t);for(let o=0;o<t;o+=1)n[o]=e[o]&255;return n}function rb(e){if(No(e,Uint8Array)){let t=new Uint8Array(e);return Pl(t.buffer,t.byteOffset,t.byteLength)}return Ol(e)}function Pl(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let o;return t===void 0&&n===void 0?o=new Uint8Array(e):n===void 0?o=new Uint8Array(e,t):o=new Uint8Array(e,t,n),Object.setPrototypeOf(o,Wt.prototype),o}function nb(e){if(Wt.isBuffer(e)){let t=Il(e.length)|0,n=Xo(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!="number"||Bl(e.length)?Xo(0):Ol(e);if(e.type==="Buffer"&&Array.isArray(e.data))return Ol(e.data)}function Il(e){if(e>=pu)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+pu.toString(16)+" bytes");return e|0}function ob(e){return+e!=e&&(e=0),Wt.alloc(+e)}Wt.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==Wt.prototype};Wt.compare=function(t,n){if(No(t,Uint8Array)&&(t=Wt.from(t,t.offset,t.byteLength)),No(n,Uint8Array)&&(n=Wt.from(n,n.offset,n.byteLength)),!Wt.isBuffer(t)||!Wt.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===n)return 0;let o=t.length,a=n.length;for(let i=0,s=Math.min(o,a);i<s;++i)if(t[i]!==n[i]){o=t[i],a=n[i];break}return o<a?-1:a<o?1:0};Wt.isEncoding=function(t){switch(String(t).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}};Wt.concat=function(t,n){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return Wt.alloc(0);let o;if(n===void 0)for(n=0,o=0;o<t.length;++o)n+=t[o].length;let a=Wt.allocUnsafe(n),i=0;for(o=0;o<t.length;++o){let s=t[o];if(No(s,Uint8Array))i+s.length>a.length?(Wt.isBuffer(s)||(s=Wt.from(s)),s.copy(a,i)):Uint8Array.prototype.set.call(a,s,i);else if(Wt.isBuffer(s))s.copy(a,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=s.length}return a};function ad(e,t){if(Wt.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||No(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let n=e.length,o=arguments.length>2&&arguments[2]===!0;if(!o&&n===0)return 0;let a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return xl(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return n*2;case"hex":return n>>>1;case"base64":return yd(e).length;default:if(a)return o?-1:xl(e).length;t=(""+t).toLowerCase(),a=!0}}Wt.byteLength=ad;function ib(e,t,n){let o=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return yb(this,t,n);case"utf8":case"utf-8":return ud(this,t,n);case"ascii":return hb(this,t,n);case"latin1":case"binary":return db(this,t,n);case"base64":return fb(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mb(this,t,n);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}Wt.prototype._isBuffer=!0;function Ii(e,t,n){let o=e[t];e[t]=e[n],e[n]=o}Wt.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let n=0;n<t;n+=2)Ii(this,n,n+1);return this};Wt.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let n=0;n<t;n+=4)Ii(this,n,n+3),Ii(this,n+1,n+2);return this};Wt.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let n=0;n<t;n+=8)Ii(this,n,n+7),Ii(this,n+1,n+6),Ii(this,n+2,n+5),Ii(this,n+3,n+4);return this};Wt.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?ud(this,0,t):ib.apply(this,arguments)};Wt.prototype.toLocaleString=Wt.prototype.toString;Wt.prototype.equals=function(t){if(!Wt.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:Wt.compare(this,t)===0};Wt.prototype.inspect=function(){let t="",n=aa.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"};ed&&(Wt.prototype[ed]=Wt.prototype.inspect);Wt.prototype.compare=function(t,n,o,a,i){if(No(t,Uint8Array)&&(t=Wt.from(t,t.offset,t.byteLength)),!Wt.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(n===void 0&&(n=0),o===void 0&&(o=t?t.length:0),a===void 0&&(a=0),i===void 0&&(i=this.length),n<0||o>t.length||a<0||i>this.length)throw new RangeError("out of range index");if(a>=i&&n>=o)return 0;if(a>=i)return-1;if(n>=o)return 1;if(n>>>=0,o>>>=0,a>>>=0,i>>>=0,this===t)return 0;let s=i-a,f=o-n,u=Math.min(s,f),r=this.slice(a,i),_=t.slice(n,o);for(let d=0;d<u;++d)if(r[d]!==_[d]){s=r[d],f=_[d];break}return s<f?-1:f<s?1:0};function sd(e,t,n,o,a){if(e.length===0)return-1;if(typeof n=="string"?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,Bl(n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0)if(a)n=0;else return-1;if(typeof t=="string"&&(t=Wt.from(t,o)),Wt.isBuffer(t))return t.length===0?-1:td(e,t,n,o,a);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):td(e,[t],n,o,a);throw new TypeError("val must be string, number or Buffer")}function td(e,t,n,o,a){let i=1,s=e.length,f=t.length;if(o!==void 0&&(o=String(o).toLowerCase(),o==="ucs2"||o==="ucs-2"||o==="utf16le"||o==="utf-16le")){if(e.length<2||t.length<2)return-1;i=2,s/=2,f/=2,n/=2}function u(_,d){return i===1?_[d]:_.readUInt16BE(d*i)}let r;if(a){let _=-1;for(r=n;r<s;r++)if(u(e,r)===u(t,_===-1?0:r-_)){if(_===-1&&(_=r),r-_+1===f)return _*i}else _!==-1&&(r-=r-_),_=-1}else for(n+f>s&&(n=s-f),r=n;r>=0;r--){let _=!0;for(let d=0;d<f;d++)if(u(e,r+d)!==u(t,d)){_=!1;break}if(_)return r}return-1}Wt.prototype.includes=function(t,n,o){return this.indexOf(t,n,o)!==-1};Wt.prototype.indexOf=function(t,n,o){return sd(this,t,n,o,!0)};Wt.prototype.lastIndexOf=function(t,n,o){return sd(this,t,n,o,!1)};function ab(e,t,n,o){n=Number(n)||0;let a=e.length-n;o?(o=Number(o),o>a&&(o=a)):o=a;let i=t.length;o>i/2&&(o=i/2);let s;for(s=0;s<o;++s){let f=parseInt(t.substr(s*2,2),16);if(Bl(f))return s;e[n+s]=f}return s}function sb(e,t,n,o){return hu(xl(t,e.length-n),e,n,o)}function ub(e,t,n,o){return hu(wb(t),e,n,o)}function cb(e,t,n,o){return hu(yd(t),e,n,o)}function lb(e,t,n,o){return hu(Sb(t,e.length-n),e,n,o)}Wt.prototype.write=function(t,n,o,a){if(n===void 0)a="utf8",o=this.length,n=0;else if(o===void 0&&typeof n=="string")a=n,o=this.length,n=0;else if(isFinite(n))n=n>>>0,isFinite(o)?(o=o>>>0,a===void 0&&(a="utf8")):(a=o,o=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-n;if((o===void 0||o>i)&&(o=i),t.length>0&&(o<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");let s=!1;for(;;)switch(a){case"hex":return ab(this,t,n,o);case"utf8":case"utf-8":return sb(this,t,n,o);case"ascii":case"latin1":case"binary":return ub(this,t,n,o);case"base64":return cb(this,t,n,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return lb(this,t,n,o);default:if(s)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),s=!0}};Wt.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function fb(e,t,n){return t===0&&n===e.length?kl.fromByteArray(e):kl.fromByteArray(e.slice(t,n))}function ud(e,t,n){n=Math.min(e.length,n);let o=[],a=t;for(;a<n;){let i=e[a],s=null,f=i>239?4:i>223?3:i>191?2:1;if(a+f<=n){let u,r,_,d;switch(f){case 1:i<128&&(s=i);break;case 2:u=e[a+1],(u&192)===128&&(d=(i&31)<<6|u&63,d>127&&(s=d));break;case 3:u=e[a+1],r=e[a+2],(u&192)===128&&(r&192)===128&&(d=(i&15)<<12|(u&63)<<6|r&63,d>2047&&(d<55296||d>57343)&&(s=d));break;case 4:u=e[a+1],r=e[a+2],_=e[a+3],(u&192)===128&&(r&192)===128&&(_&192)===128&&(d=(i&15)<<18|(u&63)<<12|(r&63)<<6|_&63,d>65535&&d<1114112&&(s=d))}}s===null?(s=65533,f=1):s>65535&&(s-=65536,o.push(s>>>10&1023|55296),s=56320|s&1023),o.push(s),a+=f}return pb(o)}var rd=4096;function pb(e){let t=e.length;if(t<=rd)return String.fromCharCode.apply(String,e);let n="",o=0;for(;o<t;)n+=String.fromCharCode.apply(String,e.slice(o,o+=rd));return n}function hb(e,t,n){let o="";n=Math.min(e.length,n);for(let a=t;a<n;++a)o+=String.fromCharCode(e[a]&127);return o}function db(e,t,n){let o="";n=Math.min(e.length,n);for(let a=t;a<n;++a)o+=String.fromCharCode(e[a]);return o}function yb(e,t,n){let o=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>o)&&(n=o);let a="";for(let i=t;i<n;++i)a+=Ab[e[i]];return a}function mb(e,t,n){let o=e.slice(t,n),a="";for(let i=0;i<o.length-1;i+=2)a+=String.fromCharCode(o[i]+o[i+1]*256);return a}Wt.prototype.slice=function(t,n){let o=this.length;t=~~t,n=n===void 0?o:~~n,t<0?(t+=o,t<0&&(t=0)):t>o&&(t=o),n<0?(n+=o,n<0&&(n=0)):n>o&&(n=o),n<t&&(n=t);let a=this.subarray(t,n);return Object.setPrototypeOf(a,Wt.prototype),a};function Un(e,t,n){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}Wt.prototype.readUintLE=Wt.prototype.readUIntLE=function(t,n,o){t=t>>>0,n=n>>>0,o||Un(t,n,this.length);let a=this[t],i=1,s=0;for(;++s<n&&(i*=256);)a+=this[t+s]*i;return a};Wt.prototype.readUintBE=Wt.prototype.readUIntBE=function(t,n,o){t=t>>>0,n=n>>>0,o||Un(t,n,this.length);let a=this[t+--n],i=1;for(;n>0&&(i*=256);)a+=this[t+--n]*i;return a};Wt.prototype.readUint8=Wt.prototype.readUInt8=function(t,n){return t=t>>>0,n||Un(t,1,this.length),this[t]};Wt.prototype.readUint16LE=Wt.prototype.readUInt16LE=function(t,n){return t=t>>>0,n||Un(t,2,this.length),this[t]|this[t+1]<<8};Wt.prototype.readUint16BE=Wt.prototype.readUInt16BE=function(t,n){return t=t>>>0,n||Un(t,2,this.length),this[t]<<8|this[t+1]};Wt.prototype.readUint32LE=Wt.prototype.readUInt32LE=function(t,n){return t=t>>>0,n||Un(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Wt.prototype.readUint32BE=Wt.prototype.readUInt32BE=function(t,n){return t=t>>>0,n||Un(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Wt.prototype.readBigUInt64LE=ui(function(t){t=t>>>0,ia(t,"offset");let n=this[t],o=this[t+7];(n===void 0||o===void 0)&&es(t,this.length-8);let a=n+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,i=this[++t]+this[++t]*2**8+this[++t]*2**16+o*2**24;return BigInt(a)+(BigInt(i)<<BigInt(32))});Wt.prototype.readBigUInt64BE=ui(function(t){t=t>>>0,ia(t,"offset");let n=this[t],o=this[t+7];(n===void 0||o===void 0)&&es(t,this.length-8);let a=n*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],i=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o;return(BigInt(a)<<BigInt(32))+BigInt(i)});Wt.prototype.readIntLE=function(t,n,o){t=t>>>0,n=n>>>0,o||Un(t,n,this.length);let a=this[t],i=1,s=0;for(;++s<n&&(i*=256);)a+=this[t+s]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*n)),a};Wt.prototype.readIntBE=function(t,n,o){t=t>>>0,n=n>>>0,o||Un(t,n,this.length);let a=n,i=1,s=this[t+--a];for(;a>0&&(i*=256);)s+=this[t+--a]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*n)),s};Wt.prototype.readInt8=function(t,n){return t=t>>>0,n||Un(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Wt.prototype.readInt16LE=function(t,n){t=t>>>0,n||Un(t,2,this.length);let o=this[t]|this[t+1]<<8;return o&32768?o|4294901760:o};Wt.prototype.readInt16BE=function(t,n){t=t>>>0,n||Un(t,2,this.length);let o=this[t+1]|this[t]<<8;return o&32768?o|4294901760:o};Wt.prototype.readInt32LE=function(t,n){return t=t>>>0,n||Un(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Wt.prototype.readInt32BE=function(t,n){return t=t>>>0,n||Un(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Wt.prototype.readBigInt64LE=ui(function(t){t=t>>>0,ia(t,"offset");let n=this[t],o=this[t+7];(n===void 0||o===void 0)&&es(t,this.length-8);let a=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(o<<24);return(BigInt(a)<<BigInt(32))+BigInt(n+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});Wt.prototype.readBigInt64BE=ui(function(t){t=t>>>0,ia(t,"offset");let n=this[t],o=this[t+7];(n===void 0||o===void 0)&&es(t,this.length-8);let a=(n<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(a)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+o)});Wt.prototype.readFloatLE=function(t,n){return t=t>>>0,n||Un(t,4,this.length),oa.read(this,t,!0,23,4)};Wt.prototype.readFloatBE=function(t,n){return t=t>>>0,n||Un(t,4,this.length),oa.read(this,t,!1,23,4)};Wt.prototype.readDoubleLE=function(t,n){return t=t>>>0,n||Un(t,8,this.length),oa.read(this,t,!0,52,8)};Wt.prototype.readDoubleBE=function(t,n){return t=t>>>0,n||Un(t,8,this.length),oa.read(this,t,!1,52,8)};function ao(e,t,n,o,a,i){if(!Wt.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<i)throw new RangeError('"value" argument is out of bounds');if(n+o>e.length)throw new RangeError("Index out of range")}Wt.prototype.writeUintLE=Wt.prototype.writeUIntLE=function(t,n,o,a){if(t=+t,n=n>>>0,o=o>>>0,!a){let f=Math.pow(2,8*o)-1;ao(this,t,n,o,f,0)}let i=1,s=0;for(this[n]=t&255;++s<o&&(i*=256);)this[n+s]=t/i&255;return n+o};Wt.prototype.writeUintBE=Wt.prototype.writeUIntBE=function(t,n,o,a){if(t=+t,n=n>>>0,o=o>>>0,!a){let f=Math.pow(2,8*o)-1;ao(this,t,n,o,f,0)}let i=o-1,s=1;for(this[n+i]=t&255;--i>=0&&(s*=256);)this[n+i]=t/s&255;return n+o};Wt.prototype.writeUint8=Wt.prototype.writeUInt8=function(t,n,o){return t=+t,n=n>>>0,o||ao(this,t,n,1,255,0),this[n]=t&255,n+1};Wt.prototype.writeUint16LE=Wt.prototype.writeUInt16LE=function(t,n,o){return t=+t,n=n>>>0,o||ao(this,t,n,2,65535,0),this[n]=t&255,this[n+1]=t>>>8,n+2};Wt.prototype.writeUint16BE=Wt.prototype.writeUInt16BE=function(t,n,o){return t=+t,n=n>>>0,o||ao(this,t,n,2,65535,0),this[n]=t>>>8,this[n+1]=t&255,n+2};Wt.prototype.writeUint32LE=Wt.prototype.writeUInt32LE=function(t,n,o){return t=+t,n=n>>>0,o||ao(this,t,n,4,4294967295,0),this[n+3]=t>>>24,this[n+2]=t>>>16,this[n+1]=t>>>8,this[n]=t&255,n+4};Wt.prototype.writeUint32BE=Wt.prototype.writeUInt32BE=function(t,n,o){return t=+t,n=n>>>0,o||ao(this,t,n,4,4294967295,0),this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255,n+4};function cd(e,t,n,o,a){dd(t,o,a,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i=i>>8,e[n++]=i,i=i>>8,e[n++]=i,i=i>>8,e[n++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s=s>>8,e[n++]=s,s=s>>8,e[n++]=s,s=s>>8,e[n++]=s,n}function ld(e,t,n,o,a){dd(t,o,a,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i=i>>8,e[n+6]=i,i=i>>8,e[n+5]=i,i=i>>8,e[n+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s=s>>8,e[n+2]=s,s=s>>8,e[n+1]=s,s=s>>8,e[n]=s,n+8}Wt.prototype.writeBigUInt64LE=ui(function(t,n=0){return cd(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))});Wt.prototype.writeBigUInt64BE=ui(function(t,n=0){return ld(this,t,n,BigInt(0),BigInt("0xffffffffffffffff"))});Wt.prototype.writeIntLE=function(t,n,o,a){if(t=+t,n=n>>>0,!a){let u=Math.pow(2,8*o-1);ao(this,t,n,o,u-1,-u)}let i=0,s=1,f=0;for(this[n]=t&255;++i<o&&(s*=256);)t<0&&f===0&&this[n+i-1]!==0&&(f=1),this[n+i]=(t/s>>0)-f&255;return n+o};Wt.prototype.writeIntBE=function(t,n,o,a){if(t=+t,n=n>>>0,!a){let u=Math.pow(2,8*o-1);ao(this,t,n,o,u-1,-u)}let i=o-1,s=1,f=0;for(this[n+i]=t&255;--i>=0&&(s*=256);)t<0&&f===0&&this[n+i+1]!==0&&(f=1),this[n+i]=(t/s>>0)-f&255;return n+o};Wt.prototype.writeInt8=function(t,n,o){return t=+t,n=n>>>0,o||ao(this,t,n,1,127,-128),t<0&&(t=255+t+1),this[n]=t&255,n+1};Wt.prototype.writeInt16LE=function(t,n,o){return t=+t,n=n>>>0,o||ao(this,t,n,2,32767,-32768),this[n]=t&255,this[n+1]=t>>>8,n+2};Wt.prototype.writeInt16BE=function(t,n,o){return t=+t,n=n>>>0,o||ao(this,t,n,2,32767,-32768),this[n]=t>>>8,this[n+1]=t&255,n+2};Wt.prototype.writeInt32LE=function(t,n,o){return t=+t,n=n>>>0,o||ao(this,t,n,4,2147483647,-2147483648),this[n]=t&255,this[n+1]=t>>>8,this[n+2]=t>>>16,this[n+3]=t>>>24,n+4};Wt.prototype.writeInt32BE=function(t,n,o){return t=+t,n=n>>>0,o||ao(this,t,n,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[n]=t>>>24,this[n+1]=t>>>16,this[n+2]=t>>>8,this[n+3]=t&255,n+4};Wt.prototype.writeBigInt64LE=ui(function(t,n=0){return cd(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Wt.prototype.writeBigInt64BE=ui(function(t,n=0){return ld(this,t,n,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function fd(e,t,n,o,a,i){if(n+o>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function pd(e,t,n,o,a){return t=+t,n=n>>>0,a||fd(e,t,n,4,34028234663852886e22,-34028234663852886e22),oa.write(e,t,n,o,23,4),n+4}Wt.prototype.writeFloatLE=function(t,n,o){return pd(this,t,n,!0,o)};Wt.prototype.writeFloatBE=function(t,n,o){return pd(this,t,n,!1,o)};function hd(e,t,n,o,a){return t=+t,n=n>>>0,a||fd(e,t,n,8,17976931348623157e292,-17976931348623157e292),oa.write(e,t,n,o,52,8),n+8}Wt.prototype.writeDoubleLE=function(t,n,o){return hd(this,t,n,!0,o)};Wt.prototype.writeDoubleBE=function(t,n,o){return hd(this,t,n,!1,o)};Wt.prototype.copy=function(t,n,o,a){if(!Wt.isBuffer(t))throw new TypeError("argument should be a Buffer");if(o||(o=0),!a&&a!==0&&(a=this.length),n>=t.length&&(n=t.length),n||(n=0),a>0&&a<o&&(a=o),a===o||t.length===0||this.length===0)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(o<0||o>=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),t.length-n<a-o&&(a=t.length-n+o);let i=a-o;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(n,o,a):Uint8Array.prototype.set.call(t,this.subarray(o,a),n),i};Wt.prototype.fill=function(t,n,o,a){if(typeof t=="string"){if(typeof n=="string"?(a=n,n=0,o=this.length):typeof o=="string"&&(a=o,o=this.length),a!==void 0&&typeof a!="string")throw new TypeError("encoding must be a string");if(typeof a=="string"&&!Wt.isEncoding(a))throw new TypeError("Unknown encoding: "+a);if(t.length===1){let s=t.charCodeAt(0);(a==="utf8"&&s<128||a==="latin1")&&(t=s)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(n<0||this.length<n||this.length<o)throw new RangeError("Out of range index");if(o<=n)return this;n=n>>>0,o=o===void 0?this.length:o>>>0,t||(t=0);let i;if(typeof t=="number")for(i=n;i<o;++i)this[i]=t;else{let s=Wt.isBuffer(t)?t:Wt.from(t,a),f=s.length;if(f===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<o-n;++i)this[i+n]=s[i%f]}return this};var na={};function Cl(e,t,n){na[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(a){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:a,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}Cl("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);Cl("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);Cl("ERR_OUT_OF_RANGE",function(e,t,n){let o=`The value of "${e}" is out of range.`,a=n;return Number.isInteger(n)&&Math.abs(n)>2**32?a=nd(String(n)):typeof n=="bigint"&&(a=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(a=nd(a)),a+="n"),o+=` It must be ${t}. Received ${a}`,o},RangeError);function nd(e){let t="",n=e.length,o=e[0]==="-"?1:0;for(;n>=o+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function gb(e,t,n){ia(t,"offset"),(e[t]===void 0||e[t+n]===void 0)&&es(t,e.length-(n+1))}function dd(e,t,n,o,a,i){if(e>n||e<t){let s=typeof t=="bigint"?"n":"",f;throw i>3?t===0||t===BigInt(0)?f=`>= 0${s} and < 2${s} ** ${(i+1)*8}${s}`:f=`>= -(2${s} ** ${(i+1)*8-1}${s}) and < 2 ** ${(i+1)*8-1}${s}`:f=`>= ${t}${s} and <= ${n}${s}`,new na.ERR_OUT_OF_RANGE("value",f,e)}gb(o,a,i)}function ia(e,t){if(typeof e!="number")throw new na.ERR_INVALID_ARG_TYPE(t,"number",e)}function es(e,t,n){throw Math.floor(e)!==e?(ia(e,n),new na.ERR_OUT_OF_RANGE(n||"offset","an integer",e)):t<0?new na.ERR_BUFFER_OUT_OF_BOUNDS:new na.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}var vb=/[^+/0-9A-Za-z-_]/g;function bb(e){if(e=e.split("=")[0],e=e.trim().replace(vb,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function xl(e,t){t=t||1/0;let n,o=e.length,a=null,i=[];for(let s=0;s<o;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===o){(t-=3)>-1&&i.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),a=n;continue}n=(a-55296<<10|n-56320)+65536}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw new Error("Invalid code point")}return i}function wb(e){let t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function Sb(e,t){let n,o,a,i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),o=n>>8,a=n%256,i.push(a),i.push(o);return i}function yd(e){return kl.toByteArray(bb(e))}function hu(e,t,n,o){let a;for(a=0;a<o&&!(a+n>=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function No(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Bl(e){return e!==e}var Ab=function(){let e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){let o=n*16;for(let a=0;a<16;++a)t[o+a]=e[n]+e[a]}return t}();function ui(e){return typeof BigInt>"u"?_b:e}function _b(){throw new Error("BigInt not supported")}});var $n=Jt((rs,jl)=>{(function(e,t){typeof rs=="object"&&typeof jl=="object"?jl.exports=t():typeof define=="function"&&define.amd?define([],t):typeof rs=="object"?rs.XDR=t():e.XDR=t()})(rs,()=>(()=>{var e={616:(o,a,i)=>{"use strict";i.d(a,{A:()=>f});var s=i(287);s.hp.alloc(1).subarray(0,1)instanceof s.hp||(s.hp.prototype.subarray=function(u,r){let _=Uint8Array.prototype.subarray.call(this,u,r);return Object.setPrototypeOf(_,s.hp.prototype),_});let f=s.hp},281:(o,a,i)=>{let s=i(164);o.exports=s},164:(o,a,i)=>{"use strict";i.r(a),i.d(a,{Array:()=>Ee,Bool:()=>P,Double:()=>S,Enum:()=>de,Float:()=>I,Hyper:()=>C,Int:()=>V,LargeInt:()=>le,Opaque:()=>K,Option:()=>Oe,Quadruple:()=>m,Reference:()=>we,String:()=>x,Struct:()=>Qe,Union:()=>We,UnsignedHyper:()=>ae,UnsignedInt:()=>X,VarArray:()=>Fe,VarOpaque:()=>oe,Void:()=>$,XdrReader:()=>d,XdrWriter:()=>w,config:()=>v});class s extends TypeError{constructor(O){super(`XDR Write Error: ${O}`)}}class f extends TypeError{constructor(O){super(`XDR Read Error: ${O}`)}}class u extends TypeError{constructor(O){super(`XDR Type Definition Error: ${O}`)}}class r extends u{constructor(){super("method not implemented, it should be overloaded in the descendant class.")}}var _=i(616).A;class d{constructor(O){if(!_.isBuffer(O)){if(!(O instanceof Array||Array.isArray(O)||ArrayBuffer.isView(O)))throw new f(`source invalid: ${O}`);O=_.from(O)}this._buffer=O,this._length=O.length,this._index=0}_buffer;_length;_index;get eof(){return this._index===this._length}advance(O){let h=this._index;if(this._index+=O,this._length<this._index)throw new f("attempt to read outside the boundary of the buffer");let k=4-(O%4||4);if(k>0){for(let U=0;U<k;U++)if(this._buffer[this._index+U]!==0)throw new f("invalid padding");this._index+=k}return h}rewind(){this._index=0}read(O){let h=this.advance(O);return this._buffer.subarray(h,h+O)}readInt32BE(){return this._buffer.readInt32BE(this.advance(4))}readUInt32BE(){return this._buffer.readUInt32BE(this.advance(4))}readBigInt64BE(){return this._buffer.readBigInt64BE(this.advance(8))}readBigUInt64BE(){return this._buffer.readBigUInt64BE(this.advance(8))}readFloatBE(){return this._buffer.readFloatBE(this.advance(4))}readDoubleBE(){return this._buffer.readDoubleBE(this.advance(8))}ensureInputConsumed(){if(this._index!==this._length)throw new f("invalid XDR contract typecast - source buffer not entirely consumed")}}var b=i(616).A;let T=8192;class w{constructor(O){typeof O=="number"?O=b.allocUnsafe(O):O instanceof b||(O=b.allocUnsafe(T)),this._buffer=O,this._length=O.length}_buffer;_length;_index=0;alloc(O){let h=this._index;return this._index+=O,this._length<this._index&&this.resize(this._index),h}resize(O){let h=Math.ceil(O/T)*T,k=b.allocUnsafe(h);this._buffer.copy(k,0,0,this._length),this._buffer=k,this._length=h}finalize(){return this._buffer.subarray(0,this._index)}toArray(){return[...this.finalize()]}write(O,h){if(typeof O=="string"){let U=this.alloc(h);this._buffer.write(O,U,"utf8")}else{O instanceof b||(O=b.from(O));let U=this.alloc(h);O.copy(this._buffer,U,0,h)}let k=4-(h%4||4);if(k>0){let U=this.alloc(k);this._buffer.fill(0,U,this._index)}}writeInt32BE(O){let h=this.alloc(4);this._buffer.writeInt32BE(O,h)}writeUInt32BE(O){let h=this.alloc(4);this._buffer.writeUInt32BE(O,h)}writeBigInt64BE(O){let h=this.alloc(8);this._buffer.writeBigInt64BE(O,h)}writeBigUInt64BE(O){let h=this.alloc(8);this._buffer.writeBigUInt64BE(O,h)}writeFloatBE(O){let h=this.alloc(4);this._buffer.writeFloatBE(O,h)}writeDoubleBE(O){let h=this.alloc(8);this._buffer.writeDoubleBE(O,h)}static bufferChunkSize=T}var g=i(616).A;class p{toXDR(O="raw"){if(!this.write)return this.constructor.toXDR(this,O);let h=new w;return this.write(this,h),N(h.finalize(),O)}fromXDR(O,h="raw"){if(!this.read)return this.constructor.fromXDR(O,h);let k=new d(F(O,h)),U=this.read(k);return k.ensureInputConsumed(),U}validateXDR(O,h="raw"){try{return this.fromXDR(O,h),!0}catch{return!1}}static toXDR(O,h="raw"){let k=new w;return this.write(O,k),N(k.finalize(),h)}static fromXDR(O,h="raw"){let k=new d(F(O,h)),U=this.read(k);return k.ensureInputConsumed(),U}static validateXDR(O,h="raw"){try{return this.fromXDR(O,h),!0}catch{return!1}}}class A extends p{static read(O){throw new r}static write(O,h){throw new r}static isValid(O){return!1}}class L extends p{isValid(O){return!1}}class E extends TypeError{constructor(O){super(`Invalid format ${O}, must be one of "raw", "hex", "base64"`)}}function N(B,O){switch(O){case"raw":return B;case"hex":return B.toString("hex");case"base64":return B.toString("base64");default:throw new E(O)}}function F(B,O){switch(O){case"raw":return B;case"hex":return g.from(B,"hex");case"base64":return g.from(B,"base64");default:throw new E(O)}}let R=2147483647,j=-2147483648;class V extends A{static read(O){return O.readInt32BE()}static write(O,h){if(typeof O!="number")throw new s("not a number");if((0|O)!==O)throw new s("invalid i32 value");h.writeInt32BE(O)}static isValid(O){return typeof O=="number"&&(0|O)===O&&O>=j&&O<=R}}function Y(B,O,h){if(typeof B!="bigint")throw new TypeError("Expected bigint 'value', got "+typeof B);let k=O/h;if(k===1)return[B];if(h<32||h>128||k!==2&&k!==4&&k!==8)throw new TypeError(`invalid bigint (${B}) and slice size (${O} -> ${h}) combination`);let U=BigInt(h),M=new Array(k);for(let J=0;J<k;J++)M[J]=BigInt.asIntN(h,B),B>>=U;return M}function me(B,O){if(O)return[0n,(1n<<BigInt(B))-1n];let h=1n<<BigInt(B-1);return[0n-h,h-1n]}V.MAX_VALUE=R,V.MIN_VALUE=2147483648;class le extends A{constructor(O){super(),this._value=function(h,k,U){h instanceof Array?h.length&&h[0]instanceof Array&&(h=h[0]):h=[h];let M=k/h.length;switch(M){case 32:case 64:case 128:case 256:break;default:throw new RangeError(`expected slices to fit in 32/64/128/256 bits, got ${h}`)}try{for(let tt=0;tt<h.length;tt++)typeof h[tt]!="bigint"&&(h[tt]=BigInt(h[tt].valueOf()))}catch(tt){throw new TypeError(`expected bigint-like values, got: ${h} (${tt})`)}if(U&&h.length===1&&h[0]<0n)throw new RangeError(`expected a positive value, got: ${h}`);let J=BigInt.asUintN(M,h[0]);for(let tt=1;tt<h.length;tt++)J|=BigInt.asUintN(M,h[tt])<<BigInt(tt*M);U||(J=BigInt.asIntN(k,J));let[pe,Ne]=me(k,U);if(J>=pe&&J<=Ne)return J;throw new TypeError(`bigint values [${h}] for ${function(tt,bt){return`${bt?"u":"i"}${tt}`}(k,U)} out of range [${pe}, ${Ne}]: ${J}`)}(O,this.size,this.unsigned)}get unsigned(){throw new r}get size(){throw new r}slice(O){return Y(this._value,this.size,O)}toString(){return this._value.toString()}toJSON(){return{_value:this._value.toString()}}toBigInt(){return BigInt(this._value)}static read(O){let{size:h}=this.prototype;return h===64?new this(O.readBigUInt64BE()):new this(...Array.from({length:h/64},()=>O.readBigUInt64BE()).reverse())}static write(O,h){if(O instanceof this)O=O._value;else if(typeof O!="bigint"||O>this.MAX_VALUE||O<this.MIN_VALUE)throw new s(`${O} is not a ${this.name}`);let{unsigned:k,size:U}=this.prototype;if(U===64)k?h.writeBigUInt64BE(O):h.writeBigInt64BE(O);else for(let M of Y(O,U,64).reverse())k?h.writeBigUInt64BE(M):h.writeBigInt64BE(M)}static isValid(O){return typeof O=="bigint"||O instanceof this}static fromString(O){return new this(O)}static MAX_VALUE=0n;static MIN_VALUE=0n;static defineIntBoundaries(){let[O,h]=me(this.prototype.size,this.prototype.unsigned);this.MIN_VALUE=O,this.MAX_VALUE=h}}class C extends le{constructor(...O){super(O)}get low(){return Number(0xffffffffn&this._value)<<0}get high(){return Number(this._value>>32n)>>0}get size(){return 64}get unsigned(){return!1}static fromBits(O,h){return new this(O,h)}}C.defineIntBoundaries();let q=4294967295;class X extends A{static read(O){return O.readUInt32BE()}static write(O,h){if(typeof O!="number"||!(O>=0&&O<=q)||O%1!=0)throw new s("invalid u32 value");h.writeUInt32BE(O)}static isValid(O){return typeof O=="number"&&O%1==0&&O>=0&&O<=q}}X.MAX_VALUE=q,X.MIN_VALUE=0;class ae extends le{constructor(...O){super(O)}get low(){return Number(0xffffffffn&this._value)<<0}get high(){return Number(this._value>>32n)>>0}get size(){return 64}get unsigned(){return!0}static fromBits(O,h){return new this(O,h)}}ae.defineIntBoundaries();class I extends A{static read(O){return O.readFloatBE()}static write(O,h){if(typeof O!="number")throw new s("not a number");h.writeFloatBE(O)}static isValid(O){return typeof O=="number"}}class S extends A{static read(O){return O.readDoubleBE()}static write(O,h){if(typeof O!="number")throw new s("not a number");h.writeDoubleBE(O)}static isValid(O){return typeof O=="number"}}class m extends A{static read(){throw new u("quadruple not supported")}static write(){throw new u("quadruple not supported")}static isValid(){return!1}}class P extends A{static read(O){let h=V.read(O);switch(h){case 0:return!1;case 1:return!0;default:throw new f(`got ${h} when trying to read a bool`)}}static write(O,h){let k=O?1:0;V.write(k,h)}static isValid(O){return typeof O=="boolean"}}var l=i(616).A;class x extends L{constructor(O=X.MAX_VALUE){super(),this._maxLength=O}read(O){let h=X.read(O);if(h>this._maxLength)throw new f(`saw ${h} length String, max allowed is ${this._maxLength}`);return O.read(h)}readString(O){return this.read(O).toString("utf8")}write(O,h){let k=typeof O=="string"?l.byteLength(O,"utf8"):O.length;if(k>this._maxLength)throw new s(`got ${O.length} bytes, max allowed is ${this._maxLength}`);X.write(k,h),h.write(O,k)}isValid(O){return typeof O=="string"?l.byteLength(O,"utf8")<=this._maxLength:!!(O instanceof Array||l.isBuffer(O))&&O.length<=this._maxLength}}var W=i(616).A;class K extends L{constructor(O){super(),this._length=O}read(O){return O.read(this._length)}write(O,h){let{length:k}=O;if(k!==this._length)throw new s(`got ${O.length} bytes, expected ${this._length}`);h.write(O,k)}isValid(O){return W.isBuffer(O)&&O.length===this._length}}var re=i(616).A;class oe extends L{constructor(O=X.MAX_VALUE){super(),this._maxLength=O}read(O){let h=X.read(O);if(h>this._maxLength)throw new f(`saw ${h} length VarOpaque, max allowed is ${this._maxLength}`);return O.read(h)}write(O,h){let{length:k}=O;if(O.length>this._maxLength)throw new s(`got ${O.length} bytes, max allowed is ${this._maxLength}`);X.write(k,h),h.write(O,k)}isValid(O){return re.isBuffer(O)&&O.length<=this._maxLength}}class Ee extends L{constructor(O,h){super(),this._childType=O,this._length=h}read(O){let h=new i.g.Array(this._length);for(let k=0;k<this._length;k++)h[k]=this._childType.read(O);return h}write(O,h){if(!(O instanceof i.g.Array))throw new s("value is not array");if(O.length!==this._length)throw new s(`got array of size ${O.length}, expected ${this._length}`);for(let k of O)this._childType.write(k,h)}isValid(O){if(!(O instanceof i.g.Array)||O.length!==this._length)return!1;for(let h of O)if(!this._childType.isValid(h))return!1;return!0}}class Fe extends L{constructor(O,h=X.MAX_VALUE){super(),this._childType=O,this._maxLength=h}read(O){let h=X.read(O);if(h>this._maxLength)throw new f(`saw ${h} length VarArray, max allowed is ${this._maxLength}`);let k=new Array(h);for(let U=0;U<h;U++)k[U]=this._childType.read(O);return k}write(O,h){if(!(O instanceof Array))throw new s("value is not array");if(O.length>this._maxLength)throw new s(`got array of size ${O.length}, max allowed is ${this._maxLength}`);X.write(O.length,h);for(let k of O)this._childType.write(k,h)}isValid(O){if(!(O instanceof Array)||O.length>this._maxLength)return!1;for(let h of O)if(!this._childType.isValid(h))return!1;return!0}}class Oe extends A{constructor(O){super(),this._childType=O}read(O){if(P.read(O))return this._childType.read(O)}write(O,h){let k=O!=null;P.write(k,h),k&&this._childType.write(O,h)}isValid(O){return O==null||this._childType.isValid(O)}}class $ extends A{static read(){}static write(O){if(O!==void 0)throw new s("trying to write value to a void slot")}static isValid(O){return O===void 0}}class de extends A{constructor(O,h){super(),this.name=O,this.value=h}static read(O){let h=V.read(O),k=this._byValue[h];if(k===void 0)throw new f(`unknown ${this.enumName} member for value ${h}`);return k}static write(O,h){if(!(O instanceof this))throw new s(`unknown ${O} is not a ${this.enumName}`);V.write(O.value,h)}static isValid(O){return O instanceof this}static members(){return this._members}static values(){return Object.values(this._members)}static fromName(O){let h=this._members[O];if(!h)throw new TypeError(`${O} is not a member of ${this.enumName}`);return h}static fromValue(O){let h=this._byValue[O];if(h===void 0)throw new TypeError(`${O} is not a value of any member of ${this.enumName}`);return h}static create(O,h,k){let U=class extends de{};U.enumName=h,O.results[h]=U,U._members={},U._byValue={};for(let[M,J]of Object.entries(k)){let pe=new U(M,J);U._members[M]=pe,U._byValue[J]=pe,U[M]=()=>pe}return U}}class we extends A{resolve(){throw new u('"resolve" method should be implemented in the descendant class')}}class Qe extends A{constructor(O){super(),this._attributes=O||{}}static read(O){let h={};for(let[k,U]of this._fields)h[k]=U.read(O);return new this(h)}static write(O,h){if(!(O instanceof this))throw new s(`${O} is not a ${this.structName}`);for(let[k,U]of this._fields){let M=O._attributes[k];U.write(M,h)}}static isValid(O){return O instanceof this}static create(O,h,k){let U=class extends Qe{};U.structName=h,O.results[h]=U;let M=new Array(k.length);for(let J=0;J<k.length;J++){let pe=k[J],Ne=pe[0],tt=pe[1];tt instanceof we&&(tt=tt.resolve(O)),M[J]=[Ne,tt],U.prototype[Ne]=ze(Ne)}return U._fields=M,U}}function ze(B){return function(O){return O!==void 0&&(this._attributes[B]=O),this._attributes[B]}}class We extends L{constructor(O,h){super(),this.set(O,h)}set(O,h){typeof O=="string"&&(O=this.constructor._switchOn.fromName(O)),this._switch=O;let k=this.constructor.armForSwitch(this._switch);this._arm=k,this._armType=k===$?$:this.constructor._arms[k],this._value=h}get(O=this._arm){if(this._arm!==$&&this._arm!==O)throw new TypeError(`${O} not set`);return this._value}switch(){return this._switch}arm(){return this._arm}armType(){return this._armType}value(){return this._value}static armForSwitch(O){let h=this._switches.get(O);if(h!==void 0)return h;if(this._defaultArm)return this._defaultArm;throw new TypeError(`Bad union switch: ${O}`)}static armTypeForArm(O){return O===$?$:this._arms[O]}static read(O){let h=this._switchOn.read(O),k=this.armForSwitch(h),U=k===$?$:this._arms[k],M;return M=U!==void 0?U.read(O):k.read(O),new this(h,M)}static write(O,h){if(!(O instanceof this))throw new s(`${O} is not a ${this.unionName}`);this._switchOn.write(O.switch(),h),O.armType().write(O.value(),h)}static isValid(O){return O instanceof this}static create(O,h,k){let U=class extends We{};U.unionName=h,O.results[h]=U,k.switchOn instanceof we?U._switchOn=k.switchOn.resolve(O):U._switchOn=k.switchOn,U._switches=new Map,U._arms={};let M=k.defaultArm;M instanceof we&&(M=M.resolve(O)),U._defaultArm=M;for(let[J,pe]of k.switches){let Ne=typeof J=="string"?U._switchOn.fromName(J):J;U._switches.set(Ne,pe)}if(U._switchOn.values!==void 0)for(let J of U._switchOn.values())U[J.name]=function(pe){return new U(J,pe)},U.prototype[J.name]=function(pe){return this.set(J,pe)};if(k.arms)for(let[J,pe]of Object.entries(k.arms))U._arms[J]=pe instanceof we?pe.resolve(O):pe,pe!==$&&(U.prototype[J]=function(){return this.get(J)});return U}}class et extends we{constructor(O){super(),this.name=O}resolve(O){return O.definitions[this.name].resolve(O)}}class Be extends we{constructor(O,h,k=!1){super(),this.childReference=O,this.length=h,this.variable=k}resolve(O){let h=this.childReference,k=this.length;return h instanceof we&&(h=h.resolve(O)),k instanceof we&&(k=k.resolve(O)),this.variable?new Fe(h,k):new Ee(h,k)}}class Re extends we{constructor(O){super(),this.childReference=O,this.name=O.name}resolve(O){let h=this.childReference;return h instanceof we&&(h=h.resolve(O)),new Oe(h)}}class $e extends we{constructor(O,h){super(),this.sizedType=O,this.length=h}resolve(O){let h=this.length;return h instanceof we&&(h=h.resolve(O)),new this.sizedType(h)}}class ve{constructor(O,h,k){this.constructor=O,this.name=h,this.config=k}resolve(O){return this.name in O.results?O.results[this.name]:this.constructor(O,this.name,this.config)}}function ue(B,O,h){return h instanceof we&&(h=h.resolve(B)),B.results[O]=h,h}function c(B,O,h){return B.results[O]=h,h}class y{constructor(O){this._destination=O,this._definitions={}}enum(O,h){let k=new ve(de.create,O,h);this.define(O,k)}struct(O,h){let k=new ve(Qe.create,O,h);this.define(O,k)}union(O,h){let k=new ve(We.create,O,h);this.define(O,k)}typedef(O,h){let k=new ve(ue,O,h);this.define(O,k)}const(O,h){let k=new ve(c,O,h);this.define(O,k)}void(){return $}bool(){return P}int(){return V}hyper(){return C}uint(){return X}uhyper(){return ae}float(){return I}double(){return S}quadruple(){return m}string(O){return new $e(x,O)}opaque(O){return new $e(K,O)}varOpaque(O){return new $e(oe,O)}array(O,h){return new Be(O,h)}varArray(O,h){return new Be(O,h,!0)}option(O){return new Re(O)}define(O,h){if(this._destination[O]!==void 0)throw new u(`${O} is already defined`);this._definitions[O]=h}lookup(O){return new et(O)}resolve(){for(let O of Object.values(this._definitions))O.resolve({definitions:this._definitions,results:this._destination})}}function v(B,O={}){if(B){let h=new y(O);B(h),h.resolve()}return O}},526:(o,a)=>{"use strict";a.byteLength=function(b){var T=_(b),w=T[0],g=T[1];return 3*(w+g)/4-g},a.toByteArray=function(b){var T,w,g=_(b),p=g[0],A=g[1],L=new f(function(F,R,j){return 3*(R+j)/4-j}(0,p,A)),E=0,N=A>0?p-4:p;for(w=0;w<N;w+=4)T=s[b.charCodeAt(w)]<<18|s[b.charCodeAt(w+1)]<<12|s[b.charCodeAt(w+2)]<<6|s[b.charCodeAt(w+3)],L[E++]=T>>16&255,L[E++]=T>>8&255,L[E++]=255&T;return A===2&&(T=s[b.charCodeAt(w)]<<2|s[b.charCodeAt(w+1)]>>4,L[E++]=255&T),A===1&&(T=s[b.charCodeAt(w)]<<10|s[b.charCodeAt(w+1)]<<4|s[b.charCodeAt(w+2)]>>2,L[E++]=T>>8&255,L[E++]=255&T),L},a.fromByteArray=function(b){for(var T,w=b.length,g=w%3,p=[],A=16383,L=0,E=w-g;L<E;L+=A)p.push(d(b,L,L+A>E?E:L+A));return g===1?(T=b[w-1],p.push(i[T>>2]+i[T<<4&63]+"==")):g===2&&(T=(b[w-2]<<8)+b[w-1],p.push(i[T>>10]+i[T>>4&63]+i[T<<2&63]+"=")),p.join("")};for(var i=[],s=[],f=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0;r<64;++r)i[r]=u[r],s[u.charCodeAt(r)]=r;function _(b){var T=b.length;if(T%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=b.indexOf("=");return w===-1&&(w=T),[w,w===T?0:4-w%4]}function d(b,T,w){for(var g,p,A=[],L=T;L<w;L+=3)g=(b[L]<<16&16711680)+(b[L+1]<<8&65280)+(255&b[L+2]),A.push(i[(p=g)>>18&63]+i[p>>12&63]+i[p>>6&63]+i[63&p]);return A.join("")}s[45]=62,s[95]=63},287:(o,a,i)=>{"use strict";let s=i(526),f=i(251),u=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.hp=d,a.IS=50;let r=2147483647;function _(c){if(c>r)throw new RangeError('The value "'+c+'" is invalid for option "size"');let y=new Uint8Array(c);return Object.setPrototypeOf(y,d.prototype),y}function d(c,y,v){if(typeof c=="number"){if(typeof y=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(c)}return b(c,y,v)}function b(c,y,v){if(typeof c=="string")return function(h,k){if(typeof k=="string"&&k!==""||(k="utf8"),!d.isEncoding(k))throw new TypeError("Unknown encoding: "+k);let U=0|L(h,k),M=_(U),J=M.write(h,k);return J!==U&&(M=M.slice(0,J)),M}(c,y);if(ArrayBuffer.isView(c))return function(h){if(Be(h,Uint8Array)){let k=new Uint8Array(h);return p(k.buffer,k.byteOffset,k.byteLength)}return g(h)}(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c);if(Be(c,ArrayBuffer)||c&&Be(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Be(c,SharedArrayBuffer)||c&&Be(c.buffer,SharedArrayBuffer)))return p(c,y,v);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let B=c.valueOf&&c.valueOf();if(B!=null&&B!==c)return d.from(B,y,v);let O=function(h){if(d.isBuffer(h)){let k=0|A(h.length),U=_(k);return U.length===0||h.copy(U,0,0,k),U}if(h.length!==void 0)return typeof h.length!="number"||Re(h.length)?_(0):g(h);if(h.type==="Buffer"&&Array.isArray(h.data))return g(h.data)}(c);if(O)return O;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return d.from(c[Symbol.toPrimitive]("string"),y,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c)}function T(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function w(c){return T(c),_(c<0?0:0|A(c))}function g(c){let y=c.length<0?0:0|A(c.length),v=_(y);for(let B=0;B<y;B+=1)v[B]=255&c[B];return v}function p(c,y,v){if(y<0||c.byteLength<y)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<y+(v||0))throw new RangeError('"length" is outside of buffer bounds');let B;return B=y===void 0&&v===void 0?new Uint8Array(c):v===void 0?new Uint8Array(c,y):new Uint8Array(c,y,v),Object.setPrototypeOf(B,d.prototype),B}function A(c){if(c>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|c}function L(c,y){if(d.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||Be(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof c);let v=c.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&v===0)return 0;let O=!1;for(;;)switch(y){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return ze(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*v;case"hex":return v>>>1;case"base64":return We(c).length;default:if(O)return B?-1:ze(c).length;y=(""+y).toLowerCase(),O=!0}}function E(c,y,v){let B=!1;if((y===void 0||y<0)&&(y=0),y>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0)<=(y>>>=0))return"";for(c||(c="utf8");;)switch(c){case"hex":return S(this,y,v);case"utf8":case"utf-8":return q(this,y,v);case"ascii":return ae(this,y,v);case"latin1":case"binary":return I(this,y,v);case"base64":return C(this,y,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,y,v);default:if(B)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),B=!0}}function N(c,y,v){let B=c[y];c[y]=c[v],c[v]=B}function F(c,y,v,B,O){if(c.length===0)return-1;if(typeof v=="string"?(B=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),Re(v=+v)&&(v=O?0:c.length-1),v<0&&(v=c.length+v),v>=c.length){if(O)return-1;v=c.length-1}else if(v<0){if(!O)return-1;v=0}if(typeof y=="string"&&(y=d.from(y,B)),d.isBuffer(y))return y.length===0?-1:R(c,y,v,B,O);if(typeof y=="number")return y&=255,typeof Uint8Array.prototype.indexOf=="function"?O?Uint8Array.prototype.indexOf.call(c,y,v):Uint8Array.prototype.lastIndexOf.call(c,y,v):R(c,[y],v,B,O);throw new TypeError("val must be string, number or Buffer")}function R(c,y,v,B,O){let h,k=1,U=c.length,M=y.length;if(B!==void 0&&((B=String(B).toLowerCase())==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(c.length<2||y.length<2)return-1;k=2,U/=2,M/=2,v/=2}function J(pe,Ne){return k===1?pe[Ne]:pe.readUInt16BE(Ne*k)}if(O){let pe=-1;for(h=v;h<U;h++)if(J(c,h)===J(y,pe===-1?0:h-pe)){if(pe===-1&&(pe=h),h-pe+1===M)return pe*k}else pe!==-1&&(h-=h-pe),pe=-1}else for(v+M>U&&(v=U-M),h=v;h>=0;h--){let pe=!0;for(let Ne=0;Ne<M;Ne++)if(J(c,h+Ne)!==J(y,Ne)){pe=!1;break}if(pe)return h}return-1}function j(c,y,v,B){v=Number(v)||0;let O=c.length-v;B?(B=Number(B))>O&&(B=O):B=O;let h=y.length,k;for(B>h/2&&(B=h/2),k=0;k<B;++k){let U=parseInt(y.substr(2*k,2),16);if(Re(U))return k;c[v+k]=U}return k}function V(c,y,v,B){return et(ze(y,c.length-v),c,v,B)}function Y(c,y,v,B){return et(function(O){let h=[];for(let k=0;k<O.length;++k)h.push(255&O.charCodeAt(k));return h}(y),c,v,B)}function me(c,y,v,B){return et(We(y),c,v,B)}function le(c,y,v,B){return et(function(O,h){let k,U,M,J=[];for(let pe=0;pe<O.length&&!((h-=2)<0);++pe)k=O.charCodeAt(pe),U=k>>8,M=k%256,J.push(M),J.push(U);return J}(y,c.length-v),c,v,B)}function C(c,y,v){return y===0&&v===c.length?s.fromByteArray(c):s.fromByteArray(c.slice(y,v))}function q(c,y,v){v=Math.min(c.length,v);let B=[],O=y;for(;O<v;){let h=c[O],k=null,U=h>239?4:h>223?3:h>191?2:1;if(O+U<=v){let M,J,pe,Ne;switch(U){case 1:h<128&&(k=h);break;case 2:M=c[O+1],(192&M)==128&&(Ne=(31&h)<<6|63&M,Ne>127&&(k=Ne));break;case 3:M=c[O+1],J=c[O+2],(192&M)==128&&(192&J)==128&&(Ne=(15&h)<<12|(63&M)<<6|63&J,Ne>2047&&(Ne<55296||Ne>57343)&&(k=Ne));break;case 4:M=c[O+1],J=c[O+2],pe=c[O+3],(192&M)==128&&(192&J)==128&&(192&pe)==128&&(Ne=(15&h)<<18|(63&M)<<12|(63&J)<<6|63&pe,Ne>65535&&Ne<1114112&&(k=Ne))}}k===null?(k=65533,U=1):k>65535&&(k-=65536,B.push(k>>>10&1023|55296),k=56320|1023&k),B.push(k),O+=U}return function(h){let k=h.length;if(k<=X)return String.fromCharCode.apply(String,h);let U="",M=0;for(;M<k;)U+=String.fromCharCode.apply(String,h.slice(M,M+=X));return U}(B)}d.TYPED_ARRAY_SUPPORT=function(){try{let c=new Uint8Array(1),y={foo:function(){return 42}};return Object.setPrototypeOf(y,Uint8Array.prototype),Object.setPrototypeOf(c,y),c.foo()===42}catch{return!1}}(),d.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}}),d.poolSize=8192,d.from=function(c,y,v){return b(c,y,v)},Object.setPrototypeOf(d.prototype,Uint8Array.prototype),Object.setPrototypeOf(d,Uint8Array),d.alloc=function(c,y,v){return function(B,O,h){return T(B),B<=0?_(B):O!==void 0?typeof h=="string"?_(B).fill(O,h):_(B).fill(O):_(B)}(c,y,v)},d.allocUnsafe=function(c){return w(c)},d.allocUnsafeSlow=function(c){return w(c)},d.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==d.prototype},d.compare=function(c,y){if(Be(c,Uint8Array)&&(c=d.from(c,c.offset,c.byteLength)),Be(y,Uint8Array)&&(y=d.from(y,y.offset,y.byteLength)),!d.isBuffer(c)||!d.isBuffer(y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===y)return 0;let v=c.length,B=y.length;for(let O=0,h=Math.min(v,B);O<h;++O)if(c[O]!==y[O]){v=c[O],B=y[O];break}return v<B?-1:B<v?1:0},d.isEncoding=function(c){switch(String(c).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}},d.concat=function(c,y){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return d.alloc(0);let v;if(y===void 0)for(y=0,v=0;v<c.length;++v)y+=c[v].length;let B=d.allocUnsafe(y),O=0;for(v=0;v<c.length;++v){let h=c[v];if(Be(h,Uint8Array))O+h.length>B.length?(d.isBuffer(h)||(h=d.from(h)),h.copy(B,O)):Uint8Array.prototype.set.call(B,h,O);else{if(!d.isBuffer(h))throw new TypeError('"list" argument must be an Array of Buffers');h.copy(B,O)}O+=h.length}return B},d.byteLength=L,d.prototype._isBuffer=!0,d.prototype.swap16=function(){let c=this.length;if(c%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let y=0;y<c;y+=2)N(this,y,y+1);return this},d.prototype.swap32=function(){let c=this.length;if(c%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let y=0;y<c;y+=4)N(this,y,y+3),N(this,y+1,y+2);return this},d.prototype.swap64=function(){let c=this.length;if(c%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let y=0;y<c;y+=8)N(this,y,y+7),N(this,y+1,y+6),N(this,y+2,y+5),N(this,y+3,y+4);return this},d.prototype.toString=function(){let c=this.length;return c===0?"":arguments.length===0?q(this,0,c):E.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(c){if(!d.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c||d.compare(this,c)===0},d.prototype.inspect=function(){let c="",y=a.IS;return c=this.toString("hex",0,y).replace(/(.{2})/g,"$1 ").trim(),this.length>y&&(c+=" ... "),"<Buffer "+c+">"},u&&(d.prototype[u]=d.prototype.inspect),d.prototype.compare=function(c,y,v,B,O){if(Be(c,Uint8Array)&&(c=d.from(c,c.offset,c.byteLength)),!d.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof c);if(y===void 0&&(y=0),v===void 0&&(v=c?c.length:0),B===void 0&&(B=0),O===void 0&&(O=this.length),y<0||v>c.length||B<0||O>this.length)throw new RangeError("out of range index");if(B>=O&&y>=v)return 0;if(B>=O)return-1;if(y>=v)return 1;if(this===c)return 0;let h=(O>>>=0)-(B>>>=0),k=(v>>>=0)-(y>>>=0),U=Math.min(h,k),M=this.slice(B,O),J=c.slice(y,v);for(let pe=0;pe<U;++pe)if(M[pe]!==J[pe]){h=M[pe],k=J[pe];break}return h<k?-1:k<h?1:0},d.prototype.includes=function(c,y,v){return this.indexOf(c,y,v)!==-1},d.prototype.indexOf=function(c,y,v){return F(this,c,y,v,!0)},d.prototype.lastIndexOf=function(c,y,v){return F(this,c,y,v,!1)},d.prototype.write=function(c,y,v,B){if(y===void 0)B="utf8",v=this.length,y=0;else if(v===void 0&&typeof y=="string")B=y,v=this.length,y=0;else{if(!isFinite(y))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");y>>>=0,isFinite(v)?(v>>>=0,B===void 0&&(B="utf8")):(B=v,v=void 0)}let O=this.length-y;if((v===void 0||v>O)&&(v=O),c.length>0&&(v<0||y<0)||y>this.length)throw new RangeError("Attempt to write outside buffer bounds");B||(B="utf8");let h=!1;for(;;)switch(B){case"hex":return j(this,c,y,v);case"utf8":case"utf-8":return V(this,c,y,v);case"ascii":case"latin1":case"binary":return Y(this,c,y,v);case"base64":return me(this,c,y,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le(this,c,y,v);default:if(h)throw new TypeError("Unknown encoding: "+B);B=(""+B).toLowerCase(),h=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};let X=4096;function ae(c,y,v){let B="";v=Math.min(c.length,v);for(let O=y;O<v;++O)B+=String.fromCharCode(127&c[O]);return B}function I(c,y,v){let B="";v=Math.min(c.length,v);for(let O=y;O<v;++O)B+=String.fromCharCode(c[O]);return B}function S(c,y,v){let B=c.length;(!y||y<0)&&(y=0),(!v||v<0||v>B)&&(v=B);let O="";for(let h=y;h<v;++h)O+=$e[c[h]];return O}function m(c,y,v){let B=c.slice(y,v),O="";for(let h=0;h<B.length-1;h+=2)O+=String.fromCharCode(B[h]+256*B[h+1]);return O}function P(c,y,v){if(c%1!=0||c<0)throw new RangeError("offset is not uint");if(c+y>v)throw new RangeError("Trying to access beyond buffer length")}function l(c,y,v,B,O,h){if(!d.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(y>O||y<h)throw new RangeError('"value" argument is out of bounds');if(v+B>c.length)throw new RangeError("Index out of range")}function x(c,y,v,B,O){$(y,B,O,c,v,7);let h=Number(y&BigInt(4294967295));c[v++]=h,h>>=8,c[v++]=h,h>>=8,c[v++]=h,h>>=8,c[v++]=h;let k=Number(y>>BigInt(32)&BigInt(4294967295));return c[v++]=k,k>>=8,c[v++]=k,k>>=8,c[v++]=k,k>>=8,c[v++]=k,v}function W(c,y,v,B,O){$(y,B,O,c,v,7);let h=Number(y&BigInt(4294967295));c[v+7]=h,h>>=8,c[v+6]=h,h>>=8,c[v+5]=h,h>>=8,c[v+4]=h;let k=Number(y>>BigInt(32)&BigInt(4294967295));return c[v+3]=k,k>>=8,c[v+2]=k,k>>=8,c[v+1]=k,k>>=8,c[v]=k,v+8}function K(c,y,v,B,O,h){if(v+B>c.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function re(c,y,v,B,O){return y=+y,v>>>=0,O||K(c,0,v,4),f.write(c,y,v,B,23,4),v+4}function oe(c,y,v,B,O){return y=+y,v>>>=0,O||K(c,0,v,8),f.write(c,y,v,B,52,8),v+8}d.prototype.slice=function(c,y){let v=this.length;(c=~~c)<0?(c+=v)<0&&(c=0):c>v&&(c=v),(y=y===void 0?v:~~y)<0?(y+=v)<0&&(y=0):y>v&&(y=v),y<c&&(y=c);let B=this.subarray(c,y);return Object.setPrototypeOf(B,d.prototype),B},d.prototype.readUintLE=d.prototype.readUIntLE=function(c,y,v){c>>>=0,y>>>=0,v||P(c,y,this.length);let B=this[c],O=1,h=0;for(;++h<y&&(O*=256);)B+=this[c+h]*O;return B},d.prototype.readUintBE=d.prototype.readUIntBE=function(c,y,v){c>>>=0,y>>>=0,v||P(c,y,this.length);let B=this[c+--y],O=1;for(;y>0&&(O*=256);)B+=this[c+--y]*O;return B},d.prototype.readUint8=d.prototype.readUInt8=function(c,y){return c>>>=0,y||P(c,1,this.length),this[c]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(c,y){return c>>>=0,y||P(c,2,this.length),this[c]|this[c+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(c,y){return c>>>=0,y||P(c,2,this.length),this[c]<<8|this[c+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(c,y){return c>>>=0,y||P(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+16777216*this[c+3]},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(c,y){return c>>>=0,y||P(c,4,this.length),16777216*this[c]+(this[c+1]<<16|this[c+2]<<8|this[c+3])},d.prototype.readBigUInt64LE=ve(function(c){de(c>>>=0,"offset");let y=this[c],v=this[c+7];y!==void 0&&v!==void 0||we(c,this.length-8);let B=y+256*this[++c]+65536*this[++c]+this[++c]*2**24,O=this[++c]+256*this[++c]+65536*this[++c]+v*2**24;return BigInt(B)+(BigInt(O)<<BigInt(32))}),d.prototype.readBigUInt64BE=ve(function(c){de(c>>>=0,"offset");let y=this[c],v=this[c+7];y!==void 0&&v!==void 0||we(c,this.length-8);let B=y*2**24+65536*this[++c]+256*this[++c]+this[++c],O=this[++c]*2**24+65536*this[++c]+256*this[++c]+v;return(BigInt(B)<<BigInt(32))+BigInt(O)}),d.prototype.readIntLE=function(c,y,v){c>>>=0,y>>>=0,v||P(c,y,this.length);let B=this[c],O=1,h=0;for(;++h<y&&(O*=256);)B+=this[c+h]*O;return O*=128,B>=O&&(B-=Math.pow(2,8*y)),B},d.prototype.readIntBE=function(c,y,v){c>>>=0,y>>>=0,v||P(c,y,this.length);let B=y,O=1,h=this[c+--B];for(;B>0&&(O*=256);)h+=this[c+--B]*O;return O*=128,h>=O&&(h-=Math.pow(2,8*y)),h},d.prototype.readInt8=function(c,y){return c>>>=0,y||P(c,1,this.length),128&this[c]?-1*(255-this[c]+1):this[c]},d.prototype.readInt16LE=function(c,y){c>>>=0,y||P(c,2,this.length);let v=this[c]|this[c+1]<<8;return 32768&v?4294901760|v:v},d.prototype.readInt16BE=function(c,y){c>>>=0,y||P(c,2,this.length);let v=this[c+1]|this[c]<<8;return 32768&v?4294901760|v:v},d.prototype.readInt32LE=function(c,y){return c>>>=0,y||P(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},d.prototype.readInt32BE=function(c,y){return c>>>=0,y||P(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},d.prototype.readBigInt64LE=ve(function(c){de(c>>>=0,"offset");let y=this[c],v=this[c+7];y!==void 0&&v!==void 0||we(c,this.length-8);let B=this[c+4]+256*this[c+5]+65536*this[c+6]+(v<<24);return(BigInt(B)<<BigInt(32))+BigInt(y+256*this[++c]+65536*this[++c]+this[++c]*16777216)}),d.prototype.readBigInt64BE=ve(function(c){de(c>>>=0,"offset");let y=this[c],v=this[c+7];y!==void 0&&v!==void 0||we(c,this.length-8);let B=(y<<24)+65536*this[++c]+256*this[++c]+this[++c];return(BigInt(B)<<BigInt(32))+BigInt(this[++c]*16777216+65536*this[++c]+256*this[++c]+v)}),d.prototype.readFloatLE=function(c,y){return c>>>=0,y||P(c,4,this.length),f.read(this,c,!0,23,4)},d.prototype.readFloatBE=function(c,y){return c>>>=0,y||P(c,4,this.length),f.read(this,c,!1,23,4)},d.prototype.readDoubleLE=function(c,y){return c>>>=0,y||P(c,8,this.length),f.read(this,c,!0,52,8)},d.prototype.readDoubleBE=function(c,y){return c>>>=0,y||P(c,8,this.length),f.read(this,c,!1,52,8)},d.prototype.writeUintLE=d.prototype.writeUIntLE=function(c,y,v,B){c=+c,y>>>=0,v>>>=0,!B&&l(this,c,y,v,Math.pow(2,8*v)-1,0);let O=1,h=0;for(this[y]=255&c;++h<v&&(O*=256);)this[y+h]=c/O&255;return y+v},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(c,y,v,B){c=+c,y>>>=0,v>>>=0,!B&&l(this,c,y,v,Math.pow(2,8*v)-1,0);let O=v-1,h=1;for(this[y+O]=255&c;--O>=0&&(h*=256);)this[y+O]=c/h&255;return y+v},d.prototype.writeUint8=d.prototype.writeUInt8=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,1,255,0),this[y]=255&c,y+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,2,65535,0),this[y]=255&c,this[y+1]=c>>>8,y+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,2,65535,0),this[y]=c>>>8,this[y+1]=255&c,y+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,4,4294967295,0),this[y+3]=c>>>24,this[y+2]=c>>>16,this[y+1]=c>>>8,this[y]=255&c,y+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,4,4294967295,0),this[y]=c>>>24,this[y+1]=c>>>16,this[y+2]=c>>>8,this[y+3]=255&c,y+4},d.prototype.writeBigUInt64LE=ve(function(c,y=0){return x(this,c,y,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=ve(function(c,y=0){return W(this,c,y,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(c,y,v,B){if(c=+c,y>>>=0,!B){let U=Math.pow(2,8*v-1);l(this,c,y,v,U-1,-U)}let O=0,h=1,k=0;for(this[y]=255&c;++O<v&&(h*=256);)c<0&&k===0&&this[y+O-1]!==0&&(k=1),this[y+O]=(c/h>>0)-k&255;return y+v},d.prototype.writeIntBE=function(c,y,v,B){if(c=+c,y>>>=0,!B){let U=Math.pow(2,8*v-1);l(this,c,y,v,U-1,-U)}let O=v-1,h=1,k=0;for(this[y+O]=255&c;--O>=0&&(h*=256);)c<0&&k===0&&this[y+O+1]!==0&&(k=1),this[y+O]=(c/h>>0)-k&255;return y+v},d.prototype.writeInt8=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,1,127,-128),c<0&&(c=255+c+1),this[y]=255&c,y+1},d.prototype.writeInt16LE=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,2,32767,-32768),this[y]=255&c,this[y+1]=c>>>8,y+2},d.prototype.writeInt16BE=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,2,32767,-32768),this[y]=c>>>8,this[y+1]=255&c,y+2},d.prototype.writeInt32LE=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,4,2147483647,-2147483648),this[y]=255&c,this[y+1]=c>>>8,this[y+2]=c>>>16,this[y+3]=c>>>24,y+4},d.prototype.writeInt32BE=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[y]=c>>>24,this[y+1]=c>>>16,this[y+2]=c>>>8,this[y+3]=255&c,y+4},d.prototype.writeBigInt64LE=ve(function(c,y=0){return x(this,c,y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=ve(function(c,y=0){return W(this,c,y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeFloatLE=function(c,y,v){return re(this,c,y,!0,v)},d.prototype.writeFloatBE=function(c,y,v){return re(this,c,y,!1,v)},d.prototype.writeDoubleLE=function(c,y,v){return oe(this,c,y,!0,v)},d.prototype.writeDoubleBE=function(c,y,v){return oe(this,c,y,!1,v)},d.prototype.copy=function(c,y,v,B){if(!d.isBuffer(c))throw new TypeError("argument should be a Buffer");if(v||(v=0),B||B===0||(B=this.length),y>=c.length&&(y=c.length),y||(y=0),B>0&&B<v&&(B=v),B===v||c.length===0||this.length===0)return 0;if(y<0)throw new RangeError("targetStart out of bounds");if(v<0||v>=this.length)throw new RangeError("Index out of range");if(B<0)throw new RangeError("sourceEnd out of bounds");B>this.length&&(B=this.length),c.length-y<B-v&&(B=c.length-y+v);let O=B-v;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(y,v,B):Uint8Array.prototype.set.call(c,this.subarray(v,B),y),O},d.prototype.fill=function(c,y,v,B){if(typeof c=="string"){if(typeof y=="string"?(B=y,y=0,v=this.length):typeof v=="string"&&(B=v,v=this.length),B!==void 0&&typeof B!="string")throw new TypeError("encoding must be a string");if(typeof B=="string"&&!d.isEncoding(B))throw new TypeError("Unknown encoding: "+B);if(c.length===1){let h=c.charCodeAt(0);(B==="utf8"&&h<128||B==="latin1")&&(c=h)}}else typeof c=="number"?c&=255:typeof c=="boolean"&&(c=Number(c));if(y<0||this.length<y||this.length<v)throw new RangeError("Out of range index");if(v<=y)return this;let O;if(y>>>=0,v=v===void 0?this.length:v>>>0,c||(c=0),typeof c=="number")for(O=y;O<v;++O)this[O]=c;else{let h=d.isBuffer(c)?c:d.from(c,B),k=h.length;if(k===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(O=0;O<v-y;++O)this[O+y]=h[O%k]}return this};let Ee={};function Fe(c,y,v){Ee[c]=class extends v{constructor(){super(),Object.defineProperty(this,"message",{value:y.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${c}]`,this.stack,delete this.name}get code(){return c}set code(B){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:B,writable:!0})}toString(){return`${this.name} [${c}]: ${this.message}`}}}function Oe(c){let y="",v=c.length,B=c[0]==="-"?1:0;for(;v>=B+4;v-=3)y=`_${c.slice(v-3,v)}${y}`;return`${c.slice(0,v)}${y}`}function $(c,y,v,B,O,h){if(c>v||c<y){let k=typeof y=="bigint"?"n":"",U;throw U=h>3?y===0||y===BigInt(0)?`>= 0${k} and < 2${k} ** ${8*(h+1)}${k}`:`>= -(2${k} ** ${8*(h+1)-1}${k}) and < 2 ** ${8*(h+1)-1}${k}`:`>= ${y}${k} and <= ${v}${k}`,new Ee.ERR_OUT_OF_RANGE("value",U,c)}(function(k,U,M){de(U,"offset"),k[U]!==void 0&&k[U+M]!==void 0||we(U,k.length-(M+1))})(B,O,h)}function de(c,y){if(typeof c!="number")throw new Ee.ERR_INVALID_ARG_TYPE(y,"number",c)}function we(c,y,v){throw Math.floor(c)!==c?(de(c,v),new Ee.ERR_OUT_OF_RANGE(v||"offset","an integer",c)):y<0?new Ee.ERR_BUFFER_OUT_OF_BOUNDS:new Ee.ERR_OUT_OF_RANGE(v||"offset",`>= ${v?1:0} and <= ${y}`,c)}Fe("ERR_BUFFER_OUT_OF_BOUNDS",function(c){return c?`${c} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Fe("ERR_INVALID_ARG_TYPE",function(c,y){return`The "${c}" argument must be of type number. Received type ${typeof y}`},TypeError),Fe("ERR_OUT_OF_RANGE",function(c,y,v){let B=`The value of "${c}" is out of range.`,O=v;return Number.isInteger(v)&&Math.abs(v)>4294967296?O=Oe(String(v)):typeof v=="bigint"&&(O=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(O=Oe(O)),O+="n"),B+=` It must be ${y}. Received ${O}`,B},RangeError);let Qe=/[^+/0-9A-Za-z-_]/g;function ze(c,y){let v;y=y||1/0;let B=c.length,O=null,h=[];for(let k=0;k<B;++k){if(v=c.charCodeAt(k),v>55295&&v<57344){if(!O){if(v>56319){(y-=3)>-1&&h.push(239,191,189);continue}if(k+1===B){(y-=3)>-1&&h.push(239,191,189);continue}O=v;continue}if(v<56320){(y-=3)>-1&&h.push(239,191,189),O=v;continue}v=65536+(O-55296<<10|v-56320)}else O&&(y-=3)>-1&&h.push(239,191,189);if(O=null,v<128){if((y-=1)<0)break;h.push(v)}else if(v<2048){if((y-=2)<0)break;h.push(v>>6|192,63&v|128)}else if(v<65536){if((y-=3)<0)break;h.push(v>>12|224,v>>6&63|128,63&v|128)}else{if(!(v<1114112))throw new Error("Invalid code point");if((y-=4)<0)break;h.push(v>>18|240,v>>12&63|128,v>>6&63|128,63&v|128)}}return h}function We(c){return s.toByteArray(function(y){if((y=(y=y.split("=")[0]).trim().replace(Qe,"")).length<2)return"";for(;y.length%4!=0;)y+="=";return y}(c))}function et(c,y,v,B){let O;for(O=0;O<B&&!(O+v>=y.length||O>=c.length);++O)y[O+v]=c[O];return O}function Be(c,y){return c instanceof y||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===y.name}function Re(c){return c!=c}let $e=function(){let c="0123456789abcdef",y=new Array(256);for(let v=0;v<16;++v){let B=16*v;for(let O=0;O<16;++O)y[B+O]=c[v]+c[O]}return y}();function ve(c){return typeof BigInt>"u"?ue:c}function ue(){throw new Error("BigInt not supported")}},251:(o,a)=>{a.read=function(i,s,f,u,r){var _,d,b=8*r-u-1,T=(1<<b)-1,w=T>>1,g=-7,p=f?r-1:0,A=f?-1:1,L=i[s+p];for(p+=A,_=L&(1<<-g)-1,L>>=-g,g+=b;g>0;_=256*_+i[s+p],p+=A,g-=8);for(d=_&(1<<-g)-1,_>>=-g,g+=u;g>0;d=256*d+i[s+p],p+=A,g-=8);if(_===0)_=1-w;else{if(_===T)return d?NaN:1/0*(L?-1:1);d+=Math.pow(2,u),_-=w}return(L?-1:1)*d*Math.pow(2,_-u)},a.write=function(i,s,f,u,r,_){var d,b,T,w=8*_-r-1,g=(1<<w)-1,p=g>>1,A=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,L=u?0:_-1,E=u?1:-1,N=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(b=isNaN(s)?1:0,d=g):(d=Math.floor(Math.log(s)/Math.LN2),s*(T=Math.pow(2,-d))<1&&(d--,T*=2),(s+=d+p>=1?A/T:A*Math.pow(2,1-p))*T>=2&&(d++,T/=2),d+p>=g?(b=0,d=g):d+p>=1?(b=(s*T-1)*Math.pow(2,r),d+=p):(b=s*Math.pow(2,p-1)*Math.pow(2,r),d=0));r>=8;i[f+L]=255&b,L+=E,b/=256,r-=8);for(d=d<<r|b,w+=r;w>0;i[f+L]=255&d,L+=E,d/=256,w-=8);i[f+L-E]|=128*N}}},t={};function n(o){var a=t[o];if(a!==void 0)return a.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}return n.d=(o,a)=>{for(var i in a)n.o(a,i)&&!n.o(o,i)&&Object.defineProperty(o,i,{enumerable:!0,get:a[i]})},n.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),n.o=(o,a)=>Object.prototype.hasOwnProperty.call(o,a),n.r=o=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},n(281)})())});var gd=Jt(du=>{"use strict";function Ll(e){"@babel/helpers - typeof";return Ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ll(e)}Object.defineProperty(du,"__esModule",{value:!0});du.default=void 0;var Eb=Tb($n());function md(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(md=function(a){return a?n:t})(e)}function Tb(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||Ll(e)!="object"&&typeof e!="function")return{default:e};var n=md(t);if(n&&n.has(e))return n.get(e);var o={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&{}.hasOwnProperty.call(e,i)){var s=a?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}var kb=Eb.config(function(e){var t=32,n=1024;e.typedef("Value",e.varOpaque()),e.struct("ScpBallot",[["counter",e.lookup("Uint32")],["value",e.lookup("Value")]]),e.enum("ScpStatementType",{scpStPrepare:0,scpStConfirm:1,scpStExternalize:2,scpStNominate:3}),e.struct("ScpNomination",[["quorumSetHash",e.lookup("Hash")],["votes",e.varArray(e.lookup("Value"),2147483647)],["accepted",e.varArray(e.lookup("Value"),2147483647)]]),e.struct("ScpStatementPrepare",[["quorumSetHash",e.lookup("Hash")],["ballot",e.lookup("ScpBallot")],["prepared",e.option(e.lookup("ScpBallot"))],["preparedPrime",e.option(e.lookup("ScpBallot"))],["nC",e.lookup("Uint32")],["nH",e.lookup("Uint32")]]),e.struct("ScpStatementConfirm",[["ballot",e.lookup("ScpBallot")],["nPrepared",e.lookup("Uint32")],["nCommit",e.lookup("Uint32")],["nH",e.lookup("Uint32")],["quorumSetHash",e.lookup("Hash")]]),e.struct("ScpStatementExternalize",[["commit",e.lookup("ScpBallot")],["nH",e.lookup("Uint32")],["commitQuorumSetHash",e.lookup("Hash")]]),e.union("ScpStatementPledges",{switchOn:e.lookup("ScpStatementType"),switchName:"type",switches:[["scpStPrepare","prepare"],["scpStConfirm","confirm"],["scpStExternalize","externalize"],["scpStNominate","nominate"]],arms:{prepare:e.lookup("ScpStatementPrepare"),confirm:e.lookup("ScpStatementConfirm"),externalize:e.lookup("ScpStatementExternalize"),nominate:e.lookup("ScpNomination")}}),e.struct("ScpStatement",[["nodeId",e.lookup("NodeId")],["slotIndex",e.lookup("Uint64")],["pledges",e.lookup("ScpStatementPledges")]]),e.struct("ScpEnvelope",[["statement",e.lookup("ScpStatement")],["signature",e.lookup("Signature")]]),e.struct("ScpQuorumSet",[["threshold",e.lookup("Uint32")],["validators",e.varArray(e.lookup("NodeId"),2147483647)],["innerSets",e.varArray(e.lookup("ScpQuorumSet"),2147483647)]]),e.typedef("Thresholds",e.opaque(4)),e.typedef("String32",e.string(32)),e.typedef("String64",e.string(64)),e.typedef("SequenceNumber",e.lookup("Int64")),e.typedef("DataValue",e.varOpaque(64)),e.typedef("PoolId",e.lookup("Hash")),e.typedef("AssetCode4",e.opaque(4)),e.typedef("AssetCode12",e.opaque(12)),e.enum("AssetType",{assetTypeNative:0,assetTypeCreditAlphanum4:1,assetTypeCreditAlphanum12:2,assetTypePoolShare:3}),e.union("AssetCode",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeCreditAlphanum4","assetCode4"],["assetTypeCreditAlphanum12","assetCode12"]],arms:{assetCode4:e.lookup("AssetCode4"),assetCode12:e.lookup("AssetCode12")}}),e.struct("AlphaNum4",[["assetCode",e.lookup("AssetCode4")],["issuer",e.lookup("AccountId")]]),e.struct("AlphaNum12",[["assetCode",e.lookup("AssetCode12")],["issuer",e.lookup("AccountId")]]),e.union("Asset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12")}}),e.struct("Price",[["n",e.lookup("Int32")],["d",e.lookup("Int32")]]),e.struct("Liabilities",[["buying",e.lookup("Int64")],["selling",e.lookup("Int64")]]),e.enum("ThresholdIndices",{thresholdMasterWeight:0,thresholdLow:1,thresholdMed:2,thresholdHigh:3}),e.enum("LedgerEntryType",{account:0,trustline:1,offer:2,data:3,claimableBalance:4,liquidityPool:5,contractData:6,contractCode:7,configSetting:8,ttl:9}),e.struct("Signer",[["key",e.lookup("SignerKey")],["weight",e.lookup("Uint32")]]),e.enum("AccountFlags",{authRequiredFlag:1,authRevocableFlag:2,authImmutableFlag:4,authClawbackEnabledFlag:8}),e.const("MASK_ACCOUNT_FLAGS",7),e.const("MASK_ACCOUNT_FLAGS_V17",15),e.const("MAX_SIGNERS",20),e.typedef("SponsorshipDescriptor",e.option(e.lookup("AccountId"))),e.struct("AccountEntryExtensionV3",[["ext",e.lookup("ExtensionPoint")],["seqLedger",e.lookup("Uint32")],["seqTime",e.lookup("TimePoint")]]),e.union("AccountEntryExtensionV2Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[3,"v3"]],arms:{v3:e.lookup("AccountEntryExtensionV3")}}),e.struct("AccountEntryExtensionV2",[["numSponsored",e.lookup("Uint32")],["numSponsoring",e.lookup("Uint32")],["signerSponsoringIDs",e.varArray(e.lookup("SponsorshipDescriptor"),e.lookup("MAX_SIGNERS"))],["ext",e.lookup("AccountEntryExtensionV2Ext")]]),e.union("AccountEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[2,"v2"]],arms:{v2:e.lookup("AccountEntryExtensionV2")}}),e.struct("AccountEntryExtensionV1",[["liabilities",e.lookup("Liabilities")],["ext",e.lookup("AccountEntryExtensionV1Ext")]]),e.union("AccountEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("AccountEntryExtensionV1")}}),e.struct("AccountEntry",[["accountId",e.lookup("AccountId")],["balance",e.lookup("Int64")],["seqNum",e.lookup("SequenceNumber")],["numSubEntries",e.lookup("Uint32")],["inflationDest",e.option(e.lookup("AccountId"))],["flags",e.lookup("Uint32")],["homeDomain",e.lookup("String32")],["thresholds",e.lookup("Thresholds")],["signers",e.varArray(e.lookup("Signer"),e.lookup("MAX_SIGNERS"))],["ext",e.lookup("AccountEntryExt")]]),e.enum("TrustLineFlags",{authorizedFlag:1,authorizedToMaintainLiabilitiesFlag:2,trustlineClawbackEnabledFlag:4}),e.const("MASK_TRUSTLINE_FLAGS",1),e.const("MASK_TRUSTLINE_FLAGS_V13",3),e.const("MASK_TRUSTLINE_FLAGS_V17",7),e.enum("LiquidityPoolType",{liquidityPoolConstantProduct:0}),e.union("TrustLineAsset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"],["assetTypePoolShare","liquidityPoolId"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12"),liquidityPoolId:e.lookup("PoolId")}}),e.union("TrustLineEntryExtensionV2Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TrustLineEntryExtensionV2",[["liquidityPoolUseCount",e.lookup("Int32")],["ext",e.lookup("TrustLineEntryExtensionV2Ext")]]),e.union("TrustLineEntryV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[2,"v2"]],arms:{v2:e.lookup("TrustLineEntryExtensionV2")}}),e.struct("TrustLineEntryV1",[["liabilities",e.lookup("Liabilities")],["ext",e.lookup("TrustLineEntryV1Ext")]]),e.union("TrustLineEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("TrustLineEntryV1")}}),e.struct("TrustLineEntry",[["accountId",e.lookup("AccountId")],["asset",e.lookup("TrustLineAsset")],["balance",e.lookup("Int64")],["limit",e.lookup("Int64")],["flags",e.lookup("Uint32")],["ext",e.lookup("TrustLineEntryExt")]]),e.enum("OfferEntryFlags",{passiveFlag:1}),e.const("MASK_OFFERENTRY_FLAGS",1),e.union("OfferEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("OfferEntry",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")],["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")],["flags",e.lookup("Uint32")],["ext",e.lookup("OfferEntryExt")]]),e.union("DataEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("DataEntry",[["accountId",e.lookup("AccountId")],["dataName",e.lookup("String64")],["dataValue",e.lookup("DataValue")],["ext",e.lookup("DataEntryExt")]]),e.enum("ClaimPredicateType",{claimPredicateUnconditional:0,claimPredicateAnd:1,claimPredicateOr:2,claimPredicateNot:3,claimPredicateBeforeAbsoluteTime:4,claimPredicateBeforeRelativeTime:5}),e.union("ClaimPredicate",{switchOn:e.lookup("ClaimPredicateType"),switchName:"type",switches:[["claimPredicateUnconditional",e.void()],["claimPredicateAnd","andPredicates"],["claimPredicateOr","orPredicates"],["claimPredicateNot","notPredicate"],["claimPredicateBeforeAbsoluteTime","absBefore"],["claimPredicateBeforeRelativeTime","relBefore"]],arms:{andPredicates:e.varArray(e.lookup("ClaimPredicate"),2),orPredicates:e.varArray(e.lookup("ClaimPredicate"),2),notPredicate:e.option(e.lookup("ClaimPredicate")),absBefore:e.lookup("Int64"),relBefore:e.lookup("Int64")}}),e.enum("ClaimantType",{claimantTypeV0:0}),e.struct("ClaimantV0",[["destination",e.lookup("AccountId")],["predicate",e.lookup("ClaimPredicate")]]),e.union("Claimant",{switchOn:e.lookup("ClaimantType"),switchName:"type",switches:[["claimantTypeV0","v0"]],arms:{v0:e.lookup("ClaimantV0")}}),e.enum("ClaimableBalanceIdType",{claimableBalanceIdTypeV0:0}),e.union("ClaimableBalanceId",{switchOn:e.lookup("ClaimableBalanceIdType"),switchName:"type",switches:[["claimableBalanceIdTypeV0","v0"]],arms:{v0:e.lookup("Hash")}}),e.enum("ClaimableBalanceFlags",{claimableBalanceClawbackEnabledFlag:1}),e.const("MASK_CLAIMABLE_BALANCE_FLAGS",1),e.union("ClaimableBalanceEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("ClaimableBalanceEntryExtensionV1",[["ext",e.lookup("ClaimableBalanceEntryExtensionV1Ext")],["flags",e.lookup("Uint32")]]),e.union("ClaimableBalanceEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("ClaimableBalanceEntryExtensionV1")}}),e.struct("ClaimableBalanceEntry",[["balanceId",e.lookup("ClaimableBalanceId")],["claimants",e.varArray(e.lookup("Claimant"),10)],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")],["ext",e.lookup("ClaimableBalanceEntryExt")]]),e.struct("LiquidityPoolConstantProductParameters",[["assetA",e.lookup("Asset")],["assetB",e.lookup("Asset")],["fee",e.lookup("Int32")]]),e.struct("LiquidityPoolEntryConstantProduct",[["params",e.lookup("LiquidityPoolConstantProductParameters")],["reserveA",e.lookup("Int64")],["reserveB",e.lookup("Int64")],["totalPoolShares",e.lookup("Int64")],["poolSharesTrustLineCount",e.lookup("Int64")]]),e.union("LiquidityPoolEntryBody",{switchOn:e.lookup("LiquidityPoolType"),switchName:"type",switches:[["liquidityPoolConstantProduct","constantProduct"]],arms:{constantProduct:e.lookup("LiquidityPoolEntryConstantProduct")}}),e.struct("LiquidityPoolEntry",[["liquidityPoolId",e.lookup("PoolId")],["body",e.lookup("LiquidityPoolEntryBody")]]),e.enum("ContractDataDurability",{temporary:0,persistent:1}),e.struct("ContractDataEntry",[["ext",e.lookup("ExtensionPoint")],["contract",e.lookup("ScAddress")],["key",e.lookup("ScVal")],["durability",e.lookup("ContractDataDurability")],["val",e.lookup("ScVal")]]),e.struct("ContractCodeCostInputs",[["ext",e.lookup("ExtensionPoint")],["nInstructions",e.lookup("Uint32")],["nFunctions",e.lookup("Uint32")],["nGlobals",e.lookup("Uint32")],["nTableEntries",e.lookup("Uint32")],["nTypes",e.lookup("Uint32")],["nDataSegments",e.lookup("Uint32")],["nElemSegments",e.lookup("Uint32")],["nImports",e.lookup("Uint32")],["nExports",e.lookup("Uint32")],["nDataSegmentBytes",e.lookup("Uint32")]]),e.struct("ContractCodeEntryV1",[["ext",e.lookup("ExtensionPoint")],["costInputs",e.lookup("ContractCodeCostInputs")]]),e.union("ContractCodeEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("ContractCodeEntryV1")}}),e.struct("ContractCodeEntry",[["ext",e.lookup("ContractCodeEntryExt")],["hash",e.lookup("Hash")],["code",e.varOpaque()]]),e.struct("TtlEntry",[["keyHash",e.lookup("Hash")],["liveUntilLedgerSeq",e.lookup("Uint32")]]),e.union("LedgerEntryExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerEntryExtensionV1",[["sponsoringId",e.lookup("SponsorshipDescriptor")],["ext",e.lookup("LedgerEntryExtensionV1Ext")]]),e.union("LedgerEntryData",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"],["liquidityPool","liquidityPool"],["contractData","contractData"],["contractCode","contractCode"],["configSetting","configSetting"],["ttl","ttl"]],arms:{account:e.lookup("AccountEntry"),trustLine:e.lookup("TrustLineEntry"),offer:e.lookup("OfferEntry"),data:e.lookup("DataEntry"),claimableBalance:e.lookup("ClaimableBalanceEntry"),liquidityPool:e.lookup("LiquidityPoolEntry"),contractData:e.lookup("ContractDataEntry"),contractCode:e.lookup("ContractCodeEntry"),configSetting:e.lookup("ConfigSettingEntry"),ttl:e.lookup("TtlEntry")}}),e.union("LedgerEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerEntryExtensionV1")}}),e.struct("LedgerEntry",[["lastModifiedLedgerSeq",e.lookup("Uint32")],["data",e.lookup("LedgerEntryData")],["ext",e.lookup("LedgerEntryExt")]]),e.struct("LedgerKeyAccount",[["accountId",e.lookup("AccountId")]]),e.struct("LedgerKeyTrustLine",[["accountId",e.lookup("AccountId")],["asset",e.lookup("TrustLineAsset")]]),e.struct("LedgerKeyOffer",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")]]),e.struct("LedgerKeyData",[["accountId",e.lookup("AccountId")],["dataName",e.lookup("String64")]]),e.struct("LedgerKeyClaimableBalance",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("LedgerKeyLiquidityPool",[["liquidityPoolId",e.lookup("PoolId")]]),e.struct("LedgerKeyContractData",[["contract",e.lookup("ScAddress")],["key",e.lookup("ScVal")],["durability",e.lookup("ContractDataDurability")]]),e.struct("LedgerKeyContractCode",[["hash",e.lookup("Hash")]]),e.struct("LedgerKeyConfigSetting",[["configSettingId",e.lookup("ConfigSettingId")]]),e.struct("LedgerKeyTtl",[["keyHash",e.lookup("Hash")]]),e.union("LedgerKey",{switchOn:e.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"],["liquidityPool","liquidityPool"],["contractData","contractData"],["contractCode","contractCode"],["configSetting","configSetting"],["ttl","ttl"]],arms:{account:e.lookup("LedgerKeyAccount"),trustLine:e.lookup("LedgerKeyTrustLine"),offer:e.lookup("LedgerKeyOffer"),data:e.lookup("LedgerKeyData"),claimableBalance:e.lookup("LedgerKeyClaimableBalance"),liquidityPool:e.lookup("LedgerKeyLiquidityPool"),contractData:e.lookup("LedgerKeyContractData"),contractCode:e.lookup("LedgerKeyContractCode"),configSetting:e.lookup("LedgerKeyConfigSetting"),ttl:e.lookup("LedgerKeyTtl")}}),e.enum("EnvelopeType",{envelopeTypeTxV0:0,envelopeTypeScp:1,envelopeTypeTx:2,envelopeTypeAuth:3,envelopeTypeScpvalue:4,envelopeTypeTxFeeBump:5,envelopeTypeOpId:6,envelopeTypePoolRevokeOpId:7,envelopeTypeContractId:8,envelopeTypeSorobanAuthorization:9}),e.typedef("UpgradeType",e.varOpaque(128)),e.enum("StellarValueType",{stellarValueBasic:0,stellarValueSigned:1}),e.struct("LedgerCloseValueSignature",[["nodeId",e.lookup("NodeId")],["signature",e.lookup("Signature")]]),e.union("StellarValueExt",{switchOn:e.lookup("StellarValueType"),switchName:"v",switches:[["stellarValueBasic",e.void()],["stellarValueSigned","lcValueSignature"]],arms:{lcValueSignature:e.lookup("LedgerCloseValueSignature")}}),e.struct("StellarValue",[["txSetHash",e.lookup("Hash")],["closeTime",e.lookup("TimePoint")],["upgrades",e.varArray(e.lookup("UpgradeType"),6)],["ext",e.lookup("StellarValueExt")]]),e.const("MASK_LEDGER_HEADER_FLAGS",7),e.enum("LedgerHeaderFlags",{disableLiquidityPoolTradingFlag:1,disableLiquidityPoolDepositFlag:2,disableLiquidityPoolWithdrawalFlag:4}),e.union("LedgerHeaderExtensionV1Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerHeaderExtensionV1",[["flags",e.lookup("Uint32")],["ext",e.lookup("LedgerHeaderExtensionV1Ext")]]),e.union("LedgerHeaderExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerHeaderExtensionV1")}}),e.struct("LedgerHeader",[["ledgerVersion",e.lookup("Uint32")],["previousLedgerHash",e.lookup("Hash")],["scpValue",e.lookup("StellarValue")],["txSetResultHash",e.lookup("Hash")],["bucketListHash",e.lookup("Hash")],["ledgerSeq",e.lookup("Uint32")],["totalCoins",e.lookup("Int64")],["feePool",e.lookup("Int64")],["inflationSeq",e.lookup("Uint32")],["idPool",e.lookup("Uint64")],["baseFee",e.lookup("Uint32")],["baseReserve",e.lookup("Uint32")],["maxTxSetSize",e.lookup("Uint32")],["skipList",e.array(e.lookup("Hash"),4)],["ext",e.lookup("LedgerHeaderExt")]]),e.enum("LedgerUpgradeType",{ledgerUpgradeVersion:1,ledgerUpgradeBaseFee:2,ledgerUpgradeMaxTxSetSize:3,ledgerUpgradeBaseReserve:4,ledgerUpgradeFlags:5,ledgerUpgradeConfig:6,ledgerUpgradeMaxSorobanTxSetSize:7}),e.struct("ConfigUpgradeSetKey",[["contractId",e.lookup("Hash")],["contentHash",e.lookup("Hash")]]),e.union("LedgerUpgrade",{switchOn:e.lookup("LedgerUpgradeType"),switchName:"type",switches:[["ledgerUpgradeVersion","newLedgerVersion"],["ledgerUpgradeBaseFee","newBaseFee"],["ledgerUpgradeMaxTxSetSize","newMaxTxSetSize"],["ledgerUpgradeBaseReserve","newBaseReserve"],["ledgerUpgradeFlags","newFlags"],["ledgerUpgradeConfig","newConfig"],["ledgerUpgradeMaxSorobanTxSetSize","newMaxSorobanTxSetSize"]],arms:{newLedgerVersion:e.lookup("Uint32"),newBaseFee:e.lookup("Uint32"),newMaxTxSetSize:e.lookup("Uint32"),newBaseReserve:e.lookup("Uint32"),newFlags:e.lookup("Uint32"),newConfig:e.lookup("ConfigUpgradeSetKey"),newMaxSorobanTxSetSize:e.lookup("Uint32")}}),e.struct("ConfigUpgradeSet",[["updatedEntry",e.varArray(e.lookup("ConfigSettingEntry"),2147483647)]]),e.enum("BucketEntryType",{metaentry:-1,liveentry:0,deadentry:1,initentry:2}),e.union("BucketMetadataExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("BucketMetadata",[["ledgerVersion",e.lookup("Uint32")],["ext",e.lookup("BucketMetadataExt")]]),e.union("BucketEntry",{switchOn:e.lookup("BucketEntryType"),switchName:"type",switches:[["liveentry","liveEntry"],["initentry","liveEntry"],["deadentry","deadEntry"],["metaentry","metaEntry"]],arms:{liveEntry:e.lookup("LedgerEntry"),deadEntry:e.lookup("LedgerKey"),metaEntry:e.lookup("BucketMetadata")}}),e.enum("TxSetComponentType",{txsetCompTxsMaybeDiscountedFee:0}),e.struct("TxSetComponentTxsMaybeDiscountedFee",[["baseFee",e.option(e.lookup("Int64"))],["txes",e.varArray(e.lookup("TransactionEnvelope"),2147483647)]]),e.union("TxSetComponent",{switchOn:e.lookup("TxSetComponentType"),switchName:"type",switches:[["txsetCompTxsMaybeDiscountedFee","txsMaybeDiscountedFee"]],arms:{txsMaybeDiscountedFee:e.lookup("TxSetComponentTxsMaybeDiscountedFee")}}),e.union("TransactionPhase",{switchOn:e.int(),switchName:"v",switches:[[0,"v0Components"]],arms:{v0Components:e.varArray(e.lookup("TxSetComponent"),2147483647)}}),e.struct("TransactionSet",[["previousLedgerHash",e.lookup("Hash")],["txes",e.varArray(e.lookup("TransactionEnvelope"),2147483647)]]),e.struct("TransactionSetV1",[["previousLedgerHash",e.lookup("Hash")],["phases",e.varArray(e.lookup("TransactionPhase"),2147483647)]]),e.union("GeneralizedTransactionSet",{switchOn:e.int(),switchName:"v",switches:[[1,"v1TxSet"]],arms:{v1TxSet:e.lookup("TransactionSetV1")}}),e.struct("TransactionResultPair",[["transactionHash",e.lookup("Hash")],["result",e.lookup("TransactionResult")]]),e.struct("TransactionResultSet",[["results",e.varArray(e.lookup("TransactionResultPair"),2147483647)]]),e.union("TransactionHistoryEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"generalizedTxSet"]],arms:{generalizedTxSet:e.lookup("GeneralizedTransactionSet")}}),e.struct("TransactionHistoryEntry",[["ledgerSeq",e.lookup("Uint32")],["txSet",e.lookup("TransactionSet")],["ext",e.lookup("TransactionHistoryEntryExt")]]),e.union("TransactionHistoryResultEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionHistoryResultEntry",[["ledgerSeq",e.lookup("Uint32")],["txResultSet",e.lookup("TransactionResultSet")],["ext",e.lookup("TransactionHistoryResultEntryExt")]]),e.union("LedgerHeaderHistoryEntryExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("LedgerHeaderHistoryEntry",[["hash",e.lookup("Hash")],["header",e.lookup("LedgerHeader")],["ext",e.lookup("LedgerHeaderHistoryEntryExt")]]),e.struct("LedgerScpMessages",[["ledgerSeq",e.lookup("Uint32")],["messages",e.varArray(e.lookup("ScpEnvelope"),2147483647)]]),e.struct("ScpHistoryEntryV0",[["quorumSets",e.varArray(e.lookup("ScpQuorumSet"),2147483647)],["ledgerMessages",e.lookup("LedgerScpMessages")]]),e.union("ScpHistoryEntry",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("ScpHistoryEntryV0")}}),e.enum("LedgerEntryChangeType",{ledgerEntryCreated:0,ledgerEntryUpdated:1,ledgerEntryRemoved:2,ledgerEntryState:3}),e.union("LedgerEntryChange",{switchOn:e.lookup("LedgerEntryChangeType"),switchName:"type",switches:[["ledgerEntryCreated","created"],["ledgerEntryUpdated","updated"],["ledgerEntryRemoved","removed"],["ledgerEntryState","state"]],arms:{created:e.lookup("LedgerEntry"),updated:e.lookup("LedgerEntry"),removed:e.lookup("LedgerKey"),state:e.lookup("LedgerEntry")}}),e.typedef("LedgerEntryChanges",e.varArray(e.lookup("LedgerEntryChange"),2147483647)),e.struct("OperationMeta",[["changes",e.lookup("LedgerEntryChanges")]]),e.struct("TransactionMetaV1",[["txChanges",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)]]),e.struct("TransactionMetaV2",[["txChangesBefore",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)],["txChangesAfter",e.lookup("LedgerEntryChanges")]]),e.enum("ContractEventType",{system:0,contract:1,diagnostic:2}),e.struct("ContractEventV0",[["topics",e.varArray(e.lookup("ScVal"),2147483647)],["data",e.lookup("ScVal")]]),e.union("ContractEventBody",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("ContractEventV0")}}),e.struct("ContractEvent",[["ext",e.lookup("ExtensionPoint")],["contractId",e.option(e.lookup("Hash"))],["type",e.lookup("ContractEventType")],["body",e.lookup("ContractEventBody")]]),e.struct("DiagnosticEvent",[["inSuccessfulContractCall",e.bool()],["event",e.lookup("ContractEvent")]]),e.struct("SorobanTransactionMetaExtV1",[["ext",e.lookup("ExtensionPoint")],["totalNonRefundableResourceFeeCharged",e.lookup("Int64")],["totalRefundableResourceFeeCharged",e.lookup("Int64")],["rentFeeCharged",e.lookup("Int64")]]),e.union("SorobanTransactionMetaExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("SorobanTransactionMetaExtV1")}}),e.struct("SorobanTransactionMeta",[["ext",e.lookup("SorobanTransactionMetaExt")],["events",e.varArray(e.lookup("ContractEvent"),2147483647)],["returnValue",e.lookup("ScVal")],["diagnosticEvents",e.varArray(e.lookup("DiagnosticEvent"),2147483647)]]),e.struct("TransactionMetaV3",[["ext",e.lookup("ExtensionPoint")],["txChangesBefore",e.lookup("LedgerEntryChanges")],["operations",e.varArray(e.lookup("OperationMeta"),2147483647)],["txChangesAfter",e.lookup("LedgerEntryChanges")],["sorobanMeta",e.option(e.lookup("SorobanTransactionMeta"))]]),e.struct("InvokeHostFunctionSuccessPreImage",[["returnValue",e.lookup("ScVal")],["events",e.varArray(e.lookup("ContractEvent"),2147483647)]]),e.union("TransactionMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"operations"],[1,"v1"],[2,"v2"],[3,"v3"]],arms:{operations:e.varArray(e.lookup("OperationMeta"),2147483647),v1:e.lookup("TransactionMetaV1"),v2:e.lookup("TransactionMetaV2"),v3:e.lookup("TransactionMetaV3")}}),e.struct("TransactionResultMeta",[["result",e.lookup("TransactionResultPair")],["feeProcessing",e.lookup("LedgerEntryChanges")],["txApplyProcessing",e.lookup("TransactionMeta")]]),e.struct("UpgradeEntryMeta",[["upgrade",e.lookup("LedgerUpgrade")],["changes",e.lookup("LedgerEntryChanges")]]),e.struct("LedgerCloseMetaV0",[["ledgerHeader",e.lookup("LedgerHeaderHistoryEntry")],["txSet",e.lookup("TransactionSet")],["txProcessing",e.varArray(e.lookup("TransactionResultMeta"),2147483647)],["upgradesProcessing",e.varArray(e.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",e.varArray(e.lookup("ScpHistoryEntry"),2147483647)]]),e.struct("LedgerCloseMetaExtV1",[["ext",e.lookup("ExtensionPoint")],["sorobanFeeWrite1Kb",e.lookup("Int64")]]),e.union("LedgerCloseMetaExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"v1"]],arms:{v1:e.lookup("LedgerCloseMetaExtV1")}}),e.struct("LedgerCloseMetaV1",[["ext",e.lookup("LedgerCloseMetaExt")],["ledgerHeader",e.lookup("LedgerHeaderHistoryEntry")],["txSet",e.lookup("GeneralizedTransactionSet")],["txProcessing",e.varArray(e.lookup("TransactionResultMeta"),2147483647)],["upgradesProcessing",e.varArray(e.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",e.varArray(e.lookup("ScpHistoryEntry"),2147483647)],["totalByteSizeOfBucketList",e.lookup("Uint64")],["evictedTemporaryLedgerKeys",e.varArray(e.lookup("LedgerKey"),2147483647)],["evictedPersistentLedgerEntries",e.varArray(e.lookup("LedgerEntry"),2147483647)]]),e.union("LedgerCloseMeta",{switchOn:e.int(),switchName:"v",switches:[[0,"v0"],[1,"v1"]],arms:{v0:e.lookup("LedgerCloseMetaV0"),v1:e.lookup("LedgerCloseMetaV1")}}),e.enum("ErrorCode",{errMisc:0,errData:1,errConf:2,errAuth:3,errLoad:4}),e.struct("Error",[["code",e.lookup("ErrorCode")],["msg",e.string(100)]]),e.struct("SendMore",[["numMessages",e.lookup("Uint32")]]),e.struct("SendMoreExtended",[["numMessages",e.lookup("Uint32")],["numBytes",e.lookup("Uint32")]]),e.struct("AuthCert",[["pubkey",e.lookup("Curve25519Public")],["expiration",e.lookup("Uint64")],["sig",e.lookup("Signature")]]),e.struct("Hello",[["ledgerVersion",e.lookup("Uint32")],["overlayVersion",e.lookup("Uint32")],["overlayMinVersion",e.lookup("Uint32")],["networkId",e.lookup("Hash")],["versionStr",e.string(100)],["listeningPort",e.int()],["peerId",e.lookup("NodeId")],["cert",e.lookup("AuthCert")],["nonce",e.lookup("Uint256")]]),e.const("AUTH_MSG_FLAG_FLOW_CONTROL_BYTES_REQUESTED",200),e.struct("Auth",[["flags",e.int()]]),e.enum("IpAddrType",{iPv4:0,iPv6:1}),e.union("PeerAddressIp",{switchOn:e.lookup("IpAddrType"),switchName:"type",switches:[["iPv4","ipv4"],["iPv6","ipv6"]],arms:{ipv4:e.opaque(4),ipv6:e.opaque(16)}}),e.struct("PeerAddress",[["ip",e.lookup("PeerAddressIp")],["port",e.lookup("Uint32")],["numFailures",e.lookup("Uint32")]]),e.enum("MessageType",{errorMsg:0,auth:2,dontHave:3,getPeers:4,peers:5,getTxSet:6,txSet:7,generalizedTxSet:17,transaction:8,getScpQuorumset:9,scpQuorumset:10,scpMessage:11,getScpState:12,hello:13,surveyRequest:14,surveyResponse:15,sendMore:16,sendMoreExtended:20,floodAdvert:18,floodDemand:19}),e.struct("DontHave",[["type",e.lookup("MessageType")],["reqHash",e.lookup("Uint256")]]),e.enum("SurveyMessageCommandType",{surveyTopology:0}),e.enum("SurveyMessageResponseType",{surveyTopologyResponseV0:0,surveyTopologyResponseV1:1}),e.struct("SurveyRequestMessage",[["surveyorPeerId",e.lookup("NodeId")],["surveyedPeerId",e.lookup("NodeId")],["ledgerNum",e.lookup("Uint32")],["encryptionKey",e.lookup("Curve25519Public")],["commandType",e.lookup("SurveyMessageCommandType")]]),e.struct("SignedSurveyRequestMessage",[["requestSignature",e.lookup("Signature")],["request",e.lookup("SurveyRequestMessage")]]),e.typedef("EncryptedBody",e.varOpaque(64e3)),e.struct("SurveyResponseMessage",[["surveyorPeerId",e.lookup("NodeId")],["surveyedPeerId",e.lookup("NodeId")],["ledgerNum",e.lookup("Uint32")],["commandType",e.lookup("SurveyMessageCommandType")],["encryptedBody",e.lookup("EncryptedBody")]]),e.struct("SignedSurveyResponseMessage",[["responseSignature",e.lookup("Signature")],["response",e.lookup("SurveyResponseMessage")]]),e.struct("PeerStats",[["id",e.lookup("NodeId")],["versionStr",e.string(100)],["messagesRead",e.lookup("Uint64")],["messagesWritten",e.lookup("Uint64")],["bytesRead",e.lookup("Uint64")],["bytesWritten",e.lookup("Uint64")],["secondsConnected",e.lookup("Uint64")],["uniqueFloodBytesRecv",e.lookup("Uint64")],["duplicateFloodBytesRecv",e.lookup("Uint64")],["uniqueFetchBytesRecv",e.lookup("Uint64")],["duplicateFetchBytesRecv",e.lookup("Uint64")],["uniqueFloodMessageRecv",e.lookup("Uint64")],["duplicateFloodMessageRecv",e.lookup("Uint64")],["uniqueFetchMessageRecv",e.lookup("Uint64")],["duplicateFetchMessageRecv",e.lookup("Uint64")]]),e.typedef("PeerStatList",e.varArray(e.lookup("PeerStats"),25)),e.struct("TopologyResponseBodyV0",[["inboundPeers",e.lookup("PeerStatList")],["outboundPeers",e.lookup("PeerStatList")],["totalInboundPeerCount",e.lookup("Uint32")],["totalOutboundPeerCount",e.lookup("Uint32")]]),e.struct("TopologyResponseBodyV1",[["inboundPeers",e.lookup("PeerStatList")],["outboundPeers",e.lookup("PeerStatList")],["totalInboundPeerCount",e.lookup("Uint32")],["totalOutboundPeerCount",e.lookup("Uint32")],["maxInboundPeerCount",e.lookup("Uint32")],["maxOutboundPeerCount",e.lookup("Uint32")]]),e.union("SurveyResponseBody",{switchOn:e.lookup("SurveyMessageResponseType"),switchName:"type",switches:[["surveyTopologyResponseV0","topologyResponseBodyV0"],["surveyTopologyResponseV1","topologyResponseBodyV1"]],arms:{topologyResponseBodyV0:e.lookup("TopologyResponseBodyV0"),topologyResponseBodyV1:e.lookup("TopologyResponseBodyV1")}}),e.const("TX_ADVERT_VECTOR_MAX_SIZE",1e3),e.typedef("TxAdvertVector",e.varArray(e.lookup("Hash"),e.lookup("TX_ADVERT_VECTOR_MAX_SIZE"))),e.struct("FloodAdvert",[["txHashes",e.lookup("TxAdvertVector")]]),e.const("TX_DEMAND_VECTOR_MAX_SIZE",1e3),e.typedef("TxDemandVector",e.varArray(e.lookup("Hash"),e.lookup("TX_DEMAND_VECTOR_MAX_SIZE"))),e.struct("FloodDemand",[["txHashes",e.lookup("TxDemandVector")]]),e.union("StellarMessage",{switchOn:e.lookup("MessageType"),switchName:"type",switches:[["errorMsg","error"],["hello","hello"],["auth","auth"],["dontHave","dontHave"],["getPeers",e.void()],["peers","peers"],["getTxSet","txSetHash"],["txSet","txSet"],["generalizedTxSet","generalizedTxSet"],["transaction","transaction"],["surveyRequest","signedSurveyRequestMessage"],["surveyResponse","signedSurveyResponseMessage"],["getScpQuorumset","qSetHash"],["scpQuorumset","qSet"],["scpMessage","envelope"],["getScpState","getScpLedgerSeq"],["sendMore","sendMoreMessage"],["sendMoreExtended","sendMoreExtendedMessage"],["floodAdvert","floodAdvert"],["floodDemand","floodDemand"]],arms:{error:e.lookup("Error"),hello:e.lookup("Hello"),auth:e.lookup("Auth"),dontHave:e.lookup("DontHave"),peers:e.varArray(e.lookup("PeerAddress"),100),txSetHash:e.lookup("Uint256"),txSet:e.lookup("TransactionSet"),generalizedTxSet:e.lookup("GeneralizedTransactionSet"),transaction:e.lookup("TransactionEnvelope"),signedSurveyRequestMessage:e.lookup("SignedSurveyRequestMessage"),signedSurveyResponseMessage:e.lookup("SignedSurveyResponseMessage"),qSetHash:e.lookup("Uint256"),qSet:e.lookup("ScpQuorumSet"),envelope:e.lookup("ScpEnvelope"),getScpLedgerSeq:e.lookup("Uint32"),sendMoreMessage:e.lookup("SendMore"),sendMoreExtendedMessage:e.lookup("SendMoreExtended"),floodAdvert:e.lookup("FloodAdvert"),floodDemand:e.lookup("FloodDemand")}}),e.struct("AuthenticatedMessageV0",[["sequence",e.lookup("Uint64")],["message",e.lookup("StellarMessage")],["mac",e.lookup("HmacSha256Mac")]]),e.union("AuthenticatedMessage",{switchOn:e.lookup("Uint32"),switchName:"v",switches:[[0,"v0"]],arms:{v0:e.lookup("AuthenticatedMessageV0")}}),e.const("MAX_OPS_PER_TX",100),e.union("LiquidityPoolParameters",{switchOn:e.lookup("LiquidityPoolType"),switchName:"type",switches:[["liquidityPoolConstantProduct","constantProduct"]],arms:{constantProduct:e.lookup("LiquidityPoolConstantProductParameters")}}),e.struct("MuxedAccountMed25519",[["id",e.lookup("Uint64")],["ed25519",e.lookup("Uint256")]]),e.union("MuxedAccount",{switchOn:e.lookup("CryptoKeyType"),switchName:"type",switches:[["keyTypeEd25519","ed25519"],["keyTypeMuxedEd25519","med25519"]],arms:{ed25519:e.lookup("Uint256"),med25519:e.lookup("MuxedAccountMed25519")}}),e.struct("DecoratedSignature",[["hint",e.lookup("SignatureHint")],["signature",e.lookup("Signature")]]),e.enum("OperationType",{createAccount:0,payment:1,pathPaymentStrictReceive:2,manageSellOffer:3,createPassiveSellOffer:4,setOptions:5,changeTrust:6,allowTrust:7,accountMerge:8,inflation:9,manageData:10,bumpSequence:11,manageBuyOffer:12,pathPaymentStrictSend:13,createClaimableBalance:14,claimClaimableBalance:15,beginSponsoringFutureReserves:16,endSponsoringFutureReserves:17,revokeSponsorship:18,clawback:19,clawbackClaimableBalance:20,setTrustLineFlags:21,liquidityPoolDeposit:22,liquidityPoolWithdraw:23,invokeHostFunction:24,extendFootprintTtl:25,restoreFootprint:26}),e.struct("CreateAccountOp",[["destination",e.lookup("AccountId")],["startingBalance",e.lookup("Int64")]]),e.struct("PaymentOp",[["destination",e.lookup("MuxedAccount")],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")]]),e.struct("PathPaymentStrictReceiveOp",[["sendAsset",e.lookup("Asset")],["sendMax",e.lookup("Int64")],["destination",e.lookup("MuxedAccount")],["destAsset",e.lookup("Asset")],["destAmount",e.lookup("Int64")],["path",e.varArray(e.lookup("Asset"),5)]]),e.struct("PathPaymentStrictSendOp",[["sendAsset",e.lookup("Asset")],["sendAmount",e.lookup("Int64")],["destination",e.lookup("MuxedAccount")],["destAsset",e.lookup("Asset")],["destMin",e.lookup("Int64")],["path",e.varArray(e.lookup("Asset"),5)]]),e.struct("ManageSellOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")],["offerId",e.lookup("Int64")]]),e.struct("ManageBuyOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["buyAmount",e.lookup("Int64")],["price",e.lookup("Price")],["offerId",e.lookup("Int64")]]),e.struct("CreatePassiveSellOfferOp",[["selling",e.lookup("Asset")],["buying",e.lookup("Asset")],["amount",e.lookup("Int64")],["price",e.lookup("Price")]]),e.struct("SetOptionsOp",[["inflationDest",e.option(e.lookup("AccountId"))],["clearFlags",e.option(e.lookup("Uint32"))],["setFlags",e.option(e.lookup("Uint32"))],["masterWeight",e.option(e.lookup("Uint32"))],["lowThreshold",e.option(e.lookup("Uint32"))],["medThreshold",e.option(e.lookup("Uint32"))],["highThreshold",e.option(e.lookup("Uint32"))],["homeDomain",e.option(e.lookup("String32"))],["signer",e.option(e.lookup("Signer"))]]),e.union("ChangeTrustAsset",{switchOn:e.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",e.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"],["assetTypePoolShare","liquidityPool"]],arms:{alphaNum4:e.lookup("AlphaNum4"),alphaNum12:e.lookup("AlphaNum12"),liquidityPool:e.lookup("LiquidityPoolParameters")}}),e.struct("ChangeTrustOp",[["line",e.lookup("ChangeTrustAsset")],["limit",e.lookup("Int64")]]),e.struct("AllowTrustOp",[["trustor",e.lookup("AccountId")],["asset",e.lookup("AssetCode")],["authorize",e.lookup("Uint32")]]),e.struct("ManageDataOp",[["dataName",e.lookup("String64")],["dataValue",e.option(e.lookup("DataValue"))]]),e.struct("BumpSequenceOp",[["bumpTo",e.lookup("SequenceNumber")]]),e.struct("CreateClaimableBalanceOp",[["asset",e.lookup("Asset")],["amount",e.lookup("Int64")],["claimants",e.varArray(e.lookup("Claimant"),10)]]),e.struct("ClaimClaimableBalanceOp",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("BeginSponsoringFutureReservesOp",[["sponsoredId",e.lookup("AccountId")]]),e.enum("RevokeSponsorshipType",{revokeSponsorshipLedgerEntry:0,revokeSponsorshipSigner:1}),e.struct("RevokeSponsorshipOpSigner",[["accountId",e.lookup("AccountId")],["signerKey",e.lookup("SignerKey")]]),e.union("RevokeSponsorshipOp",{switchOn:e.lookup("RevokeSponsorshipType"),switchName:"type",switches:[["revokeSponsorshipLedgerEntry","ledgerKey"],["revokeSponsorshipSigner","signer"]],arms:{ledgerKey:e.lookup("LedgerKey"),signer:e.lookup("RevokeSponsorshipOpSigner")}}),e.struct("ClawbackOp",[["asset",e.lookup("Asset")],["from",e.lookup("MuxedAccount")],["amount",e.lookup("Int64")]]),e.struct("ClawbackClaimableBalanceOp",[["balanceId",e.lookup("ClaimableBalanceId")]]),e.struct("SetTrustLineFlagsOp",[["trustor",e.lookup("AccountId")],["asset",e.lookup("Asset")],["clearFlags",e.lookup("Uint32")],["setFlags",e.lookup("Uint32")]]),e.const("LIQUIDITY_POOL_FEE_V18",30),e.struct("LiquidityPoolDepositOp",[["liquidityPoolId",e.lookup("PoolId")],["maxAmountA",e.lookup("Int64")],["maxAmountB",e.lookup("Int64")],["minPrice",e.lookup("Price")],["maxPrice",e.lookup("Price")]]),e.struct("LiquidityPoolWithdrawOp",[["liquidityPoolId",e.lookup("PoolId")],["amount",e.lookup("Int64")],["minAmountA",e.lookup("Int64")],["minAmountB",e.lookup("Int64")]]),e.enum("HostFunctionType",{hostFunctionTypeInvokeContract:0,hostFunctionTypeCreateContract:1,hostFunctionTypeUploadContractWasm:2}),e.enum("ContractIdPreimageType",{contractIdPreimageFromAddress:0,contractIdPreimageFromAsset:1}),e.struct("ContractIdPreimageFromAddress",[["address",e.lookup("ScAddress")],["salt",e.lookup("Uint256")]]),e.union("ContractIdPreimage",{switchOn:e.lookup("ContractIdPreimageType"),switchName:"type",switches:[["contractIdPreimageFromAddress","fromAddress"],["contractIdPreimageFromAsset","fromAsset"]],arms:{fromAddress:e.lookup("ContractIdPreimageFromAddress"),fromAsset:e.lookup("Asset")}}),e.struct("CreateContractArgs",[["contractIdPreimage",e.lookup("ContractIdPreimage")],["executable",e.lookup("ContractExecutable")]]),e.struct("InvokeContractArgs",[["contractAddress",e.lookup("ScAddress")],["functionName",e.lookup("ScSymbol")],["args",e.varArray(e.lookup("ScVal"),2147483647)]]),e.union("HostFunction",{switchOn:e.lookup("HostFunctionType"),switchName:"type",switches:[["hostFunctionTypeInvokeContract","invokeContract"],["hostFunctionTypeCreateContract","createContract"],["hostFunctionTypeUploadContractWasm","wasm"]],arms:{invokeContract:e.lookup("InvokeContractArgs"),createContract:e.lookup("CreateContractArgs"),wasm:e.varOpaque()}}),e.enum("SorobanAuthorizedFunctionType",{sorobanAuthorizedFunctionTypeContractFn:0,sorobanAuthorizedFunctionTypeCreateContractHostFn:1}),e.union("SorobanAuthorizedFunction",{switchOn:e.lookup("SorobanAuthorizedFunctionType"),switchName:"type",switches:[["sorobanAuthorizedFunctionTypeContractFn","contractFn"],["sorobanAuthorizedFunctionTypeCreateContractHostFn","createContractHostFn"]],arms:{contractFn:e.lookup("InvokeContractArgs"),createContractHostFn:e.lookup("CreateContractArgs")}}),e.struct("SorobanAuthorizedInvocation",[["function",e.lookup("SorobanAuthorizedFunction")],["subInvocations",e.varArray(e.lookup("SorobanAuthorizedInvocation"),2147483647)]]),e.struct("SorobanAddressCredentials",[["address",e.lookup("ScAddress")],["nonce",e.lookup("Int64")],["signatureExpirationLedger",e.lookup("Uint32")],["signature",e.lookup("ScVal")]]),e.enum("SorobanCredentialsType",{sorobanCredentialsSourceAccount:0,sorobanCredentialsAddress:1}),e.union("SorobanCredentials",{switchOn:e.lookup("SorobanCredentialsType"),switchName:"type",switches:[["sorobanCredentialsSourceAccount",e.void()],["sorobanCredentialsAddress","address"]],arms:{address:e.lookup("SorobanAddressCredentials")}}),e.struct("SorobanAuthorizationEntry",[["credentials",e.lookup("SorobanCredentials")],["rootInvocation",e.lookup("SorobanAuthorizedInvocation")]]),e.struct("InvokeHostFunctionOp",[["hostFunction",e.lookup("HostFunction")],["auth",e.varArray(e.lookup("SorobanAuthorizationEntry"),2147483647)]]),e.struct("ExtendFootprintTtlOp",[["ext",e.lookup("ExtensionPoint")],["extendTo",e.lookup("Uint32")]]),e.struct("RestoreFootprintOp",[["ext",e.lookup("ExtensionPoint")]]),e.union("OperationBody",{switchOn:e.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountOp"],["payment","paymentOp"],["pathPaymentStrictReceive","pathPaymentStrictReceiveOp"],["manageSellOffer","manageSellOfferOp"],["createPassiveSellOffer","createPassiveSellOfferOp"],["setOptions","setOptionsOp"],["changeTrust","changeTrustOp"],["allowTrust","allowTrustOp"],["accountMerge","destination"],["inflation",e.void()],["manageData","manageDataOp"],["bumpSequence","bumpSequenceOp"],["manageBuyOffer","manageBuyOfferOp"],["pathPaymentStrictSend","pathPaymentStrictSendOp"],["createClaimableBalance","createClaimableBalanceOp"],["claimClaimableBalance","claimClaimableBalanceOp"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesOp"],["endSponsoringFutureReserves",e.void()],["revokeSponsorship","revokeSponsorshipOp"],["clawback","clawbackOp"],["clawbackClaimableBalance","clawbackClaimableBalanceOp"],["setTrustLineFlags","setTrustLineFlagsOp"],["liquidityPoolDeposit","liquidityPoolDepositOp"],["liquidityPoolWithdraw","liquidityPoolWithdrawOp"],["invokeHostFunction","invokeHostFunctionOp"],["extendFootprintTtl","extendFootprintTtlOp"],["restoreFootprint","restoreFootprintOp"]],arms:{createAccountOp:e.lookup("CreateAccountOp"),paymentOp:e.lookup("PaymentOp"),pathPaymentStrictReceiveOp:e.lookup("PathPaymentStrictReceiveOp"),manageSellOfferOp:e.lookup("ManageSellOfferOp"),createPassiveSellOfferOp:e.lookup("CreatePassiveSellOfferOp"),setOptionsOp:e.lookup("SetOptionsOp"),changeTrustOp:e.lookup("ChangeTrustOp"),allowTrustOp:e.lookup("AllowTrustOp"),destination:e.lookup("MuxedAccount"),manageDataOp:e.lookup("ManageDataOp"),bumpSequenceOp:e.lookup("BumpSequenceOp"),manageBuyOfferOp:e.lookup("ManageBuyOfferOp"),pathPaymentStrictSendOp:e.lookup("PathPaymentStrictSendOp"),createClaimableBalanceOp:e.lookup("CreateClaimableBalanceOp"),claimClaimableBalanceOp:e.lookup("ClaimClaimableBalanceOp"),beginSponsoringFutureReservesOp:e.lookup("BeginSponsoringFutureReservesOp"),revokeSponsorshipOp:e.lookup("RevokeSponsorshipOp"),clawbackOp:e.lookup("ClawbackOp"),clawbackClaimableBalanceOp:e.lookup("ClawbackClaimableBalanceOp"),setTrustLineFlagsOp:e.lookup("SetTrustLineFlagsOp"),liquidityPoolDepositOp:e.lookup("LiquidityPoolDepositOp"),liquidityPoolWithdrawOp:e.lookup("LiquidityPoolWithdrawOp"),invokeHostFunctionOp:e.lookup("InvokeHostFunctionOp"),extendFootprintTtlOp:e.lookup("ExtendFootprintTtlOp"),restoreFootprintOp:e.lookup("RestoreFootprintOp")}}),e.struct("Operation",[["sourceAccount",e.option(e.lookup("MuxedAccount"))],["body",e.lookup("OperationBody")]]),e.struct("HashIdPreimageOperationId",[["sourceAccount",e.lookup("AccountId")],["seqNum",e.lookup("SequenceNumber")],["opNum",e.lookup("Uint32")]]),e.struct("HashIdPreimageRevokeId",[["sourceAccount",e.lookup("AccountId")],["seqNum",e.lookup("SequenceNumber")],["opNum",e.lookup("Uint32")],["liquidityPoolId",e.lookup("PoolId")],["asset",e.lookup("Asset")]]),e.struct("HashIdPreimageContractId",[["networkId",e.lookup("Hash")],["contractIdPreimage",e.lookup("ContractIdPreimage")]]),e.struct("HashIdPreimageSorobanAuthorization",[["networkId",e.lookup("Hash")],["nonce",e.lookup("Int64")],["signatureExpirationLedger",e.lookup("Uint32")],["invocation",e.lookup("SorobanAuthorizedInvocation")]]),e.union("HashIdPreimage",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeOpId","operationId"],["envelopeTypePoolRevokeOpId","revokeId"],["envelopeTypeContractId","contractId"],["envelopeTypeSorobanAuthorization","sorobanAuthorization"]],arms:{operationId:e.lookup("HashIdPreimageOperationId"),revokeId:e.lookup("HashIdPreimageRevokeId"),contractId:e.lookup("HashIdPreimageContractId"),sorobanAuthorization:e.lookup("HashIdPreimageSorobanAuthorization")}}),e.enum("MemoType",{memoNone:0,memoText:1,memoId:2,memoHash:3,memoReturn:4}),e.union("Memo",{switchOn:e.lookup("MemoType"),switchName:"type",switches:[["memoNone",e.void()],["memoText","text"],["memoId","id"],["memoHash","hash"],["memoReturn","retHash"]],arms:{text:e.string(28),id:e.lookup("Uint64"),hash:e.lookup("Hash"),retHash:e.lookup("Hash")}}),e.struct("TimeBounds",[["minTime",e.lookup("TimePoint")],["maxTime",e.lookup("TimePoint")]]),e.struct("LedgerBounds",[["minLedger",e.lookup("Uint32")],["maxLedger",e.lookup("Uint32")]]),e.struct("PreconditionsV2",[["timeBounds",e.option(e.lookup("TimeBounds"))],["ledgerBounds",e.option(e.lookup("LedgerBounds"))],["minSeqNum",e.option(e.lookup("SequenceNumber"))],["minSeqAge",e.lookup("Duration")],["minSeqLedgerGap",e.lookup("Uint32")],["extraSigners",e.varArray(e.lookup("SignerKey"),2)]]),e.enum("PreconditionType",{precondNone:0,precondTime:1,precondV2:2}),e.union("Preconditions",{switchOn:e.lookup("PreconditionType"),switchName:"type",switches:[["precondNone",e.void()],["precondTime","timeBounds"],["precondV2","v2"]],arms:{timeBounds:e.lookup("TimeBounds"),v2:e.lookup("PreconditionsV2")}}),e.struct("LedgerFootprint",[["readOnly",e.varArray(e.lookup("LedgerKey"),2147483647)],["readWrite",e.varArray(e.lookup("LedgerKey"),2147483647)]]),e.struct("SorobanResources",[["footprint",e.lookup("LedgerFootprint")],["instructions",e.lookup("Uint32")],["readBytes",e.lookup("Uint32")],["writeBytes",e.lookup("Uint32")]]),e.struct("SorobanTransactionData",[["ext",e.lookup("ExtensionPoint")],["resources",e.lookup("SorobanResources")],["resourceFee",e.lookup("Int64")]]),e.union("TransactionV0Ext",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionV0",[["sourceAccountEd25519",e.lookup("Uint256")],["fee",e.lookup("Uint32")],["seqNum",e.lookup("SequenceNumber")],["timeBounds",e.option(e.lookup("TimeBounds"))],["memo",e.lookup("Memo")],["operations",e.varArray(e.lookup("Operation"),e.lookup("MAX_OPS_PER_TX"))],["ext",e.lookup("TransactionV0Ext")]]),e.struct("TransactionV0Envelope",[["tx",e.lookup("TransactionV0")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("TransactionExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()],[1,"sorobanData"]],arms:{sorobanData:e.lookup("SorobanTransactionData")}}),e.struct("Transaction",[["sourceAccount",e.lookup("MuxedAccount")],["fee",e.lookup("Uint32")],["seqNum",e.lookup("SequenceNumber")],["cond",e.lookup("Preconditions")],["memo",e.lookup("Memo")],["operations",e.varArray(e.lookup("Operation"),e.lookup("MAX_OPS_PER_TX"))],["ext",e.lookup("TransactionExt")]]),e.struct("TransactionV1Envelope",[["tx",e.lookup("Transaction")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("FeeBumpTransactionInnerTx",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","v1"]],arms:{v1:e.lookup("TransactionV1Envelope")}}),e.union("FeeBumpTransactionExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("FeeBumpTransaction",[["feeSource",e.lookup("MuxedAccount")],["fee",e.lookup("Int64")],["innerTx",e.lookup("FeeBumpTransactionInnerTx")],["ext",e.lookup("FeeBumpTransactionExt")]]),e.struct("FeeBumpTransactionEnvelope",[["tx",e.lookup("FeeBumpTransaction")],["signatures",e.varArray(e.lookup("DecoratedSignature"),20)]]),e.union("TransactionEnvelope",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTxV0","v0"],["envelopeTypeTx","v1"],["envelopeTypeTxFeeBump","feeBump"]],arms:{v0:e.lookup("TransactionV0Envelope"),v1:e.lookup("TransactionV1Envelope"),feeBump:e.lookup("FeeBumpTransactionEnvelope")}}),e.union("TransactionSignaturePayloadTaggedTransaction",{switchOn:e.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","tx"],["envelopeTypeTxFeeBump","feeBump"]],arms:{tx:e.lookup("Transaction"),feeBump:e.lookup("FeeBumpTransaction")}}),e.struct("TransactionSignaturePayload",[["networkId",e.lookup("Hash")],["taggedTransaction",e.lookup("TransactionSignaturePayloadTaggedTransaction")]]),e.enum("ClaimAtomType",{claimAtomTypeV0:0,claimAtomTypeOrderBook:1,claimAtomTypeLiquidityPool:2}),e.struct("ClaimOfferAtomV0",[["sellerEd25519",e.lookup("Uint256")],["offerId",e.lookup("Int64")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.struct("ClaimOfferAtom",[["sellerId",e.lookup("AccountId")],["offerId",e.lookup("Int64")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.struct("ClaimLiquidityAtom",[["liquidityPoolId",e.lookup("PoolId")],["assetSold",e.lookup("Asset")],["amountSold",e.lookup("Int64")],["assetBought",e.lookup("Asset")],["amountBought",e.lookup("Int64")]]),e.union("ClaimAtom",{switchOn:e.lookup("ClaimAtomType"),switchName:"type",switches:[["claimAtomTypeV0","v0"],["claimAtomTypeOrderBook","orderBook"],["claimAtomTypeLiquidityPool","liquidityPool"]],arms:{v0:e.lookup("ClaimOfferAtomV0"),orderBook:e.lookup("ClaimOfferAtom"),liquidityPool:e.lookup("ClaimLiquidityAtom")}}),e.enum("CreateAccountResultCode",{createAccountSuccess:0,createAccountMalformed:-1,createAccountUnderfunded:-2,createAccountLowReserve:-3,createAccountAlreadyExist:-4}),e.union("CreateAccountResult",{switchOn:e.lookup("CreateAccountResultCode"),switchName:"code",switches:[["createAccountSuccess",e.void()],["createAccountMalformed",e.void()],["createAccountUnderfunded",e.void()],["createAccountLowReserve",e.void()],["createAccountAlreadyExist",e.void()]],arms:{}}),e.enum("PaymentResultCode",{paymentSuccess:0,paymentMalformed:-1,paymentUnderfunded:-2,paymentSrcNoTrust:-3,paymentSrcNotAuthorized:-4,paymentNoDestination:-5,paymentNoTrust:-6,paymentNotAuthorized:-7,paymentLineFull:-8,paymentNoIssuer:-9}),e.union("PaymentResult",{switchOn:e.lookup("PaymentResultCode"),switchName:"code",switches:[["paymentSuccess",e.void()],["paymentMalformed",e.void()],["paymentUnderfunded",e.void()],["paymentSrcNoTrust",e.void()],["paymentSrcNotAuthorized",e.void()],["paymentNoDestination",e.void()],["paymentNoTrust",e.void()],["paymentNotAuthorized",e.void()],["paymentLineFull",e.void()],["paymentNoIssuer",e.void()]],arms:{}}),e.enum("PathPaymentStrictReceiveResultCode",{pathPaymentStrictReceiveSuccess:0,pathPaymentStrictReceiveMalformed:-1,pathPaymentStrictReceiveUnderfunded:-2,pathPaymentStrictReceiveSrcNoTrust:-3,pathPaymentStrictReceiveSrcNotAuthorized:-4,pathPaymentStrictReceiveNoDestination:-5,pathPaymentStrictReceiveNoTrust:-6,pathPaymentStrictReceiveNotAuthorized:-7,pathPaymentStrictReceiveLineFull:-8,pathPaymentStrictReceiveNoIssuer:-9,pathPaymentStrictReceiveTooFewOffers:-10,pathPaymentStrictReceiveOfferCrossSelf:-11,pathPaymentStrictReceiveOverSendmax:-12}),e.struct("SimplePaymentResult",[["destination",e.lookup("AccountId")],["asset",e.lookup("Asset")],["amount",e.lookup("Int64")]]),e.struct("PathPaymentStrictReceiveResultSuccess",[["offers",e.varArray(e.lookup("ClaimAtom"),2147483647)],["last",e.lookup("SimplePaymentResult")]]),e.union("PathPaymentStrictReceiveResult",{switchOn:e.lookup("PathPaymentStrictReceiveResultCode"),switchName:"code",switches:[["pathPaymentStrictReceiveSuccess","success"],["pathPaymentStrictReceiveMalformed",e.void()],["pathPaymentStrictReceiveUnderfunded",e.void()],["pathPaymentStrictReceiveSrcNoTrust",e.void()],["pathPaymentStrictReceiveSrcNotAuthorized",e.void()],["pathPaymentStrictReceiveNoDestination",e.void()],["pathPaymentStrictReceiveNoTrust",e.void()],["pathPaymentStrictReceiveNotAuthorized",e.void()],["pathPaymentStrictReceiveLineFull",e.void()],["pathPaymentStrictReceiveNoIssuer","noIssuer"],["pathPaymentStrictReceiveTooFewOffers",e.void()],["pathPaymentStrictReceiveOfferCrossSelf",e.void()],["pathPaymentStrictReceiveOverSendmax",e.void()]],arms:{success:e.lookup("PathPaymentStrictReceiveResultSuccess"),noIssuer:e.lookup("Asset")}}),e.enum("PathPaymentStrictSendResultCode",{pathPaymentStrictSendSuccess:0,pathPaymentStrictSendMalformed:-1,pathPaymentStrictSendUnderfunded:-2,pathPaymentStrictSendSrcNoTrust:-3,pathPaymentStrictSendSrcNotAuthorized:-4,pathPaymentStrictSendNoDestination:-5,pathPaymentStrictSendNoTrust:-6,pathPaymentStrictSendNotAuthorized:-7,pathPaymentStrictSendLineFull:-8,pathPaymentStrictSendNoIssuer:-9,pathPaymentStrictSendTooFewOffers:-10,pathPaymentStrictSendOfferCrossSelf:-11,pathPaymentStrictSendUnderDestmin:-12}),e.struct("PathPaymentStrictSendResultSuccess",[["offers",e.varArray(e.lookup("ClaimAtom"),2147483647)],["last",e.lookup("SimplePaymentResult")]]),e.union("PathPaymentStrictSendResult",{switchOn:e.lookup("PathPaymentStrictSendResultCode"),switchName:"code",switches:[["pathPaymentStrictSendSuccess","success"],["pathPaymentStrictSendMalformed",e.void()],["pathPaymentStrictSendUnderfunded",e.void()],["pathPaymentStrictSendSrcNoTrust",e.void()],["pathPaymentStrictSendSrcNotAuthorized",e.void()],["pathPaymentStrictSendNoDestination",e.void()],["pathPaymentStrictSendNoTrust",e.void()],["pathPaymentStrictSendNotAuthorized",e.void()],["pathPaymentStrictSendLineFull",e.void()],["pathPaymentStrictSendNoIssuer","noIssuer"],["pathPaymentStrictSendTooFewOffers",e.void()],["pathPaymentStrictSendOfferCrossSelf",e.void()],["pathPaymentStrictSendUnderDestmin",e.void()]],arms:{success:e.lookup("PathPaymentStrictSendResultSuccess"),noIssuer:e.lookup("Asset")}}),e.enum("ManageSellOfferResultCode",{manageSellOfferSuccess:0,manageSellOfferMalformed:-1,manageSellOfferSellNoTrust:-2,manageSellOfferBuyNoTrust:-3,manageSellOfferSellNotAuthorized:-4,manageSellOfferBuyNotAuthorized:-5,manageSellOfferLineFull:-6,manageSellOfferUnderfunded:-7,manageSellOfferCrossSelf:-8,manageSellOfferSellNoIssuer:-9,manageSellOfferBuyNoIssuer:-10,manageSellOfferNotFound:-11,manageSellOfferLowReserve:-12}),e.enum("ManageOfferEffect",{manageOfferCreated:0,manageOfferUpdated:1,manageOfferDeleted:2}),e.union("ManageOfferSuccessResultOffer",{switchOn:e.lookup("ManageOfferEffect"),switchName:"effect",switches:[["manageOfferCreated","offer"],["manageOfferUpdated","offer"],["manageOfferDeleted",e.void()]],arms:{offer:e.lookup("OfferEntry")}}),e.struct("ManageOfferSuccessResult",[["offersClaimed",e.varArray(e.lookup("ClaimAtom"),2147483647)],["offer",e.lookup("ManageOfferSuccessResultOffer")]]),e.union("ManageSellOfferResult",{switchOn:e.lookup("ManageSellOfferResultCode"),switchName:"code",switches:[["manageSellOfferSuccess","success"],["manageSellOfferMalformed",e.void()],["manageSellOfferSellNoTrust",e.void()],["manageSellOfferBuyNoTrust",e.void()],["manageSellOfferSellNotAuthorized",e.void()],["manageSellOfferBuyNotAuthorized",e.void()],["manageSellOfferLineFull",e.void()],["manageSellOfferUnderfunded",e.void()],["manageSellOfferCrossSelf",e.void()],["manageSellOfferSellNoIssuer",e.void()],["manageSellOfferBuyNoIssuer",e.void()],["manageSellOfferNotFound",e.void()],["manageSellOfferLowReserve",e.void()]],arms:{success:e.lookup("ManageOfferSuccessResult")}}),e.enum("ManageBuyOfferResultCode",{manageBuyOfferSuccess:0,manageBuyOfferMalformed:-1,manageBuyOfferSellNoTrust:-2,manageBuyOfferBuyNoTrust:-3,manageBuyOfferSellNotAuthorized:-4,manageBuyOfferBuyNotAuthorized:-5,manageBuyOfferLineFull:-6,manageBuyOfferUnderfunded:-7,manageBuyOfferCrossSelf:-8,manageBuyOfferSellNoIssuer:-9,manageBuyOfferBuyNoIssuer:-10,manageBuyOfferNotFound:-11,manageBuyOfferLowReserve:-12}),e.union("ManageBuyOfferResult",{switchOn:e.lookup("ManageBuyOfferResultCode"),switchName:"code",switches:[["manageBuyOfferSuccess","success"],["manageBuyOfferMalformed",e.void()],["manageBuyOfferSellNoTrust",e.void()],["manageBuyOfferBuyNoTrust",e.void()],["manageBuyOfferSellNotAuthorized",e.void()],["manageBuyOfferBuyNotAuthorized",e.void()],["manageBuyOfferLineFull",e.void()],["manageBuyOfferUnderfunded",e.void()],["manageBuyOfferCrossSelf",e.void()],["manageBuyOfferSellNoIssuer",e.void()],["manageBuyOfferBuyNoIssuer",e.void()],["manageBuyOfferNotFound",e.void()],["manageBuyOfferLowReserve",e.void()]],arms:{success:e.lookup("ManageOfferSuccessResult")}}),e.enum("SetOptionsResultCode",{setOptionsSuccess:0,setOptionsLowReserve:-1,setOptionsTooManySigners:-2,setOptionsBadFlags:-3,setOptionsInvalidInflation:-4,setOptionsCantChange:-5,setOptionsUnknownFlag:-6,setOptionsThresholdOutOfRange:-7,setOptionsBadSigner:-8,setOptionsInvalidHomeDomain:-9,setOptionsAuthRevocableRequired:-10}),e.union("SetOptionsResult",{switchOn:e.lookup("SetOptionsResultCode"),switchName:"code",switches:[["setOptionsSuccess",e.void()],["setOptionsLowReserve",e.void()],["setOptionsTooManySigners",e.void()],["setOptionsBadFlags",e.void()],["setOptionsInvalidInflation",e.void()],["setOptionsCantChange",e.void()],["setOptionsUnknownFlag",e.void()],["setOptionsThresholdOutOfRange",e.void()],["setOptionsBadSigner",e.void()],["setOptionsInvalidHomeDomain",e.void()],["setOptionsAuthRevocableRequired",e.void()]],arms:{}}),e.enum("ChangeTrustResultCode",{changeTrustSuccess:0,changeTrustMalformed:-1,changeTrustNoIssuer:-2,changeTrustInvalidLimit:-3,changeTrustLowReserve:-4,changeTrustSelfNotAllowed:-5,changeTrustTrustLineMissing:-6,changeTrustCannotDelete:-7,changeTrustNotAuthMaintainLiabilities:-8}),e.union("ChangeTrustResult",{switchOn:e.lookup("ChangeTrustResultCode"),switchName:"code",switches:[["changeTrustSuccess",e.void()],["changeTrustMalformed",e.void()],["changeTrustNoIssuer",e.void()],["changeTrustInvalidLimit",e.void()],["changeTrustLowReserve",e.void()],["changeTrustSelfNotAllowed",e.void()],["changeTrustTrustLineMissing",e.void()],["changeTrustCannotDelete",e.void()],["changeTrustNotAuthMaintainLiabilities",e.void()]],arms:{}}),e.enum("AllowTrustResultCode",{allowTrustSuccess:0,allowTrustMalformed:-1,allowTrustNoTrustLine:-2,allowTrustTrustNotRequired:-3,allowTrustCantRevoke:-4,allowTrustSelfNotAllowed:-5,allowTrustLowReserve:-6}),e.union("AllowTrustResult",{switchOn:e.lookup("AllowTrustResultCode"),switchName:"code",switches:[["allowTrustSuccess",e.void()],["allowTrustMalformed",e.void()],["allowTrustNoTrustLine",e.void()],["allowTrustTrustNotRequired",e.void()],["allowTrustCantRevoke",e.void()],["allowTrustSelfNotAllowed",e.void()],["allowTrustLowReserve",e.void()]],arms:{}}),e.enum("AccountMergeResultCode",{accountMergeSuccess:0,accountMergeMalformed:-1,accountMergeNoAccount:-2,accountMergeImmutableSet:-3,accountMergeHasSubEntries:-4,accountMergeSeqnumTooFar:-5,accountMergeDestFull:-6,accountMergeIsSponsor:-7}),e.union("AccountMergeResult",{switchOn:e.lookup("AccountMergeResultCode"),switchName:"code",switches:[["accountMergeSuccess","sourceAccountBalance"],["accountMergeMalformed",e.void()],["accountMergeNoAccount",e.void()],["accountMergeImmutableSet",e.void()],["accountMergeHasSubEntries",e.void()],["accountMergeSeqnumTooFar",e.void()],["accountMergeDestFull",e.void()],["accountMergeIsSponsor",e.void()]],arms:{sourceAccountBalance:e.lookup("Int64")}}),e.enum("InflationResultCode",{inflationSuccess:0,inflationNotTime:-1}),e.struct("InflationPayout",[["destination",e.lookup("AccountId")],["amount",e.lookup("Int64")]]),e.union("InflationResult",{switchOn:e.lookup("InflationResultCode"),switchName:"code",switches:[["inflationSuccess","payouts"],["inflationNotTime",e.void()]],arms:{payouts:e.varArray(e.lookup("InflationPayout"),2147483647)}}),e.enum("ManageDataResultCode",{manageDataSuccess:0,manageDataNotSupportedYet:-1,manageDataNameNotFound:-2,manageDataLowReserve:-3,manageDataInvalidName:-4}),e.union("ManageDataResult",{switchOn:e.lookup("ManageDataResultCode"),switchName:"code",switches:[["manageDataSuccess",e.void()],["manageDataNotSupportedYet",e.void()],["manageDataNameNotFound",e.void()],["manageDataLowReserve",e.void()],["manageDataInvalidName",e.void()]],arms:{}}),e.enum("BumpSequenceResultCode",{bumpSequenceSuccess:0,bumpSequenceBadSeq:-1}),e.union("BumpSequenceResult",{switchOn:e.lookup("BumpSequenceResultCode"),switchName:"code",switches:[["bumpSequenceSuccess",e.void()],["bumpSequenceBadSeq",e.void()]],arms:{}}),e.enum("CreateClaimableBalanceResultCode",{createClaimableBalanceSuccess:0,createClaimableBalanceMalformed:-1,createClaimableBalanceLowReserve:-2,createClaimableBalanceNoTrust:-3,createClaimableBalanceNotAuthorized:-4,createClaimableBalanceUnderfunded:-5}),e.union("CreateClaimableBalanceResult",{switchOn:e.lookup("CreateClaimableBalanceResultCode"),switchName:"code",switches:[["createClaimableBalanceSuccess","balanceId"],["createClaimableBalanceMalformed",e.void()],["createClaimableBalanceLowReserve",e.void()],["createClaimableBalanceNoTrust",e.void()],["createClaimableBalanceNotAuthorized",e.void()],["createClaimableBalanceUnderfunded",e.void()]],arms:{balanceId:e.lookup("ClaimableBalanceId")}}),e.enum("ClaimClaimableBalanceResultCode",{claimClaimableBalanceSuccess:0,claimClaimableBalanceDoesNotExist:-1,claimClaimableBalanceCannotClaim:-2,claimClaimableBalanceLineFull:-3,claimClaimableBalanceNoTrust:-4,claimClaimableBalanceNotAuthorized:-5}),e.union("ClaimClaimableBalanceResult",{switchOn:e.lookup("ClaimClaimableBalanceResultCode"),switchName:"code",switches:[["claimClaimableBalanceSuccess",e.void()],["claimClaimableBalanceDoesNotExist",e.void()],["claimClaimableBalanceCannotClaim",e.void()],["claimClaimableBalanceLineFull",e.void()],["claimClaimableBalanceNoTrust",e.void()],["claimClaimableBalanceNotAuthorized",e.void()]],arms:{}}),e.enum("BeginSponsoringFutureReservesResultCode",{beginSponsoringFutureReservesSuccess:0,beginSponsoringFutureReservesMalformed:-1,beginSponsoringFutureReservesAlreadySponsored:-2,beginSponsoringFutureReservesRecursive:-3}),e.union("BeginSponsoringFutureReservesResult",{switchOn:e.lookup("BeginSponsoringFutureReservesResultCode"),switchName:"code",switches:[["beginSponsoringFutureReservesSuccess",e.void()],["beginSponsoringFutureReservesMalformed",e.void()],["beginSponsoringFutureReservesAlreadySponsored",e.void()],["beginSponsoringFutureReservesRecursive",e.void()]],arms:{}}),e.enum("EndSponsoringFutureReservesResultCode",{endSponsoringFutureReservesSuccess:0,endSponsoringFutureReservesNotSponsored:-1}),e.union("EndSponsoringFutureReservesResult",{switchOn:e.lookup("EndSponsoringFutureReservesResultCode"),switchName:"code",switches:[["endSponsoringFutureReservesSuccess",e.void()],["endSponsoringFutureReservesNotSponsored",e.void()]],arms:{}}),e.enum("RevokeSponsorshipResultCode",{revokeSponsorshipSuccess:0,revokeSponsorshipDoesNotExist:-1,revokeSponsorshipNotSponsor:-2,revokeSponsorshipLowReserve:-3,revokeSponsorshipOnlyTransferable:-4,revokeSponsorshipMalformed:-5}),e.union("RevokeSponsorshipResult",{switchOn:e.lookup("RevokeSponsorshipResultCode"),switchName:"code",switches:[["revokeSponsorshipSuccess",e.void()],["revokeSponsorshipDoesNotExist",e.void()],["revokeSponsorshipNotSponsor",e.void()],["revokeSponsorshipLowReserve",e.void()],["revokeSponsorshipOnlyTransferable",e.void()],["revokeSponsorshipMalformed",e.void()]],arms:{}}),e.enum("ClawbackResultCode",{clawbackSuccess:0,clawbackMalformed:-1,clawbackNotClawbackEnabled:-2,clawbackNoTrust:-3,clawbackUnderfunded:-4}),e.union("ClawbackResult",{switchOn:e.lookup("ClawbackResultCode"),switchName:"code",switches:[["clawbackSuccess",e.void()],["clawbackMalformed",e.void()],["clawbackNotClawbackEnabled",e.void()],["clawbackNoTrust",e.void()],["clawbackUnderfunded",e.void()]],arms:{}}),e.enum("ClawbackClaimableBalanceResultCode",{clawbackClaimableBalanceSuccess:0,clawbackClaimableBalanceDoesNotExist:-1,clawbackClaimableBalanceNotIssuer:-2,clawbackClaimableBalanceNotClawbackEnabled:-3}),e.union("ClawbackClaimableBalanceResult",{switchOn:e.lookup("ClawbackClaimableBalanceResultCode"),switchName:"code",switches:[["clawbackClaimableBalanceSuccess",e.void()],["clawbackClaimableBalanceDoesNotExist",e.void()],["clawbackClaimableBalanceNotIssuer",e.void()],["clawbackClaimableBalanceNotClawbackEnabled",e.void()]],arms:{}}),e.enum("SetTrustLineFlagsResultCode",{setTrustLineFlagsSuccess:0,setTrustLineFlagsMalformed:-1,setTrustLineFlagsNoTrustLine:-2,setTrustLineFlagsCantRevoke:-3,setTrustLineFlagsInvalidState:-4,setTrustLineFlagsLowReserve:-5}),e.union("SetTrustLineFlagsResult",{switchOn:e.lookup("SetTrustLineFlagsResultCode"),switchName:"code",switches:[["setTrustLineFlagsSuccess",e.void()],["setTrustLineFlagsMalformed",e.void()],["setTrustLineFlagsNoTrustLine",e.void()],["setTrustLineFlagsCantRevoke",e.void()],["setTrustLineFlagsInvalidState",e.void()],["setTrustLineFlagsLowReserve",e.void()]],arms:{}}),e.enum("LiquidityPoolDepositResultCode",{liquidityPoolDepositSuccess:0,liquidityPoolDepositMalformed:-1,liquidityPoolDepositNoTrust:-2,liquidityPoolDepositNotAuthorized:-3,liquidityPoolDepositUnderfunded:-4,liquidityPoolDepositLineFull:-5,liquidityPoolDepositBadPrice:-6,liquidityPoolDepositPoolFull:-7}),e.union("LiquidityPoolDepositResult",{switchOn:e.lookup("LiquidityPoolDepositResultCode"),switchName:"code",switches:[["liquidityPoolDepositSuccess",e.void()],["liquidityPoolDepositMalformed",e.void()],["liquidityPoolDepositNoTrust",e.void()],["liquidityPoolDepositNotAuthorized",e.void()],["liquidityPoolDepositUnderfunded",e.void()],["liquidityPoolDepositLineFull",e.void()],["liquidityPoolDepositBadPrice",e.void()],["liquidityPoolDepositPoolFull",e.void()]],arms:{}}),e.enum("LiquidityPoolWithdrawResultCode",{liquidityPoolWithdrawSuccess:0,liquidityPoolWithdrawMalformed:-1,liquidityPoolWithdrawNoTrust:-2,liquidityPoolWithdrawUnderfunded:-3,liquidityPoolWithdrawLineFull:-4,liquidityPoolWithdrawUnderMinimum:-5}),e.union("LiquidityPoolWithdrawResult",{switchOn:e.lookup("LiquidityPoolWithdrawResultCode"),switchName:"code",switches:[["liquidityPoolWithdrawSuccess",e.void()],["liquidityPoolWithdrawMalformed",e.void()],["liquidityPoolWithdrawNoTrust",e.void()],["liquidityPoolWithdrawUnderfunded",e.void()],["liquidityPoolWithdrawLineFull",e.void()],["liquidityPoolWithdrawUnderMinimum",e.void()]],arms:{}}),e.enum("InvokeHostFunctionResultCode",{invokeHostFunctionSuccess:0,invokeHostFunctionMalformed:-1,invokeHostFunctionTrapped:-2,invokeHostFunctionResourceLimitExceeded:-3,invokeHostFunctionEntryArchived:-4,invokeHostFunctionInsufficientRefundableFee:-5}),e.union("InvokeHostFunctionResult",{switchOn:e.lookup("InvokeHostFunctionResultCode"),switchName:"code",switches:[["invokeHostFunctionSuccess","success"],["invokeHostFunctionMalformed",e.void()],["invokeHostFunctionTrapped",e.void()],["invokeHostFunctionResourceLimitExceeded",e.void()],["invokeHostFunctionEntryArchived",e.void()],["invokeHostFunctionInsufficientRefundableFee",e.void()]],arms:{success:e.lookup("Hash")}}),e.enum("ExtendFootprintTtlResultCode",{extendFootprintTtlSuccess:0,extendFootprintTtlMalformed:-1,extendFootprintTtlResourceLimitExceeded:-2,extendFootprintTtlInsufficientRefundableFee:-3}),e.union("ExtendFootprintTtlResult",{switchOn:e.lookup("ExtendFootprintTtlResultCode"),switchName:"code",switches:[["extendFootprintTtlSuccess",e.void()],["extendFootprintTtlMalformed",e.void()],["extendFootprintTtlResourceLimitExceeded",e.void()],["extendFootprintTtlInsufficientRefundableFee",e.void()]],arms:{}}),e.enum("RestoreFootprintResultCode",{restoreFootprintSuccess:0,restoreFootprintMalformed:-1,restoreFootprintResourceLimitExceeded:-2,restoreFootprintInsufficientRefundableFee:-3}),e.union("RestoreFootprintResult",{switchOn:e.lookup("RestoreFootprintResultCode"),switchName:"code",switches:[["restoreFootprintSuccess",e.void()],["restoreFootprintMalformed",e.void()],["restoreFootprintResourceLimitExceeded",e.void()],["restoreFootprintInsufficientRefundableFee",e.void()]],arms:{}}),e.enum("OperationResultCode",{opInner:0,opBadAuth:-1,opNoAccount:-2,opNotSupported:-3,opTooManySubentries:-4,opExceededWorkLimit:-5,opTooManySponsoring:-6}),e.union("OperationResultTr",{switchOn:e.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountResult"],["payment","paymentResult"],["pathPaymentStrictReceive","pathPaymentStrictReceiveResult"],["manageSellOffer","manageSellOfferResult"],["createPassiveSellOffer","createPassiveSellOfferResult"],["setOptions","setOptionsResult"],["changeTrust","changeTrustResult"],["allowTrust","allowTrustResult"],["accountMerge","accountMergeResult"],["inflation","inflationResult"],["manageData","manageDataResult"],["bumpSequence","bumpSeqResult"],["manageBuyOffer","manageBuyOfferResult"],["pathPaymentStrictSend","pathPaymentStrictSendResult"],["createClaimableBalance","createClaimableBalanceResult"],["claimClaimableBalance","claimClaimableBalanceResult"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesResult"],["endSponsoringFutureReserves","endSponsoringFutureReservesResult"],["revokeSponsorship","revokeSponsorshipResult"],["clawback","clawbackResult"],["clawbackClaimableBalance","clawbackClaimableBalanceResult"],["setTrustLineFlags","setTrustLineFlagsResult"],["liquidityPoolDeposit","liquidityPoolDepositResult"],["liquidityPoolWithdraw","liquidityPoolWithdrawResult"],["invokeHostFunction","invokeHostFunctionResult"],["extendFootprintTtl","extendFootprintTtlResult"],["restoreFootprint","restoreFootprintResult"]],arms:{createAccountResult:e.lookup("CreateAccountResult"),paymentResult:e.lookup("PaymentResult"),pathPaymentStrictReceiveResult:e.lookup("PathPaymentStrictReceiveResult"),manageSellOfferResult:e.lookup("ManageSellOfferResult"),createPassiveSellOfferResult:e.lookup("ManageSellOfferResult"),setOptionsResult:e.lookup("SetOptionsResult"),changeTrustResult:e.lookup("ChangeTrustResult"),allowTrustResult:e.lookup("AllowTrustResult"),accountMergeResult:e.lookup("AccountMergeResult"),inflationResult:e.lookup("InflationResult"),manageDataResult:e.lookup("ManageDataResult"),bumpSeqResult:e.lookup("BumpSequenceResult"),manageBuyOfferResult:e.lookup("ManageBuyOfferResult"),pathPaymentStrictSendResult:e.lookup("PathPaymentStrictSendResult"),createClaimableBalanceResult:e.lookup("CreateClaimableBalanceResult"),claimClaimableBalanceResult:e.lookup("ClaimClaimableBalanceResult"),beginSponsoringFutureReservesResult:e.lookup("BeginSponsoringFutureReservesResult"),endSponsoringFutureReservesResult:e.lookup("EndSponsoringFutureReservesResult"),revokeSponsorshipResult:e.lookup("RevokeSponsorshipResult"),clawbackResult:e.lookup("ClawbackResult"),clawbackClaimableBalanceResult:e.lookup("ClawbackClaimableBalanceResult"),setTrustLineFlagsResult:e.lookup("SetTrustLineFlagsResult"),liquidityPoolDepositResult:e.lookup("LiquidityPoolDepositResult"),liquidityPoolWithdrawResult:e.lookup("LiquidityPoolWithdrawResult"),invokeHostFunctionResult:e.lookup("InvokeHostFunctionResult"),extendFootprintTtlResult:e.lookup("ExtendFootprintTtlResult"),restoreFootprintResult:e.lookup("RestoreFootprintResult")}}),e.union("OperationResult",{switchOn:e.lookup("OperationResultCode"),switchName:"code",switches:[["opInner","tr"],["opBadAuth",e.void()],["opNoAccount",e.void()],["opNotSupported",e.void()],["opTooManySubentries",e.void()],["opExceededWorkLimit",e.void()],["opTooManySponsoring",e.void()]],arms:{tr:e.lookup("OperationResultTr")}}),e.enum("TransactionResultCode",{txFeeBumpInnerSuccess:1,txSuccess:0,txFailed:-1,txTooEarly:-2,txTooLate:-3,txMissingOperation:-4,txBadSeq:-5,txBadAuth:-6,txInsufficientBalance:-7,txNoAccount:-8,txInsufficientFee:-9,txBadAuthExtra:-10,txInternalError:-11,txNotSupported:-12,txFeeBumpInnerFailed:-13,txBadSponsorship:-14,txBadMinSeqAgeOrGap:-15,txMalformed:-16,txSorobanInvalid:-17}),e.union("InnerTransactionResultResult",{switchOn:e.lookup("TransactionResultCode"),switchName:"code",switches:[["txSuccess","results"],["txFailed","results"],["txTooEarly",e.void()],["txTooLate",e.void()],["txMissingOperation",e.void()],["txBadSeq",e.void()],["txBadAuth",e.void()],["txInsufficientBalance",e.void()],["txNoAccount",e.void()],["txInsufficientFee",e.void()],["txBadAuthExtra",e.void()],["txInternalError",e.void()],["txNotSupported",e.void()],["txBadSponsorship",e.void()],["txBadMinSeqAgeOrGap",e.void()],["txMalformed",e.void()],["txSorobanInvalid",e.void()]],arms:{results:e.varArray(e.lookup("OperationResult"),2147483647)}}),e.union("InnerTransactionResultExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("InnerTransactionResult",[["feeCharged",e.lookup("Int64")],["result",e.lookup("InnerTransactionResultResult")],["ext",e.lookup("InnerTransactionResultExt")]]),e.struct("InnerTransactionResultPair",[["transactionHash",e.lookup("Hash")],["result",e.lookup("InnerTransactionResult")]]),e.union("TransactionResultResult",{switchOn:e.lookup("TransactionResultCode"),switchName:"code",switches:[["txFeeBumpInnerSuccess","innerResultPair"],["txFeeBumpInnerFailed","innerResultPair"],["txSuccess","results"],["txFailed","results"],["txTooEarly",e.void()],["txTooLate",e.void()],["txMissingOperation",e.void()],["txBadSeq",e.void()],["txBadAuth",e.void()],["txInsufficientBalance",e.void()],["txNoAccount",e.void()],["txInsufficientFee",e.void()],["txBadAuthExtra",e.void()],["txInternalError",e.void()],["txNotSupported",e.void()],["txBadSponsorship",e.void()],["txBadMinSeqAgeOrGap",e.void()],["txMalformed",e.void()],["txSorobanInvalid",e.void()]],arms:{innerResultPair:e.lookup("InnerTransactionResultPair"),results:e.varArray(e.lookup("OperationResult"),2147483647)}}),e.union("TransactionResultExt",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.struct("TransactionResult",[["feeCharged",e.lookup("Int64")],["result",e.lookup("TransactionResultResult")],["ext",e.lookup("TransactionResultExt")]]),e.typedef("Hash",e.opaque(32)),e.typedef("Uint256",e.opaque(32)),e.typedef("Uint32",e.uint()),e.typedef("Int32",e.int()),e.typedef("Uint64",e.uhyper()),e.typedef("Int64",e.hyper()),e.typedef("TimePoint",e.lookup("Uint64")),e.typedef("Duration",e.lookup("Uint64")),e.union("ExtensionPoint",{switchOn:e.int(),switchName:"v",switches:[[0,e.void()]],arms:{}}),e.enum("CryptoKeyType",{keyTypeEd25519:0,keyTypePreAuthTx:1,keyTypeHashX:2,keyTypeEd25519SignedPayload:3,keyTypeMuxedEd25519:256}),e.enum("PublicKeyType",{publicKeyTypeEd25519:0}),e.enum("SignerKeyType",{signerKeyTypeEd25519:0,signerKeyTypePreAuthTx:1,signerKeyTypeHashX:2,signerKeyTypeEd25519SignedPayload:3}),e.union("PublicKey",{switchOn:e.lookup("PublicKeyType"),switchName:"type",switches:[["publicKeyTypeEd25519","ed25519"]],arms:{ed25519:e.lookup("Uint256")}}),e.struct("SignerKeyEd25519SignedPayload",[["ed25519",e.lookup("Uint256")],["payload",e.varOpaque(64)]]),e.union("SignerKey",{switchOn:e.lookup("SignerKeyType"),switchName:"type",switches:[["signerKeyTypeEd25519","ed25519"],["signerKeyTypePreAuthTx","preAuthTx"],["signerKeyTypeHashX","hashX"],["signerKeyTypeEd25519SignedPayload","ed25519SignedPayload"]],arms:{ed25519:e.lookup("Uint256"),preAuthTx:e.lookup("Uint256"),hashX:e.lookup("Uint256"),ed25519SignedPayload:e.lookup("SignerKeyEd25519SignedPayload")}}),e.typedef("Signature",e.varOpaque(64)),e.typedef("SignatureHint",e.opaque(4)),e.typedef("NodeId",e.lookup("PublicKey")),e.typedef("AccountId",e.lookup("PublicKey")),e.struct("Curve25519Secret",[["key",e.opaque(32)]]),e.struct("Curve25519Public",[["key",e.opaque(32)]]),e.struct("HmacSha256Key",[["key",e.opaque(32)]]),e.struct("HmacSha256Mac",[["mac",e.opaque(32)]]),e.enum("ScValType",{scvBool:0,scvVoid:1,scvError:2,scvU32:3,scvI32:4,scvU64:5,scvI64:6,scvTimepoint:7,scvDuration:8,scvU128:9,scvI128:10,scvU256:11,scvI256:12,scvBytes:13,scvString:14,scvSymbol:15,scvVec:16,scvMap:17,scvAddress:18,scvContractInstance:19,scvLedgerKeyContractInstance:20,scvLedgerKeyNonce:21}),e.enum("ScErrorType",{sceContract:0,sceWasmVm:1,sceContext:2,sceStorage:3,sceObject:4,sceCrypto:5,sceEvents:6,sceBudget:7,sceValue:8,sceAuth:9}),e.enum("ScErrorCode",{scecArithDomain:0,scecIndexBounds:1,scecInvalidInput:2,scecMissingValue:3,scecExistingValue:4,scecExceededLimit:5,scecInvalidAction:6,scecInternalError:7,scecUnexpectedType:8,scecUnexpectedSize:9}),e.union("ScError",{switchOn:e.lookup("ScErrorType"),switchName:"type",switches:[["sceContract","contractCode"],["sceWasmVm","code"],["sceContext","code"],["sceStorage","code"],["sceObject","code"],["sceCrypto","code"],["sceEvents","code"],["sceBudget","code"],["sceValue","code"],["sceAuth","code"]],arms:{contractCode:e.lookup("Uint32"),code:e.lookup("ScErrorCode")}}),e.struct("UInt128Parts",[["hi",e.lookup("Uint64")],["lo",e.lookup("Uint64")]]),e.struct("Int128Parts",[["hi",e.lookup("Int64")],["lo",e.lookup("Uint64")]]),e.struct("UInt256Parts",[["hiHi",e.lookup("Uint64")],["hiLo",e.lookup("Uint64")],["loHi",e.lookup("Uint64")],["loLo",e.lookup("Uint64")]]),e.struct("Int256Parts",[["hiHi",e.lookup("Int64")],["hiLo",e.lookup("Uint64")],["loHi",e.lookup("Uint64")],["loLo",e.lookup("Uint64")]]),e.enum("ContractExecutableType",{contractExecutableWasm:0,contractExecutableStellarAsset:1}),e.union("ContractExecutable",{switchOn:e.lookup("ContractExecutableType"),switchName:"type",switches:[["contractExecutableWasm","wasmHash"],["contractExecutableStellarAsset",e.void()]],arms:{wasmHash:e.lookup("Hash")}}),e.enum("ScAddressType",{scAddressTypeAccount:0,scAddressTypeContract:1}),e.union("ScAddress",{switchOn:e.lookup("ScAddressType"),switchName:"type",switches:[["scAddressTypeAccount","accountId"],["scAddressTypeContract","contractId"]],arms:{accountId:e.lookup("AccountId"),contractId:e.lookup("Hash")}}),e.const("SCSYMBOL_LIMIT",32),e.typedef("ScVec",e.varArray(e.lookup("ScVal"),2147483647)),e.typedef("ScMap",e.varArray(e.lookup("ScMapEntry"),2147483647)),e.typedef("ScBytes",e.varOpaque()),e.typedef("ScString",e.string()),e.typedef("ScSymbol",e.string(t)),e.struct("ScNonceKey",[["nonce",e.lookup("Int64")]]),e.struct("ScContractInstance",[["executable",e.lookup("ContractExecutable")],["storage",e.option(e.lookup("ScMap"))]]),e.union("ScVal",{switchOn:e.lookup("ScValType"),switchName:"type",switches:[["scvBool","b"],["scvVoid",e.void()],["scvError","error"],["scvU32","u32"],["scvI32","i32"],["scvU64","u64"],["scvI64","i64"],["scvTimepoint","timepoint"],["scvDuration","duration"],["scvU128","u128"],["scvI128","i128"],["scvU256","u256"],["scvI256","i256"],["scvBytes","bytes"],["scvString","str"],["scvSymbol","sym"],["scvVec","vec"],["scvMap","map"],["scvAddress","address"],["scvLedgerKeyContractInstance",e.void()],["scvLedgerKeyNonce","nonceKey"],["scvContractInstance","instance"]],arms:{b:e.bool(),error:e.lookup("ScError"),u32:e.lookup("Uint32"),i32:e.lookup("Int32"),u64:e.lookup("Uint64"),i64:e.lookup("Int64"),timepoint:e.lookup("TimePoint"),duration:e.lookup("Duration"),u128:e.lookup("UInt128Parts"),i128:e.lookup("Int128Parts"),u256:e.lookup("UInt256Parts"),i256:e.lookup("Int256Parts"),bytes:e.lookup("ScBytes"),str:e.lookup("ScString"),sym:e.lookup("ScSymbol"),vec:e.option(e.lookup("ScVec")),map:e.option(e.lookup("ScMap")),address:e.lookup("ScAddress"),nonceKey:e.lookup("ScNonceKey"),instance:e.lookup("ScContractInstance")}}),e.struct("ScMapEntry",[["key",e.lookup("ScVal")],["val",e.lookup("ScVal")]]),e.enum("ScEnvMetaKind",{scEnvMetaKindInterfaceVersion:0}),e.union("ScEnvMetaEntry",{switchOn:e.lookup("ScEnvMetaKind"),switchName:"kind",switches:[["scEnvMetaKindInterfaceVersion","interfaceVersion"]],arms:{interfaceVersion:e.lookup("Uint64")}}),e.struct("ScMetaV0",[["key",e.string()],["val",e.string()]]),e.enum("ScMetaKind",{scMetaV0:0}),e.union("ScMetaEntry",{switchOn:e.lookup("ScMetaKind"),switchName:"kind",switches:[["scMetaV0","v0"]],arms:{v0:e.lookup("ScMetaV0")}}),e.const("SC_SPEC_DOC_LIMIT",1024),e.enum("ScSpecType",{scSpecTypeVal:0,scSpecTypeBool:1,scSpecTypeVoid:2,scSpecTypeError:3,scSpecTypeU32:4,scSpecTypeI32:5,scSpecTypeU64:6,scSpecTypeI64:7,scSpecTypeTimepoint:8,scSpecTypeDuration:9,scSpecTypeU128:10,scSpecTypeI128:11,scSpecTypeU256:12,scSpecTypeI256:13,scSpecTypeBytes:14,scSpecTypeString:16,scSpecTypeSymbol:17,scSpecTypeAddress:19,scSpecTypeOption:1e3,scSpecTypeResult:1001,scSpecTypeVec:1002,scSpecTypeMap:1004,scSpecTypeTuple:1005,scSpecTypeBytesN:1006,scSpecTypeUdt:2e3}),e.struct("ScSpecTypeOption",[["valueType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeResult",[["okType",e.lookup("ScSpecTypeDef")],["errorType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeVec",[["elementType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeMap",[["keyType",e.lookup("ScSpecTypeDef")],["valueType",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecTypeTuple",[["valueTypes",e.varArray(e.lookup("ScSpecTypeDef"),12)]]),e.struct("ScSpecTypeBytesN",[["n",e.lookup("Uint32")]]),e.struct("ScSpecTypeUdt",[["name",e.string(60)]]),e.union("ScSpecTypeDef",{switchOn:e.lookup("ScSpecType"),switchName:"type",switches:[["scSpecTypeVal",e.void()],["scSpecTypeBool",e.void()],["scSpecTypeVoid",e.void()],["scSpecTypeError",e.void()],["scSpecTypeU32",e.void()],["scSpecTypeI32",e.void()],["scSpecTypeU64",e.void()],["scSpecTypeI64",e.void()],["scSpecTypeTimepoint",e.void()],["scSpecTypeDuration",e.void()],["scSpecTypeU128",e.void()],["scSpecTypeI128",e.void()],["scSpecTypeU256",e.void()],["scSpecTypeI256",e.void()],["scSpecTypeBytes",e.void()],["scSpecTypeString",e.void()],["scSpecTypeSymbol",e.void()],["scSpecTypeAddress",e.void()],["scSpecTypeOption","option"],["scSpecTypeResult","result"],["scSpecTypeVec","vec"],["scSpecTypeMap","map"],["scSpecTypeTuple","tuple"],["scSpecTypeBytesN","bytesN"],["scSpecTypeUdt","udt"]],arms:{option:e.lookup("ScSpecTypeOption"),result:e.lookup("ScSpecTypeResult"),vec:e.lookup("ScSpecTypeVec"),map:e.lookup("ScSpecTypeMap"),tuple:e.lookup("ScSpecTypeTuple"),bytesN:e.lookup("ScSpecTypeBytesN"),udt:e.lookup("ScSpecTypeUdt")}}),e.struct("ScSpecUdtStructFieldV0",[["doc",e.string(n)],["name",e.string(30)],["type",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecUdtStructV0",[["doc",e.string(n)],["lib",e.string(80)],["name",e.string(60)],["fields",e.varArray(e.lookup("ScSpecUdtStructFieldV0"),40)]]),e.struct("ScSpecUdtUnionCaseVoidV0",[["doc",e.string(n)],["name",e.string(60)]]),e.struct("ScSpecUdtUnionCaseTupleV0",[["doc",e.string(n)],["name",e.string(60)],["type",e.varArray(e.lookup("ScSpecTypeDef"),12)]]),e.enum("ScSpecUdtUnionCaseV0Kind",{scSpecUdtUnionCaseVoidV0:0,scSpecUdtUnionCaseTupleV0:1}),e.union("ScSpecUdtUnionCaseV0",{switchOn:e.lookup("ScSpecUdtUnionCaseV0Kind"),switchName:"kind",switches:[["scSpecUdtUnionCaseVoidV0","voidCase"],["scSpecUdtUnionCaseTupleV0","tupleCase"]],arms:{voidCase:e.lookup("ScSpecUdtUnionCaseVoidV0"),tupleCase:e.lookup("ScSpecUdtUnionCaseTupleV0")}}),e.struct("ScSpecUdtUnionV0",[["doc",e.string(n)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtUnionCaseV0"),50)]]),e.struct("ScSpecUdtEnumCaseV0",[["doc",e.string(n)],["name",e.string(60)],["value",e.lookup("Uint32")]]),e.struct("ScSpecUdtEnumV0",[["doc",e.string(n)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtEnumCaseV0"),50)]]),e.struct("ScSpecUdtErrorEnumCaseV0",[["doc",e.string(n)],["name",e.string(60)],["value",e.lookup("Uint32")]]),e.struct("ScSpecUdtErrorEnumV0",[["doc",e.string(n)],["lib",e.string(80)],["name",e.string(60)],["cases",e.varArray(e.lookup("ScSpecUdtErrorEnumCaseV0"),50)]]),e.struct("ScSpecFunctionInputV0",[["doc",e.string(n)],["name",e.string(30)],["type",e.lookup("ScSpecTypeDef")]]),e.struct("ScSpecFunctionV0",[["doc",e.string(n)],["name",e.lookup("ScSymbol")],["inputs",e.varArray(e.lookup("ScSpecFunctionInputV0"),10)],["outputs",e.varArray(e.lookup("ScSpecTypeDef"),1)]]),e.enum("ScSpecEntryKind",{scSpecEntryFunctionV0:0,scSpecEntryUdtStructV0:1,scSpecEntryUdtUnionV0:2,scSpecEntryUdtEnumV0:3,scSpecEntryUdtErrorEnumV0:4}),e.union("ScSpecEntry",{switchOn:e.lookup("ScSpecEntryKind"),switchName:"kind",switches:[["scSpecEntryFunctionV0","functionV0"],["scSpecEntryUdtStructV0","udtStructV0"],["scSpecEntryUdtUnionV0","udtUnionV0"],["scSpecEntryUdtEnumV0","udtEnumV0"],["scSpecEntryUdtErrorEnumV0","udtErrorEnumV0"]],arms:{functionV0:e.lookup("ScSpecFunctionV0"),udtStructV0:e.lookup("ScSpecUdtStructV0"),udtUnionV0:e.lookup("ScSpecUdtUnionV0"),udtEnumV0:e.lookup("ScSpecUdtEnumV0"),udtErrorEnumV0:e.lookup("ScSpecUdtErrorEnumV0")}}),e.struct("ConfigSettingContractExecutionLanesV0",[["ledgerMaxTxCount",e.lookup("Uint32")]]),e.struct("ConfigSettingContractComputeV0",[["ledgerMaxInstructions",e.lookup("Int64")],["txMaxInstructions",e.lookup("Int64")],["feeRatePerInstructionsIncrement",e.lookup("Int64")],["txMemoryLimit",e.lookup("Uint32")]]),e.struct("ConfigSettingContractLedgerCostV0",[["ledgerMaxReadLedgerEntries",e.lookup("Uint32")],["ledgerMaxReadBytes",e.lookup("Uint32")],["ledgerMaxWriteLedgerEntries",e.lookup("Uint32")],["ledgerMaxWriteBytes",e.lookup("Uint32")],["txMaxReadLedgerEntries",e.lookup("Uint32")],["txMaxReadBytes",e.lookup("Uint32")],["txMaxWriteLedgerEntries",e.lookup("Uint32")],["txMaxWriteBytes",e.lookup("Uint32")],["feeReadLedgerEntry",e.lookup("Int64")],["feeWriteLedgerEntry",e.lookup("Int64")],["feeRead1Kb",e.lookup("Int64")],["bucketListTargetSizeBytes",e.lookup("Int64")],["writeFee1KbBucketListLow",e.lookup("Int64")],["writeFee1KbBucketListHigh",e.lookup("Int64")],["bucketListWriteFeeGrowthFactor",e.lookup("Uint32")]]),e.struct("ConfigSettingContractHistoricalDataV0",[["feeHistorical1Kb",e.lookup("Int64")]]),e.struct("ConfigSettingContractEventsV0",[["txMaxContractEventsSizeBytes",e.lookup("Uint32")],["feeContractEvents1Kb",e.lookup("Int64")]]),e.struct("ConfigSettingContractBandwidthV0",[["ledgerMaxTxsSizeBytes",e.lookup("Uint32")],["txMaxSizeBytes",e.lookup("Uint32")],["feeTxSize1Kb",e.lookup("Int64")]]),e.enum("ContractCostType",{wasmInsnExec:0,memAlloc:1,memCpy:2,memCmp:3,dispatchHostFunction:4,visitObject:5,valSer:6,valDeser:7,computeSha256Hash:8,computeEd25519PubKey:9,verifyEd25519Sig:10,vmInstantiation:11,vmCachedInstantiation:12,invokeVmFunction:13,computeKeccak256Hash:14,decodeEcdsaCurve256Sig:15,recoverEcdsaSecp256k1Key:16,int256AddSub:17,int256Mul:18,int256Div:19,int256Pow:20,int256Shift:21,chaCha20DrawBytes:22,parseWasmInstructions:23,parseWasmFunctions:24,parseWasmGlobals:25,parseWasmTableEntries:26,parseWasmTypes:27,parseWasmDataSegments:28,parseWasmElemSegments:29,parseWasmImports:30,parseWasmExports:31,parseWasmDataSegmentBytes:32,instantiateWasmInstructions:33,instantiateWasmFunctions:34,instantiateWasmGlobals:35,instantiateWasmTableEntries:36,instantiateWasmTypes:37,instantiateWasmDataSegments:38,instantiateWasmElemSegments:39,instantiateWasmImports:40,instantiateWasmExports:41,instantiateWasmDataSegmentBytes:42,sec1DecodePointUncompressed:43,verifyEcdsaSecp256r1Sig:44}),e.struct("ContractCostParamEntry",[["ext",e.lookup("ExtensionPoint")],["constTerm",e.lookup("Int64")],["linearTerm",e.lookup("Int64")]]),e.struct("StateArchivalSettings",[["maxEntryTtl",e.lookup("Uint32")],["minTemporaryTtl",e.lookup("Uint32")],["minPersistentTtl",e.lookup("Uint32")],["persistentRentRateDenominator",e.lookup("Int64")],["tempRentRateDenominator",e.lookup("Int64")],["maxEntriesToArchive",e.lookup("Uint32")],["bucketListSizeWindowSampleSize",e.lookup("Uint32")],["bucketListWindowSamplePeriod",e.lookup("Uint32")],["evictionScanSize",e.lookup("Uint32")],["startingEvictionScanLevel",e.lookup("Uint32")]]),e.struct("EvictionIterator",[["bucketListLevel",e.lookup("Uint32")],["isCurrBucket",e.bool()],["bucketFileOffset",e.lookup("Uint64")]]),e.const("CONTRACT_COST_COUNT_LIMIT",1024),e.typedef("ContractCostParams",e.varArray(e.lookup("ContractCostParamEntry"),e.lookup("CONTRACT_COST_COUNT_LIMIT"))),e.enum("ConfigSettingId",{configSettingContractMaxSizeBytes:0,configSettingContractComputeV0:1,configSettingContractLedgerCostV0:2,configSettingContractHistoricalDataV0:3,configSettingContractEventsV0:4,configSettingContractBandwidthV0:5,configSettingContractCostParamsCpuInstructions:6,configSettingContractCostParamsMemoryBytes:7,configSettingContractDataKeySizeBytes:8,configSettingContractDataEntrySizeBytes:9,configSettingStateArchival:10,configSettingContractExecutionLanes:11,configSettingBucketlistSizeWindow:12,configSettingEvictionIterator:13}),e.union("ConfigSettingEntry",{switchOn:e.lookup("ConfigSettingId"),switchName:"configSettingId",switches:[["configSettingContractMaxSizeBytes","contractMaxSizeBytes"],["configSettingContractComputeV0","contractCompute"],["configSettingContractLedgerCostV0","contractLedgerCost"],["configSettingContractHistoricalDataV0","contractHistoricalData"],["configSettingContractEventsV0","contractEvents"],["configSettingContractBandwidthV0","contractBandwidth"],["configSettingContractCostParamsCpuInstructions","contractCostParamsCpuInsns"],["configSettingContractCostParamsMemoryBytes","contractCostParamsMemBytes"],["configSettingContractDataKeySizeBytes","contractDataKeySizeBytes"],["configSettingContractDataEntrySizeBytes","contractDataEntrySizeBytes"],["configSettingStateArchival","stateArchivalSettings"],["configSettingContractExecutionLanes","contractExecutionLanes"],["configSettingBucketlistSizeWindow","bucketListSizeWindow"],["configSettingEvictionIterator","evictionIterator"]],arms:{contractMaxSizeBytes:e.lookup("Uint32"),contractCompute:e.lookup("ConfigSettingContractComputeV0"),contractLedgerCost:e.lookup("ConfigSettingContractLedgerCostV0"),contractHistoricalData:e.lookup("ConfigSettingContractHistoricalDataV0"),contractEvents:e.lookup("ConfigSettingContractEventsV0"),contractBandwidth:e.lookup("ConfigSettingContractBandwidthV0"),contractCostParamsCpuInsns:e.lookup("ContractCostParams"),contractCostParamsMemBytes:e.lookup("ContractCostParams"),contractDataKeySizeBytes:e.lookup("Uint32"),contractDataEntrySizeBytes:e.lookup("Uint32"),stateArchivalSettings:e.lookup("StateArchivalSettings"),contractExecutionLanes:e.lookup("ConfigSettingContractExecutionLanesV0"),bucketListSizeWindow:e.varArray(e.lookup("Uint64"),2147483647),evictionIterator:e.lookup("EvictionIterator")}})}),I6=du.default=kb});var Rr=Jt(yu=>{"use strict";Object.defineProperty(yu,"__esModule",{value:!0});yu.default=void 0;var Ob=Pb(gd());function Pb(e){return e&&e.__esModule?e:{default:e}}var B6=yu.default=Ob.default});var bd=Jt(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.default=void 0;var vd=$n(),xb={XdrWriter:vd.XdrWriter,XdrReader:vd.XdrReader},L6=mu.default=xb});var Ci=Jt((U6,Nl)=>{typeof Object.create=="function"?Nl.exports=function(t,n){n&&(t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Nl.exports=function(t,n){if(n){t.super_=n;var o=function(){};o.prototype=n.prototype,t.prototype=new o,t.prototype.constructor=t}}});var ci=Jt((Ul,Sd)=>{var gu=ts(),Uo=gu.Buffer;function wd(e,t){for(var n in e)t[n]=e[n]}Uo.from&&Uo.alloc&&Uo.allocUnsafe&&Uo.allocUnsafeSlow?Sd.exports=gu:(wd(gu,Ul),Ul.Buffer=Bi);function Bi(e,t,n){return Uo(e,t,n)}Bi.prototype=Object.create(Uo.prototype);wd(Uo,Bi);Bi.from=function(e,t,n){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Uo(e,t,n)};Bi.alloc=function(e,t,n){if(typeof e!="number")throw new TypeError("Argument must be a number");var o=Uo(e);return t!==void 0?typeof n=="string"?o.fill(t,n):o.fill(t):o.fill(0),o};Bi.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Uo(e)};Bi.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return gu.SlowBuffer(e)}});var ji=Jt((M6,_d)=>{var Ad=ci().Buffer;function vu(e,t){this._block=Ad.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}vu.prototype.update=function(e,t){typeof e=="string"&&(t=t||"utf8",e=Ad.from(e,t));for(var n=this._block,o=this._blockSize,a=e.length,i=this._len,s=0;s<a;){for(var f=i%o,u=Math.min(a-s,o-f),r=0;r<u;r++)n[f+r]=e[s+r];i+=u,s+=u,i%o===0&&this._update(n)}return this._len+=a,this};vu.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=this._len*8;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var o=(n&4294967295)>>>0,a=(n-o)/4294967296;this._block.writeUInt32BE(a,this._blockSize-8),this._block.writeUInt32BE(o,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i};vu.prototype._update=function(){throw new Error("_update must be implemented by subclass")};_d.exports=vu});var kd=Jt((F6,Td)=>{var Rb=Ci(),Ed=ji(),Ib=ci().Buffer,Cb=[1518500249,1859775393,-1894007588,-899497514],Bb=new Array(80);function ns(){this.init(),this._w=Bb,Ed.call(this,64,56)}Rb(ns,Ed);ns.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function jb(e){return e<<5|e>>>27}function Lb(e){return e<<30|e>>>2}function Nb(e,t,n,o){return e===0?t&n|~t&o:e===2?t&n|t&o|n&o:t^n^o}ns.prototype._update=function(e){for(var t=this._w,n=this._a|0,o=this._b|0,a=this._c|0,i=this._d|0,s=this._e|0,f=0;f<16;++f)t[f]=e.readInt32BE(f*4);for(;f<80;++f)t[f]=t[f-3]^t[f-8]^t[f-14]^t[f-16];for(var u=0;u<80;++u){var r=~~(u/20),_=jb(n)+Nb(r,o,a,i)+s+t[u]+Cb[r]|0;s=i,i=a,a=Lb(o),o=n,n=_}this._a=n+this._a|0,this._b=o+this._b|0,this._c=a+this._c|0,this._d=i+this._d|0,this._e=s+this._e|0};ns.prototype._hash=function(){var e=Ib.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};Td.exports=ns});var xd=Jt((D6,Pd)=>{var Ub=Ci(),Od=ji(),Mb=ci().Buffer,Fb=[1518500249,1859775393,-1894007588,-899497514],Db=new Array(80);function os(){this.init(),this._w=Db,Od.call(this,64,56)}Ub(os,Od);os.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function qb(e){return e<<1|e>>>31}function Vb(e){return e<<5|e>>>27}function Kb(e){return e<<30|e>>>2}function Hb(e,t,n,o){return e===0?t&n|~t&o:e===2?t&n|t&o|n&o:t^n^o}os.prototype._update=function(e){for(var t=this._w,n=this._a|0,o=this._b|0,a=this._c|0,i=this._d|0,s=this._e|0,f=0;f<16;++f)t[f]=e.readInt32BE(f*4);for(;f<80;++f)t[f]=qb(t[f-3]^t[f-8]^t[f-14]^t[f-16]);for(var u=0;u<80;++u){var r=~~(u/20),_=Vb(n)+Hb(r,o,a,i)+s+t[u]+Fb[r]|0;s=i,i=a,a=Kb(o),o=n,n=_}this._a=n+this._a|0,this._b=o+this._b|0,this._c=a+this._c|0,this._d=i+this._d|0,this._e=s+this._e|0};os.prototype._hash=function(){var e=Mb.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e};Pd.exports=os});var Ml=Jt((q6,Id)=>{var zb=Ci(),Rd=ji(),Xb=ci().Buffer,Gb=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Wb=new Array(64);function is(){this.init(),this._w=Wb,Rd.call(this,64,56)}zb(is,Rd);is.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function $b(e,t,n){return n^e&(t^n)}function Qb(e,t,n){return e&t|n&(e|t)}function Yb(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function Jb(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function Zb(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function ew(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}is.prototype._update=function(e){for(var t=this._w,n=this._a|0,o=this._b|0,a=this._c|0,i=this._d|0,s=this._e|0,f=this._f|0,u=this._g|0,r=this._h|0,_=0;_<16;++_)t[_]=e.readInt32BE(_*4);for(;_<64;++_)t[_]=ew(t[_-2])+t[_-7]+Zb(t[_-15])+t[_-16]|0;for(var d=0;d<64;++d){var b=r+Jb(s)+$b(s,f,u)+Gb[d]+t[d]|0,T=Yb(n)+Qb(n,o,a)|0;r=u,u=f,f=s,s=i+b|0,i=a,a=o,o=n,n=b+T|0}this._a=n+this._a|0,this._b=o+this._b|0,this._c=a+this._c|0,this._d=i+this._d|0,this._e=s+this._e|0,this._f=f+this._f|0,this._g=u+this._g|0,this._h=r+this._h|0};is.prototype._hash=function(){var e=Xb.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};Id.exports=is});var Bd=Jt((V6,Cd)=>{var tw=Ci(),rw=Ml(),nw=ji(),ow=ci().Buffer,iw=new Array(64);function bu(){this.init(),this._w=iw,nw.call(this,64,56)}tw(bu,rw);bu.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this};bu.prototype._hash=function(){var e=ow.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};Cd.exports=bu});var Fl=Jt((K6,Dd)=>{var aw=Ci(),Fd=ji(),sw=ci().Buffer,jd=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],uw=new Array(160);function as(){this.init(),this._w=uw,Fd.call(this,128,112)}aw(as,Fd);as.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function Ld(e,t,n){return n^e&(t^n)}function Nd(e,t,n){return e&t|n&(e|t)}function Ud(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function Md(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function cw(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function lw(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function fw(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function pw(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function Mn(e,t){return e>>>0<t>>>0?1:0}as.prototype._update=function(e){for(var t=this._w,n=this._ah|0,o=this._bh|0,a=this._ch|0,i=this._dh|0,s=this._eh|0,f=this._fh|0,u=this._gh|0,r=this._hh|0,_=this._al|0,d=this._bl|0,b=this._cl|0,T=this._dl|0,w=this._el|0,g=this._fl|0,p=this._gl|0,A=this._hl|0,L=0;L<32;L+=2)t[L]=e.readInt32BE(L*4),t[L+1]=e.readInt32BE(L*4+4);for(;L<160;L+=2){var E=t[L-30],N=t[L-15*2+1],F=cw(E,N),R=lw(N,E);E=t[L-2*2],N=t[L-2*2+1];var j=fw(E,N),V=pw(N,E),Y=t[L-7*2],me=t[L-7*2+1],le=t[L-16*2],C=t[L-16*2+1],q=R+me|0,X=F+Y+Mn(q,R)|0;q=q+V|0,X=X+j+Mn(q,V)|0,q=q+C|0,X=X+le+Mn(q,C)|0,t[L]=X,t[L+1]=q}for(var ae=0;ae<160;ae+=2){X=t[ae],q=t[ae+1];var I=Nd(n,o,a),S=Nd(_,d,b),m=Ud(n,_),P=Ud(_,n),l=Md(s,w),x=Md(w,s),W=jd[ae],K=jd[ae+1],re=Ld(s,f,u),oe=Ld(w,g,p),Ee=A+x|0,Fe=r+l+Mn(Ee,A)|0;Ee=Ee+oe|0,Fe=Fe+re+Mn(Ee,oe)|0,Ee=Ee+K|0,Fe=Fe+W+Mn(Ee,K)|0,Ee=Ee+q|0,Fe=Fe+X+Mn(Ee,q)|0;var Oe=P+S|0,$=m+I+Mn(Oe,P)|0;r=u,A=p,u=f,p=g,f=s,g=w,w=T+Ee|0,s=i+Fe+Mn(w,T)|0,i=a,T=b,a=o,b=d,o=n,d=_,_=Ee+Oe|0,n=Fe+$+Mn(_,Ee)|0}this._al=this._al+_|0,this._bl=this._bl+d|0,this._cl=this._cl+b|0,this._dl=this._dl+T|0,this._el=this._el+w|0,this._fl=this._fl+g|0,this._gl=this._gl+p|0,this._hl=this._hl+A|0,this._ah=this._ah+n+Mn(this._al,_)|0,this._bh=this._bh+o+Mn(this._bl,d)|0,this._ch=this._ch+a+Mn(this._cl,b)|0,this._dh=this._dh+i+Mn(this._dl,T)|0,this._eh=this._eh+s+Mn(this._el,w)|0,this._fh=this._fh+f+Mn(this._fl,g)|0,this._gh=this._gh+u+Mn(this._gl,p)|0,this._hh=this._hh+r+Mn(this._hl,A)|0};as.prototype._hash=function(){var e=sw.allocUnsafe(64);function t(n,o,a){e.writeInt32BE(n,a),e.writeInt32BE(o,a+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};Dd.exports=as});var Vd=Jt((H6,qd)=>{var hw=Ci(),dw=Fl(),yw=ji(),mw=ci().Buffer,gw=new Array(160);function wu(){this.init(),this._w=gw,yw.call(this,128,112)}hw(wu,dw);wu.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this};wu.prototype._hash=function(){var e=mw.allocUnsafe(48);function t(n,o,a){e.writeInt32BE(n,a),e.writeInt32BE(o,a+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};qd.exports=wu});var Hd=Jt((Go,Kd)=>{var Go=Kd.exports=function(t){t=t.toLowerCase();var n=Go[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n};Go.sha=kd();Go.sha1=xd();Go.sha224=Bd();Go.sha256=Ml();Go.sha384=Vd();Go.sha512=Fl()});var Wo=Jt(Dl=>{"use strict";Object.defineProperty(Dl,"__esModule",{value:!0});Dl.hash=bw;var vw=Hd();function bw(e){var t=new vw.sha256;return t.update(e,"utf8"),t.digest()}});var zd=Jt(()=>{});var Xd=Jt(()=>{});var ql=Jt((Q6,Su)=>{(function(e){"use strict";var t=function(Q){var ce,be=new Float64Array(16);if(Q)for(ce=0;ce<Q.length;ce++)be[ce]=Q[ce];return be},n=function(){throw new Error("no PRNG")},o=new Uint8Array(16),a=new Uint8Array(32);a[0]=9;var i=t(),s=t([1]),f=t([56129,1]),u=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),r=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),_=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),d=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),b=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function T(Q,ce,be,D){Q[ce]=be>>24&255,Q[ce+1]=be>>16&255,Q[ce+2]=be>>8&255,Q[ce+3]=be&255,Q[ce+4]=D>>24&255,Q[ce+5]=D>>16&255,Q[ce+6]=D>>8&255,Q[ce+7]=D&255}function w(Q,ce,be,D,xe){var ot,at=0;for(ot=0;ot<xe;ot++)at|=Q[ce+ot]^be[D+ot];return(1&at-1>>>8)-1}function g(Q,ce,be,D){return w(Q,ce,be,D,16)}function p(Q,ce,be,D){return w(Q,ce,be,D,32)}function A(Q,ce,be,D){for(var xe=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ot=be[0]&255|(be[1]&255)<<8|(be[2]&255)<<16|(be[3]&255)<<24,at=be[4]&255|(be[5]&255)<<8|(be[6]&255)<<16|(be[7]&255)<<24,yt=be[8]&255|(be[9]&255)<<8|(be[10]&255)<<16|(be[11]&255)<<24,Tt=be[12]&255|(be[13]&255)<<8|(be[14]&255)<<16|(be[15]&255)<<24,Kt=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Et=ce[0]&255|(ce[1]&255)<<8|(ce[2]&255)<<16|(ce[3]&255)<<24,Rt=ce[4]&255|(ce[5]&255)<<8|(ce[6]&255)<<16|(ce[7]&255)<<24,St=ce[8]&255|(ce[9]&255)<<8|(ce[10]&255)<<16|(ce[11]&255)<<24,Ht=ce[12]&255|(ce[13]&255)<<8|(ce[14]&255)<<16|(ce[15]&255)<<24,Lt=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,qt=be[16]&255|(be[17]&255)<<8|(be[18]&255)<<16|(be[19]&255)<<24,It=be[20]&255|(be[21]&255)<<8|(be[22]&255)<<16|(be[23]&255)<<24,rr=be[24]&255|(be[25]&255)<<8|(be[26]&255)<<16|(be[27]&255)<<24,ye=be[28]&255|(be[29]&255)<<8|(be[30]&255)<<16|(be[31]&255)<<24,Me=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,H=xe,G=ot,ne=at,se=yt,he=Tt,Le=Kt,Ie=Et,Te=Rt,Ce=St,Ge=Ht,Je=Lt,ft=qt,gt=It,Nt=rr,Vt=ye,Gt=Me,Ye,ir=0;ir<20;ir+=2)Ye=H+gt|0,he^=Ye<<7|Ye>>>25,Ye=he+H|0,Ce^=Ye<<9|Ye>>>23,Ye=Ce+he|0,gt^=Ye<<13|Ye>>>19,Ye=gt+Ce|0,H^=Ye<<18|Ye>>>14,Ye=Le+G|0,Ge^=Ye<<7|Ye>>>25,Ye=Ge+Le|0,Nt^=Ye<<9|Ye>>>23,Ye=Nt+Ge|0,G^=Ye<<13|Ye>>>19,Ye=G+Nt|0,Le^=Ye<<18|Ye>>>14,Ye=Je+Ie|0,Vt^=Ye<<7|Ye>>>25,Ye=Vt+Je|0,ne^=Ye<<9|Ye>>>23,Ye=ne+Vt|0,Ie^=Ye<<13|Ye>>>19,Ye=Ie+ne|0,Je^=Ye<<18|Ye>>>14,Ye=Gt+ft|0,se^=Ye<<7|Ye>>>25,Ye=se+Gt|0,Te^=Ye<<9|Ye>>>23,Ye=Te+se|0,ft^=Ye<<13|Ye>>>19,Ye=ft+Te|0,Gt^=Ye<<18|Ye>>>14,Ye=H+se|0,G^=Ye<<7|Ye>>>25,Ye=G+H|0,ne^=Ye<<9|Ye>>>23,Ye=ne+G|0,se^=Ye<<13|Ye>>>19,Ye=se+ne|0,H^=Ye<<18|Ye>>>14,Ye=Le+he|0,Ie^=Ye<<7|Ye>>>25,Ye=Ie+Le|0,Te^=Ye<<9|Ye>>>23,Ye=Te+Ie|0,he^=Ye<<13|Ye>>>19,Ye=he+Te|0,Le^=Ye<<18|Ye>>>14,Ye=Je+Ge|0,ft^=Ye<<7|Ye>>>25,Ye=ft+Je|0,Ce^=Ye<<9|Ye>>>23,Ye=Ce+ft|0,Ge^=Ye<<13|Ye>>>19,Ye=Ge+Ce|0,Je^=Ye<<18|Ye>>>14,Ye=Gt+Vt|0,gt^=Ye<<7|Ye>>>25,Ye=gt+Gt|0,Nt^=Ye<<9|Ye>>>23,Ye=Nt+gt|0,Vt^=Ye<<13|Ye>>>19,Ye=Vt+Nt|0,Gt^=Ye<<18|Ye>>>14;H=H+xe|0,G=G+ot|0,ne=ne+at|0,se=se+yt|0,he=he+Tt|0,Le=Le+Kt|0,Ie=Ie+Et|0,Te=Te+Rt|0,Ce=Ce+St|0,Ge=Ge+Ht|0,Je=Je+Lt|0,ft=ft+qt|0,gt=gt+It|0,Nt=Nt+rr|0,Vt=Vt+ye|0,Gt=Gt+Me|0,Q[0]=H>>>0&255,Q[1]=H>>>8&255,Q[2]=H>>>16&255,Q[3]=H>>>24&255,Q[4]=G>>>0&255,Q[5]=G>>>8&255,Q[6]=G>>>16&255,Q[7]=G>>>24&255,Q[8]=ne>>>0&255,Q[9]=ne>>>8&255,Q[10]=ne>>>16&255,Q[11]=ne>>>24&255,Q[12]=se>>>0&255,Q[13]=se>>>8&255,Q[14]=se>>>16&255,Q[15]=se>>>24&255,Q[16]=he>>>0&255,Q[17]=he>>>8&255,Q[18]=he>>>16&255,Q[19]=he>>>24&255,Q[20]=Le>>>0&255,Q[21]=Le>>>8&255,Q[22]=Le>>>16&255,Q[23]=Le>>>24&255,Q[24]=Ie>>>0&255,Q[25]=Ie>>>8&255,Q[26]=Ie>>>16&255,Q[27]=Ie>>>24&255,Q[28]=Te>>>0&255,Q[29]=Te>>>8&255,Q[30]=Te>>>16&255,Q[31]=Te>>>24&255,Q[32]=Ce>>>0&255,Q[33]=Ce>>>8&255,Q[34]=Ce>>>16&255,Q[35]=Ce>>>24&255,Q[36]=Ge>>>0&255,Q[37]=Ge>>>8&255,Q[38]=Ge>>>16&255,Q[39]=Ge>>>24&255,Q[40]=Je>>>0&255,Q[41]=Je>>>8&255,Q[42]=Je>>>16&255,Q[43]=Je>>>24&255,Q[44]=ft>>>0&255,Q[45]=ft>>>8&255,Q[46]=ft>>>16&255,Q[47]=ft>>>24&255,Q[48]=gt>>>0&255,Q[49]=gt>>>8&255,Q[50]=gt>>>16&255,Q[51]=gt>>>24&255,Q[52]=Nt>>>0&255,Q[53]=Nt>>>8&255,Q[54]=Nt>>>16&255,Q[55]=Nt>>>24&255,Q[56]=Vt>>>0&255,Q[57]=Vt>>>8&255,Q[58]=Vt>>>16&255,Q[59]=Vt>>>24&255,Q[60]=Gt>>>0&255,Q[61]=Gt>>>8&255,Q[62]=Gt>>>16&255,Q[63]=Gt>>>24&255}function L(Q,ce,be,D){for(var xe=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ot=be[0]&255|(be[1]&255)<<8|(be[2]&255)<<16|(be[3]&255)<<24,at=be[4]&255|(be[5]&255)<<8|(be[6]&255)<<16|(be[7]&255)<<24,yt=be[8]&255|(be[9]&255)<<8|(be[10]&255)<<16|(be[11]&255)<<24,Tt=be[12]&255|(be[13]&255)<<8|(be[14]&255)<<16|(be[15]&255)<<24,Kt=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Et=ce[0]&255|(ce[1]&255)<<8|(ce[2]&255)<<16|(ce[3]&255)<<24,Rt=ce[4]&255|(ce[5]&255)<<8|(ce[6]&255)<<16|(ce[7]&255)<<24,St=ce[8]&255|(ce[9]&255)<<8|(ce[10]&255)<<16|(ce[11]&255)<<24,Ht=ce[12]&255|(ce[13]&255)<<8|(ce[14]&255)<<16|(ce[15]&255)<<24,Lt=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,qt=be[16]&255|(be[17]&255)<<8|(be[18]&255)<<16|(be[19]&255)<<24,It=be[20]&255|(be[21]&255)<<8|(be[22]&255)<<16|(be[23]&255)<<24,rr=be[24]&255|(be[25]&255)<<8|(be[26]&255)<<16|(be[27]&255)<<24,ye=be[28]&255|(be[29]&255)<<8|(be[30]&255)<<16|(be[31]&255)<<24,Me=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,H=xe,G=ot,ne=at,se=yt,he=Tt,Le=Kt,Ie=Et,Te=Rt,Ce=St,Ge=Ht,Je=Lt,ft=qt,gt=It,Nt=rr,Vt=ye,Gt=Me,Ye,ir=0;ir<20;ir+=2)Ye=H+gt|0,he^=Ye<<7|Ye>>>25,Ye=he+H|0,Ce^=Ye<<9|Ye>>>23,Ye=Ce+he|0,gt^=Ye<<13|Ye>>>19,Ye=gt+Ce|0,H^=Ye<<18|Ye>>>14,Ye=Le+G|0,Ge^=Ye<<7|Ye>>>25,Ye=Ge+Le|0,Nt^=Ye<<9|Ye>>>23,Ye=Nt+Ge|0,G^=Ye<<13|Ye>>>19,Ye=G+Nt|0,Le^=Ye<<18|Ye>>>14,Ye=Je+Ie|0,Vt^=Ye<<7|Ye>>>25,Ye=Vt+Je|0,ne^=Ye<<9|Ye>>>23,Ye=ne+Vt|0,Ie^=Ye<<13|Ye>>>19,Ye=Ie+ne|0,Je^=Ye<<18|Ye>>>14,Ye=Gt+ft|0,se^=Ye<<7|Ye>>>25,Ye=se+Gt|0,Te^=Ye<<9|Ye>>>23,Ye=Te+se|0,ft^=Ye<<13|Ye>>>19,Ye=ft+Te|0,Gt^=Ye<<18|Ye>>>14,Ye=H+se|0,G^=Ye<<7|Ye>>>25,Ye=G+H|0,ne^=Ye<<9|Ye>>>23,Ye=ne+G|0,se^=Ye<<13|Ye>>>19,Ye=se+ne|0,H^=Ye<<18|Ye>>>14,Ye=Le+he|0,Ie^=Ye<<7|Ye>>>25,Ye=Ie+Le|0,Te^=Ye<<9|Ye>>>23,Ye=Te+Ie|0,he^=Ye<<13|Ye>>>19,Ye=he+Te|0,Le^=Ye<<18|Ye>>>14,Ye=Je+Ge|0,ft^=Ye<<7|Ye>>>25,Ye=ft+Je|0,Ce^=Ye<<9|Ye>>>23,Ye=Ce+ft|0,Ge^=Ye<<13|Ye>>>19,Ye=Ge+Ce|0,Je^=Ye<<18|Ye>>>14,Ye=Gt+Vt|0,gt^=Ye<<7|Ye>>>25,Ye=gt+Gt|0,Nt^=Ye<<9|Ye>>>23,Ye=Nt+gt|0,Vt^=Ye<<13|Ye>>>19,Ye=Vt+Nt|0,Gt^=Ye<<18|Ye>>>14;Q[0]=H>>>0&255,Q[1]=H>>>8&255,Q[2]=H>>>16&255,Q[3]=H>>>24&255,Q[4]=Le>>>0&255,Q[5]=Le>>>8&255,Q[6]=Le>>>16&255,Q[7]=Le>>>24&255,Q[8]=Je>>>0&255,Q[9]=Je>>>8&255,Q[10]=Je>>>16&255,Q[11]=Je>>>24&255,Q[12]=Gt>>>0&255,Q[13]=Gt>>>8&255,Q[14]=Gt>>>16&255,Q[15]=Gt>>>24&255,Q[16]=Ie>>>0&255,Q[17]=Ie>>>8&255,Q[18]=Ie>>>16&255,Q[19]=Ie>>>24&255,Q[20]=Te>>>0&255,Q[21]=Te>>>8&255,Q[22]=Te>>>16&255,Q[23]=Te>>>24&255,Q[24]=Ce>>>0&255,Q[25]=Ce>>>8&255,Q[26]=Ce>>>16&255,Q[27]=Ce>>>24&255,Q[28]=Ge>>>0&255,Q[29]=Ge>>>8&255,Q[30]=Ge>>>16&255,Q[31]=Ge>>>24&255}function E(Q,ce,be,D){A(Q,ce,be,D)}function N(Q,ce,be,D){L(Q,ce,be,D)}var F=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function R(Q,ce,be,D,xe,ot,at){var yt=new Uint8Array(16),Tt=new Uint8Array(64),Kt,Et;for(Et=0;Et<16;Et++)yt[Et]=0;for(Et=0;Et<8;Et++)yt[Et]=ot[Et];for(;xe>=64;){for(E(Tt,yt,at,F),Et=0;Et<64;Et++)Q[ce+Et]=be[D+Et]^Tt[Et];for(Kt=1,Et=8;Et<16;Et++)Kt=Kt+(yt[Et]&255)|0,yt[Et]=Kt&255,Kt>>>=8;xe-=64,ce+=64,D+=64}if(xe>0)for(E(Tt,yt,at,F),Et=0;Et<xe;Et++)Q[ce+Et]=be[D+Et]^Tt[Et];return 0}function j(Q,ce,be,D,xe){var ot=new Uint8Array(16),at=new Uint8Array(64),yt,Tt;for(Tt=0;Tt<16;Tt++)ot[Tt]=0;for(Tt=0;Tt<8;Tt++)ot[Tt]=D[Tt];for(;be>=64;){for(E(at,ot,xe,F),Tt=0;Tt<64;Tt++)Q[ce+Tt]=at[Tt];for(yt=1,Tt=8;Tt<16;Tt++)yt=yt+(ot[Tt]&255)|0,ot[Tt]=yt&255,yt>>>=8;be-=64,ce+=64}if(be>0)for(E(at,ot,xe,F),Tt=0;Tt<be;Tt++)Q[ce+Tt]=at[Tt];return 0}function V(Q,ce,be,D,xe){var ot=new Uint8Array(32);N(ot,D,xe,F);for(var at=new Uint8Array(8),yt=0;yt<8;yt++)at[yt]=D[yt+16];return j(Q,ce,be,at,ot)}function Y(Q,ce,be,D,xe,ot,at){var yt=new Uint8Array(32);N(yt,ot,at,F);for(var Tt=new Uint8Array(8),Kt=0;Kt<8;Kt++)Tt[Kt]=ot[Kt+16];return R(Q,ce,be,D,xe,Tt,yt)}var me=function(Q){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var ce,be,D,xe,ot,at,yt,Tt;ce=Q[0]&255|(Q[1]&255)<<8,this.r[0]=ce&8191,be=Q[2]&255|(Q[3]&255)<<8,this.r[1]=(ce>>>13|be<<3)&8191,D=Q[4]&255|(Q[5]&255)<<8,this.r[2]=(be>>>10|D<<6)&7939,xe=Q[6]&255|(Q[7]&255)<<8,this.r[3]=(D>>>7|xe<<9)&8191,ot=Q[8]&255|(Q[9]&255)<<8,this.r[4]=(xe>>>4|ot<<12)&255,this.r[5]=ot>>>1&8190,at=Q[10]&255|(Q[11]&255)<<8,this.r[6]=(ot>>>14|at<<2)&8191,yt=Q[12]&255|(Q[13]&255)<<8,this.r[7]=(at>>>11|yt<<5)&8065,Tt=Q[14]&255|(Q[15]&255)<<8,this.r[8]=(yt>>>8|Tt<<8)&8191,this.r[9]=Tt>>>5&127,this.pad[0]=Q[16]&255|(Q[17]&255)<<8,this.pad[1]=Q[18]&255|(Q[19]&255)<<8,this.pad[2]=Q[20]&255|(Q[21]&255)<<8,this.pad[3]=Q[22]&255|(Q[23]&255)<<8,this.pad[4]=Q[24]&255|(Q[25]&255)<<8,this.pad[5]=Q[26]&255|(Q[27]&255)<<8,this.pad[6]=Q[28]&255|(Q[29]&255)<<8,this.pad[7]=Q[30]&255|(Q[31]&255)<<8};me.prototype.blocks=function(Q,ce,be){for(var D=this.fin?0:2048,xe,ot,at,yt,Tt,Kt,Et,Rt,St,Ht,Lt,qt,It,rr,ye,Me,H,G,ne,se=this.h[0],he=this.h[1],Le=this.h[2],Ie=this.h[3],Te=this.h[4],Ce=this.h[5],Ge=this.h[6],Je=this.h[7],ft=this.h[8],gt=this.h[9],Nt=this.r[0],Vt=this.r[1],Gt=this.r[2],Ye=this.r[3],ir=this.r[4],or=this.r[5],sr=this.r[6],pr=this.r[7],Er=this.r[8],hr=this.r[9];be>=16;)xe=Q[ce+0]&255|(Q[ce+1]&255)<<8,se+=xe&8191,ot=Q[ce+2]&255|(Q[ce+3]&255)<<8,he+=(xe>>>13|ot<<3)&8191,at=Q[ce+4]&255|(Q[ce+5]&255)<<8,Le+=(ot>>>10|at<<6)&8191,yt=Q[ce+6]&255|(Q[ce+7]&255)<<8,Ie+=(at>>>7|yt<<9)&8191,Tt=Q[ce+8]&255|(Q[ce+9]&255)<<8,Te+=(yt>>>4|Tt<<12)&8191,Ce+=Tt>>>1&8191,Kt=Q[ce+10]&255|(Q[ce+11]&255)<<8,Ge+=(Tt>>>14|Kt<<2)&8191,Et=Q[ce+12]&255|(Q[ce+13]&255)<<8,Je+=(Kt>>>11|Et<<5)&8191,Rt=Q[ce+14]&255|(Q[ce+15]&255)<<8,ft+=(Et>>>8|Rt<<8)&8191,gt+=Rt>>>5|D,St=0,Ht=St,Ht+=se*Nt,Ht+=he*(5*hr),Ht+=Le*(5*Er),Ht+=Ie*(5*pr),Ht+=Te*(5*sr),St=Ht>>>13,Ht&=8191,Ht+=Ce*(5*or),Ht+=Ge*(5*ir),Ht+=Je*(5*Ye),Ht+=ft*(5*Gt),Ht+=gt*(5*Vt),St+=Ht>>>13,Ht&=8191,Lt=St,Lt+=se*Vt,Lt+=he*Nt,Lt+=Le*(5*hr),Lt+=Ie*(5*Er),Lt+=Te*(5*pr),St=Lt>>>13,Lt&=8191,Lt+=Ce*(5*sr),Lt+=Ge*(5*or),Lt+=Je*(5*ir),Lt+=ft*(5*Ye),Lt+=gt*(5*Gt),St+=Lt>>>13,Lt&=8191,qt=St,qt+=se*Gt,qt+=he*Vt,qt+=Le*Nt,qt+=Ie*(5*hr),qt+=Te*(5*Er),St=qt>>>13,qt&=8191,qt+=Ce*(5*pr),qt+=Ge*(5*sr),qt+=Je*(5*or),qt+=ft*(5*ir),qt+=gt*(5*Ye),St+=qt>>>13,qt&=8191,It=St,It+=se*Ye,It+=he*Gt,It+=Le*Vt,It+=Ie*Nt,It+=Te*(5*hr),St=It>>>13,It&=8191,It+=Ce*(5*Er),It+=Ge*(5*pr),It+=Je*(5*sr),It+=ft*(5*or),It+=gt*(5*ir),St+=It>>>13,It&=8191,rr=St,rr+=se*ir,rr+=he*Ye,rr+=Le*Gt,rr+=Ie*Vt,rr+=Te*Nt,St=rr>>>13,rr&=8191,rr+=Ce*(5*hr),rr+=Ge*(5*Er),rr+=Je*(5*pr),rr+=ft*(5*sr),rr+=gt*(5*or),St+=rr>>>13,rr&=8191,ye=St,ye+=se*or,ye+=he*ir,ye+=Le*Ye,ye+=Ie*Gt,ye+=Te*Vt,St=ye>>>13,ye&=8191,ye+=Ce*Nt,ye+=Ge*(5*hr),ye+=Je*(5*Er),ye+=ft*(5*pr),ye+=gt*(5*sr),St+=ye>>>13,ye&=8191,Me=St,Me+=se*sr,Me+=he*or,Me+=Le*ir,Me+=Ie*Ye,Me+=Te*Gt,St=Me>>>13,Me&=8191,Me+=Ce*Vt,Me+=Ge*Nt,Me+=Je*(5*hr),Me+=ft*(5*Er),Me+=gt*(5*pr),St+=Me>>>13,Me&=8191,H=St,H+=se*pr,H+=he*sr,H+=Le*or,H+=Ie*ir,H+=Te*Ye,St=H>>>13,H&=8191,H+=Ce*Gt,H+=Ge*Vt,H+=Je*Nt,H+=ft*(5*hr),H+=gt*(5*Er),St+=H>>>13,H&=8191,G=St,G+=se*Er,G+=he*pr,G+=Le*sr,G+=Ie*or,G+=Te*ir,St=G>>>13,G&=8191,G+=Ce*Ye,G+=Ge*Gt,G+=Je*Vt,G+=ft*Nt,G+=gt*(5*hr),St+=G>>>13,G&=8191,ne=St,ne+=se*hr,ne+=he*Er,ne+=Le*pr,ne+=Ie*sr,ne+=Te*or,St=ne>>>13,ne&=8191,ne+=Ce*ir,ne+=Ge*Ye,ne+=Je*Gt,ne+=ft*Vt,ne+=gt*Nt,St+=ne>>>13,ne&=8191,St=(St<<2)+St|0,St=St+Ht|0,Ht=St&8191,St=St>>>13,Lt+=St,se=Ht,he=Lt,Le=qt,Ie=It,Te=rr,Ce=ye,Ge=Me,Je=H,ft=G,gt=ne,ce+=16,be-=16;this.h[0]=se,this.h[1]=he,this.h[2]=Le,this.h[3]=Ie,this.h[4]=Te,this.h[5]=Ce,this.h[6]=Ge,this.h[7]=Je,this.h[8]=ft,this.h[9]=gt},me.prototype.finish=function(Q,ce){var be=new Uint16Array(10),D,xe,ot,at;if(this.leftover){for(at=this.leftover,this.buffer[at++]=1;at<16;at++)this.buffer[at]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(D=this.h[1]>>>13,this.h[1]&=8191,at=2;at<10;at++)this.h[at]+=D,D=this.h[at]>>>13,this.h[at]&=8191;for(this.h[0]+=D*5,D=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=D,D=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=D,be[0]=this.h[0]+5,D=be[0]>>>13,be[0]&=8191,at=1;at<10;at++)be[at]=this.h[at]+D,D=be[at]>>>13,be[at]&=8191;for(be[9]-=8192,xe=(D^1)-1,at=0;at<10;at++)be[at]&=xe;for(xe=~xe,at=0;at<10;at++)this.h[at]=this.h[at]&xe|be[at];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,ot=this.h[0]+this.pad[0],this.h[0]=ot&65535,at=1;at<8;at++)ot=(this.h[at]+this.pad[at]|0)+(ot>>>16)|0,this.h[at]=ot&65535;Q[ce+0]=this.h[0]>>>0&255,Q[ce+1]=this.h[0]>>>8&255,Q[ce+2]=this.h[1]>>>0&255,Q[ce+3]=this.h[1]>>>8&255,Q[ce+4]=this.h[2]>>>0&255,Q[ce+5]=this.h[2]>>>8&255,Q[ce+6]=this.h[3]>>>0&255,Q[ce+7]=this.h[3]>>>8&255,Q[ce+8]=this.h[4]>>>0&255,Q[ce+9]=this.h[4]>>>8&255,Q[ce+10]=this.h[5]>>>0&255,Q[ce+11]=this.h[5]>>>8&255,Q[ce+12]=this.h[6]>>>0&255,Q[ce+13]=this.h[6]>>>8&255,Q[ce+14]=this.h[7]>>>0&255,Q[ce+15]=this.h[7]>>>8&255},me.prototype.update=function(Q,ce,be){var D,xe;if(this.leftover){for(xe=16-this.leftover,xe>be&&(xe=be),D=0;D<xe;D++)this.buffer[this.leftover+D]=Q[ce+D];if(be-=xe,ce+=xe,this.leftover+=xe,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(be>=16&&(xe=be-be%16,this.blocks(Q,ce,xe),ce+=xe,be-=xe),be){for(D=0;D<be;D++)this.buffer[this.leftover+D]=Q[ce+D];this.leftover+=be}};function le(Q,ce,be,D,xe,ot){var at=new me(ot);return at.update(be,D,xe),at.finish(Q,ce),0}function C(Q,ce,be,D,xe,ot){var at=new Uint8Array(16);return le(at,0,be,D,xe,ot),g(Q,ce,at,0)}function q(Q,ce,be,D,xe){var ot;if(be<32)return-1;for(Y(Q,0,ce,0,be,D,xe),le(Q,16,Q,32,be-32,Q),ot=0;ot<16;ot++)Q[ot]=0;return 0}function X(Q,ce,be,D,xe){var ot,at=new Uint8Array(32);if(be<32||(V(at,0,32,D,xe),C(ce,16,ce,32,be-32,at)!==0))return-1;for(Y(Q,0,ce,0,be,D,xe),ot=0;ot<32;ot++)Q[ot]=0;return 0}function ae(Q,ce){var be;for(be=0;be<16;be++)Q[be]=ce[be]|0}function I(Q){var ce,be,D=1;for(ce=0;ce<16;ce++)be=Q[ce]+D+65535,D=Math.floor(be/65536),Q[ce]=be-D*65536;Q[0]+=D-1+37*(D-1)}function S(Q,ce,be){for(var D,xe=~(be-1),ot=0;ot<16;ot++)D=xe&(Q[ot]^ce[ot]),Q[ot]^=D,ce[ot]^=D}function m(Q,ce){var be,D,xe,ot=t(),at=t();for(be=0;be<16;be++)at[be]=ce[be];for(I(at),I(at),I(at),D=0;D<2;D++){for(ot[0]=at[0]-65517,be=1;be<15;be++)ot[be]=at[be]-65535-(ot[be-1]>>16&1),ot[be-1]&=65535;ot[15]=at[15]-32767-(ot[14]>>16&1),xe=ot[15]>>16&1,ot[14]&=65535,S(at,ot,1-xe)}for(be=0;be<16;be++)Q[2*be]=at[be]&255,Q[2*be+1]=at[be]>>8}function P(Q,ce){var be=new Uint8Array(32),D=new Uint8Array(32);return m(be,Q),m(D,ce),p(be,0,D,0)}function l(Q){var ce=new Uint8Array(32);return m(ce,Q),ce[0]&1}function x(Q,ce){var be;for(be=0;be<16;be++)Q[be]=ce[2*be]+(ce[2*be+1]<<8);Q[15]&=32767}function W(Q,ce,be){for(var D=0;D<16;D++)Q[D]=ce[D]+be[D]}function K(Q,ce,be){for(var D=0;D<16;D++)Q[D]=ce[D]-be[D]}function re(Q,ce,be){var D,xe,ot=0,at=0,yt=0,Tt=0,Kt=0,Et=0,Rt=0,St=0,Ht=0,Lt=0,qt=0,It=0,rr=0,ye=0,Me=0,H=0,G=0,ne=0,se=0,he=0,Le=0,Ie=0,Te=0,Ce=0,Ge=0,Je=0,ft=0,gt=0,Nt=0,Vt=0,Gt=0,Ye=be[0],ir=be[1],or=be[2],sr=be[3],pr=be[4],Er=be[5],hr=be[6],br=be[7],ur=be[8],ee=be[9],er=be[10],wr=be[11],Pr=be[12],jr=be[13],Lr=be[14],Mt=be[15];D=ce[0],ot+=D*Ye,at+=D*ir,yt+=D*or,Tt+=D*sr,Kt+=D*pr,Et+=D*Er,Rt+=D*hr,St+=D*br,Ht+=D*ur,Lt+=D*ee,qt+=D*er,It+=D*wr,rr+=D*Pr,ye+=D*jr,Me+=D*Lr,H+=D*Mt,D=ce[1],at+=D*Ye,yt+=D*ir,Tt+=D*or,Kt+=D*sr,Et+=D*pr,Rt+=D*Er,St+=D*hr,Ht+=D*br,Lt+=D*ur,qt+=D*ee,It+=D*er,rr+=D*wr,ye+=D*Pr,Me+=D*jr,H+=D*Lr,G+=D*Mt,D=ce[2],yt+=D*Ye,Tt+=D*ir,Kt+=D*or,Et+=D*sr,Rt+=D*pr,St+=D*Er,Ht+=D*hr,Lt+=D*br,qt+=D*ur,It+=D*ee,rr+=D*er,ye+=D*wr,Me+=D*Pr,H+=D*jr,G+=D*Lr,ne+=D*Mt,D=ce[3],Tt+=D*Ye,Kt+=D*ir,Et+=D*or,Rt+=D*sr,St+=D*pr,Ht+=D*Er,Lt+=D*hr,qt+=D*br,It+=D*ur,rr+=D*ee,ye+=D*er,Me+=D*wr,H+=D*Pr,G+=D*jr,ne+=D*Lr,se+=D*Mt,D=ce[4],Kt+=D*Ye,Et+=D*ir,Rt+=D*or,St+=D*sr,Ht+=D*pr,Lt+=D*Er,qt+=D*hr,It+=D*br,rr+=D*ur,ye+=D*ee,Me+=D*er,H+=D*wr,G+=D*Pr,ne+=D*jr,se+=D*Lr,he+=D*Mt,D=ce[5],Et+=D*Ye,Rt+=D*ir,St+=D*or,Ht+=D*sr,Lt+=D*pr,qt+=D*Er,It+=D*hr,rr+=D*br,ye+=D*ur,Me+=D*ee,H+=D*er,G+=D*wr,ne+=D*Pr,se+=D*jr,he+=D*Lr,Le+=D*Mt,D=ce[6],Rt+=D*Ye,St+=D*ir,Ht+=D*or,Lt+=D*sr,qt+=D*pr,It+=D*Er,rr+=D*hr,ye+=D*br,Me+=D*ur,H+=D*ee,G+=D*er,ne+=D*wr,se+=D*Pr,he+=D*jr,Le+=D*Lr,Ie+=D*Mt,D=ce[7],St+=D*Ye,Ht+=D*ir,Lt+=D*or,qt+=D*sr,It+=D*pr,rr+=D*Er,ye+=D*hr,Me+=D*br,H+=D*ur,G+=D*ee,ne+=D*er,se+=D*wr,he+=D*Pr,Le+=D*jr,Ie+=D*Lr,Te+=D*Mt,D=ce[8],Ht+=D*Ye,Lt+=D*ir,qt+=D*or,It+=D*sr,rr+=D*pr,ye+=D*Er,Me+=D*hr,H+=D*br,G+=D*ur,ne+=D*ee,se+=D*er,he+=D*wr,Le+=D*Pr,Ie+=D*jr,Te+=D*Lr,Ce+=D*Mt,D=ce[9],Lt+=D*Ye,qt+=D*ir,It+=D*or,rr+=D*sr,ye+=D*pr,Me+=D*Er,H+=D*hr,G+=D*br,ne+=D*ur,se+=D*ee,he+=D*er,Le+=D*wr,Ie+=D*Pr,Te+=D*jr,Ce+=D*Lr,Ge+=D*Mt,D=ce[10],qt+=D*Ye,It+=D*ir,rr+=D*or,ye+=D*sr,Me+=D*pr,H+=D*Er,G+=D*hr,ne+=D*br,se+=D*ur,he+=D*ee,Le+=D*er,Ie+=D*wr,Te+=D*Pr,Ce+=D*jr,Ge+=D*Lr,Je+=D*Mt,D=ce[11],It+=D*Ye,rr+=D*ir,ye+=D*or,Me+=D*sr,H+=D*pr,G+=D*Er,ne+=D*hr,se+=D*br,he+=D*ur,Le+=D*ee,Ie+=D*er,Te+=D*wr,Ce+=D*Pr,Ge+=D*jr,Je+=D*Lr,ft+=D*Mt,D=ce[12],rr+=D*Ye,ye+=D*ir,Me+=D*or,H+=D*sr,G+=D*pr,ne+=D*Er,se+=D*hr,he+=D*br,Le+=D*ur,Ie+=D*ee,Te+=D*er,Ce+=D*wr,Ge+=D*Pr,Je+=D*jr,ft+=D*Lr,gt+=D*Mt,D=ce[13],ye+=D*Ye,Me+=D*ir,H+=D*or,G+=D*sr,ne+=D*pr,se+=D*Er,he+=D*hr,Le+=D*br,Ie+=D*ur,Te+=D*ee,Ce+=D*er,Ge+=D*wr,Je+=D*Pr,ft+=D*jr,gt+=D*Lr,Nt+=D*Mt,D=ce[14],Me+=D*Ye,H+=D*ir,G+=D*or,ne+=D*sr,se+=D*pr,he+=D*Er,Le+=D*hr,Ie+=D*br,Te+=D*ur,Ce+=D*ee,Ge+=D*er,Je+=D*wr,ft+=D*Pr,gt+=D*jr,Nt+=D*Lr,Vt+=D*Mt,D=ce[15],H+=D*Ye,G+=D*ir,ne+=D*or,se+=D*sr,he+=D*pr,Le+=D*Er,Ie+=D*hr,Te+=D*br,Ce+=D*ur,Ge+=D*ee,Je+=D*er,ft+=D*wr,gt+=D*Pr,Nt+=D*jr,Vt+=D*Lr,Gt+=D*Mt,ot+=38*G,at+=38*ne,yt+=38*se,Tt+=38*he,Kt+=38*Le,Et+=38*Ie,Rt+=38*Te,St+=38*Ce,Ht+=38*Ge,Lt+=38*Je,qt+=38*ft,It+=38*gt,rr+=38*Nt,ye+=38*Vt,Me+=38*Gt,xe=1,D=ot+xe+65535,xe=Math.floor(D/65536),ot=D-xe*65536,D=at+xe+65535,xe=Math.floor(D/65536),at=D-xe*65536,D=yt+xe+65535,xe=Math.floor(D/65536),yt=D-xe*65536,D=Tt+xe+65535,xe=Math.floor(D/65536),Tt=D-xe*65536,D=Kt+xe+65535,xe=Math.floor(D/65536),Kt=D-xe*65536,D=Et+xe+65535,xe=Math.floor(D/65536),Et=D-xe*65536,D=Rt+xe+65535,xe=Math.floor(D/65536),Rt=D-xe*65536,D=St+xe+65535,xe=Math.floor(D/65536),St=D-xe*65536,D=Ht+xe+65535,xe=Math.floor(D/65536),Ht=D-xe*65536,D=Lt+xe+65535,xe=Math.floor(D/65536),Lt=D-xe*65536,D=qt+xe+65535,xe=Math.floor(D/65536),qt=D-xe*65536,D=It+xe+65535,xe=Math.floor(D/65536),It=D-xe*65536,D=rr+xe+65535,xe=Math.floor(D/65536),rr=D-xe*65536,D=ye+xe+65535,xe=Math.floor(D/65536),ye=D-xe*65536,D=Me+xe+65535,xe=Math.floor(D/65536),Me=D-xe*65536,D=H+xe+65535,xe=Math.floor(D/65536),H=D-xe*65536,ot+=xe-1+37*(xe-1),xe=1,D=ot+xe+65535,xe=Math.floor(D/65536),ot=D-xe*65536,D=at+xe+65535,xe=Math.floor(D/65536),at=D-xe*65536,D=yt+xe+65535,xe=Math.floor(D/65536),yt=D-xe*65536,D=Tt+xe+65535,xe=Math.floor(D/65536),Tt=D-xe*65536,D=Kt+xe+65535,xe=Math.floor(D/65536),Kt=D-xe*65536,D=Et+xe+65535,xe=Math.floor(D/65536),Et=D-xe*65536,D=Rt+xe+65535,xe=Math.floor(D/65536),Rt=D-xe*65536,D=St+xe+65535,xe=Math.floor(D/65536),St=D-xe*65536,D=Ht+xe+65535,xe=Math.floor(D/65536),Ht=D-xe*65536,D=Lt+xe+65535,xe=Math.floor(D/65536),Lt=D-xe*65536,D=qt+xe+65535,xe=Math.floor(D/65536),qt=D-xe*65536,D=It+xe+65535,xe=Math.floor(D/65536),It=D-xe*65536,D=rr+xe+65535,xe=Math.floor(D/65536),rr=D-xe*65536,D=ye+xe+65535,xe=Math.floor(D/65536),ye=D-xe*65536,D=Me+xe+65535,xe=Math.floor(D/65536),Me=D-xe*65536,D=H+xe+65535,xe=Math.floor(D/65536),H=D-xe*65536,ot+=xe-1+37*(xe-1),Q[0]=ot,Q[1]=at,Q[2]=yt,Q[3]=Tt,Q[4]=Kt,Q[5]=Et,Q[6]=Rt,Q[7]=St,Q[8]=Ht,Q[9]=Lt,Q[10]=qt,Q[11]=It,Q[12]=rr,Q[13]=ye,Q[14]=Me,Q[15]=H}function oe(Q,ce){re(Q,ce,ce)}function Ee(Q,ce){var be=t(),D;for(D=0;D<16;D++)be[D]=ce[D];for(D=253;D>=0;D--)oe(be,be),D!==2&&D!==4&&re(be,be,ce);for(D=0;D<16;D++)Q[D]=be[D]}function Fe(Q,ce){var be=t(),D;for(D=0;D<16;D++)be[D]=ce[D];for(D=250;D>=0;D--)oe(be,be),D!==1&&re(be,be,ce);for(D=0;D<16;D++)Q[D]=be[D]}function Oe(Q,ce,be){var D=new Uint8Array(32),xe=new Float64Array(80),ot,at,yt=t(),Tt=t(),Kt=t(),Et=t(),Rt=t(),St=t();for(at=0;at<31;at++)D[at]=ce[at];for(D[31]=ce[31]&127|64,D[0]&=248,x(xe,be),at=0;at<16;at++)Tt[at]=xe[at],Et[at]=yt[at]=Kt[at]=0;for(yt[0]=Et[0]=1,at=254;at>=0;--at)ot=D[at>>>3]>>>(at&7)&1,S(yt,Tt,ot),S(Kt,Et,ot),W(Rt,yt,Kt),K(yt,yt,Kt),W(Kt,Tt,Et),K(Tt,Tt,Et),oe(Et,Rt),oe(St,yt),re(yt,Kt,yt),re(Kt,Tt,Rt),W(Rt,yt,Kt),K(yt,yt,Kt),oe(Tt,yt),K(Kt,Et,St),re(yt,Kt,f),W(yt,yt,Et),re(Kt,Kt,yt),re(yt,Et,St),re(Et,Tt,xe),oe(Tt,Rt),S(yt,Tt,ot),S(Kt,Et,ot);for(at=0;at<16;at++)xe[at+16]=yt[at],xe[at+32]=Kt[at],xe[at+48]=Tt[at],xe[at+64]=Et[at];var Ht=xe.subarray(32),Lt=xe.subarray(16);return Ee(Ht,Ht),re(Lt,Lt,Ht),m(Q,Lt),0}function $(Q,ce){return Oe(Q,ce,a)}function de(Q,ce){return n(ce,32),$(Q,ce)}function we(Q,ce,be){var D=new Uint8Array(32);return Oe(D,be,ce),N(Q,o,D,F)}var Qe=q,ze=X;function We(Q,ce,be,D,xe,ot){var at=new Uint8Array(32);return we(at,xe,ot),Qe(Q,ce,be,D,at)}function et(Q,ce,be,D,xe,ot){var at=new Uint8Array(32);return we(at,xe,ot),ze(Q,ce,be,D,at)}var Be=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Re(Q,ce,be,D){for(var xe=new Int32Array(16),ot=new Int32Array(16),at,yt,Tt,Kt,Et,Rt,St,Ht,Lt,qt,It,rr,ye,Me,H,G,ne,se,he,Le,Ie,Te,Ce,Ge,Je,ft,gt=Q[0],Nt=Q[1],Vt=Q[2],Gt=Q[3],Ye=Q[4],ir=Q[5],or=Q[6],sr=Q[7],pr=ce[0],Er=ce[1],hr=ce[2],br=ce[3],ur=ce[4],ee=ce[5],er=ce[6],wr=ce[7],Pr=0;D>=128;){for(he=0;he<16;he++)Le=8*he+Pr,xe[he]=be[Le+0]<<24|be[Le+1]<<16|be[Le+2]<<8|be[Le+3],ot[he]=be[Le+4]<<24|be[Le+5]<<16|be[Le+6]<<8|be[Le+7];for(he=0;he<80;he++)if(at=gt,yt=Nt,Tt=Vt,Kt=Gt,Et=Ye,Rt=ir,St=or,Ht=sr,Lt=pr,qt=Er,It=hr,rr=br,ye=ur,Me=ee,H=er,G=wr,Ie=sr,Te=wr,Ce=Te&65535,Ge=Te>>>16,Je=Ie&65535,ft=Ie>>>16,Ie=(Ye>>>14|ur<<18)^(Ye>>>18|ur<<14)^(ur>>>9|Ye<<23),Te=(ur>>>14|Ye<<18)^(ur>>>18|Ye<<14)^(Ye>>>9|ur<<23),Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,Ie=Ye&ir^~Ye&or,Te=ur&ee^~ur&er,Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,Ie=Be[he*2],Te=Be[he*2+1],Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,Ie=xe[he%16],Te=ot[he%16],Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,Ge+=Ce>>>16,Je+=Ge>>>16,ft+=Je>>>16,ne=Je&65535|ft<<16,se=Ce&65535|Ge<<16,Ie=ne,Te=se,Ce=Te&65535,Ge=Te>>>16,Je=Ie&65535,ft=Ie>>>16,Ie=(gt>>>28|pr<<4)^(pr>>>2|gt<<30)^(pr>>>7|gt<<25),Te=(pr>>>28|gt<<4)^(gt>>>2|pr<<30)^(gt>>>7|pr<<25),Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,Ie=gt&Nt^gt&Vt^Nt&Vt,Te=pr&Er^pr&hr^Er&hr,Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,Ge+=Ce>>>16,Je+=Ge>>>16,ft+=Je>>>16,Ht=Je&65535|ft<<16,G=Ce&65535|Ge<<16,Ie=Kt,Te=rr,Ce=Te&65535,Ge=Te>>>16,Je=Ie&65535,ft=Ie>>>16,Ie=ne,Te=se,Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,Ge+=Ce>>>16,Je+=Ge>>>16,ft+=Je>>>16,Kt=Je&65535|ft<<16,rr=Ce&65535|Ge<<16,Nt=at,Vt=yt,Gt=Tt,Ye=Kt,ir=Et,or=Rt,sr=St,gt=Ht,Er=Lt,hr=qt,br=It,ur=rr,ee=ye,er=Me,wr=H,pr=G,he%16===15)for(Le=0;Le<16;Le++)Ie=xe[Le],Te=ot[Le],Ce=Te&65535,Ge=Te>>>16,Je=Ie&65535,ft=Ie>>>16,Ie=xe[(Le+9)%16],Te=ot[(Le+9)%16],Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,ne=xe[(Le+1)%16],se=ot[(Le+1)%16],Ie=(ne>>>1|se<<31)^(ne>>>8|se<<24)^ne>>>7,Te=(se>>>1|ne<<31)^(se>>>8|ne<<24)^(se>>>7|ne<<25),Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,ne=xe[(Le+14)%16],se=ot[(Le+14)%16],Ie=(ne>>>19|se<<13)^(se>>>29|ne<<3)^ne>>>6,Te=(se>>>19|ne<<13)^(ne>>>29|se<<3)^(se>>>6|ne<<26),Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,Ge+=Ce>>>16,Je+=Ge>>>16,ft+=Je>>>16,xe[Le]=Je&65535|ft<<16,ot[Le]=Ce&65535|Ge<<16;Ie=gt,Te=pr,Ce=Te&65535,Ge=Te>>>16,Je=Ie&65535,ft=Ie>>>16,Ie=Q[0],Te=ce[0],Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,Ge+=Ce>>>16,Je+=Ge>>>16,ft+=Je>>>16,Q[0]=gt=Je&65535|ft<<16,ce[0]=pr=Ce&65535|Ge<<16,Ie=Nt,Te=Er,Ce=Te&65535,Ge=Te>>>16,Je=Ie&65535,ft=Ie>>>16,Ie=Q[1],Te=ce[1],Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,Ge+=Ce>>>16,Je+=Ge>>>16,ft+=Je>>>16,Q[1]=Nt=Je&65535|ft<<16,ce[1]=Er=Ce&65535|Ge<<16,Ie=Vt,Te=hr,Ce=Te&65535,Ge=Te>>>16,Je=Ie&65535,ft=Ie>>>16,Ie=Q[2],Te=ce[2],Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,Ge+=Ce>>>16,Je+=Ge>>>16,ft+=Je>>>16,Q[2]=Vt=Je&65535|ft<<16,ce[2]=hr=Ce&65535|Ge<<16,Ie=Gt,Te=br,Ce=Te&65535,Ge=Te>>>16,Je=Ie&65535,ft=Ie>>>16,Ie=Q[3],Te=ce[3],Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,Ge+=Ce>>>16,Je+=Ge>>>16,ft+=Je>>>16,Q[3]=Gt=Je&65535|ft<<16,ce[3]=br=Ce&65535|Ge<<16,Ie=Ye,Te=ur,Ce=Te&65535,Ge=Te>>>16,Je=Ie&65535,ft=Ie>>>16,Ie=Q[4],Te=ce[4],Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,Ge+=Ce>>>16,Je+=Ge>>>16,ft+=Je>>>16,Q[4]=Ye=Je&65535|ft<<16,ce[4]=ur=Ce&65535|Ge<<16,Ie=ir,Te=ee,Ce=Te&65535,Ge=Te>>>16,Je=Ie&65535,ft=Ie>>>16,Ie=Q[5],Te=ce[5],Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,Ge+=Ce>>>16,Je+=Ge>>>16,ft+=Je>>>16,Q[5]=ir=Je&65535|ft<<16,ce[5]=ee=Ce&65535|Ge<<16,Ie=or,Te=er,Ce=Te&65535,Ge=Te>>>16,Je=Ie&65535,ft=Ie>>>16,Ie=Q[6],Te=ce[6],Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,Ge+=Ce>>>16,Je+=Ge>>>16,ft+=Je>>>16,Q[6]=or=Je&65535|ft<<16,ce[6]=er=Ce&65535|Ge<<16,Ie=sr,Te=wr,Ce=Te&65535,Ge=Te>>>16,Je=Ie&65535,ft=Ie>>>16,Ie=Q[7],Te=ce[7],Ce+=Te&65535,Ge+=Te>>>16,Je+=Ie&65535,ft+=Ie>>>16,Ge+=Ce>>>16,Je+=Ge>>>16,ft+=Je>>>16,Q[7]=sr=Je&65535|ft<<16,ce[7]=wr=Ce&65535|Ge<<16,Pr+=128,D-=128}return D}function $e(Q,ce,be){var D=new Int32Array(8),xe=new Int32Array(8),ot=new Uint8Array(256),at,yt=be;for(D[0]=1779033703,D[1]=3144134277,D[2]=1013904242,D[3]=2773480762,D[4]=1359893119,D[5]=2600822924,D[6]=528734635,D[7]=1541459225,xe[0]=4089235720,xe[1]=2227873595,xe[2]=4271175723,xe[3]=1595750129,xe[4]=2917565137,xe[5]=725511199,xe[6]=4215389547,xe[7]=327033209,Re(D,xe,ce,be),be%=128,at=0;at<be;at++)ot[at]=ce[yt-be+at];for(ot[be]=128,be=256-128*(be<112?1:0),ot[be-9]=0,T(ot,be-8,yt/536870912|0,yt<<3),Re(D,xe,ot,be),at=0;at<8;at++)T(Q,8*at,D[at],xe[at]);return 0}function ve(Q,ce){var be=t(),D=t(),xe=t(),ot=t(),at=t(),yt=t(),Tt=t(),Kt=t(),Et=t();K(be,Q[1],Q[0]),K(Et,ce[1],ce[0]),re(be,be,Et),W(D,Q[0],Q[1]),W(Et,ce[0],ce[1]),re(D,D,Et),re(xe,Q[3],ce[3]),re(xe,xe,r),re(ot,Q[2],ce[2]),W(ot,ot,ot),K(at,D,be),K(yt,ot,xe),W(Tt,ot,xe),W(Kt,D,be),re(Q[0],at,yt),re(Q[1],Kt,Tt),re(Q[2],Tt,yt),re(Q[3],at,Kt)}function ue(Q,ce,be){var D;for(D=0;D<4;D++)S(Q[D],ce[D],be)}function c(Q,ce){var be=t(),D=t(),xe=t();Ee(xe,ce[2]),re(be,ce[0],xe),re(D,ce[1],xe),m(Q,D),Q[31]^=l(be)<<7}function y(Q,ce,be){var D,xe;for(ae(Q[0],i),ae(Q[1],s),ae(Q[2],s),ae(Q[3],i),xe=255;xe>=0;--xe)D=be[xe/8|0]>>(xe&7)&1,ue(Q,ce,D),ve(ce,Q),ve(Q,Q),ue(Q,ce,D)}function v(Q,ce){var be=[t(),t(),t(),t()];ae(be[0],_),ae(be[1],d),ae(be[2],s),re(be[3],_,d),y(Q,be,ce)}function B(Q,ce,be){var D=new Uint8Array(64),xe=[t(),t(),t(),t()],ot;for(be||n(ce,32),$e(D,ce,32),D[0]&=248,D[31]&=127,D[31]|=64,v(xe,D),c(Q,xe),ot=0;ot<32;ot++)ce[ot+32]=Q[ot];return 0}var O=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function h(Q,ce){var be,D,xe,ot;for(D=63;D>=32;--D){for(be=0,xe=D-32,ot=D-12;xe<ot;++xe)ce[xe]+=be-16*ce[D]*O[xe-(D-32)],be=Math.floor((ce[xe]+128)/256),ce[xe]-=be*256;ce[xe]+=be,ce[D]=0}for(be=0,xe=0;xe<32;xe++)ce[xe]+=be-(ce[31]>>4)*O[xe],be=ce[xe]>>8,ce[xe]&=255;for(xe=0;xe<32;xe++)ce[xe]-=be*O[xe];for(D=0;D<32;D++)ce[D+1]+=ce[D]>>8,Q[D]=ce[D]&255}function k(Q){var ce=new Float64Array(64),be;for(be=0;be<64;be++)ce[be]=Q[be];for(be=0;be<64;be++)Q[be]=0;h(Q,ce)}function U(Q,ce,be,D){var xe=new Uint8Array(64),ot=new Uint8Array(64),at=new Uint8Array(64),yt,Tt,Kt=new Float64Array(64),Et=[t(),t(),t(),t()];$e(xe,D,32),xe[0]&=248,xe[31]&=127,xe[31]|=64;var Rt=be+64;for(yt=0;yt<be;yt++)Q[64+yt]=ce[yt];for(yt=0;yt<32;yt++)Q[32+yt]=xe[32+yt];for($e(at,Q.subarray(32),be+32),k(at),v(Et,at),c(Q,Et),yt=32;yt<64;yt++)Q[yt]=D[yt];for($e(ot,Q,be+64),k(ot),yt=0;yt<64;yt++)Kt[yt]=0;for(yt=0;yt<32;yt++)Kt[yt]=at[yt];for(yt=0;yt<32;yt++)for(Tt=0;Tt<32;Tt++)Kt[yt+Tt]+=ot[yt]*xe[Tt];return h(Q.subarray(32),Kt),Rt}function M(Q,ce){var be=t(),D=t(),xe=t(),ot=t(),at=t(),yt=t(),Tt=t();return ae(Q[2],s),x(Q[1],ce),oe(xe,Q[1]),re(ot,xe,u),K(xe,xe,Q[2]),W(ot,Q[2],ot),oe(at,ot),oe(yt,at),re(Tt,yt,at),re(be,Tt,xe),re(be,be,ot),Fe(be,be),re(be,be,xe),re(be,be,ot),re(be,be,ot),re(Q[0],be,ot),oe(D,Q[0]),re(D,D,ot),P(D,xe)&&re(Q[0],Q[0],b),oe(D,Q[0]),re(D,D,ot),P(D,xe)?-1:(l(Q[0])===ce[31]>>7&&K(Q[0],i,Q[0]),re(Q[3],Q[0],Q[1]),0)}function J(Q,ce,be,D){var xe,ot=new Uint8Array(32),at=new Uint8Array(64),yt=[t(),t(),t(),t()],Tt=[t(),t(),t(),t()];if(be<64||M(Tt,D))return-1;for(xe=0;xe<be;xe++)Q[xe]=ce[xe];for(xe=0;xe<32;xe++)Q[xe+32]=D[xe];if($e(at,Q,be),k(at),y(yt,Tt,at),v(Tt,ce.subarray(32)),ve(yt,Tt),c(ot,yt),be-=64,p(ce,0,ot,0)){for(xe=0;xe<be;xe++)Q[xe]=0;return-1}for(xe=0;xe<be;xe++)Q[xe]=ce[xe+64];return be}var pe=32,Ne=24,tt=32,bt=16,Ot=32,Ft=32,Yt=32,yr=32,je=32,De=Ne,Xe=tt,ie=bt,Pe=64,ct=32,dt=64,xt=32,st=64;e.lowlevel={crypto_core_hsalsa20:N,crypto_stream_xor:Y,crypto_stream:V,crypto_stream_salsa20_xor:R,crypto_stream_salsa20:j,crypto_onetimeauth:le,crypto_onetimeauth_verify:C,crypto_verify_16:g,crypto_verify_32:p,crypto_secretbox:q,crypto_secretbox_open:X,crypto_scalarmult:Oe,crypto_scalarmult_base:$,crypto_box_beforenm:we,crypto_box_afternm:Qe,crypto_box:We,crypto_box_open:et,crypto_box_keypair:de,crypto_hash:$e,crypto_sign:U,crypto_sign_keypair:B,crypto_sign_open:J,crypto_secretbox_KEYBYTES:pe,crypto_secretbox_NONCEBYTES:Ne,crypto_secretbox_ZEROBYTES:tt,crypto_secretbox_BOXZEROBYTES:bt,crypto_scalarmult_BYTES:Ot,crypto_scalarmult_SCALARBYTES:Ft,crypto_box_PUBLICKEYBYTES:Yt,crypto_box_SECRETKEYBYTES:yr,crypto_box_BEFORENMBYTES:je,crypto_box_NONCEBYTES:De,crypto_box_ZEROBYTES:Xe,crypto_box_BOXZEROBYTES:ie,crypto_sign_BYTES:Pe,crypto_sign_PUBLICKEYBYTES:ct,crypto_sign_SECRETKEYBYTES:dt,crypto_sign_SEEDBYTES:xt,crypto_hash_BYTES:st,gf:t,D:u,L:O,pack25519:m,unpack25519:x,M:re,A:W,S:oe,Z:K,pow2523:Fe,add:ve,set25519:ae,modL:h,scalarmult:y,scalarbase:v};function $t(Q,ce){if(Q.length!==pe)throw new Error("bad key size");if(ce.length!==Ne)throw new Error("bad nonce size")}function _t(Q,ce){if(Q.length!==Yt)throw new Error("bad public key size");if(ce.length!==yr)throw new Error("bad secret key size")}function Ct(){for(var Q=0;Q<arguments.length;Q++)if(!(arguments[Q]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function it(Q){for(var ce=0;ce<Q.length;ce++)Q[ce]=0}e.randomBytes=function(Q){var ce=new Uint8Array(Q);return n(ce,Q),ce},e.secretbox=function(Q,ce,be){Ct(Q,ce,be),$t(be,ce);for(var D=new Uint8Array(tt+Q.length),xe=new Uint8Array(D.length),ot=0;ot<Q.length;ot++)D[ot+tt]=Q[ot];return q(xe,D,D.length,ce,be),xe.subarray(bt)},e.secretbox.open=function(Q,ce,be){Ct(Q,ce,be),$t(be,ce);for(var D=new Uint8Array(bt+Q.length),xe=new Uint8Array(D.length),ot=0;ot<Q.length;ot++)D[ot+bt]=Q[ot];return D.length<32||X(xe,D,D.length,ce,be)!==0?null:xe.subarray(tt)},e.secretbox.keyLength=pe,e.secretbox.nonceLength=Ne,e.secretbox.overheadLength=bt,e.scalarMult=function(Q,ce){if(Ct(Q,ce),Q.length!==Ft)throw new Error("bad n size");if(ce.length!==Ot)throw new Error("bad p size");var be=new Uint8Array(Ot);return Oe(be,Q,ce),be},e.scalarMult.base=function(Q){if(Ct(Q),Q.length!==Ft)throw new Error("bad n size");var ce=new Uint8Array(Ot);return $(ce,Q),ce},e.scalarMult.scalarLength=Ft,e.scalarMult.groupElementLength=Ot,e.box=function(Q,ce,be,D){var xe=e.box.before(be,D);return e.secretbox(Q,ce,xe)},e.box.before=function(Q,ce){Ct(Q,ce),_t(Q,ce);var be=new Uint8Array(je);return we(be,Q,ce),be},e.box.after=e.secretbox,e.box.open=function(Q,ce,be,D){var xe=e.box.before(be,D);return e.secretbox.open(Q,ce,xe)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var Q=new Uint8Array(Yt),ce=new Uint8Array(yr);return de(Q,ce),{publicKey:Q,secretKey:ce}},e.box.keyPair.fromSecretKey=function(Q){if(Ct(Q),Q.length!==yr)throw new Error("bad secret key size");var ce=new Uint8Array(Yt);return $(ce,Q),{publicKey:ce,secretKey:new Uint8Array(Q)}},e.box.publicKeyLength=Yt,e.box.secretKeyLength=yr,e.box.sharedKeyLength=je,e.box.nonceLength=De,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(Q,ce){if(Ct(Q,ce),ce.length!==dt)throw new Error("bad secret key size");var be=new Uint8Array(Pe+Q.length);return U(be,Q,Q.length,ce),be},e.sign.open=function(Q,ce){if(Ct(Q,ce),ce.length!==ct)throw new Error("bad public key size");var be=new Uint8Array(Q.length),D=J(be,Q,Q.length,ce);if(D<0)return null;for(var xe=new Uint8Array(D),ot=0;ot<xe.length;ot++)xe[ot]=be[ot];return xe},e.sign.detached=function(Q,ce){for(var be=e.sign(Q,ce),D=new Uint8Array(Pe),xe=0;xe<D.length;xe++)D[xe]=be[xe];return D},e.sign.detached.verify=function(Q,ce,be){if(Ct(Q,ce,be),ce.length!==Pe)throw new Error("bad signature size");if(be.length!==ct)throw new Error("bad public key size");var D=new Uint8Array(Pe+Q.length),xe=new Uint8Array(Pe+Q.length),ot;for(ot=0;ot<Pe;ot++)D[ot]=ce[ot];for(ot=0;ot<Q.length;ot++)D[ot+Pe]=Q[ot];return J(xe,D,D.length,be)>=0},e.sign.keyPair=function(){var Q=new Uint8Array(ct),ce=new Uint8Array(dt);return B(Q,ce),{publicKey:Q,secretKey:ce}},e.sign.keyPair.fromSecretKey=function(Q){if(Ct(Q),Q.length!==dt)throw new Error("bad secret key size");for(var ce=new Uint8Array(ct),be=0;be<ce.length;be++)ce[be]=Q[32+be];return{publicKey:ce,secretKey:new Uint8Array(Q)}},e.sign.keyPair.fromSeed=function(Q){if(Ct(Q),Q.length!==xt)throw new Error("bad seed size");for(var ce=new Uint8Array(ct),be=new Uint8Array(dt),D=0;D<32;D++)be[D]=Q[D];return B(ce,be,!0),{publicKey:ce,secretKey:be}},e.sign.publicKeyLength=ct,e.sign.secretKeyLength=dt,e.sign.seedLength=xt,e.sign.signatureLength=Pe,e.hash=function(Q){Ct(Q);var ce=new Uint8Array(st);return $e(ce,Q,Q.length),ce},e.hash.hashLength=st,e.verify=function(Q,ce){return Ct(Q,ce),Q.length===0||ce.length===0||Q.length!==ce.length?!1:w(Q,0,ce,0,Q.length)===0},e.setPRNG=function(Q){n=Q},function(){var Q=typeof self<"u"?self.crypto||self.msCrypto:null;if(Q&&Q.getRandomValues){var ce=65536;e.setPRNG(function(be,D){var xe,ot=new Uint8Array(D);for(xe=0;xe<D;xe+=ce)Q.getRandomValues(ot.subarray(xe,xe+Math.min(D-xe,ce)));for(xe=0;xe<D;xe++)be[xe]=ot[xe];it(ot)})}else typeof Wh<"u"&&(Q=Xd(),Q&&Q.randomBytes&&e.setPRNG(function(be,D){var xe,ot=Q.randomBytes(D);for(xe=0;xe<D;xe++)be[xe]=ot[xe];it(ot)}))}()})(typeof Su<"u"&&Su.exports?Su.exports:self.nacl=self.nacl||{})});var Kl=Jt(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.FastSigning=void 0;Li.generate=Aw;Li.sign=ww;Li.verify=Sw;var $o={},J6=Li.FastSigning=_w();function ww(e,t){return $o.sign(e,t)}function Sw(e,t,n){return $o.verify(e,t,n)}function Aw(e){return $o.generate(e)}function _w(){return typeof window>"u"?Ew():Vl()}function Ew(){var e;try{e=zd()}catch{return Vl()}return Object.keys(e).length?($o.generate=function(t){var n=Buffer.alloc(e.crypto_sign_PUBLICKEYBYTES),o=Buffer.alloc(e.crypto_sign_SECRETKEYBYTES);return e.crypto_sign_seed_keypair(n,o,t),n},$o.sign=function(t,n){t=Buffer.from(t);var o=Buffer.alloc(e.crypto_sign_BYTES);return e.crypto_sign_detached(o,t,n),o},$o.verify=function(t,n,o){t=Buffer.from(t);try{return e.crypto_sign_verify_detached(n,t,o)}catch{return!1}},!0):Vl()}function Vl(){var e=ql();return $o.generate=function(t){var n=new Uint8Array(t),o=e.sign.keyPair.fromSeed(n);return Buffer.from(o.publicKey)},$o.sign=function(t,n){t=Buffer.from(t),t=new Uint8Array(t.toJSON().data),n=new Uint8Array(n.toJSON().data);var o=e.sign.detached(t,n);return Buffer.from(o)},$o.verify=function(t,n,o){return t=Buffer.from(t),t=new Uint8Array(t.toJSON().data),n=new Uint8Array(n.toJSON().data),o=new Uint8Array(o.toJSON().data),e.sign.detached.verify(t,n,o)},!1}});var Hl=Jt(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.trimEnd=void 0;var e3=Au.trimEnd=function(t,n){for(var o=typeof t=="number",a=String(t);a.endsWith(n);)a=a.slice(0,-1);return o?Number(a):a}});var Gd=Jt(Zn=>{"use strict";var Tu=function(e,t){return t||(t={}),e.split("").forEach(function(n,o){n in t||(t[n]=o)}),t},sa={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",charmap:{0:14,1:8}};sa.charmap=Tu(sa.alphabet,sa.charmap);var _u={alphabet:"0123456789ABCDEFGHJKMNPQRSTVWXYZ",charmap:{O:0,I:1,L:1}};_u.charmap=Tu(_u.alphabet,_u.charmap);var Eu={alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",charmap:{}};Eu.charmap=Tu(Eu.alphabet,Eu.charmap);function ss(e){if(this.buf=[],this.shift=8,this.carry=0,e){switch(e.type){case"rfc4648":this.charmap=Zn.rfc4648.charmap;break;case"crockford":this.charmap=Zn.crockford.charmap;break;case"base32hex":this.charmap=Zn.base32hex.charmap;break;default:throw new Error("invalid type")}e.charmap&&(this.charmap=e.charmap)}}ss.prototype.charmap=sa.charmap;ss.prototype.write=function(e){var t=this.charmap,n=this.buf,o=this.shift,a=this.carry;return e.toUpperCase().split("").forEach(function(i){if(i!="="){var s=t[i]&255;o-=5,o>0?a|=s<<o:o<0?(n.push(a|s>>-o),o+=8,a=s<<o&255):(n.push(a|s),o=8,a=0)}}),this.shift=o,this.carry=a,this};ss.prototype.finalize=function(e){return e&&this.write(e),this.shift!==8&&this.carry!==0&&(this.buf.push(this.carry),this.shift=8,this.carry=0),this.buf};function us(e){if(this.buf="",this.shift=3,this.carry=0,e){switch(e.type){case"rfc4648":this.alphabet=Zn.rfc4648.alphabet;break;case"crockford":this.alphabet=Zn.crockford.alphabet;break;case"base32hex":this.alphabet=Zn.base32hex.alphabet;break;default:throw new Error("invalid type")}e.alphabet?this.alphabet=e.alphabet:e.lc&&(this.alphabet=this.alphabet.toLowerCase())}}us.prototype.alphabet=sa.alphabet;us.prototype.write=function(e){var t=this.shift,n=this.carry,o,a,i;for(i=0;i<e.length;i++)a=e[i],o=n|a>>t,this.buf+=this.alphabet[o&31],t>5&&(t-=5,o=a>>t,this.buf+=this.alphabet[o&31]),t=5-t,n=a<<t,t=8-t;return this.shift=t,this.carry=n,this};us.prototype.finalize=function(e){return e&&this.write(e),this.shift!==3&&(this.buf+=this.alphabet[this.carry&31],this.shift=3,this.carry=0),this.buf};Zn.encode=function(e,t){return new us(t).finalize(e)};Zn.decode=function(e,t){return new ss(t).finalize(e)};Zn.Decoder=ss;Zn.Encoder=us;Zn.charmap=Tu;Zn.crockford=_u;Zn.rfc4648=sa;Zn.base32hex=Eu});var Wd=Jt(zl=>{"use strict";Object.defineProperty(zl,"__esModule",{value:!0});zl.verifyChecksum=Tw;function Tw(e,t){if(e.length!==t.length)return!1;if(e.length===0)return!0;for(var n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}});var _n=Jt(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});ua.StrKey=void 0;ua.decodeCheck=Qo;ua.encodeCheck=li;var Xl=Ow(Gd()),kw=Wd();function Ow(e){return e&&e.__esModule?e:{default:e}}function ls(e){"@babel/helpers - typeof";return ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ls(e)}function Pw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Rw(o.key),o)}}function xw(e,t,n){return t&&$d(e.prototype,t),n&&$d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Rw(e){var t=Iw(e,"string");return ls(t)=="symbol"?t:t+""}function Iw(e,t){if(ls(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(ls(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ku={ed25519PublicKey:48,ed25519SecretSeed:144,med25519PublicKey:96,preAuthTx:152,sha256Hash:184,signedPayload:120,contract:16},Cw={G:"ed25519PublicKey",S:"ed25519SecretSeed",M:"med25519PublicKey",T:"preAuthTx",X:"sha256Hash",P:"signedPayload",C:"contract"},o3=ua.StrKey=function(){function e(){Pw(this,e)}return xw(e,null,[{key:"encodeEd25519PublicKey",value:function(n){return li("ed25519PublicKey",n)}},{key:"decodeEd25519PublicKey",value:function(n){return Qo("ed25519PublicKey",n)}},{key:"isValidEd25519PublicKey",value:function(n){return cs("ed25519PublicKey",n)}},{key:"encodeEd25519SecretSeed",value:function(n){return li("ed25519SecretSeed",n)}},{key:"decodeEd25519SecretSeed",value:function(n){return Qo("ed25519SecretSeed",n)}},{key:"isValidEd25519SecretSeed",value:function(n){return cs("ed25519SecretSeed",n)}},{key:"encodeMed25519PublicKey",value:function(n){return li("med25519PublicKey",n)}},{key:"decodeMed25519PublicKey",value:function(n){return Qo("med25519PublicKey",n)}},{key:"isValidMed25519PublicKey",value:function(n){return cs("med25519PublicKey",n)}},{key:"encodePreAuthTx",value:function(n){return li("preAuthTx",n)}},{key:"decodePreAuthTx",value:function(n){return Qo("preAuthTx",n)}},{key:"encodeSha256Hash",value:function(n){return li("sha256Hash",n)}},{key:"decodeSha256Hash",value:function(n){return Qo("sha256Hash",n)}},{key:"encodeSignedPayload",value:function(n){return li("signedPayload",n)}},{key:"decodeSignedPayload",value:function(n){return Qo("signedPayload",n)}},{key:"isValidSignedPayload",value:function(n){return cs("signedPayload",n)}},{key:"encodeContract",value:function(n){return li("contract",n)}},{key:"decodeContract",value:function(n){return Qo("contract",n)}},{key:"isValidContract",value:function(n){return cs("contract",n)}},{key:"getVersionByteForPrefix",value:function(n){return Cw[n[0]]}}])}();function cs(e,t){if(typeof t!="string")return!1;switch(e){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":case"contract":if(t.length!==56)return!1;break;case"med25519PublicKey":if(t.length!==69)return!1;break;case"signedPayload":if(t.length<56||t.length>165)return!1;break;default:return!1}var n="";try{n=Qo(e,t)}catch{return!1}switch(e){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":case"contract":return n.length===32;case"med25519PublicKey":return n.length===40;case"signedPayload":return n.length>=40&&n.length<=100;default:return!1}}function Qo(e,t){if(typeof t!="string")throw new TypeError("encoded argument must be of type String");var n=Xl.default.decode(t),o=n[0],a=n.slice(0,-2),i=a.slice(1),s=n.slice(-2);if(t!==Xl.default.encode(n))throw new Error("invalid encoded string");var f=ku[e];if(f===void 0)throw new Error("".concat(e," is not a valid version byte name. ")+"Expected one of ".concat(Object.keys(ku).join(", ")));if(o!==f)throw new Error("invalid version byte. expected ".concat(f,", got ").concat(o));var u=Qd(a);if(!(0,kw.verifyChecksum)(u,s))throw new Error("invalid checksum");return Buffer.from(i)}function li(e,t){if(t==null)throw new Error("cannot encode null data");var n=ku[e];if(n===void 0)throw new Error("".concat(e," is not a valid version byte name. ")+"Expected one of ".concat(Object.keys(ku).join(", ")));t=Buffer.from(t);var o=Buffer.from([n]),a=Buffer.concat([o,t]),i=Buffer.from(Qd(a)),s=Buffer.concat([a,i]);return Xl.default.encode(s)}function Qd(e){for(var t=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920],n=0,o=0;o<e.length;o+=1){var a=e[o],i=n>>8^a;n=n<<8^t[i],n&=65535}var s=new Uint8Array(2);return s[0]=n&255,s[1]=n>>8&255,s}});var ho=Jt(Pu=>{"use strict";Object.defineProperty(Pu,"__esModule",{value:!0});Pu.Keypair=void 0;var Bw=Jd(ql()),Gl=Kl(),Ou=_n(),jw=Wo(),fi=Jd(Rr());function Jd(e){return e&&e.__esModule?e:{default:e}}function ca(e){"@babel/helpers - typeof";return ca=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ca(e)}function Lw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yd(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Uw(o.key),o)}}function Nw(e,t,n){return t&&Yd(e.prototype,t),n&&Yd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Uw(e){var t=Mw(e,"string");return ca(t)=="symbol"?t:t+""}function Mw(e,t){if(ca(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(ca(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var a3=Pu.Keypair=function(){function e(t){if(Lw(this,e),t.type!=="ed25519")throw new Error("Invalid keys type");if(this.type=t.type,t.secretKey){if(t.secretKey=Buffer.from(t.secretKey),t.secretKey.length!==32)throw new Error("secretKey length is invalid");if(this._secretSeed=t.secretKey,this._publicKey=(0,Gl.generate)(t.secretKey),this._secretKey=Buffer.concat([t.secretKey,this._publicKey]),t.publicKey&&!this._publicKey.equals(Buffer.from(t.publicKey)))throw new Error("secretKey does not match publicKey")}else if(this._publicKey=Buffer.from(t.publicKey),this._publicKey.length!==32)throw new Error("publicKey length is invalid")}return Nw(e,[{key:"xdrAccountId",value:function(){return new fi.default.AccountId.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrPublicKey",value:function(){return new fi.default.PublicKey.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrMuxedAccount",value:function(n){if(typeof n<"u"){if(typeof n!="string")throw new TypeError("expected string for ID, got ".concat(ca(n)));return fi.default.MuxedAccount.keyTypeMuxedEd25519(new fi.default.MuxedAccountMed25519({id:fi.default.Uint64.fromString(n),ed25519:this._publicKey}))}return new fi.default.MuxedAccount.keyTypeEd25519(this._publicKey)}},{key:"rawPublicKey",value:function(){return this._publicKey}},{key:"signatureHint",value:function(){var n=this.xdrAccountId().toXDR();return n.slice(n.length-4)}},{key:"publicKey",value:function(){return Ou.StrKey.encodeEd25519PublicKey(this._publicKey)}},{key:"secret",value:function(){if(!this._secretSeed)throw new Error("no secret key available");if(this.type==="ed25519")return Ou.StrKey.encodeEd25519SecretSeed(this._secretSeed);throw new Error("Invalid Keypair type")}},{key:"rawSecretKey",value:function(){return this._secretSeed}},{key:"canSign",value:function(){return!!this._secretKey}},{key:"sign",value:function(n){if(!this.canSign())throw new Error("cannot sign: no secret key available");return(0,Gl.sign)(n,this._secretKey)}},{key:"verify",value:function(n,o){return(0,Gl.verify)(n,o,this._publicKey)}},{key:"signDecorated",value:function(n){var o=this.sign(n),a=this.signatureHint();return new fi.default.DecoratedSignature({hint:a,signature:o})}},{key:"signPayloadDecorated",value:function(n){var o=this.sign(n),a=this.signatureHint(),i=Buffer.from(n.slice(-4));return i.length<4&&(i=Buffer.concat([i,Buffer.alloc(4-n.length,0)])),new fi.default.DecoratedSignature({hint:i.map(function(s,f){return s^a[f]}),signature:o})}}],[{key:"fromSecret",value:function(n){var o=Ou.StrKey.decodeEd25519SecretSeed(n);return this.fromRawEd25519Seed(o)}},{key:"fromRawEd25519Seed",value:function(n){return new this({type:"ed25519",secretKey:n})}},{key:"master",value:function(n){if(!n)throw new Error("No network selected. Please pass a network argument, e.g. `Keypair.master(Networks.PUBLIC)`.");return this.fromRawEd25519Seed((0,jw.hash)(n))}},{key:"fromPublicKey",value:function(n){if(n=Ou.StrKey.decodeEd25519PublicKey(n),n.length!==32)throw new Error("Invalid Stellar public key");return new this({type:"ed25519",publicKey:n})}},{key:"random",value:function(){var n=Bw.default.randomBytes(32);return this.fromRawEd25519Seed(n)}}])}()});var Mo=Jt(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.Asset=void 0;var Fw=Hl(),Fn=qw(Rr()),Dw=ho(),Wl=_n(),Zd=Wo();function qw(e){return e&&e.__esModule?e:{default:e}}function fs(e){"@babel/helpers - typeof";return fs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fs(e)}function Vw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ey(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Hw(o.key),o)}}function Kw(e,t,n){return t&&ey(e.prototype,t),n&&ey(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hw(e){var t=zw(e,"string");return fs(t)=="symbol"?t:t+""}function zw(e,t){if(fs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(fs(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var u3=xu.Asset=function(){function e(t,n){if(Vw(this,e),!/^[a-zA-Z0-9]{1,12}$/.test(t))throw new Error("Asset code is invalid (maximum alphanumeric, 12 characters at max)");if(String(t).toLowerCase()!=="xlm"&&!n)throw new Error("Issuer cannot be null");if(n&&!Wl.StrKey.isValidEd25519PublicKey(n))throw new Error("Issuer is invalid");String(t).toLowerCase()==="xlm"?this.code="XLM":this.code=t,this.issuer=n}return Kw(e,[{key:"toXDRObject",value:function(){return this._toXDRObject(Fn.default.Asset)}},{key:"toChangeTrustXDRObject",value:function(){return this._toXDRObject(Fn.default.ChangeTrustAsset)}},{key:"toTrustLineXDRObject",value:function(){return this._toXDRObject(Fn.default.TrustLineAsset)}},{key:"contractId",value:function(n){var o=(0,Zd.hash)(Buffer.from(n)),a=Fn.default.HashIdPreimage.envelopeTypeContractId(new Fn.default.HashIdPreimageContractId({networkId:o,contractIdPreimage:Fn.default.ContractIdPreimage.contractIdPreimageFromAsset(this.toXDRObject())}));return Wl.StrKey.encodeContract((0,Zd.hash)(a.toXDR()))}},{key:"_toXDRObject",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Fn.default.Asset;if(this.isNative())return n.assetTypeNative();var o,a;this.code.length<=4?(o=Fn.default.AlphaNum4,a="assetTypeCreditAlphanum4"):(o=Fn.default.AlphaNum12,a="assetTypeCreditAlphanum12");var i=this.code.length<=4?4:12,s=this.code.padEnd(i,"\0"),f=new o({assetCode:s,issuer:Dw.Keypair.fromPublicKey(this.issuer).xdrAccountId()});return new n(a,f)}},{key:"getCode",value:function(){if(this.code!==void 0)return String(this.code)}},{key:"getIssuer",value:function(){if(this.issuer!==void 0)return String(this.issuer)}},{key:"getAssetType",value:function(){switch(this.getRawAssetType()){case Fn.default.AssetType.assetTypeNative():return"native";case Fn.default.AssetType.assetTypeCreditAlphanum4():return"credit_alphanum4";case Fn.default.AssetType.assetTypeCreditAlphanum12():return"credit_alphanum12";default:return"unknown"}}},{key:"getRawAssetType",value:function(){return this.isNative()?Fn.default.AssetType.assetTypeNative():this.code.length<=4?Fn.default.AssetType.assetTypeCreditAlphanum4():Fn.default.AssetType.assetTypeCreditAlphanum12()}},{key:"isNative",value:function(){return!this.issuer}},{key:"equals",value:function(n){return this.code===n.getCode()&&this.issuer===n.getIssuer()}},{key:"toString",value:function(){return this.isNative()?"native":"".concat(this.getCode(),":").concat(this.getIssuer())}}],[{key:"native",value:function(){return new e("XLM")}},{key:"fromOperation",value:function(n){var o,a,i;switch(n.switch()){case Fn.default.AssetType.assetTypeNative():return this.native();case Fn.default.AssetType.assetTypeCreditAlphanum4():o=n.alphaNum4();case Fn.default.AssetType.assetTypeCreditAlphanum12():return o=o||n.alphaNum12(),i=Wl.StrKey.encodeEd25519PublicKey(o.issuer().ed25519()),a=(0,Fw.trimEnd)(o.assetCode(),"\0"),new this(a,i);default:throw new Error("Invalid asset type: ".concat(n.switch().name))}}},{key:"compare",value:function(n,o){if(!n||!(n instanceof e))throw new Error("assetA is invalid");if(!o||!(o instanceof e))throw new Error("assetB is invalid");if(n.equals(o))return 0;var a=n.getRawAssetType().value,i=o.getRawAssetType().value;if(a!==i)return a<i?-1:1;var s=ty(n.getCode(),o.getCode());return s!==0?s:ty(n.getIssuer(),o.getIssuer())}}])}();function ty(e,t){return Buffer.compare(Buffer.from(e,"ascii"),Buffer.from(t,"ascii"))}});var Ql=Jt(ps=>{"use strict";Object.defineProperty(ps,"__esModule",{value:!0});ps.LiquidityPoolFeeV18=void 0;ps.getLiquidityPoolId=$w;var ry=Gw(Rr()),$l=Mo(),Xw=Wo();function Gw(e){return e&&e.__esModule?e:{default:e}}var Ww=ps.LiquidityPoolFeeV18=30;function $w(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e!=="constant_product")throw new Error("liquidityPoolType is invalid");var n=t.assetA,o=t.assetB,a=t.fee;if(!n||!(n instanceof $l.Asset))throw new Error("assetA is invalid");if(!o||!(o instanceof $l.Asset))throw new Error("assetB is invalid");if(!a||a!==Ww)throw new Error("fee is invalid");if($l.Asset.compare(n,o)!==-1)throw new Error("Assets are not in lexicographic order");var i=ry.default.LiquidityPoolType.liquidityPoolConstantProduct().toXDR(),s=new ry.default.LiquidityPoolConstantProductParameters({assetA:n.toXDRObject(),assetB:o.toXDRObject(),fee:a}).toXDR(),f=Buffer.concat([i,s]);return(0,Xw.hash)(f)}});var Iu=Jt(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});Ru.TransactionBase=void 0;var ny=Yw(Rr()),oy=Wo(),Qw=ho();function Yw(e){return e&&e.__esModule?e:{default:e}}function la(e){"@babel/helpers - typeof";return la=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},la(e)}function Jw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iy(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,e1(o.key),o)}}function Zw(e,t,n){return t&&iy(e.prototype,t),n&&iy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function e1(e){var t=t1(e,"string");return la(t)=="symbol"?t:t+""}function t1(e,t){if(la(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(la(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var f3=Ru.TransactionBase=function(){function e(t,n,o,a){if(Jw(this,e),typeof a!="string")throw new Error("Invalid passphrase provided to Transaction: expected a string but got a ".concat(la(a)));this._networkPassphrase=a,this._tx=t,this._signatures=n,this._fee=o}return Zw(e,[{key:"signatures",get:function(){return this._signatures},set:function(n){throw new Error("Transaction is immutable")}},{key:"tx",get:function(){return this._tx},set:function(n){throw new Error("Transaction is immutable")}},{key:"fee",get:function(){return this._fee},set:function(n){throw new Error("Transaction is immutable")}},{key:"networkPassphrase",get:function(){return this._networkPassphrase},set:function(n){this._networkPassphrase=n}},{key:"sign",value:function(){for(var n=this,o=this.hash(),a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];i.forEach(function(f){var u=f.signDecorated(o);n.signatures.push(u)})}},{key:"getKeypairSignature",value:function(n){return n.sign(this.hash()).toString("base64")}},{key:"addSignature",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(!o||typeof o!="string")throw new Error("Invalid signature");if(!n||typeof n!="string")throw new Error("Invalid publicKey");var a,i,s=Buffer.from(o,"base64");try{a=Qw.Keypair.fromPublicKey(n),i=a.signatureHint()}catch{throw new Error("Invalid publicKey")}if(!a.verify(this.hash(),s))throw new Error("Invalid signature");this.signatures.push(new ny.default.DecoratedSignature({hint:i,signature:s}))}},{key:"addDecoratedSignature",value:function(n){this.signatures.push(n)}},{key:"signHashX",value:function(n){if(typeof n=="string"&&(n=Buffer.from(n,"hex")),n.length>64)throw new Error("preimage cannnot be longer than 64 bytes");var o=n,a=(0,oy.hash)(n),i=a.slice(a.length-4);this.signatures.push(new ny.default.DecoratedSignature({hint:i,signature:o}))}},{key:"hash",value:function(){return(0,oy.hash)(this.signatureBase())}},{key:"signatureBase",value:function(){throw new Error("Implement in subclass")}},{key:"toEnvelope",value:function(){throw new Error("Implement in subclass")}},{key:"toXDR",value:function(){return this.toEnvelope().toXDR().toString("base64")}}])}()});var sy=Jt((ay,Cu)=>{(function(e){"use strict";var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,o=Math.ceil,a=Math.floor,i="[BigNumber Error] ",s=i+"Number primitive has more than 15 significant digits: ",f=1e14,u=14,r=9007199254740991,_=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,b=1e9;function T(F){var R,j,V,Y=K.prototype={constructor:K,toString:null,valueOf:null},me=new K(1),le=20,C=4,q=-7,X=21,ae=-1e7,I=1e7,S=!1,m=1,P=0,l={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},x="0123456789abcdefghijklmnopqrstuvwxyz",W=!0;function K($,de){var we,Qe,ze,We,et,Be,Re,$e,ve=this;if(!(ve instanceof K))return new K($,de);if(de==null){if($&&$._isBigNumber===!0){ve.s=$.s,!$.c||$.e>I?ve.c=ve.e=null:$.e<ae?ve.c=[ve.e=0]:(ve.e=$.e,ve.c=$.c.slice());return}if((Be=typeof $=="number")&&$*0==0){if(ve.s=1/$<0?($=-$,-1):1,$===~~$){for(We=0,et=$;et>=10;et/=10,We++);We>I?ve.c=ve.e=null:(ve.e=We,ve.c=[$]);return}$e=String($)}else{if(!n.test($e=String($)))return V(ve,$e,Be);ve.s=$e.charCodeAt(0)==45?($e=$e.slice(1),-1):1}(We=$e.indexOf("."))>-1&&($e=$e.replace(".","")),(et=$e.search(/e/i))>0?(We<0&&(We=et),We+=+$e.slice(et+1),$e=$e.substring(0,et)):We<0&&(We=$e.length)}else{if(A(de,2,x.length,"Base"),de==10&&W)return ve=new K($),Fe(ve,le+ve.e+1,C);if($e=String($),Be=typeof $=="number"){if($*0!=0)return V(ve,$e,Be,de);if(ve.s=1/$<0?($e=$e.slice(1),-1):1,K.DEBUG&&$e.replace(/^0\.0*|\./,"").length>15)throw Error(s+$)}else ve.s=$e.charCodeAt(0)===45?($e=$e.slice(1),-1):1;for(we=x.slice(0,de),We=et=0,Re=$e.length;et<Re;et++)if(we.indexOf(Qe=$e.charAt(et))<0){if(Qe=="."){if(et>We){We=Re;continue}}else if(!ze&&($e==$e.toUpperCase()&&($e=$e.toLowerCase())||$e==$e.toLowerCase()&&($e=$e.toUpperCase()))){ze=!0,et=-1,We=0;continue}return V(ve,String($),Be,de)}Be=!1,$e=j($e,de,10,ve.s),(We=$e.indexOf("."))>-1?$e=$e.replace(".",""):We=$e.length}for(et=0;$e.charCodeAt(et)===48;et++);for(Re=$e.length;$e.charCodeAt(--Re)===48;);if($e=$e.slice(et,++Re)){if(Re-=et,Be&&K.DEBUG&&Re>15&&($>r||$!==a($)))throw Error(s+ve.s*$);if((We=We-et-1)>I)ve.c=ve.e=null;else if(We<ae)ve.c=[ve.e=0];else{if(ve.e=We,ve.c=[],et=(We+1)%u,We<0&&(et+=u),et<Re){for(et&&ve.c.push(+$e.slice(0,et)),Re-=u;et<Re;)ve.c.push(+$e.slice(et,et+=u));et=u-($e=$e.slice(et)).length}else et-=Re;for(;et--;$e+="0");ve.c.push(+$e)}}else ve.c=[ve.e=0]}K.clone=T,K.ROUND_UP=0,K.ROUND_DOWN=1,K.ROUND_CEIL=2,K.ROUND_FLOOR=3,K.ROUND_HALF_UP=4,K.ROUND_HALF_DOWN=5,K.ROUND_HALF_EVEN=6,K.ROUND_HALF_CEIL=7,K.ROUND_HALF_FLOOR=8,K.EUCLID=9,K.config=K.set=function($){var de,we;if($!=null)if(typeof $=="object"){if($.hasOwnProperty(de="DECIMAL_PLACES")&&(we=$[de],A(we,0,b,de),le=we),$.hasOwnProperty(de="ROUNDING_MODE")&&(we=$[de],A(we,0,8,de),C=we),$.hasOwnProperty(de="EXPONENTIAL_AT")&&(we=$[de],we&&we.pop?(A(we[0],-b,0,de),A(we[1],0,b,de),q=we[0],X=we[1]):(A(we,-b,b,de),q=-(X=we<0?-we:we))),$.hasOwnProperty(de="RANGE"))if(we=$[de],we&&we.pop)A(we[0],-b,-1,de),A(we[1],1,b,de),ae=we[0],I=we[1];else if(A(we,-b,b,de),we)ae=-(I=we<0?-we:we);else throw Error(i+de+" cannot be zero: "+we);if($.hasOwnProperty(de="CRYPTO"))if(we=$[de],we===!!we)if(we)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))S=we;else throw S=!we,Error(i+"crypto unavailable");else S=we;else throw Error(i+de+" not true or false: "+we);if($.hasOwnProperty(de="MODULO_MODE")&&(we=$[de],A(we,0,9,de),m=we),$.hasOwnProperty(de="POW_PRECISION")&&(we=$[de],A(we,0,b,de),P=we),$.hasOwnProperty(de="FORMAT"))if(we=$[de],typeof we=="object")l=we;else throw Error(i+de+" not an object: "+we);if($.hasOwnProperty(de="ALPHABET"))if(we=$[de],typeof we=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(we))W=we.slice(0,10)=="0123456789",x=we;else throw Error(i+de+" invalid: "+we)}else throw Error(i+"Object expected: "+$);return{DECIMAL_PLACES:le,ROUNDING_MODE:C,EXPONENTIAL_AT:[q,X],RANGE:[ae,I],CRYPTO:S,MODULO_MODE:m,POW_PRECISION:P,FORMAT:l,ALPHABET:x}},K.isBigNumber=function($){if(!$||$._isBigNumber!==!0)return!1;if(!K.DEBUG)return!0;var de,we,Qe=$.c,ze=$.e,We=$.s;e:if({}.toString.call(Qe)=="[object Array]"){if((We===1||We===-1)&&ze>=-b&&ze<=b&&ze===a(ze)){if(Qe[0]===0){if(ze===0&&Qe.length===1)return!0;break e}if(de=(ze+1)%u,de<1&&(de+=u),String(Qe[0]).length==de){for(de=0;de<Qe.length;de++)if(we=Qe[de],we<0||we>=f||we!==a(we))break e;if(we!==0)return!0}}}else if(Qe===null&&ze===null&&(We===null||We===1||We===-1))return!0;throw Error(i+"Invalid BigNumber: "+$)},K.maximum=K.max=function(){return oe(arguments,-1)},K.minimum=K.min=function(){return oe(arguments,1)},K.random=function(){var $=9007199254740992,de=Math.random()*$&2097151?function(){return a(Math.random()*$)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(we){var Qe,ze,We,et,Be,Re=0,$e=[],ve=new K(me);if(we==null?we=le:A(we,0,b),et=o(we/u),S)if(crypto.getRandomValues){for(Qe=crypto.getRandomValues(new Uint32Array(et*=2));Re<et;)Be=Qe[Re]*131072+(Qe[Re+1]>>>11),Be>=9e15?(ze=crypto.getRandomValues(new Uint32Array(2)),Qe[Re]=ze[0],Qe[Re+1]=ze[1]):($e.push(Be%1e14),Re+=2);Re=et/2}else if(crypto.randomBytes){for(Qe=crypto.randomBytes(et*=7);Re<et;)Be=(Qe[Re]&31)*281474976710656+Qe[Re+1]*1099511627776+Qe[Re+2]*4294967296+Qe[Re+3]*16777216+(Qe[Re+4]<<16)+(Qe[Re+5]<<8)+Qe[Re+6],Be>=9e15?crypto.randomBytes(7).copy(Qe,Re):($e.push(Be%1e14),Re+=7);Re=et/7}else throw S=!1,Error(i+"crypto unavailable");if(!S)for(;Re<et;)Be=de(),Be<9e15&&($e[Re++]=Be%1e14);for(et=$e[--Re],we%=u,et&&we&&(Be=_[u-we],$e[Re]=a(et/Be)*Be);$e[Re]===0;$e.pop(),Re--);if(Re<0)$e=[We=0];else{for(We=-1;$e[0]===0;$e.splice(0,1),We-=u);for(Re=1,Be=$e[0];Be>=10;Be/=10,Re++);Re<u&&(We-=u-Re)}return ve.e=We,ve.c=$e,ve}}(),K.sum=function(){for(var $=1,de=arguments,we=new K(de[0]);$<de.length;)we=we.plus(de[$++]);return we},j=function(){var $="0123456789";function de(we,Qe,ze,We){for(var et,Be=[0],Re,$e=0,ve=we.length;$e<ve;){for(Re=Be.length;Re--;Be[Re]*=Qe);for(Be[0]+=We.indexOf(we.charAt($e++)),et=0;et<Be.length;et++)Be[et]>ze-1&&(Be[et+1]==null&&(Be[et+1]=0),Be[et+1]+=Be[et]/ze|0,Be[et]%=ze)}return Be.reverse()}return function(we,Qe,ze,We,et){var Be,Re,$e,ve,ue,c,y,v,B=we.indexOf("."),O=le,h=C;for(B>=0&&(ve=P,P=0,we=we.replace(".",""),v=new K(Qe),c=v.pow(we.length-B),P=ve,v.c=de(N(g(c.c),c.e,"0"),10,ze,$),v.e=v.c.length),y=de(we,Qe,ze,et?(Be=x,$):(Be=$,x)),$e=ve=y.length;y[--ve]==0;y.pop());if(!y[0])return Be.charAt(0);if(B<0?--$e:(c.c=y,c.e=$e,c.s=We,c=R(c,v,O,h,ze),y=c.c,ue=c.r,$e=c.e),Re=$e+O+1,B=y[Re],ve=ze/2,ue=ue||Re<0||y[Re+1]!=null,ue=h<4?(B!=null||ue)&&(h==0||h==(c.s<0?3:2)):B>ve||B==ve&&(h==4||ue||h==6&&y[Re-1]&1||h==(c.s<0?8:7)),Re<1||!y[0])we=ue?N(Be.charAt(1),-O,Be.charAt(0)):Be.charAt(0);else{if(y.length=Re,ue)for(--ze;++y[--Re]>ze;)y[Re]=0,Re||(++$e,y=[1].concat(y));for(ve=y.length;!y[--ve];);for(B=0,we="";B<=ve;we+=Be.charAt(y[B++]));we=N(we,$e,Be.charAt(0))}return we}}(),R=function(){function $(Qe,ze,We){var et,Be,Re,$e,ve=0,ue=Qe.length,c=ze%d,y=ze/d|0;for(Qe=Qe.slice();ue--;)Re=Qe[ue]%d,$e=Qe[ue]/d|0,et=y*Re+$e*c,Be=c*Re+et%d*d+ve,ve=(Be/We|0)+(et/d|0)+y*$e,Qe[ue]=Be%We;return ve&&(Qe=[ve].concat(Qe)),Qe}function de(Qe,ze,We,et){var Be,Re;if(We!=et)Re=We>et?1:-1;else for(Be=Re=0;Be<We;Be++)if(Qe[Be]!=ze[Be]){Re=Qe[Be]>ze[Be]?1:-1;break}return Re}function we(Qe,ze,We,et){for(var Be=0;We--;)Qe[We]-=Be,Be=Qe[We]<ze[We]?1:0,Qe[We]=Be*et+Qe[We]-ze[We];for(;!Qe[0]&&Qe.length>1;Qe.splice(0,1));}return function(Qe,ze,We,et,Be){var Re,$e,ve,ue,c,y,v,B,O,h,k,U,M,J,pe,Ne,tt,bt=Qe.s==ze.s?1:-1,Ot=Qe.c,Ft=ze.c;if(!Ot||!Ot[0]||!Ft||!Ft[0])return new K(!Qe.s||!ze.s||(Ot?Ft&&Ot[0]==Ft[0]:!Ft)?NaN:Ot&&Ot[0]==0||!Ft?bt*0:bt/0);for(B=new K(bt),O=B.c=[],$e=Qe.e-ze.e,bt=We+$e+1,Be||(Be=f,$e=w(Qe.e/u)-w(ze.e/u),bt=bt/u|0),ve=0;Ft[ve]==(Ot[ve]||0);ve++);if(Ft[ve]>(Ot[ve]||0)&&$e--,bt<0)O.push(1),ue=!0;else{for(J=Ot.length,Ne=Ft.length,ve=0,bt+=2,c=a(Be/(Ft[0]+1)),c>1&&(Ft=$(Ft,c,Be),Ot=$(Ot,c,Be),Ne=Ft.length,J=Ot.length),M=Ne,h=Ot.slice(0,Ne),k=h.length;k<Ne;h[k++]=0);tt=Ft.slice(),tt=[0].concat(tt),pe=Ft[0],Ft[1]>=Be/2&&pe++;do{if(c=0,Re=de(Ft,h,Ne,k),Re<0){if(U=h[0],Ne!=k&&(U=U*Be+(h[1]||0)),c=a(U/pe),c>1)for(c>=Be&&(c=Be-1),y=$(Ft,c,Be),v=y.length,k=h.length;de(y,h,v,k)==1;)c--,we(y,Ne<v?tt:Ft,v,Be),v=y.length,Re=1;else c==0&&(Re=c=1),y=Ft.slice(),v=y.length;if(v<k&&(y=[0].concat(y)),we(h,y,k,Be),k=h.length,Re==-1)for(;de(Ft,h,Ne,k)<1;)c++,we(h,Ne<k?tt:Ft,k,Be),k=h.length}else Re===0&&(c++,h=[0]);O[ve++]=c,h[0]?h[k++]=Ot[M]||0:(h=[Ot[M]],k=1)}while((M++<J||h[0]!=null)&&bt--);ue=h[0]!=null,O[0]||O.splice(0,1)}if(Be==f){for(ve=1,bt=O[0];bt>=10;bt/=10,ve++);Fe(B,We+(B.e=ve+$e*u-1)+1,et,ue)}else B.e=$e,B.r=+ue;return B}}();function re($,de,we,Qe){var ze,We,et,Be,Re;if(we==null?we=C:A(we,0,8),!$.c)return $.toString();if(ze=$.c[0],et=$.e,de==null)Re=g($.c),Re=Qe==1||Qe==2&&(et<=q||et>=X)?E(Re,et):N(Re,et,"0");else if($=Fe(new K($),de,we),We=$.e,Re=g($.c),Be=Re.length,Qe==1||Qe==2&&(de<=We||We<=q)){for(;Be<de;Re+="0",Be++);Re=E(Re,We)}else if(de-=et,Re=N(Re,We,"0"),We+1>Be){if(--de>0)for(Re+=".";de--;Re+="0");}else if(de+=We-Be,de>0)for(We+1==Be&&(Re+=".");de--;Re+="0");return $.s<0&&ze?"-"+Re:Re}function oe($,de){for(var we,Qe,ze=1,We=new K($[0]);ze<$.length;ze++)Qe=new K($[ze]),(!Qe.s||(we=p(We,Qe))===de||we===0&&We.s===de)&&(We=Qe);return We}function Ee($,de,we){for(var Qe=1,ze=de.length;!de[--ze];de.pop());for(ze=de[0];ze>=10;ze/=10,Qe++);return(we=Qe+we*u-1)>I?$.c=$.e=null:we<ae?$.c=[$.e=0]:($.e=we,$.c=de),$}V=function(){var $=/^(-?)0([xbo])(?=\w[\w.]*$)/i,de=/^([^.]+)\.$/,we=/^\.([^.]+)$/,Qe=/^-?(Infinity|NaN)$/,ze=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(We,et,Be,Re){var $e,ve=Be?et:et.replace(ze,"");if(Qe.test(ve))We.s=isNaN(ve)?null:ve<0?-1:1;else{if(!Be&&(ve=ve.replace($,function(ue,c,y){return $e=(y=y.toLowerCase())=="x"?16:y=="b"?2:8,!Re||Re==$e?c:ue}),Re&&($e=Re,ve=ve.replace(de,"$1").replace(we,"0.$1")),et!=ve))return new K(ve,$e);if(K.DEBUG)throw Error(i+"Not a"+(Re?" base "+Re:"")+" number: "+et);We.s=null}We.c=We.e=null}}();function Fe($,de,we,Qe){var ze,We,et,Be,Re,$e,ve,ue=$.c,c=_;if(ue){e:{for(ze=1,Be=ue[0];Be>=10;Be/=10,ze++);if(We=de-ze,We<0)We+=u,et=de,Re=ue[$e=0],ve=a(Re/c[ze-et-1]%10);else if($e=o((We+1)/u),$e>=ue.length)if(Qe){for(;ue.length<=$e;ue.push(0));Re=ve=0,ze=1,We%=u,et=We-u+1}else break e;else{for(Re=Be=ue[$e],ze=1;Be>=10;Be/=10,ze++);We%=u,et=We-u+ze,ve=et<0?0:a(Re/c[ze-et-1]%10)}if(Qe=Qe||de<0||ue[$e+1]!=null||(et<0?Re:Re%c[ze-et-1]),Qe=we<4?(ve||Qe)&&(we==0||we==($.s<0?3:2)):ve>5||ve==5&&(we==4||Qe||we==6&&(We>0?et>0?Re/c[ze-et]:0:ue[$e-1])%10&1||we==($.s<0?8:7)),de<1||!ue[0])return ue.length=0,Qe?(de-=$.e+1,ue[0]=c[(u-de%u)%u],$.e=-de||0):ue[0]=$.e=0,$;if(We==0?(ue.length=$e,Be=1,$e--):(ue.length=$e+1,Be=c[u-We],ue[$e]=et>0?a(Re/c[ze-et]%c[et])*Be:0),Qe)for(;;)if($e==0){for(We=1,et=ue[0];et>=10;et/=10,We++);for(et=ue[0]+=Be,Be=1;et>=10;et/=10,Be++);We!=Be&&($.e++,ue[0]==f&&(ue[0]=1));break}else{if(ue[$e]+=Be,ue[$e]!=f)break;ue[$e--]=0,Be=1}for(We=ue.length;ue[--We]===0;ue.pop());}$.e>I?$.c=$.e=null:$.e<ae&&($.c=[$.e=0])}return $}function Oe($){var de,we=$.e;return we===null?$.toString():(de=g($.c),de=we<=q||we>=X?E(de,we):N(de,we,"0"),$.s<0?"-"+de:de)}return Y.absoluteValue=Y.abs=function(){var $=new K(this);return $.s<0&&($.s=1),$},Y.comparedTo=function($,de){return p(this,new K($,de))},Y.decimalPlaces=Y.dp=function($,de){var we,Qe,ze,We=this;if($!=null)return A($,0,b),de==null?de=C:A(de,0,8),Fe(new K(We),$+We.e+1,de);if(!(we=We.c))return null;if(Qe=((ze=we.length-1)-w(this.e/u))*u,ze=we[ze])for(;ze%10==0;ze/=10,Qe--);return Qe<0&&(Qe=0),Qe},Y.dividedBy=Y.div=function($,de){return R(this,new K($,de),le,C)},Y.dividedToIntegerBy=Y.idiv=function($,de){return R(this,new K($,de),0,1)},Y.exponentiatedBy=Y.pow=function($,de){var we,Qe,ze,We,et,Be,Re,$e,ve,ue=this;if($=new K($),$.c&&!$.isInteger())throw Error(i+"Exponent not an integer: "+Oe($));if(de!=null&&(de=new K(de)),Be=$.e>14,!ue.c||!ue.c[0]||ue.c[0]==1&&!ue.e&&ue.c.length==1||!$.c||!$.c[0])return ve=new K(Math.pow(+Oe(ue),Be?$.s*(2-L($)):+Oe($))),de?ve.mod(de):ve;if(Re=$.s<0,de){if(de.c?!de.c[0]:!de.s)return new K(NaN);Qe=!Re&&ue.isInteger()&&de.isInteger(),Qe&&(ue=ue.mod(de))}else{if($.e>9&&(ue.e>0||ue.e<-1||(ue.e==0?ue.c[0]>1||Be&&ue.c[1]>=24e7:ue.c[0]<8e13||Be&&ue.c[0]<=9999975e7)))return We=ue.s<0&&L($)?-0:0,ue.e>-1&&(We=1/We),new K(Re?1/We:We);P&&(We=o(P/u+2))}for(Be?(we=new K(.5),Re&&($.s=1),$e=L($)):(ze=Math.abs(+Oe($)),$e=ze%2),ve=new K(me);;){if($e){if(ve=ve.times(ue),!ve.c)break;We?ve.c.length>We&&(ve.c.length=We):Qe&&(ve=ve.mod(de))}if(ze){if(ze=a(ze/2),ze===0)break;$e=ze%2}else if($=$.times(we),Fe($,$.e+1,1),$.e>14)$e=L($);else{if(ze=+Oe($),ze===0)break;$e=ze%2}ue=ue.times(ue),We?ue.c&&ue.c.length>We&&(ue.c.length=We):Qe&&(ue=ue.mod(de))}return Qe?ve:(Re&&(ve=me.div(ve)),de?ve.mod(de):We?Fe(ve,P,C,et):ve)},Y.integerValue=function($){var de=new K(this);return $==null?$=C:A($,0,8),Fe(de,de.e+1,$)},Y.isEqualTo=Y.eq=function($,de){return p(this,new K($,de))===0},Y.isFinite=function(){return!!this.c},Y.isGreaterThan=Y.gt=function($,de){return p(this,new K($,de))>0},Y.isGreaterThanOrEqualTo=Y.gte=function($,de){return(de=p(this,new K($,de)))===1||de===0},Y.isInteger=function(){return!!this.c&&w(this.e/u)>this.c.length-2},Y.isLessThan=Y.lt=function($,de){return p(this,new K($,de))<0},Y.isLessThanOrEqualTo=Y.lte=function($,de){return(de=p(this,new K($,de)))===-1||de===0},Y.isNaN=function(){return!this.s},Y.isNegative=function(){return this.s<0},Y.isPositive=function(){return this.s>0},Y.isZero=function(){return!!this.c&&this.c[0]==0},Y.minus=function($,de){var we,Qe,ze,We,et=this,Be=et.s;if($=new K($,de),de=$.s,!Be||!de)return new K(NaN);if(Be!=de)return $.s=-de,et.plus($);var Re=et.e/u,$e=$.e/u,ve=et.c,ue=$.c;if(!Re||!$e){if(!ve||!ue)return ve?($.s=-de,$):new K(ue?et:NaN);if(!ve[0]||!ue[0])return ue[0]?($.s=-de,$):new K(ve[0]?et:C==3?-0:0)}if(Re=w(Re),$e=w($e),ve=ve.slice(),Be=Re-$e){for((We=Be<0)?(Be=-Be,ze=ve):($e=Re,ze=ue),ze.reverse(),de=Be;de--;ze.push(0));ze.reverse()}else for(Qe=(We=(Be=ve.length)<(de=ue.length))?Be:de,Be=de=0;de<Qe;de++)if(ve[de]!=ue[de]){We=ve[de]<ue[de];break}if(We&&(ze=ve,ve=ue,ue=ze,$.s=-$.s),de=(Qe=ue.length)-(we=ve.length),de>0)for(;de--;ve[we++]=0);for(de=f-1;Qe>Be;){if(ve[--Qe]<ue[Qe]){for(we=Qe;we&&!ve[--we];ve[we]=de);--ve[we],ve[Qe]+=f}ve[Qe]-=ue[Qe]}for(;ve[0]==0;ve.splice(0,1),--$e);return ve[0]?Ee($,ve,$e):($.s=C==3?-1:1,$.c=[$.e=0],$)},Y.modulo=Y.mod=function($,de){var we,Qe,ze=this;return $=new K($,de),!ze.c||!$.s||$.c&&!$.c[0]?new K(NaN):!$.c||ze.c&&!ze.c[0]?new K(ze):(m==9?(Qe=$.s,$.s=1,we=R(ze,$,0,3),$.s=Qe,we.s*=Qe):we=R(ze,$,0,m),$=ze.minus(we.times($)),!$.c[0]&&m==1&&($.s=ze.s),$)},Y.multipliedBy=Y.times=function($,de){var we,Qe,ze,We,et,Be,Re,$e,ve,ue,c,y,v,B,O,h=this,k=h.c,U=($=new K($,de)).c;if(!k||!U||!k[0]||!U[0])return!h.s||!$.s||k&&!k[0]&&!U||U&&!U[0]&&!k?$.c=$.e=$.s=null:($.s*=h.s,!k||!U?$.c=$.e=null:($.c=[0],$.e=0)),$;for(Qe=w(h.e/u)+w($.e/u),$.s*=h.s,Re=k.length,ue=U.length,Re<ue&&(v=k,k=U,U=v,ze=Re,Re=ue,ue=ze),ze=Re+ue,v=[];ze--;v.push(0));for(B=f,O=d,ze=ue;--ze>=0;){for(we=0,c=U[ze]%O,y=U[ze]/O|0,et=Re,We=ze+et;We>ze;)$e=k[--et]%O,ve=k[et]/O|0,Be=y*$e+ve*c,$e=c*$e+Be%O*O+v[We]+we,we=($e/B|0)+(Be/O|0)+y*ve,v[We--]=$e%B;v[We]=we}return we?++Qe:v.splice(0,1),Ee($,v,Qe)},Y.negated=function(){var $=new K(this);return $.s=-$.s||null,$},Y.plus=function($,de){var we,Qe=this,ze=Qe.s;if($=new K($,de),de=$.s,!ze||!de)return new K(NaN);if(ze!=de)return $.s=-de,Qe.minus($);var We=Qe.e/u,et=$.e/u,Be=Qe.c,Re=$.c;if(!We||!et){if(!Be||!Re)return new K(ze/0);if(!Be[0]||!Re[0])return Re[0]?$:new K(Be[0]?Qe:ze*0)}if(We=w(We),et=w(et),Be=Be.slice(),ze=We-et){for(ze>0?(et=We,we=Re):(ze=-ze,we=Be),we.reverse();ze--;we.push(0));we.reverse()}for(ze=Be.length,de=Re.length,ze-de<0&&(we=Re,Re=Be,Be=we,de=ze),ze=0;de;)ze=(Be[--de]=Be[de]+Re[de]+ze)/f|0,Be[de]=f===Be[de]?0:Be[de]%f;return ze&&(Be=[ze].concat(Be),++et),Ee($,Be,et)},Y.precision=Y.sd=function($,de){var we,Qe,ze,We=this;if($!=null&&$!==!!$)return A($,1,b),de==null?de=C:A(de,0,8),Fe(new K(We),$,de);if(!(we=We.c))return null;if(ze=we.length-1,Qe=ze*u+1,ze=we[ze]){for(;ze%10==0;ze/=10,Qe--);for(ze=we[0];ze>=10;ze/=10,Qe++);}return $&&We.e+1>Qe&&(Qe=We.e+1),Qe},Y.shiftedBy=function($){return A($,-r,r),this.times("1e"+$)},Y.squareRoot=Y.sqrt=function(){var $,de,we,Qe,ze,We=this,et=We.c,Be=We.s,Re=We.e,$e=le+4,ve=new K("0.5");if(Be!==1||!et||!et[0])return new K(!Be||Be<0&&(!et||et[0])?NaN:et?We:1/0);if(Be=Math.sqrt(+Oe(We)),Be==0||Be==1/0?(de=g(et),(de.length+Re)%2==0&&(de+="0"),Be=Math.sqrt(+de),Re=w((Re+1)/2)-(Re<0||Re%2),Be==1/0?de="5e"+Re:(de=Be.toExponential(),de=de.slice(0,de.indexOf("e")+1)+Re),we=new K(de)):we=new K(Be+""),we.c[0]){for(Re=we.e,Be=Re+$e,Be<3&&(Be=0);;)if(ze=we,we=ve.times(ze.plus(R(We,ze,$e,1))),g(ze.c).slice(0,Be)===(de=g(we.c)).slice(0,Be))if(we.e<Re&&--Be,de=de.slice(Be-3,Be+1),de=="9999"||!Qe&&de=="4999"){if(!Qe&&(Fe(ze,ze.e+le+2,0),ze.times(ze).eq(We))){we=ze;break}$e+=4,Be+=4,Qe=1}else{(!+de||!+de.slice(1)&&de.charAt(0)=="5")&&(Fe(we,we.e+le+2,1),$=!we.times(we).eq(We));break}}return Fe(we,we.e+le+1,C,$)},Y.toExponential=function($,de){return $!=null&&(A($,0,b),$++),re(this,$,de,1)},Y.toFixed=function($,de){return $!=null&&(A($,0,b),$=$+this.e+1),re(this,$,de)},Y.toFormat=function($,de,we){var Qe,ze=this;if(we==null)$!=null&&de&&typeof de=="object"?(we=de,de=null):$&&typeof $=="object"?(we=$,$=de=null):we=l;else if(typeof we!="object")throw Error(i+"Argument not an object: "+we);if(Qe=ze.toFixed($,de),ze.c){var We,et=Qe.split("."),Be=+we.groupSize,Re=+we.secondaryGroupSize,$e=we.groupSeparator||"",ve=et[0],ue=et[1],c=ze.s<0,y=c?ve.slice(1):ve,v=y.length;if(Re&&(We=Be,Be=Re,Re=We,v-=We),Be>0&&v>0){for(We=v%Be||Be,ve=y.substr(0,We);We<v;We+=Be)ve+=$e+y.substr(We,Be);Re>0&&(ve+=$e+y.slice(We)),c&&(ve="-"+ve)}Qe=ue?ve+(we.decimalSeparator||"")+((Re=+we.fractionGroupSize)?ue.replace(new RegExp("\\d{"+Re+"}\\B","g"),"$&"+(we.fractionGroupSeparator||"")):ue):ve}return(we.prefix||"")+Qe+(we.suffix||"")},Y.toFraction=function($){var de,we,Qe,ze,We,et,Be,Re,$e,ve,ue,c,y=this,v=y.c;if($!=null&&(Be=new K($),!Be.isInteger()&&(Be.c||Be.s!==1)||Be.lt(me)))throw Error(i+"Argument "+(Be.isInteger()?"out of range: ":"not an integer: ")+Oe(Be));if(!v)return new K(y);for(de=new K(me),$e=we=new K(me),Qe=Re=new K(me),c=g(v),We=de.e=c.length-y.e-1,de.c[0]=_[(et=We%u)<0?u+et:et],$=!$||Be.comparedTo(de)>0?We>0?de:$e:Be,et=I,I=1/0,Be=new K(c),Re.c[0]=0;ve=R(Be,de,0,1),ze=we.plus(ve.times(Qe)),ze.comparedTo($)!=1;)we=Qe,Qe=ze,$e=Re.plus(ve.times(ze=$e)),Re=ze,de=Be.minus(ve.times(ze=de)),Be=ze;return ze=R($.minus(we),Qe,0,1),Re=Re.plus(ze.times($e)),we=we.plus(ze.times(Qe)),Re.s=$e.s=y.s,We=We*2,ue=R($e,Qe,We,C).minus(y).abs().comparedTo(R(Re,we,We,C).minus(y).abs())<1?[$e,Qe]:[Re,we],I=et,ue},Y.toNumber=function(){return+Oe(this)},Y.toPrecision=function($,de){return $!=null&&A($,1,b),re(this,$,de,2)},Y.toString=function($){var de,we=this,Qe=we.s,ze=we.e;return ze===null?Qe?(de="Infinity",Qe<0&&(de="-"+de)):de="NaN":($==null?de=ze<=q||ze>=X?E(g(we.c),ze):N(g(we.c),ze,"0"):$===10&&W?(we=Fe(new K(we),le+ze+1,C),de=N(g(we.c),we.e,"0")):(A($,2,x.length,"Base"),de=j(N(g(we.c),ze,"0"),10,$,Qe,!0)),Qe<0&&we.c[0]&&(de="-"+de)),de},Y.valueOf=Y.toJSON=function(){return Oe(this)},Y._isBigNumber=!0,F!=null&&K.set(F),K}function w(F){var R=F|0;return F>0||F===R?R:R-1}function g(F){for(var R,j,V=1,Y=F.length,me=F[0]+"";V<Y;){for(R=F[V++]+"",j=u-R.length;j--;R="0"+R);me+=R}for(Y=me.length;me.charCodeAt(--Y)===48;);return me.slice(0,Y+1||1)}function p(F,R){var j,V,Y=F.c,me=R.c,le=F.s,C=R.s,q=F.e,X=R.e;if(!le||!C)return null;if(j=Y&&!Y[0],V=me&&!me[0],j||V)return j?V?0:-C:le;if(le!=C)return le;if(j=le<0,V=q==X,!Y||!me)return V?0:!Y^j?1:-1;if(!V)return q>X^j?1:-1;for(C=(q=Y.length)<(X=me.length)?q:X,le=0;le<C;le++)if(Y[le]!=me[le])return Y[le]>me[le]^j?1:-1;return q==X?0:q>X^j?1:-1}function A(F,R,j,V){if(F<R||F>j||F!==a(F))throw Error(i+(V||"Argument")+(typeof F=="number"?F<R||F>j?" out of range: ":" not an integer: ":" not a primitive number: ")+String(F))}function L(F){var R=F.c.length-1;return w(F.e/u)==R&&F.c[R]%2!=0}function E(F,R){return(F.length>1?F.charAt(0)+"."+F.slice(1):F)+(R<0?"e":"e+")+R}function N(F,R,j){var V,Y;if(R<0){for(Y=j+".";++R;Y+=j);F=Y+F}else if(V=F.length,++R>V){for(Y=j,R-=V;--R;Y+=j);F+=Y}else R<V&&(F=F.slice(0,R)+"."+F.slice(R));return F}t=T(),t.default=t.BigNumber=t,typeof define=="function"&&define.amd?define(function(){return t}):typeof Cu<"u"&&Cu.exports?Cu.exports=t:(e||(e=typeof self<"u"&&self?self:window),e.BigNumber=t)})(ay)});var pi=Jt(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});Bu.default=void 0;var r1=n1(sy());function n1(e){return e&&e.__esModule?e:{default:e}}var uy=r1.default.clone();uy.DEBUG=!0;var h3=Bu.default=uy});var ly=Jt(Jl=>{"use strict";Object.defineProperty(Jl,"__esModule",{value:!0});Jl.best_r=l1;var Ni=o1(pi());function o1(e){return e&&e.__esModule?e:{default:e}}function i1(e,t){return c1(e)||u1(e,t)||s1(e,t)||a1()}function a1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s1(e,t){if(e){if(typeof e=="string")return cy(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cy(e,t):void 0}}function cy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function u1(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o,a,i,s,f=[],u=!0,r=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=i.call(n)).done)&&(f.push(o.value),f.length!==t);u=!0);}catch(_){r=!0,a=_}finally{try{if(!u&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(r)throw a}}return f}}function c1(e){if(Array.isArray(e))return e}var Yl=(1<<31>>>0)-1;function l1(e){for(var t=new Ni.default(e),n,o,a=[[new Ni.default(0),new Ni.default(1)],[new Ni.default(1),new Ni.default(0)]],i=2;!t.gt(Yl);){n=t.integerValue(Ni.default.ROUND_FLOOR),o=t.minus(n);var s=n.times(a[i-1][0]).plus(a[i-2][0]),f=n.times(a[i-1][1]).plus(a[i-2][1]);if(s.gt(Yl)||f.gt(Yl)||(a.push([s,f]),o.eq(0)))break;t=new Ni.default(1).div(o),i+=1}var u=i1(a[a.length-1],2),r=u[0],_=u[1];if(r.isZero()||_.isZero())throw new Error("Couldn't find approximation");return[r.toNumber(),_.toNumber()]}});var Nu=Jt(Lu=>{"use strict";Object.defineProperty(Lu,"__esModule",{value:!0});Lu.LiquidityPoolAsset=void 0;var ju=f1(Rr()),hs=Mo(),fy=Ql();function f1(e){return e&&e.__esModule?e:{default:e}}function ds(e){"@babel/helpers - typeof";return ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ds(e)}function py(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,o)}return n}function hy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?py(Object(n),!0).forEach(function(o){p1(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):py(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function p1(e,t,n){return(t=yy(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dy(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,yy(o.key),o)}}function d1(e,t,n){return t&&dy(e.prototype,t),n&&dy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function yy(e){var t=y1(e,"string");return ds(t)=="symbol"?t:t+""}function y1(e,t){if(ds(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(ds(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var m3=Lu.LiquidityPoolAsset=function(){function e(t,n,o){if(h1(this,e),!t||!(t instanceof hs.Asset))throw new Error("assetA is invalid");if(!n||!(n instanceof hs.Asset))throw new Error("assetB is invalid");if(hs.Asset.compare(t,n)!==-1)throw new Error("Assets are not in lexicographic order");if(!o||o!==fy.LiquidityPoolFeeV18)throw new Error("fee is invalid");this.assetA=t,this.assetB=n,this.fee=o}return d1(e,[{key:"toXDRObject",value:function(){var n=new ju.default.LiquidityPoolConstantProductParameters({assetA:this.assetA.toXDRObject(),assetB:this.assetB.toXDRObject(),fee:this.fee}),o=new ju.default.LiquidityPoolParameters("liquidityPoolConstantProduct",n);return new ju.default.ChangeTrustAsset("assetTypePoolShare",o)}},{key:"getLiquidityPoolParameters",value:function(){return hy(hy({},this),{},{assetA:this.assetA,assetB:this.assetB,fee:this.fee})}},{key:"getAssetType",value:function(){return"liquidity_pool_shares"}},{key:"equals",value:function(n){return this.assetA.equals(n.assetA)&&this.assetB.equals(n.assetB)&&this.fee===n.fee}},{key:"toString",value:function(){var n=(0,fy.getLiquidityPoolId)("constant_product",this.getLiquidityPoolParameters()).toString("hex");return"liquidity_pool:".concat(n)}}],[{key:"fromOperation",value:function(n){var o=n.switch();if(o===ju.default.AssetType.assetTypePoolShare()){var a=n.liquidityPool().constantProduct();return new this(hs.Asset.fromOperation(a.assetA()),hs.Asset.fromOperation(a.assetB()),a.fee())}throw new Error("Invalid asset type: ".concat(o.name))}}])}()});var Zl=Jt(Uu=>{"use strict";Object.defineProperty(Uu,"__esModule",{value:!0});Uu.Claimant=void 0;var Dn=g1(Rr()),m1=ho(),my=_n();function g1(e){return e&&e.__esModule?e:{default:e}}function ys(e){"@babel/helpers - typeof";return ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ys(e)}function v1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gy(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,w1(o.key),o)}}function b1(e,t,n){return t&&gy(e.prototype,t),n&&gy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function w1(e){var t=S1(e,"string");return ys(t)=="symbol"?t:t+""}function S1(e,t){if(ys(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(ys(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var v3=Uu.Claimant=function(){function e(t,n){if(v1(this,e),t&&!my.StrKey.isValidEd25519PublicKey(t))throw new Error("Destination is invalid");if(this._destination=t,!n)this._predicate=Dn.default.ClaimPredicate.claimPredicateUnconditional();else if(n instanceof Dn.default.ClaimPredicate)this._predicate=n;else throw new Error("Predicate should be an xdr.ClaimPredicate")}return b1(e,[{key:"toXDRObject",value:function(){var n=new Dn.default.ClaimantV0({destination:m1.Keypair.fromPublicKey(this._destination).xdrAccountId(),predicate:this._predicate});return Dn.default.Claimant.claimantTypeV0(n)}},{key:"destination",get:function(){return this._destination},set:function(n){throw new Error("Claimant is immutable")}},{key:"predicate",get:function(){return this._predicate},set:function(n){throw new Error("Claimant is immutable")}}],[{key:"predicateUnconditional",value:function(){return Dn.default.ClaimPredicate.claimPredicateUnconditional()}},{key:"predicateAnd",value:function(n,o){if(!(n instanceof Dn.default.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(o instanceof Dn.default.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return Dn.default.ClaimPredicate.claimPredicateAnd([n,o])}},{key:"predicateOr",value:function(n,o){if(!(n instanceof Dn.default.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(o instanceof Dn.default.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return Dn.default.ClaimPredicate.claimPredicateOr([n,o])}},{key:"predicateNot",value:function(n){if(!(n instanceof Dn.default.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return Dn.default.ClaimPredicate.claimPredicateNot(n)}},{key:"predicateBeforeAbsoluteTime",value:function(n){return Dn.default.ClaimPredicate.claimPredicateBeforeAbsoluteTime(Dn.default.Int64.fromString(n))}},{key:"predicateBeforeRelativeTime",value:function(n){return Dn.default.ClaimPredicate.claimPredicateBeforeRelativeTime(Dn.default.Int64.fromString(n))}},{key:"fromXDR",value:function(n){var o;switch(n.switch()){case Dn.default.ClaimantType.claimantTypeV0():return o=n.v0(),new this(my.StrKey.encodeEd25519PublicKey(o.destination().ed25519()),o.predicate());default:throw new Error("Invalid claimant type: ".concat(n.switch().name))}}}])}()});var Fu=Jt(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.LiquidityPoolId=void 0;var ef=A1(Rr());function A1(e){return e&&e.__esModule?e:{default:e}}function ms(e){"@babel/helpers - typeof";return ms=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ms(e)}function _1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vy(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,T1(o.key),o)}}function E1(e,t,n){return t&&vy(e.prototype,t),n&&vy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function T1(e){var t=k1(e,"string");return ms(t)=="symbol"?t:t+""}function k1(e,t){if(ms(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(ms(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var w3=Mu.LiquidityPoolId=function(){function e(t){if(_1(this,e),!t)throw new Error("liquidityPoolId cannot be empty");if(!/^[a-f0-9]{64}$/.test(t))throw new Error("Liquidity pool ID is not a valid hash");this.liquidityPoolId=t}return E1(e,[{key:"toXDRObject",value:function(){var n=ef.default.PoolId.fromXDR(this.liquidityPoolId,"hex");return new ef.default.TrustLineAsset("assetTypePoolShare",n)}},{key:"getLiquidityPoolId",value:function(){return String(this.liquidityPoolId)}},{key:"getAssetType",value:function(){return"liquidity_pool_shares"}},{key:"equals",value:function(n){return this.liquidityPoolId===n.getLiquidityPoolId()}},{key:"toString",value:function(){return"liquidity_pool:".concat(this.liquidityPoolId)}}],[{key:"fromOperation",value:function(n){var o=n.switch();if(o===ef.default.AssetType.assetTypePoolShare()){var a=n.liquidityPoolId().toString("hex");return new this(a)}throw new Error("Invalid asset type: ".concat(o.name))}}])}()});var by=Jt(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.manageSellOffer=x1;var O1=$n(),tf=P1(Rr());function P1(e){return e&&e.__esModule?e:{default:e}}function x1(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.amount,!0))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),e.price===void 0)throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price),e.offerId!==void 0?e.offerId=e.offerId.toString():e.offerId="0",t.offerId=O1.Hyper.fromString(e.offerId);var n=new tf.default.ManageSellOfferOp(t),o={};return o.body=tf.default.OperationBody.manageSellOffer(n),this.setSourceAccount(o,e),new tf.default.Operation(o)}});var wy=Jt(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.createPassiveSellOffer=I1;var nf=R1(Rr());function R1(e){return e&&e.__esModule?e:{default:e}}function I1(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),e.price===void 0)throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price);var n=new nf.default.CreatePassiveSellOfferOp(t),o={};return o.body=nf.default.OperationBody.createPassiveSellOffer(n),this.setSourceAccount(o,e),new nf.default.Operation(o)}});var bo=Jt(fa=>{"use strict";Object.defineProperty(fa,"__esModule",{value:!0});fa.decodeAddressToMuxedAccount=Sy;fa.encodeMuxedAccount=B1;fa.encodeMuxedAccountToAddress=Ay;fa.extractBaseAddress=j1;var Yo=C1(Rr()),Fo=_n();function C1(e){return e&&e.__esModule?e:{default:e}}function Sy(e){return Fo.StrKey.isValidMed25519PublicKey(e)?L1(e):Yo.default.MuxedAccount.keyTypeEd25519(Fo.StrKey.decodeEd25519PublicKey(e))}function Ay(e){return e.switch().value===Yo.default.CryptoKeyType.keyTypeMuxedEd25519().value?N1(e):Fo.StrKey.encodeEd25519PublicKey(e.ed25519())}function B1(e,t){if(!Fo.StrKey.isValidEd25519PublicKey(e))throw new Error("address should be a Stellar account ID (G...)");if(typeof t!="string")throw new Error("id should be a string representing a number (uint64)");return Yo.default.MuxedAccount.keyTypeMuxedEd25519(new Yo.default.MuxedAccountMed25519({id:Yo.default.Uint64.fromString(t),ed25519:Fo.StrKey.decodeEd25519PublicKey(e)}))}function j1(e){if(Fo.StrKey.isValidEd25519PublicKey(e))return e;if(!Fo.StrKey.isValidMed25519PublicKey(e))throw new TypeError("expected muxed account (M...), got ".concat(e));var t=Sy(e);return Fo.StrKey.encodeEd25519PublicKey(t.med25519().ed25519())}function L1(e){var t=Fo.StrKey.decodeMed25519PublicKey(e);return Yo.default.MuxedAccount.keyTypeMuxedEd25519(new Yo.default.MuxedAccountMed25519({id:Yo.default.Uint64.fromXDR(t.subarray(-8)),ed25519:t.subarray(0,-8)}))}function N1(e){if(e.switch()===Yo.default.CryptoKeyType.keyTypeEd25519())return Ay(e);var t=e.med25519();return Fo.StrKey.encodeMed25519PublicKey(Buffer.concat([t.ed25519(),t.id().toXDR("raw")]))}});var Ey=Jt(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.accountMerge=F1;var _y=M1(Rr()),U1=bo();function M1(e){return e&&e.__esModule?e:{default:e}}function F1(e){var t={};try{t.body=_y.default.OperationBody.accountMerge((0,U1.decodeAddressToMuxedAccount)(e.destination))}catch{throw new Error("destination is invalid")}return this.setSourceAccount(t,e),new _y.default.Operation(t)}});var Ty=Jt(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});sf.allowTrust=K1;var pa=V1(Rr()),D1=ho(),q1=_n();function V1(e){return e&&e.__esModule?e:{default:e}}function K1(e){if(!q1.StrKey.isValidEd25519PublicKey(e.trustor))throw new Error("trustor is invalid");var t={};if(t.trustor=D1.Keypair.fromPublicKey(e.trustor).xdrAccountId(),e.assetCode.length<=4){var n=e.assetCode.padEnd(4,"\0");t.asset=pa.default.AssetCode.assetTypeCreditAlphanum4(n)}else if(e.assetCode.length<=12){var o=e.assetCode.padEnd(12,"\0");t.asset=pa.default.AssetCode.assetTypeCreditAlphanum12(o)}else throw new Error("Asset code must be 12 characters at max.");typeof e.authorize=="boolean"?e.authorize?t.authorize=pa.default.TrustLineFlags.authorizedFlag().value:t.authorize=0:t.authorize=e.authorize;var a=new pa.default.AllowTrustOp(t),i={};return i.body=pa.default.OperationBody.allowTrust(a),this.setSourceAccount(i,e),new pa.default.Operation(i)}});var Oy=Jt(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.bumpSequence=X1;var H1=$n(),z1=ky(pi()),uf=ky(Rr());function ky(e){return e&&e.__esModule?e:{default:e}}function X1(e){var t={};if(typeof e.bumpTo!="string")throw new Error("bumpTo must be a string");try{new z1.default(e.bumpTo)}catch{throw new Error("bumpTo must be a stringified number")}t.bumpTo=H1.Hyper.fromString(e.bumpTo);var n=new uf.default.BumpSequenceOp(t),o={};return o.body=uf.default.OperationBody.bumpSequence(n),this.setSourceAccount(o,e),new uf.default.Operation(o)}});var xy=Jt(ff=>{"use strict";Object.defineProperty(ff,"__esModule",{value:!0});ff.changeTrust=J1;var G1=$n(),W1=Py(pi()),lf=Py(Rr()),$1=Mo(),Q1=Nu();function Py(e){return e&&e.__esModule?e:{default:e}}var Y1="9223372036854775807";function J1(e){var t={};if(e.asset instanceof $1.Asset)t.line=e.asset.toChangeTrustXDRObject();else if(e.asset instanceof Q1.LiquidityPoolAsset)t.line=e.asset.toXDRObject();else throw new TypeError("asset must be Asset or LiquidityPoolAsset");if(e.limit!==void 0&&!this.isValidAmount(e.limit,!0))throw new TypeError(this.constructAmountRequirementsError("limit"));e.limit?t.limit=this._toXDRAmount(e.limit):t.limit=G1.Hyper.fromString(new W1.default(Y1).toString()),e.source&&(t.source=e.source.masterKeypair);var n=new lf.default.ChangeTrustOp(t),o={};return o.body=lf.default.OperationBody.changeTrust(n),this.setSourceAccount(o,e),new lf.default.Operation(o)}});var Ry=Jt(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.createAccount=rS;var pf=tS(Rr()),Z1=ho(),eS=_n();function tS(e){return e&&e.__esModule?e:{default:e}}function rS(e){if(!eS.StrKey.isValidEd25519PublicKey(e.destination))throw new Error("destination is invalid");if(!this.isValidAmount(e.startingBalance,!0))throw new TypeError(this.constructAmountRequirementsError("startingBalance"));var t={};t.destination=Z1.Keypair.fromPublicKey(e.destination).xdrAccountId(),t.startingBalance=this._toXDRAmount(e.startingBalance);var n=new pf.default.CreateAccountOp(t),o={};return o.body=pf.default.OperationBody.createAccount(n),this.setSourceAccount(o,e),new pf.default.Operation(o)}});var Iy=Jt(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.createClaimableBalance=iS;var df=oS(Rr()),nS=Mo();function oS(e){return e&&e.__esModule?e:{default:e}}function iS(e){if(!(e.asset instanceof nS.Asset))throw new Error("must provide an asset for create claimable balance operation");if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(!Array.isArray(e.claimants)||e.claimants.length===0)throw new Error("must provide at least one claimant");var t={};t.asset=e.asset.toXDRObject(),t.amount=this._toXDRAmount(e.amount),t.claimants=Object.values(e.claimants).map(function(a){return a.toXDRObject()});var n=new df.default.CreateClaimableBalanceOp(t),o={};return o.body=df.default.OperationBody.createClaimableBalance(n),this.setSourceAccount(o,e),new df.default.Operation(o)}});var mf=Jt(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});qu.claimClaimableBalance=sS;qu.validateClaimableBalanceId=Cy;var Du=aS(Rr());function aS(e){return e&&e.__esModule?e:{default:e}}function sS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cy(e.balanceId);var t={};t.balanceId=Du.default.ClaimableBalanceId.fromXDR(e.balanceId,"hex");var n=new Du.default.ClaimClaimableBalanceOp(t),o={};return o.body=Du.default.OperationBody.claimClaimableBalance(n),this.setSourceAccount(o,e),new Du.default.Operation(o)}function Cy(e){if(typeof e!="string"||e.length!==72)throw new Error("must provide a valid claimable balance id")}});var By=Jt(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.clawbackClaimableBalance=lS;var Vu=cS(Rr()),uS=mf();function cS(e){return e&&e.__esModule?e:{default:e}}function lS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,uS.validateClaimableBalanceId)(e.balanceId);var t={balanceId:Vu.default.ClaimableBalanceId.fromXDR(e.balanceId,"hex")},n={body:Vu.default.OperationBody.clawbackClaimableBalance(new Vu.default.ClawbackClaimableBalanceOp(t))};return this.setSourceAccount(n,e),new Vu.default.Operation(n)}});var Ly=Jt(vf=>{"use strict";Object.defineProperty(vf,"__esModule",{value:!0});vf.inflation=pS;var jy=fS(Rr());function fS(e){return e&&e.__esModule?e:{default:e}}function pS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={};return t.body=jy.default.OperationBody.inflation(),this.setSourceAccount(t,e),new jy.default.Operation(t)}});var Ny=Jt(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.manageData=dS;var bf=hS(Rr());function hS(e){return e&&e.__esModule?e:{default:e}}function dS(e){var t={};if(!(typeof e.name=="string"&&e.name.length<=64))throw new Error("name must be a string, up to 64 characters");if(t.dataName=e.name,typeof e.value!="string"&&!Buffer.isBuffer(e.value)&&e.value!==null)throw new Error("value must be a string, Buffer or null");if(typeof e.value=="string"?t.dataValue=Buffer.from(e.value):t.dataValue=e.value,t.dataValue!==null&&t.dataValue.length>64)throw new Error("value cannot be longer that 64 bytes");var n=new bf.default.ManageDataOp(t),o={};return o.body=bf.default.OperationBody.manageData(n),this.setSourceAccount(o,e),new bf.default.Operation(o)}});var Uy=Jt(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.manageBuyOffer=gS;var yS=$n(),Sf=mS(Rr());function mS(e){return e&&e.__esModule?e:{default:e}}function gS(e){var t={};if(t.selling=e.selling.toXDRObject(),t.buying=e.buying.toXDRObject(),!this.isValidAmount(e.buyAmount,!0))throw new TypeError(this.constructAmountRequirementsError("buyAmount"));if(t.buyAmount=this._toXDRAmount(e.buyAmount),e.price===void 0)throw new TypeError("price argument is required");t.price=this._toXDRPrice(e.price),e.offerId!==void 0?e.offerId=e.offerId.toString():e.offerId="0",t.offerId=yS.Hyper.fromString(e.offerId);var n=new Sf.default.ManageBuyOfferOp(t),o={};return o.body=Sf.default.OperationBody.manageBuyOffer(n),this.setSourceAccount(o,e),new Sf.default.Operation(o)}});var My=Jt(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.pathPaymentStrictReceive=wS;var _f=bS(Rr()),vS=bo();function bS(e){return e&&e.__esModule?e:{default:e}}function wS(e){switch(!0){case!e.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(e.sendMax):throw new TypeError(this.constructAmountRequirementsError("sendMax"));case!e.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(e.destAmount):throw new TypeError(this.constructAmountRequirementsError("destAmount"));default:break}var t={};t.sendAsset=e.sendAsset.toXDRObject(),t.sendMax=this._toXDRAmount(e.sendMax);try{t.destination=(0,vS.decodeAddressToMuxedAccount)(e.destination)}catch{throw new Error("destination is invalid")}t.destAsset=e.destAsset.toXDRObject(),t.destAmount=this._toXDRAmount(e.destAmount);var n=e.path?e.path:[];t.path=n.map(function(i){return i.toXDRObject()});var o=new _f.default.PathPaymentStrictReceiveOp(t),a={};return a.body=_f.default.OperationBody.pathPaymentStrictReceive(o),this.setSourceAccount(a,e),new _f.default.Operation(a)}});var Fy=Jt(kf=>{"use strict";Object.defineProperty(kf,"__esModule",{value:!0});kf.pathPaymentStrictSend=_S;var Tf=AS(Rr()),SS=bo();function AS(e){return e&&e.__esModule?e:{default:e}}function _S(e){switch(!0){case!e.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(e.sendAmount):throw new TypeError(this.constructAmountRequirementsError("sendAmount"));case!e.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(e.destMin):throw new TypeError(this.constructAmountRequirementsError("destMin"));default:break}var t={};t.sendAsset=e.sendAsset.toXDRObject(),t.sendAmount=this._toXDRAmount(e.sendAmount);try{t.destination=(0,SS.decodeAddressToMuxedAccount)(e.destination)}catch{throw new Error("destination is invalid")}t.destAsset=e.destAsset.toXDRObject(),t.destMin=this._toXDRAmount(e.destMin);var n=e.path?e.path:[];t.path=n.map(function(i){return i.toXDRObject()});var o=new Tf.default.PathPaymentStrictSendOp(t),a={};return a.body=Tf.default.OperationBody.pathPaymentStrictSend(o),this.setSourceAccount(a,e),new Tf.default.Operation(a)}});var Dy=Jt(Pf=>{"use strict";Object.defineProperty(Pf,"__esModule",{value:!0});Pf.payment=kS;var Of=TS(Rr()),ES=bo();function TS(e){return e&&e.__esModule?e:{default:e}}function kS(e){if(!e.asset)throw new Error("Must provide an asset for a payment operation");if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));var t={};try{t.destination=(0,ES.decodeAddressToMuxedAccount)(e.destination)}catch{throw new Error("destination is invalid")}t.asset=e.asset.toXDRObject(),t.amount=this._toXDRAmount(e.amount);var n=new Of.default.PaymentOp(t),o={};return o.body=Of.default.OperationBody.payment(n),this.setSourceAccount(o,e),new Of.default.Operation(o)}});var qy=Jt(xf=>{"use strict";Object.defineProperty(xf,"__esModule",{value:!0});xf.setOptions=xS;var Jo=PS(Rr()),OS=ho(),gs=_n();function PS(e){return e&&e.__esModule?e:{default:e}}function vs(e,t){if(e>=0&&e<=255)return!0;throw new Error("".concat(t," value must be between 0 and 255"))}function xS(e){var t={};if(e.inflationDest){if(!gs.StrKey.isValidEd25519PublicKey(e.inflationDest))throw new Error("inflationDest is invalid");t.inflationDest=OS.Keypair.fromPublicKey(e.inflationDest).xdrAccountId()}if(t.clearFlags=this._checkUnsignedIntValue("clearFlags",e.clearFlags),t.setFlags=this._checkUnsignedIntValue("setFlags",e.setFlags),t.masterWeight=this._checkUnsignedIntValue("masterWeight",e.masterWeight,vs),t.lowThreshold=this._checkUnsignedIntValue("lowThreshold",e.lowThreshold,vs),t.medThreshold=this._checkUnsignedIntValue("medThreshold",e.medThreshold,vs),t.highThreshold=this._checkUnsignedIntValue("highThreshold",e.highThreshold,vs),e.homeDomain!==void 0&&typeof e.homeDomain!="string")throw new TypeError("homeDomain argument must be of type String");if(t.homeDomain=e.homeDomain,e.signer){var n=this._checkUnsignedIntValue("signer.weight",e.signer.weight,vs),o,a=0;if(e.signer.ed25519PublicKey){if(!gs.StrKey.isValidEd25519PublicKey(e.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var i=gs.StrKey.decodeEd25519PublicKey(e.signer.ed25519PublicKey);o=new Jo.default.SignerKey.signerKeyTypeEd25519(i),a+=1}if(e.signer.preAuthTx){if(typeof e.signer.preAuthTx=="string"&&(e.signer.preAuthTx=Buffer.from(e.signer.preAuthTx,"hex")),!(Buffer.isBuffer(e.signer.preAuthTx)&&e.signer.preAuthTx.length===32))throw new Error("signer.preAuthTx must be 32 bytes Buffer.");o=new Jo.default.SignerKey.signerKeyTypePreAuthTx(e.signer.preAuthTx),a+=1}if(e.signer.sha256Hash){if(typeof e.signer.sha256Hash=="string"&&(e.signer.sha256Hash=Buffer.from(e.signer.sha256Hash,"hex")),!(Buffer.isBuffer(e.signer.sha256Hash)&&e.signer.sha256Hash.length===32))throw new Error("signer.sha256Hash must be 32 bytes Buffer.");o=new Jo.default.SignerKey.signerKeyTypeHashX(e.signer.sha256Hash),a+=1}if(e.signer.ed25519SignedPayload){if(!gs.StrKey.isValidSignedPayload(e.signer.ed25519SignedPayload))throw new Error("signer.ed25519SignedPayload is invalid.");var s=gs.StrKey.decodeSignedPayload(e.signer.ed25519SignedPayload),f=Jo.default.SignerKeyEd25519SignedPayload.fromXDR(s);o=Jo.default.SignerKey.signerKeyTypeEd25519SignedPayload(f),a+=1}if(a!==1)throw new Error("Signer object must contain exactly one of signer.ed25519PublicKey, signer.sha256Hash, signer.preAuthTx.");t.signer=new Jo.default.Signer({key:o,weight:n})}var u=new Jo.default.SetOptionsOp(t),r={};return r.body=Jo.default.OperationBody.setOptions(u),this.setSourceAccount(r,e),new Jo.default.Operation(r)}});var Vy=Jt(If=>{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.beginSponsoringFutureReserves=BS;var Rf=CS(Rr()),RS=_n(),IS=ho();function CS(e){return e&&e.__esModule?e:{default:e}}function BS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!RS.StrKey.isValidEd25519PublicKey(e.sponsoredId))throw new Error("sponsoredId is invalid");var t=new Rf.default.BeginSponsoringFutureReservesOp({sponsoredId:IS.Keypair.fromPublicKey(e.sponsoredId).xdrAccountId()}),n={};return n.body=Rf.default.OperationBody.beginSponsoringFutureReserves(t),this.setSourceAccount(n,e),new Rf.default.Operation(n)}});var Hy=Jt(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.endSponsoringFutureReserves=LS;var Ky=jS(Rr());function jS(e){return e&&e.__esModule?e:{default:e}}function LS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={};return t.body=Ky.default.OperationBody.endSponsoringFutureReserves(),this.setSourceAccount(t,e),new Ky.default.Operation(t)}});var zy=Jt(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});Zo.revokeAccountSponsorship=FS;Zo.revokeClaimableBalanceSponsorship=KS;Zo.revokeDataSponsorship=VS;Zo.revokeLiquidityPoolSponsorship=HS;Zo.revokeOfferSponsorship=qS;Zo.revokeSignerSponsorship=zS;Zo.revokeTrustlineSponsorship=DS;var qr=MS(Rr()),Ui=_n(),bs=ho(),NS=Mo(),US=Fu();function MS(e){return e&&e.__esModule?e:{default:e}}function FS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Ui.StrKey.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");var t=qr.default.LedgerKey.account(new qr.default.LedgerKeyAccount({accountId:bs.Keypair.fromPublicKey(e.account).xdrAccountId()})),n=qr.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),o={};return o.body=qr.default.OperationBody.revokeSponsorship(n),this.setSourceAccount(o,e),new qr.default.Operation(o)}function DS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Ui.StrKey.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");var t;if(e.asset instanceof NS.Asset)t=e.asset.toTrustLineXDRObject();else if(e.asset instanceof US.LiquidityPoolId)t=e.asset.toXDRObject();else throw new TypeError("asset must be an Asset or LiquidityPoolId");var n=qr.default.LedgerKey.trustline(new qr.default.LedgerKeyTrustLine({accountId:bs.Keypair.fromPublicKey(e.account).xdrAccountId(),asset:t})),o=qr.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(n),a={};return a.body=qr.default.OperationBody.revokeSponsorship(o),this.setSourceAccount(a,e),new qr.default.Operation(a)}function qS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Ui.StrKey.isValidEd25519PublicKey(e.seller))throw new Error("seller is invalid");if(typeof e.offerId!="string")throw new Error("offerId is invalid");var t=qr.default.LedgerKey.offer(new qr.default.LedgerKeyOffer({sellerId:bs.Keypair.fromPublicKey(e.seller).xdrAccountId(),offerId:qr.default.Int64.fromString(e.offerId)})),n=qr.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),o={};return o.body=qr.default.OperationBody.revokeSponsorship(n),this.setSourceAccount(o,e),new qr.default.Operation(o)}function VS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Ui.StrKey.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");if(typeof e.name!="string"||e.name.length>64)throw new Error("name must be a string, up to 64 characters");var t=qr.default.LedgerKey.data(new qr.default.LedgerKeyData({accountId:bs.Keypair.fromPublicKey(e.account).xdrAccountId(),dataName:e.name})),n=qr.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),o={};return o.body=qr.default.OperationBody.revokeSponsorship(n),this.setSourceAccount(o,e),new qr.default.Operation(o)}function KS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(typeof e.balanceId!="string")throw new Error("balanceId is invalid");var t=qr.default.LedgerKey.claimableBalance(new qr.default.LedgerKeyClaimableBalance({balanceId:qr.default.ClaimableBalanceId.fromXDR(e.balanceId,"hex")})),n=qr.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),o={};return o.body=qr.default.OperationBody.revokeSponsorship(n),this.setSourceAccount(o,e),new qr.default.Operation(o)}function HS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(typeof e.liquidityPoolId!="string")throw new Error("liquidityPoolId is invalid");var t=qr.default.LedgerKey.liquidityPool(new qr.default.LedgerKeyLiquidityPool({liquidityPoolId:qr.default.PoolId.fromXDR(e.liquidityPoolId,"hex")})),n=qr.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(t),o={body:qr.default.OperationBody.revokeSponsorship(n)};return this.setSourceAccount(o,e),new qr.default.Operation(o)}function zS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!Ui.StrKey.isValidEd25519PublicKey(e.account))throw new Error("account is invalid");var t;if(e.signer.ed25519PublicKey){if(!Ui.StrKey.isValidEd25519PublicKey(e.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var n=Ui.StrKey.decodeEd25519PublicKey(e.signer.ed25519PublicKey);t=new qr.default.SignerKey.signerKeyTypeEd25519(n)}else if(e.signer.preAuthTx){var o;if(typeof e.signer.preAuthTx=="string"?o=Buffer.from(e.signer.preAuthTx,"hex"):o=e.signer.preAuthTx,!(Buffer.isBuffer(o)&&o.length===32))throw new Error("signer.preAuthTx must be 32 bytes Buffer.");t=new qr.default.SignerKey.signerKeyTypePreAuthTx(o)}else if(e.signer.sha256Hash){var a;if(typeof e.signer.sha256Hash=="string"?a=Buffer.from(e.signer.sha256Hash,"hex"):a=e.signer.sha256Hash,!(Buffer.isBuffer(a)&&a.length===32))throw new Error("signer.sha256Hash must be 32 bytes Buffer.");t=new qr.default.SignerKey.signerKeyTypeHashX(a)}else throw new Error("signer is invalid");var i=new qr.default.RevokeSponsorshipOpSigner({accountId:bs.Keypair.fromPublicKey(e.account).xdrAccountId(),signerKey:t}),s=qr.default.RevokeSponsorshipOp.revokeSponsorshipSigner(i),f={};return f.body=qr.default.OperationBody.revokeSponsorship(s),this.setSourceAccount(f,e),new qr.default.Operation(f)}});var Xy=Jt(jf=>{"use strict";Object.defineProperty(jf,"__esModule",{value:!0});jf.clawback=WS;var Bf=GS(Rr()),XS=bo();function GS(e){return e&&e.__esModule?e:{default:e}}function WS(e){var t={};if(!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));t.amount=this._toXDRAmount(e.amount),t.asset=e.asset.toXDRObject();try{t.from=(0,XS.decodeAddressToMuxedAccount)(e.from)}catch{throw new Error("from address is invalid")}var n={body:Bf.default.OperationBody.clawback(new Bf.default.ClawbackOp(t))};return this.setSourceAccount(n,e),new Bf.default.Operation(n)}});var Gy=Jt(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.setTrustLineFlags=YS;var ha=QS(Rr()),$S=ho();function QS(e){return e&&e.__esModule?e:{default:e}}function Lf(e){"@babel/helpers - typeof";return Lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lf(e)}function YS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={};if(Lf(e.flags)!=="object"||Object.keys(e.flags).length===0)throw new Error("opts.flags must be a map of boolean flags to modify");var n={authorized:ha.default.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:ha.default.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:ha.default.TrustLineFlags.trustlineClawbackEnabledFlag()},o=0,a=0;Object.keys(e.flags).forEach(function(s){if(!Object.prototype.hasOwnProperty.call(n,s))throw new Error("unsupported flag name specified: ".concat(s));var f=e.flags[s],u=n[s].value;f===!0?a|=u:f===!1&&(o|=u)}),t.trustor=$S.Keypair.fromPublicKey(e.trustor).xdrAccountId(),t.asset=e.asset.toXDRObject(),t.clearFlags=o,t.setFlags=a;var i={body:ha.default.OperationBody.setTrustLineFlags(new ha.default.SetTrustLineFlagsOp(t))};return this.setSourceAccount(i,e),new ha.default.Operation(i)}});var Wy=Jt(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.liquidityPoolDeposit=ZS;var Ku=JS(Rr());function JS(e){return e&&e.__esModule?e:{default:e}}function ZS(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.liquidityPoolId,n=e.maxAmountA,o=e.maxAmountB,a=e.minPrice,i=e.maxPrice,s={};if(!t)throw new TypeError("liquidityPoolId argument is required");if(s.liquidityPoolId=Ku.default.PoolId.fromXDR(t,"hex"),!this.isValidAmount(n,!0))throw new TypeError(this.constructAmountRequirementsError("maxAmountA"));if(s.maxAmountA=this._toXDRAmount(n),!this.isValidAmount(o,!0))throw new TypeError(this.constructAmountRequirementsError("maxAmountB"));if(s.maxAmountB=this._toXDRAmount(o),a===void 0)throw new TypeError("minPrice argument is required");if(s.minPrice=this._toXDRPrice(a),i===void 0)throw new TypeError("maxPrice argument is required");s.maxPrice=this._toXDRPrice(i);var f=new Ku.default.LiquidityPoolDepositOp(s),u={body:Ku.default.OperationBody.liquidityPoolDeposit(f)};return this.setSourceAccount(u,e),new Ku.default.Operation(u)}});var $y=Jt(Mf=>{"use strict";Object.defineProperty(Mf,"__esModule",{value:!0});Mf.liquidityPoolWithdraw=t2;var Hu=e2(Rr());function e2(e){return e&&e.__esModule?e:{default:e}}function t2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={};if(!e.liquidityPoolId)throw new TypeError("liquidityPoolId argument is required");if(t.liquidityPoolId=Hu.default.PoolId.fromXDR(e.liquidityPoolId,"hex"),!this.isValidAmount(e.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(t.amount=this._toXDRAmount(e.amount),!this.isValidAmount(e.minAmountA,!0))throw new TypeError(this.constructAmountRequirementsError("minAmountA"));if(t.minAmountA=this._toXDRAmount(e.minAmountA),!this.isValidAmount(e.minAmountB,!0))throw new TypeError(this.constructAmountRequirementsError("minAmountB"));t.minAmountB=this._toXDRAmount(e.minAmountB);var n=new Hu.default.LiquidityPoolWithdrawOp(t),o={body:Hu.default.OperationBody.liquidityPoolWithdraw(n)};return this.setSourceAccount(o,e),new Hu.default.Operation(o)}});var Mi=Jt(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});zu.Address=void 0;var hi=_n(),da=r2(Rr());function r2(e){return e&&e.__esModule?e:{default:e}}function ws(e){"@babel/helpers - typeof";return ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ws(e)}function n2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qy(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,i2(o.key),o)}}function o2(e,t,n){return t&&Qy(e.prototype,t),n&&Qy(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function i2(e){var t=a2(e,"string");return ws(t)=="symbol"?t:t+""}function a2(e,t){if(ws(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(ws(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var G3=zu.Address=function(){function e(t){if(n2(this,e),hi.StrKey.isValidEd25519PublicKey(t))this._type="account",this._key=hi.StrKey.decodeEd25519PublicKey(t);else if(hi.StrKey.isValidContract(t))this._type="contract",this._key=hi.StrKey.decodeContract(t);else throw new Error("Unsupported address type")}return o2(e,[{key:"toString",value:function(){switch(this._type){case"account":return hi.StrKey.encodeEd25519PublicKey(this._key);case"contract":return hi.StrKey.encodeContract(this._key);default:throw new Error("Unsupported address type")}}},{key:"toScVal",value:function(){return da.default.ScVal.scvAddress(this.toScAddress())}},{key:"toScAddress",value:function(){switch(this._type){case"account":return da.default.ScAddress.scAddressTypeAccount(da.default.PublicKey.publicKeyTypeEd25519(this._key));case"contract":return da.default.ScAddress.scAddressTypeContract(this._key);default:throw new Error("Unsupported address type")}}},{key:"toBuffer",value:function(){return this._key}}],[{key:"fromString",value:function(n){return new e(n)}},{key:"account",value:function(n){return new e(hi.StrKey.encodeEd25519PublicKey(n))}},{key:"contract",value:function(n){return new e(hi.StrKey.encodeContract(n))}},{key:"fromScVal",value:function(n){return e.fromScAddress(n.address())}},{key:"fromScAddress",value:function(n){switch(n.switch()){case da.default.ScAddressType.scAddressTypeAccount():return e.account(n.accountId().ed25519());case da.default.ScAddressType.scAddressTypeContract():return e.contract(n.contractId());default:throw new Error("Unsupported address type")}}}])}()});var Zy=Jt(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.createCustomContract=g2;Fi.createStellarAssetContract=v2;Fi.invokeContractFunction=m2;Fi.invokeHostFunction=y2;Fi.uploadContractWasm=b2;var eo=c2(Rr()),s2=ho(),u2=Mi(),Yy=Mo();function c2(e){return e&&e.__esModule?e:{default:e}}function l2(e,t){return d2(e)||h2(e,t)||p2(e,t)||f2()}function f2(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p2(e,t){if(e){if(typeof e=="string")return Jy(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jy(e,t):void 0}}function Jy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function h2(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o,a,i,s,f=[],u=!0,r=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=i.call(n)).done)&&(f.push(o.value),f.length!==t);u=!0);}catch(_){r=!0,a=_}finally{try{if(!u&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(r)throw a}}return f}}function d2(e){if(Array.isArray(e))return e}function y2(e){if(!e.func)throw new TypeError("host function invocation ('func') required (got ".concat(JSON.stringify(e),")"));var t=new eo.default.InvokeHostFunctionOp({hostFunction:e.func,auth:e.auth||[]}),n={body:eo.default.OperationBody.invokeHostFunction(t)};return this.setSourceAccount(n,e),new eo.default.Operation(n)}function m2(e){var t=new u2.Address(e.contract);if(t._type!=="contract")throw new TypeError("expected contract strkey instance, got ".concat(t));return this.invokeHostFunction({source:e.source,auth:e.auth,func:eo.default.HostFunction.hostFunctionTypeInvokeContract(new eo.default.InvokeContractArgs({contractAddress:t.toScAddress(),functionName:e.function,args:e.args}))})}function g2(e){var t=Buffer.from(e.salt||w2());if(!e.wasmHash||e.wasmHash.length!==32)throw new TypeError("expected hash(contract WASM) in 'opts.wasmHash', got ".concat(e.wasmHash));if(t.length!==32)throw new TypeError("expected 32-byte salt in 'opts.salt', got ".concat(e.wasmHash));return this.invokeHostFunction({source:e.source,auth:e.auth,func:eo.default.HostFunction.hostFunctionTypeCreateContract(new eo.default.CreateContractArgs({executable:eo.default.ContractExecutable.contractExecutableWasm(Buffer.from(e.wasmHash)),contractIdPreimage:eo.default.ContractIdPreimage.contractIdPreimageFromAddress(new eo.default.ContractIdPreimageFromAddress({address:e.address.toScAddress(),salt:t}))}))})}function v2(e){var t=e.asset;if(typeof t=="string"){var n=t.split(":"),o=l2(n,2),a=o[0],i=o[1];t=new Yy.Asset(a,i)}if(!(t instanceof Yy.Asset))throw new TypeError("expected Asset in 'opts.asset', got ".concat(t));return this.invokeHostFunction({source:e.source,auth:e.auth,func:eo.default.HostFunction.hostFunctionTypeCreateContract(new eo.default.CreateContractArgs({executable:eo.default.ContractExecutable.contractExecutableStellarAsset(),contractIdPreimage:eo.default.ContractIdPreimage.contractIdPreimageFromAsset(t.toXDRObject())}))})}function b2(e){return this.invokeHostFunction({source:e.source,auth:e.auth,func:eo.default.HostFunction.hostFunctionTypeUploadContractWasm(Buffer.from(e.wasm))})}function w2(){return s2.Keypair.random().xdrPublicKey().value()}});var em=Jt(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.extendFootprintTtl=A2;var Xu=S2(Rr());function S2(e){return e&&e.__esModule?e:{default:e}}function A2(e){var t;if(((t=e.extendTo)!==null&&t!==void 0?t:-1)<=0)throw new RangeError("extendTo isn't a ledger quantity (uint32)");var n=new Xu.default.ExtendFootprintTtlOp({ext:new Xu.default.ExtensionPoint(0),extendTo:e.extendTo}),o={body:Xu.default.OperationBody.extendFootprintTtl(n)};return this.setSourceAccount(o,e),new Xu.default.Operation(o)}});var tm=Jt(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.restoreFootprint=E2;var Gu=_2(Rr());function _2(e){return e&&e.__esModule?e:{default:e}}function E2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=new Gu.default.RestoreFootprintOp({ext:new Gu.default.ExtensionPoint(0)}),n={body:Gu.default.OperationBody.restoreFootprint(t)};return this.setSourceAccount(n,e??{}),new Gu.default.Operation(n)}});var rm=Jt(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Object.defineProperty(Kr,"accountMerge",{enumerable:!0,get:function(){return O2.accountMerge}});Object.defineProperty(Kr,"allowTrust",{enumerable:!0,get:function(){return P2.allowTrust}});Object.defineProperty(Kr,"beginSponsoringFutureReserves",{enumerable:!0,get:function(){return V2.beginSponsoringFutureReserves}});Object.defineProperty(Kr,"bumpSequence",{enumerable:!0,get:function(){return x2.bumpSequence}});Object.defineProperty(Kr,"changeTrust",{enumerable:!0,get:function(){return R2.changeTrust}});Object.defineProperty(Kr,"claimClaimableBalance",{enumerable:!0,get:function(){return B2.claimClaimableBalance}});Object.defineProperty(Kr,"clawback",{enumerable:!0,get:function(){return H2.clawback}});Object.defineProperty(Kr,"clawbackClaimableBalance",{enumerable:!0,get:function(){return j2.clawbackClaimableBalance}});Object.defineProperty(Kr,"createAccount",{enumerable:!0,get:function(){return I2.createAccount}});Object.defineProperty(Kr,"createClaimableBalance",{enumerable:!0,get:function(){return C2.createClaimableBalance}});Object.defineProperty(Kr,"createCustomContract",{enumerable:!0,get:function(){return Ss.createCustomContract}});Object.defineProperty(Kr,"createPassiveSellOffer",{enumerable:!0,get:function(){return k2.createPassiveSellOffer}});Object.defineProperty(Kr,"createStellarAssetContract",{enumerable:!0,get:function(){return Ss.createStellarAssetContract}});Object.defineProperty(Kr,"endSponsoringFutureReserves",{enumerable:!0,get:function(){return K2.endSponsoringFutureReserves}});Object.defineProperty(Kr,"extendFootprintTtl",{enumerable:!0,get:function(){return W2.extendFootprintTtl}});Object.defineProperty(Kr,"inflation",{enumerable:!0,get:function(){return L2.inflation}});Object.defineProperty(Kr,"invokeContractFunction",{enumerable:!0,get:function(){return Ss.invokeContractFunction}});Object.defineProperty(Kr,"invokeHostFunction",{enumerable:!0,get:function(){return Ss.invokeHostFunction}});Object.defineProperty(Kr,"liquidityPoolDeposit",{enumerable:!0,get:function(){return X2.liquidityPoolDeposit}});Object.defineProperty(Kr,"liquidityPoolWithdraw",{enumerable:!0,get:function(){return G2.liquidityPoolWithdraw}});Object.defineProperty(Kr,"manageBuyOffer",{enumerable:!0,get:function(){return U2.manageBuyOffer}});Object.defineProperty(Kr,"manageData",{enumerable:!0,get:function(){return N2.manageData}});Object.defineProperty(Kr,"manageSellOffer",{enumerable:!0,get:function(){return T2.manageSellOffer}});Object.defineProperty(Kr,"pathPaymentStrictReceive",{enumerable:!0,get:function(){return M2.pathPaymentStrictReceive}});Object.defineProperty(Kr,"pathPaymentStrictSend",{enumerable:!0,get:function(){return F2.pathPaymentStrictSend}});Object.defineProperty(Kr,"payment",{enumerable:!0,get:function(){return D2.payment}});Object.defineProperty(Kr,"restoreFootprint",{enumerable:!0,get:function(){return $2.restoreFootprint}});Object.defineProperty(Kr,"revokeAccountSponsorship",{enumerable:!0,get:function(){return Di.revokeAccountSponsorship}});Object.defineProperty(Kr,"revokeClaimableBalanceSponsorship",{enumerable:!0,get:function(){return Di.revokeClaimableBalanceSponsorship}});Object.defineProperty(Kr,"revokeDataSponsorship",{enumerable:!0,get:function(){return Di.revokeDataSponsorship}});Object.defineProperty(Kr,"revokeLiquidityPoolSponsorship",{enumerable:!0,get:function(){return Di.revokeLiquidityPoolSponsorship}});Object.defineProperty(Kr,"revokeOfferSponsorship",{enumerable:!0,get:function(){return Di.revokeOfferSponsorship}});Object.defineProperty(Kr,"revokeSignerSponsorship",{enumerable:!0,get:function(){return Di.revokeSignerSponsorship}});Object.defineProperty(Kr,"revokeTrustlineSponsorship",{enumerable:!0,get:function(){return Di.revokeTrustlineSponsorship}});Object.defineProperty(Kr,"setOptions",{enumerable:!0,get:function(){return q2.setOptions}});Object.defineProperty(Kr,"setTrustLineFlags",{enumerable:!0,get:function(){return z2.setTrustLineFlags}});Object.defineProperty(Kr,"uploadContractWasm",{enumerable:!0,get:function(){return Ss.uploadContractWasm}});var T2=by(),k2=wy(),O2=Ey(),P2=Ty(),x2=Oy(),R2=xy(),I2=Ry(),C2=Iy(),B2=mf(),j2=By(),L2=Ly(),N2=Ny(),U2=Uy(),M2=My(),F2=Fy(),D2=Dy(),q2=qy(),V2=Vy(),K2=Hy(),Di=zy(),H2=Xy(),z2=Gy(),X2=Wy(),G2=$y(),Ss=Zy(),W2=em(),$2=tm()});var Wu=Jt(wo=>{"use strict";Object.defineProperty(wo,"__esModule",{value:!0});wo.Operation=wo.AuthRevocableFlag=wo.AuthRequiredFlag=wo.AuthImmutableFlag=wo.AuthClawbackEnabledFlag=void 0;var Q2=$n(),ya=im(pi()),Y2=Hl(),J2=ly(),qn=Mo(),Z2=Nu(),eA=Zl(),Vf=_n(),tA=Fu(),Qn=im(Rr()),zr=rA(rm()),qi=bo();function om(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(om=function(a){return a?n:t})(e)}function rA(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||ma(e)!="object"&&typeof e!="function")return{default:e};var n=om(t);if(n&&n.has(e))return n.get(e);var o={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&{}.hasOwnProperty.call(e,i)){var s=a?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function im(e){return e&&e.__esModule?e:{default:e}}function ma(e){"@babel/helpers - typeof";return ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ma(e)}function nA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nm(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,iA(o.key),o)}}function oA(e,t,n){return t&&nm(e.prototype,t),n&&nm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function iA(e){var t=aA(e,"string");return ma(t)=="symbol"?t:t+""}function aA(e,t){if(ma(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(ma(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qf=1e7,sA="9223372036854775807",Z3=wo.AuthRequiredFlag=1,eP=wo.AuthRevocableFlag=2,tP=wo.AuthImmutableFlag=4,rP=wo.AuthClawbackEnabledFlag=8,Xr=wo.Operation=function(){function e(){nA(this,e)}return oA(e,null,[{key:"setSourceAccount",value:function(n,o){if(o.source)try{n.sourceAccount=(0,qi.decodeAddressToMuxedAccount)(o.source)}catch{throw new Error("Source address is invalid")}}},{key:"fromXDRObject",value:function(n){var o={};n.sourceAccount()&&(o.source=(0,qi.encodeMuxedAccountToAddress)(n.sourceAccount()));var a=n.body().value(),i=n.body().switch().name;switch(i){case"createAccount":{o.type="createAccount",o.destination=Po(a.destination()),o.startingBalance=this._fromXDRAmount(a.startingBalance());break}case"payment":{o.type="payment",o.destination=(0,qi.encodeMuxedAccountToAddress)(a.destination()),o.asset=qn.Asset.fromOperation(a.asset()),o.amount=this._fromXDRAmount(a.amount());break}case"pathPaymentStrictReceive":{o.type="pathPaymentStrictReceive",o.sendAsset=qn.Asset.fromOperation(a.sendAsset()),o.sendMax=this._fromXDRAmount(a.sendMax()),o.destination=(0,qi.encodeMuxedAccountToAddress)(a.destination()),o.destAsset=qn.Asset.fromOperation(a.destAsset()),o.destAmount=this._fromXDRAmount(a.destAmount()),o.path=[];var s=a.path();Object.keys(s).forEach(function(p){o.path.push(qn.Asset.fromOperation(s[p]))});break}case"pathPaymentStrictSend":{o.type="pathPaymentStrictSend",o.sendAsset=qn.Asset.fromOperation(a.sendAsset()),o.sendAmount=this._fromXDRAmount(a.sendAmount()),o.destination=(0,qi.encodeMuxedAccountToAddress)(a.destination()),o.destAsset=qn.Asset.fromOperation(a.destAsset()),o.destMin=this._fromXDRAmount(a.destMin()),o.path=[];var f=a.path();Object.keys(f).forEach(function(p){o.path.push(qn.Asset.fromOperation(f[p]))});break}case"changeTrust":{switch(o.type="changeTrust",a.line().switch()){case Qn.default.AssetType.assetTypePoolShare():o.line=Z2.LiquidityPoolAsset.fromOperation(a.line());break;default:o.line=qn.Asset.fromOperation(a.line());break}o.limit=this._fromXDRAmount(a.limit());break}case"allowTrust":{o.type="allowTrust",o.trustor=Po(a.trustor()),o.assetCode=a.asset().value().toString(),o.assetCode=(0,Y2.trimEnd)(o.assetCode,"\0"),o.authorize=a.authorize();break}case"setOptions":{if(o.type="setOptions",a.inflationDest()&&(o.inflationDest=Po(a.inflationDest())),o.clearFlags=a.clearFlags(),o.setFlags=a.setFlags(),o.masterWeight=a.masterWeight(),o.lowThreshold=a.lowThreshold(),o.medThreshold=a.medThreshold(),o.highThreshold=a.highThreshold(),o.homeDomain=a.homeDomain()!==void 0?a.homeDomain().toString("ascii"):void 0,a.signer()){var u={},r=a.signer().key().arm();if(r==="ed25519")u.ed25519PublicKey=Po(a.signer().key());else if(r==="preAuthTx")u.preAuthTx=a.signer().key().preAuthTx();else if(r==="hashX")u.sha256Hash=a.signer().key().hashX();else if(r==="ed25519SignedPayload"){var _=a.signer().key().ed25519SignedPayload();u.ed25519SignedPayload=Vf.StrKey.encodeSignedPayload(_.toXDR())}u.weight=a.signer().weight(),o.signer=u}break}case"manageOffer":case"manageSellOffer":{o.type="manageSellOffer",o.selling=qn.Asset.fromOperation(a.selling()),o.buying=qn.Asset.fromOperation(a.buying()),o.amount=this._fromXDRAmount(a.amount()),o.price=this._fromXDRPrice(a.price()),o.offerId=a.offerId().toString();break}case"manageBuyOffer":{o.type="manageBuyOffer",o.selling=qn.Asset.fromOperation(a.selling()),o.buying=qn.Asset.fromOperation(a.buying()),o.buyAmount=this._fromXDRAmount(a.buyAmount()),o.price=this._fromXDRPrice(a.price()),o.offerId=a.offerId().toString();break}case"createPassiveOffer":case"createPassiveSellOffer":{o.type="createPassiveSellOffer",o.selling=qn.Asset.fromOperation(a.selling()),o.buying=qn.Asset.fromOperation(a.buying()),o.amount=this._fromXDRAmount(a.amount()),o.price=this._fromXDRPrice(a.price());break}case"accountMerge":{o.type="accountMerge",o.destination=(0,qi.encodeMuxedAccountToAddress)(a);break}case"manageData":{o.type="manageData",o.name=a.dataName().toString("ascii"),o.value=a.dataValue();break}case"inflation":{o.type="inflation";break}case"bumpSequence":{o.type="bumpSequence",o.bumpTo=a.bumpTo().toString();break}case"createClaimableBalance":{o.type="createClaimableBalance",o.asset=qn.Asset.fromOperation(a.asset()),o.amount=this._fromXDRAmount(a.amount()),o.claimants=[],a.claimants().forEach(function(p){o.claimants.push(eA.Claimant.fromXDR(p))});break}case"claimClaimableBalance":{o.type="claimClaimableBalance",o.balanceId=a.toXDR("hex");break}case"beginSponsoringFutureReserves":{o.type="beginSponsoringFutureReserves",o.sponsoredId=Po(a.sponsoredId());break}case"endSponsoringFutureReserves":{o.type="endSponsoringFutureReserves";break}case"revokeSponsorship":{uA(a,o);break}case"clawback":{o.type="clawback",o.amount=this._fromXDRAmount(a.amount()),o.from=(0,qi.encodeMuxedAccountToAddress)(a.from()),o.asset=qn.Asset.fromOperation(a.asset());break}case"clawbackClaimableBalance":{o.type="clawbackClaimableBalance",o.balanceId=a.toXDR("hex");break}case"setTrustLineFlags":{o.type="setTrustLineFlags",o.asset=qn.Asset.fromOperation(a.asset()),o.trustor=Po(a.trustor());var d=a.clearFlags(),b=a.setFlags(),T={authorized:Qn.default.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:Qn.default.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:Qn.default.TrustLineFlags.trustlineClawbackEnabledFlag()},w=function(A){var L=T[A].value;if(b&L)return!0;if(d&L)return!1};o.flags={},Object.keys(T).forEach(function(p){o.flags[p]=w(p)});break}case"liquidityPoolDeposit":{o.type="liquidityPoolDeposit",o.liquidityPoolId=a.liquidityPoolId().toString("hex"),o.maxAmountA=this._fromXDRAmount(a.maxAmountA()),o.maxAmountB=this._fromXDRAmount(a.maxAmountB()),o.minPrice=this._fromXDRPrice(a.minPrice()),o.maxPrice=this._fromXDRPrice(a.maxPrice());break}case"liquidityPoolWithdraw":{o.type="liquidityPoolWithdraw",o.liquidityPoolId=a.liquidityPoolId().toString("hex"),o.amount=this._fromXDRAmount(a.amount()),o.minAmountA=this._fromXDRAmount(a.minAmountA()),o.minAmountB=this._fromXDRAmount(a.minAmountB());break}case"invokeHostFunction":{var g;o.type="invokeHostFunction",o.func=a.hostFunction(),o.auth=(g=a.auth())!==null&&g!==void 0?g:[];break}case"extendFootprintTtl":{o.type="extendFootprintTtl",o.extendTo=a.extendTo();break}case"restoreFootprint":{o.type="restoreFootprint";break}default:throw new Error("Unknown operation: ".concat(i))}return o}},{key:"isValidAmount",value:function(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(typeof n!="string")return!1;var a;try{a=new ya.default(n)}catch{return!1}return!(!o&&a.isZero()||a.isNegative()||a.times(qf).gt(new ya.default(sA).toString())||a.decimalPlaces()>7||a.isNaN()||!a.isFinite())}},{key:"constructAmountRequirementsError",value:function(n){return"".concat(n," argument must be of type String, represent a positive number and have at most 7 digits after the decimal")}},{key:"_checkUnsignedIntValue",value:function(n,o){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!(typeof o>"u"))switch(typeof o=="string"&&(o=parseFloat(o)),!0){case(typeof o!="number"||!Number.isFinite(o)||o%1!==0):throw new Error("".concat(n," value is invalid"));case o<0:throw new Error("".concat(n," value must be unsigned"));case(!a||a&&a(o,n)):return o;default:throw new Error("".concat(n," value is invalid"))}}},{key:"_toXDRAmount",value:function(n){var o=new ya.default(n).times(qf);return Q2.Hyper.fromString(o.toString())}},{key:"_fromXDRAmount",value:function(n){return new ya.default(n).div(qf).toFixed(7)}},{key:"_fromXDRPrice",value:function(n){var o=new ya.default(n.n());return o.div(new ya.default(n.d())).toString()}},{key:"_toXDRPrice",value:function(n){var o;if(n.n&&n.d)o=new Qn.default.Price(n);else{var a=(0,J2.best_r)(n);o=new Qn.default.Price({n:parseInt(a[0],10),d:parseInt(a[1],10)})}if(o.n()<0||o.d()<0)throw new Error("price must be positive");return o}}])}();function uA(e,t){switch(e.switch().name){case"revokeSponsorshipLedgerEntry":{var n=e.ledgerKey();switch(n.switch().name){case Qn.default.LedgerEntryType.account().name:{t.type="revokeAccountSponsorship",t.account=Po(n.account().accountId());break}case Qn.default.LedgerEntryType.trustline().name:{t.type="revokeTrustlineSponsorship",t.account=Po(n.trustLine().accountId());var o=n.trustLine().asset();switch(o.switch()){case Qn.default.AssetType.assetTypePoolShare():t.asset=tA.LiquidityPoolId.fromOperation(o);break;default:t.asset=qn.Asset.fromOperation(o);break}break}case Qn.default.LedgerEntryType.offer().name:{t.type="revokeOfferSponsorship",t.seller=Po(n.offer().sellerId()),t.offerId=n.offer().offerId().toString();break}case Qn.default.LedgerEntryType.data().name:{t.type="revokeDataSponsorship",t.account=Po(n.data().accountId()),t.name=n.data().dataName().toString("ascii");break}case Qn.default.LedgerEntryType.claimableBalance().name:{t.type="revokeClaimableBalanceSponsorship",t.balanceId=n.claimableBalance().balanceId().toXDR("hex");break}case Qn.default.LedgerEntryType.liquidityPool().name:{t.type="revokeLiquidityPoolSponsorship",t.liquidityPoolId=n.liquidityPool().liquidityPoolId().toString("hex");break}default:throw new Error("Unknown ledgerKey: ".concat(e.switch().name))}break}case"revokeSponsorshipSigner":{t.type="revokeSignerSponsorship",t.account=Po(e.signer().accountId()),t.signer=cA(e.signer().signerKey());break}default:throw new Error("Unknown revokeSponsorship: ".concat(e.switch().name))}}function cA(e){var t={};switch(e.switch().name){case Qn.default.SignerKeyType.signerKeyTypeEd25519().name:{t.ed25519PublicKey=Vf.StrKey.encodeEd25519PublicKey(e.ed25519());break}case Qn.default.SignerKeyType.signerKeyTypePreAuthTx().name:{t.preAuthTx=e.preAuthTx().toString("hex");break}case Qn.default.SignerKeyType.signerKeyTypeHashX().name:{t.sha256Hash=e.hashX().toString("hex");break}default:throw new Error("Unknown signerKey: ".concat(e.switch().name))}return t}function Po(e){return Vf.StrKey.encodeEd25519PublicKey(e.ed25519())}Xr.accountMerge=zr.accountMerge;Xr.allowTrust=zr.allowTrust;Xr.bumpSequence=zr.bumpSequence;Xr.changeTrust=zr.changeTrust;Xr.createAccount=zr.createAccount;Xr.createClaimableBalance=zr.createClaimableBalance;Xr.claimClaimableBalance=zr.claimClaimableBalance;Xr.clawbackClaimableBalance=zr.clawbackClaimableBalance;Xr.createPassiveSellOffer=zr.createPassiveSellOffer;Xr.inflation=zr.inflation;Xr.manageData=zr.manageData;Xr.manageSellOffer=zr.manageSellOffer;Xr.manageBuyOffer=zr.manageBuyOffer;Xr.pathPaymentStrictReceive=zr.pathPaymentStrictReceive;Xr.pathPaymentStrictSend=zr.pathPaymentStrictSend;Xr.payment=zr.payment;Xr.setOptions=zr.setOptions;Xr.beginSponsoringFutureReserves=zr.beginSponsoringFutureReserves;Xr.endSponsoringFutureReserves=zr.endSponsoringFutureReserves;Xr.revokeAccountSponsorship=zr.revokeAccountSponsorship;Xr.revokeTrustlineSponsorship=zr.revokeTrustlineSponsorship;Xr.revokeOfferSponsorship=zr.revokeOfferSponsorship;Xr.revokeDataSponsorship=zr.revokeDataSponsorship;Xr.revokeClaimableBalanceSponsorship=zr.revokeClaimableBalanceSponsorship;Xr.revokeLiquidityPoolSponsorship=zr.revokeLiquidityPoolSponsorship;Xr.revokeSignerSponsorship=zr.revokeSignerSponsorship;Xr.clawback=zr.clawback;Xr.setTrustLineFlags=zr.setTrustLineFlags;Xr.liquidityPoolDeposit=zr.liquidityPoolDeposit;Xr.liquidityPoolWithdraw=zr.liquidityPoolWithdraw;Xr.invokeHostFunction=zr.invokeHostFunction;Xr.extendFootprintTtl=zr.extendFootprintTtl;Xr.restoreFootprint=zr.restoreFootprint;Xr.createStellarAssetContract=zr.createStellarAssetContract;Xr.invokeContractFunction=zr.invokeContractFunction;Xr.createCustomContract=zr.createCustomContract;Xr.uploadContractWasm=zr.uploadContractWasm});var ec=Jt(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});so.MemoText=so.MemoReturn=so.MemoNone=so.MemoID=so.MemoHash=so.Memo=void 0;var lA=$n(),fA=sm(pi()),ga=sm(Rr());function sm(e){return e&&e.__esModule?e:{default:e}}function As(e){"@babel/helpers - typeof";return As=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},As(e)}function pA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function am(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,dA(o.key),o)}}function hA(e,t,n){return t&&am(e.prototype,t),n&&am(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dA(e){var t=yA(e,"string");return As(t)=="symbol"?t:t+""}function yA(e,t){if(As(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(As(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $u=so.MemoNone="none",Qu=so.MemoID="id",Yu=so.MemoText="text",Ju=so.MemoHash="hash",Zu=so.MemoReturn="return",oP=so.Memo=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;switch(pA(this,e),this._type=t,this._value=n,this._type){case $u:break;case Qu:e._validateIdValue(n);break;case Yu:e._validateTextValue(n);break;case Ju:case Zu:e._validateHashValue(n),typeof n=="string"&&(this._value=Buffer.from(n,"hex"));break;default:throw new Error("Invalid memo type")}}return hA(e,[{key:"type",get:function(){return this._type},set:function(n){throw new Error("Memo is immutable")}},{key:"value",get:function(){switch(this._type){case $u:return null;case Qu:case Yu:return this._value;case Ju:case Zu:return Buffer.from(this._value);default:throw new Error("Invalid memo type")}},set:function(n){throw new Error("Memo is immutable")}},{key:"toXDRObject",value:function(){switch(this._type){case $u:return ga.default.Memo.memoNone();case Qu:return ga.default.Memo.memoId(lA.UnsignedHyper.fromString(this._value));case Yu:return ga.default.Memo.memoText(this._value);case Ju:return ga.default.Memo.memoHash(this._value);case Zu:return ga.default.Memo.memoReturn(this._value);default:return null}}}],[{key:"_validateIdValue",value:function(n){var o=new Error("Expects a int64 as a string. Got ".concat(n));if(typeof n!="string")throw o;var a;try{a=new fA.default(n)}catch{throw o}if(!a.isFinite()||a.isNaN())throw o}},{key:"_validateTextValue",value:function(n){if(!ga.default.Memo.armTypeForArm("text").isValid(n))throw new Error("Expects string, array or buffer, max 28 bytes")}},{key:"_validateHashValue",value:function(n){var o=new Error("Expects a 32 byte hash value or hex encoded string. Got ".concat(n));if(n===null||typeof n>"u")throw o;var a;if(typeof n=="string"){if(!/^[0-9A-Fa-f]{64}$/g.test(n))throw o;a=Buffer.from(n,"hex")}else if(Buffer.isBuffer(n))a=Buffer.from(n);else throw o;if(!a.length||a.length!==32)throw o}},{key:"none",value:function(){return new e($u)}},{key:"text",value:function(n){return new e(Yu,n)}},{key:"id",value:function(n){return new e(Qu,n)}},{key:"hash",value:function(n){return new e(Ju,n)}},{key:"return",value:function(n){return new e(Zu,n)}},{key:"fromXDRObject",value:function(n){switch(n.arm()){case"id":return e.id(n.value().toString());case"text":return e.text(n.value());case"hash":return e.hash(n.value());case"retHash":return e.return(n.value());default:break}if(typeof n.value()>"u")return e.none();throw new Error("Unknown type")}}])}()});var nc=Jt(rc=>{"use strict";function va(e){"@babel/helpers - typeof";return va=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},va(e)}Object.defineProperty(rc,"__esModule",{value:!0});rc.Transaction=void 0;var cn=vA(Rr()),um=Wo(),cm=_n(),lm=Wu(),mA=ec(),gA=Iu(),fm=bo();function vA(e){return e&&e.__esModule?e:{default:e}}function bA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pm(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,SA(o.key),o)}}function wA(e,t,n){return t&&pm(e.prototype,t),n&&pm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function SA(e){var t=AA(e,"string");return va(t)=="symbol"?t:t+""}function AA(e,t){if(va(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(va(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _A(e,t,n){return t=tc(t),EA(e,hm()?Reflect.construct(t,n||[],tc(e).constructor):t.apply(e,n))}function EA(e,t){if(t&&(va(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return TA(e)}function TA(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hm=function(){return!!e})()}function tc(e){return tc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},tc(e)}function kA(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kf(e,t)}function Kf(e,t){return Kf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Kf(e,t)}var aP=rc.Transaction=function(e){function t(n,o){var a;if(bA(this,t),typeof n=="string"){var i=Buffer.from(n,"base64");n=cn.default.TransactionEnvelope.fromXDR(i)}var s=n.switch();if(!(s===cn.default.EnvelopeType.envelopeTypeTxV0()||s===cn.default.EnvelopeType.envelopeTypeTx()))throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an ".concat(s.name,"."));var f=n.value(),u=f.tx(),r=u.fee().toString(),_=(f.signatures()||[]).slice();switch(a=_A(this,t,[u,_,r,o]),a._envelopeType=s,a._memo=u.memo(),a._sequence=u.seqNum().toString(),a._envelopeType){case cn.default.EnvelopeType.envelopeTypeTxV0():a._source=cm.StrKey.encodeEd25519PublicKey(a.tx.sourceAccountEd25519());break;default:a._source=(0,fm.encodeMuxedAccountToAddress)(a.tx.sourceAccount());break}var d=null,b=null;switch(a._envelopeType){case cn.default.EnvelopeType.envelopeTypeTxV0():b=u.timeBounds();break;case cn.default.EnvelopeType.envelopeTypeTx():switch(u.cond().switch()){case cn.default.PreconditionType.precondTime():b=u.cond().timeBounds();break;case cn.default.PreconditionType.precondV2():d=u.cond().v2(),b=d.timeBounds();break;default:break}break;default:break}if(b&&(a._timeBounds={minTime:b.minTime().toString(),maxTime:b.maxTime().toString()}),d){var T=d.ledgerBounds();T&&(a._ledgerBounds={minLedger:T.minLedger(),maxLedger:T.maxLedger()});var w=d.minSeqNum();w&&(a._minAccountSequence=w.toString()),a._minAccountSequenceAge=d.minSeqAge(),a._minAccountSequenceLedgerGap=d.minSeqLedgerGap(),a._extraSigners=d.extraSigners()}var g=u.operations()||[];return a._operations=g.map(function(p){return lm.Operation.fromXDRObject(p)}),a}return kA(t,e),wA(t,[{key:"timeBounds",get:function(){return this._timeBounds},set:function(o){throw new Error("Transaction is immutable")}},{key:"ledgerBounds",get:function(){return this._ledgerBounds},set:function(o){throw new Error("Transaction is immutable")}},{key:"minAccountSequence",get:function(){return this._minAccountSequence},set:function(o){throw new Error("Transaction is immutable")}},{key:"minAccountSequenceAge",get:function(){return this._minAccountSequenceAge},set:function(o){throw new Error("Transaction is immutable")}},{key:"minAccountSequenceLedgerGap",get:function(){return this._minAccountSequenceLedgerGap},set:function(o){throw new Error("Transaction is immutable")}},{key:"extraSigners",get:function(){return this._extraSigners},set:function(o){throw new Error("Transaction is immutable")}},{key:"sequence",get:function(){return this._sequence},set:function(o){throw new Error("Transaction is immutable")}},{key:"source",get:function(){return this._source},set:function(o){throw new Error("Transaction is immutable")}},{key:"operations",get:function(){return this._operations},set:function(o){throw new Error("Transaction is immutable")}},{key:"memo",get:function(){return mA.Memo.fromXDRObject(this._memo)},set:function(o){throw new Error("Transaction is immutable")}},{key:"signatureBase",value:function(){var o=this.tx;this._envelopeType===cn.default.EnvelopeType.envelopeTypeTxV0()&&(o=cn.default.Transaction.fromXDR(Buffer.concat([cn.default.PublicKeyType.publicKeyTypeEd25519().toXDR(),o.toXDR()])));var a=new cn.default.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTx(o),i=new cn.default.TransactionSignaturePayload({networkId:cn.default.Hash.fromXDR((0,um.hash)(this.networkPassphrase)),taggedTransaction:a});return i.toXDR()}},{key:"toEnvelope",value:function(){var o=this.tx.toXDR(),a=this.signatures.slice(),i;switch(this._envelopeType){case cn.default.EnvelopeType.envelopeTypeTxV0():i=new cn.default.TransactionEnvelope.envelopeTypeTxV0(new cn.default.TransactionV0Envelope({tx:cn.default.TransactionV0.fromXDR(o),signatures:a}));break;case cn.default.EnvelopeType.envelopeTypeTx():i=new cn.default.TransactionEnvelope.envelopeTypeTx(new cn.default.TransactionV1Envelope({tx:cn.default.Transaction.fromXDR(o),signatures:a}));break;default:throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an ".concat(this._envelopeType.name,"."))}return i}},{key:"getClaimableBalanceId",value:function(o){if(!Number.isInteger(o)||o<0||o>=this.operations.length)throw new RangeError("invalid operation index");var a=this.operations[o];try{a=lm.Operation.createClaimableBalance(a)}catch(r){throw new TypeError("expected createClaimableBalance, got ".concat(a.type,": ").concat(r))}var i=cm.StrKey.decodeEd25519PublicKey((0,fm.extractBaseAddress)(this.source)),s=cn.default.HashIdPreimage.envelopeTypeOpId(new cn.default.HashIdPreimageOperationId({sourceAccount:cn.default.AccountId.publicKeyTypeEd25519(i),seqNum:cn.default.SequenceNumber.fromString(this.sequence),opNum:o})),f=(0,um.hash)(s.toXDR("raw")),u=cn.default.ClaimableBalanceId.claimableBalanceIdTypeV0(f);return u.toXDR("hex")}}])}(gA.TransactionBase)});var zf=Jt(ic=>{"use strict";function ba(e){"@babel/helpers - typeof";return ba=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ba(e)}Object.defineProperty(ic,"__esModule",{value:!0});ic.FeeBumpTransaction=void 0;var ei=IA(Rr()),OA=Wo(),PA=nc(),xA=Iu(),RA=bo();function IA(e){return e&&e.__esModule?e:{default:e}}function CA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dm(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,jA(o.key),o)}}function BA(e,t,n){return t&&dm(e.prototype,t),n&&dm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jA(e){var t=LA(e,"string");return ba(t)=="symbol"?t:t+""}function LA(e,t){if(ba(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(ba(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NA(e,t,n){return t=oc(t),UA(e,ym()?Reflect.construct(t,n||[],oc(e).constructor):t.apply(e,n))}function UA(e,t){if(t&&(ba(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return MA(e)}function MA(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ym(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ym=function(){return!!e})()}function oc(e){return oc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},oc(e)}function FA(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hf(e,t)}function Hf(e,t){return Hf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Hf(e,t)}var uP=ic.FeeBumpTransaction=function(e){function t(n,o){var a;if(CA(this,t),typeof n=="string"){var i=Buffer.from(n,"base64");n=ei.default.TransactionEnvelope.fromXDR(i)}var s=n.switch();if(s!==ei.default.EnvelopeType.envelopeTypeTxFeeBump())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxFeeBump but received an ".concat(s.name,"."));var f=n.value(),u=f.tx(),r=u.fee().toString(),_=(f.signatures()||[]).slice();a=NA(this,t,[u,_,r,o]);var d=ei.default.TransactionEnvelope.envelopeTypeTx(u.innerTx().v1());return a._feeSource=(0,RA.encodeMuxedAccountToAddress)(a.tx.feeSource()),a._innerTransaction=new PA.Transaction(d,o),a}return FA(t,e),BA(t,[{key:"innerTransaction",get:function(){return this._innerTransaction}},{key:"operations",get:function(){return this._innerTransaction.operations}},{key:"feeSource",get:function(){return this._feeSource}},{key:"signatureBase",value:function(){var o=new ei.default.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTxFeeBump(this.tx),a=new ei.default.TransactionSignaturePayload({networkId:ei.default.Hash.fromXDR((0,OA.hash)(this.networkPassphrase)),taggedTransaction:o});return a.toXDR()}},{key:"toEnvelope",value:function(){var o=new ei.default.FeeBumpTransactionEnvelope({tx:ei.default.FeeBumpTransaction.fromXDR(this.tx.toXDR()),signatures:this.signatures.slice()});return new ei.default.TransactionEnvelope.envelopeTypeTxFeeBump(o)}}])}(xA.TransactionBase)});var sc=Jt(ac=>{"use strict";Object.defineProperty(ac,"__esModule",{value:!0});ac.Account=void 0;var DA=qA(pi()),mm=_n();function qA(e){return e&&e.__esModule?e:{default:e}}function _s(e){"@babel/helpers - typeof";return _s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_s(e)}function VA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gm(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,HA(o.key),o)}}function KA(e,t,n){return t&&gm(e.prototype,t),n&&gm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function HA(e){var t=zA(e,"string");return _s(t)=="symbol"?t:t+""}function zA(e,t){if(_s(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(_s(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lP=ac.Account=function(){function e(t,n){if(VA(this,e),mm.StrKey.isValidMed25519PublicKey(t))throw new Error("accountId is an M-address; use MuxedAccount instead");if(!mm.StrKey.isValidEd25519PublicKey(t))throw new Error("accountId is invalid");if(typeof n!="string")throw new Error("sequence must be of type string");this._accountId=t,this.sequence=new DA.default(n)}return KA(e,[{key:"accountId",value:function(){return this._accountId}},{key:"sequenceNumber",value:function(){return this.sequence.toString()}},{key:"incrementSequenceNumber",value:function(){this.sequence=this.sequence.plus(1)}}])}()});var Xf=Jt(uc=>{"use strict";Object.defineProperty(uc,"__esModule",{value:!0});uc.MuxedAccount=void 0;var XA=$A(Rr()),GA=sc(),WA=_n(),Es=bo();function $A(e){return e&&e.__esModule?e:{default:e}}function Ts(e){"@babel/helpers - typeof";return Ts=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ts(e)}function QA(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vm(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,JA(o.key),o)}}function YA(e,t,n){return t&&vm(e.prototype,t),n&&vm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function JA(e){var t=ZA(e,"string");return Ts(t)=="symbol"?t:t+""}function ZA(e,t){if(Ts(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Ts(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pP=uc.MuxedAccount=function(){function e(t,n){QA(this,e);var o=t.accountId();if(!WA.StrKey.isValidEd25519PublicKey(o))throw new Error("accountId is invalid");this.account=t,this._muxedXdr=(0,Es.encodeMuxedAccount)(o,n),this._mAddress=(0,Es.encodeMuxedAccountToAddress)(this._muxedXdr),this._id=n}return YA(e,[{key:"baseAccount",value:function(){return this.account}},{key:"accountId",value:function(){return this._mAddress}},{key:"id",value:function(){return this._id}},{key:"setId",value:function(n){if(typeof n!="string")throw new Error("id should be a string representing a number (uint64)");return this._muxedXdr.med25519().id(XA.default.Uint64.fromString(n)),this._mAddress=(0,Es.encodeMuxedAccountToAddress)(this._muxedXdr),this._id=n,this}},{key:"sequenceNumber",value:function(){return this.account.sequenceNumber()}},{key:"incrementSequenceNumber",value:function(){return this.account.incrementSequenceNumber()}},{key:"toXDRObject",value:function(){return this._muxedXdr}},{key:"equals",value:function(n){return this.accountId()===n.accountId()}}],[{key:"fromAddress",value:function(n,o){var a=(0,Es.decodeAddressToMuxedAccount)(n),i=(0,Es.extractBaseAddress)(n),s=a.med25519().id().toString();return new e(new GA.Account(i,o),s)}}])}()});var Gf=Jt(cc=>{"use strict";Object.defineProperty(cc,"__esModule",{value:!0});cc.SorobanDataBuilder=void 0;var di=e_(Rr());function e_(e){return e&&e.__esModule?e:{default:e}}function ks(e){"@babel/helpers - typeof";return ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ks(e)}function t_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bm(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,wm(o.key),o)}}function r_(e,t,n){return t&&bm(e.prototype,t),n&&bm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function n_(e,t,n){return(t=wm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wm(e){var t=o_(e,"string");return ks(t)=="symbol"?t:t+""}function o_(e,t){if(ks(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(ks(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dP=cc.SorobanDataBuilder=function(){function e(t){t_(this,e),n_(this,"_data",void 0);var n;t?typeof t=="string"||ArrayBuffer.isView(t)?n=e.fromXDR(t):n=e.fromXDR(t.toXDR()):n=new di.default.SorobanTransactionData({resources:new di.default.SorobanResources({footprint:new di.default.LedgerFootprint({readOnly:[],readWrite:[]}),instructions:0,readBytes:0,writeBytes:0}),ext:new di.default.ExtensionPoint(0),resourceFee:new di.default.Int64(0)}),this._data=n}return r_(e,[{key:"setResourceFee",value:function(n){return this._data.resourceFee(new di.default.Int64(n)),this}},{key:"setResources",value:function(n,o,a){return this._data.resources().instructions(n),this._data.resources().readBytes(o),this._data.resources().writeBytes(a),this}},{key:"appendFootprint",value:function(n,o){return this.setFootprint(this.getReadOnly().concat(n),this.getReadWrite().concat(o))}},{key:"setFootprint",value:function(n,o){return n!==null&&this.setReadOnly(n),o!==null&&this.setReadWrite(o),this}},{key:"setReadOnly",value:function(n){return this._data.resources().footprint().readOnly(n??[]),this}},{key:"setReadWrite",value:function(n){return this._data.resources().footprint().readWrite(n??[]),this}},{key:"build",value:function(){return di.default.SorobanTransactionData.fromXDR(this._data.toXDR())}},{key:"getReadOnly",value:function(){return this.getFootprint().readOnly()}},{key:"getReadWrite",value:function(){return this.getFootprint().readWrite()}},{key:"getFootprint",value:function(){return this._data.resources().footprint()}}],[{key:"fromXDR",value:function(n){return di.default.SorobanTransactionData.fromXDR(n,typeof n=="string"?"base64":"raw")}}])}()});var $f=Jt(lc=>{"use strict";Object.defineProperty(lc,"__esModule",{value:!0});lc.SignerKey=void 0;var ti=i_(Rr()),Wf=_n();function i_(e){return e&&e.__esModule?e:{default:e}}function Os(e){"@babel/helpers - typeof";return Os=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Os(e)}function a_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sm(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,u_(o.key),o)}}function s_(e,t,n){return t&&Sm(e.prototype,t),n&&Sm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u_(e){var t=c_(e,"string");return Os(t)=="symbol"?t:t+""}function c_(e,t){if(Os(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Os(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mP=lc.SignerKey=function(){function e(){a_(this,e)}return s_(e,null,[{key:"decodeAddress",value:function(n){var o={ed25519PublicKey:ti.default.SignerKey.signerKeyTypeEd25519,preAuthTx:ti.default.SignerKey.signerKeyTypePreAuthTx,sha256Hash:ti.default.SignerKey.signerKeyTypeHashX,signedPayload:ti.default.SignerKey.signerKeyTypeEd25519SignedPayload},a=Wf.StrKey.getVersionByteForPrefix(n),i=o[a];if(!i)throw new Error("invalid signer key type (".concat(a,")"));var s=(0,Wf.decodeCheck)(a,n);switch(a){case"signedPayload":return i(new ti.default.SignerKeyEd25519SignedPayload({ed25519:s.slice(0,32),payload:s.slice(36)}));case"ed25519PublicKey":case"preAuthTx":case"sha256Hash":default:return i(s)}}},{key:"encodeSignerKey",value:function(n){var o,a;switch(n.switch()){case ti.default.SignerKeyType.signerKeyTypeEd25519():o="ed25519PublicKey",a=n.value();break;case ti.default.SignerKeyType.signerKeyTypePreAuthTx():o="preAuthTx",a=n.value();break;case ti.default.SignerKeyType.signerKeyTypeHashX():o="sha256Hash",a=n.value();break;case ti.default.SignerKeyType.signerKeyTypeEd25519SignedPayload():o="signedPayload",a=n.ed25519SignedPayload().toXDR("raw");break;default:throw new Error("invalid SignerKey (type: ".concat(n.switch(),")"))}return(0,Wf.encodeCheck)(o,a)}}])}()});var Cm=Jt(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.TransactionBuilder=ri.TimeoutInfinite=ri.BASE_FEE=void 0;ri.isValidDate=ep;var Qf=$n(),Ps=Rm(pi()),un=Rm(Rr()),l_=sc(),f_=Xf(),Am=bo(),Yf=nc(),_m=zf(),Em=Gf(),Tm=_n(),p_=$f(),h_=ec();function Rm(e){return e&&e.__esModule?e:{default:e}}function xs(e){"@babel/helpers - typeof";return xs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xs(e)}function km(e){return g_(e)||m_(e)||y_(e)||d_()}function d_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y_(e,t){if(e){if(typeof e=="string")return Zf(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zf(e,t):void 0}}function m_(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function g_(e){if(Array.isArray(e))return Zf(e)}function Zf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function Om(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,o)}return n}function Jf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Om(Object(n),!0).forEach(function(o){v_(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Om(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function v_(e,t,n){return(t=Im(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pm(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Im(o.key),o)}}function w_(e,t,n){return t&&Pm(e.prototype,t),n&&Pm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Im(e){var t=S_(e,"string");return xs(t)=="symbol"?t:t+""}function S_(e,t){if(xs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(xs(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xm=ri.BASE_FEE="100",vP=ri.TimeoutInfinite=0,bP=ri.TransactionBuilder=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(b_(this,e),!t)throw new Error("must specify source account for the transaction");if(n.fee===void 0)throw new Error("must specify fee for the transaction (in stroops)");this.source=t,this.operations=[],this.baseFee=n.fee,this.timebounds=n.timebounds?Jf({},n.timebounds):null,this.ledgerbounds=n.ledgerbounds?Jf({},n.ledgerbounds):null,this.minAccountSequence=n.minAccountSequence||null,this.minAccountSequenceAge=n.minAccountSequenceAge||null,this.minAccountSequenceLedgerGap=n.minAccountSequenceLedgerGap||null,this.extraSigners=n.extraSigners?km(n.extraSigners):null,this.memo=n.memo||h_.Memo.none(),this.networkPassphrase=n.networkPassphrase||null,this.sorobanData=n.sorobanData?new Em.SorobanDataBuilder(n.sorobanData).build():null}return w_(e,[{key:"addOperation",value:function(n){return this.operations.push(n),this}},{key:"clearOperations",value:function(){return this.operations=[],this}},{key:"addMemo",value:function(n){return this.memo=n,this}},{key:"setTimeout",value:function(n){if(this.timebounds!==null&&this.timebounds.maxTime>0)throw new Error("TimeBounds.max_time has been already set - setting timeout would overwrite it.");if(n<0)throw new Error("timeout cannot be negative");if(n>0){var o=Math.floor(Date.now()/1e3)+n;this.timebounds===null?this.timebounds={minTime:0,maxTime:o}:this.timebounds={minTime:this.timebounds.minTime,maxTime:o}}else this.timebounds={minTime:0,maxTime:0};return this}},{key:"setTimebounds",value:function(n,o){if(typeof n=="number"&&(n=new Date(n*1e3)),typeof o=="number"&&(o=new Date(o*1e3)),this.timebounds!==null)throw new Error("TimeBounds has been already set - setting timebounds would overwrite it.");var a=Math.floor(n.valueOf()/1e3),i=Math.floor(o.valueOf()/1e3);if(a<0)throw new Error("min_time cannot be negative");if(i<0)throw new Error("max_time cannot be negative");if(i>0&&a>i)throw new Error("min_time cannot be greater than max_time");return this.timebounds={minTime:a,maxTime:i},this}},{key:"setLedgerbounds",value:function(n,o){if(this.ledgerbounds!==null)throw new Error("LedgerBounds has been already set - setting ledgerbounds would overwrite it.");if(n<0)throw new Error("min_ledger cannot be negative");if(o<0)throw new Error("max_ledger cannot be negative");if(o>0&&n>o)throw new Error("min_ledger cannot be greater than max_ledger");return this.ledgerbounds={minLedger:n,maxLedger:o},this}},{key:"setMinAccountSequence",value:function(n){if(this.minAccountSequence!==null)throw new Error("min_account_sequence has been already set - setting min_account_sequence would overwrite it.");return this.minAccountSequence=n,this}},{key:"setMinAccountSequenceAge",value:function(n){if(typeof n!="number")throw new Error("min_account_sequence_age must be a number");if(this.minAccountSequenceAge!==null)throw new Error("min_account_sequence_age has been already set - setting min_account_sequence_age would overwrite it.");if(n<0)throw new Error("min_account_sequence_age cannot be negative");return this.minAccountSequenceAge=n,this}},{key:"setMinAccountSequenceLedgerGap",value:function(n){if(this.minAccountSequenceLedgerGap!==null)throw new Error("min_account_sequence_ledger_gap has been already set - setting min_account_sequence_ledger_gap would overwrite it.");if(n<0)throw new Error("min_account_sequence_ledger_gap cannot be negative");return this.minAccountSequenceLedgerGap=n,this}},{key:"setExtraSigners",value:function(n){if(!Array.isArray(n))throw new Error("extra_signers must be an array of strings.");if(this.extraSigners!==null)throw new Error("extra_signers has been already set - setting extra_signers would overwrite it.");if(n.length>2)throw new Error("extra_signers cannot be longer than 2 elements.");return this.extraSigners=km(n),this}},{key:"setNetworkPassphrase",value:function(n){return this.networkPassphrase=n,this}},{key:"setSorobanData",value:function(n){return this.sorobanData=new Em.SorobanDataBuilder(n).build(),this}},{key:"build",value:function(){var n=new Ps.default(this.source.sequenceNumber()).plus(1),o=new Ps.default(this.baseFee).times(this.operations.length).toNumber(),a={fee:o,seqNum:un.default.SequenceNumber.fromString(n.toString()),memo:this.memo?this.memo.toXDRObject():null};if(this.timebounds===null||typeof this.timebounds.minTime>"u"||typeof this.timebounds.maxTime>"u")throw new Error("TimeBounds has to be set or you must call setTimeout(TimeoutInfinite).");ep(this.timebounds.minTime)&&(this.timebounds.minTime=this.timebounds.minTime.getTime()/1e3),ep(this.timebounds.maxTime)&&(this.timebounds.maxTime=this.timebounds.maxTime.getTime()/1e3),this.timebounds.minTime=Qf.UnsignedHyper.fromString(this.timebounds.minTime.toString()),this.timebounds.maxTime=Qf.UnsignedHyper.fromString(this.timebounds.maxTime.toString());var i=new un.default.TimeBounds(this.timebounds);if(this.hasV2Preconditions()){var s=null;this.ledgerbounds!==null&&(s=new un.default.LedgerBounds(this.ledgerbounds));var f=this.minAccountSequence||"0";f=un.default.SequenceNumber.fromString(f);var u=Qf.UnsignedHyper.fromString(this.minAccountSequenceAge!==null?this.minAccountSequenceAge.toString():"0"),r=this.minAccountSequenceLedgerGap||0,_=this.extraSigners!==null?this.extraSigners.map(p_.SignerKey.decodeAddress):[];a.cond=un.default.Preconditions.precondV2(new un.default.PreconditionsV2({timeBounds:i,ledgerBounds:s,minSeqNum:f,minSeqAge:u,minSeqLedgerGap:r,extraSigners:_}))}else a.cond=un.default.Preconditions.precondTime(i);a.sourceAccount=(0,Am.decodeAddressToMuxedAccount)(this.source.accountId()),this.sorobanData?a.ext=new un.default.TransactionExt(1,this.sorobanData):a.ext=new un.default.TransactionExt(0,un.default.Void);var d=new un.default.Transaction(a);d.operations(this.operations);var b=new un.default.TransactionEnvelope.envelopeTypeTx(new un.default.TransactionV1Envelope({tx:d})),T=new Yf.Transaction(b,this.networkPassphrase);return this.source.incrementSequenceNumber(),T}},{key:"hasV2Preconditions",value:function(){return this.ledgerbounds!==null||this.minAccountSequence!==null||this.minAccountSequenceAge!==null||this.minAccountSequenceLedgerGap!==null||this.extraSigners!==null&&this.extraSigners.length>0}}],[{key:"cloneFrom",value:function(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(n instanceof Yf.Transaction))throw new TypeError("expected a 'Transaction', got: ".concat(n));var a=(BigInt(n.sequence)-1n).toString(),i;if(Tm.StrKey.isValidMed25519PublicKey(n.source))i=f_.MuxedAccount.fromAddress(n.source,a);else if(Tm.StrKey.isValidEd25519PublicKey(n.source))i=new l_.Account(n.source,a);else throw new TypeError("unsupported tx source account: ".concat(n.source));var s=parseInt(n.fee,10)/n.operations.length,f=new e(i,Jf({fee:(s||xm).toString(),memo:n.memo,networkPassphrase:n.networkPassphrase,timebounds:n.timeBounds,ledgerbounds:n.ledgerBounds,minAccountSequence:n.minAccountSequence,minAccountSequenceAge:n.minAccountSequenceAge,minAccountSequenceLedgerGap:n.minAccountSequenceLedgerGap,extraSigners:n.extraSigners},o));return n._tx.operations().forEach(function(u){return f.addOperation(u)}),f}},{key:"buildFeeBumpTransaction",value:function(n,o,a,i){var s=a.operations.length,f=new Ps.default(a.fee).div(s),u=new Ps.default(o);if(u.lt(f))throw new Error("Invalid baseFee, it should be at least ".concat(f," stroops."));var r=new Ps.default(xm);if(u.lt(r))throw new Error("Invalid baseFee, it should be at least ".concat(r," stroops."));var _=a.toEnvelope();if(_.switch()===un.default.EnvelopeType.envelopeTypeTxV0()){var d=_.v0().tx(),b=new un.default.Transaction({sourceAccount:new un.default.MuxedAccount.keyTypeEd25519(d.sourceAccountEd25519()),fee:d.fee(),seqNum:d.seqNum(),cond:un.default.Preconditions.precondTime(d.timeBounds()),memo:d.memo(),operations:d.operations(),ext:new un.default.TransactionExt(0)});_=new un.default.TransactionEnvelope.envelopeTypeTx(new un.default.TransactionV1Envelope({tx:b,signatures:_.v0().signatures()}))}var T;typeof n=="string"?T=(0,Am.decodeAddressToMuxedAccount)(n):T=n.xdrMuxedAccount();var w=new un.default.FeeBumpTransaction({feeSource:T,fee:un.default.Int64.fromString(u.times(s+1).toString()),innerTx:un.default.FeeBumpTransactionInnerTx.envelopeTypeTx(_.v1()),ext:new un.default.FeeBumpTransactionExt(0)}),g=new un.default.FeeBumpTransactionEnvelope({tx:w,signatures:[]}),p=new un.default.TransactionEnvelope.envelopeTypeTxFeeBump(g);return new _m.FeeBumpTransaction(p,i)}},{key:"fromXDR",value:function(n,o){return typeof n=="string"&&(n=un.default.TransactionEnvelope.fromXDR(n,"base64")),n.switch()===un.default.EnvelopeType.envelopeTypeTxFeeBump()?new _m.FeeBumpTransaction(n,o):new Yf.Transaction(n,o)}}])}();function ep(e){return e instanceof Date&&!isNaN(e)}});var tp=Jt(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});fc.Networks=void 0;var SP=fc.Networks={PUBLIC:"Public Global Stellar Network ; September 2015",TESTNET:"Test SDF Network ; September 2015",FUTURENET:"Test SDF Future Network ; October 2022",SANDBOX:"Local Sandbox Stellar Network ; September 2022",STANDALONE:"Standalone Network ; February 2017"}});var Lm=Jt(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});pc.Soroban=void 0;function Rs(e){"@babel/helpers - typeof";return Rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rs(e)}function A_(e){return k_(e)||T_(e)||E_(e)||__()}function __(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
5
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function E_(e,t){if(e){if(typeof e=="string")return Bm(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bm(e,t):void 0}}function Bm(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function T_(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function k_(e){if(Array.isArray(e))return e}function O_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jm(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,x_(o.key),o)}}function P_(e,t,n){return t&&jm(e.prototype,t),n&&jm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function x_(e){var t=R_(e,"string");return Rs(t)=="symbol"?t:t+""}function R_(e,t){if(Rs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Rs(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _P=pc.Soroban=function(){function e(){O_(this,e)}return P_(e,null,[{key:"formatTokenAmount",value:function(n,o){if(n.includes("."))throw new TypeError("No decimals are allowed");var a=n;return o>0&&(o>a.length?a=["0",a.toString().padStart(o,"0")].join("."):a=[a.slice(0,-o),a.slice(-o)].join(".")),a.replace(/(\.\d*?)0+$/,"$1")}},{key:"parseTokenAmount",value:function(n,o){var a,i=n.split(".").slice(),s=A_(i),f=s[0],u=s[1],r=s.slice(2);if(r.length)throw new Error("Invalid decimal value: ".concat(n));var _=BigInt(f+((a=u?.padEnd(o,"0"))!==null&&a!==void 0?a:"0".repeat(o)));return _.toString()}}])}()});var rp=Jt(dc=>{"use strict";Object.defineProperty(dc,"__esModule",{value:!0});dc.Contract=void 0;var I_=Mi(),C_=Wu(),hc=B_(Rr()),Nm=_n();function B_(e){return e&&e.__esModule?e:{default:e}}function Is(e){"@babel/helpers - typeof";return Is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Is(e)}function j_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Um(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,N_(o.key),o)}}function L_(e,t,n){return t&&Um(e.prototype,t),n&&Um(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function N_(e){var t=U_(e,"string");return Is(t)=="symbol"?t:t+""}function U_(e,t){if(Is(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Is(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var TP=dc.Contract=function(){function e(t){j_(this,e);try{this._id=Nm.StrKey.decodeContract(t)}catch{throw new Error("Invalid contract ID: ".concat(t))}}return L_(e,[{key:"contractId",value:function(){return Nm.StrKey.encodeContract(this._id)}},{key:"toString",value:function(){return this.contractId()}},{key:"address",value:function(){return I_.Address.contract(this._id)}},{key:"call",value:function(n){for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];return C_.Operation.invokeContractFunction({contract:this.address().toString(),function:n,args:a})}},{key:"getFootprint",value:function(){return hc.default.LedgerKey.contractData(new hc.default.LedgerKeyContractData({contract:this.address().toScAddress(),key:hc.default.ScVal.scvLedgerKeyContractInstance(),durability:hc.default.ContractDataDurability.persistent()}))}}])}()});var op=Jt(mc=>{"use strict";function wa(e){"@babel/helpers - typeof";return wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wa(e)}Object.defineProperty(mc,"__esModule",{value:!0});mc.Uint128=void 0;var M_=$n();function F_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mm(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,q_(o.key),o)}}function D_(e,t,n){return t&&Mm(e.prototype,t),n&&Mm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function q_(e){var t=V_(e,"string");return wa(t)=="symbol"?t:t+""}function V_(e,t){if(wa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(wa(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function K_(e,t,n){return t=yc(t),H_(e,Fm()?Reflect.construct(t,n||[],yc(e).constructor):t.apply(e,n))}function H_(e,t){if(t&&(wa(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return z_(e)}function z_(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Fm=function(){return!!e})()}function yc(e){return yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yc(e)}function X_(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&np(e,t)}function np(e,t){return np=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},np(e,t)}var G_=mc.Uint128=function(e){function t(){F_(this,t);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return K_(this,t,[o])}return X_(t,e),D_(t,[{key:"unsigned",get:function(){return!0}},{key:"size",get:function(){return 128}}])}(M_.LargeInt);G_.defineIntBoundaries()});var ap=Jt(vc=>{"use strict";function Sa(e){"@babel/helpers - typeof";return Sa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sa(e)}Object.defineProperty(vc,"__esModule",{value:!0});vc.Uint256=void 0;var W_=$n();function $_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dm(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Y_(o.key),o)}}function Q_(e,t,n){return t&&Dm(e.prototype,t),n&&Dm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Y_(e){var t=J_(e,"string");return Sa(t)=="symbol"?t:t+""}function J_(e,t){if(Sa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Sa(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Z_(e,t,n){return t=gc(t),eE(e,qm()?Reflect.construct(t,n||[],gc(e).constructor):t.apply(e,n))}function eE(e,t){if(t&&(Sa(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tE(e)}function tE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qm=function(){return!!e})()}function gc(e){return gc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gc(e)}function rE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ip(e,t)}function ip(e,t){return ip=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},ip(e,t)}var nE=vc.Uint256=function(e){function t(){$_(this,t);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return Z_(this,t,[o])}return rE(t,e),Q_(t,[{key:"unsigned",get:function(){return!0}},{key:"size",get:function(){return 256}}])}(W_.LargeInt);nE.defineIntBoundaries()});var up=Jt(wc=>{"use strict";function Aa(e){"@babel/helpers - typeof";return Aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Aa(e)}Object.defineProperty(wc,"__esModule",{value:!0});wc.Int128=void 0;var oE=$n();function iE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vm(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,sE(o.key),o)}}function aE(e,t,n){return t&&Vm(e.prototype,t),n&&Vm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function sE(e){var t=uE(e,"string");return Aa(t)=="symbol"?t:t+""}function uE(e,t){if(Aa(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Aa(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cE(e,t,n){return t=bc(t),lE(e,Km()?Reflect.construct(t,n||[],bc(e).constructor):t.apply(e,n))}function lE(e,t){if(t&&(Aa(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fE(e)}function fE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Km(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Km=function(){return!!e})()}function bc(e){return bc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bc(e)}function pE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sp(e,t)}function sp(e,t){return sp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},sp(e,t)}var hE=wc.Int128=function(e){function t(){iE(this,t);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return cE(this,t,[o])}return pE(t,e),aE(t,[{key:"unsigned",get:function(){return!1}},{key:"size",get:function(){return 128}}])}(oE.LargeInt);hE.defineIntBoundaries()});var lp=Jt(Ac=>{"use strict";function _a(e){"@babel/helpers - typeof";return _a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_a(e)}Object.defineProperty(Ac,"__esModule",{value:!0});Ac.Int256=void 0;var dE=$n();function yE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hm(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,gE(o.key),o)}}function mE(e,t,n){return t&&Hm(e.prototype,t),n&&Hm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function gE(e){var t=vE(e,"string");return _a(t)=="symbol"?t:t+""}function vE(e,t){if(_a(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(_a(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bE(e,t,n){return t=Sc(t),wE(e,zm()?Reflect.construct(t,n||[],Sc(e).constructor):t.apply(e,n))}function wE(e,t){if(t&&(_a(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return SE(e)}function SE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zm(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zm=function(){return!!e})()}function Sc(e){return Sc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Sc(e)}function AE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cp(e,t)}function cp(e,t){return cp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},cp(e,t)}var _E=Ac.Int256=function(e){function t(){yE(this,t);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return bE(this,t,[o])}return AE(t,e),mE(t,[{key:"unsigned",get:function(){return!1}},{key:"size",get:function(){return 256}}])}(dE.LargeInt);_E.defineIntBoundaries()});var fp=Jt(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});_c.XdrLargeInt=void 0;var Xm=$n(),EE=op(),TE=ap(),kE=up(),OE=lp(),fn=PE(Rr());function PE(e){return e&&e.__esModule?e:{default:e}}function Cs(e){"@babel/helpers - typeof";return Cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cs(e)}function xE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gm(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,$m(o.key),o)}}function RE(e,t,n){return t&&Gm(e.prototype,t),n&&Gm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wm(e,t,n){return(t=$m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $m(e){var t=IE(e,"string");return Cs(t)=="symbol"?t:t+""}function IE(e,t){if(Cs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Cs(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var IP=_c.XdrLargeInt=function(){function e(t,n){switch(xE(this,e),Wm(this,"int",void 0),Wm(this,"type",void 0),n instanceof Array||(n=[n]),n=n.map(function(o){return typeof o=="bigint"?o:o instanceof e?o.toBigInt():BigInt(o)}),t){case"i64":this.int=new Xm.Hyper(n);break;case"i128":this.int=new kE.Int128(n);break;case"i256":this.int=new OE.Int256(n);break;case"u64":this.int=new Xm.UnsignedHyper(n);break;case"u128":this.int=new EE.Uint128(n);break;case"u256":this.int=new TE.Uint256(n);break;default:throw TypeError("invalid type: ".concat(t))}this.type=t}return RE(e,[{key:"toNumber",value:function(){var n=this.int.toBigInt();if(n>Number.MAX_SAFE_INTEGER||n<Number.MIN_SAFE_INTEGER)throw RangeError("value ".concat(n," not in range for Number ")+"[".concat(Number.MAX_SAFE_INTEGER,", ").concat(Number.MIN_SAFE_INTEGER,"]"));return Number(n)}},{key:"toBigInt",value:function(){return this.int.toBigInt()}},{key:"toI64",value:function(){this._sizeCheck(64);var n=this.toBigInt();if(BigInt.asIntN(64,n)!==n)throw RangeError("value too large for i64: ".concat(n));return fn.default.ScVal.scvI64(new fn.default.Int64(n))}},{key:"toU64",value:function(){return this._sizeCheck(64),fn.default.ScVal.scvU64(new fn.default.Uint64(BigInt.asUintN(64,this.toBigInt())))}},{key:"toI128",value:function(){this._sizeCheck(128);var n=this.int.toBigInt(),o=BigInt.asIntN(64,n>>64n),a=BigInt.asUintN(64,n);return fn.default.ScVal.scvI128(new fn.default.Int128Parts({hi:new fn.default.Int64(o),lo:new fn.default.Uint64(a)}))}},{key:"toU128",value:function(){this._sizeCheck(128);var n=this.int.toBigInt();return fn.default.ScVal.scvU128(new fn.default.UInt128Parts({hi:new fn.default.Uint64(BigInt.asUintN(64,n>>64n)),lo:new fn.default.Uint64(BigInt.asUintN(64,n))}))}},{key:"toI256",value:function(){var n=this.int.toBigInt(),o=BigInt.asIntN(64,n>>192n),a=BigInt.asUintN(64,n>>128n),i=BigInt.asUintN(64,n>>64n),s=BigInt.asUintN(64,n);return fn.default.ScVal.scvI256(new fn.default.Int256Parts({hiHi:new fn.default.Int64(o),hiLo:new fn.default.Uint64(a),loHi:new fn.default.Uint64(i),loLo:new fn.default.Uint64(s)}))}},{key:"toU256",value:function(){var n=this.int.toBigInt(),o=BigInt.asUintN(64,n>>192n),a=BigInt.asUintN(64,n>>128n),i=BigInt.asUintN(64,n>>64n),s=BigInt.asUintN(64,n);return fn.default.ScVal.scvU256(new fn.default.UInt256Parts({hiHi:new fn.default.Uint64(o),hiLo:new fn.default.Uint64(a),loHi:new fn.default.Uint64(i),loLo:new fn.default.Uint64(s)}))}},{key:"toScVal",value:function(){switch(this.type){case"i64":return this.toI64();case"i128":return this.toI128();case"i256":return this.toI256();case"u64":return this.toU64();case"u128":return this.toU128();case"u256":return this.toU256();default:throw TypeError("invalid type: ".concat(this.type))}}},{key:"valueOf",value:function(){return this.int.valueOf()}},{key:"toString",value:function(){return this.int.toString()}},{key:"toJSON",value:function(){return{value:this.toBigInt().toString(),type:this.type}}},{key:"_sizeCheck",value:function(n){if(this.int.size>n)throw RangeError("value too large for ".concat(n," bits (").concat(this.type,")"))}}],[{key:"isType",value:function(n){switch(n){case"i64":case"i128":case"i256":case"u64":case"u128":case"u256":return!0;default:return!1}}},{key:"getType",value:function(n){return n.slice(3).toLowerCase()}}])}()});var Jm=Jt(Tc=>{"use strict";function Ea(e){"@babel/helpers - typeof";return Ea=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ea(e)}Object.defineProperty(Tc,"__esModule",{value:!0});Tc.ScInt=void 0;var CE=fp();function Qm(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,jE(o.key),o)}}function BE(e,t,n){return t&&Qm(e.prototype,t),n&&Qm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jE(e){var t=LE(e,"string");return Ea(t)=="symbol"?t:t+""}function LE(e,t){if(Ea(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Ea(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UE(e,t,n){return t=Ec(t),ME(e,Ym()?Reflect.construct(t,n||[],Ec(e).constructor):t.apply(e,n))}function ME(e,t){if(t&&(Ea(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FE(e)}function FE(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ym(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ym=function(){return!!e})()}function Ec(e){return Ec=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ec(e)}function DE(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pp(e,t)}function pp(e,t){return pp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},pp(e,t)}var BP=Tc.ScInt=function(e){function t(n,o){var a;NE(this,t);var i=n<0,s=(a=o?.type)!==null&&a!==void 0?a:"";if(s.startsWith("u")&&i)throw TypeError("specified type ".concat(o.type," yet negative (").concat(n,")"));if(s===""){s=i?"i":"u";var f=qE(n);switch(f){case 64:case 128:case 256:s+=f.toString();break;default:throw RangeError("expected 64/128/256 bits for input (".concat(n,"), got ").concat(f))}}return UE(this,t,[s,n])}return DE(t,e),BE(t)}(CE.XdrLargeInt);function qE(e){var t,n=e.toString(2).length;return(t=[64,128,256].find(function(o){return n<=o}))!==null&&t!==void 0?t:n}});var hp=Jt(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});Object.defineProperty(ni,"Int128",{enumerable:!0,get:function(){return HE.Int128}});Object.defineProperty(ni,"Int256",{enumerable:!0,get:function(){return zE.Int256}});Object.defineProperty(ni,"ScInt",{enumerable:!0,get:function(){return XE.ScInt}});Object.defineProperty(ni,"Uint128",{enumerable:!0,get:function(){return VE.Uint128}});Object.defineProperty(ni,"Uint256",{enumerable:!0,get:function(){return KE.Uint256}});Object.defineProperty(ni,"XdrLargeInt",{enumerable:!0,get:function(){return Bs.XdrLargeInt}});ni.scValToBigInt=GE;var Bs=fp(),VE=op(),KE=ap(),HE=up(),zE=lp(),XE=Jm();function GE(e){var t=Bs.XdrLargeInt.getType(e.switch().name);switch(e.switch().name){case"scvU32":case"scvI32":return BigInt(e.value());case"scvU64":case"scvI64":return new Bs.XdrLargeInt(t,e.value()).toBigInt();case"scvU128":case"scvI128":return new Bs.XdrLargeInt(t,[e.value().lo(),e.value().hi()]).toBigInt();case"scvU256":case"scvI256":return new Bs.XdrLargeInt(t,[e.value().loLo(),e.value().loHi(),e.value().hiLo(),e.value().hiHi()]).toBigInt();default:throw TypeError("expected integer type, got ".concat(e.switch()))}}});var Ls=Jt(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.nativeToScVal=js;Pc.scValToNative=Oc;var Mr=$E(Rr()),dp=Mi(),WE=rp(),kc=hp();function $E(e){return e&&e.__esModule?e:{default:e}}function Zm(e,t){return ZE(e)||JE(e,t)||YE(e,t)||QE()}function QE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
6
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YE(e,t){if(e){if(typeof e=="string")return eg(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eg(e,t):void 0}}function eg(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function JE(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o,a,i,s,f=[],u=!0,r=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=i.call(n)).done)&&(f.push(o.value),f.length!==t);u=!0);}catch(_){r=!0,a=_}finally{try{if(!u&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(r)throw a}}return f}}function ZE(e){if(Array.isArray(e))return e}function Vi(e){"@babel/helpers - typeof";return Vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vi(e)}function js(e){var t,n,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};switch(Vi(e)){case"object":if(e===null)return Mr.default.ScVal.scvVoid();if(e instanceof Mr.default.ScVal)return e;if(e instanceof dp.Address)return e.toScVal();if(e instanceof WE.Contract)return e.address().toScVal();if(e instanceof Uint8Array||Buffer.isBuffer(e)){var a,i=Uint8Array.from(e);switch((a=o?.type)!==null&&a!==void 0?a:"bytes"){case"bytes":return Mr.default.ScVal.scvBytes(i);case"symbol":return Mr.default.ScVal.scvSymbol(i);case"string":return Mr.default.ScVal.scvString(i);default:throw new TypeError("invalid type (".concat(o.type,") specified for bytes-like value"))}}if(Array.isArray(e)){if(e.length>0&&e.some(function(r){return Vi(r)!==Vi(e[0])}))throw new TypeError("array values (".concat(e,") must have the same type (types: ").concat(e.map(function(r){return Vi(r)}).join(","),")"));return Mr.default.ScVal.scvVec(e.map(function(r){return js(r,o)}))}if(((t=(n=e.constructor)===null||n===void 0?void 0:n.name)!==null&&t!==void 0?t:"")!=="Object"){var s;throw new TypeError("cannot interpret ".concat((s=e.constructor)===null||s===void 0?void 0:s.name," value as ScVal (").concat(JSON.stringify(e),")"))}return Mr.default.ScVal.scvMap(Object.entries(e).map(function(r){var _,d,b=Zm(r,2),T=b[0],w=b[1],g=(_=((d=o?.type)!==null&&d!==void 0?d:{})[T])!==null&&_!==void 0?_:[null,null],p=Zm(g,2),A=p[0],L=p[1],E=A?{type:A}:{},N=L?{type:L}:{};return new Mr.default.ScMapEntry({key:js(T,E),val:js(w,N)})}));case"number":case"bigint":switch(o?.type){case"u32":return Mr.default.ScVal.scvU32(e);case"i32":return Mr.default.ScVal.scvI32(e);default:break}return new kc.ScInt(e,{type:o?.type}).toScVal();case"string":{var f,u=(f=o?.type)!==null&&f!==void 0?f:"string";switch(u){case"string":return Mr.default.ScVal.scvString(e);case"symbol":return Mr.default.ScVal.scvSymbol(e);case"address":return new dp.Address(e).toScVal();default:if(kc.XdrLargeInt.isType(u))return new kc.XdrLargeInt(u,e).toScVal();throw new TypeError("invalid type (".concat(o.type,") specified for string value"))}}case"boolean":return Mr.default.ScVal.scvBool(e);case"undefined":return Mr.default.ScVal.scvVoid();case"function":return js(e());default:throw new TypeError("failed to convert typeof ".concat(Vi(e)," (").concat(e,")"))}}function Oc(e){var t,n;switch(e.switch().value){case Mr.default.ScValType.scvVoid().value:return null;case Mr.default.ScValType.scvU64().value:case Mr.default.ScValType.scvI64().value:return e.value().toBigInt();case Mr.default.ScValType.scvU128().value:case Mr.default.ScValType.scvI128().value:case Mr.default.ScValType.scvU256().value:case Mr.default.ScValType.scvI256().value:return(0,kc.scValToBigInt)(e);case Mr.default.ScValType.scvVec().value:return((t=e.vec())!==null&&t!==void 0?t:[]).map(Oc);case Mr.default.ScValType.scvAddress().value:return dp.Address.fromScVal(e).toString();case Mr.default.ScValType.scvMap().value:return Object.fromEntries(((n=e.map())!==null&&n!==void 0?n:[]).map(function(a){return[Oc(a.key()),Oc(a.val())]}));case Mr.default.ScValType.scvBool().value:case Mr.default.ScValType.scvU32().value:case Mr.default.ScValType.scvI32().value:case Mr.default.ScValType.scvBytes().value:return e.value();case Mr.default.ScValType.scvSymbol().value:case Mr.default.ScValType.scvString().value:{var o=e.value();if(Buffer.isBuffer(o)||ArrayBuffer.isView(o))try{return new TextDecoder().decode(o)}catch{return new Uint8Array(o.buffer)}return o}case Mr.default.ScValType.scvTimepoint().value:case Mr.default.ScValType.scvDuration().value:return new Mr.default.Uint64(e.value()).toBigInt();case Mr.default.ScValType.scvStatus().value:switch(e.value().switch()){case Mr.default.ScStatusType.sstOk().value:case Mr.default.ScStatusType.sstUnknownError().value:case Mr.default.ScStatusType.sstHostValueError().value:case Mr.default.ScStatusType.sstHostObjectError().value:case Mr.default.ScStatusType.sstHostFunctionError().value:case Mr.default.ScStatusType.sstHostStorageError().value:case Mr.default.ScStatusType.sstHostContextError().value:case Mr.default.ScStatusType.sstVmError().value:case Mr.default.ScStatusType.sstContractError().value:case Mr.default.ScStatusType.sstHostAuthError().value:default:break}default:return e.value()}}});var ig=Jt(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});yp.humanizeEvents=aT;var eT=rT(Rr()),tT=_n(),tg=Ls();function rT(e){return e&&e.__esModule?e:{default:e}}function Ns(e){"@babel/helpers - typeof";return Ns=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ns(e)}function rg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,o)}return n}function ng(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rg(Object(n),!0).forEach(function(o){nT(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rg(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function nT(e,t,n){return(t=oT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oT(e){var t=iT(e,"string");return Ns(t)=="symbol"?t:t+""}function iT(e,t){if(Ns(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Ns(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aT(e){return e.map(function(t){return t instanceof eT.default.DiagnosticEvent?og(t.event()):og(t)})}function og(e){return ng(ng({},e.contractId()!=null&&{contractId:tT.StrKey.encodeContract(e.contractId())}),{},{type:e.type().name,topics:e.body().value().topics().map(function(t){return(0,tg.scValToNative)(t)}),data:(0,tg.scValToNative)(e.body().value().data())})}});var pg=Jt(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.authorizeEntry=fg;Rc.authorizeInvocation=fT;var Do=cT(Rr()),ug=ho(),sT=_n(),cg=tp(),ag=Wo(),lg=Mi(),uT=Ls();function cT(e){return e&&e.__esModule?e:{default:e}}function xc(e){"@babel/helpers - typeof";return xc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xc(e)}function mp(){"use strict";mp=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(I,S,m){I[S]=m.value},i=typeof Symbol=="function"?Symbol:{},s=i.iterator||"@@iterator",f=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function r(I,S,m){return Object.defineProperty(I,S,{value:m,enumerable:!0,configurable:!0,writable:!0}),I[S]}try{r({},"")}catch{r=function(m,P,l){return m[P]=l}}function _(I,S,m,P){var l=S&&S.prototype instanceof A?S:A,x=Object.create(l.prototype),W=new X(P||[]);return a(x,"_invoke",{value:me(I,m,W)}),x}function d(I,S,m){try{return{type:"normal",arg:I.call(S,m)}}catch(P){return{type:"throw",arg:P}}}t.wrap=_;var b="suspendedStart",T="suspendedYield",w="executing",g="completed",p={};function A(){}function L(){}function E(){}var N={};r(N,s,function(){return this});var F=Object.getPrototypeOf,R=F&&F(F(ae([])));R&&R!==n&&o.call(R,s)&&(N=R);var j=E.prototype=A.prototype=Object.create(N);function V(I){["next","throw","return"].forEach(function(S){r(I,S,function(m){return this._invoke(S,m)})})}function Y(I,S){function m(l,x,W,K){var re=d(I[l],I,x);if(re.type!=="throw"){var oe=re.arg,Ee=oe.value;return Ee&&xc(Ee)=="object"&&o.call(Ee,"__await")?S.resolve(Ee.__await).then(function(Fe){m("next",Fe,W,K)},function(Fe){m("throw",Fe,W,K)}):S.resolve(Ee).then(function(Fe){oe.value=Fe,W(oe)},function(Fe){return m("throw",Fe,W,K)})}K(re.arg)}var P;a(this,"_invoke",{value:function(x,W){function K(){return new S(function(re,oe){m(x,W,re,oe)})}return P=P?P.then(K,K):K()}})}function me(I,S,m){var P=b;return function(l,x){if(P===w)throw Error("Generator is already running");if(P===g){if(l==="throw")throw x;return{value:e,done:!0}}for(m.method=l,m.arg=x;;){var W=m.delegate;if(W){var K=le(W,m);if(K){if(K===p)continue;return K}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(P===b)throw P=g,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);P=w;var re=d(I,S,m);if(re.type==="normal"){if(P=m.done?g:T,re.arg===p)continue;return{value:re.arg,done:m.done}}re.type==="throw"&&(P=g,m.method="throw",m.arg=re.arg)}}}function le(I,S){var m=S.method,P=I.iterator[m];if(P===e)return S.delegate=null,m==="throw"&&I.iterator.return&&(S.method="return",S.arg=e,le(I,S),S.method==="throw")||m!=="return"&&(S.method="throw",S.arg=new TypeError("The iterator does not provide a '"+m+"' method")),p;var l=d(P,I.iterator,S.arg);if(l.type==="throw")return S.method="throw",S.arg=l.arg,S.delegate=null,p;var x=l.arg;return x?x.done?(S[I.resultName]=x.value,S.next=I.nextLoc,S.method!=="return"&&(S.method="next",S.arg=e),S.delegate=null,p):x:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,p)}function C(I){var S={tryLoc:I[0]};1 in I&&(S.catchLoc=I[1]),2 in I&&(S.finallyLoc=I[2],S.afterLoc=I[3]),this.tryEntries.push(S)}function q(I){var S=I.completion||{};S.type="normal",delete S.arg,I.completion=S}function X(I){this.tryEntries=[{tryLoc:"root"}],I.forEach(C,this),this.reset(!0)}function ae(I){if(I||I===""){var S=I[s];if(S)return S.call(I);if(typeof I.next=="function")return I;if(!isNaN(I.length)){var m=-1,P=function l(){for(;++m<I.length;)if(o.call(I,m))return l.value=I[m],l.done=!1,l;return l.value=e,l.done=!0,l};return P.next=P}}throw new TypeError(xc(I)+" is not iterable")}return L.prototype=E,a(j,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:L,configurable:!0}),L.displayName=r(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(I){var S=typeof I=="function"&&I.constructor;return!!S&&(S===L||(S.displayName||S.name)==="GeneratorFunction")},t.mark=function(I){return Object.setPrototypeOf?Object.setPrototypeOf(I,E):(I.__proto__=E,r(I,u,"GeneratorFunction")),I.prototype=Object.create(j),I},t.awrap=function(I){return{__await:I}},V(Y.prototype),r(Y.prototype,f,function(){return this}),t.AsyncIterator=Y,t.async=function(I,S,m,P,l){l===void 0&&(l=Promise);var x=new Y(_(I,S,m,P),l);return t.isGeneratorFunction(S)?x:x.next().then(function(W){return W.done?W.value:x.next()})},V(j),r(j,u,"Generator"),r(j,s,function(){return this}),r(j,"toString",function(){return"[object Generator]"}),t.keys=function(I){var S=Object(I),m=[];for(var P in S)m.push(P);return m.reverse(),function l(){for(;m.length;){var x=m.pop();if(x in S)return l.value=x,l.done=!1,l}return l.done=!0,l}},t.values=ae,X.prototype={constructor:X,reset:function(S){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(q),!S)for(var m in this)m.charAt(0)==="t"&&o.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var S=this.tryEntries[0].completion;if(S.type==="throw")throw S.arg;return this.rval},dispatchException:function(S){if(this.done)throw S;var m=this;function P(oe,Ee){return W.type="throw",W.arg=S,m.next=oe,Ee&&(m.method="next",m.arg=e),!!Ee}for(var l=this.tryEntries.length-1;l>=0;--l){var x=this.tryEntries[l],W=x.completion;if(x.tryLoc==="root")return P("end");if(x.tryLoc<=this.prev){var K=o.call(x,"catchLoc"),re=o.call(x,"finallyLoc");if(K&&re){if(this.prev<x.catchLoc)return P(x.catchLoc,!0);if(this.prev<x.finallyLoc)return P(x.finallyLoc)}else if(K){if(this.prev<x.catchLoc)return P(x.catchLoc,!0)}else{if(!re)throw Error("try statement without catch or finally");if(this.prev<x.finallyLoc)return P(x.finallyLoc)}}}},abrupt:function(S,m){for(var P=this.tryEntries.length-1;P>=0;--P){var l=this.tryEntries[P];if(l.tryLoc<=this.prev&&o.call(l,"finallyLoc")&&this.prev<l.finallyLoc){var x=l;break}}x&&(S==="break"||S==="continue")&&x.tryLoc<=m&&m<=x.finallyLoc&&(x=null);var W=x?x.completion:{};return W.type=S,W.arg=m,x?(this.method="next",this.next=x.finallyLoc,p):this.complete(W)},complete:function(S,m){if(S.type==="throw")throw S.arg;return S.type==="break"||S.type==="continue"?this.next=S.arg:S.type==="return"?(this.rval=this.arg=S.arg,this.method="return",this.next="end"):S.type==="normal"&&m&&(this.next=m),p},finish:function(S){for(var m=this.tryEntries.length-1;m>=0;--m){var P=this.tryEntries[m];if(P.finallyLoc===S)return this.complete(P.completion,P.afterLoc),q(P),p}},catch:function(S){for(var m=this.tryEntries.length-1;m>=0;--m){var P=this.tryEntries[m];if(P.tryLoc===S){var l=P.completion;if(l.type==="throw"){var x=l.arg;q(P)}return x}}throw Error("illegal catch attempt")},delegateYield:function(S,m,P){return this.delegate={iterator:ae(S),resultName:m,nextLoc:P},this.method==="next"&&(this.arg=e),p}},t}function sg(e,t,n,o,a,i,s){try{var f=e[i](s),u=f.value}catch(r){return void n(r)}f.done?t(u):Promise.resolve(u).then(o,a)}function lT(e){return function(){var t=this,n=arguments;return new Promise(function(o,a){var i=e.apply(t,n);function s(u){sg(i,o,a,s,f,"next",u)}function f(u){sg(i,o,a,s,f,"throw",u)}s(void 0)})}}function fg(e,t,n){return gp.apply(this,arguments)}function gp(){return gp=lT(mp().mark(function e(t,n,o){var a,i,s,f,u,r,_,d,b,T=arguments;return mp().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(a=T.length>3&&T[3]!==void 0?T[3]:cg.Networks.FUTURENET,t.credentials().switch().value===Do.default.SorobanCredentialsType.sorobanCredentialsAddress().value){g.next=3;break}return g.abrupt("return",t);case 3:if(i=Do.default.SorobanAuthorizationEntry.fromXDR(t.toXDR()),s=i.credentials().address(),s.signatureExpirationLedger(o),f=(0,ag.hash)(Buffer.from(a)),u=Do.default.HashIdPreimage.envelopeTypeSorobanAuthorization(new Do.default.HashIdPreimageSorobanAuthorization({networkId:f,nonce:s.nonce(),invocation:i.rootInvocation(),signatureExpirationLedger:s.signatureExpirationLedger()})),r=(0,ag.hash)(u.toXDR()),typeof n!="function"){g.next=17;break}return g.t0=Buffer,g.next=13,n(u);case 13:g.t1=g.sent,_=g.t0.from.call(g.t0,g.t1),g.next=18;break;case 17:_=Buffer.from(n.sign(r));case 18:if(d=lg.Address.fromScAddress(s.address()).toString(),ug.Keypair.fromPublicKey(d).verify(r,_)){g.next=21;break}throw new Error("signature doesn't match payload");case 21:return b=(0,uT.nativeToScVal)({public_key:sT.StrKey.decodeEd25519PublicKey(d),signature:_},{type:{public_key:["symbol",null],signature:["symbol",null]}}),s.signature(Do.default.ScVal.scvVec([b])),g.abrupt("return",i);case 24:case"end":return g.stop()}},e)})),gp.apply(this,arguments)}function fT(e,t,n){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"",a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:cg.Networks.FUTURENET,i=ug.Keypair.random().rawPublicKey(),s=new Do.default.Int64(pT(i)),f=o||e.publicKey();if(!f)throw new Error("authorizeInvocation requires publicKey parameter");var u=new Do.default.SorobanAuthorizationEntry({rootInvocation:n,credentials:Do.default.SorobanCredentials.sorobanCredentialsAddress(new Do.default.SorobanAddressCredentials({address:new lg.Address(f).toScAddress(),nonce:s,signatureExpirationLedger:0,signature:Do.default.ScVal.scvVec([])}))});return fg(u,e,t,a)}function pT(e){return e.subarray(0,8).reduce(function(t,n){return t<<8|n},0)}});var mg=Jt(Ic=>{"use strict";Object.defineProperty(Ic,"__esModule",{value:!0});Ic.buildInvocationTree=dg;Ic.walkInvocationTree=yT;var hT=Mo(),hg=Mi(),dT=Ls();function dg(e){var t=e.function(),n={},o=t.value();switch(t.switch().value){case 0:n.type="execute",n.args={source:hg.Address.fromScAddress(o.contractAddress()).toString(),function:o.functionName(),args:o.args().map(function(u){return(0,dT.scValToNative)(u)})};break;case 1:{n.type="create",n.args={};var a=[o.executable(),o.contractIdPreimage()],i=a[0],s=a[1];if(!!i.switch().value!=!!s.switch().value)throw new Error("creation function appears invalid: ".concat(JSON.stringify(o)," (should be wasm+address or token+asset)"));switch(i.switch().value){case 0:{var f=s.fromAddress();n.args.type="wasm",n.args.wasm={salt:f.salt().toString("hex"),hash:i.wasmHash().toString("hex"),address:hg.Address.fromScAddress(f.address()).toString()};break}case 1:n.args.type="sac",n.args.asset=hT.Asset.fromOperation(s.fromAsset()).toString();break;default:throw new Error("unknown creation type: ".concat(JSON.stringify(i)))}break}default:throw new Error("unknown invocation type (".concat(t.switch(),"): ").concat(JSON.stringify(t)))}return n.invocations=e.subInvocations().map(function(u){return dg(u)}),n}function yT(e,t){yg(e,1,t)}function yg(e,t,n,o){n(e,t,o)!==!1&&e.subInvocations().forEach(function(a){return yg(a,t+1,n,e)})}});var oi=Jt((Or,wg)=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});var Ki={xdr:!0,cereal:!0,hash:!0,sign:!0,verify:!0,FastSigning:!0,getLiquidityPoolId:!0,LiquidityPoolFeeV18:!0,Keypair:!0,UnsignedHyper:!0,Hyper:!0,TransactionBase:!0,Transaction:!0,FeeBumpTransaction:!0,TransactionBuilder:!0,TimeoutInfinite:!0,BASE_FEE:!0,Asset:!0,LiquidityPoolAsset:!0,LiquidityPoolId:!0,Operation:!0,AuthRequiredFlag:!0,AuthRevocableFlag:!0,AuthImmutableFlag:!0,AuthClawbackEnabledFlag:!0,Account:!0,MuxedAccount:!0,Claimant:!0,Networks:!0,StrKey:!0,SignerKey:!0,Soroban:!0,decodeAddressToMuxedAccount:!0,encodeMuxedAccountToAddress:!0,extractBaseAddress:!0,encodeMuxedAccount:!0,Contract:!0,Address:!0};Object.defineProperty(Or,"Account",{enumerable:!0,get:function(){return kT.Account}});Object.defineProperty(Or,"Address",{enumerable:!0,get:function(){return jT.Address}});Object.defineProperty(Or,"Asset",{enumerable:!0,get:function(){return _T.Asset}});Object.defineProperty(Or,"AuthClawbackEnabledFlag",{enumerable:!0,get:function(){return Us.AuthClawbackEnabledFlag}});Object.defineProperty(Or,"AuthImmutableFlag",{enumerable:!0,get:function(){return Us.AuthImmutableFlag}});Object.defineProperty(Or,"AuthRequiredFlag",{enumerable:!0,get:function(){return Us.AuthRequiredFlag}});Object.defineProperty(Or,"AuthRevocableFlag",{enumerable:!0,get:function(){return Us.AuthRevocableFlag}});Object.defineProperty(Or,"BASE_FEE",{enumerable:!0,get:function(){return kp.BASE_FEE}});Object.defineProperty(Or,"Claimant",{enumerable:!0,get:function(){return PT.Claimant}});Object.defineProperty(Or,"Contract",{enumerable:!0,get:function(){return BT.Contract}});Object.defineProperty(Or,"FastSigning",{enumerable:!0,get:function(){return Tp.FastSigning}});Object.defineProperty(Or,"FeeBumpTransaction",{enumerable:!0,get:function(){return AT.FeeBumpTransaction}});Object.defineProperty(Or,"Hyper",{enumerable:!0,get:function(){return vg.Hyper}});Object.defineProperty(Or,"Keypair",{enumerable:!0,get:function(){return bT.Keypair}});Object.defineProperty(Or,"LiquidityPoolAsset",{enumerable:!0,get:function(){return ET.LiquidityPoolAsset}});Object.defineProperty(Or,"LiquidityPoolFeeV18",{enumerable:!0,get:function(){return gg.LiquidityPoolFeeV18}});Object.defineProperty(Or,"LiquidityPoolId",{enumerable:!0,get:function(){return TT.LiquidityPoolId}});Object.defineProperty(Or,"MuxedAccount",{enumerable:!0,get:function(){return OT.MuxedAccount}});Object.defineProperty(Or,"Networks",{enumerable:!0,get:function(){return xT.Networks}});Object.defineProperty(Or,"Operation",{enumerable:!0,get:function(){return Us.Operation}});Object.defineProperty(Or,"SignerKey",{enumerable:!0,get:function(){return IT.SignerKey}});Object.defineProperty(Or,"Soroban",{enumerable:!0,get:function(){return CT.Soroban}});Object.defineProperty(Or,"StrKey",{enumerable:!0,get:function(){return RT.StrKey}});Object.defineProperty(Or,"TimeoutInfinite",{enumerable:!0,get:function(){return kp.TimeoutInfinite}});Object.defineProperty(Or,"Transaction",{enumerable:!0,get:function(){return ST.Transaction}});Object.defineProperty(Or,"TransactionBase",{enumerable:!0,get:function(){return wT.TransactionBase}});Object.defineProperty(Or,"TransactionBuilder",{enumerable:!0,get:function(){return kp.TransactionBuilder}});Object.defineProperty(Or,"UnsignedHyper",{enumerable:!0,get:function(){return vg.UnsignedHyper}});Object.defineProperty(Or,"cereal",{enumerable:!0,get:function(){return gT.default}});Object.defineProperty(Or,"decodeAddressToMuxedAccount",{enumerable:!0,get:function(){return Cc.decodeAddressToMuxedAccount}});Or.default=void 0;Object.defineProperty(Or,"encodeMuxedAccount",{enumerable:!0,get:function(){return Cc.encodeMuxedAccount}});Object.defineProperty(Or,"encodeMuxedAccountToAddress",{enumerable:!0,get:function(){return Cc.encodeMuxedAccountToAddress}});Object.defineProperty(Or,"extractBaseAddress",{enumerable:!0,get:function(){return Cc.extractBaseAddress}});Object.defineProperty(Or,"getLiquidityPoolId",{enumerable:!0,get:function(){return gg.getLiquidityPoolId}});Object.defineProperty(Or,"hash",{enumerable:!0,get:function(){return vT.hash}});Object.defineProperty(Or,"sign",{enumerable:!0,get:function(){return Tp.sign}});Object.defineProperty(Or,"verify",{enumerable:!0,get:function(){return Tp.verify}});Object.defineProperty(Or,"xdr",{enumerable:!0,get:function(){return mT.default}});var mT=bg(Rr()),gT=bg(bd()),vT=Wo(),Tp=Kl(),gg=Ql(),bT=ho(),vg=$n(),wT=Iu(),ST=nc(),AT=zf(),kp=Cm(),_T=Mo(),ET=Nu(),TT=Fu(),Us=Wu(),vp=ec();Object.keys(vp).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(Ki,e)||e in Or&&Or[e]===vp[e]||Object.defineProperty(Or,e,{enumerable:!0,get:function(){return vp[e]}})});var kT=sc(),OT=Xf(),PT=Zl(),xT=tp(),RT=_n(),IT=$f(),CT=Lm(),Cc=bo(),BT=rp(),jT=Mi(),bp=hp();Object.keys(bp).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(Ki,e)||e in Or&&Or[e]===bp[e]||Object.defineProperty(Or,e,{enumerable:!0,get:function(){return bp[e]}})});var wp=Ls();Object.keys(wp).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(Ki,e)||e in Or&&Or[e]===wp[e]||Object.defineProperty(Or,e,{enumerable:!0,get:function(){return wp[e]}})});var Sp=ig();Object.keys(Sp).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(Ki,e)||e in Or&&Or[e]===Sp[e]||Object.defineProperty(Or,e,{enumerable:!0,get:function(){return Sp[e]}})});var Ap=Gf();Object.keys(Ap).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(Ki,e)||e in Or&&Or[e]===Ap[e]||Object.defineProperty(Or,e,{enumerable:!0,get:function(){return Ap[e]}})});var _p=pg();Object.keys(_p).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(Ki,e)||e in Or&&Or[e]===_p[e]||Object.defineProperty(Or,e,{enumerable:!0,get:function(){return _p[e]}})});var Ep=mg();Object.keys(Ep).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(Ki,e)||e in Or&&Or[e]===Ep[e]||Object.defineProperty(Or,e,{enumerable:!0,get:function(){return Ep[e]}})});function bg(e){return e&&e.__esModule?e:{default:e}}var DP=Or.default=wg.exports});var Sg=Jt((Ta,ka)=>{(function(e){var t=typeof Ta=="object"&&Ta&&!Ta.nodeType&&Ta,n=typeof ka=="object"&&ka&&!ka.nodeType&&ka,o=typeof global=="object"&&global;(o.global===o||o.window===o||o.self===o)&&(e=o);var a,i=2147483647,s=36,f=1,u=26,r=38,_=700,d=72,b=128,T="-",w=/^xn--/,g=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,A={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=s-f,E=Math.floor,N=String.fromCharCode,F;function R(m){throw new RangeError(A[m])}function j(m,P){for(var l=m.length,x=[];l--;)x[l]=P(m[l]);return x}function V(m,P){var l=m.split("@"),x="";l.length>1&&(x=l[0]+"@",m=l[1]),m=m.replace(p,".");var W=m.split("."),K=j(W,P).join(".");return x+K}function Y(m){for(var P=[],l=0,x=m.length,W,K;l<x;)W=m.charCodeAt(l++),W>=55296&&W<=56319&&l<x?(K=m.charCodeAt(l++),(K&64512)==56320?P.push(((W&1023)<<10)+(K&1023)+65536):(P.push(W),l--)):P.push(W);return P}function me(m){return j(m,function(P){var l="";return P>65535&&(P-=65536,l+=N(P>>>10&1023|55296),P=56320|P&1023),l+=N(P),l}).join("")}function le(m){return m-48<10?m-22:m-65<26?m-65:m-97<26?m-97:s}function C(m,P){return m+22+75*(m<26)-((P!=0)<<5)}function q(m,P,l){var x=0;for(m=l?E(m/_):m>>1,m+=E(m/P);m>L*u>>1;x+=s)m=E(m/L);return E(x+(L+1)*m/(m+r))}function X(m){var P=[],l=m.length,x,W=0,K=b,re=d,oe,Ee,Fe,Oe,$,de,we,Qe,ze;for(oe=m.lastIndexOf(T),oe<0&&(oe=0),Ee=0;Ee<oe;++Ee)m.charCodeAt(Ee)>=128&&R("not-basic"),P.push(m.charCodeAt(Ee));for(Fe=oe>0?oe+1:0;Fe<l;){for(Oe=W,$=1,de=s;Fe>=l&&R("invalid-input"),we=le(m.charCodeAt(Fe++)),(we>=s||we>E((i-W)/$))&&R("overflow"),W+=we*$,Qe=de<=re?f:de>=re+u?u:de-re,!(we<Qe);de+=s)ze=s-Qe,$>E(i/ze)&&R("overflow"),$*=ze;x=P.length+1,re=q(W-Oe,x,Oe==0),E(W/x)>i-K&&R("overflow"),K+=E(W/x),W%=x,P.splice(W++,0,K)}return me(P)}function ae(m){var P,l,x,W,K,re,oe,Ee,Fe,Oe,$,de=[],we,Qe,ze,We;for(m=Y(m),we=m.length,P=b,l=0,K=d,re=0;re<we;++re)$=m[re],$<128&&de.push(N($));for(x=W=de.length,W&&de.push(T);x<we;){for(oe=i,re=0;re<we;++re)$=m[re],$>=P&&$<oe&&(oe=$);for(Qe=x+1,oe-P>E((i-l)/Qe)&&R("overflow"),l+=(oe-P)*Qe,P=oe,re=0;re<we;++re)if($=m[re],$<P&&++l>i&&R("overflow"),$==P){for(Ee=l,Fe=s;Oe=Fe<=K?f:Fe>=K+u?u:Fe-K,!(Ee<Oe);Fe+=s)We=Ee-Oe,ze=s-Oe,de.push(N(C(Oe+We%ze,0))),Ee=E(We/ze);de.push(N(C(Ee,0))),K=q(l,Qe,x==W),l=0,++x}++l,++P}return de.join("")}function I(m){return V(m,function(P){return w.test(P)?X(P.slice(4).toLowerCase()):P})}function S(m){return V(m,function(P){return g.test(P)?"xn--"+ae(P):P})}if(a={version:"1.3.2",ucs2:{decode:Y,encode:me},decode:X,encode:ae,toASCII:S,toUnicode:I},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return a});else if(t&&n)if(ka.exports==t)n.exports=a;else for(F in a)a.hasOwnProperty(F)&&(t[F]=a[F]);else e.punycode=a})(Ta)});var _g=Jt((Ag,Bc)=>{(function(e,t){"use strict";typeof Bc=="object"&&Bc.exports?Bc.exports=t():typeof define=="function"&&define.amd?define(t):e.IPv6=t(e)})(Ag,function(e){"use strict";var t=e&&e.IPv6;function n(a){var i=a.toLowerCase(),s=i.split(":"),f=s.length,u=8;s[0]===""&&s[1]===""&&s[2]===""?(s.shift(),s.shift()):s[0]===""&&s[1]===""?s.shift():s[f-1]===""&&s[f-2]===""&&s.pop(),f=s.length,s[f-1].indexOf(".")!==-1&&(u=7);var r;for(r=0;r<f&&s[r]!=="";r++);if(r<u)for(s.splice(r,1,"0000");s.length<u;)s.splice(r,0,"0000");for(var _,d=0;d<u;d++){_=s[d].split("");for(var b=0;b<3&&(_[0]==="0"&&_.length>1);b++)_.splice(0,1);s[d]=_.join("")}var T=-1,w=0,g=0,p=-1,A=!1;for(d=0;d<u;d++)A?s[d]==="0"?g+=1:(A=!1,g>w&&(T=p,w=g)):s[d]==="0"&&(A=!0,p=d,g=1);g>w&&(T=p,w=g),w>1&&s.splice(T,w,""),f=s.length;var L="";for(s[0]===""&&(L=":"),d=0;d<f&&(L+=s[d],d!==f-1);d++)L+=":";return s[f-1]===""&&(L+=":"),L}function o(){return e.IPv6===this&&(e.IPv6=t),this}return{best:n,noConflict:o}})});var Tg=Jt((Eg,jc)=>{(function(e,t){"use strict";typeof jc=="object"&&jc.exports?jc.exports=t():typeof define=="function"&&define.amd?define(t):e.SecondLevelDomains=t(e)})(Eg,function(e){"use strict";var t=e&&e.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(o){var a=o.lastIndexOf(".");if(a<=0||a>=o.length-1)return!1;var i=o.lastIndexOf(".",a-1);if(i<=0||i>=a-1)return!1;var s=n.list[o.slice(a+1)];return s?s.indexOf(" "+o.slice(i+1,a)+" ")>=0:!1},is:function(o){var a=o.lastIndexOf(".");if(a<=0||a>=o.length-1)return!1;var i=o.lastIndexOf(".",a-1);if(i>=0)return!1;var s=n.list[o.slice(a+1)];return s?s.indexOf(" "+o.slice(0,a)+" ")>=0:!1},get:function(o){var a=o.lastIndexOf(".");if(a<=0||a>=o.length-1)return null;var i=o.lastIndexOf(".",a-1);if(i<=0||i>=a-1)return null;var s=n.list[o.slice(a+1)];return!s||s.indexOf(" "+o.slice(i+1,a)+" ")<0?null:o.slice(i+1)},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n})});var Og=Jt((kg,Lc)=>{(function(e,t){"use strict";typeof Lc=="object"&&Lc.exports?Lc.exports=t(Sg(),_g(),Tg()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],t):e.URI=t(e.punycode,e.IPv6,e.SecondLevelDomains,e)})(kg,function(e,t,n,o){"use strict";var a=o&&o.URI;function i(C,q){var X=arguments.length>=1,ae=arguments.length>=2;if(!(this instanceof i))return X?ae?new i(C,q):new i(C):new i;if(C===void 0){if(X)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?C=location.href+"":C=""}if(C===null&&X)throw new TypeError("null is not a valid argument for URI");return this.href(C),q!==void 0?this.absoluteTo(q):this}function s(C){return/^[0-9]+$/.test(C)}i.version="1.19.11";var f=i.prototype,u=Object.prototype.hasOwnProperty;function r(C){return C.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function _(C){return C===void 0?"Undefined":String(Object.prototype.toString.call(C)).slice(8,-1)}function d(C){return _(C)==="Array"}function b(C,q){var X={},ae,I;if(_(q)==="RegExp")X=null;else if(d(q))for(ae=0,I=q.length;ae<I;ae++)X[q[ae]]=!0;else X[q]=!0;for(ae=0,I=C.length;ae<I;ae++){var S=X&&X[C[ae]]!==void 0||!X&&q.test(C[ae]);S&&(C.splice(ae,1),I--,ae--)}return C}function T(C,q){var X,ae;if(d(q)){for(X=0,ae=q.length;X<ae;X++)if(!T(C,q[X]))return!1;return!0}var I=_(q);for(X=0,ae=C.length;X<ae;X++)if(I==="RegExp"){if(typeof C[X]=="string"&&C[X].match(q))return!0}else if(C[X]===q)return!0;return!1}function w(C,q){if(!d(C)||!d(q)||C.length!==q.length)return!1;C.sort(),q.sort();for(var X=0,ae=C.length;X<ae;X++)if(C[X]!==q[X])return!1;return!0}function g(C){var q=/^\/+|\/+$/g;return C.replace(q,"")}i._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:i.preventInvalidHostname,duplicateQueryParameters:i.duplicateQueryParameters,escapeQuerySpace:i.escapeQuerySpace}},i.preventInvalidHostname=!1,i.duplicateQueryParameters=!1,i.escapeQuerySpace=!0,i.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,i.idn_expression=/[^a-z0-9\._-]/i,i.punycode_expression=/(xn--)/i,i.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,i.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,i.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,i.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(C){if(!(!C||!C.nodeName)){var q=C.nodeName.toLowerCase();if(!(q==="input"&&C.type!=="image"))return i.domAttributes[q]}};function p(C){return escape(C)}function A(C){return encodeURIComponent(C).replace(/[!'()*]/g,p).replace(/\*/g,"%2A")}i.encode=A,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=A,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(C,q){var X=i.encode(C+"");return q===void 0&&(q=i.escapeQuerySpace),q?X.replace(/%20/g,"+"):X},i.decodeQuery=function(C,q){C+="",q===void 0&&(q=i.escapeQuerySpace);try{return i.decode(q?C.replace(/\+/g,"%20"):C)}catch{return C}};var L={encode:"encode",decode:"decode"},E,N=function(C,q){return function(X){try{return i[q](X+"").replace(i.characters[C][q].expression,function(ae){return i.characters[C][q].map[ae]})}catch{return X}}};for(E in L)i[E+"PathSegment"]=N("pathname",L[E]),i[E+"UrnPathSegment"]=N("urnpath",L[E]);var F=function(C,q,X){return function(ae){var I;X?I=function(l){return i[q](i[X](l))}:I=i[q];for(var S=(ae+"").split(C),m=0,P=S.length;m<P;m++)S[m]=I(S[m]);return S.join(C)}};i.decodePath=F("/","decodePathSegment"),i.decodeUrnPath=F(":","decodeUrnPathSegment"),i.recodePath=F("/","encodePathSegment","decode"),i.recodeUrnPath=F(":","encodeUrnPathSegment","decode"),i.encodeReserved=N("reserved","encode"),i.parse=function(C,q){var X;return q||(q={preventInvalidHostname:i.preventInvalidHostname}),C=C.replace(i.leading_whitespace_expression,""),C=C.replace(i.ascii_tab_whitespace,""),X=C.indexOf("#"),X>-1&&(q.fragment=C.substring(X+1)||null,C=C.substring(0,X)),X=C.indexOf("?"),X>-1&&(q.query=C.substring(X+1)||null,C=C.substring(0,X)),C=C.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),C=C.replace(/^[/\\]{2,}/i,"//"),C.substring(0,2)==="//"?(q.protocol=null,C=C.substring(2),C=i.parseAuthority(C,q)):(X=C.indexOf(":"),X>-1&&(q.protocol=C.substring(0,X)||null,q.protocol&&!q.protocol.match(i.protocol_expression)?q.protocol=void 0:C.substring(X+1,X+3).replace(/\\/g,"/")==="//"?(C=C.substring(X+3),C=i.parseAuthority(C,q)):(C=C.substring(X+1),q.urn=!0))),q.path=C,q},i.parseHost=function(C,q){C||(C=""),C=C.replace(/\\/g,"/");var X=C.indexOf("/"),ae,I;if(X===-1&&(X=C.length),C.charAt(0)==="[")ae=C.indexOf("]"),q.hostname=C.substring(1,ae)||null,q.port=C.substring(ae+2,X)||null,q.port==="/"&&(q.port=null);else{var S=C.indexOf(":"),m=C.indexOf("/"),P=C.indexOf(":",S+1);P!==-1&&(m===-1||P<m)?(q.hostname=C.substring(0,X)||null,q.port=null):(I=C.substring(0,X).split(":"),q.hostname=I[0]||null,q.port=I[1]||null)}return q.hostname&&C.substring(X).charAt(0)!=="/"&&(X++,C="/"+C),q.preventInvalidHostname&&i.ensureValidHostname(q.hostname,q.protocol),q.port&&i.ensureValidPort(q.port),C.substring(X)||"/"},i.parseAuthority=function(C,q){return C=i.parseUserinfo(C,q),i.parseHost(C,q)},i.parseUserinfo=function(C,q){var X=C,ae=C.indexOf("\\");ae!==-1&&(C=C.replace(/\\/g,"/"));var I=C.indexOf("/"),S=C.lastIndexOf("@",I>-1?I:C.length-1),m;return S>-1&&(I===-1||S<I)?(m=C.substring(0,S).split(":"),q.username=m[0]?i.decode(m[0]):null,m.shift(),q.password=m[0]?i.decode(m.join(":")):null,C=X.substring(S+1)):(q.username=null,q.password=null),C},i.parseQuery=function(C,q){if(!C)return{};if(C=C.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!C)return{};for(var X={},ae=C.split("&"),I=ae.length,S,m,P,l=0;l<I;l++)S=ae[l].split("="),m=i.decodeQuery(S.shift(),q),P=S.length?i.decodeQuery(S.join("="),q):null,m!=="__proto__"&&(u.call(X,m)?((typeof X[m]=="string"||X[m]===null)&&(X[m]=[X[m]]),X[m].push(P)):X[m]=P);return X},i.build=function(C){var q="",X=!1;return C.protocol&&(q+=C.protocol+":"),!C.urn&&(q||C.hostname)&&(q+="//",X=!0),q+=i.buildAuthority(C)||"",typeof C.path=="string"&&(C.path.charAt(0)!=="/"&&X&&(q+="/"),q+=C.path),typeof C.query=="string"&&C.query&&(q+="?"+C.query),typeof C.fragment=="string"&&C.fragment&&(q+="#"+C.fragment),q},i.buildHost=function(C){var q="";if(C.hostname)i.ip6_expression.test(C.hostname)?q+="["+C.hostname+"]":q+=C.hostname;else return"";return C.port&&(q+=":"+C.port),q},i.buildAuthority=function(C){return i.buildUserinfo(C)+i.buildHost(C)},i.buildUserinfo=function(C){var q="";return C.username&&(q+=i.encode(C.username)),C.password&&(q+=":"+i.encode(C.password)),q&&(q+="@"),q},i.buildQuery=function(C,q,X){var ae="",I,S,m,P;for(S in C)if(S!=="__proto__"&&u.call(C,S))if(d(C[S]))for(I={},m=0,P=C[S].length;m<P;m++)C[S][m]!==void 0&&I[C[S][m]+""]===void 0&&(ae+="&"+i.buildQueryParameter(S,C[S][m],X),q!==!0&&(I[C[S][m]+""]=!0));else C[S]!==void 0&&(ae+="&"+i.buildQueryParameter(S,C[S],X));return ae.substring(1)},i.buildQueryParameter=function(C,q,X){return i.encodeQuery(C,X)+(q!==null?"="+i.encodeQuery(q,X):"")},i.addQuery=function(C,q,X){if(typeof q=="object")for(var ae in q)u.call(q,ae)&&i.addQuery(C,ae,q[ae]);else if(typeof q=="string"){if(C[q]===void 0){C[q]=X;return}else typeof C[q]=="string"&&(C[q]=[C[q]]);d(X)||(X=[X]),C[q]=(C[q]||[]).concat(X)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},i.setQuery=function(C,q,X){if(typeof q=="object")for(var ae in q)u.call(q,ae)&&i.setQuery(C,ae,q[ae]);else if(typeof q=="string")C[q]=X===void 0?null:X;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},i.removeQuery=function(C,q,X){var ae,I,S;if(d(q))for(ae=0,I=q.length;ae<I;ae++)C[q[ae]]=void 0;else if(_(q)==="RegExp")for(S in C)q.test(S)&&(C[S]=void 0);else if(typeof q=="object")for(S in q)u.call(q,S)&&i.removeQuery(C,S,q[S]);else if(typeof q=="string")X!==void 0?_(X)==="RegExp"?!d(C[q])&&X.test(C[q])?C[q]=void 0:C[q]=b(C[q],X):C[q]===String(X)&&(!d(X)||X.length===1)?C[q]=void 0:d(C[q])&&(C[q]=b(C[q],X)):C[q]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},i.hasQuery=function(C,q,X,ae){switch(_(q)){case"String":break;case"RegExp":for(var I in C)if(u.call(C,I)&&q.test(I)&&(X===void 0||i.hasQuery(C,I,X)))return!0;return!1;case"Object":for(var S in q)if(u.call(q,S)&&!i.hasQuery(C,S,q[S]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(_(X)){case"Undefined":return q in C;case"Boolean":var m=!!(d(C[q])?C[q].length:C[q]);return X===m;case"Function":return!!X(C[q],q,C);case"Array":if(!d(C[q]))return!1;var P=ae?T:w;return P(C[q],X);case"RegExp":return d(C[q])?ae?T(C[q],X):!1:!!(C[q]&&C[q].match(X));case"Number":X=String(X);case"String":return d(C[q])?ae?T(C[q],X):!1:C[q]===X;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},i.joinPaths=function(){for(var C=[],q=[],X=0,ae=0;ae<arguments.length;ae++){var I=new i(arguments[ae]);C.push(I);for(var S=I.segment(),m=0;m<S.length;m++)typeof S[m]=="string"&&q.push(S[m]),S[m]&&X++}if(!q.length||!X)return new i("");var P=new i("").segment(q);return(C[0].path()===""||C[0].path().slice(0,1)==="/")&&P.path("/"+P.path()),P.normalize()},i.commonPath=function(C,q){var X=Math.min(C.length,q.length),ae;for(ae=0;ae<X;ae++)if(C.charAt(ae)!==q.charAt(ae)){ae--;break}return ae<1?C.charAt(0)===q.charAt(0)&&C.charAt(0)==="/"?"/":"":((C.charAt(ae)!=="/"||q.charAt(ae)!=="/")&&(ae=C.substring(0,ae).lastIndexOf("/")),C.substring(0,ae+1))},i.withinString=function(C,q,X){X||(X={});var ae=X.start||i.findUri.start,I=X.end||i.findUri.end,S=X.trim||i.findUri.trim,m=X.parens||i.findUri.parens,P=/[a-z0-9-]=["']?$/i;for(ae.lastIndex=0;;){var l=ae.exec(C);if(!l)break;var x=l.index;if(X.ignoreHtml){var W=C.slice(Math.max(x-3,0),x);if(W&&P.test(W))continue}for(var K=x+C.slice(x).search(I),re=C.slice(x,K),oe=-1;;){var Ee=m.exec(re);if(!Ee)break;var Fe=Ee.index+Ee[0].length;oe=Math.max(oe,Fe)}if(oe>-1?re=re.slice(0,oe)+re.slice(oe).replace(S,""):re=re.replace(S,""),!(re.length<=l[0].length)&&!(X.ignore&&X.ignore.test(re))){K=x+re.length;var Oe=q(re,x,K,C);if(Oe===void 0){ae.lastIndex=K;continue}Oe=String(Oe),C=C.slice(0,x)+Oe+C.slice(K),ae.lastIndex=x+Oe.length}}return ae.lastIndex=0,C},i.ensureValidHostname=function(C,q){var X=!!C,ae=!!q,I=!1;if(ae&&(I=T(i.hostProtocols,q)),I&&!X)throw new TypeError("Hostname cannot be empty, if protocol is "+q);if(C&&C.match(i.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(C).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(C){if(C){var q=Number(C);if(!(s(q)&&q>0&&q<65536))throw new TypeError('Port "'+C+'" is not a valid port')}},i.noConflict=function(C){if(C){var q={URI:this.noConflict()};return o.URITemplate&&typeof o.URITemplate.noConflict=="function"&&(q.URITemplate=o.URITemplate.noConflict()),o.IPv6&&typeof o.IPv6.noConflict=="function"&&(q.IPv6=o.IPv6.noConflict()),o.SecondLevelDomains&&typeof o.SecondLevelDomains.noConflict=="function"&&(q.SecondLevelDomains=o.SecondLevelDomains.noConflict()),q}else o.URI===this&&(o.URI=a);return this},f.build=function(C){return C===!0?this._deferred_build=!0:(C===void 0||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},f.clone=function(){return new i(this)},f.valueOf=f.toString=function(){return this.build(!1)._string};function R(C){return function(q,X){return q===void 0?this._parts[C]||"":(this._parts[C]=q||null,this.build(!X),this)}}function j(C,q){return function(X,ae){return X===void 0?this._parts[C]||"":(X!==null&&(X=X+"",X.charAt(0)===q&&(X=X.substring(1))),this._parts[C]=X,this.build(!ae),this)}}f.protocol=R("protocol"),f.username=R("username"),f.password=R("password"),f.hostname=R("hostname"),f.port=R("port"),f.query=j("query","?"),f.fragment=j("fragment","#"),f.search=function(C,q){var X=this.query(C,q);return typeof X=="string"&&X.length?"?"+X:X},f.hash=function(C,q){var X=this.fragment(C,q);return typeof X=="string"&&X.length?"#"+X:X},f.pathname=function(C,q){if(C===void 0||C===!0){var X=this._parts.path||(this._parts.hostname?"/":"");return C?(this._parts.urn?i.decodeUrnPath:i.decodePath)(X):X}else return this._parts.urn?this._parts.path=C?i.recodeUrnPath(C):"":this._parts.path=C?i.recodePath(C):"/",this.build(!q),this},f.path=f.pathname,f.href=function(C,q){var X;if(C===void 0)return this.toString();this._string="",this._parts=i._parts();var ae=C instanceof i,I=typeof C=="object"&&(C.hostname||C.path||C.pathname);if(C.nodeName){var S=i.getDomAttribute(C);C=C[S]||"",I=!1}if(!ae&&I&&C.pathname!==void 0&&(C=C.toString()),typeof C=="string"||C instanceof String)this._parts=i.parse(String(C),this._parts);else if(ae||I){var m=ae?C._parts:C;for(X in m)X!=="query"&&u.call(this._parts,X)&&(this._parts[X]=m[X]);m.query&&this.query(m.query,!1)}else throw new TypeError("invalid input");return this.build(!q),this},f.is=function(C){var q=!1,X=!1,ae=!1,I=!1,S=!1,m=!1,P=!1,l=!this._parts.urn;switch(this._parts.hostname&&(l=!1,X=i.ip4_expression.test(this._parts.hostname),ae=i.ip6_expression.test(this._parts.hostname),q=X||ae,I=!q,S=I&&n&&n.has(this._parts.hostname),m=I&&i.idn_expression.test(this._parts.hostname),P=I&&i.punycode_expression.test(this._parts.hostname)),C.toLowerCase()){case"relative":return l;case"absolute":return!l;case"domain":case"name":return I;case"sld":return S;case"ip":return q;case"ip4":case"ipv4":case"inet4":return X;case"ip6":case"ipv6":case"inet6":return ae;case"idn":return m;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return P}return null};var V=f.protocol,Y=f.port,me=f.hostname;f.protocol=function(C,q){if(C&&(C=C.replace(/:(\/\/)?$/,""),!C.match(i.protocol_expression)))throw new TypeError('Protocol "'+C+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return V.call(this,C,q)},f.scheme=f.protocol,f.port=function(C,q){return this._parts.urn?C===void 0?"":this:(C!==void 0&&(C===0&&(C=null),C&&(C+="",C.charAt(0)===":"&&(C=C.substring(1)),i.ensureValidPort(C))),Y.call(this,C,q))},f.hostname=function(C,q){if(this._parts.urn)return C===void 0?"":this;if(C!==void 0){var X={preventInvalidHostname:this._parts.preventInvalidHostname},ae=i.parseHost(C,X);if(ae!=="/")throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-]');C=X.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(C,this._parts.protocol)}return me.call(this,C,q)},f.origin=function(C,q){if(this._parts.urn)return C===void 0?"":this;if(C===void 0){var X=this.protocol(),ae=this.authority();return ae?(X?X+"://":"")+this.authority():""}else{var I=i(C);return this.protocol(I.protocol()).authority(I.authority()).build(!q),this}},f.host=function(C,q){if(this._parts.urn)return C===void 0?"":this;if(C===void 0)return this._parts.hostname?i.buildHost(this._parts):"";var X=i.parseHost(C,this._parts);if(X!=="/")throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-]');return this.build(!q),this},f.authority=function(C,q){if(this._parts.urn)return C===void 0?"":this;if(C===void 0)return this._parts.hostname?i.buildAuthority(this._parts):"";var X=i.parseAuthority(C,this._parts);if(X!=="/")throw new TypeError('Hostname "'+C+'" contains characters other than [A-Z0-9.-]');return this.build(!q),this},f.userinfo=function(C,q){if(this._parts.urn)return C===void 0?"":this;if(C===void 0){var X=i.buildUserinfo(this._parts);return X&&X.substring(0,X.length-1)}else return C[C.length-1]!=="@"&&(C+="@"),i.parseUserinfo(C,this._parts),this.build(!q),this},f.resource=function(C,q){var X;return C===void 0?this.path()+this.search()+this.hash():(X=i.parse(C),this._parts.path=X.path,this._parts.query=X.query,this._parts.fragment=X.fragment,this.build(!q),this)},f.subdomain=function(C,q){if(this._parts.urn)return C===void 0?"":this;if(C===void 0){if(!this._parts.hostname||this.is("IP"))return"";var X=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,X)||""}else{var ae=this._parts.hostname.length-this.domain().length,I=this._parts.hostname.substring(0,ae),S=new RegExp("^"+r(I));if(C&&C.charAt(C.length-1)!=="."&&(C+="."),C.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return C&&i.ensureValidHostname(C,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(S,C),this.build(!q),this}},f.domain=function(C,q){if(this._parts.urn)return C===void 0?"":this;if(typeof C=="boolean"&&(q=C,C=void 0),C===void 0){if(!this._parts.hostname||this.is("IP"))return"";var X=this._parts.hostname.match(/\./g);if(X&&X.length<2)return this._parts.hostname;var ae=this._parts.hostname.length-this.tld(q).length-1;return ae=this._parts.hostname.lastIndexOf(".",ae-1)+1,this._parts.hostname.substring(ae)||""}else{if(!C)throw new TypeError("cannot set domain empty");if(C.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(C,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=C;else{var I=new RegExp(r(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(I,C)}return this.build(!q),this}},f.tld=function(C,q){if(this._parts.urn)return C===void 0?"":this;if(typeof C=="boolean"&&(q=C,C=void 0),C===void 0){if(!this._parts.hostname||this.is("IP"))return"";var X=this._parts.hostname.lastIndexOf("."),ae=this._parts.hostname.substring(X+1);return q!==!0&&n&&n.list[ae.toLowerCase()]&&n.get(this._parts.hostname)||ae}else{var I;if(C)if(C.match(/[^a-zA-Z0-9-]/))if(n&&n.is(C))I=new RegExp(r(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(I,C);else throw new TypeError('TLD "'+C+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");I=new RegExp(r(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(I,C)}else throw new TypeError("cannot set TLD empty");return this.build(!q),this}},f.directory=function(C,q){if(this._parts.urn)return C===void 0?"":this;if(C===void 0||C===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var X=this._parts.path.length-this.filename().length-1,ae=this._parts.path.substring(0,X)||(this._parts.hostname?"/":"");return C?i.decodePath(ae):ae}else{var I=this._parts.path.length-this.filename().length,S=this._parts.path.substring(0,I),m=new RegExp("^"+r(S));return this.is("relative")||(C||(C="/"),C.charAt(0)!=="/"&&(C="/"+C)),C&&C.charAt(C.length-1)!=="/"&&(C+="/"),C=i.recodePath(C),this._parts.path=this._parts.path.replace(m,C),this.build(!q),this}},f.filename=function(C,q){if(this._parts.urn)return C===void 0?"":this;if(typeof C!="string"){if(!this._parts.path||this._parts.path==="/")return"";var X=this._parts.path.lastIndexOf("/"),ae=this._parts.path.substring(X+1);return C?i.decodePathSegment(ae):ae}else{var I=!1;C.charAt(0)==="/"&&(C=C.substring(1)),C.match(/\.?\//)&&(I=!0);var S=new RegExp(r(this.filename())+"$");return C=i.recodePath(C),this._parts.path=this._parts.path.replace(S,C),I?this.normalizePath(q):this.build(!q),this}},f.suffix=function(C,q){if(this._parts.urn)return C===void 0?"":this;if(C===void 0||C===!0){if(!this._parts.path||this._parts.path==="/")return"";var X=this.filename(),ae=X.lastIndexOf("."),I,S;return ae===-1?"":(I=X.substring(ae+1),S=/^[a-z0-9%]+$/i.test(I)?I:"",C?i.decodePathSegment(S):S)}else{C.charAt(0)==="."&&(C=C.substring(1));var m=this.suffix(),P;if(m)C?P=new RegExp(r(m)+"$"):P=new RegExp(r("."+m)+"$");else{if(!C)return this;this._parts.path+="."+i.recodePath(C)}return P&&(C=i.recodePath(C),this._parts.path=this._parts.path.replace(P,C)),this.build(!q),this}},f.segment=function(C,q,X){var ae=this._parts.urn?":":"/",I=this.path(),S=I.substring(0,1)==="/",m=I.split(ae);if(C!==void 0&&typeof C!="number"&&(X=q,q=C,C=void 0),C!==void 0&&typeof C!="number")throw new Error('Bad segment "'+C+'", must be 0-based integer');if(S&&m.shift(),C<0&&(C=Math.max(m.length+C,0)),q===void 0)return C===void 0?m:m[C];if(C===null||m[C]===void 0)if(d(q)){m=[];for(var P=0,l=q.length;P<l;P++)!q[P].length&&(!m.length||!m[m.length-1].length)||(m.length&&!m[m.length-1].length&&m.pop(),m.push(g(q[P])))}else(q||typeof q=="string")&&(q=g(q),m[m.length-1]===""?m[m.length-1]=q:m.push(q));else q?m[C]=g(q):m.splice(C,1);return S&&m.unshift(""),this.path(m.join(ae),X)},f.segmentCoded=function(C,q,X){var ae,I,S;if(typeof C!="number"&&(X=q,q=C,C=void 0),q===void 0){if(ae=this.segment(C,q,X),!d(ae))ae=ae!==void 0?i.decode(ae):void 0;else for(I=0,S=ae.length;I<S;I++)ae[I]=i.decode(ae[I]);return ae}if(!d(q))q=typeof q=="string"||q instanceof String?i.encode(q):q;else for(I=0,S=q.length;I<S;I++)q[I]=i.encode(q[I]);return this.segment(C,q,X)};var le=f.query;return f.query=function(C,q){if(C===!0)return i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof C=="function"){var X=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace),ae=C.call(this,X);return this._parts.query=i.buildQuery(ae||X,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!q),this}else return C!==void 0&&typeof C!="string"?(this._parts.query=i.buildQuery(C,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!q),this):le.call(this,C,q)},f.setQuery=function(C,q,X){var ae=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof C=="string"||C instanceof String)ae[C]=q!==void 0?q:null;else if(typeof C=="object")for(var I in C)u.call(C,I)&&(ae[I]=C[I]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=i.buildQuery(ae,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof C!="string"&&(X=q),this.build(!X),this},f.addQuery=function(C,q,X){var ae=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.addQuery(ae,C,q===void 0?null:q),this._parts.query=i.buildQuery(ae,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof C!="string"&&(X=q),this.build(!X),this},f.removeQuery=function(C,q,X){var ae=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.removeQuery(ae,C,q),this._parts.query=i.buildQuery(ae,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof C!="string"&&(X=q),this.build(!X),this},f.hasQuery=function(C,q,X){var ae=i.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return i.hasQuery(ae,C,q,X)},f.setSearch=f.setQuery,f.addSearch=f.addQuery,f.removeSearch=f.removeQuery,f.hasSearch=f.hasQuery,f.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},f.normalizeProtocol=function(C){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!C)),this},f.normalizeHostname=function(C){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!C)),this},f.normalizePort=function(C){return typeof this._parts.protocol=="string"&&this._parts.port===i.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!C)),this},f.normalizePath=function(C){var q=this._parts.path;if(!q)return this;if(this._parts.urn)return this._parts.path=i.recodeUrnPath(this._parts.path),this.build(!C),this;if(this._parts.path==="/")return this;q=i.recodePath(q);var X,ae="",I,S;for(q.charAt(0)!=="/"&&(X=!0,q="/"+q),(q.slice(-3)==="/.."||q.slice(-2)==="/.")&&(q+="/"),q=q.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),X&&(ae=q.substring(1).match(/^(\.\.\/)+/)||"",ae&&(ae=ae[0]));I=q.search(/\/\.\.(\/|$)/),I!==-1;){if(I===0){q=q.substring(3);continue}S=q.substring(0,I).lastIndexOf("/"),S===-1&&(S=I),q=q.substring(0,S)+q.substring(I+3)}return X&&this.is("relative")&&(q=ae+q.substring(1)),this._parts.path=q,this.build(!C),this},f.normalizePathname=f.normalizePath,f.normalizeQuery=function(C){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(i.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!C)),this},f.normalizeFragment=function(C){return this._parts.fragment||(this._parts.fragment=null,this.build(!C)),this},f.normalizeSearch=f.normalizeQuery,f.normalizeHash=f.normalizeFragment,f.iso8859=function(){var C=i.encode,q=i.decode;i.encode=escape,i.decode=decodeURIComponent;try{this.normalize()}finally{i.encode=C,i.decode=q}return this},f.unicode=function(){var C=i.encode,q=i.decode;i.encode=A,i.decode=unescape;try{this.normalize()}finally{i.encode=C,i.decode=q}return this},f.readable=function(){var C=this.clone();C.username("").password("").normalize();var q="";if(C._parts.protocol&&(q+=C._parts.protocol+"://"),C._parts.hostname&&(C.is("punycode")&&e?(q+=e.toUnicode(C._parts.hostname),C._parts.port&&(q+=":"+C._parts.port)):q+=C.host()),C._parts.hostname&&C._parts.path&&C._parts.path.charAt(0)!=="/"&&(q+="/"),q+=C.path(!0),C._parts.query){for(var X="",ae=0,I=C._parts.query.split("&"),S=I.length;ae<S;ae++){var m=(I[ae]||"").split("=");X+="&"+i.decodeQuery(m[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),m[1]!==void 0&&(X+="="+i.decodeQuery(m[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}q+="?"+X.substring(1)}return q+=i.decodeQuery(C.hash(),!0),q},f.absoluteTo=function(C){var q=this.clone(),X=["protocol","username","password","hostname","port"],ae,I,S;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(C instanceof i||(C=new i(C)),q._parts.protocol||(q._parts.protocol=C._parts.protocol,this._parts.hostname))return q;for(I=0;S=X[I];I++)q._parts[S]=C._parts[S];return q._parts.path?(q._parts.path.substring(-2)===".."&&(q._parts.path+="/"),q.path().charAt(0)!=="/"&&(ae=C.directory(),ae=ae||(C.path().indexOf("/")===0?"/":""),q._parts.path=(ae?ae+"/":"")+q._parts.path,q.normalizePath())):(q._parts.path=C._parts.path,q._parts.query||(q._parts.query=C._parts.query)),q.build(),q},f.relativeTo=function(C){var q=this.clone().normalize(),X,ae,I,S,m;if(q._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(C=new i(C).normalize(),X=q._parts,ae=C._parts,S=q.path(),m=C.path(),S.charAt(0)!=="/")throw new Error("URI is already relative");if(m.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(X.protocol===ae.protocol&&(X.protocol=null),X.username!==ae.username||X.password!==ae.password||X.protocol!==null||X.username!==null||X.password!==null)return q.build();if(X.hostname===ae.hostname&&X.port===ae.port)X.hostname=null,X.port=null;else return q.build();if(S===m)return X.path="",q.build();if(I=i.commonPath(S,m),!I)return q.build();var P=ae.path.substring(I.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return X.path=P+X.path.substring(I.length)||"./",q.build()},f.equals=function(C){var q=this.clone(),X=new i(C),ae={},I={},S={},m,P,l;if(q.normalize(),X.normalize(),q.toString()===X.toString())return!0;if(m=q.query(),P=X.query(),q.query(""),X.query(""),q.toString()!==X.toString()||m.length!==P.length)return!1;ae=i.parseQuery(m,this._parts.escapeQuerySpace),I=i.parseQuery(P,this._parts.escapeQuerySpace);for(l in ae)if(u.call(ae,l)){if(d(ae[l])){if(!w(ae[l],I[l]))return!1}else if(ae[l]!==I[l])return!1;S[l]=!0}for(l in I)if(u.call(I,l)&&!S[l])return!1;return!0},f.preventInvalidHostname=function(C){return this._parts.preventInvalidHostname=!!C,this},f.duplicateQueryParameters=function(C){return this._parts.duplicateQueryParameters=!!C,this},f.escapeQuerySpace=function(C){return this._parts.escapeQuerySpace=!!C,this},i})});var fv=Jt((qP,lv)=>{"use strict";function qg(e,t){return function(){return e.apply(t,arguments)}}var{toString:LT}=Object.prototype,{getPrototypeOf:Dp}=Object,qc=(e=>t=>{let n=LT.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Io=e=>(e=e.toLowerCase(),t=>qc(t)===e),Vc=e=>t=>typeof t===e,{isArray:xa}=Array,Fs=Vc("undefined");function NT(e){return e!==null&&!Fs(e)&&e.constructor!==null&&!Fs(e.constructor)&&So(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Vg=Io("ArrayBuffer");function UT(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Vg(e.buffer),t}var MT=Vc("string"),So=Vc("function"),Kg=Vc("number"),Kc=e=>e!==null&&typeof e=="object",FT=e=>e===!0||e===!1,Nc=e=>{if(qc(e)!=="object")return!1;let t=Dp(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},DT=Io("Date"),qT=Io("File"),VT=Io("Blob"),KT=Io("FileList"),HT=e=>Kc(e)&&So(e.pipe),zT=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||So(e.append)&&((t=qc(e))==="formdata"||t==="object"&&So(e.toString)&&e.toString()==="[object FormData]"))},XT=Io("URLSearchParams"),[GT,WT,$T,QT]=["ReadableStream","Request","Response","Headers"].map(Io),YT=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ds(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,a;if(typeof e!="object"&&(e=[e]),xa(e))for(o=0,a=e.length;o<a;o++)t.call(null,e[o],o,e);else{let i=n?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length,f;for(o=0;o<s;o++)f=i[o],t.call(null,e[f],f,e)}}function Hg(e,t){t=t.toLowerCase();let n=Object.keys(e),o=n.length,a;for(;o-- >0;)if(a=n[o],t===a.toLowerCase())return a;return null}var zg=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Xg=e=>!Fs(e)&&e!==zg;function Ip(){let{caseless:e}=Xg(this)&&this||{},t={},n=(o,a)=>{let i=e&&Hg(t,a)||a;Nc(t[i])&&Nc(o)?t[i]=Ip(t[i],o):Nc(o)?t[i]=Ip({},o):xa(o)?t[i]=o.slice():t[i]=o};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&Ds(arguments[o],n);return t}var JT=(e,t,n,{allOwnKeys:o}={})=>(Ds(t,(a,i)=>{n&&So(a)?e[i]=qg(a,n):e[i]=a},{allOwnKeys:o}),e),ZT=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ek=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},tk=(e,t,n,o)=>{let a,i,s,f={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)s=a[i],(!o||o(s,e,t))&&!f[s]&&(t[s]=e[s],f[s]=!0);e=n!==!1&&Dp(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rk=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let o=e.indexOf(t,n);return o!==-1&&o===n},nk=e=>{if(!e)return null;if(xa(e))return e;let t=e.length;if(!Kg(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ok=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Dp(Uint8Array)),ik=(e,t)=>{let o=(e&&e[Symbol.iterator]).call(e),a;for(;(a=o.next())&&!a.done;){let i=a.value;t.call(e,i[0],i[1])}},ak=(e,t)=>{let n,o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},sk=Io("HTMLFormElement"),uk=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,a){return o.toUpperCase()+a}),Pg=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ck=Io("RegExp"),Gg=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),o={};Ds(n,(a,i)=>{let s;(s=t(a,i,e))!==!1&&(o[i]=s||a)}),Object.defineProperties(e,o)},lk=e=>{Gg(e,(t,n)=>{if(So(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let o=e[n];if(So(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},fk=(e,t)=>{let n={},o=a=>{a.forEach(i=>{n[i]=!0})};return xa(e)?o(e):o(String(e).split(t)),n},pk=()=>{},hk=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Op="abcdefghijklmnopqrstuvwxyz",xg="0123456789",Wg={DIGIT:xg,ALPHA:Op,ALPHA_DIGIT:Op+Op.toUpperCase()+xg},dk=(e=16,t=Wg.ALPHA_DIGIT)=>{let n="",{length:o}=t;for(;e--;)n+=t[Math.random()*o|0];return n};function yk(e){return!!(e&&So(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var mk=e=>{let t=new Array(10),n=(o,a)=>{if(Kc(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[a]=o;let i=xa(o)?[]:{};return Ds(o,(s,f)=>{let u=n(s,a+1);!Fs(u)&&(i[f]=u)}),t[a]=void 0,i}}return o};return n(e,0)},gk=Io("AsyncFunction"),vk=e=>e&&(Kc(e)||So(e))&&So(e.then)&&So(e.catch),Xt={isArray:xa,isArrayBuffer:Vg,isBuffer:NT,isFormData:zT,isArrayBufferView:UT,isString:MT,isNumber:Kg,isBoolean:FT,isObject:Kc,isPlainObject:Nc,isReadableStream:GT,isRequest:WT,isResponse:$T,isHeaders:QT,isUndefined:Fs,isDate:DT,isFile:qT,isBlob:VT,isRegExp:ck,isFunction:So,isStream:HT,isURLSearchParams:XT,isTypedArray:ok,isFileList:KT,forEach:Ds,merge:Ip,extend:JT,trim:YT,stripBOM:ZT,inherits:ek,toFlatObject:tk,kindOf:qc,kindOfTest:Io,endsWith:rk,toArray:nk,forEachEntry:ik,matchAll:ak,isHTMLForm:sk,hasOwnProperty:Pg,hasOwnProp:Pg,reduceDescriptors:Gg,freezeMethods:lk,toObjectSet:fk,toCamelCase:uk,noop:pk,toFiniteNumber:hk,findKey:Hg,global:zg,isContextDefined:Xg,ALPHABET:Wg,generateString:dk,isSpecCompliantForm:yk,toJSONObject:mk,isAsyncFn:gk,isThenable:vk};function Fr(e,t,n,o,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),a&&(this.response=a)}Xt.inherits(Fr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Xt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var $g=Fr.prototype,Qg={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Qg[e]={value:e}});Object.defineProperties(Fr,Qg);Object.defineProperty($g,"isAxiosError",{value:!0});Fr.from=(e,t,n,o,a,i)=>{let s=Object.create($g);return Xt.toFlatObject(e,s,function(u){return u!==Error.prototype},f=>f!=="isAxiosError"),Fr.call(s,e.message,t,n,o,a),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};var bk=null;function Cp(e){return Xt.isPlainObject(e)||Xt.isArray(e)}function Yg(e){return Xt.endsWith(e,"[]")?e.slice(0,-2):e}function Rg(e,t,n){return e?e.concat(t).map(function(a,i){return a=Yg(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function wk(e){return Xt.isArray(e)&&!e.some(Cp)}var Sk=Xt.toFlatObject(Xt,{},null,function(t){return/^is[A-Z]/.test(t)});function Hc(e,t,n){if(!Xt.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Xt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,p){return!Xt.isUndefined(p[g])});let o=n.metaTokens,a=n.visitor||_,i=n.dots,s=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&Xt.isSpecCompliantForm(t);if(!Xt.isFunction(a))throw new TypeError("visitor must be a function");function r(w){if(w===null)return"";if(Xt.isDate(w))return w.toISOString();if(!u&&Xt.isBlob(w))throw new Fr("Blob is not supported. Use a Buffer instead.");return Xt.isArrayBuffer(w)||Xt.isTypedArray(w)?u&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function _(w,g,p){let A=w;if(w&&!p&&typeof w=="object"){if(Xt.endsWith(g,"{}"))g=o?g:g.slice(0,-2),w=JSON.stringify(w);else if(Xt.isArray(w)&&wk(w)||(Xt.isFileList(w)||Xt.endsWith(g,"[]"))&&(A=Xt.toArray(w)))return g=Yg(g),A.forEach(function(E,N){!(Xt.isUndefined(E)||E===null)&&t.append(s===!0?Rg([g],N,i):s===null?g:g+"[]",r(E))}),!1}return Cp(w)?!0:(t.append(Rg(p,g,i),r(w)),!1)}let d=[],b=Object.assign(Sk,{defaultVisitor:_,convertValue:r,isVisitable:Cp});function T(w,g){if(!Xt.isUndefined(w)){if(d.indexOf(w)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(w),Xt.forEach(w,function(A,L){(!(Xt.isUndefined(A)||A===null)&&a.call(t,A,Xt.isString(L)?L.trim():L,g,b))===!0&&T(A,g?g.concat(L):[L])}),d.pop()}}if(!Xt.isObject(e))throw new TypeError("data must be an object");return T(e),t}function Ig(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function qp(e,t){this._pairs=[],e&&Hc(e,this,t)}var Jg=qp.prototype;Jg.append=function(t,n){this._pairs.push([t,n])};Jg.toString=function(t){let n=t?function(o){return t.call(this,o,Ig)}:Ig;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function Ak(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Zg(e,t,n){if(!t)return e;let o=n&&n.encode||Ak,a=n&&n.serialize,i;if(a?i=a(t,n):i=Xt.isURLSearchParams(t)?t.toString():new qp(t,n).toString(o),i){let s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}var Bp=class{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Xt.forEach(this.handlers,function(o){o!==null&&t(o)})}},Cg=Bp,ev={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_k=typeof URLSearchParams<"u"?URLSearchParams:qp,Ek=typeof FormData<"u"?FormData:null,Tk=typeof Blob<"u"?Blob:null,kk={isBrowser:!0,classes:{URLSearchParams:_k,FormData:Ek,Blob:Tk},protocols:["http","https","file","blob","url","data"]},Vp=typeof window<"u"&&typeof document<"u",Ok=(e=>Vp&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Pk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xk=Vp&&window.location.href||"http://localhost",Rk=Object.freeze({__proto__:null,hasBrowserEnv:Vp,hasStandardBrowserWebWorkerEnv:Pk,hasStandardBrowserEnv:Ok,origin:xk}),xo={...Rk,...kk};function Ik(e,t){return Hc(e,new xo.classes.URLSearchParams,Object.assign({visitor:function(n,o,a,i){return xo.isNode&&Xt.isBuffer(n)?(this.append(o,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Ck(e){return Xt.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Bk(e){let t={},n=Object.keys(e),o,a=n.length,i;for(o=0;o<a;o++)i=n[o],t[i]=e[i];return t}function tv(e){function t(n,o,a,i){let s=n[i++];if(s==="__proto__")return!0;let f=Number.isFinite(+s),u=i>=n.length;return s=!s&&Xt.isArray(a)?a.length:s,u?(Xt.hasOwnProp(a,s)?a[s]=[a[s],o]:a[s]=o,!f):((!a[s]||!Xt.isObject(a[s]))&&(a[s]=[]),t(n,o,a[s],i)&&Xt.isArray(a[s])&&(a[s]=Bk(a[s])),!f)}if(Xt.isFormData(e)&&Xt.isFunction(e.entries)){let n={};return Xt.forEachEntry(e,(o,a)=>{t(Ck(o),a,n,0)}),n}return null}function jk(e,t,n){if(Xt.isString(e))try{return(t||JSON.parse)(e),Xt.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}var Kp={transitional:ev,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){let o=n.getContentType()||"",a=o.indexOf("application/json")>-1,i=Xt.isObject(t);if(i&&Xt.isHTMLForm(t)&&(t=new FormData(t)),Xt.isFormData(t))return a?JSON.stringify(tv(t)):t;if(Xt.isArrayBuffer(t)||Xt.isBuffer(t)||Xt.isStream(t)||Xt.isFile(t)||Xt.isBlob(t)||Xt.isReadableStream(t))return t;if(Xt.isArrayBufferView(t))return t.buffer;if(Xt.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let f;if(i){if(o.indexOf("application/x-www-form-urlencoded")>-1)return Ik(t,this.formSerializer).toString();if((f=Xt.isFileList(t))||o.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return Hc(f?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||a?(n.setContentType("application/json",!1),jk(t)):t}],transformResponse:[function(t){let n=this.transitional||Kp.transitional,o=n&&n.forcedJSONParsing,a=this.responseType==="json";if(Xt.isResponse(t)||Xt.isReadableStream(t))return t;if(t&&Xt.isString(t)&&(o&&!this.responseType||a)){let s=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(f){if(s)throw f.name==="SyntaxError"?Fr.from(f,Fr.ERR_BAD_RESPONSE,this,null,this.response):f}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:xo.classes.FormData,Blob:xo.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Xt.forEach(["delete","get","head","post","put","patch"],e=>{Kp.headers[e]={}});var Hp=Kp,Lk=Xt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Nk=e=>{let t={},n,o,a;return e&&e.split(`
7
- `).forEach(function(s){a=s.indexOf(":"),n=s.substring(0,a).trim().toLowerCase(),o=s.substring(a+1).trim(),!(!n||t[n]&&Lk[n])&&(n==="set-cookie"?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t},Bg=Symbol("internals");function Ms(e){return e&&String(e).trim().toLowerCase()}function Uc(e){return e===!1||e==null?e:Xt.isArray(e)?e.map(Uc):String(e)}function Uk(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}var Mk=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Pp(e,t,n,o,a){if(Xt.isFunction(o))return o.call(this,t,n);if(a&&(t=n),!!Xt.isString(t)){if(Xt.isString(o))return t.indexOf(o)!==-1;if(Xt.isRegExp(o))return o.test(t)}}function Fk(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function Dk(e,t){let n=Xt.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(a,i,s){return this[o].call(this,t,a,i,s)},configurable:!0})})}var Oa=class{constructor(t){t&&this.set(t)}set(t,n,o){let a=this;function i(f,u,r){let _=Ms(u);if(!_)throw new Error("header name must be a non-empty string");let d=Xt.findKey(a,_);(!d||a[d]===void 0||r===!0||r===void 0&&a[d]!==!1)&&(a[d||u]=Uc(f))}let s=(f,u)=>Xt.forEach(f,(r,_)=>i(r,_,u));if(Xt.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(Xt.isString(t)&&(t=t.trim())&&!Mk(t))s(Nk(t),n);else if(Xt.isHeaders(t))for(let[f,u]of t.entries())i(u,f,o);else t!=null&&i(n,t,o);return this}get(t,n){if(t=Ms(t),t){let o=Xt.findKey(this,t);if(o){let a=this[o];if(!n)return a;if(n===!0)return Uk(a);if(Xt.isFunction(n))return n.call(this,a,o);if(Xt.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ms(t),t){let o=Xt.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||Pp(this,this[o],o,n)))}return!1}delete(t,n){let o=this,a=!1;function i(s){if(s=Ms(s),s){let f=Xt.findKey(o,s);f&&(!n||Pp(o,o[f],f,n))&&(delete o[f],a=!0)}}return Xt.isArray(t)?t.forEach(i):i(t),a}clear(t){let n=Object.keys(this),o=n.length,a=!1;for(;o--;){let i=n[o];(!t||Pp(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){let n=this,o={};return Xt.forEach(this,(a,i)=>{let s=Xt.findKey(o,i);if(s){n[s]=Uc(a),delete n[i];return}let f=t?Fk(i):String(i).trim();f!==i&&delete n[i],n[f]=Uc(a),o[f]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let n=Object.create(null);return Xt.forEach(this,(o,a)=>{o!=null&&o!==!1&&(n[a]=t&&Xt.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
8
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){let o=new this(t);return n.forEach(a=>o.set(a)),o}static accessor(t){let o=(this[Bg]=this[Bg]={accessors:{}}).accessors,a=this.prototype;function i(s){let f=Ms(s);o[f]||(Dk(a,s),o[f]=!0)}return Xt.isArray(t)?t.forEach(i):i(t),this}};Oa.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Xt.reduceDescriptors(Oa.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});Xt.freezeMethods(Oa);var Ro=Oa;function xp(e,t){let n=this||Hp,o=t||n,a=Ro.from(o.headers),i=o.data;return Xt.forEach(e,function(f){i=f.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function rv(e){return!!(e&&e.__CANCEL__)}function Ra(e,t,n){Fr.call(this,e??"canceled",Fr.ERR_CANCELED,t,n),this.name="CanceledError"}Xt.inherits(Ra,Fr,{__CANCEL__:!0});function nv(e,t,n){let o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Fr("Request failed with status code "+n.status,[Fr.ERR_BAD_REQUEST,Fr.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function qk(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Vk(e,t){e=e||10;let n=new Array(e),o=new Array(e),a=0,i=0,s;return t=t!==void 0?t:1e3,function(u){let r=Date.now(),_=o[i];s||(s=r),n[a]=u,o[a]=r;let d=i,b=0;for(;d!==a;)b+=n[d++],d=d%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),r-s<t)return;let T=_&&r-_;return T?Math.round(b*1e3/T):void 0}}function Kk(e,t){let n=0,o=1e3/t,a=null;return function(){let s=this===!0,f=Date.now();if(s||f-n>o)return a&&(clearTimeout(a),a=null),n=f,e.apply(null,arguments);a||(a=setTimeout(()=>(a=null,n=Date.now(),e.apply(null,arguments)),o-(f-n)))}}var Fc=(e,t,n=3)=>{let o=0,a=Vk(50,250);return Kk(i=>{let s=i.loaded,f=i.lengthComputable?i.total:void 0,u=s-o,r=a(u),_=s<=f;o=s;let d={loaded:s,total:f,progress:f?s/f:void 0,bytes:u,rate:r||void 0,estimated:r&&f&&_?(f-s)/r:void 0,event:i,lengthComputable:f!=null};d[t?"download":"upload"]=!0,e(d)},n)},Hk=xo.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),o;function a(i){let s=i;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return o=a(window.location.href),function(s){let f=Xt.isString(s)?a(s):s;return f.protocol===o.protocol&&f.host===o.host}}():function(){return function(){return!0}}(),zk=xo.hasStandardBrowserEnv?{write(e,t,n,o,a,i){let s=[e+"="+encodeURIComponent(t)];Xt.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),Xt.isString(o)&&s.push("path="+o),Xt.isString(a)&&s.push("domain="+a),i===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Xk(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Gk(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ov(e,t){return e&&!Xk(t)?Gk(e,t):t}var jg=e=>e instanceof Ro?{...e}:e;function Hi(e,t){t=t||{};let n={};function o(r,_,d){return Xt.isPlainObject(r)&&Xt.isPlainObject(_)?Xt.merge.call({caseless:d},r,_):Xt.isPlainObject(_)?Xt.merge({},_):Xt.isArray(_)?_.slice():_}function a(r,_,d){if(Xt.isUndefined(_)){if(!Xt.isUndefined(r))return o(void 0,r,d)}else return o(r,_,d)}function i(r,_){if(!Xt.isUndefined(_))return o(void 0,_)}function s(r,_){if(Xt.isUndefined(_)){if(!Xt.isUndefined(r))return o(void 0,r)}else return o(void 0,_)}function f(r,_,d){if(d in t)return o(r,_);if(d in e)return o(void 0,r)}let u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:f,headers:(r,_)=>a(jg(r),jg(_),!0)};return Xt.forEach(Object.keys(Object.assign({},e,t)),function(_){let d=u[_]||a,b=d(e[_],t[_],_);Xt.isUndefined(b)&&d!==f||(n[_]=b)}),n}var iv=e=>{let t=Hi({},e),{data:n,withXSRFToken:o,xsrfHeaderName:a,xsrfCookieName:i,headers:s,auth:f}=t;t.headers=s=Ro.from(s),t.url=Zg(ov(t.baseURL,t.url),e.params,e.paramsSerializer),f&&s.set("Authorization","Basic "+btoa((f.username||"")+":"+(f.password?unescape(encodeURIComponent(f.password)):"")));let u;if(Xt.isFormData(n)){if(xo.hasStandardBrowserEnv||xo.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((u=s.getContentType())!==!1){let[r,..._]=u?u.split(";").map(d=>d.trim()).filter(Boolean):[];s.setContentType([r||"multipart/form-data",..._].join("; "))}}if(xo.hasStandardBrowserEnv&&(o&&Xt.isFunction(o)&&(o=o(t)),o||o!==!1&&Hk(t.url))){let r=a&&i&&zk.read(i);r&&s.set(a,r)}return t},Wk=typeof XMLHttpRequest<"u",$k=Wk&&function(e){return new Promise(function(n,o){let a=iv(e),i=a.data,s=Ro.from(a.headers).normalize(),{responseType:f}=a,u;function r(){a.cancelToken&&a.cancelToken.unsubscribe(u),a.signal&&a.signal.removeEventListener("abort",u)}let _=new XMLHttpRequest;_.open(a.method.toUpperCase(),a.url,!0),_.timeout=a.timeout;function d(){if(!_)return;let T=Ro.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),g={data:!f||f==="text"||f==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:T,config:e,request:_};nv(function(A){n(A),r()},function(A){o(A),r()},g),_=null}"onloadend"in _?_.onloadend=d:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.indexOf("file:")===0)||setTimeout(d)},_.onabort=function(){_&&(o(new Fr("Request aborted",Fr.ECONNABORTED,a,_)),_=null)},_.onerror=function(){o(new Fr("Network Error",Fr.ERR_NETWORK,a,_)),_=null},_.ontimeout=function(){let w=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded",g=a.transitional||ev;a.timeoutErrorMessage&&(w=a.timeoutErrorMessage),o(new Fr(w,g.clarifyTimeoutError?Fr.ETIMEDOUT:Fr.ECONNABORTED,a,_)),_=null},i===void 0&&s.setContentType(null),"setRequestHeader"in _&&Xt.forEach(s.toJSON(),function(w,g){_.setRequestHeader(g,w)}),Xt.isUndefined(a.withCredentials)||(_.withCredentials=!!a.withCredentials),f&&f!=="json"&&(_.responseType=a.responseType),typeof a.onDownloadProgress=="function"&&_.addEventListener("progress",Fc(a.onDownloadProgress,!0)),typeof a.onUploadProgress=="function"&&_.upload&&_.upload.addEventListener("progress",Fc(a.onUploadProgress)),(a.cancelToken||a.signal)&&(u=T=>{_&&(o(!T||T.type?new Ra(null,e,_):T),_.abort(),_=null)},a.cancelToken&&a.cancelToken.subscribe(u),a.signal&&(a.signal.aborted?u():a.signal.addEventListener("abort",u)));let b=qk(a.url);if(b&&xo.protocols.indexOf(b)===-1){o(new Fr("Unsupported protocol "+b+":",Fr.ERR_BAD_REQUEST,e));return}_.send(i||null)})},Qk=(e,t)=>{let n=new AbortController,o,a=function(u){if(!o){o=!0,s();let r=u instanceof Error?u:this.reason;n.abort(r instanceof Fr?r:new Ra(r instanceof Error?r.message:r))}},i=t&&setTimeout(()=>{a(new Fr(`timeout ${t} of ms exceeded`,Fr.ETIMEDOUT))},t),s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u&&(u.removeEventListener?u.removeEventListener("abort",a):u.unsubscribe(a))}),e=null)};e.forEach(u=>u&&u.addEventListener&&u.addEventListener("abort",a));let{signal:f}=n;return f.unsubscribe=s,[f,()=>{i&&clearTimeout(i),i=null}]},Yk=Qk,Jk=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let o=0,a;for(;o<n;)a=o+t,yield e.slice(o,a),o=a},Zk=async function*(e,t,n){for await(let o of e)yield*Jk(ArrayBuffer.isView(o)?o:await n(String(o)),t)},Lg=(e,t,n,o,a)=>{let i=Zk(e,t,a),s=0;return new ReadableStream({type:"bytes",async pull(f){let{done:u,value:r}=await i.next();if(u){f.close(),o();return}let _=r.byteLength;n&&n(s+=_),f.enqueue(new Uint8Array(r))},cancel(f){return o(f),i.return()}},{highWaterMark:2})},Ng=(e,t)=>{let n=e!=null;return o=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:o}))},zc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",av=zc&&typeof ReadableStream=="function",jp=zc&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),e5=av&&(()=>{let e=!1,t=new Request(xo.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Ug=64*1024,Lp=av&&!!(()=>{try{return Xt.isReadableStream(new Response("").body)}catch{}})(),Dc={stream:Lp&&(e=>e.body)};zc&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Dc[t]&&(Dc[t]=Xt.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new Fr(`Response type '${t}' is not supported`,Fr.ERR_NOT_SUPPORT,o)})})})(new Response);var t5=async e=>{if(e==null)return 0;if(Xt.isBlob(e))return e.size;if(Xt.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(Xt.isArrayBufferView(e))return e.byteLength;if(Xt.isURLSearchParams(e)&&(e=e+""),Xt.isString(e))return(await jp(e)).byteLength},r5=async(e,t)=>{let n=Xt.toFiniteNumber(e.getContentLength());return n??t5(t)},n5=zc&&(async e=>{let{url:t,method:n,data:o,signal:a,cancelToken:i,timeout:s,onDownloadProgress:f,onUploadProgress:u,responseType:r,headers:_,withCredentials:d="same-origin",fetchOptions:b}=iv(e);r=r?(r+"").toLowerCase():"text";let[T,w]=a||i||s?Yk([a,i],s):[],g,p,A=()=>{!g&&setTimeout(()=>{T&&T.unsubscribe()}),g=!0},L;try{if(u&&e5&&n!=="get"&&n!=="head"&&(L=await r5(_,o))!==0){let R=new Request(t,{method:"POST",body:o,duplex:"half"}),j;Xt.isFormData(o)&&(j=R.headers.get("content-type"))&&_.setContentType(j),R.body&&(o=Lg(R.body,Ug,Ng(L,Fc(u)),null,jp))}Xt.isString(d)||(d=d?"cors":"omit"),p=new Request(t,{...b,signal:T,method:n.toUpperCase(),headers:_.normalize().toJSON(),body:o,duplex:"half",withCredentials:d});let E=await fetch(p),N=Lp&&(r==="stream"||r==="response");if(Lp&&(f||N)){let R={};["status","statusText","headers"].forEach(V=>{R[V]=E[V]});let j=Xt.toFiniteNumber(E.headers.get("content-length"));E=new Response(Lg(E.body,Ug,f&&Ng(j,Fc(f,!0)),N&&A,jp),R)}r=r||"text";let F=await Dc[Xt.findKey(Dc,r)||"text"](E,e);return!N&&A(),w&&w(),await new Promise((R,j)=>{nv(R,j,{data:F,headers:Ro.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:p})})}catch(E){throw A(),E&&E.name==="TypeError"&&/fetch/i.test(E.message)?Object.assign(new Fr("Network Error",Fr.ERR_NETWORK,e,p),{cause:E.cause||E}):Fr.from(E,E&&E.code,e,p)}}),Np={http:bk,xhr:$k,fetch:n5};Xt.forEach(Np,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var Mg=e=>`- ${e}`,o5=e=>Xt.isFunction(e)||e===null||e===!1,sv={getAdapter:e=>{e=Xt.isArray(e)?e:[e];let{length:t}=e,n,o,a={};for(let i=0;i<t;i++){n=e[i];let s;if(o=n,!o5(n)&&(o=Np[(s=String(n)).toLowerCase()],o===void 0))throw new Fr(`Unknown adapter '${s}'`);if(o)break;a[s||"#"+i]=o}if(!o){let i=Object.entries(a).map(([f,u])=>`adapter ${f} `+(u===!1?"is not supported by the environment":"is not available in the build")),s=t?i.length>1?`since :
9
- `+i.map(Mg).join(`
10
- `):" "+Mg(i[0]):"as no adapter specified";throw new Fr("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return o},adapters:Np};function Rp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ra(null,e)}function Fg(e){return Rp(e),e.headers=Ro.from(e.headers),e.data=xp.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),sv.getAdapter(e.adapter||Hp.adapter)(e).then(function(o){return Rp(e),o.data=xp.call(e,e.transformResponse,o),o.headers=Ro.from(o.headers),o},function(o){return rv(o)||(Rp(e),o&&o.response&&(o.response.data=xp.call(e,e.transformResponse,o.response),o.response.headers=Ro.from(o.response.headers))),Promise.reject(o)})}var uv="1.7.2",zp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{zp[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});var Dg={};zp.transitional=function(t,n,o){function a(i,s){return"[Axios v"+uv+"] Transitional option '"+i+"'"+s+(o?". "+o:"")}return(i,s,f)=>{if(t===!1)throw new Fr(a(s," has been removed"+(n?" in "+n:"")),Fr.ERR_DEPRECATED);return n&&!Dg[s]&&(Dg[s]=!0,console.warn(a(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,s,f):!0}};function i5(e,t,n){if(typeof e!="object")throw new Fr("options must be an object",Fr.ERR_BAD_OPTION_VALUE);let o=Object.keys(e),a=o.length;for(;a-- >0;){let i=o[a],s=t[i];if(s){let f=e[i],u=f===void 0||s(f,i,e);if(u!==!0)throw new Fr("option "+i+" must be "+u,Fr.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Fr("Unknown option "+i,Fr.ERR_BAD_OPTION)}}var Up={assertOptions:i5,validators:zp},yi=Up.validators,Pa=class{constructor(t){this.defaults=t,this.interceptors={request:new Cg,response:new Cg}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let a;Error.captureStackTrace?Error.captureStackTrace(a={}):a=new Error;let i=a.stack?a.stack.replace(/^.+\n/,""):"";try{o.stack?i&&!String(o.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(o.stack+=`
11
- `+i):o.stack=i}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Hi(this.defaults,n);let{transitional:o,paramsSerializer:a,headers:i}=n;o!==void 0&&Up.assertOptions(o,{silentJSONParsing:yi.transitional(yi.boolean),forcedJSONParsing:yi.transitional(yi.boolean),clarifyTimeoutError:yi.transitional(yi.boolean)},!1),a!=null&&(Xt.isFunction(a)?n.paramsSerializer={serialize:a}:Up.assertOptions(a,{encode:yi.function,serialize:yi.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=i&&Xt.merge(i.common,i[n.method]);i&&Xt.forEach(["delete","get","head","post","put","patch","common"],w=>{delete i[w]}),n.headers=Ro.concat(s,i);let f=[],u=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(u=u&&g.synchronous,f.unshift(g.fulfilled,g.rejected))});let r=[];this.interceptors.response.forEach(function(g){r.push(g.fulfilled,g.rejected)});let _,d=0,b;if(!u){let w=[Fg.bind(this),void 0];for(w.unshift.apply(w,f),w.push.apply(w,r),b=w.length,_=Promise.resolve(n);d<b;)_=_.then(w[d++],w[d++]);return _}b=f.length;let T=n;for(d=0;d<b;){let w=f[d++],g=f[d++];try{T=w(T)}catch(p){g.call(this,p);break}}try{_=Fg.call(this,T)}catch(w){return Promise.reject(w)}for(d=0,b=r.length;d<b;)_=_.then(r[d++],r[d++]);return _}getUri(t){t=Hi(this.defaults,t);let n=ov(t.baseURL,t.url);return Zg(n,t.params,t.paramsSerializer)}};Xt.forEach(["delete","get","head","options"],function(t){Pa.prototype[t]=function(n,o){return this.request(Hi(o||{},{method:t,url:n,data:(o||{}).data}))}});Xt.forEach(["post","put","patch"],function(t){function n(o){return function(i,s,f){return this.request(Hi(f||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:i,data:s}))}}Pa.prototype[t]=n(),Pa.prototype[t+"Form"]=n(!0)});var Mc=Pa,Mp=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});let o=this;this.promise.then(a=>{if(!o._listeners)return;let i=o._listeners.length;for(;i-- >0;)o._listeners[i](a);o._listeners=null}),this.promise.then=a=>{let i,s=new Promise(f=>{o.subscribe(f),i=f}).then(a);return s.cancel=function(){o.unsubscribe(i)},s},t(function(i,s,f){o.reason||(o.reason=new Ra(i,s,f),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new e(function(a){t=a}),cancel:t}}},a5=Mp;function s5(e){return function(n){return e.apply(null,n)}}function u5(e){return Xt.isObject(e)&&e.isAxiosError===!0}var Fp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Fp).forEach(([e,t])=>{Fp[t]=e});var c5=Fp;function cv(e){let t=new Mc(e),n=qg(Mc.prototype.request,t);return Xt.extend(n,Mc.prototype,t,{allOwnKeys:!0}),Xt.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return cv(Hi(e,a))},n}var Pn=cv(Hp);Pn.Axios=Mc;Pn.CanceledError=Ra;Pn.CancelToken=a5;Pn.isCancel=rv;Pn.VERSION=uv;Pn.toFormData=Hc;Pn.AxiosError=Fr;Pn.Cancel=Pn.CanceledError;Pn.all=function(t){return Promise.all(t)};Pn.spread=s5;Pn.isAxiosError=u5;Pn.mergeConfig=Hi;Pn.AxiosHeaders=Ro;Pn.formToJSON=e=>tv(Xt.isHTMLForm(e)?new FormData(e):e);Pn.getAdapter=sv.getAdapter;Pn.HttpStatusCode=c5;Pn.default=Pn;lv.exports=Pn});var pv=Jt((VP,l5)=>{l5.exports={name:"@stellar/stellar-sdk",version:"12.0.0-rc.3",description:"A library for working with the Stellar network, including communication with the Horizon and Soroban RPC servers.",keywords:["stellar"],homepage:"https://github.com/stellar/js-stellar-sdk",bugs:{url:"https://github.com/stellar/js-stellar-sdk/issues"},repository:{type:"git",url:"https://github.com/stellar/js-stellar-sdk.git"},license:"Apache-2.0",author:"Stellar Development Foundation <hello@stellar.org>",main:"./lib/index.js",types:"./lib/index.d.ts",browser:"./dist/stellar-sdk.min.js",files:["/types","/lib","/dist"],exports:{".":{browser:"./dist/stellar-sdk.min.js",types:"./lib/index.d.ts",default:"./lib/index.js"},"./contract":{types:"./lib/contract/index.d.ts",default:"./lib/contract/index.js"},"./rpc":{types:"./lib/rpc/index.d.ts",default:"./lib/rpc/index.js"}},scripts:{build:"cross-env NODE_ENV=development yarn _build","build:prod":"cross-env NODE_ENV=production yarn _build","build:node":"yarn _babel && yarn build:ts","build:ts":"tsc -p ./config/tsconfig.json","build:test":"tsc -p ./test/unit/tsconfig.json","build:browser":"webpack -c config/webpack.config.browser.js","build:docs":"cross-env NODE_ENV=docs yarn _babel",clean:"rm -rf lib/ dist/ coverage/ .nyc_output/ jsdoc/ test/e2e/.soroban",docs:"yarn build:docs && jsdoc -c ./config/.jsdoc.json --verbose",test:"yarn build:test && yarn test:node && yarn test:integration && yarn test:browser","test:e2e":"./test/e2e/initialize.sh && ava","test:node":"yarn _nyc mocha --recursive 'test/unit/**/*.js'","test:integration":"yarn _nyc mocha --recursive 'test/integration/**/*.js'","test:browser":"karma start config/karma.conf.js",fmt:"yarn eslint -c .eslintrc.js src/ --fix && yarn _prettier",preversion:"yarn clean && yarn _prettier && yarn build:prod && yarn test",prepare:"yarn build:prod",_build:"yarn build:node && yarn build:test && yarn build:browser",_babel:"babel --extensions '.ts' --out-dir lib/ src/",_nyc:"nyc --nycrc-path config/.nycrc",_prettier:"prettier --ignore-path config/.prettierignore --write './test/**/*.js'"},husky:{hooks:{"pre-commit":"lint-staged"}},"lint-staged":{"**/*.{js,json,ts}":["yarn fmt"]},mocha:{reporter:"spec",require:["@babel/register","test/test-nodejs.js"],exclude:["test/test-browser.js"],sort:!0,recursive:!0,timeout:3e4},nyc:{instrument:!1,sourceMap:!1,reporter:["text-summary"]},devDependencies:{"@babel/cli":"^7.24.1","@babel/core":"^7.24.3","@babel/eslint-plugin":"^7.22.10","@babel/preset-env":"^7.24.3","@babel/preset-typescript":"^7.24.1","@babel/register":"^7.23.7","@definitelytyped/dtslint":"^0.2.20","@istanbuljs/nyc-config-babel":"3.0.0","@stellar/tsconfig":"^1.0.2","@types/chai":"^4.3.14","@types/detect-node":"^2.0.0","@types/eventsource":"^1.1.12","@types/json-schema":"^7.0.15","@types/lodash":"^4.17.0","@types/mocha":"^10.0.2","@types/node":"^20.11.30","@types/randombytes":"^2.0.1","@types/sinon":"^17.0.2","@types/urijs":"^1.19.20","@typescript-eslint/parser":"^7.7.1",ava:"^5.3.1","axios-mock-adapter":"^1.22.0","babel-loader":"^9.1.3","babel-plugin-istanbul":"^6.1.1",buffer:"^6.0.3",chai:"^4.3.10","chai-as-promised":"^7.1.1","chai-http":"^4.3.0","cross-env":"^7.0.3",dotenv:"^16.4.5",eslint:"^8.57.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-airbnb-typescript":"^18.0.0","eslint-config-prettier":"^9.0.0","eslint-plugin-import":"^2.29.1","eslint-plugin-jsdoc":"^48.2.4","eslint-plugin-node":"^11.1.0","eslint-plugin-prefer-import":"^0.0.1","eslint-plugin-prettier":"^5.1.2","eslint-webpack-plugin":"^4.1.0",ghooks:"^2.0.4",husky:"^9.0.11",jsdoc:"^4.0.2","json-schema-faker":"^0.5.6",karma:"^6.4.3","karma-chai":"^0.1.0","karma-chrome-launcher":"^3.1.0","karma-coverage":"^2.2.1","karma-firefox-launcher":"^2.1.3","karma-mocha":"^2.0.0","karma-sinon-chai":"^2.0.2","karma-webpack":"^5.0.1","lint-staged":"^15.2.2",lodash:"^4.17.21",minami:"^1.1.1",mocha:"^10.3.0","node-polyfill-webpack-plugin":"^3.0.0",nyc:"^15.1.0",prettier:"^3.2.5",randombytes:"^2.1.0",sinon:"^17.0.1","sinon-chai":"^3.7.0",taffydb:"^2.7.3","terser-webpack-plugin":"^5.3.10","ts-node":"^10.9.2",typescript:"^5.4.3",webpack:"^5.91.0","webpack-cli":"^5.0.1"},dependencies:{"@stellar/stellar-base":"^12.0.0-rc.1",axios:"^1.6.8","bignumber.js":"^9.1.2",eventsource:"^2.0.2",randombytes:"^2.1.0",toml:"^3.0.0",urijs:"^1.19.1"},ava:{files:["./test/e2e/src/test-*"],require:["dotenv/config"],timeout:"2m"}}});var Xc=Jt(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.version=mi.default=mi.AxiosClient=void 0;var f5=p5(fv());function p5(e){return e&&e.__esModule?e:{default:e}}var h5=mi.version=pv().version,d5=mi.AxiosClient=f5.default.create({headers:{"X-Client-Name":"js-soroban-client","X-Client-Version":h5}}),KP=mi.default=d5});var dv=Jt(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});Wp.postObject=v5;var y5=m5(Xc());function m5(e){return e&&e.__esModule?e:{default:e}}function Gc(e){"@babel/helpers - typeof";return Gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gc(e)}function Xp(){"use strict";Xp=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(I,S,m){I[S]=m.value},i=typeof Symbol=="function"?Symbol:{},s=i.iterator||"@@iterator",f=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function r(I,S,m){return Object.defineProperty(I,S,{value:m,enumerable:!0,configurable:!0,writable:!0}),I[S]}try{r({},"")}catch{r=function(m,P,l){return m[P]=l}}function _(I,S,m,P){var l=S&&S.prototype instanceof A?S:A,x=Object.create(l.prototype),W=new X(P||[]);return a(x,"_invoke",{value:me(I,m,W)}),x}function d(I,S,m){try{return{type:"normal",arg:I.call(S,m)}}catch(P){return{type:"throw",arg:P}}}t.wrap=_;var b="suspendedStart",T="suspendedYield",w="executing",g="completed",p={};function A(){}function L(){}function E(){}var N={};r(N,s,function(){return this});var F=Object.getPrototypeOf,R=F&&F(F(ae([])));R&&R!==n&&o.call(R,s)&&(N=R);var j=E.prototype=A.prototype=Object.create(N);function V(I){["next","throw","return"].forEach(function(S){r(I,S,function(m){return this._invoke(S,m)})})}function Y(I,S){function m(l,x,W,K){var re=d(I[l],I,x);if(re.type!=="throw"){var oe=re.arg,Ee=oe.value;return Ee&&Gc(Ee)=="object"&&o.call(Ee,"__await")?S.resolve(Ee.__await).then(function(Fe){m("next",Fe,W,K)},function(Fe){m("throw",Fe,W,K)}):S.resolve(Ee).then(function(Fe){oe.value=Fe,W(oe)},function(Fe){return m("throw",Fe,W,K)})}K(re.arg)}var P;a(this,"_invoke",{value:function(x,W){function K(){return new S(function(re,oe){m(x,W,re,oe)})}return P=P?P.then(K,K):K()}})}function me(I,S,m){var P=b;return function(l,x){if(P===w)throw Error("Generator is already running");if(P===g){if(l==="throw")throw x;return{value:e,done:!0}}for(m.method=l,m.arg=x;;){var W=m.delegate;if(W){var K=le(W,m);if(K){if(K===p)continue;return K}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(P===b)throw P=g,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);P=w;var re=d(I,S,m);if(re.type==="normal"){if(P=m.done?g:T,re.arg===p)continue;return{value:re.arg,done:m.done}}re.type==="throw"&&(P=g,m.method="throw",m.arg=re.arg)}}}function le(I,S){var m=S.method,P=I.iterator[m];if(P===e)return S.delegate=null,m==="throw"&&I.iterator.return&&(S.method="return",S.arg=e,le(I,S),S.method==="throw")||m!=="return"&&(S.method="throw",S.arg=new TypeError("The iterator does not provide a '"+m+"' method")),p;var l=d(P,I.iterator,S.arg);if(l.type==="throw")return S.method="throw",S.arg=l.arg,S.delegate=null,p;var x=l.arg;return x?x.done?(S[I.resultName]=x.value,S.next=I.nextLoc,S.method!=="return"&&(S.method="next",S.arg=e),S.delegate=null,p):x:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,p)}function C(I){var S={tryLoc:I[0]};1 in I&&(S.catchLoc=I[1]),2 in I&&(S.finallyLoc=I[2],S.afterLoc=I[3]),this.tryEntries.push(S)}function q(I){var S=I.completion||{};S.type="normal",delete S.arg,I.completion=S}function X(I){this.tryEntries=[{tryLoc:"root"}],I.forEach(C,this),this.reset(!0)}function ae(I){if(I||I===""){var S=I[s];if(S)return S.call(I);if(typeof I.next=="function")return I;if(!isNaN(I.length)){var m=-1,P=function l(){for(;++m<I.length;)if(o.call(I,m))return l.value=I[m],l.done=!1,l;return l.value=e,l.done=!0,l};return P.next=P}}throw new TypeError(Gc(I)+" is not iterable")}return L.prototype=E,a(j,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:L,configurable:!0}),L.displayName=r(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(I){var S=typeof I=="function"&&I.constructor;return!!S&&(S===L||(S.displayName||S.name)==="GeneratorFunction")},t.mark=function(I){return Object.setPrototypeOf?Object.setPrototypeOf(I,E):(I.__proto__=E,r(I,u,"GeneratorFunction")),I.prototype=Object.create(j),I},t.awrap=function(I){return{__await:I}},V(Y.prototype),r(Y.prototype,f,function(){return this}),t.AsyncIterator=Y,t.async=function(I,S,m,P,l){l===void 0&&(l=Promise);var x=new Y(_(I,S,m,P),l);return t.isGeneratorFunction(S)?x:x.next().then(function(W){return W.done?W.value:x.next()})},V(j),r(j,u,"Generator"),r(j,s,function(){return this}),r(j,"toString",function(){return"[object Generator]"}),t.keys=function(I){var S=Object(I),m=[];for(var P in S)m.push(P);return m.reverse(),function l(){for(;m.length;){var x=m.pop();if(x in S)return l.value=x,l.done=!1,l}return l.done=!0,l}},t.values=ae,X.prototype={constructor:X,reset:function(S){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(q),!S)for(var m in this)m.charAt(0)==="t"&&o.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var S=this.tryEntries[0].completion;if(S.type==="throw")throw S.arg;return this.rval},dispatchException:function(S){if(this.done)throw S;var m=this;function P(oe,Ee){return W.type="throw",W.arg=S,m.next=oe,Ee&&(m.method="next",m.arg=e),!!Ee}for(var l=this.tryEntries.length-1;l>=0;--l){var x=this.tryEntries[l],W=x.completion;if(x.tryLoc==="root")return P("end");if(x.tryLoc<=this.prev){var K=o.call(x,"catchLoc"),re=o.call(x,"finallyLoc");if(K&&re){if(this.prev<x.catchLoc)return P(x.catchLoc,!0);if(this.prev<x.finallyLoc)return P(x.finallyLoc)}else if(K){if(this.prev<x.catchLoc)return P(x.catchLoc,!0)}else{if(!re)throw Error("try statement without catch or finally");if(this.prev<x.finallyLoc)return P(x.finallyLoc)}}}},abrupt:function(S,m){for(var P=this.tryEntries.length-1;P>=0;--P){var l=this.tryEntries[P];if(l.tryLoc<=this.prev&&o.call(l,"finallyLoc")&&this.prev<l.finallyLoc){var x=l;break}}x&&(S==="break"||S==="continue")&&x.tryLoc<=m&&m<=x.finallyLoc&&(x=null);var W=x?x.completion:{};return W.type=S,W.arg=m,x?(this.method="next",this.next=x.finallyLoc,p):this.complete(W)},complete:function(S,m){if(S.type==="throw")throw S.arg;return S.type==="break"||S.type==="continue"?this.next=S.arg:S.type==="return"?(this.rval=this.arg=S.arg,this.method="return",this.next="end"):S.type==="normal"&&m&&(this.next=m),p},finish:function(S){for(var m=this.tryEntries.length-1;m>=0;--m){var P=this.tryEntries[m];if(P.finallyLoc===S)return this.complete(P.completion,P.afterLoc),q(P),p}},catch:function(S){for(var m=this.tryEntries.length-1;m>=0;--m){var P=this.tryEntries[m];if(P.tryLoc===S){var l=P.completion;if(l.type==="throw"){var x=l.arg;q(P)}return x}}throw Error("illegal catch attempt")},delegateYield:function(S,m,P){return this.delegate={iterator:ae(S),resultName:m,nextLoc:P},this.method==="next"&&(this.arg=e),p}},t}function hv(e,t,n,o,a,i,s){try{var f=e[i](s),u=f.value}catch(r){n(r);return}f.done?t(u):Promise.resolve(u).then(o,a)}function g5(e){return function(){var t=this,n=arguments;return new Promise(function(o,a){var i=e.apply(t,n);function s(u){hv(i,o,a,s,f,"next",u)}function f(u){hv(i,o,a,s,f,"throw",u)}s(void 0)})}}function v5(e,t){return Gp.apply(this,arguments)}function Gp(){return Gp=g5(Xp().mark(function e(t,n){var o,a,i,s=arguments;return Xp().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return o=s.length>2&&s[2]!==void 0?s[2]:null,u.next=3,y5.default.post(t,{jsonrpc:"2.0",id:1,method:n,params:o});case 3:if(a=u.sent,!b5(a.data,"error")){u.next=8;break}throw a.data.error;case 8:return u.abrupt("return",(i=a.data)===null||i===void 0?void 0:i.result);case 9:case"end":return u.stop()}},e)})),Gp.apply(this,arguments)}function b5(e,t){return e.hasOwnProperty(t)}});var zi=Jt(Wc=>{"use strict";Object.defineProperty(Wc,"__esModule",{value:!0});Wc.Api=void 0;var yv;(function(e){var t=function(s){return s.SUCCESS="SUCCESS",s.NOT_FOUND="NOT_FOUND",s.FAILED="FAILED",s}({});e.GetTransactionStatus=t;function n(s){return"error"in s}e.isSimulationError=n;function o(s){return"transactionData"in s}e.isSimulationSuccess=o;function a(s){return o(s)&&"restorePreamble"in s&&!!s.restorePreamble.transactionData}e.isSimulationRestore=a;function i(s){return!s._parsed}e.isSimulationRaw=i})(yv||(Wc.Api=yv={}))});var $c=Jt(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});Ia.parseRawEvents=T5;Ia.parseRawLedgerEntries=k5;Ia.parseRawSendTransaction=E5;Ia.parseRawSimulation=O5;var yo=oi(),w5=zi();function qs(e){"@babel/helpers - typeof";return qs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qs(e)}function mv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,o)}return n}function to(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mv(Object(n),!0).forEach(function(o){S5(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mv(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function S5(e,t,n){return t=A5(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A5(e){var t=_5(e,"string");return qs(t)=="symbol"?t:t+""}function _5(e,t){if(qs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(qs(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function E5(e){var t=e.errorResultXdr,n=e.diagnosticEventsXdr;return delete e.errorResultXdr,delete e.diagnosticEventsXdr,t?to(to(to({},e),n!==void 0&&n.length>0&&{diagnosticEvents:n.map(function(o){return yo.xdr.DiagnosticEvent.fromXDR(o,"base64")})}),{},{errorResult:yo.xdr.TransactionResult.fromXDR(t,"base64")}):to({},e)}function T5(e){var t;return{latestLedger:e.latestLedger,events:((t=e.events)!==null&&t!==void 0?t:[]).map(function(n){var o=to({},n);return delete o.contractId,to(to(to({},o),n.contractId!==""&&{contractId:new yo.Contract(n.contractId)}),{},{topic:n.topic.map(function(a){return yo.xdr.ScVal.fromXDR(a,"base64")}),value:yo.xdr.ScVal.fromXDR(n.value,"base64")})})}}function k5(e){var t;return{latestLedger:e.latestLedger,entries:((t=e.entries)!==null&&t!==void 0?t:[]).map(function(n){if(!n.key||!n.xdr)throw new TypeError("invalid ledger entry: ".concat(JSON.stringify(n)));return to({lastModifiedLedgerSeq:n.lastModifiedLedgerSeq,key:yo.xdr.LedgerKey.fromXDR(n.key,"base64"),val:yo.xdr.LedgerEntryData.fromXDR(n.xdr,"base64")},n.liveUntilLedgerSeq!==void 0&&{liveUntilLedgerSeq:n.liveUntilLedgerSeq})})}}function O5(e){var t,n,o=w5.Api.isSimulationRaw(e);if(!o)return e;var a={_parsed:!0,id:e.id,latestLedger:e.latestLedger,events:(t=(n=e.events)===null||n===void 0?void 0:n.map(function(i){return yo.xdr.DiagnosticEvent.fromXDR(i,"base64")}))!==null&&t!==void 0?t:[]};return typeof e.error=="string"?to(to({},a),{},{error:e.error}):P5(e,a)}function P5(e,t){var n,o,a=to(to({},t),{},{transactionData:new yo.SorobanDataBuilder(e.transactionData),minResourceFee:e.minResourceFee,cost:e.cost},((n=(o=e.results)===null||o===void 0?void 0:o.length)!==null&&n!==void 0?n:!1)&&{result:e.results.map(function(i){var s;return{auth:((s=i.auth)!==null&&s!==void 0?s:[]).map(function(f){return yo.xdr.SorobanAuthorizationEntry.fromXDR(f,"base64")}),retval:i.xdr?yo.xdr.ScVal.fromXDR(i.xdr,"base64"):yo.xdr.ScVal.scvVoid()}})[0]});return!e.restorePreamble||e.restorePreamble.transactionData===""?a:to(to({},a),{},{restorePreamble:{minResourceFee:e.restorePreamble.minResourceFee,transactionData:new yo.SorobanDataBuilder(e.restorePreamble.transactionData)}})}});var Qc=Jt($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});$p.assembleTransaction=vv;var gv=oi(),x5=zi(),R5=$c();function vv(e,t){var n;if("innerTransaction"in e)return vv(e.innerTransaction,t);if(!I5(e))throw new TypeError("unsupported transaction: must contain exactly one invokeHostFunction, extendFootprintTtl, or restoreFootprint operation");var o=(0,R5.parseRawSimulation)(t);if(!x5.Api.isSimulationSuccess(o))throw new Error("simulation incorrect: ".concat(JSON.stringify(o)));var a=parseInt(e.fee)||0,i=parseInt(o.minResourceFee)||0,s=gv.TransactionBuilder.cloneFrom(e,{fee:(a+i).toString(),sorobanData:o.transactionData.build(),networkPassphrase:e.networkPassphrase});switch(e.operations[0].type){case"invokeHostFunction":s.clearOperations();var f=e.operations[0],u=(n=f.auth)!==null&&n!==void 0?n:[];s.addOperation(gv.Operation.invokeHostFunction({source:f.source,func:f.func,auth:u.length>0?u:o.result.auth}));break}return s}function I5(e){if(e.operations.length!==1)return!1;switch(e.operations[0].type){case"invokeHostFunction":case"extendFootprintTtl":case"restoreFootprint":return!0;default:return!1}}});var Jc=Jt(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.Server=vi.SUBMIT_TRANSACTION_TIMEOUT=vi.Durability=void 0;var C5=kv(Og()),gn=oi(),bv=kv(Xc()),gi=j5(dv()),Qp=zi(),B5=Qc(),Yc=$c();function Tv(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Tv=function(a){return a?n:t})(e)}function j5(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||bi(e)!="object"&&typeof e!="function")return{default:e};var n=Tv(t);if(n&&n.has(e))return n.get(e);var o={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&{}.hasOwnProperty.call(e,i)){var s=a?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function kv(e){return e&&e.__esModule?e:{default:e}}function bi(e){"@babel/helpers - typeof";return bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bi(e)}function wv(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=L5(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var o=0,a=function(){};return{s:a,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(r){throw r},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
12
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,s=!1,f;return{s:function(){n=n.call(e)},n:function(){var r=n.next();return i=r.done,r},e:function(r){s=!0,f=r},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(s)throw f}}}}function L5(e,t){if(e){if(typeof e=="string")return Sv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Sv(e,t)}}function Sv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Av(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,o)}return n}function Ca(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Av(Object(n),!0).forEach(function(o){N5(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Av(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function N5(e,t,n){return t=Ov(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hr(){"use strict";Hr=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(I,S,m){I[S]=m.value},i=typeof Symbol=="function"?Symbol:{},s=i.iterator||"@@iterator",f=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function r(I,S,m){return Object.defineProperty(I,S,{value:m,enumerable:!0,configurable:!0,writable:!0}),I[S]}try{r({},"")}catch{r=function(m,P,l){return m[P]=l}}function _(I,S,m,P){var l=S&&S.prototype instanceof A?S:A,x=Object.create(l.prototype),W=new X(P||[]);return a(x,"_invoke",{value:me(I,m,W)}),x}function d(I,S,m){try{return{type:"normal",arg:I.call(S,m)}}catch(P){return{type:"throw",arg:P}}}t.wrap=_;var b="suspendedStart",T="suspendedYield",w="executing",g="completed",p={};function A(){}function L(){}function E(){}var N={};r(N,s,function(){return this});var F=Object.getPrototypeOf,R=F&&F(F(ae([])));R&&R!==n&&o.call(R,s)&&(N=R);var j=E.prototype=A.prototype=Object.create(N);function V(I){["next","throw","return"].forEach(function(S){r(I,S,function(m){return this._invoke(S,m)})})}function Y(I,S){function m(l,x,W,K){var re=d(I[l],I,x);if(re.type!=="throw"){var oe=re.arg,Ee=oe.value;return Ee&&bi(Ee)=="object"&&o.call(Ee,"__await")?S.resolve(Ee.__await).then(function(Fe){m("next",Fe,W,K)},function(Fe){m("throw",Fe,W,K)}):S.resolve(Ee).then(function(Fe){oe.value=Fe,W(oe)},function(Fe){return m("throw",Fe,W,K)})}K(re.arg)}var P;a(this,"_invoke",{value:function(x,W){function K(){return new S(function(re,oe){m(x,W,re,oe)})}return P=P?P.then(K,K):K()}})}function me(I,S,m){var P=b;return function(l,x){if(P===w)throw Error("Generator is already running");if(P===g){if(l==="throw")throw x;return{value:e,done:!0}}for(m.method=l,m.arg=x;;){var W=m.delegate;if(W){var K=le(W,m);if(K){if(K===p)continue;return K}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(P===b)throw P=g,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);P=w;var re=d(I,S,m);if(re.type==="normal"){if(P=m.done?g:T,re.arg===p)continue;return{value:re.arg,done:m.done}}re.type==="throw"&&(P=g,m.method="throw",m.arg=re.arg)}}}function le(I,S){var m=S.method,P=I.iterator[m];if(P===e)return S.delegate=null,m==="throw"&&I.iterator.return&&(S.method="return",S.arg=e,le(I,S),S.method==="throw")||m!=="return"&&(S.method="throw",S.arg=new TypeError("The iterator does not provide a '"+m+"' method")),p;var l=d(P,I.iterator,S.arg);if(l.type==="throw")return S.method="throw",S.arg=l.arg,S.delegate=null,p;var x=l.arg;return x?x.done?(S[I.resultName]=x.value,S.next=I.nextLoc,S.method!=="return"&&(S.method="next",S.arg=e),S.delegate=null,p):x:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,p)}function C(I){var S={tryLoc:I[0]};1 in I&&(S.catchLoc=I[1]),2 in I&&(S.finallyLoc=I[2],S.afterLoc=I[3]),this.tryEntries.push(S)}function q(I){var S=I.completion||{};S.type="normal",delete S.arg,I.completion=S}function X(I){this.tryEntries=[{tryLoc:"root"}],I.forEach(C,this),this.reset(!0)}function ae(I){if(I||I===""){var S=I[s];if(S)return S.call(I);if(typeof I.next=="function")return I;if(!isNaN(I.length)){var m=-1,P=function l(){for(;++m<I.length;)if(o.call(I,m))return l.value=I[m],l.done=!1,l;return l.value=e,l.done=!0,l};return P.next=P}}throw new TypeError(bi(I)+" is not iterable")}return L.prototype=E,a(j,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:L,configurable:!0}),L.displayName=r(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(I){var S=typeof I=="function"&&I.constructor;return!!S&&(S===L||(S.displayName||S.name)==="GeneratorFunction")},t.mark=function(I){return Object.setPrototypeOf?Object.setPrototypeOf(I,E):(I.__proto__=E,r(I,u,"GeneratorFunction")),I.prototype=Object.create(j),I},t.awrap=function(I){return{__await:I}},V(Y.prototype),r(Y.prototype,f,function(){return this}),t.AsyncIterator=Y,t.async=function(I,S,m,P,l){l===void 0&&(l=Promise);var x=new Y(_(I,S,m,P),l);return t.isGeneratorFunction(S)?x:x.next().then(function(W){return W.done?W.value:x.next()})},V(j),r(j,u,"Generator"),r(j,s,function(){return this}),r(j,"toString",function(){return"[object Generator]"}),t.keys=function(I){var S=Object(I),m=[];for(var P in S)m.push(P);return m.reverse(),function l(){for(;m.length;){var x=m.pop();if(x in S)return l.value=x,l.done=!1,l}return l.done=!0,l}},t.values=ae,X.prototype={constructor:X,reset:function(S){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(q),!S)for(var m in this)m.charAt(0)==="t"&&o.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var S=this.tryEntries[0].completion;if(S.type==="throw")throw S.arg;return this.rval},dispatchException:function(S){if(this.done)throw S;var m=this;function P(oe,Ee){return W.type="throw",W.arg=S,m.next=oe,Ee&&(m.method="next",m.arg=e),!!Ee}for(var l=this.tryEntries.length-1;l>=0;--l){var x=this.tryEntries[l],W=x.completion;if(x.tryLoc==="root")return P("end");if(x.tryLoc<=this.prev){var K=o.call(x,"catchLoc"),re=o.call(x,"finallyLoc");if(K&&re){if(this.prev<x.catchLoc)return P(x.catchLoc,!0);if(this.prev<x.finallyLoc)return P(x.finallyLoc)}else if(K){if(this.prev<x.catchLoc)return P(x.catchLoc,!0)}else{if(!re)throw Error("try statement without catch or finally");if(this.prev<x.finallyLoc)return P(x.finallyLoc)}}}},abrupt:function(S,m){for(var P=this.tryEntries.length-1;P>=0;--P){var l=this.tryEntries[P];if(l.tryLoc<=this.prev&&o.call(l,"finallyLoc")&&this.prev<l.finallyLoc){var x=l;break}}x&&(S==="break"||S==="continue")&&x.tryLoc<=m&&m<=x.finallyLoc&&(x=null);var W=x?x.completion:{};return W.type=S,W.arg=m,x?(this.method="next",this.next=x.finallyLoc,p):this.complete(W)},complete:function(S,m){if(S.type==="throw")throw S.arg;return S.type==="break"||S.type==="continue"?this.next=S.arg:S.type==="return"?(this.rval=this.arg=S.arg,this.method="return",this.next="end"):S.type==="normal"&&m&&(this.next=m),p},finish:function(S){for(var m=this.tryEntries.length-1;m>=0;--m){var P=this.tryEntries[m];if(P.finallyLoc===S)return this.complete(P.completion,P.afterLoc),q(P),p}},catch:function(S){for(var m=this.tryEntries.length-1;m>=0;--m){var P=this.tryEntries[m];if(P.tryLoc===S){var l=P.completion;if(l.type==="throw"){var x=l.arg;q(P)}return x}}throw Error("illegal catch attempt")},delegateYield:function(S,m,P){return this.delegate={iterator:ae(S),resultName:m,nextLoc:P},this.method==="next"&&(this.arg=e),p}},t}function _v(e,t,n,o,a,i,s){try{var f=e[i](s),u=f.value}catch(r){n(r);return}f.done?t(u):Promise.resolve(u).then(o,a)}function jn(e){return function(){var t=this,n=arguments;return new Promise(function(o,a){var i=e.apply(t,n);function s(u){_v(i,o,a,s,f,"next",u)}function f(u){_v(i,o,a,s,f,"throw",u)}s(void 0)})}}function U5(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ev(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Ov(o.key),o)}}function M5(e,t,n){return t&&Ev(e.prototype,t),n&&Ev(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ov(e){var t=F5(e,"string");return bi(t)=="symbol"?t:t+""}function F5(e,t){if(bi(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(bi(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $P=vi.SUBMIT_TRANSACTION_TIMEOUT=60*1e3,Yp=vi.Durability=function(e){return e.Temporary="temporary",e.Persistent="persistent",e}({}),QP=vi.Server=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(U5(this,e),this.serverURL=(0,C5.default)(t),n.headers&&Object.keys(n.headers).length===0&&bv.default.interceptors.request.use(function(o){return o.headers=Object.assign(o.headers,n.headers),o}),this.serverURL.protocol()!=="https"&&!n.allowHttp)throw new Error("Cannot connect to insecure Soroban RPC server if `allowHttp` isn't set")}return M5(e,[{key:"getAccount",value:function(){var t=jn(Hr().mark(function o(a){var i,s,f;return Hr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return i=gn.xdr.LedgerKey.account(new gn.xdr.LedgerKeyAccount({accountId:gn.Keypair.fromPublicKey(a).xdrPublicKey()})),r.next=3,this.getLedgerEntries(i);case 3:if(s=r.sent,s.entries.length!==0){r.next=6;break}return r.abrupt("return",Promise.reject({code:404,message:"Account not found: ".concat(a)}));case 6:return f=s.entries[0].val.account(),r.abrupt("return",new gn.Account(a,f.seqNum().toString()));case 8:case"end":return r.stop()}},o,this)}));function n(o){return t.apply(this,arguments)}return n}()},{key:"getHealth",value:function(){var t=jn(Hr().mark(function o(){return Hr().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",gi.postObject(this.serverURL.toString(),"getHealth"));case 1:case"end":return i.stop()}},o,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"getContractData",value:function(){var t=jn(Hr().mark(function o(a,i){var s,f,u,r,_=arguments;return Hr().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(s=_.length>2&&_[2]!==void 0?_[2]:Yp.Persistent,typeof a!="string"){b.next=5;break}f=new gn.Contract(a).address().toScAddress(),b.next=14;break;case 5:if(!(a instanceof gn.Address)){b.next=9;break}f=a.toScAddress(),b.next=14;break;case 9:if(!(a instanceof gn.Contract)){b.next=13;break}f=a.address().toScAddress(),b.next=14;break;case 13:throw new TypeError("unknown contract type: ".concat(a));case 14:b.t0=s,b.next=b.t0===Yp.Temporary?17:b.t0===Yp.Persistent?19:21;break;case 17:return u=gn.xdr.ContractDataDurability.temporary(),b.abrupt("break",22);case 19:return u=gn.xdr.ContractDataDurability.persistent(),b.abrupt("break",22);case 21:throw new TypeError("invalid durability: ".concat(s));case 22:return r=gn.xdr.LedgerKey.contractData(new gn.xdr.LedgerKeyContractData({key:i,contract:f,durability:u})),b.abrupt("return",this.getLedgerEntries(r).then(function(T){return T.entries.length===0?Promise.reject({code:404,message:"Contract data not found. Contract: ".concat(gn.Address.fromScAddress(f).toString(),", Key: ").concat(i.toXDR("base64"),", Durability: ").concat(s)}):T.entries[0]}));case 24:case"end":return b.stop()}},o,this)}));function n(o,a){return t.apply(this,arguments)}return n}()},{key:"getContractWasmByContractId",value:function(){var t=jn(Hr().mark(function o(a){var i,s,f,u;return Hr().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:return s=new gn.Contract(a).getFootprint(),_.next=3,this.getLedgerEntries(s);case 3:if(f=_.sent,!(!f.entries.length||!((i=f.entries[0])!==null&&i!==void 0&&i.val))){_.next=6;break}return _.abrupt("return",Promise.reject({code:404,message:"Could not obtain contract hash from server"}));case 6:return u=f.entries[0].val.contractData().val().instance().executable().wasmHash(),_.abrupt("return",this.getContractWasmByHash(u));case 8:case"end":return _.stop()}},o,this)}));function n(o){return t.apply(this,arguments)}return n}()},{key:"getContractWasmByHash",value:function(){var t=jn(Hr().mark(function o(a){var i,s,f,u,r,_,d=arguments;return Hr().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return s=d.length>1&&d[1]!==void 0?d[1]:void 0,f=typeof a=="string"?Buffer.from(a,s):a,u=gn.xdr.LedgerKey.contractCode(new gn.xdr.LedgerKeyContractCode({hash:f})),T.next=5,this.getLedgerEntries(u);case 5:if(r=T.sent,!(!r.entries.length||!((i=r.entries[0])!==null&&i!==void 0&&i.val))){T.next=8;break}return T.abrupt("return",Promise.reject({code:404,message:"Could not obtain contract wasm from server"}));case 8:return _=r.entries[0].val.contractCode().code(),T.abrupt("return",_);case 10:case"end":return T.stop()}},o,this)}));function n(o){return t.apply(this,arguments)}return n}()},{key:"getLedgerEntries",value:function(){var t=jn(Hr().mark(function o(){var a=arguments;return Hr().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",this._getLedgerEntries.apply(this,a).then(Yc.parseRawLedgerEntries));case 1:case"end":return s.stop()}},o,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"_getLedgerEntries",value:function(){var t=jn(Hr().mark(function o(){var a,i,s,f=arguments;return Hr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:for(a=f.length,i=new Array(a),s=0;s<a;s++)i[s]=f[s];return r.abrupt("return",gi.postObject(this.serverURL.toString(),"getLedgerEntries",{keys:i.map(function(_){return _.toXDR("base64")})}));case 2:case"end":return r.stop()}},o,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"getTransaction",value:function(){var t=jn(Hr().mark(function o(a){return Hr().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",this._getTransaction(a).then(function(f){var u={};if(f.status!==Qp.Api.GetTransactionStatus.NOT_FOUND){var r,_=gn.xdr.TransactionMeta.fromXDR(f.resultMetaXdr,"base64");u=Ca({ledger:f.ledger,createdAt:f.createdAt,applicationOrder:f.applicationOrder,feeBump:f.feeBump,envelopeXdr:gn.xdr.TransactionEnvelope.fromXDR(f.envelopeXdr,"base64"),resultXdr:gn.xdr.TransactionResult.fromXDR(f.resultXdr,"base64"),resultMetaXdr:_},_.switch()===3&&_.v3().sorobanMeta()!==null&&f.status===Qp.Api.GetTransactionStatus.SUCCESS&&{returnValue:(r=_.v3().sorobanMeta())===null||r===void 0?void 0:r.returnValue()})}var d=Ca({status:f.status,latestLedger:f.latestLedger,latestLedgerCloseTime:f.latestLedgerCloseTime,oldestLedger:f.oldestLedger,oldestLedgerCloseTime:f.oldestLedgerCloseTime},u);return d}));case 1:case"end":return s.stop()}},o,this)}));function n(o){return t.apply(this,arguments)}return n}()},{key:"_getTransaction",value:function(){var t=jn(Hr().mark(function o(a){return Hr().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",gi.postObject(this.serverURL.toString(),"getTransaction",{hash:a}));case 1:case"end":return s.stop()}},o,this)}));function n(o){return t.apply(this,arguments)}return n}()},{key:"getEvents",value:function(){var t=jn(Hr().mark(function o(a){return Hr().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",this._getEvents(a).then(Yc.parseRawEvents));case 1:case"end":return s.stop()}},o,this)}));function n(o){return t.apply(this,arguments)}return n}()},{key:"_getEvents",value:function(){var t=jn(Hr().mark(function o(a){var i;return Hr().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",gi.postObject(this.serverURL.toString(),"getEvents",Ca({filters:(i=a.filters)!==null&&i!==void 0?i:[],pagination:Ca(Ca({},a.cursor&&{cursor:a.cursor}),a.limit&&{limit:a.limit})},a.startLedger&&{startLedger:a.startLedger})));case 1:case"end":return f.stop()}},o,this)}));function n(o){return t.apply(this,arguments)}return n}()},{key:"getNetwork",value:function(){var t=jn(Hr().mark(function o(){return Hr().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,gi.postObject(this.serverURL.toString(),"getNetwork");case 2:return i.abrupt("return",i.sent);case 3:case"end":return i.stop()}},o,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"getLatestLedger",value:function(){var t=jn(Hr().mark(function o(){return Hr().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",gi.postObject(this.serverURL.toString(),"getLatestLedger"));case 1:case"end":return i.stop()}},o,this)}));function n(){return t.apply(this,arguments)}return n}()},{key:"simulateTransaction",value:function(){var t=jn(Hr().mark(function o(a,i){return Hr().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",this._simulateTransaction(a,i).then(Yc.parseRawSimulation));case 1:case"end":return f.stop()}},o,this)}));function n(o,a){return t.apply(this,arguments)}return n}()},{key:"_simulateTransaction",value:function(){var t=jn(Hr().mark(function o(a,i){return Hr().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.abrupt("return",gi.postObject(this.serverURL.toString(),"simulateTransaction",Ca({transaction:a.toXDR()},i!==void 0&&{resourceConfig:{instructionLeeway:i.cpuInstructions}})));case 1:case"end":return f.stop()}},o,this)}));function n(o,a){return t.apply(this,arguments)}return n}()},{key:"prepareTransaction",value:function(){var t=jn(Hr().mark(function o(a){var i;return Hr().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,this.simulateTransaction(a);case 2:if(i=f.sent,!Qp.Api.isSimulationError(i)){f.next=5;break}throw i.error;case 5:return f.abrupt("return",(0,B5.assembleTransaction)(a,i).build());case 6:case"end":return f.stop()}},o,this)}));function n(o){return t.apply(this,arguments)}return n}()},{key:"sendTransaction",value:function(){var t=jn(Hr().mark(function o(a){return Hr().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",this._sendTransaction(a).then(Yc.parseRawSendTransaction));case 1:case"end":return s.stop()}},o,this)}));function n(o){return t.apply(this,arguments)}return n}()},{key:"_sendTransaction",value:function(){var t=jn(Hr().mark(function o(a){return Hr().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.abrupt("return",gi.postObject(this.serverURL.toString(),"sendTransaction",{transaction:a.toXDR()}));case 1:case"end":return s.stop()}},o,this)}));function n(o){return t.apply(this,arguments)}return n}()},{key:"requestAirdrop",value:function(){var t=jn(Hr().mark(function o(a,i){var s,f,u,r,_,d;return Hr().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:if(s=typeof a=="string"?a:a.accountId(),T.t0=i,T.t0){T.next=6;break}return T.next=5,this.getNetwork();case 5:T.t0=T.sent.friendbotUrl;case 6:if(i=T.t0,i){T.next=9;break}throw new Error("No friendbot URL configured for current network");case 9:return T.prev=9,T.next=12,bv.default.post("".concat(i,"?addr=").concat(encodeURIComponent(s)));case 12:return f=T.sent,u=gn.xdr.TransactionMeta.fromXDR(f.data.result_meta_xdr,"base64"),r=D5(u),T.abrupt("return",new gn.Account(s,r));case 18:if(T.prev=18,T.t1=T.catch(9),((_=T.t1.response)===null||_===void 0?void 0:_.status)!==400){T.next=23;break}if(!((d=T.t1.response.detail)!==null&&d!==void 0&&d.includes("createAccountAlreadyExist"))){T.next=23;break}return T.abrupt("return",this.getAccount(s));case 23:throw T.t1;case 24:case"end":return T.stop()}},o,this,[[9,18]])}));function n(o,a){return t.apply(this,arguments)}return n}()}])}();function D5(e){var t=[];switch(e.switch()){case 0:t=e.operations();break;case 1:case 2:case 3:t=e.value().operations();break;default:throw new Error("Unexpected transaction meta switch value")}var n=wv(t),o;try{for(n.s();!(o=n.n()).done;){var a=o.value,i=wv(a.changes()),s;try{for(i.s();!(s=i.n()).done;){var f=s.value;if(f.switch()===gn.xdr.LedgerEntryChangeType.ledgerEntryCreated()){var u=f.created().data();if(u.switch()===gn.xdr.LedgerEntryType.account())return u.account().seqNum().toString()}}}catch(r){i.e(r)}finally{i.f()}}}catch(r){n.e(r)}finally{n.f()}throw new Error("No account created in transaction")}});var Zc=Jt(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});Ba.Ok=Ba.Err=void 0;function Vs(e){"@babel/helpers - typeof";return Vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(e)}function xv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pv(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,q5(o.key),o)}}function Rv(e,t,n){return t&&Pv(e.prototype,t),n&&Pv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function q5(e){var t=V5(e,"string");return Vs(t)=="symbol"?t:t+""}function V5(e,t){if(Vs(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Vs(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var JP=Ba.Ok=function(){function e(t){xv(this,e),this.value=t}return Rv(e,[{key:"unwrapErr",value:function(){throw new Error("No error")}},{key:"unwrap",value:function(){return this.value}},{key:"isOk",value:function(){return!0}},{key:"isErr",value:function(){return!1}}])}(),ZP=Ba.Err=function(){function e(t){xv(this,e),this.error=t}return Rv(e,[{key:"unwrapErr",value:function(){return this.error}},{key:"unwrap",value:function(){throw new Error(this.error.message)}},{key:"isOk",value:function(){return!1}},{key:"isErr",value:function(){return!0}}])}()});var el=Jt(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.contractErrorPattern=ii.DEFAULT_TIMEOUT=void 0;ii.implementsToString=z5;ii.processSpecEntryStream=X5;ii.withExponentialBackoff=H5;var Iv=oi();function Jp(){"use strict";Jp=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(I,S,m){I[S]=m.value},i=typeof Symbol=="function"?Symbol:{},s=i.iterator||"@@iterator",f=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function r(I,S,m){return Object.defineProperty(I,S,{value:m,enumerable:!0,configurable:!0,writable:!0}),I[S]}try{r({},"")}catch{r=function(m,P,l){return m[P]=l}}function _(I,S,m,P){var l=S&&S.prototype instanceof A?S:A,x=Object.create(l.prototype),W=new X(P||[]);return a(x,"_invoke",{value:me(I,m,W)}),x}function d(I,S,m){try{return{type:"normal",arg:I.call(S,m)}}catch(P){return{type:"throw",arg:P}}}t.wrap=_;var b="suspendedStart",T="suspendedYield",w="executing",g="completed",p={};function A(){}function L(){}function E(){}var N={};r(N,s,function(){return this});var F=Object.getPrototypeOf,R=F&&F(F(ae([])));R&&R!==n&&o.call(R,s)&&(N=R);var j=E.prototype=A.prototype=Object.create(N);function V(I){["next","throw","return"].forEach(function(S){r(I,S,function(m){return this._invoke(S,m)})})}function Y(I,S){function m(l,x,W,K){var re=d(I[l],I,x);if(re.type!=="throw"){var oe=re.arg,Ee=oe.value;return Ee&&Ks(Ee)=="object"&&o.call(Ee,"__await")?S.resolve(Ee.__await).then(function(Fe){m("next",Fe,W,K)},function(Fe){m("throw",Fe,W,K)}):S.resolve(Ee).then(function(Fe){oe.value=Fe,W(oe)},function(Fe){return m("throw",Fe,W,K)})}K(re.arg)}var P;a(this,"_invoke",{value:function(x,W){function K(){return new S(function(re,oe){m(x,W,re,oe)})}return P=P?P.then(K,K):K()}})}function me(I,S,m){var P=b;return function(l,x){if(P===w)throw Error("Generator is already running");if(P===g){if(l==="throw")throw x;return{value:e,done:!0}}for(m.method=l,m.arg=x;;){var W=m.delegate;if(W){var K=le(W,m);if(K){if(K===p)continue;return K}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(P===b)throw P=g,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);P=w;var re=d(I,S,m);if(re.type==="normal"){if(P=m.done?g:T,re.arg===p)continue;return{value:re.arg,done:m.done}}re.type==="throw"&&(P=g,m.method="throw",m.arg=re.arg)}}}function le(I,S){var m=S.method,P=I.iterator[m];if(P===e)return S.delegate=null,m==="throw"&&I.iterator.return&&(S.method="return",S.arg=e,le(I,S),S.method==="throw")||m!=="return"&&(S.method="throw",S.arg=new TypeError("The iterator does not provide a '"+m+"' method")),p;var l=d(P,I.iterator,S.arg);if(l.type==="throw")return S.method="throw",S.arg=l.arg,S.delegate=null,p;var x=l.arg;return x?x.done?(S[I.resultName]=x.value,S.next=I.nextLoc,S.method!=="return"&&(S.method="next",S.arg=e),S.delegate=null,p):x:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,p)}function C(I){var S={tryLoc:I[0]};1 in I&&(S.catchLoc=I[1]),2 in I&&(S.finallyLoc=I[2],S.afterLoc=I[3]),this.tryEntries.push(S)}function q(I){var S=I.completion||{};S.type="normal",delete S.arg,I.completion=S}function X(I){this.tryEntries=[{tryLoc:"root"}],I.forEach(C,this),this.reset(!0)}function ae(I){if(I||I===""){var S=I[s];if(S)return S.call(I);if(typeof I.next=="function")return I;if(!isNaN(I.length)){var m=-1,P=function l(){for(;++m<I.length;)if(o.call(I,m))return l.value=I[m],l.done=!1,l;return l.value=e,l.done=!0,l};return P.next=P}}throw new TypeError(Ks(I)+" is not iterable")}return L.prototype=E,a(j,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:L,configurable:!0}),L.displayName=r(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(I){var S=typeof I=="function"&&I.constructor;return!!S&&(S===L||(S.displayName||S.name)==="GeneratorFunction")},t.mark=function(I){return Object.setPrototypeOf?Object.setPrototypeOf(I,E):(I.__proto__=E,r(I,u,"GeneratorFunction")),I.prototype=Object.create(j),I},t.awrap=function(I){return{__await:I}},V(Y.prototype),r(Y.prototype,f,function(){return this}),t.AsyncIterator=Y,t.async=function(I,S,m,P,l){l===void 0&&(l=Promise);var x=new Y(_(I,S,m,P),l);return t.isGeneratorFunction(S)?x:x.next().then(function(W){return W.done?W.value:x.next()})},V(j),r(j,u,"Generator"),r(j,s,function(){return this}),r(j,"toString",function(){return"[object Generator]"}),t.keys=function(I){var S=Object(I),m=[];for(var P in S)m.push(P);return m.reverse(),function l(){for(;m.length;){var x=m.pop();if(x in S)return l.value=x,l.done=!1,l}return l.done=!0,l}},t.values=ae,X.prototype={constructor:X,reset:function(S){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(q),!S)for(var m in this)m.charAt(0)==="t"&&o.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var S=this.tryEntries[0].completion;if(S.type==="throw")throw S.arg;return this.rval},dispatchException:function(S){if(this.done)throw S;var m=this;function P(oe,Ee){return W.type="throw",W.arg=S,m.next=oe,Ee&&(m.method="next",m.arg=e),!!Ee}for(var l=this.tryEntries.length-1;l>=0;--l){var x=this.tryEntries[l],W=x.completion;if(x.tryLoc==="root")return P("end");if(x.tryLoc<=this.prev){var K=o.call(x,"catchLoc"),re=o.call(x,"finallyLoc");if(K&&re){if(this.prev<x.catchLoc)return P(x.catchLoc,!0);if(this.prev<x.finallyLoc)return P(x.finallyLoc)}else if(K){if(this.prev<x.catchLoc)return P(x.catchLoc,!0)}else{if(!re)throw Error("try statement without catch or finally");if(this.prev<x.finallyLoc)return P(x.finallyLoc)}}}},abrupt:function(S,m){for(var P=this.tryEntries.length-1;P>=0;--P){var l=this.tryEntries[P];if(l.tryLoc<=this.prev&&o.call(l,"finallyLoc")&&this.prev<l.finallyLoc){var x=l;break}}x&&(S==="break"||S==="continue")&&x.tryLoc<=m&&m<=x.finallyLoc&&(x=null);var W=x?x.completion:{};return W.type=S,W.arg=m,x?(this.method="next",this.next=x.finallyLoc,p):this.complete(W)},complete:function(S,m){if(S.type==="throw")throw S.arg;return S.type==="break"||S.type==="continue"?this.next=S.arg:S.type==="return"?(this.rval=this.arg=S.arg,this.method="return",this.next="end"):S.type==="normal"&&m&&(this.next=m),p},finish:function(S){for(var m=this.tryEntries.length-1;m>=0;--m){var P=this.tryEntries[m];if(P.finallyLoc===S)return this.complete(P.completion,P.afterLoc),q(P),p}},catch:function(S){for(var m=this.tryEntries.length-1;m>=0;--m){var P=this.tryEntries[m];if(P.tryLoc===S){var l=P.completion;if(l.type==="throw"){var x=l.arg;q(P)}return x}}throw Error("illegal catch attempt")},delegateYield:function(S,m,P){return this.delegate={iterator:ae(S),resultName:m,nextLoc:P},this.method==="next"&&(this.arg=e),p}},t}function Ks(e){"@babel/helpers - typeof";return Ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ks(e)}function Cv(e,t,n,o,a,i,s){try{var f=e[i](s),u=f.value}catch(r){n(r);return}f.done?t(u):Promise.resolve(u).then(o,a)}function K5(e){return function(){var t=this,n=arguments;return new Promise(function(o,a){var i=e.apply(t,n);function s(u){Cv(i,o,a,s,f,"next",u)}function f(u){Cv(i,o,a,s,f,"throw",u)}s(void 0)})}}var t4=ii.DEFAULT_TIMEOUT=5*60;function H5(e,t,n){return Zp.apply(this,arguments)}function Zp(){return Zp=K5(Jp().mark(function e(t,n,o){var a,i,s,f,u,r,_,d=arguments;return Jp().wrap(function(T){for(;;)switch(T.prev=T.next){case 0:return a=d.length>3&&d[3]!==void 0?d[3]:1.5,i=d.length>4&&d[4]!==void 0?d[4]:!1,s=[],f=0,T.t0=s,T.next=7,t();case 7:if(T.t1=T.sent,T.t0.push.call(T.t0,T.t1),n(s[s.length-1])){T.next=11;break}return T.abrupt("return",s);case 11:u=new Date(Date.now()+o*1e3).valueOf(),r=1e3,_=r;case 14:if(!(Date.now()<u&&n(s[s.length-1]))){T.next=30;break}return f+=1,i&&console.info("Waiting ".concat(r,"ms before trying again (bringing the total wait time to ").concat(_,"ms so far, of total ").concat(o*1e3,"ms)")),T.next=19,new Promise(function(w){return setTimeout(w,r)});case 19:return r*=a,new Date(Date.now()+r).valueOf()>u&&(r=u-Date.now(),i&&console.info("was gonna wait too long; new waitTime: ".concat(r,"ms"))),_=r+_,T.t2=s,T.next=25,t(s[s.length-1]);case 25:T.t3=T.sent,T.t2.push.call(T.t2,T.t3),i&&n(s[s.length-1])&&console.info("".concat(f,". Called ").concat(t,"; ").concat(s.length," prev attempts. Most recent: ").concat(JSON.stringify(s[s.length-1],null,2))),T.next=14;break;case 30:return T.abrupt("return",s);case 31:case"end":return T.stop()}},e)})),Zp.apply(this,arguments)}var r4=ii.contractErrorPattern=/Error\(Contract, #(\d+)\)/;function z5(e){return Ks(e)==="object"&&e!==null&&"toString"in e}function X5(e){for(var t=new Iv.cereal.XdrReader(e),n=[];!t.eof;)n.push(Iv.xdr.ScSpecEntry.read(t));return n}});var ah=Jt(nl=>{"use strict";Object.defineProperty(nl,"__esModule",{value:!0});nl.SentTransaction=void 0;var eh=oi(),G5=Jc(),Bv=zi(),jv=el(),Uv;function th(e,t,n){return t=Xs(t),W5(e,nh()?Reflect.construct(t,n||[],Xs(e).constructor):t.apply(e,n))}function W5(e,t){if(t&&(wi(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $5(e)}function $5(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rh(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zs(e,t)}function Hs(e){var t=typeof Map=="function"?new Map:void 0;return Hs=function(o){if(o===null||!Y5(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(o))return t.get(o);t.set(o,a)}function a(){return Q5(o,arguments,Xs(this).constructor)}return a.prototype=Object.create(o.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),zs(a,o)},Hs(e)}function Q5(e,t,n){if(nh())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var a=new(e.bind.apply(e,o));return n&&zs(a,n.prototype),a}function nh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nh=function(){return!!e})()}function Y5(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function zs(e,t){return zs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,a){return o.__proto__=a,o},zs(e,t)}function Xs(e){return Xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xs(e)}function wi(e){"@babel/helpers - typeof";return wi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wi(e)}function Gs(){"use strict";Gs=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(I,S,m){I[S]=m.value},i=typeof Symbol=="function"?Symbol:{},s=i.iterator||"@@iterator",f=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function r(I,S,m){return Object.defineProperty(I,S,{value:m,enumerable:!0,configurable:!0,writable:!0}),I[S]}try{r({},"")}catch{r=function(m,P,l){return m[P]=l}}function _(I,S,m,P){var l=S&&S.prototype instanceof A?S:A,x=Object.create(l.prototype),W=new X(P||[]);return a(x,"_invoke",{value:me(I,m,W)}),x}function d(I,S,m){try{return{type:"normal",arg:I.call(S,m)}}catch(P){return{type:"throw",arg:P}}}t.wrap=_;var b="suspendedStart",T="suspendedYield",w="executing",g="completed",p={};function A(){}function L(){}function E(){}var N={};r(N,s,function(){return this});var F=Object.getPrototypeOf,R=F&&F(F(ae([])));R&&R!==n&&o.call(R,s)&&(N=R);var j=E.prototype=A.prototype=Object.create(N);function V(I){["next","throw","return"].forEach(function(S){r(I,S,function(m){return this._invoke(S,m)})})}function Y(I,S){function m(l,x,W,K){var re=d(I[l],I,x);if(re.type!=="throw"){var oe=re.arg,Ee=oe.value;return Ee&&wi(Ee)=="object"&&o.call(Ee,"__await")?S.resolve(Ee.__await).then(function(Fe){m("next",Fe,W,K)},function(Fe){m("throw",Fe,W,K)}):S.resolve(Ee).then(function(Fe){oe.value=Fe,W(oe)},function(Fe){return m("throw",Fe,W,K)})}K(re.arg)}var P;a(this,"_invoke",{value:function(x,W){function K(){return new S(function(re,oe){m(x,W,re,oe)})}return P=P?P.then(K,K):K()}})}function me(I,S,m){var P=b;return function(l,x){if(P===w)throw Error("Generator is already running");if(P===g){if(l==="throw")throw x;return{value:e,done:!0}}for(m.method=l,m.arg=x;;){var W=m.delegate;if(W){var K=le(W,m);if(K){if(K===p)continue;return K}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(P===b)throw P=g,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);P=w;var re=d(I,S,m);if(re.type==="normal"){if(P=m.done?g:T,re.arg===p)continue;return{value:re.arg,done:m.done}}re.type==="throw"&&(P=g,m.method="throw",m.arg=re.arg)}}}function le(I,S){var m=S.method,P=I.iterator[m];if(P===e)return S.delegate=null,m==="throw"&&I.iterator.return&&(S.method="return",S.arg=e,le(I,S),S.method==="throw")||m!=="return"&&(S.method="throw",S.arg=new TypeError("The iterator does not provide a '"+m+"' method")),p;var l=d(P,I.iterator,S.arg);if(l.type==="throw")return S.method="throw",S.arg=l.arg,S.delegate=null,p;var x=l.arg;return x?x.done?(S[I.resultName]=x.value,S.next=I.nextLoc,S.method!=="return"&&(S.method="next",S.arg=e),S.delegate=null,p):x:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,p)}function C(I){var S={tryLoc:I[0]};1 in I&&(S.catchLoc=I[1]),2 in I&&(S.finallyLoc=I[2],S.afterLoc=I[3]),this.tryEntries.push(S)}function q(I){var S=I.completion||{};S.type="normal",delete S.arg,I.completion=S}function X(I){this.tryEntries=[{tryLoc:"root"}],I.forEach(C,this),this.reset(!0)}function ae(I){if(I||I===""){var S=I[s];if(S)return S.call(I);if(typeof I.next=="function")return I;if(!isNaN(I.length)){var m=-1,P=function l(){for(;++m<I.length;)if(o.call(I,m))return l.value=I[m],l.done=!1,l;return l.value=e,l.done=!0,l};return P.next=P}}throw new TypeError(wi(I)+" is not iterable")}return L.prototype=E,a(j,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:L,configurable:!0}),L.displayName=r(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(I){var S=typeof I=="function"&&I.constructor;return!!S&&(S===L||(S.displayName||S.name)==="GeneratorFunction")},t.mark=function(I){return Object.setPrototypeOf?Object.setPrototypeOf(I,E):(I.__proto__=E,r(I,u,"GeneratorFunction")),I.prototype=Object.create(j),I},t.awrap=function(I){return{__await:I}},V(Y.prototype),r(Y.prototype,f,function(){return this}),t.AsyncIterator=Y,t.async=function(I,S,m,P,l){l===void 0&&(l=Promise);var x=new Y(_(I,S,m,P),l);return t.isGeneratorFunction(S)?x:x.next().then(function(W){return W.done?W.value:x.next()})},V(j),r(j,u,"Generator"),r(j,s,function(){return this}),r(j,"toString",function(){return"[object Generator]"}),t.keys=function(I){var S=Object(I),m=[];for(var P in S)m.push(P);return m.reverse(),function l(){for(;m.length;){var x=m.pop();if(x in S)return l.value=x,l.done=!1,l}return l.done=!0,l}},t.values=ae,X.prototype={constructor:X,reset:function(S){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(q),!S)for(var m in this)m.charAt(0)==="t"&&o.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var S=this.tryEntries[0].completion;if(S.type==="throw")throw S.arg;return this.rval},dispatchException:function(S){if(this.done)throw S;var m=this;function P(oe,Ee){return W.type="throw",W.arg=S,m.next=oe,Ee&&(m.method="next",m.arg=e),!!Ee}for(var l=this.tryEntries.length-1;l>=0;--l){var x=this.tryEntries[l],W=x.completion;if(x.tryLoc==="root")return P("end");if(x.tryLoc<=this.prev){var K=o.call(x,"catchLoc"),re=o.call(x,"finallyLoc");if(K&&re){if(this.prev<x.catchLoc)return P(x.catchLoc,!0);if(this.prev<x.finallyLoc)return P(x.finallyLoc)}else if(K){if(this.prev<x.catchLoc)return P(x.catchLoc,!0)}else{if(!re)throw Error("try statement without catch or finally");if(this.prev<x.finallyLoc)return P(x.finallyLoc)}}}},abrupt:function(S,m){for(var P=this.tryEntries.length-1;P>=0;--P){var l=this.tryEntries[P];if(l.tryLoc<=this.prev&&o.call(l,"finallyLoc")&&this.prev<l.finallyLoc){var x=l;break}}x&&(S==="break"||S==="continue")&&x.tryLoc<=m&&m<=x.finallyLoc&&(x=null);var W=x?x.completion:{};return W.type=S,W.arg=m,x?(this.method="next",this.next=x.finallyLoc,p):this.complete(W)},complete:function(S,m){if(S.type==="throw")throw S.arg;return S.type==="break"||S.type==="continue"?this.next=S.arg:S.type==="return"?(this.rval=this.arg=S.arg,this.method="return",this.next="end"):S.type==="normal"&&m&&(this.next=m),p},finish:function(S){for(var m=this.tryEntries.length-1;m>=0;--m){var P=this.tryEntries[m];if(P.finallyLoc===S)return this.complete(P.completion,P.afterLoc),q(P),p}},catch:function(S){for(var m=this.tryEntries.length-1;m>=0;--m){var P=this.tryEntries[m];if(P.tryLoc===S){var l=P.completion;if(l.type==="throw"){var x=l.arg;q(P)}return x}}throw Error("illegal catch attempt")},delegateYield:function(S,m,P){return this.delegate={iterator:ae(S),resultName:m,nextLoc:P},this.method==="next"&&(this.arg=e),p}},t}function Lv(e,t,n,o,a,i,s){try{var f=e[i](s),u=f.value}catch(r){n(r);return}f.done?t(u):Promise.resolve(u).then(o,a)}function Mv(e){return function(){var t=this,n=arguments;return new Promise(function(o,a){var i=e.apply(t,n);function s(u){Lv(i,o,a,s,f,"next",u)}function f(u){Lv(i,o,a,s,f,"throw",u)}s(void 0)})}}function tl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nv(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Fv(o.key),o)}}function rl(e,t,n){return t&&Nv(e.prototype,t),n&&Nv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function oh(e,t,n){return t=Fv(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fv(e){var t=J5(e,"string");return wi(t)=="symbol"?t:t+""}function J5(e,t){if(wi(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(wi(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ih=nl.SentTransaction=function(){function e(t,n){var o=this,a;if(tl(this,e),oh(this,"send",Mv(Gs().mark(function i(){var s,f,u,r;return Gs().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return f=(s=o.assembled.options.timeoutInSeconds)!==null&&s!==void 0?s:jv.DEFAULT_TIMEOUT,o.assembled.built=eh.TransactionBuilder.cloneFrom(o.assembled.built,{fee:o.assembled.built.fee,timebounds:void 0,sorobanData:new eh.SorobanDataBuilder(o.assembled.simulationData.transactionData.toXDR()).build()}).setTimeout(f).build(),d.next=4,o.signTransaction(o.assembled.built.toXDR(),{networkPassphrase:o.assembled.options.networkPassphrase});case 4:return u=d.sent,o.signed=eh.TransactionBuilder.fromXDR(u,o.assembled.options.networkPassphrase),d.next=8,o.server.sendTransaction(o.signed);case 8:if(o.sendTransactionResponse=d.sent,o.sendTransactionResponse.status==="PENDING"){d.next=11;break}throw new e.Errors.SendFailed(`Sending the transaction to the network failed!
13
- `.concat(JSON.stringify(o.sendTransactionResponse,null,2)));case 11:return r=o.sendTransactionResponse.hash,d.next=14,(0,jv.withExponentialBackoff)(function(){return o.server.getTransaction(r)},function(b){return b.status===Bv.Api.GetTransactionStatus.NOT_FOUND},f);case 14:if(o.getTransactionResponseAll=d.sent,o.getTransactionResponse=o.getTransactionResponseAll[o.getTransactionResponseAll.length-1],o.getTransactionResponse.status!==Bv.Api.GetTransactionStatus.NOT_FOUND){d.next=18;break}throw new e.Errors.TransactionStillPending("Waited ".concat(f," seconds for transaction to complete, but it did not. ")+"Returning anyway. Check the transaction status manually. "+"Sent transaction: ".concat(JSON.stringify(o.sendTransactionResponse,null,2),`
14
- `)+"All attempts to get the result: ".concat(JSON.stringify(o.getTransactionResponseAll,null,2)));case 18:return d.abrupt("return",o);case 19:case"end":return d.stop()}},i)}))),this.signTransaction=t,this.assembled=n,!t)throw new Error("You must provide a `signTransaction` function to send a transaction");this.server=new G5.Server(this.assembled.options.rpcUrl,{allowHttp:(a=this.assembled.options.allowHttp)!==null&&a!==void 0?a:!1})}return rl(e,[{key:"result",get:function(){if("getTransactionResponse"in this&&this.getTransactionResponse){if("returnValue"in this.getTransactionResponse)return this.assembled.options.parseResultXdr(this.getTransactionResponse.returnValue);throw new Error("Transaction failed! Cannot parse result.")}if(this.sendTransactionResponse){var n,o=(n=this.sendTransactionResponse.errorResult)===null||n===void 0?void 0:n.result();throw o?new e.Errors.SendFailed("Transaction simulation looked correct, but attempting to send the transaction failed. Check `simulation` and `sendTransactionResponseAll` to troubleshoot. Decoded `sendTransactionResponse.errorResultXdr`: ".concat(o)):new e.Errors.SendResultOnly("Transaction was sent to the network, but not yet awaited. No result to show. Await transaction completion with `getTransaction(sendTransactionResponse.hash)`")}throw new Error("Sending transaction failed: ".concat(JSON.stringify(this.assembled)))}}])}();Uv=ih;oh(ih,"Errors",{SendFailed:function(e){function t(){return tl(this,t),th(this,t,arguments)}return rh(t,e),rl(t)}(Hs(Error)),SendResultOnly:function(e){function t(){return tl(this,t),th(this,t,arguments)}return rh(t,e),rl(t)}(Hs(Error)),TransactionStillPending:function(e){function t(){return tl(this,t),th(this,t,arguments)}return rh(t,e),rl(t)}(Hs(Error))});oh(ih,"init",function(){var e=Mv(Gs().mark(function t(n,o){var a,i;return Gs().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return a=new Uv(n,o),f.next=3,a.send();case 3:return i=f.sent,f.abrupt("return",i);case 5:case"end":return f.stop()}},t)}));return function(t,n){return e.apply(this,arguments)}}())});var ph=Jt(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.NULL_ACCOUNT=Na.AssembledTransaction=void 0;var uo=oi(),Z5=Jc(),sh=zi(),eO=Qc(),tO=Zc(),uh=el(),rO=ah();function Xi(e,t,n){return t=$s(t),nO(e,lh()?Reflect.construct(t,n||[],$s(e).constructor):t.apply(e,n))}function nO(e,t){if(t&&(_i(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oO(e)}function oO(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gi(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ws(e,t)}function ai(e){var t=typeof Map=="function"?new Map:void 0;return ai=function(o){if(o===null||!aO(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(o))return t.get(o);t.set(o,a)}function a(){return iO(o,arguments,$s(this).constructor)}return a.prototype=Object.create(o.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Ws(a,o)},ai(e)}function iO(e,t,n){if(lh())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var a=new(e.bind.apply(e,o));return n&&Ws(a,n.prototype),a}function lh(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lh=function(){return!!e})()}function aO(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function Ws(e,t){return Ws=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,a){return o.__proto__=a,o},Ws(e,t)}function $s(e){return $s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$s(e)}function _i(e){"@babel/helpers - typeof";return _i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_i(e)}function sO(e,t){return lO(e)||cO(e,t)||fh(e,t)||uO()}function uO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
15
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cO(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o,a,i,s,f=[],u=!0,r=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=i.call(n)).done)&&(f.push(o.value),f.length!==t);u=!0);}catch(_){r=!0,a=_}finally{try{if(!u&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(r)throw a}}return f}}function lO(e){if(Array.isArray(e))return e}function fO(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=fh(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var o=0,a=function(){};return{s:a,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(r){throw r},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
16
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,s=!1,f;return{s:function(){n=n.call(e)},n:function(){var r=n.next();return i=r.done,r},e:function(r){s=!0,f=r},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(s)throw f}}}}function Dv(e){return dO(e)||hO(e)||fh(e)||pO()}function pO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
17
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fh(e,t){if(e){if(typeof e=="string")return ch(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ch(e,t)}}function hO(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dO(e){if(Array.isArray(e))return ch(e)}function ch(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function mo(){"use strict";mo=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(I,S,m){I[S]=m.value},i=typeof Symbol=="function"?Symbol:{},s=i.iterator||"@@iterator",f=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function r(I,S,m){return Object.defineProperty(I,S,{value:m,enumerable:!0,configurable:!0,writable:!0}),I[S]}try{r({},"")}catch{r=function(m,P,l){return m[P]=l}}function _(I,S,m,P){var l=S&&S.prototype instanceof A?S:A,x=Object.create(l.prototype),W=new X(P||[]);return a(x,"_invoke",{value:me(I,m,W)}),x}function d(I,S,m){try{return{type:"normal",arg:I.call(S,m)}}catch(P){return{type:"throw",arg:P}}}t.wrap=_;var b="suspendedStart",T="suspendedYield",w="executing",g="completed",p={};function A(){}function L(){}function E(){}var N={};r(N,s,function(){return this});var F=Object.getPrototypeOf,R=F&&F(F(ae([])));R&&R!==n&&o.call(R,s)&&(N=R);var j=E.prototype=A.prototype=Object.create(N);function V(I){["next","throw","return"].forEach(function(S){r(I,S,function(m){return this._invoke(S,m)})})}function Y(I,S){function m(l,x,W,K){var re=d(I[l],I,x);if(re.type!=="throw"){var oe=re.arg,Ee=oe.value;return Ee&&_i(Ee)=="object"&&o.call(Ee,"__await")?S.resolve(Ee.__await).then(function(Fe){m("next",Fe,W,K)},function(Fe){m("throw",Fe,W,K)}):S.resolve(Ee).then(function(Fe){oe.value=Fe,W(oe)},function(Fe){return m("throw",Fe,W,K)})}K(re.arg)}var P;a(this,"_invoke",{value:function(x,W){function K(){return new S(function(re,oe){m(x,W,re,oe)})}return P=P?P.then(K,K):K()}})}function me(I,S,m){var P=b;return function(l,x){if(P===w)throw Error("Generator is already running");if(P===g){if(l==="throw")throw x;return{value:e,done:!0}}for(m.method=l,m.arg=x;;){var W=m.delegate;if(W){var K=le(W,m);if(K){if(K===p)continue;return K}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(P===b)throw P=g,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);P=w;var re=d(I,S,m);if(re.type==="normal"){if(P=m.done?g:T,re.arg===p)continue;return{value:re.arg,done:m.done}}re.type==="throw"&&(P=g,m.method="throw",m.arg=re.arg)}}}function le(I,S){var m=S.method,P=I.iterator[m];if(P===e)return S.delegate=null,m==="throw"&&I.iterator.return&&(S.method="return",S.arg=e,le(I,S),S.method==="throw")||m!=="return"&&(S.method="throw",S.arg=new TypeError("The iterator does not provide a '"+m+"' method")),p;var l=d(P,I.iterator,S.arg);if(l.type==="throw")return S.method="throw",S.arg=l.arg,S.delegate=null,p;var x=l.arg;return x?x.done?(S[I.resultName]=x.value,S.next=I.nextLoc,S.method!=="return"&&(S.method="next",S.arg=e),S.delegate=null,p):x:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,p)}function C(I){var S={tryLoc:I[0]};1 in I&&(S.catchLoc=I[1]),2 in I&&(S.finallyLoc=I[2],S.afterLoc=I[3]),this.tryEntries.push(S)}function q(I){var S=I.completion||{};S.type="normal",delete S.arg,I.completion=S}function X(I){this.tryEntries=[{tryLoc:"root"}],I.forEach(C,this),this.reset(!0)}function ae(I){if(I||I===""){var S=I[s];if(S)return S.call(I);if(typeof I.next=="function")return I;if(!isNaN(I.length)){var m=-1,P=function l(){for(;++m<I.length;)if(o.call(I,m))return l.value=I[m],l.done=!1,l;return l.value=e,l.done=!0,l};return P.next=P}}throw new TypeError(_i(I)+" is not iterable")}return L.prototype=E,a(j,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:L,configurable:!0}),L.displayName=r(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(I){var S=typeof I=="function"&&I.constructor;return!!S&&(S===L||(S.displayName||S.name)==="GeneratorFunction")},t.mark=function(I){return Object.setPrototypeOf?Object.setPrototypeOf(I,E):(I.__proto__=E,r(I,u,"GeneratorFunction")),I.prototype=Object.create(j),I},t.awrap=function(I){return{__await:I}},V(Y.prototype),r(Y.prototype,f,function(){return this}),t.AsyncIterator=Y,t.async=function(I,S,m,P,l){l===void 0&&(l=Promise);var x=new Y(_(I,S,m,P),l);return t.isGeneratorFunction(S)?x:x.next().then(function(W){return W.done?W.value:x.next()})},V(j),r(j,u,"Generator"),r(j,s,function(){return this}),r(j,"toString",function(){return"[object Generator]"}),t.keys=function(I){var S=Object(I),m=[];for(var P in S)m.push(P);return m.reverse(),function l(){for(;m.length;){var x=m.pop();if(x in S)return l.value=x,l.done=!1,l}return l.done=!0,l}},t.values=ae,X.prototype={constructor:X,reset:function(S){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(q),!S)for(var m in this)m.charAt(0)==="t"&&o.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var S=this.tryEntries[0].completion;if(S.type==="throw")throw S.arg;return this.rval},dispatchException:function(S){if(this.done)throw S;var m=this;function P(oe,Ee){return W.type="throw",W.arg=S,m.next=oe,Ee&&(m.method="next",m.arg=e),!!Ee}for(var l=this.tryEntries.length-1;l>=0;--l){var x=this.tryEntries[l],W=x.completion;if(x.tryLoc==="root")return P("end");if(x.tryLoc<=this.prev){var K=o.call(x,"catchLoc"),re=o.call(x,"finallyLoc");if(K&&re){if(this.prev<x.catchLoc)return P(x.catchLoc,!0);if(this.prev<x.finallyLoc)return P(x.finallyLoc)}else if(K){if(this.prev<x.catchLoc)return P(x.catchLoc,!0)}else{if(!re)throw Error("try statement without catch or finally");if(this.prev<x.finallyLoc)return P(x.finallyLoc)}}}},abrupt:function(S,m){for(var P=this.tryEntries.length-1;P>=0;--P){var l=this.tryEntries[P];if(l.tryLoc<=this.prev&&o.call(l,"finallyLoc")&&this.prev<l.finallyLoc){var x=l;break}}x&&(S==="break"||S==="continue")&&x.tryLoc<=m&&m<=x.finallyLoc&&(x=null);var W=x?x.completion:{};return W.type=S,W.arg=m,x?(this.method="next",this.next=x.finallyLoc,p):this.complete(W)},complete:function(S,m){if(S.type==="throw")throw S.arg;return S.type==="break"||S.type==="continue"?this.next=S.arg:S.type==="return"?(this.rval=this.arg=S.arg,this.method="return",this.next="end"):S.type==="normal"&&m&&(this.next=m),p},finish:function(S){for(var m=this.tryEntries.length-1;m>=0;--m){var P=this.tryEntries[m];if(P.finallyLoc===S)return this.complete(P.completion,P.afterLoc),q(P),p}},catch:function(S){for(var m=this.tryEntries.length-1;m>=0;--m){var P=this.tryEntries[m];if(P.tryLoc===S){var l=P.completion;if(l.type==="throw"){var x=l.arg;q(P)}return x}}throw Error("illegal catch attempt")},delegateYield:function(S,m,P){return this.delegate={iterator:ae(S),resultName:m,nextLoc:P},this.method==="next"&&(this.arg=e),p}},t}function qv(e,t,n,o,a,i,s){try{var f=e[i](s),u=f.value}catch(r){n(r);return}f.done?t(u):Promise.resolve(u).then(o,a)}function ja(e){return function(){var t=this,n=arguments;return new Promise(function(o,a){var i=e.apply(t,n);function s(u){qv(i,o,a,s,f,"next",u)}function f(u){qv(i,o,a,s,f,"throw",u)}s(void 0)})}}function Si(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vv(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Kv(o.key),o)}}function Ai(e,t,n){return t&&Vv(e.prototype,t),n&&Vv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function La(e,t,n){return t=Kv(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kv(e){var t=yO(e,"string");return _i(t)=="symbol"?t:t+""}function yO(e,t){if(_i(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(_i(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mO=Na.NULL_ACCOUNT="GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF",gO=Na.AssembledTransaction=function(){function e(t){var n=this,o,a;Si(this,e),La(this,"simulate",ja(mo().mark(function i(){return mo().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(n.raw){f.next=2;break}throw new Error("Transaction has not yet been assembled; call `AssembledTransaction.build` first.");case 2:return n.built=n.raw.build(),f.next=5,n.server.simulateTransaction(n.built);case 5:return n.simulation=f.sent,sh.Api.isSimulationSuccess(n.simulation)&&(n.built=(0,eO.assembleTransaction)(n.built,n.simulation).build()),f.abrupt("return",n);case 8:case"end":return f.stop()}},i)}))),La(this,"signAndSend",ja(mo().mark(function i(){var s,f,u,r,_,d,b,T=arguments;return mo().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(s=T.length>0&&T[0]!==void 0?T[0]:{},f=s.force,u=f===void 0?!1:f,r=s.signTransaction,_=r===void 0?n.options.signTransaction:r,n.built){g.next=3;break}throw new Error("Transaction has not yet been simulated");case 3:if(!(!u&&n.isReadCall)){g.next=5;break}throw new e.Errors.NoSignatureNeeded("This is a read call. It requires no signature or sending. Use `force: true` to sign and send anyway.");case 5:if(_){g.next=7;break}throw new e.Errors.NoSigner("You must provide a signTransaction function, either when calling `signAndSend` or when initializing your Client");case 7:if(!n.needsNonInvokerSigningBy().length){g.next=9;break}throw new e.Errors.NeedsMoreSignatures("Transaction requires more signatures. See `needsNonInvokerSigningBy` for details.");case 9:return d=n,g.next=12,rO.SentTransaction.init(_,d);case 12:return b=g.sent,g.abrupt("return",b);case 14:case"end":return g.stop()}},i)}))),La(this,"getStorageExpiration",ja(mo().mark(function i(){var s;return mo().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,n.server.getLedgerEntries(new uo.Contract(n.options.contractId).getFootprint());case 2:if(s=u.sent,!(!s.entries||!s.entries.length||!s.entries[0].liveUntilLedgerSeq)){u.next=5;break}throw new Error("failed to get ledger entry");case 5:return u.abrupt("return",s.entries[0].liveUntilLedgerSeq);case 6:case"end":return u.stop()}},i)}))),La(this,"needsNonInvokerSigningBy",function(){var i,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=s.includeAlreadySigned,u=f===void 0?!1:f;if(!n.built)throw new Error("Transaction has not yet been simulated");if(!("operations"in n.built))throw new Error("Unexpected Transaction type; no operations: ".concat(JSON.stringify(n.built)));var r=n.built.operations[0];return Dv(new Set(((i=r.auth)!==null&&i!==void 0?i:[]).filter(function(_){return _.credentials().switch()===uo.xdr.SorobanCredentialsType.sorobanCredentialsAddress()&&(u||_.credentials().address().signature().switch().name==="scvVoid")}).map(function(_){return uo.StrKey.encodeEd25519PublicKey(_.credentials().address().address().accountId().ed25519())})))}),La(this,"signAuthEntries",ja(mo().mark(function i(){var s,f,u,r,_,d,b,T,w,g,p,A,L,E,N,F,R,j=arguments;return mo().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:if(f=j.length>0&&j[0]!==void 0?j[0]:{},u=f.expiration,r=u===void 0?n.getStorageExpiration():u,_=f.signAuthEntry,d=_===void 0?n.options.signAuthEntry:_,b=f.publicKey,T=b===void 0?n.options.publicKey:b,n.built){Y.next=3;break}throw new Error("Transaction has not yet been assembled or simulated");case 3:if(w=n.needsNonInvokerSigningBy(),w){Y.next=6;break}throw new e.Errors.NoUnsignedNonInvokerAuthEntries("No unsigned non-invoker auth entries; maybe you already signed?");case 6:if(w.indexOf(T??"")!==-1){Y.next=8;break}throw new e.Errors.NoSignatureNeeded('No auth entries for public key "'.concat(T,'"'));case 8:if(d){Y.next=10;break}throw new e.Errors.NoSigner("You must provide `signAuthEntry` when calling `signAuthEntries`, or when constructing the `Client` or `AssembledTransaction`");case 10:g=n.built.operations[0],p=(s=g.auth)!==null&&s!==void 0?s:[],A=fO(p.entries()),Y.prev=13,A.s();case 15:if((L=A.n()).done){Y.next=34;break}if(E=sO(L.value,2),N=E[0],F=E[1],F.credentials().switch()===uo.xdr.SorobanCredentialsType.sorobanCredentialsAddress()){Y.next=19;break}return Y.abrupt("continue",32);case 19:if(R=uo.StrKey.encodeEd25519PublicKey(F.credentials().address().address().accountId().ed25519()),R===T){Y.next=22;break}return Y.abrupt("continue",32);case 22:return Y.t0=uo.authorizeEntry,Y.t1=F,Y.t2=function(){var me=ja(mo().mark(function le(C){return mo().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return X.t0=Buffer,X.next=3,d(C.toXDR("base64"));case 3:return X.t1=X.sent,X.abrupt("return",X.t0.from.call(X.t0,X.t1,"base64"));case 5:case"end":return X.stop()}},le)}));return function(le){return me.apply(this,arguments)}}(),Y.next=27,r;case 27:return Y.t3=Y.sent,Y.t4=n.options.networkPassphrase,Y.next=31,(0,Y.t0)(Y.t1,Y.t2,Y.t3,Y.t4);case 31:p[N]=Y.sent;case 32:Y.next=15;break;case 34:Y.next=39;break;case 36:Y.prev=36,Y.t5=Y.catch(13),A.e(Y.t5);case 39:return Y.prev=39,A.f(),Y.finish(39);case 42:case"end":return Y.stop()}},i,null,[[13,36,39,42]])}))),this.options=t,this.options.simulate=(o=this.options.simulate)!==null&&o!==void 0?o:!0,this.server=new Z5.Server(this.options.rpcUrl,{allowHttp:(a=this.options.allowHttp)!==null&&a!==void 0?a:!1})}return Ai(e,[{key:"toJSON",value:function(){var n;return JSON.stringify({method:this.options.method,tx:(n=this.built)===null||n===void 0?void 0:n.toXDR(),simulationResult:{auth:this.simulationData.result.auth.map(function(o){return o.toXDR("base64")}),retval:this.simulationData.result.retval.toXDR("base64")},simulationTransactionData:this.simulationData.transactionData.toXDR("base64")})}},{key:"simulationData",get:function(){if(this.simulationResult&&this.simulationTransactionData)return{result:this.simulationResult,transactionData:this.simulationTransactionData};var n=this.simulation;if(!n)throw new e.Errors.NotYetSimulated("Transaction has not yet been simulated");if(sh.Api.isSimulationError(n))throw new Error('Transaction simulation failed: "'.concat(n.error,'"'));if(sh.Api.isSimulationRestore(n))throw new e.Errors.ExpiredState("You need to restore some contract state before you can invoke this method. ".concat(JSON.stringify(n,null,2)));if(!n.result)throw new Error("Expected an invocation simulation, but got no 'result' field. Simulation: ".concat(JSON.stringify(n,null,2)));return this.simulationResult=n.result,this.simulationTransactionData=n.transactionData.build(),{result:this.simulationResult,transactionData:this.simulationTransactionData}}},{key:"result",get:function(){try{return this.options.parseResultXdr(this.simulationData.result.retval)}catch(o){if(!(0,uh.implementsToString)(o))throw o;var n=this.parseError(o.toString());if(n)return n;throw o}}},{key:"parseError",value:function(n){if(this.options.errorTypes){var o=n.match(uh.contractErrorPattern);if(o){var a=parseInt(o[1],10),i=this.options.errorTypes[a];if(i)return new tO.Err(i)}}}},{key:"isReadCall",get:function(){var n=this.simulationData.result.auth.length,o=this.simulationData.transactionData.resources().footprint().readWrite().length;return n===0&&o===0}}],[{key:"fromJSON",value:function(n,o){var a=o.tx,i=o.simulationResult,s=o.simulationTransactionData,f=new e(n);return f.built=uo.TransactionBuilder.fromXDR(a,n.networkPassphrase),f.simulationResult={auth:i.auth.map(function(u){return uo.xdr.SorobanAuthorizationEntry.fromXDR(u,"base64")}),retval:uo.xdr.ScVal.fromXDR(i.retval,"base64")},f.simulationTransactionData=uo.xdr.SorobanTransactionData.fromXDR(s,"base64"),f}},{key:"build",value:function(){var t=ja(mo().mark(function o(a){var i,s,f,u,r,_;return mo().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(u=new e(a),r=new uo.Contract(a.contractId),!a.publicKey){b.next=8;break}return b.next=5,u.server.getAccount(a.publicKey);case 5:b.t0=b.sent,b.next=9;break;case 8:b.t0=new uo.Account(mO,"0");case 9:if(_=b.t0,u.raw=new uo.TransactionBuilder(_,{fee:(i=a.fee)!==null&&i!==void 0?i:uo.BASE_FEE,networkPassphrase:a.networkPassphrase}).addOperation(r.call.apply(r,[a.method].concat(Dv((s=a.args)!==null&&s!==void 0?s:[])))).setTimeout((f=a.timeoutInSeconds)!==null&&f!==void 0?f:uh.DEFAULT_TIMEOUT),!a.simulate){b.next=14;break}return b.next=14,u.simulate();case 14:return b.abrupt("return",u);case 15:case"end":return b.stop()}},o)}));function n(o){return t.apply(this,arguments)}return n}()}])}();La(gO,"Errors",{ExpiredState:function(e){function t(){return Si(this,t),Xi(this,t,arguments)}return Gi(t,e),Ai(t)}(ai(Error)),NeedsMoreSignatures:function(e){function t(){return Si(this,t),Xi(this,t,arguments)}return Gi(t,e),Ai(t)}(ai(Error)),NoSignatureNeeded:function(e){function t(){return Si(this,t),Xi(this,t,arguments)}return Gi(t,e),Ai(t)}(ai(Error)),NoUnsignedNonInvokerAuthEntries:function(e){function t(){return Si(this,t),Xi(this,t,arguments)}return Gi(t,e),Ai(t)}(ai(Error)),NoSigner:function(e){function t(){return Si(this,t),Xi(this,t,arguments)}return Gi(t,e),Ai(t)}(ai(Error)),NotYetSimulated:function(e){function t(){return Si(this,t),Xi(this,t,arguments)}return Gi(t,e),Ai(t)}(ai(Error)),FakeAccount:function(e){function t(){return Si(this,t),Xi(this,t,arguments)}return Gi(t,e),Ai(t)}(ai(Error))})});var Gv=Jt(il=>{"use strict";function ol(e){"@babel/helpers - typeof";return ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ol(e)}Object.defineProperty(il,"__esModule",{value:!0});il.basicNodeSigner=void 0;var Hv=oi();function Qs(){"use strict";Qs=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(I,S,m){I[S]=m.value},i=typeof Symbol=="function"?Symbol:{},s=i.iterator||"@@iterator",f=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function r(I,S,m){return Object.defineProperty(I,S,{value:m,enumerable:!0,configurable:!0,writable:!0}),I[S]}try{r({},"")}catch{r=function(m,P,l){return m[P]=l}}function _(I,S,m,P){var l=S&&S.prototype instanceof A?S:A,x=Object.create(l.prototype),W=new X(P||[]);return a(x,"_invoke",{value:me(I,m,W)}),x}function d(I,S,m){try{return{type:"normal",arg:I.call(S,m)}}catch(P){return{type:"throw",arg:P}}}t.wrap=_;var b="suspendedStart",T="suspendedYield",w="executing",g="completed",p={};function A(){}function L(){}function E(){}var N={};r(N,s,function(){return this});var F=Object.getPrototypeOf,R=F&&F(F(ae([])));R&&R!==n&&o.call(R,s)&&(N=R);var j=E.prototype=A.prototype=Object.create(N);function V(I){["next","throw","return"].forEach(function(S){r(I,S,function(m){return this._invoke(S,m)})})}function Y(I,S){function m(l,x,W,K){var re=d(I[l],I,x);if(re.type!=="throw"){var oe=re.arg,Ee=oe.value;return Ee&&ol(Ee)=="object"&&o.call(Ee,"__await")?S.resolve(Ee.__await).then(function(Fe){m("next",Fe,W,K)},function(Fe){m("throw",Fe,W,K)}):S.resolve(Ee).then(function(Fe){oe.value=Fe,W(oe)},function(Fe){return m("throw",Fe,W,K)})}K(re.arg)}var P;a(this,"_invoke",{value:function(x,W){function K(){return new S(function(re,oe){m(x,W,re,oe)})}return P=P?P.then(K,K):K()}})}function me(I,S,m){var P=b;return function(l,x){if(P===w)throw Error("Generator is already running");if(P===g){if(l==="throw")throw x;return{value:e,done:!0}}for(m.method=l,m.arg=x;;){var W=m.delegate;if(W){var K=le(W,m);if(K){if(K===p)continue;return K}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(P===b)throw P=g,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);P=w;var re=d(I,S,m);if(re.type==="normal"){if(P=m.done?g:T,re.arg===p)continue;return{value:re.arg,done:m.done}}re.type==="throw"&&(P=g,m.method="throw",m.arg=re.arg)}}}function le(I,S){var m=S.method,P=I.iterator[m];if(P===e)return S.delegate=null,m==="throw"&&I.iterator.return&&(S.method="return",S.arg=e,le(I,S),S.method==="throw")||m!=="return"&&(S.method="throw",S.arg=new TypeError("The iterator does not provide a '"+m+"' method")),p;var l=d(P,I.iterator,S.arg);if(l.type==="throw")return S.method="throw",S.arg=l.arg,S.delegate=null,p;var x=l.arg;return x?x.done?(S[I.resultName]=x.value,S.next=I.nextLoc,S.method!=="return"&&(S.method="next",S.arg=e),S.delegate=null,p):x:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,p)}function C(I){var S={tryLoc:I[0]};1 in I&&(S.catchLoc=I[1]),2 in I&&(S.finallyLoc=I[2],S.afterLoc=I[3]),this.tryEntries.push(S)}function q(I){var S=I.completion||{};S.type="normal",delete S.arg,I.completion=S}function X(I){this.tryEntries=[{tryLoc:"root"}],I.forEach(C,this),this.reset(!0)}function ae(I){if(I||I===""){var S=I[s];if(S)return S.call(I);if(typeof I.next=="function")return I;if(!isNaN(I.length)){var m=-1,P=function l(){for(;++m<I.length;)if(o.call(I,m))return l.value=I[m],l.done=!1,l;return l.value=e,l.done=!0,l};return P.next=P}}throw new TypeError(ol(I)+" is not iterable")}return L.prototype=E,a(j,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:L,configurable:!0}),L.displayName=r(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(I){var S=typeof I=="function"&&I.constructor;return!!S&&(S===L||(S.displayName||S.name)==="GeneratorFunction")},t.mark=function(I){return Object.setPrototypeOf?Object.setPrototypeOf(I,E):(I.__proto__=E,r(I,u,"GeneratorFunction")),I.prototype=Object.create(j),I},t.awrap=function(I){return{__await:I}},V(Y.prototype),r(Y.prototype,f,function(){return this}),t.AsyncIterator=Y,t.async=function(I,S,m,P,l){l===void 0&&(l=Promise);var x=new Y(_(I,S,m,P),l);return t.isGeneratorFunction(S)?x:x.next().then(function(W){return W.done?W.value:x.next()})},V(j),r(j,u,"Generator"),r(j,s,function(){return this}),r(j,"toString",function(){return"[object Generator]"}),t.keys=function(I){var S=Object(I),m=[];for(var P in S)m.push(P);return m.reverse(),function l(){for(;m.length;){var x=m.pop();if(x in S)return l.value=x,l.done=!1,l}return l.done=!0,l}},t.values=ae,X.prototype={constructor:X,reset:function(S){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(q),!S)for(var m in this)m.charAt(0)==="t"&&o.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var S=this.tryEntries[0].completion;if(S.type==="throw")throw S.arg;return this.rval},dispatchException:function(S){if(this.done)throw S;var m=this;function P(oe,Ee){return W.type="throw",W.arg=S,m.next=oe,Ee&&(m.method="next",m.arg=e),!!Ee}for(var l=this.tryEntries.length-1;l>=0;--l){var x=this.tryEntries[l],W=x.completion;if(x.tryLoc==="root")return P("end");if(x.tryLoc<=this.prev){var K=o.call(x,"catchLoc"),re=o.call(x,"finallyLoc");if(K&&re){if(this.prev<x.catchLoc)return P(x.catchLoc,!0);if(this.prev<x.finallyLoc)return P(x.finallyLoc)}else if(K){if(this.prev<x.catchLoc)return P(x.catchLoc,!0)}else{if(!re)throw Error("try statement without catch or finally");if(this.prev<x.finallyLoc)return P(x.finallyLoc)}}}},abrupt:function(S,m){for(var P=this.tryEntries.length-1;P>=0;--P){var l=this.tryEntries[P];if(l.tryLoc<=this.prev&&o.call(l,"finallyLoc")&&this.prev<l.finallyLoc){var x=l;break}}x&&(S==="break"||S==="continue")&&x.tryLoc<=m&&m<=x.finallyLoc&&(x=null);var W=x?x.completion:{};return W.type=S,W.arg=m,x?(this.method="next",this.next=x.finallyLoc,p):this.complete(W)},complete:function(S,m){if(S.type==="throw")throw S.arg;return S.type==="break"||S.type==="continue"?this.next=S.arg:S.type==="return"?(this.rval=this.arg=S.arg,this.method="return",this.next="end"):S.type==="normal"&&m&&(this.next=m),p},finish:function(S){for(var m=this.tryEntries.length-1;m>=0;--m){var P=this.tryEntries[m];if(P.finallyLoc===S)return this.complete(P.completion,P.afterLoc),q(P),p}},catch:function(S){for(var m=this.tryEntries.length-1;m>=0;--m){var P=this.tryEntries[m];if(P.tryLoc===S){var l=P.completion;if(l.type==="throw"){var x=l.arg;q(P)}return x}}throw Error("illegal catch attempt")},delegateYield:function(S,m,P){return this.delegate={iterator:ae(S),resultName:m,nextLoc:P},this.method==="next"&&(this.arg=e),p}},t}function zv(e,t,n,o,a,i,s){try{var f=e[i](s),u=f.value}catch(r){n(r);return}f.done?t(u):Promise.resolve(u).then(o,a)}function Xv(e){return function(){var t=this,n=arguments;return new Promise(function(o,a){var i=e.apply(t,n);function s(u){zv(i,o,a,s,f,"next",u)}function f(u){zv(i,o,a,s,f,"throw",u)}s(void 0)})}}var a4=il.basicNodeSigner=function(t,n){return{signTransaction:function(){var o=Xv(Qs().mark(function i(s){var f;return Qs().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return f=Hv.TransactionBuilder.fromXDR(s,n),f.sign(t),r.abrupt("return",f.toXDR());case 3:case"end":return r.stop()}},i)}));function a(i){return o.apply(this,arguments)}return a}(),signAuthEntry:function(){var o=Xv(Qs().mark(function i(s){return Qs().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return u.abrupt("return",t.sign((0,Hv.hash)(Buffer.from(s,"base64"))).toString("base64"));case 1:case"end":return u.stop()}},i)}));function a(i){return o.apply(this,arguments)}return a}()}}});var hh=Jt(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.Spec=void 0;var jt=oi(),vO=Zc();function Wv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,o)}return n}function $v(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wv(Object(n),!0).forEach(function(o){Jv(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wv(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function al(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=t0(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var o=0,a=function(){};return{s:a,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(r){throw r},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
18
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,s=!1,f;return{s:function(){n=n.call(e)},n:function(){var r=n.next();return i=r.done,r},e:function(r){s=!0,f=r},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(s)throw f}}}}function Ei(e){"@babel/helpers - typeof";return Ei=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ei(e)}function bO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qv(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Zv(o.key),o)}}function wO(e,t,n){return t&&Qv(e.prototype,t),n&&Qv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jv(e,t,n){return t=Zv(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zv(e){var t=SO(e,"string");return Ei(t)=="symbol"?t:t+""}function SO(e,t){if(Ei(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Ei(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e0(e,t){return EO(e)||_O(e,t)||t0(e,t)||AO()}function AO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
19
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t0(e,t){if(e){if(typeof e=="string")return Yv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yv(e,t)}}function Yv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function _O(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o,a,i,s,f=[],u=!0,r=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(o=i.call(n)).done)&&(f.push(o.value),f.length!==t);u=!0);}catch(_){r=!0,a=_}finally{try{if(!u&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(r)throw a}}return f}}function EO(e){if(Array.isArray(e))return e}function TO(e,t){var n=t.name().toString(),o=Object.entries(e).find(function(a){var i=e0(a,2),s=i[0],f=i[1];return s===n});if(!o)throw new Error("Missing field ".concat(n));return o[1]}var u4=sl.Spec=function(){function e(t){if(bO(this,e),Jv(this,"entries",[]),t.length==0)throw new Error("Contract spec must have at least one entry");var n=t[0];typeof n=="string"?this.entries=t.map(function(o){return jt.xdr.ScSpecEntry.fromXDR(o,"base64")}):this.entries=t}return wO(e,[{key:"funcs",value:function(){return this.entries.filter(function(n){return n.switch().value===jt.xdr.ScSpecEntryKind.scSpecEntryFunctionV0().value}).map(function(n){return n.functionV0()})}},{key:"getFunc",value:function(n){var o=this.findEntry(n);if(o.switch().value!==jt.xdr.ScSpecEntryKind.scSpecEntryFunctionV0().value)throw new Error("".concat(n," is not a function"));return o.functionV0()}},{key:"funcArgsToScVals",value:function(n,o){var a=this,i=this.getFunc(n);return i.inputs().map(function(s){return a.nativeToScVal(TO(o,s),s.type())})}},{key:"funcResToNative",value:function(n,o){var a=typeof o=="string"?jt.xdr.ScVal.fromXDR(o,"base64"):o,i=this.getFunc(n),s=i.outputs();if(s.length===0){var f=a.switch();if(f.value!==jt.xdr.ScValType.scvVoid().value)throw new Error("Expected void, got ".concat(f.name));return null}if(s.length>1)throw new Error("Multiple outputs not supported");var u=s[0];return u.switch().value===jt.xdr.ScSpecType.scSpecTypeResult().value?new vO.Ok(this.scValToNative(a,u.result().okType())):this.scValToNative(a,u)}},{key:"findEntry",value:function(n){var o=this.entries.find(function(a){return a.value().name().toString()===n});if(!o)throw new Error("no such entry: ".concat(n));return o}},{key:"nativeToScVal",value:function(n,o){var a=this,i=o.switch(),s=i.value;if(i.value===jt.xdr.ScSpecType.scSpecTypeUdt().value){var f=o.udt();return this.nativeToUdt(n,f.name().toString())}if(s===jt.xdr.ScSpecType.scSpecTypeOption().value){var u=o.option();return n===void 0?jt.xdr.ScVal.scvVoid():this.nativeToScVal(n,u.valueType())}switch(Ei(n)){case"object":{var r,_;if(n===null)switch(s){case jt.xdr.ScSpecType.scSpecTypeVoid().value:return jt.xdr.ScVal.scvVoid();default:throw new TypeError("Type ".concat(o," was not void, but value was null"))}if(n instanceof jt.xdr.ScVal)return n;if(n instanceof jt.Address){if(o.switch().value!==jt.xdr.ScSpecType.scSpecTypeAddress().value)throw new TypeError("Type ".concat(o," was not address, but value was Address"));return n.toScVal()}if(n instanceof jt.Contract){if(o.switch().value!==jt.xdr.ScSpecType.scSpecTypeAddress().value)throw new TypeError("Type ".concat(o," was not address, but value was Address"));return n.address().toScVal()}if(n instanceof Uint8Array||Buffer.isBuffer(n)){var d=Uint8Array.from(n);switch(s){case jt.xdr.ScSpecType.scSpecTypeBytesN().value:{var b=o.bytesN();if(d.length!==b.n())throw new TypeError("expected ".concat(b.n()," bytes, but got ").concat(d.length));return jt.xdr.ScVal.scvBytes(d)}case jt.xdr.ScSpecType.scSpecTypeBytes().value:return jt.xdr.ScVal.scvBytes(d);default:throw new TypeError("invalid type (".concat(o,") specified for Bytes and BytesN"))}}if(Array.isArray(n))switch(s){case jt.xdr.ScSpecType.scSpecTypeVec().value:{var T=o.vec(),w=T.elementType();return jt.xdr.ScVal.scvVec(n.map(function(I){return a.nativeToScVal(I,w)}))}case jt.xdr.ScSpecType.scSpecTypeTuple().value:{var g=o.tuple(),p=g.valueTypes();if(n.length!==p.length)throw new TypeError("Tuple expects ".concat(p.length," values, but ").concat(n.length," were provided"));return jt.xdr.ScVal.scvVec(n.map(function(I,S){return a.nativeToScVal(I,p[S])}))}case jt.xdr.ScSpecType.scSpecTypeMap().value:{var A=o.map(),L=A.keyType(),E=A.valueType();return jt.xdr.ScVal.scvMap(n.map(function(I){var S=a.nativeToScVal(I[0],L),m=a.nativeToScVal(I[1],E);return new jt.xdr.ScMapEntry({key:S,val:m})}))}default:throw new TypeError("Type ".concat(o," was not vec, but value was Array"))}if(n.constructor===Map){if(s!==jt.xdr.ScSpecType.scSpecTypeMap().value)throw new TypeError("Type ".concat(o," was not map, but value was Map"));for(var N=o.map(),F=n,R=[],j=F.entries(),V=j.next();!V.done;){var Y=e0(V.value,2),me=Y[0],le=Y[1],C=this.nativeToScVal(me,N.keyType()),q=this.nativeToScVal(le,N.valueType());R.push(new jt.xdr.ScMapEntry({key:C,val:q})),V=j.next()}return jt.xdr.ScVal.scvMap(R)}if(((r=(_=n.constructor)===null||_===void 0?void 0:_.name)!==null&&r!==void 0?r:"")!=="Object"){var X;throw new TypeError("cannot interpret ".concat((X=n.constructor)===null||X===void 0?void 0:X.name," value as ScVal (").concat(JSON.stringify(n),")"))}throw new TypeError("Received object ".concat(n," did not match the provided type ").concat(o))}case"number":case"bigint":switch(s){case jt.xdr.ScSpecType.scSpecTypeU32().value:return jt.xdr.ScVal.scvU32(n);case jt.xdr.ScSpecType.scSpecTypeI32().value:return jt.xdr.ScVal.scvI32(n);case jt.xdr.ScSpecType.scSpecTypeU64().value:case jt.xdr.ScSpecType.scSpecTypeI64().value:case jt.xdr.ScSpecType.scSpecTypeU128().value:case jt.xdr.ScSpecType.scSpecTypeI128().value:case jt.xdr.ScSpecType.scSpecTypeU256().value:case jt.xdr.ScSpecType.scSpecTypeI256().value:{var ae=i.name.substring(10).toLowerCase();return new jt.XdrLargeInt(ae,n).toScVal()}default:throw new TypeError("invalid type (".concat(o,") specified for integer"))}case"string":return kO(n,i);case"boolean":{if(s!==jt.xdr.ScSpecType.scSpecTypeBool().value)throw TypeError("Type ".concat(o," was not bool, but value was bool"));return jt.xdr.ScVal.scvBool(n)}case"undefined":{if(!o)return jt.xdr.ScVal.scvVoid();switch(s){case jt.xdr.ScSpecType.scSpecTypeVoid().value:case jt.xdr.ScSpecType.scSpecTypeOption().value:return jt.xdr.ScVal.scvVoid();default:throw new TypeError("Type ".concat(o," was not void, but value was undefined"))}}case"function":return this.nativeToScVal(n(),o);default:throw new TypeError("failed to convert typeof ".concat(Ei(n)," (").concat(n,")"))}}},{key:"nativeToUdt",value:function(n,o){var a=this.findEntry(o);switch(a.switch()){case jt.xdr.ScSpecEntryKind.scSpecEntryUdtEnumV0():if(typeof n!="number")throw new TypeError("expected number for enum ".concat(o,", but got ").concat(Ei(n)));return this.nativeToEnum(n,a.udtEnumV0());case jt.xdr.ScSpecEntryKind.scSpecEntryUdtStructV0():return this.nativeToStruct(n,a.udtStructV0());case jt.xdr.ScSpecEntryKind.scSpecEntryUdtUnionV0():return this.nativeToUnion(n,a.udtUnionV0());default:throw new Error("failed to parse udt ".concat(o))}}},{key:"nativeToUnion",value:function(n,o){var a=this,i=n.tag,s=o.cases().find(function(_){var d=_.value().name().toString();return d===i});if(!s)throw new TypeError("no such enum entry: ".concat(i," in ").concat(o));var f=jt.xdr.ScVal.scvSymbol(i);switch(s.switch()){case jt.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0():return jt.xdr.ScVal.scvVec([f]);case jt.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0():{var u=s.tupleCase().type();if(Array.isArray(n.values)){if(n.values.length!=u.length)throw new TypeError("union ".concat(o," expects ").concat(u.length," values, but got ").concat(n.values.length));var r=n.values.map(function(_,d){return a.nativeToScVal(_,u[d])});return r.unshift(f),jt.xdr.ScVal.scvVec(r)}throw new Error("failed to parse union case ".concat(s," with ").concat(n))}default:throw new Error("failed to parse union ".concat(o," with ").concat(n))}}},{key:"nativeToStruct",value:function(n,o){var a=this,i=o.fields();if(i.some(Ys)){if(!i.every(Ys))throw new Error("mixed numeric and non-numeric field names are not allowed");return jt.xdr.ScVal.scvVec(i.map(function(s,f){return a.nativeToScVal(n[f],i[f].type())}))}return jt.xdr.ScVal.scvMap(i.map(function(s){var f=s.name().toString();return new jt.xdr.ScMapEntry({key:a.nativeToScVal(f,jt.xdr.ScSpecTypeDef.scSpecTypeSymbol()),val:a.nativeToScVal(n[f],s.type())})}))}},{key:"nativeToEnum",value:function(n,o){if(o.cases().some(function(a){return a.value()===n}))return jt.xdr.ScVal.scvU32(n);throw new TypeError("no such enum entry: ".concat(n," in ").concat(o))}},{key:"scValStrToNative",value:function(n,o){return this.scValToNative(jt.xdr.ScVal.fromXDR(n,"base64"),o)}},{key:"scValToNative",value:function(n,o){var a=this,i=o.switch(),s=i.value;if(s===jt.xdr.ScSpecType.scSpecTypeUdt().value)return this.scValUdtToNative(n,o.udt());switch(n.switch().value){case jt.xdr.ScValType.scvVoid().value:return;case jt.xdr.ScValType.scvU64().value:case jt.xdr.ScValType.scvI64().value:case jt.xdr.ScValType.scvU128().value:case jt.xdr.ScValType.scvI128().value:case jt.xdr.ScValType.scvU256().value:case jt.xdr.ScValType.scvI256().value:return(0,jt.scValToBigInt)(n);case jt.xdr.ScValType.scvVec().value:{if(s==jt.xdr.ScSpecType.scSpecTypeVec().value){var f,u=o.vec();return((f=n.vec())!==null&&f!==void 0?f:[]).map(function(E){return a.scValToNative(E,u.elementType())})}else if(s==jt.xdr.ScSpecType.scSpecTypeTuple().value){var r,_=o.tuple(),d=_.valueTypes();return((r=n.vec())!==null&&r!==void 0?r:[]).map(function(E,N){return a.scValToNative(E,d[N])})}throw new TypeError("Type ".concat(o," was not vec, but ").concat(n," is"))}case jt.xdr.ScValType.scvAddress().value:return jt.Address.fromScVal(n).toString();case jt.xdr.ScValType.scvMap().value:{var b,T=(b=n.map())!==null&&b!==void 0?b:[];if(s==jt.xdr.ScSpecType.scSpecTypeMap().value){var w=o.map(),g=w.keyType(),p=w.valueType(),A=T.map(function(E){return[a.scValToNative(E.key(),g),a.scValToNative(E.val(),p)]});return A}throw new TypeError("ScSpecType ".concat(i.name," was not map, but ").concat(JSON.stringify(n,null,2)," is"))}case jt.xdr.ScValType.scvBool().value:case jt.xdr.ScValType.scvU32().value:case jt.xdr.ScValType.scvI32().value:case jt.xdr.ScValType.scvBytes().value:return n.value();case jt.xdr.ScValType.scvString().value:case jt.xdr.ScValType.scvSymbol().value:{var L;if(s!==jt.xdr.ScSpecType.scSpecTypeString().value&&s!==jt.xdr.ScSpecType.scSpecTypeSymbol().value)throw new Error("ScSpecType ".concat(i.name," was not string or symbol, but ").concat(JSON.stringify(n,null,2)," is"));return(L=n.value())===null||L===void 0?void 0:L.toString()}case jt.xdr.ScValType.scvTimepoint().value:case jt.xdr.ScValType.scvDuration().value:return(0,jt.scValToBigInt)(jt.xdr.ScVal.scvU64(n.u64()));default:throw new TypeError("failed to convert ".concat(JSON.stringify(n,null,2)," to native type from type ").concat(i.name))}}},{key:"scValUdtToNative",value:function(n,o){var a=this.findEntry(o.name().toString());switch(a.switch()){case jt.xdr.ScSpecEntryKind.scSpecEntryUdtEnumV0():return this.enumToNative(n);case jt.xdr.ScSpecEntryKind.scSpecEntryUdtStructV0():return this.structToNative(n,a.udtStructV0());case jt.xdr.ScSpecEntryKind.scSpecEntryUdtUnionV0():return this.unionToNative(n,a.udtUnionV0());default:throw new Error("failed to parse udt ".concat(o.name().toString(),": ").concat(a))}}},{key:"unionToNative",value:function(n,o){var a=this,i=n.vec();if(!i)throw new Error("".concat(JSON.stringify(n,null,2)," is not a vec"));if(i.length===0&&o.cases.length!==0)throw new Error("".concat(n," has length 0, but the there are at least one case in the union"));var s=i[0].sym().toString();if(i[0].switch().value!=jt.xdr.ScValType.scvSymbol().value)throw new Error("{vec[0]} is not a symbol");var f=o.cases().find(OO(s));if(!f)throw new Error("failed to find entry ".concat(s," in union {udt.name().toString()}"));var u={tag:s};if(f.switch().value===jt.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0().value){var r=f.tupleCase(),_=r.type(),d=_.map(function(b,T){return a.scValToNative(i[T+1],b)});u.values=d}return u}},{key:"structToNative",value:function(n,o){var a=this,i,s={},f=o.fields();if(f.some(Ys)){var u,r=(u=n.vec())===null||u===void 0?void 0:u.map(function(_,d){return a.scValToNative(_,f[d].type())});return r}return(i=n.map())===null||i===void 0||i.forEach(function(_,d){var b=f[d];s[b.name().toString()]=a.scValToNative(_.val(),b.type())}),s}},{key:"enumToNative",value:function(n){if(n.switch().value!==jt.xdr.ScValType.scvU32().value)throw new Error("Enum must have a u32 value");var o=n.u32();return o}},{key:"errorCases",value:function(){return this.entries.filter(function(n){return n.switch().value===jt.xdr.ScSpecEntryKind.scSpecEntryUdtErrorEnumV0().value}).flatMap(function(n){return n.value().cases()})}},{key:"jsonSchema",value:function(n){var o={},a=al(this.entries),i;try{for(a.s();!(i=a.n()).done;){var s=i.value;switch(s.switch().value){case jt.xdr.ScSpecEntryKind.scSpecEntryUdtEnumV0().value:{var f=s.udtEnumV0();o[f.name().toString()]=BO(f);break}case jt.xdr.ScSpecEntryKind.scSpecEntryUdtStructV0().value:{var u=s.udtStructV0();o[u.name().toString()]=RO(u);break}case jt.xdr.ScSpecEntryKind.scSpecEntryUdtUnionV0().value:var r=s.udtUnionV0();o[r.name().toString()]=CO(r);break;case jt.xdr.ScSpecEntryKind.scSpecEntryFunctionV0().value:{var _=s.functionV0(),d=_.name().toString(),b=IO(_),T=b.input;o[d]=T;break}case jt.xdr.ScSpecEntryKind.scSpecEntryUdtErrorEnumV0().value:}}}catch(g){a.e(g)}finally{a.f()}var w={$schema:"http://json-schema.org/draft-07/schema#",definitions:$v($v({},PO),o)};return n&&(w.$ref="#/definitions/".concat(n)),w}}])}();function kO(e,t){switch(t.value){case jt.xdr.ScSpecType.scSpecTypeString().value:return jt.xdr.ScVal.scvString(e);case jt.xdr.ScSpecType.scSpecTypeSymbol().value:return jt.xdr.ScVal.scvSymbol(e);case jt.xdr.ScSpecType.scSpecTypeAddress().value:{var n=jt.Address.fromString(e);return jt.xdr.ScVal.scvAddress(n.toScAddress())}case jt.xdr.ScSpecType.scSpecTypeU64().value:return new jt.XdrLargeInt("u64",e).toScVal();case jt.xdr.ScSpecType.scSpecTypeI64().value:return new jt.XdrLargeInt("i64",e).toScVal();case jt.xdr.ScSpecType.scSpecTypeU128().value:return new jt.XdrLargeInt("u128",e).toScVal();case jt.xdr.ScSpecType.scSpecTypeI128().value:return new jt.XdrLargeInt("i128",e).toScVal();case jt.xdr.ScSpecType.scSpecTypeU256().value:return new jt.XdrLargeInt("u256",e).toScVal();case jt.xdr.ScSpecType.scSpecTypeI256().value:return new jt.XdrLargeInt("i256",e).toScVal();case jt.xdr.ScSpecType.scSpecTypeBytes().value:case jt.xdr.ScSpecType.scSpecTypeBytesN().value:return jt.xdr.ScVal.scvBytes(Buffer.from(e,"base64"));default:throw new TypeError("invalid type ".concat(t.name," specified for string value"))}}function Ys(e){return/^\d+$/.test(e.name().toString())}function OO(e){return function(n){switch(n.switch().value){case jt.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0().value:{var o=n.tupleCase();return o.name().toString()===e}case jt.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0().value:{var a=n.voidCase();return a.name().toString()===e}default:return!1}}}var PO={U32:{type:"integer",minimum:0,maximum:4294967295},I32:{type:"integer",minimum:-2147483648,maximum:2147483647},U64:{type:"string",pattern:"^([1-9][0-9]*|0)$",minLength:1,maxLength:20},I64:{type:"string",pattern:"^(-?[1-9][0-9]*|0)$",minLength:1,maxLength:21},U128:{type:"string",pattern:"^([1-9][0-9]*|0)$",minLength:1,maxLength:39},I128:{type:"string",pattern:"^(-?[1-9][0-9]*|0)$",minLength:1,maxLength:40},U256:{type:"string",pattern:"^([1-9][0-9]*|0)$",minLength:1,maxLength:78},I256:{type:"string",pattern:"^(-?[1-9][0-9]*|0)$",minLength:1,maxLength:79},Address:{type:"string",format:"address",description:"Address can be a public key or contract id"},ScString:{type:"string",description:"ScString is a string"},ScSymbol:{type:"string",description:"ScString is a string"},DataUrl:{type:"string",pattern:"^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=)?$"}};function qo(e){var t=e.switch(),n=t.value,o;switch(n){case jt.xdr.ScSpecType.scSpecTypeVal().value:{o="Val";break}case jt.xdr.ScSpecType.scSpecTypeBool().value:return{type:"boolean"};case jt.xdr.ScSpecType.scSpecTypeVoid().value:return{type:"null"};case jt.xdr.ScSpecType.scSpecTypeError().value:{o="Error";break}case jt.xdr.ScSpecType.scSpecTypeU32().value:{o="U32";break}case jt.xdr.ScSpecType.scSpecTypeI32().value:{o="I32";break}case jt.xdr.ScSpecType.scSpecTypeU64().value:{o="U64";break}case jt.xdr.ScSpecType.scSpecTypeI64().value:{o="I64";break}case jt.xdr.ScSpecType.scSpecTypeTimepoint().value:throw new Error("Timepoint type not supported");case jt.xdr.ScSpecType.scSpecTypeDuration().value:throw new Error("Duration not supported");case jt.xdr.ScSpecType.scSpecTypeU128().value:{o="U128";break}case jt.xdr.ScSpecType.scSpecTypeI128().value:{o="I128";break}case jt.xdr.ScSpecType.scSpecTypeU256().value:{o="U256";break}case jt.xdr.ScSpecType.scSpecTypeI256().value:{o="I256";break}case jt.xdr.ScSpecType.scSpecTypeBytes().value:{o="DataUrl";break}case jt.xdr.ScSpecType.scSpecTypeString().value:{o="ScString";break}case jt.xdr.ScSpecType.scSpecTypeSymbol().value:{o="ScSymbol";break}case jt.xdr.ScSpecType.scSpecTypeAddress().value:{o="Address";break}case jt.xdr.ScSpecType.scSpecTypeOption().value:{var a=e.option();return qo(a.valueType())}case jt.xdr.ScSpecType.scSpecTypeResult().value:break;case jt.xdr.ScSpecType.scSpecTypeVec().value:{var i=e.vec(),s=qo(i.elementType());return{type:"array",items:s}}case jt.xdr.ScSpecType.scSpecTypeMap().value:{var f=e.map(),u=[qo(f.keyType()),qo(f.valueType())];return{type:"array",items:{type:"array",items:u,minItems:2,maxItems:2}}}case jt.xdr.ScSpecType.scSpecTypeTuple().value:{var r=e.tuple(),_=r.valueTypes().length,d=_,b=r.valueTypes().map(qo);return{type:"array",items:b,minItems:_,maxItems:d}}case jt.xdr.ScSpecType.scSpecTypeBytesN().value:{var T=e.bytesN();return{$ref:"#/definitions/DataUrl",maxLength:T.n()}}case jt.xdr.ScSpecType.scSpecTypeUdt().value:{var w=e.udt();o=w.name().toString();break}}return{$ref:"#/definitions/".concat(o)}}function xO(e){return e.switch().value!=jt.xdr.ScSpecType.scSpecTypeOption().value}function RO(e){var t=e.fields();if(t.some(Ys)){if(!t.every(Ys))throw new Error("mixed numeric and non-numeric field names are not allowed");var n=t.map(function(f,u){return qo(t[u].type())});return{type:"array",items:n,minItems:t.length,maxItems:t.length}}var o=e.doc().toString(),a=r0(t),i=a.properties,s=a.required;return i.additionalProperties=!1,{description:o,properties:i,required:s,type:"object"}}function r0(e){var t={},n=[],o=al(e),a;try{for(o.s();!(a=o.n()).done;){var i=a.value,s=i.type(),f=i.name().toString();t[f]=qo(s),xO(s)&&n.push(f)}}catch(r){o.e(r)}finally{o.f()}var u={properties:t};return n.length>0&&(u.required=n),u}function IO(e){var t=r0(e.inputs()),n=t.properties,o=t.required,a={additionalProperties:!1,properties:n,type:"object"};o?.length>0&&(a.required=o);var i={properties:{args:a}},s=e.outputs(),f=s.length>0?qo(s[0]):qo(jt.xdr.ScSpecTypeDef.scSpecTypeVoid()),u=e.doc().toString();return u.length>0&&(i.description=u),i.additionalProperties=!1,f.additionalProperties=!1,{input:i,output:f}}function CO(e){var t=e.doc().toString(),n=e.cases(),o=[],a=al(n),i;try{for(a.s();!(i=a.n()).done;){var s=i.value;switch(s.switch().value){case jt.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0().value:{var f=s.voidCase(),u=f.name().toString();o.push({type:"object",title:u,properties:{tag:u},additionalProperties:!1,required:["tag"]});break}case jt.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0().value:{var r=s.tupleCase(),_=r.name().toString();o.push({type:"object",title:_,properties:{tag:_,values:{type:"array",items:r.type().map(qo)}},required:["tag","values"],additionalProperties:!1})}}}}catch(b){a.e(b)}finally{a.f()}var d={oneOf:o};return t.length>0&&(d.description=t),d}function BO(e){var t=e.doc().toString(),n=e.cases(),o=[],a=al(n),i;try{for(a.s();!(i=a.n()).done;){var s=i.value,f=s.name().toString(),u=s.doc().toString();o.push({description:u,title:f,enum:[s.value()],type:"number"})}}catch(_){a.e(_)}finally{a.f()}var r={oneOf:o};return t.length>0&&(r.description=t),r}});var ul=Jt((ro,a0)=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});var n0={Server:!0,Durability:!0,AxiosClient:!0,parseRawSimulation:!0,parseRawEvents:!0};Object.defineProperty(ro,"AxiosClient",{enumerable:!0,get:function(){return jO.default}});Object.defineProperty(ro,"Durability",{enumerable:!0,get:function(){return o0.Durability}});Object.defineProperty(ro,"Server",{enumerable:!0,get:function(){return o0.Server}});ro.default=void 0;Object.defineProperty(ro,"parseRawEvents",{enumerable:!0,get:function(){return i0.parseRawEvents}});Object.defineProperty(ro,"parseRawSimulation",{enumerable:!0,get:function(){return i0.parseRawSimulation}});var dh=zi();Object.keys(dh).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(n0,e)||e in ro&&ro[e]===dh[e]||Object.defineProperty(ro,e,{enumerable:!0,get:function(){return dh[e]}})});var o0=Jc(),jO=LO(Xc()),i0=$c(),yh=Qc();Object.keys(yh).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(n0,e)||e in ro&&ro[e]===yh[e]||Object.defineProperty(ro,e,{enumerable:!0,get:function(){return yh[e]}})});function LO(e){return e&&e.__esModule?e:{default:e}}var l4=ro.default=a0.exports});var h0=Jt(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});cl.Client=void 0;var NO=hh(),s0=ul(),u0=ph(),UO=el(),MO=["method"];function Qi(e){"@babel/helpers - typeof";return Qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qi(e)}function $i(){"use strict";$i=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(I,S,m){I[S]=m.value},i=typeof Symbol=="function"?Symbol:{},s=i.iterator||"@@iterator",f=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function r(I,S,m){return Object.defineProperty(I,S,{value:m,enumerable:!0,configurable:!0,writable:!0}),I[S]}try{r({},"")}catch{r=function(m,P,l){return m[P]=l}}function _(I,S,m,P){var l=S&&S.prototype instanceof A?S:A,x=Object.create(l.prototype),W=new X(P||[]);return a(x,"_invoke",{value:me(I,m,W)}),x}function d(I,S,m){try{return{type:"normal",arg:I.call(S,m)}}catch(P){return{type:"throw",arg:P}}}t.wrap=_;var b="suspendedStart",T="suspendedYield",w="executing",g="completed",p={};function A(){}function L(){}function E(){}var N={};r(N,s,function(){return this});var F=Object.getPrototypeOf,R=F&&F(F(ae([])));R&&R!==n&&o.call(R,s)&&(N=R);var j=E.prototype=A.prototype=Object.create(N);function V(I){["next","throw","return"].forEach(function(S){r(I,S,function(m){return this._invoke(S,m)})})}function Y(I,S){function m(l,x,W,K){var re=d(I[l],I,x);if(re.type!=="throw"){var oe=re.arg,Ee=oe.value;return Ee&&Qi(Ee)=="object"&&o.call(Ee,"__await")?S.resolve(Ee.__await).then(function(Fe){m("next",Fe,W,K)},function(Fe){m("throw",Fe,W,K)}):S.resolve(Ee).then(function(Fe){oe.value=Fe,W(oe)},function(Fe){return m("throw",Fe,W,K)})}K(re.arg)}var P;a(this,"_invoke",{value:function(x,W){function K(){return new S(function(re,oe){m(x,W,re,oe)})}return P=P?P.then(K,K):K()}})}function me(I,S,m){var P=b;return function(l,x){if(P===w)throw Error("Generator is already running");if(P===g){if(l==="throw")throw x;return{value:e,done:!0}}for(m.method=l,m.arg=x;;){var W=m.delegate;if(W){var K=le(W,m);if(K){if(K===p)continue;return K}}if(m.method==="next")m.sent=m._sent=m.arg;else if(m.method==="throw"){if(P===b)throw P=g,m.arg;m.dispatchException(m.arg)}else m.method==="return"&&m.abrupt("return",m.arg);P=w;var re=d(I,S,m);if(re.type==="normal"){if(P=m.done?g:T,re.arg===p)continue;return{value:re.arg,done:m.done}}re.type==="throw"&&(P=g,m.method="throw",m.arg=re.arg)}}}function le(I,S){var m=S.method,P=I.iterator[m];if(P===e)return S.delegate=null,m==="throw"&&I.iterator.return&&(S.method="return",S.arg=e,le(I,S),S.method==="throw")||m!=="return"&&(S.method="throw",S.arg=new TypeError("The iterator does not provide a '"+m+"' method")),p;var l=d(P,I.iterator,S.arg);if(l.type==="throw")return S.method="throw",S.arg=l.arg,S.delegate=null,p;var x=l.arg;return x?x.done?(S[I.resultName]=x.value,S.next=I.nextLoc,S.method!=="return"&&(S.method="next",S.arg=e),S.delegate=null,p):x:(S.method="throw",S.arg=new TypeError("iterator result is not an object"),S.delegate=null,p)}function C(I){var S={tryLoc:I[0]};1 in I&&(S.catchLoc=I[1]),2 in I&&(S.finallyLoc=I[2],S.afterLoc=I[3]),this.tryEntries.push(S)}function q(I){var S=I.completion||{};S.type="normal",delete S.arg,I.completion=S}function X(I){this.tryEntries=[{tryLoc:"root"}],I.forEach(C,this),this.reset(!0)}function ae(I){if(I||I===""){var S=I[s];if(S)return S.call(I);if(typeof I.next=="function")return I;if(!isNaN(I.length)){var m=-1,P=function l(){for(;++m<I.length;)if(o.call(I,m))return l.value=I[m],l.done=!1,l;return l.value=e,l.done=!0,l};return P.next=P}}throw new TypeError(Qi(I)+" is not iterable")}return L.prototype=E,a(j,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:L,configurable:!0}),L.displayName=r(E,u,"GeneratorFunction"),t.isGeneratorFunction=function(I){var S=typeof I=="function"&&I.constructor;return!!S&&(S===L||(S.displayName||S.name)==="GeneratorFunction")},t.mark=function(I){return Object.setPrototypeOf?Object.setPrototypeOf(I,E):(I.__proto__=E,r(I,u,"GeneratorFunction")),I.prototype=Object.create(j),I},t.awrap=function(I){return{__await:I}},V(Y.prototype),r(Y.prototype,f,function(){return this}),t.AsyncIterator=Y,t.async=function(I,S,m,P,l){l===void 0&&(l=Promise);var x=new Y(_(I,S,m,P),l);return t.isGeneratorFunction(S)?x:x.next().then(function(W){return W.done?W.value:x.next()})},V(j),r(j,u,"Generator"),r(j,s,function(){return this}),r(j,"toString",function(){return"[object Generator]"}),t.keys=function(I){var S=Object(I),m=[];for(var P in S)m.push(P);return m.reverse(),function l(){for(;m.length;){var x=m.pop();if(x in S)return l.value=x,l.done=!1,l}return l.done=!0,l}},t.values=ae,X.prototype={constructor:X,reset:function(S){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(q),!S)for(var m in this)m.charAt(0)==="t"&&o.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=e)},stop:function(){this.done=!0;var S=this.tryEntries[0].completion;if(S.type==="throw")throw S.arg;return this.rval},dispatchException:function(S){if(this.done)throw S;var m=this;function P(oe,Ee){return W.type="throw",W.arg=S,m.next=oe,Ee&&(m.method="next",m.arg=e),!!Ee}for(var l=this.tryEntries.length-1;l>=0;--l){var x=this.tryEntries[l],W=x.completion;if(x.tryLoc==="root")return P("end");if(x.tryLoc<=this.prev){var K=o.call(x,"catchLoc"),re=o.call(x,"finallyLoc");if(K&&re){if(this.prev<x.catchLoc)return P(x.catchLoc,!0);if(this.prev<x.finallyLoc)return P(x.finallyLoc)}else if(K){if(this.prev<x.catchLoc)return P(x.catchLoc,!0)}else{if(!re)throw Error("try statement without catch or finally");if(this.prev<x.finallyLoc)return P(x.finallyLoc)}}}},abrupt:function(S,m){for(var P=this.tryEntries.length-1;P>=0;--P){var l=this.tryEntries[P];if(l.tryLoc<=this.prev&&o.call(l,"finallyLoc")&&this.prev<l.finallyLoc){var x=l;break}}x&&(S==="break"||S==="continue")&&x.tryLoc<=m&&m<=x.finallyLoc&&(x=null);var W=x?x.completion:{};return W.type=S,W.arg=m,x?(this.method="next",this.next=x.finallyLoc,p):this.complete(W)},complete:function(S,m){if(S.type==="throw")throw S.arg;return S.type==="break"||S.type==="continue"?this.next=S.arg:S.type==="return"?(this.rval=this.arg=S.arg,this.method="return",this.next="end"):S.type==="normal"&&m&&(this.next=m),p},finish:function(S){for(var m=this.tryEntries.length-1;m>=0;--m){var P=this.tryEntries[m];if(P.finallyLoc===S)return this.complete(P.completion,P.afterLoc),q(P),p}},catch:function(S){for(var m=this.tryEntries.length-1;m>=0;--m){var P=this.tryEntries[m];if(P.tryLoc===S){var l=P.completion;if(l.type==="throw"){var x=l.arg;q(P)}return x}}throw Error("illegal catch attempt")},delegateYield:function(S,m,P){return this.delegate={iterator:ae(S),resultName:m,nextLoc:P},this.method==="next"&&(this.arg=e),p}},t}function c0(e,t,n,o,a,i,s){try{var f=e[i](s),u=f.value}catch(r){n(r);return}f.done?t(u):Promise.resolve(u).then(o,a)}function mh(e){return function(){var t=this,n=arguments;return new Promise(function(o,a){var i=e.apply(t,n);function s(u){c0(i,o,a,s,f,"next",u)}function f(u){c0(i,o,a,s,f,"throw",u)}s(void 0)})}}function l0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,o)}return n}function Wi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l0(Object(n),!0).forEach(function(o){gh(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l0(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function FO(e,t){if(e==null)return{};var n=DO(e,t),o,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)o=i[a],!(t.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function DO(e,t){if(e==null)return{};var n={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;n[o]=e[o]}return n}function qO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f0(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,p0(o.key),o)}}function VO(e,t,n){return t&&f0(e.prototype,t),n&&f0(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function gh(e,t,n){return t=p0(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p0(e){var t=KO(e,"string");return Qi(t)=="symbol"?t:t+""}function KO(e,t){if(Qi(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(Qi(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var f4=cl.Client=function(){function e(t,n){var o=this;qO(this,e),gh(this,"txFromJSON",function(a){var i=JSON.parse(a),s=i.method,f=FO(i,MO);return u0.AssembledTransaction.fromJSON(Wi(Wi({},o.options),{},{method:s,parseResultXdr:function(r){return o.spec.funcResToNative(s,r)}}),f)}),this.spec=t,this.options=n,this.spec.funcs().forEach(function(a){var i=a.name().toString(),s=function(u,r){return u0.AssembledTransaction.build(Wi(Wi(Wi({method:i,args:u&&t.funcArgsToScVals(i,u)},n),r),{},{errorTypes:t.errorCases().reduce(function(_,d){return Wi(Wi({},_),{},gh({},d.value(),{message:d.doc().toString()}))},{}),parseResultXdr:function(d){return t.funcResToNative(i,d)}}))};o[i]=t.getFunc(i).inputs().length===0?function(f){return s(void 0,f)}:s})}return VO(e,null,[{key:"fromWasmHash",value:function(){var t=mh($i().mark(function o(a,i){var s,f,u,r,_,d,b=arguments;return $i().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(s=b.length>2&&b[2]!==void 0?b[2]:"hex",!(!i||!i.rpcUrl)){w.next=3;break}throw new TypeError("options must contain rpcUrl");case 3:return f=i.rpcUrl,u=i.allowHttp,r={allowHttp:u},_=new s0.Server(f,r),w.next=8,_.getContractWasmByHash(a,s);case 8:return d=w.sent,w.abrupt("return",e.fromWasm(d,i));case 10:case"end":return w.stop()}},o)}));function n(o,a){return t.apply(this,arguments)}return n}()},{key:"fromWasm",value:function(){var t=mh($i().mark(function o(a,i){var s,f,u,r,_;return $i().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,WebAssembly.compile(a);case 2:if(s=b.sent,f=WebAssembly.Module.customSections(s,"contractspecv0"),f.length!==0){b.next=6;break}throw new Error("Could not obtain contract spec from wasm");case 6:return u=Buffer.from(f[0]),r=(0,UO.processSpecEntryStream)(u),_=new NO.Spec(r),b.abrupt("return",new e(_,i));case 10:case"end":return b.stop()}},o)}));function n(o,a){return t.apply(this,arguments)}return n}()},{key:"from",value:function(){var t=mh($i().mark(function o(a){var i,s,f,u,r,_;return $i().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(!(!a||!a.rpcUrl||!a.contractId)){b.next=2;break}throw new TypeError("options must contain rpcUrl and contractId");case 2:return i=a.rpcUrl,s=a.contractId,f=a.allowHttp,u={allowHttp:f},r=new s0.Server(i,u),b.next=7,r.getContractWasmByContractId(s);case 7:return _=b.sent,b.abrupt("return",e.fromWasm(_,a));case 9:case"end":return b.stop()}},o)}));function n(o){return t.apply(this,arguments)}return n}()}])}()});var y0=Jt(d0=>{"use strict";Object.defineProperty(d0,"__esModule",{value:!0})});var Js=Jt(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});var vh=ph();Object.keys(vh).forEach(function(e){e==="default"||e==="__esModule"||e in hn&&hn[e]===vh[e]||Object.defineProperty(hn,e,{enumerable:!0,get:function(){return vh[e]}})});var bh=Gv();Object.keys(bh).forEach(function(e){e==="default"||e==="__esModule"||e in hn&&hn[e]===bh[e]||Object.defineProperty(hn,e,{enumerable:!0,get:function(){return bh[e]}})});var wh=h0();Object.keys(wh).forEach(function(e){e==="default"||e==="__esModule"||e in hn&&hn[e]===wh[e]||Object.defineProperty(hn,e,{enumerable:!0,get:function(){return wh[e]}})});var Sh=Zc();Object.keys(Sh).forEach(function(e){e==="default"||e==="__esModule"||e in hn&&hn[e]===Sh[e]||Object.defineProperty(hn,e,{enumerable:!0,get:function(){return Sh[e]}})});var Ah=ah();Object.keys(Ah).forEach(function(e){e==="default"||e==="__esModule"||e in hn&&hn[e]===Ah[e]||Object.defineProperty(hn,e,{enumerable:!0,get:function(){return Ah[e]}})});var _h=hh();Object.keys(_h).forEach(function(e){e==="default"||e==="__esModule"||e in hn&&hn[e]===_h[e]||Object.defineProperty(hn,e,{enumerable:!0,get:function(){return _h[e]}})});var Eh=y0();Object.keys(Eh).forEach(function(e){e==="default"||e==="__esModule"||e in hn&&hn[e]===Eh[e]||Object.defineProperty(hn,e,{enumerable:!0,get:function(){return Eh[e]}})})});var fl=Jt((ll,Th)=>{(function(e,t){typeof ll=="object"&&typeof Th=="object"?Th.exports=t():typeof define=="function"&&define.amd?define("StellarSdk",[],t):typeof ll=="object"?ll.StellarSdk=t():e.StellarSdk=t()})(self,()=>(()=>{var e={3740:function(o){var a;a=()=>(()=>{var i={616:(u,r,_)=>{"use strict";_.d(r,{A:()=>b});var d=_(287);d.hp.alloc(1).subarray(0,1)instanceof d.hp||(d.hp.prototype.subarray=function(T,w){let g=Uint8Array.prototype.subarray.call(this,T,w);return Object.setPrototypeOf(g,d.hp.prototype),g});let b=d.hp},281:(u,r,_)=>{let d=_(164);u.exports=d},164:(u,r,_)=>{"use strict";_.r(r),_.d(r,{Array:()=>de,Bool:()=>K,Double:()=>x,Enum:()=>We,Float:()=>l,Hyper:()=>I,Int:()=>C,LargeInt:()=>ae,Opaque:()=>Fe,Option:()=>Qe,Quadruple:()=>W,Reference:()=>et,String:()=>oe,Struct:()=>Be,Union:()=>$e,UnsignedHyper:()=>P,UnsignedInt:()=>m,VarArray:()=>we,VarOpaque:()=>$,Void:()=>ze,XdrReader:()=>p,XdrWriter:()=>E,config:()=>k});class d extends TypeError{constructor(M){super(`XDR Write Error: ${M}`)}}class b extends TypeError{constructor(M){super(`XDR Read Error: ${M}`)}}class T extends TypeError{constructor(M){super(`XDR Type Definition Error: ${M}`)}}class w extends T{constructor(){super("method not implemented, it should be overloaded in the descendant class.")}}var g=_(616).A;class p{constructor(M){if(!g.isBuffer(M)){if(!(M instanceof Array||Array.isArray(M)||ArrayBuffer.isView(M)))throw new b(`source invalid: ${M}`);M=g.from(M)}this._buffer=M,this._length=M.length,this._index=0}_buffer;_length;_index;get eof(){return this._index===this._length}advance(M){let J=this._index;if(this._index+=M,this._length<this._index)throw new b("attempt to read outside the boundary of the buffer");let pe=4-(M%4||4);if(pe>0){for(let Ne=0;Ne<pe;Ne++)if(this._buffer[this._index+Ne]!==0)throw new b("invalid padding");this._index+=pe}return J}rewind(){this._index=0}read(M){let J=this.advance(M);return this._buffer.subarray(J,J+M)}readInt32BE(){return this._buffer.readInt32BE(this.advance(4))}readUInt32BE(){return this._buffer.readUInt32BE(this.advance(4))}readBigInt64BE(){return this._buffer.readBigInt64BE(this.advance(8))}readBigUInt64BE(){return this._buffer.readBigUInt64BE(this.advance(8))}readFloatBE(){return this._buffer.readFloatBE(this.advance(4))}readDoubleBE(){return this._buffer.readDoubleBE(this.advance(8))}ensureInputConsumed(){if(this._index!==this._length)throw new b("invalid XDR contract typecast - source buffer not entirely consumed")}}var A=_(616).A;let L=8192;class E{constructor(M){typeof M=="number"?M=A.allocUnsafe(M):M instanceof A||(M=A.allocUnsafe(L)),this._buffer=M,this._length=M.length}_buffer;_length;_index=0;alloc(M){let J=this._index;return this._index+=M,this._length<this._index&&this.resize(this._index),J}resize(M){let J=Math.ceil(M/L)*L,pe=A.allocUnsafe(J);this._buffer.copy(pe,0,0,this._length),this._buffer=pe,this._length=J}finalize(){return this._buffer.subarray(0,this._index)}toArray(){return[...this.finalize()]}write(M,J){if(typeof M=="string"){let Ne=this.alloc(J);this._buffer.write(M,Ne,"utf8")}else{M instanceof A||(M=A.from(M));let Ne=this.alloc(J);M.copy(this._buffer,Ne,0,J)}let pe=4-(J%4||4);if(pe>0){let Ne=this.alloc(pe);this._buffer.fill(0,Ne,this._index)}}writeInt32BE(M){let J=this.alloc(4);this._buffer.writeInt32BE(M,J)}writeUInt32BE(M){let J=this.alloc(4);this._buffer.writeUInt32BE(M,J)}writeBigInt64BE(M){let J=this.alloc(8);this._buffer.writeBigInt64BE(M,J)}writeBigUInt64BE(M){let J=this.alloc(8);this._buffer.writeBigUInt64BE(M,J)}writeFloatBE(M){let J=this.alloc(4);this._buffer.writeFloatBE(M,J)}writeDoubleBE(M){let J=this.alloc(8);this._buffer.writeDoubleBE(M,J)}static bufferChunkSize=L}var N=_(616).A;class F{toXDR(M="raw"){if(!this.write)return this.constructor.toXDR(this,M);let J=new E;return this.write(this,J),Y(J.finalize(),M)}fromXDR(M,J="raw"){if(!this.read)return this.constructor.fromXDR(M,J);let pe=new p(me(M,J)),Ne=this.read(pe);return pe.ensureInputConsumed(),Ne}validateXDR(M,J="raw"){try{return this.fromXDR(M,J),!0}catch{return!1}}static toXDR(M,J="raw"){let pe=new E;return this.write(M,pe),Y(pe.finalize(),J)}static fromXDR(M,J="raw"){let pe=new p(me(M,J)),Ne=this.read(pe);return pe.ensureInputConsumed(),Ne}static validateXDR(M,J="raw"){try{return this.fromXDR(M,J),!0}catch{return!1}}}class R extends F{static read(M){throw new w}static write(M,J){throw new w}static isValid(M){return!1}}class j extends F{isValid(M){return!1}}class V extends TypeError{constructor(M){super(`Invalid format ${M}, must be one of "raw", "hex", "base64"`)}}function Y(U,M){switch(M){case"raw":return U;case"hex":return U.toString("hex");case"base64":return U.toString("base64");default:throw new V(M)}}function me(U,M){switch(M){case"raw":return U;case"hex":return N.from(U,"hex");case"base64":return N.from(U,"base64");default:throw new V(M)}}let le=2147483647;class C extends R{static read(M){return M.readInt32BE()}static write(M,J){if(typeof M!="number")throw new d("not a number");if((0|M)!==M)throw new d("invalid i32 value");J.writeInt32BE(M)}static isValid(M){return typeof M=="number"&&(0|M)===M&&M>=-2147483648&&M<=le}}function q(U,M,J){if(typeof U!="bigint")throw new TypeError("Expected bigint 'value', got "+typeof U);let pe=M/J;if(pe===1)return[U];if(J<32||J>128||pe!==2&&pe!==4&&pe!==8)throw new TypeError(`invalid bigint (${U}) and slice size (${M} -> ${J}) combination`);let Ne=BigInt(J),tt=new Array(pe);for(let bt=0;bt<pe;bt++)tt[bt]=BigInt.asIntN(J,U),U>>=Ne;return tt}function X(U,M){if(M)return[0n,(1n<<BigInt(U))-1n];let J=1n<<BigInt(U-1);return[0n-J,J-1n]}C.MAX_VALUE=le,C.MIN_VALUE=2147483648;class ae extends R{constructor(M){super(),this._value=function(J,pe,Ne){J instanceof Array?J.length&&J[0]instanceof Array&&(J=J[0]):J=[J];let tt=pe/J.length;switch(tt){case 32:case 64:case 128:case 256:break;default:throw new RangeError(`expected slices to fit in 32/64/128/256 bits, got ${J}`)}try{for(let Yt=0;Yt<J.length;Yt++)typeof J[Yt]!="bigint"&&(J[Yt]=BigInt(J[Yt].valueOf()))}catch(Yt){throw new TypeError(`expected bigint-like values, got: ${J} (${Yt})`)}if(Ne&&J.length===1&&J[0]<0n)throw new RangeError(`expected a positive value, got: ${J}`);let bt=BigInt.asUintN(tt,J[0]);for(let Yt=1;Yt<J.length;Yt++)bt|=BigInt.asUintN(tt,J[Yt])<<BigInt(Yt*tt);Ne||(bt=BigInt.asIntN(pe,bt));let[Ot,Ft]=X(pe,Ne);if(bt>=Ot&&bt<=Ft)return bt;throw new TypeError(`bigint values [${J}] for ${function(Yt,yr){return`${yr?"u":"i"}${Yt}`}(pe,Ne)} out of range [${Ot}, ${Ft}]: ${bt}`)}(M,this.size,this.unsigned)}get unsigned(){throw new w}get size(){throw new w}slice(M){return q(this._value,this.size,M)}toString(){return this._value.toString()}toJSON(){return{_value:this._value.toString()}}toBigInt(){return BigInt(this._value)}static read(M){let{size:J}=this.prototype;return J===64?new this(M.readBigUInt64BE()):new this(...Array.from({length:J/64},()=>M.readBigUInt64BE()).reverse())}static write(M,J){if(M instanceof this)M=M._value;else if(typeof M!="bigint"||M>this.MAX_VALUE||M<this.MIN_VALUE)throw new d(`${M} is not a ${this.name}`);let{unsigned:pe,size:Ne}=this.prototype;if(Ne===64)pe?J.writeBigUInt64BE(M):J.writeBigInt64BE(M);else for(let tt of q(M,Ne,64).reverse())pe?J.writeBigUInt64BE(tt):J.writeBigInt64BE(tt)}static isValid(M){return typeof M=="bigint"||M instanceof this}static fromString(M){return new this(M)}static MAX_VALUE=0n;static MIN_VALUE=0n;static defineIntBoundaries(){let[M,J]=X(this.prototype.size,this.prototype.unsigned);this.MIN_VALUE=M,this.MAX_VALUE=J}}class I extends ae{constructor(...M){super(M)}get low(){return 0|Number(0xffffffffn&this._value)}get high(){return 0|Number(this._value>>32n)}get size(){return 64}get unsigned(){return!1}static fromBits(M,J){return new this(M,J)}}I.defineIntBoundaries();let S=4294967295;class m extends R{static read(M){return M.readUInt32BE()}static write(M,J){if(typeof M!="number"||!(M>=0&&M<=S)||M%1!=0)throw new d("invalid u32 value");J.writeUInt32BE(M)}static isValid(M){return typeof M=="number"&&M%1==0&&M>=0&&M<=S}}m.MAX_VALUE=S,m.MIN_VALUE=0;class P extends ae{constructor(...M){super(M)}get low(){return 0|Number(0xffffffffn&this._value)}get high(){return 0|Number(this._value>>32n)}get size(){return 64}get unsigned(){return!0}static fromBits(M,J){return new this(M,J)}}P.defineIntBoundaries();class l extends R{static read(M){return M.readFloatBE()}static write(M,J){if(typeof M!="number")throw new d("not a number");J.writeFloatBE(M)}static isValid(M){return typeof M=="number"}}class x extends R{static read(M){return M.readDoubleBE()}static write(M,J){if(typeof M!="number")throw new d("not a number");J.writeDoubleBE(M)}static isValid(M){return typeof M=="number"}}class W extends R{static read(){throw new T("quadruple not supported")}static write(){throw new T("quadruple not supported")}static isValid(){return!1}}class K extends R{static read(M){let J=C.read(M);switch(J){case 0:return!1;case 1:return!0;default:throw new b(`got ${J} when trying to read a bool`)}}static write(M,J){let pe=M?1:0;C.write(pe,J)}static isValid(M){return typeof M=="boolean"}}var re=_(616).A;class oe extends j{constructor(M=m.MAX_VALUE){super(),this._maxLength=M}read(M){let J=m.read(M);if(J>this._maxLength)throw new b(`saw ${J} length String, max allowed is ${this._maxLength}`);return M.read(J)}readString(M){return this.read(M).toString("utf8")}write(M,J){let pe=typeof M=="string"?re.byteLength(M,"utf8"):M.length;if(pe>this._maxLength)throw new d(`got ${M.length} bytes, max allowed is ${this._maxLength}`);m.write(pe,J),J.write(M,pe)}isValid(M){return typeof M=="string"?re.byteLength(M,"utf8")<=this._maxLength:!!(M instanceof Array||re.isBuffer(M))&&M.length<=this._maxLength}}var Ee=_(616).A;class Fe extends j{constructor(M){super(),this._length=M}read(M){return M.read(this._length)}write(M,J){let{length:pe}=M;if(pe!==this._length)throw new d(`got ${M.length} bytes, expected ${this._length}`);J.write(M,pe)}isValid(M){return Ee.isBuffer(M)&&M.length===this._length}}var Oe=_(616).A;class $ extends j{constructor(M=m.MAX_VALUE){super(),this._maxLength=M}read(M){let J=m.read(M);if(J>this._maxLength)throw new b(`saw ${J} length VarOpaque, max allowed is ${this._maxLength}`);return M.read(J)}write(M,J){let{length:pe}=M;if(M.length>this._maxLength)throw new d(`got ${M.length} bytes, max allowed is ${this._maxLength}`);m.write(pe,J),J.write(M,pe)}isValid(M){return Oe.isBuffer(M)&&M.length<=this._maxLength}}class de extends j{constructor(M,J){super(),this._childType=M,this._length=J}read(M){let J=new _.g.Array(this._length);for(let pe=0;pe<this._length;pe++)J[pe]=this._childType.read(M);return J}write(M,J){if(!(M instanceof _.g.Array))throw new d("value is not array");if(M.length!==this._length)throw new d(`got array of size ${M.length}, expected ${this._length}`);for(let pe of M)this._childType.write(pe,J)}isValid(M){if(!(M instanceof _.g.Array)||M.length!==this._length)return!1;for(let J of M)if(!this._childType.isValid(J))return!1;return!0}}class we extends j{constructor(M,J=m.MAX_VALUE){super(),this._childType=M,this._maxLength=J}read(M){let J=m.read(M);if(J>this._maxLength)throw new b(`saw ${J} length VarArray, max allowed is ${this._maxLength}`);let pe=new Array(J);for(let Ne=0;Ne<J;Ne++)pe[Ne]=this._childType.read(M);return pe}write(M,J){if(!(M instanceof Array))throw new d("value is not array");if(M.length>this._maxLength)throw new d(`got array of size ${M.length}, max allowed is ${this._maxLength}`);m.write(M.length,J);for(let pe of M)this._childType.write(pe,J)}isValid(M){if(!(M instanceof Array)||M.length>this._maxLength)return!1;for(let J of M)if(!this._childType.isValid(J))return!1;return!0}}class Qe extends R{constructor(M){super(),this._childType=M}read(M){if(K.read(M))return this._childType.read(M)}write(M,J){let pe=M!=null;K.write(pe,J),pe&&this._childType.write(M,J)}isValid(M){return M==null||this._childType.isValid(M)}}class ze extends R{static read(){}static write(M){if(M!==void 0)throw new d("trying to write value to a void slot")}static isValid(M){return M===void 0}}class We extends R{constructor(M,J){super(),this.name=M,this.value=J}static read(M){let J=C.read(M),pe=this._byValue[J];if(pe===void 0)throw new b(`unknown ${this.enumName} member for value ${J}`);return pe}static write(M,J){if(!(M instanceof this))throw new d(`unknown ${M} is not a ${this.enumName}`);C.write(M.value,J)}static isValid(M){return M instanceof this}static members(){return this._members}static values(){return Object.values(this._members)}static fromName(M){let J=this._members[M];if(!J)throw new TypeError(`${M} is not a member of ${this.enumName}`);return J}static fromValue(M){let J=this._byValue[M];if(J===void 0)throw new TypeError(`${M} is not a value of any member of ${this.enumName}`);return J}static create(M,J,pe){let Ne=class extends We{};Ne.enumName=J,M.results[J]=Ne,Ne._members={},Ne._byValue={};for(let[tt,bt]of Object.entries(pe)){let Ot=new Ne(tt,bt);Ne._members[tt]=Ot,Ne._byValue[bt]=Ot,Ne[tt]=()=>Ot}return Ne}}class et extends R{resolve(){throw new T('"resolve" method should be implemented in the descendant class')}}class Be extends R{constructor(M){super(),this._attributes=M||{}}static read(M){let J={};for(let[pe,Ne]of this._fields)J[pe]=Ne.read(M);return new this(J)}static write(M,J){if(!(M instanceof this))throw new d(`${M} is not a ${this.structName}`);for(let[pe,Ne]of this._fields){let tt=M._attributes[pe];Ne.write(tt,J)}}static isValid(M){return M instanceof this}static create(M,J,pe){let Ne=class extends Be{};Ne.structName=J,M.results[J]=Ne;let tt=new Array(pe.length);for(let bt=0;bt<pe.length;bt++){let Ot=pe[bt],Ft=Ot[0],Yt=Ot[1];Yt instanceof et&&(Yt=Yt.resolve(M)),tt[bt]=[Ft,Yt],Ne.prototype[Ft]=Re(Ft)}return Ne._fields=tt,Ne}}function Re(U){return function(M){return M!==void 0&&(this._attributes[U]=M),this._attributes[U]}}class $e extends j{constructor(M,J){super(),this.set(M,J)}set(M,J){typeof M=="string"&&(M=this.constructor._switchOn.fromName(M)),this._switch=M;let pe=this.constructor.armForSwitch(this._switch);this._arm=pe,this._armType=pe===ze?ze:this.constructor._arms[pe],this._value=J}get(M=this._arm){if(this._arm!==ze&&this._arm!==M)throw new TypeError(`${M} not set`);return this._value}switch(){return this._switch}arm(){return this._arm}armType(){return this._armType}value(){return this._value}static armForSwitch(M){let J=this._switches.get(M);if(J!==void 0)return J;if(this._defaultArm)return this._defaultArm;throw new TypeError(`Bad union switch: ${M}`)}static armTypeForArm(M){return M===ze?ze:this._arms[M]}static read(M){let J=this._switchOn.read(M),pe=this.armForSwitch(J),Ne=pe===ze?ze:this._arms[pe],tt;return tt=Ne!==void 0?Ne.read(M):pe.read(M),new this(J,tt)}static write(M,J){if(!(M instanceof this))throw new d(`${M} is not a ${this.unionName}`);this._switchOn.write(M.switch(),J),M.armType().write(M.value(),J)}static isValid(M){return M instanceof this}static create(M,J,pe){let Ne=class extends $e{};Ne.unionName=J,M.results[J]=Ne,pe.switchOn instanceof et?Ne._switchOn=pe.switchOn.resolve(M):Ne._switchOn=pe.switchOn,Ne._switches=new Map,Ne._arms={};let tt=pe.defaultArm;tt instanceof et&&(tt=tt.resolve(M)),Ne._defaultArm=tt;for(let[bt,Ot]of pe.switches){let Ft=typeof bt=="string"?Ne._switchOn.fromName(bt):bt;Ne._switches.set(Ft,Ot)}if(Ne._switchOn.values!==void 0)for(let bt of Ne._switchOn.values())Ne[bt.name]=function(Ot){return new Ne(bt,Ot)},Ne.prototype[bt.name]=function(Ot){return this.set(bt,Ot)};if(pe.arms)for(let[bt,Ot]of Object.entries(pe.arms))Ne._arms[bt]=Ot instanceof et?Ot.resolve(M):Ot,Ot!==ze&&(Ne.prototype[bt]=function(){return this.get(bt)});return Ne}}class ve extends et{constructor(M){super(),this.name=M}resolve(M){return M.definitions[this.name].resolve(M)}}class ue extends et{constructor(M,J,pe=!1){super(),this.childReference=M,this.length=J,this.variable=pe}resolve(M){let J=this.childReference,pe=this.length;return J instanceof et&&(J=J.resolve(M)),pe instanceof et&&(pe=pe.resolve(M)),this.variable?new we(J,pe):new de(J,pe)}}class c extends et{constructor(M){super(),this.childReference=M,this.name=M.name}resolve(M){let J=this.childReference;return J instanceof et&&(J=J.resolve(M)),new Qe(J)}}class y extends et{constructor(M,J){super(),this.sizedType=M,this.length=J}resolve(M){let J=this.length;return J instanceof et&&(J=J.resolve(M)),new this.sizedType(J)}}class v{constructor(M,J,pe){this.constructor=M,this.name=J,this.config=pe}resolve(M){return this.name in M.results?M.results[this.name]:this.constructor(M,this.name,this.config)}}function B(U,M,J){return J instanceof et&&(J=J.resolve(U)),U.results[M]=J,J}function O(U,M,J){return U.results[M]=J,J}class h{constructor(M){this._destination=M,this._definitions={}}enum(M,J){let pe=new v(We.create,M,J);this.define(M,pe)}struct(M,J){let pe=new v(Be.create,M,J);this.define(M,pe)}union(M,J){let pe=new v($e.create,M,J);this.define(M,pe)}typedef(M,J){let pe=new v(B,M,J);this.define(M,pe)}const(M,J){let pe=new v(O,M,J);this.define(M,pe)}void(){return ze}bool(){return K}int(){return C}hyper(){return I}uint(){return m}uhyper(){return P}float(){return l}double(){return x}quadruple(){return W}string(M){return new y(oe,M)}opaque(M){return new y(Fe,M)}varOpaque(M){return new y($,M)}array(M,J){return new ue(M,J)}varArray(M,J){return new ue(M,J,!0)}option(M){return new c(M)}define(M,J){if(this._destination[M]!==void 0)throw new T(`${M} is already defined`);this._definitions[M]=J}lookup(M){return new ve(M)}resolve(){for(let M of Object.values(this._definitions))M.resolve({definitions:this._definitions,results:this._destination})}}function k(U,M={}){if(U){let J=new h(M);U(J),J.resolve()}return M}},526:(u,r)=>{"use strict";r.byteLength=function(A){var L=g(A),E=L[0],N=L[1];return 3*(E+N)/4-N},r.toByteArray=function(A){var L,E,N=g(A),F=N[0],R=N[1],j=new b(function(me,le,C){return 3*(le+C)/4-C}(0,F,R)),V=0,Y=R>0?F-4:F;for(E=0;E<Y;E+=4)L=d[A.charCodeAt(E)]<<18|d[A.charCodeAt(E+1)]<<12|d[A.charCodeAt(E+2)]<<6|d[A.charCodeAt(E+3)],j[V++]=L>>16&255,j[V++]=L>>8&255,j[V++]=255&L;return R===2&&(L=d[A.charCodeAt(E)]<<2|d[A.charCodeAt(E+1)]>>4,j[V++]=255&L),R===1&&(L=d[A.charCodeAt(E)]<<10|d[A.charCodeAt(E+1)]<<4|d[A.charCodeAt(E+2)]>>2,j[V++]=L>>8&255,j[V++]=255&L),j},r.fromByteArray=function(A){for(var L,E=A.length,N=E%3,F=[],R=16383,j=0,V=E-N;j<V;j+=R)F.push(p(A,j,j+R>V?V:j+R));return N===1?(L=A[E-1],F.push(_[L>>2]+_[L<<4&63]+"==")):N===2&&(L=(A[E-2]<<8)+A[E-1],F.push(_[L>>10]+_[L>>4&63]+_[L<<2&63]+"=")),F.join("")};for(var _=[],d=[],b=typeof Uint8Array<"u"?Uint8Array:Array,T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=0;w<64;++w)_[w]=T[w],d[T.charCodeAt(w)]=w;function g(A){var L=A.length;if(L%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var E=A.indexOf("=");return E===-1&&(E=L),[E,E===L?0:4-E%4]}function p(A,L,E){for(var N,F,R=[],j=L;j<E;j+=3)N=(A[j]<<16&16711680)+(A[j+1]<<8&65280)+(255&A[j+2]),R.push(_[(F=N)>>18&63]+_[F>>12&63]+_[F>>6&63]+_[63&F]);return R.join("")}d[45]=62,d[95]=63},287:(u,r,_)=>{"use strict";let d=_(526),b=_(251),T=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.hp=p,r.IS=50;let w=2147483647;function g(h){if(h>w)throw new RangeError('The value "'+h+'" is invalid for option "size"');let k=new Uint8Array(h);return Object.setPrototypeOf(k,p.prototype),k}function p(h,k,U){if(typeof h=="number"){if(typeof k=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(h)}return A(h,k,U)}function A(h,k,U){if(typeof h=="string")return function(pe,Ne){if(typeof Ne=="string"&&Ne!==""||(Ne="utf8"),!p.isEncoding(Ne))throw new TypeError("Unknown encoding: "+Ne);let tt=0|j(pe,Ne),bt=g(tt),Ot=bt.write(pe,Ne);return Ot!==tt&&(bt=bt.slice(0,Ot)),bt}(h,k);if(ArrayBuffer.isView(h))return function(pe){if(c(pe,Uint8Array)){let Ne=new Uint8Array(pe);return F(Ne.buffer,Ne.byteOffset,Ne.byteLength)}return N(pe)}(h);if(h==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h);if(c(h,ArrayBuffer)||h&&c(h.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(c(h,SharedArrayBuffer)||h&&c(h.buffer,SharedArrayBuffer)))return F(h,k,U);if(typeof h=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let M=h.valueOf&&h.valueOf();if(M!=null&&M!==h)return p.from(M,k,U);let J=function(pe){if(p.isBuffer(pe)){let Ne=0|R(pe.length),tt=g(Ne);return tt.length===0||pe.copy(tt,0,0,Ne),tt}return pe.length!==void 0?typeof pe.length!="number"||y(pe.length)?g(0):N(pe):pe.type==="Buffer"&&Array.isArray(pe.data)?N(pe.data):void 0}(h);if(J)return J;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof h[Symbol.toPrimitive]=="function")return p.from(h[Symbol.toPrimitive]("string"),k,U);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof h)}function L(h){if(typeof h!="number")throw new TypeError('"size" argument must be of type number');if(h<0)throw new RangeError('The value "'+h+'" is invalid for option "size"')}function E(h){return L(h),g(h<0?0:0|R(h))}function N(h){let k=h.length<0?0:0|R(h.length),U=g(k);for(let M=0;M<k;M+=1)U[M]=255&h[M];return U}function F(h,k,U){if(k<0||h.byteLength<k)throw new RangeError('"offset" is outside of buffer bounds');if(h.byteLength<k+(U||0))throw new RangeError('"length" is outside of buffer bounds');let M;return M=k===void 0&&U===void 0?new Uint8Array(h):U===void 0?new Uint8Array(h,k):new Uint8Array(h,k,U),Object.setPrototypeOf(M,p.prototype),M}function R(h){if(h>=w)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w.toString(16)+" bytes");return 0|h}function j(h,k){if(p.isBuffer(h))return h.length;if(ArrayBuffer.isView(h)||c(h,ArrayBuffer))return h.byteLength;if(typeof h!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof h);let U=h.length,M=arguments.length>2&&arguments[2]===!0;if(!M&&U===0)return 0;let J=!1;for(;;)switch(k){case"ascii":case"latin1":case"binary":return U;case"utf8":case"utf-8":return $e(h).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*U;case"hex":return U>>>1;case"base64":return ve(h).length;default:if(J)return M?-1:$e(h).length;k=(""+k).toLowerCase(),J=!0}}function V(h,k,U){let M=!1;if((k===void 0||k<0)&&(k=0),k>this.length||((U===void 0||U>this.length)&&(U=this.length),U<=0)||(U>>>=0)<=(k>>>=0))return"";for(h||(h="utf8");;)switch(h){case"hex":return W(this,k,U);case"utf8":case"utf-8":return m(this,k,U);case"ascii":return l(this,k,U);case"latin1":case"binary":return x(this,k,U);case"base64":return S(this,k,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,k,U);default:if(M)throw new TypeError("Unknown encoding: "+h);h=(h+"").toLowerCase(),M=!0}}function Y(h,k,U){let M=h[k];h[k]=h[U],h[U]=M}function me(h,k,U,M,J){if(h.length===0)return-1;if(typeof U=="string"?(M=U,U=0):U>2147483647?U=2147483647:U<-2147483648&&(U=-2147483648),y(U=+U)&&(U=J?0:h.length-1),U<0&&(U=h.length+U),U>=h.length){if(J)return-1;U=h.length-1}else if(U<0){if(!J)return-1;U=0}if(typeof k=="string"&&(k=p.from(k,M)),p.isBuffer(k))return k.length===0?-1:le(h,k,U,M,J);if(typeof k=="number")return k&=255,typeof Uint8Array.prototype.indexOf=="function"?J?Uint8Array.prototype.indexOf.call(h,k,U):Uint8Array.prototype.lastIndexOf.call(h,k,U):le(h,[k],U,M,J);throw new TypeError("val must be string, number or Buffer")}function le(h,k,U,M,J){let pe,Ne=1,tt=h.length,bt=k.length;if(M!==void 0&&((M=String(M).toLowerCase())==="ucs2"||M==="ucs-2"||M==="utf16le"||M==="utf-16le")){if(h.length<2||k.length<2)return-1;Ne=2,tt/=2,bt/=2,U/=2}function Ot(Ft,Yt){return Ne===1?Ft[Yt]:Ft.readUInt16BE(Yt*Ne)}if(J){let Ft=-1;for(pe=U;pe<tt;pe++)if(Ot(h,pe)===Ot(k,Ft===-1?0:pe-Ft)){if(Ft===-1&&(Ft=pe),pe-Ft+1===bt)return Ft*Ne}else Ft!==-1&&(pe-=pe-Ft),Ft=-1}else for(U+bt>tt&&(U=tt-bt),pe=U;pe>=0;pe--){let Ft=!0;for(let Yt=0;Yt<bt;Yt++)if(Ot(h,pe+Yt)!==Ot(k,Yt)){Ft=!1;break}if(Ft)return pe}return-1}function C(h,k,U,M){U=Number(U)||0;let J=h.length-U;M?(M=Number(M))>J&&(M=J):M=J;let pe=k.length,Ne;for(M>pe/2&&(M=pe/2),Ne=0;Ne<M;++Ne){let tt=parseInt(k.substr(2*Ne,2),16);if(y(tt))return Ne;h[U+Ne]=tt}return Ne}function q(h,k,U,M){return ue($e(k,h.length-U),h,U,M)}function X(h,k,U,M){return ue(function(J){let pe=[];for(let Ne=0;Ne<J.length;++Ne)pe.push(255&J.charCodeAt(Ne));return pe}(k),h,U,M)}function ae(h,k,U,M){return ue(ve(k),h,U,M)}function I(h,k,U,M){return ue(function(J,pe){let Ne,tt,bt,Ot=[];for(let Ft=0;Ft<J.length&&!((pe-=2)<0);++Ft)Ne=J.charCodeAt(Ft),tt=Ne>>8,bt=Ne%256,Ot.push(bt),Ot.push(tt);return Ot}(k,h.length-U),h,U,M)}function S(h,k,U){return k===0&&U===h.length?d.fromByteArray(h):d.fromByteArray(h.slice(k,U))}function m(h,k,U){U=Math.min(h.length,U);let M=[],J=k;for(;J<U;){let pe=h[J],Ne=null,tt=pe>239?4:pe>223?3:pe>191?2:1;if(J+tt<=U){let bt,Ot,Ft,Yt;switch(tt){case 1:pe<128&&(Ne=pe);break;case 2:bt=h[J+1],(192&bt)==128&&(Yt=(31&pe)<<6|63&bt,Yt>127&&(Ne=Yt));break;case 3:bt=h[J+1],Ot=h[J+2],(192&bt)==128&&(192&Ot)==128&&(Yt=(15&pe)<<12|(63&bt)<<6|63&Ot,Yt>2047&&(Yt<55296||Yt>57343)&&(Ne=Yt));break;case 4:bt=h[J+1],Ot=h[J+2],Ft=h[J+3],(192&bt)==128&&(192&Ot)==128&&(192&Ft)==128&&(Yt=(15&pe)<<18|(63&bt)<<12|(63&Ot)<<6|63&Ft,Yt>65535&&Yt<1114112&&(Ne=Yt))}}Ne===null?(Ne=65533,tt=1):Ne>65535&&(Ne-=65536,M.push(Ne>>>10&1023|55296),Ne=56320|1023&Ne),M.push(Ne),J+=tt}return function(pe){let Ne=pe.length;if(Ne<=P)return String.fromCharCode.apply(String,pe);let tt="",bt=0;for(;bt<Ne;)tt+=String.fromCharCode.apply(String,pe.slice(bt,bt+=P));return tt}(M)}p.TYPED_ARRAY_SUPPORT=function(){try{let h=new Uint8Array(1),k={foo:function(){return 42}};return Object.setPrototypeOf(k,Uint8Array.prototype),Object.setPrototypeOf(h,k),h.foo()===42}catch{return!1}}(),p.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}}),p.poolSize=8192,p.from=function(h,k,U){return A(h,k,U)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array),p.alloc=function(h,k,U){return function(M,J,pe){return L(M),M<=0?g(M):J!==void 0?typeof pe=="string"?g(M).fill(J,pe):g(M).fill(J):g(M)}(h,k,U)},p.allocUnsafe=function(h){return E(h)},p.allocUnsafeSlow=function(h){return E(h)},p.isBuffer=function(h){return h!=null&&h._isBuffer===!0&&h!==p.prototype},p.compare=function(h,k){if(c(h,Uint8Array)&&(h=p.from(h,h.offset,h.byteLength)),c(k,Uint8Array)&&(k=p.from(k,k.offset,k.byteLength)),!p.isBuffer(h)||!p.isBuffer(k))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(h===k)return 0;let U=h.length,M=k.length;for(let J=0,pe=Math.min(U,M);J<pe;++J)if(h[J]!==k[J]){U=h[J],M=k[J];break}return U<M?-1:M<U?1:0},p.isEncoding=function(h){switch(String(h).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}},p.concat=function(h,k){if(!Array.isArray(h))throw new TypeError('"list" argument must be an Array of Buffers');if(h.length===0)return p.alloc(0);let U;if(k===void 0)for(k=0,U=0;U<h.length;++U)k+=h[U].length;let M=p.allocUnsafe(k),J=0;for(U=0;U<h.length;++U){let pe=h[U];if(c(pe,Uint8Array))J+pe.length>M.length?(p.isBuffer(pe)||(pe=p.from(pe)),pe.copy(M,J)):Uint8Array.prototype.set.call(M,pe,J);else{if(!p.isBuffer(pe))throw new TypeError('"list" argument must be an Array of Buffers');pe.copy(M,J)}J+=pe.length}return M},p.byteLength=j,p.prototype._isBuffer=!0,p.prototype.swap16=function(){let h=this.length;if(h%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let k=0;k<h;k+=2)Y(this,k,k+1);return this},p.prototype.swap32=function(){let h=this.length;if(h%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let k=0;k<h;k+=4)Y(this,k,k+3),Y(this,k+1,k+2);return this},p.prototype.swap64=function(){let h=this.length;if(h%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let k=0;k<h;k+=8)Y(this,k,k+7),Y(this,k+1,k+6),Y(this,k+2,k+5),Y(this,k+3,k+4);return this},p.prototype.toString=function(){let h=this.length;return h===0?"":arguments.length===0?m(this,0,h):V.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(h){if(!p.isBuffer(h))throw new TypeError("Argument must be a Buffer");return this===h||p.compare(this,h)===0},p.prototype.inspect=function(){let h="",k=r.IS;return h=this.toString("hex",0,k).replace(/(.{2})/g,"$1 ").trim(),this.length>k&&(h+=" ... "),"<Buffer "+h+">"},T&&(p.prototype[T]=p.prototype.inspect),p.prototype.compare=function(h,k,U,M,J){if(c(h,Uint8Array)&&(h=p.from(h,h.offset,h.byteLength)),!p.isBuffer(h))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof h);if(k===void 0&&(k=0),U===void 0&&(U=h?h.length:0),M===void 0&&(M=0),J===void 0&&(J=this.length),k<0||U>h.length||M<0||J>this.length)throw new RangeError("out of range index");if(M>=J&&k>=U)return 0;if(M>=J)return-1;if(k>=U)return 1;if(this===h)return 0;let pe=(J>>>=0)-(M>>>=0),Ne=(U>>>=0)-(k>>>=0),tt=Math.min(pe,Ne),bt=this.slice(M,J),Ot=h.slice(k,U);for(let Ft=0;Ft<tt;++Ft)if(bt[Ft]!==Ot[Ft]){pe=bt[Ft],Ne=Ot[Ft];break}return pe<Ne?-1:Ne<pe?1:0},p.prototype.includes=function(h,k,U){return this.indexOf(h,k,U)!==-1},p.prototype.indexOf=function(h,k,U){return me(this,h,k,U,!0)},p.prototype.lastIndexOf=function(h,k,U){return me(this,h,k,U,!1)},p.prototype.write=function(h,k,U,M){if(k===void 0)M="utf8",U=this.length,k=0;else if(U===void 0&&typeof k=="string")M=k,U=this.length,k=0;else{if(!isFinite(k))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");k>>>=0,isFinite(U)?(U>>>=0,M===void 0&&(M="utf8")):(M=U,U=void 0)}let J=this.length-k;if((U===void 0||U>J)&&(U=J),h.length>0&&(U<0||k<0)||k>this.length)throw new RangeError("Attempt to write outside buffer bounds");M||(M="utf8");let pe=!1;for(;;)switch(M){case"hex":return C(this,h,k,U);case"utf8":case"utf-8":return q(this,h,k,U);case"ascii":case"latin1":case"binary":return X(this,h,k,U);case"base64":return ae(this,h,k,U);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,h,k,U);default:if(pe)throw new TypeError("Unknown encoding: "+M);M=(""+M).toLowerCase(),pe=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};let P=4096;function l(h,k,U){let M="";U=Math.min(h.length,U);for(let J=k;J<U;++J)M+=String.fromCharCode(127&h[J]);return M}function x(h,k,U){let M="";U=Math.min(h.length,U);for(let J=k;J<U;++J)M+=String.fromCharCode(h[J]);return M}function W(h,k,U){let M=h.length;(!k||k<0)&&(k=0),(!U||U<0||U>M)&&(U=M);let J="";for(let pe=k;pe<U;++pe)J+=v[h[pe]];return J}function K(h,k,U){let M=h.slice(k,U),J="";for(let pe=0;pe<M.length-1;pe+=2)J+=String.fromCharCode(M[pe]+256*M[pe+1]);return J}function re(h,k,U){if(h%1!=0||h<0)throw new RangeError("offset is not uint");if(h+k>U)throw new RangeError("Trying to access beyond buffer length")}function oe(h,k,U,M,J,pe){if(!p.isBuffer(h))throw new TypeError('"buffer" argument must be a Buffer instance');if(k>J||k<pe)throw new RangeError('"value" argument is out of bounds');if(U+M>h.length)throw new RangeError("Index out of range")}function Ee(h,k,U,M,J){We(k,M,J,h,U,7);let pe=Number(k&BigInt(4294967295));h[U++]=pe,pe>>=8,h[U++]=pe,pe>>=8,h[U++]=pe,pe>>=8,h[U++]=pe;let Ne=Number(k>>BigInt(32)&BigInt(4294967295));return h[U++]=Ne,Ne>>=8,h[U++]=Ne,Ne>>=8,h[U++]=Ne,Ne>>=8,h[U++]=Ne,U}function Fe(h,k,U,M,J){We(k,M,J,h,U,7);let pe=Number(k&BigInt(4294967295));h[U+7]=pe,pe>>=8,h[U+6]=pe,pe>>=8,h[U+5]=pe,pe>>=8,h[U+4]=pe;let Ne=Number(k>>BigInt(32)&BigInt(4294967295));return h[U+3]=Ne,Ne>>=8,h[U+2]=Ne,Ne>>=8,h[U+1]=Ne,Ne>>=8,h[U]=Ne,U+8}function Oe(h,k,U,M,J,pe){if(U+M>h.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("Index out of range")}function $(h,k,U,M,J){return k=+k,U>>>=0,J||Oe(h,0,U,4),b.write(h,k,U,M,23,4),U+4}function de(h,k,U,M,J){return k=+k,U>>>=0,J||Oe(h,0,U,8),b.write(h,k,U,M,52,8),U+8}p.prototype.slice=function(h,k){let U=this.length;(h=~~h)<0?(h+=U)<0&&(h=0):h>U&&(h=U),(k=k===void 0?U:~~k)<0?(k+=U)<0&&(k=0):k>U&&(k=U),k<h&&(k=h);let M=this.subarray(h,k);return Object.setPrototypeOf(M,p.prototype),M},p.prototype.readUintLE=p.prototype.readUIntLE=function(h,k,U){h>>>=0,k>>>=0,U||re(h,k,this.length);let M=this[h],J=1,pe=0;for(;++pe<k&&(J*=256);)M+=this[h+pe]*J;return M},p.prototype.readUintBE=p.prototype.readUIntBE=function(h,k,U){h>>>=0,k>>>=0,U||re(h,k,this.length);let M=this[h+--k],J=1;for(;k>0&&(J*=256);)M+=this[h+--k]*J;return M},p.prototype.readUint8=p.prototype.readUInt8=function(h,k){return h>>>=0,k||re(h,1,this.length),this[h]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(h,k){return h>>>=0,k||re(h,2,this.length),this[h]|this[h+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(h,k){return h>>>=0,k||re(h,2,this.length),this[h]<<8|this[h+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(h,k){return h>>>=0,k||re(h,4,this.length),(this[h]|this[h+1]<<8|this[h+2]<<16)+16777216*this[h+3]},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(h,k){return h>>>=0,k||re(h,4,this.length),16777216*this[h]+(this[h+1]<<16|this[h+2]<<8|this[h+3])},p.prototype.readBigUInt64LE=B(function(h){et(h>>>=0,"offset");let k=this[h],U=this[h+7];k!==void 0&&U!==void 0||Be(h,this.length-8);let M=k+256*this[++h]+65536*this[++h]+this[++h]*2**24,J=this[++h]+256*this[++h]+65536*this[++h]+U*2**24;return BigInt(M)+(BigInt(J)<<BigInt(32))}),p.prototype.readBigUInt64BE=B(function(h){et(h>>>=0,"offset");let k=this[h],U=this[h+7];k!==void 0&&U!==void 0||Be(h,this.length-8);let M=k*2**24+65536*this[++h]+256*this[++h]+this[++h],J=this[++h]*2**24+65536*this[++h]+256*this[++h]+U;return(BigInt(M)<<BigInt(32))+BigInt(J)}),p.prototype.readIntLE=function(h,k,U){h>>>=0,k>>>=0,U||re(h,k,this.length);let M=this[h],J=1,pe=0;for(;++pe<k&&(J*=256);)M+=this[h+pe]*J;return J*=128,M>=J&&(M-=Math.pow(2,8*k)),M},p.prototype.readIntBE=function(h,k,U){h>>>=0,k>>>=0,U||re(h,k,this.length);let M=k,J=1,pe=this[h+--M];for(;M>0&&(J*=256);)pe+=this[h+--M]*J;return J*=128,pe>=J&&(pe-=Math.pow(2,8*k)),pe},p.prototype.readInt8=function(h,k){return h>>>=0,k||re(h,1,this.length),128&this[h]?-1*(255-this[h]+1):this[h]},p.prototype.readInt16LE=function(h,k){h>>>=0,k||re(h,2,this.length);let U=this[h]|this[h+1]<<8;return 32768&U?4294901760|U:U},p.prototype.readInt16BE=function(h,k){h>>>=0,k||re(h,2,this.length);let U=this[h+1]|this[h]<<8;return 32768&U?4294901760|U:U},p.prototype.readInt32LE=function(h,k){return h>>>=0,k||re(h,4,this.length),this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24},p.prototype.readInt32BE=function(h,k){return h>>>=0,k||re(h,4,this.length),this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]},p.prototype.readBigInt64LE=B(function(h){et(h>>>=0,"offset");let k=this[h],U=this[h+7];k!==void 0&&U!==void 0||Be(h,this.length-8);let M=this[h+4]+256*this[h+5]+65536*this[h+6]+(U<<24);return(BigInt(M)<<BigInt(32))+BigInt(k+256*this[++h]+65536*this[++h]+this[++h]*16777216)}),p.prototype.readBigInt64BE=B(function(h){et(h>>>=0,"offset");let k=this[h],U=this[h+7];k!==void 0&&U!==void 0||Be(h,this.length-8);let M=(k<<24)+65536*this[++h]+256*this[++h]+this[++h];return(BigInt(M)<<BigInt(32))+BigInt(this[++h]*16777216+65536*this[++h]+256*this[++h]+U)}),p.prototype.readFloatLE=function(h,k){return h>>>=0,k||re(h,4,this.length),b.read(this,h,!0,23,4)},p.prototype.readFloatBE=function(h,k){return h>>>=0,k||re(h,4,this.length),b.read(this,h,!1,23,4)},p.prototype.readDoubleLE=function(h,k){return h>>>=0,k||re(h,8,this.length),b.read(this,h,!0,52,8)},p.prototype.readDoubleBE=function(h,k){return h>>>=0,k||re(h,8,this.length),b.read(this,h,!1,52,8)},p.prototype.writeUintLE=p.prototype.writeUIntLE=function(h,k,U,M){h=+h,k>>>=0,U>>>=0,M||oe(this,h,k,U,Math.pow(2,8*U)-1,0);let J=1,pe=0;for(this[k]=255&h;++pe<U&&(J*=256);)this[k+pe]=h/J&255;return k+U},p.prototype.writeUintBE=p.prototype.writeUIntBE=function(h,k,U,M){h=+h,k>>>=0,U>>>=0,M||oe(this,h,k,U,Math.pow(2,8*U)-1,0);let J=U-1,pe=1;for(this[k+J]=255&h;--J>=0&&(pe*=256);)this[k+J]=h/pe&255;return k+U},p.prototype.writeUint8=p.prototype.writeUInt8=function(h,k,U){return h=+h,k>>>=0,U||oe(this,h,k,1,255,0),this[k]=255&h,k+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(h,k,U){return h=+h,k>>>=0,U||oe(this,h,k,2,65535,0),this[k]=255&h,this[k+1]=h>>>8,k+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(h,k,U){return h=+h,k>>>=0,U||oe(this,h,k,2,65535,0),this[k]=h>>>8,this[k+1]=255&h,k+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(h,k,U){return h=+h,k>>>=0,U||oe(this,h,k,4,4294967295,0),this[k+3]=h>>>24,this[k+2]=h>>>16,this[k+1]=h>>>8,this[k]=255&h,k+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(h,k,U){return h=+h,k>>>=0,U||oe(this,h,k,4,4294967295,0),this[k]=h>>>24,this[k+1]=h>>>16,this[k+2]=h>>>8,this[k+3]=255&h,k+4},p.prototype.writeBigUInt64LE=B(function(h,k=0){return Ee(this,h,k,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeBigUInt64BE=B(function(h,k=0){return Fe(this,h,k,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeIntLE=function(h,k,U,M){if(h=+h,k>>>=0,!M){let tt=Math.pow(2,8*U-1);oe(this,h,k,U,tt-1,-tt)}let J=0,pe=1,Ne=0;for(this[k]=255&h;++J<U&&(pe*=256);)h<0&&Ne===0&&this[k+J-1]!==0&&(Ne=1),this[k+J]=(h/pe|0)-Ne&255;return k+U},p.prototype.writeIntBE=function(h,k,U,M){if(h=+h,k>>>=0,!M){let tt=Math.pow(2,8*U-1);oe(this,h,k,U,tt-1,-tt)}let J=U-1,pe=1,Ne=0;for(this[k+J]=255&h;--J>=0&&(pe*=256);)h<0&&Ne===0&&this[k+J+1]!==0&&(Ne=1),this[k+J]=(h/pe|0)-Ne&255;return k+U},p.prototype.writeInt8=function(h,k,U){return h=+h,k>>>=0,U||oe(this,h,k,1,127,-128),h<0&&(h=255+h+1),this[k]=255&h,k+1},p.prototype.writeInt16LE=function(h,k,U){return h=+h,k>>>=0,U||oe(this,h,k,2,32767,-32768),this[k]=255&h,this[k+1]=h>>>8,k+2},p.prototype.writeInt16BE=function(h,k,U){return h=+h,k>>>=0,U||oe(this,h,k,2,32767,-32768),this[k]=h>>>8,this[k+1]=255&h,k+2},p.prototype.writeInt32LE=function(h,k,U){return h=+h,k>>>=0,U||oe(this,h,k,4,2147483647,-2147483648),this[k]=255&h,this[k+1]=h>>>8,this[k+2]=h>>>16,this[k+3]=h>>>24,k+4},p.prototype.writeInt32BE=function(h,k,U){return h=+h,k>>>=0,U||oe(this,h,k,4,2147483647,-2147483648),h<0&&(h=4294967295+h+1),this[k]=h>>>24,this[k+1]=h>>>16,this[k+2]=h>>>8,this[k+3]=255&h,k+4},p.prototype.writeBigInt64LE=B(function(h,k=0){return Ee(this,h,k,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),p.prototype.writeBigInt64BE=B(function(h,k=0){return Fe(this,h,k,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),p.prototype.writeFloatLE=function(h,k,U){return $(this,h,k,!0,U)},p.prototype.writeFloatBE=function(h,k,U){return $(this,h,k,!1,U)},p.prototype.writeDoubleLE=function(h,k,U){return de(this,h,k,!0,U)},p.prototype.writeDoubleBE=function(h,k,U){return de(this,h,k,!1,U)},p.prototype.copy=function(h,k,U,M){if(!p.isBuffer(h))throw new TypeError("argument should be a Buffer");if(U||(U=0),M||M===0||(M=this.length),k>=h.length&&(k=h.length),k||(k=0),M>0&&M<U&&(M=U),M===U||h.length===0||this.length===0)return 0;if(k<0)throw new RangeError("targetStart out of bounds");if(U<0||U>=this.length)throw new RangeError("Index out of range");if(M<0)throw new RangeError("sourceEnd out of bounds");M>this.length&&(M=this.length),h.length-k<M-U&&(M=h.length-k+U);let J=M-U;return this===h&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(k,U,M):Uint8Array.prototype.set.call(h,this.subarray(U,M),k),J},p.prototype.fill=function(h,k,U,M){if(typeof h=="string"){if(typeof k=="string"?(M=k,k=0,U=this.length):typeof U=="string"&&(M=U,U=this.length),M!==void 0&&typeof M!="string")throw new TypeError("encoding must be a string");if(typeof M=="string"&&!p.isEncoding(M))throw new TypeError("Unknown encoding: "+M);if(h.length===1){let pe=h.charCodeAt(0);(M==="utf8"&&pe<128||M==="latin1")&&(h=pe)}}else typeof h=="number"?h&=255:typeof h=="boolean"&&(h=Number(h));if(k<0||this.length<k||this.length<U)throw new RangeError("Out of range index");if(U<=k)return this;let J;if(k>>>=0,U=U===void 0?this.length:U>>>0,h||(h=0),typeof h=="number")for(J=k;J<U;++J)this[J]=h;else{let pe=p.isBuffer(h)?h:p.from(h,M),Ne=pe.length;if(Ne===0)throw new TypeError('The value "'+h+'" is invalid for argument "value"');for(J=0;J<U-k;++J)this[J+k]=pe[J%Ne]}return this};let we={};function Qe(h,k,U){we[h]=class extends U{constructor(){super(),Object.defineProperty(this,"message",{value:k.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${h}]`,this.stack,delete this.name}get code(){return h}set code(M){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:M,writable:!0})}toString(){return`${this.name} [${h}]: ${this.message}`}}}function ze(h){let k="",U=h.length,M=h[0]==="-"?1:0;for(;U>=M+4;U-=3)k=`_${h.slice(U-3,U)}${k}`;return`${h.slice(0,U)}${k}`}function We(h,k,U,M,J,pe){if(h>U||h<k){let Ne=typeof k=="bigint"?"n":"",tt;throw tt=pe>3?k===0||k===BigInt(0)?`>= 0${Ne} and < 2${Ne} ** ${8*(pe+1)}${Ne}`:`>= -(2${Ne} ** ${8*(pe+1)-1}${Ne}) and < 2 ** ${8*(pe+1)-1}${Ne}`:`>= ${k}${Ne} and <= ${U}${Ne}`,new we.ERR_OUT_OF_RANGE("value",tt,h)}(function(Ne,tt,bt){et(tt,"offset"),Ne[tt]!==void 0&&Ne[tt+bt]!==void 0||Be(tt,Ne.length-(bt+1))})(M,J,pe)}function et(h,k){if(typeof h!="number")throw new we.ERR_INVALID_ARG_TYPE(k,"number",h)}function Be(h,k,U){throw Math.floor(h)!==h?(et(h,U),new we.ERR_OUT_OF_RANGE(U||"offset","an integer",h)):k<0?new we.ERR_BUFFER_OUT_OF_BOUNDS:new we.ERR_OUT_OF_RANGE(U||"offset",`>= ${U?1:0} and <= ${k}`,h)}Qe("ERR_BUFFER_OUT_OF_BOUNDS",function(h){return h?`${h} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Qe("ERR_INVALID_ARG_TYPE",function(h,k){return`The "${h}" argument must be of type number. Received type ${typeof k}`},TypeError),Qe("ERR_OUT_OF_RANGE",function(h,k,U){let M=`The value of "${h}" is out of range.`,J=U;return Number.isInteger(U)&&Math.abs(U)>4294967296?J=ze(String(U)):typeof U=="bigint"&&(J=String(U),(U>BigInt(2)**BigInt(32)||U<-(BigInt(2)**BigInt(32)))&&(J=ze(J)),J+="n"),M+=` It must be ${k}. Received ${J}`,M},RangeError);let Re=/[^+/0-9A-Za-z-_]/g;function $e(h,k){let U;k=k||1/0;let M=h.length,J=null,pe=[];for(let Ne=0;Ne<M;++Ne){if(U=h.charCodeAt(Ne),U>55295&&U<57344){if(!J){if(U>56319){(k-=3)>-1&&pe.push(239,191,189);continue}if(Ne+1===M){(k-=3)>-1&&pe.push(239,191,189);continue}J=U;continue}if(U<56320){(k-=3)>-1&&pe.push(239,191,189),J=U;continue}U=65536+(J-55296<<10|U-56320)}else J&&(k-=3)>-1&&pe.push(239,191,189);if(J=null,U<128){if((k-=1)<0)break;pe.push(U)}else if(U<2048){if((k-=2)<0)break;pe.push(U>>6|192,63&U|128)}else if(U<65536){if((k-=3)<0)break;pe.push(U>>12|224,U>>6&63|128,63&U|128)}else{if(!(U<1114112))throw new Error("Invalid code point");if((k-=4)<0)break;pe.push(U>>18|240,U>>12&63|128,U>>6&63|128,63&U|128)}}return pe}function ve(h){return d.toByteArray(function(k){if((k=(k=k.split("=")[0]).trim().replace(Re,"")).length<2)return"";for(;k.length%4!=0;)k+="=";return k}(h))}function ue(h,k,U,M){let J;for(J=0;J<M&&!(J+U>=k.length||J>=h.length);++J)k[J+U]=h[J];return J}function c(h,k){return h instanceof k||h!=null&&h.constructor!=null&&h.constructor.name!=null&&h.constructor.name===k.name}function y(h){return h!=h}let v=function(){let h="0123456789abcdef",k=new Array(256);for(let U=0;U<16;++U){let M=16*U;for(let J=0;J<16;++J)k[M+J]=h[U]+h[J]}return k}();function B(h){return typeof BigInt>"u"?O:h}function O(){throw new Error("BigInt not supported")}},251:(u,r)=>{r.read=function(_,d,b,T,w){var g,p,A=8*w-T-1,L=(1<<A)-1,E=L>>1,N=-7,F=b?w-1:0,R=b?-1:1,j=_[d+F];for(F+=R,g=j&(1<<-N)-1,j>>=-N,N+=A;N>0;g=256*g+_[d+F],F+=R,N-=8);for(p=g&(1<<-N)-1,g>>=-N,N+=T;N>0;p=256*p+_[d+F],F+=R,N-=8);if(g===0)g=1-E;else{if(g===L)return p?NaN:1/0*(j?-1:1);p+=Math.pow(2,T),g-=E}return(j?-1:1)*p*Math.pow(2,g-T)},r.write=function(_,d,b,T,w,g){var p,A,L,E=8*g-w-1,N=(1<<E)-1,F=N>>1,R=w===23?Math.pow(2,-24)-Math.pow(2,-77):0,j=T?0:g-1,V=T?1:-1,Y=d<0||d===0&&1/d<0?1:0;for(d=Math.abs(d),isNaN(d)||d===1/0?(A=isNaN(d)?1:0,p=N):(p=Math.floor(Math.log(d)/Math.LN2),d*(L=Math.pow(2,-p))<1&&(p--,L*=2),(d+=p+F>=1?R/L:R*Math.pow(2,1-F))*L>=2&&(p++,L/=2),p+F>=N?(A=0,p=N):p+F>=1?(A=(d*L-1)*Math.pow(2,w),p+=F):(A=d*Math.pow(2,F-1)*Math.pow(2,w),p=0));w>=8;_[b+j]=255&A,j+=V,A/=256,w-=8);for(p=p<<w|A,E+=w;E>0;_[b+j]=255&p,j+=V,p/=256,E-=8);_[b+j-V]|=128*Y}}},s={};function f(u){var r=s[u];if(r!==void 0)return r.exports;var _=s[u]={exports:{}};return i[u](_,_.exports,f),_.exports}return f.d=(u,r)=>{for(var _ in r)f.o(r,_)&&!f.o(u,_)&&Object.defineProperty(u,_,{enumerable:!0,get:r[_]})},f.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),f.o=(u,r)=>Object.prototype.hasOwnProperty.call(u,r),f.r=u=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})},f(281)})(),o.exports=a()},2135:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Account=void 0;var s,f=(s=i(1242))&&s.__esModule?s:{default:s},u=i(7120);function r(b){return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},r(b)}function _(b,T){for(var w=0;w<T.length;w++){var g=T[w];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(b,d(g.key),g)}}function d(b){var T=function(w,g){if(r(w)!="object"||!w)return w;var p=w[Symbol.toPrimitive];if(p!==void 0){var A=p.call(w,g||"default");if(r(A)!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(w)}(b,"string");return r(T)=="symbol"?T:T+""}a.Account=function(){return b=function g(p,A){if(function(L,E){if(!(L instanceof E))throw new TypeError("Cannot call a class as a function")}(this,g),u.StrKey.isValidMed25519PublicKey(p))throw new Error("accountId is an M-address; use MuxedAccount instead");if(!u.StrKey.isValidEd25519PublicKey(p))throw new Error("accountId is invalid");if(typeof A!="string")throw new Error("sequence must be of type string");this._accountId=p,this.sequence=new f.default(A)},(T=[{key:"accountId",value:function(){return this._accountId}},{key:"sequenceNumber",value:function(){return this.sequence.toString()}},{key:"incrementSequenceNumber",value:function(){this.sequence=this.sequence.plus(1)}}])&&_(b.prototype,T),w&&_(b,w),Object.defineProperty(b,"prototype",{writable:!1}),b;var b,T,w}()},1180:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Address=void 0;var s,f=i(7120),u=(s=i(1918))&&s.__esModule?s:{default:s};function r(b){return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},r(b)}function _(b,T){for(var w=0;w<T.length;w++){var g=T[w];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(b,d(g.key),g)}}function d(b){var T=function(w,g){if(r(w)!="object"||!w)return w;var p=w[Symbol.toPrimitive];if(p!==void 0){var A=p.call(w,g||"default");if(r(A)!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(w)}(b,"string");return r(T)=="symbol"?T:T+""}a.Address=function(){function b(p){if(function(A,L){if(!(A instanceof L))throw new TypeError("Cannot call a class as a function")}(this,b),f.StrKey.isValidEd25519PublicKey(p))this._type="account",this._key=f.StrKey.decodeEd25519PublicKey(p);else{if(!f.StrKey.isValidContract(p))throw new Error("Unsupported address type");this._type="contract",this._key=f.StrKey.decodeContract(p)}}return T=b,g=[{key:"fromString",value:function(p){return new b(p)}},{key:"account",value:function(p){return new b(f.StrKey.encodeEd25519PublicKey(p))}},{key:"contract",value:function(p){return new b(f.StrKey.encodeContract(p))}},{key:"fromScVal",value:function(p){return b.fromScAddress(p.address())}},{key:"fromScAddress",value:function(p){switch(p.switch()){case u.default.ScAddressType.scAddressTypeAccount():return b.account(p.accountId().ed25519());case u.default.ScAddressType.scAddressTypeContract():return b.contract(p.contractId());default:throw new Error("Unsupported address type")}}}],(w=[{key:"toString",value:function(){switch(this._type){case"account":return f.StrKey.encodeEd25519PublicKey(this._key);case"contract":return f.StrKey.encodeContract(this._key);default:throw new Error("Unsupported address type")}}},{key:"toScVal",value:function(){return u.default.ScVal.scvAddress(this.toScAddress())}},{key:"toScAddress",value:function(){switch(this._type){case"account":return u.default.ScAddress.scAddressTypeAccount(u.default.PublicKey.publicKeyTypeEd25519(this._key));case"contract":return u.default.ScAddress.scAddressTypeContract(this._key);default:throw new Error("Unsupported address type")}}},{key:"toBuffer",value:function(){return this._key}}])&&_(T.prototype,w),g&&_(T,g),Object.defineProperty(T,"prototype",{writable:!1}),T;var T,w,g}()},1764:(o,a,i)=>{"use strict";var s=i(8287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.Asset=void 0;var f,u=i(645),r=(f=i(1918))&&f.__esModule?f:{default:f},_=i(6691),d=i(7120),b=i(9152);function T(A){return T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},T(A)}function w(A,L){for(var E=0;E<L.length;E++){var N=L[E];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(A,g(N.key),N)}}function g(A){var L=function(E,N){if(T(E)!="object"||!E)return E;var F=E[Symbol.toPrimitive];if(F!==void 0){var R=F.call(E,N||"default");if(T(R)!="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(N==="string"?String:Number)(E)}(A,"string");return T(L)=="symbol"?L:L+""}a.Asset=function(){function A(F,R){if(function(j,V){if(!(j instanceof V))throw new TypeError("Cannot call a class as a function")}(this,A),!/^[a-zA-Z0-9]{1,12}$/.test(F))throw new Error("Asset code is invalid (maximum alphanumeric, 12 characters at max)");if(String(F).toLowerCase()!=="xlm"&&!R)throw new Error("Issuer cannot be null");if(R&&!d.StrKey.isValidEd25519PublicKey(R))throw new Error("Issuer is invalid");String(F).toLowerCase()==="xlm"?this.code="XLM":this.code=F,this.issuer=R}return L=A,E=[{key:"toXDRObject",value:function(){return this._toXDRObject(r.default.Asset)}},{key:"toChangeTrustXDRObject",value:function(){return this._toXDRObject(r.default.ChangeTrustAsset)}},{key:"toTrustLineXDRObject",value:function(){return this._toXDRObject(r.default.TrustLineAsset)}},{key:"contractId",value:function(F){var R=(0,b.hash)(s.from(F)),j=r.default.HashIdPreimage.envelopeTypeContractId(new r.default.HashIdPreimageContractId({networkId:R,contractIdPreimage:r.default.ContractIdPreimage.contractIdPreimageFromAsset(this.toXDRObject())}));return d.StrKey.encodeContract((0,b.hash)(j.toXDR()))}},{key:"_toXDRObject",value:function(){var F,R,j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:r.default.Asset;if(this.isNative())return j.assetTypeNative();this.code.length<=4?(F=r.default.AlphaNum4,R="assetTypeCreditAlphanum4"):(F=r.default.AlphaNum12,R="assetTypeCreditAlphanum12");var V=this.code.length<=4?4:12;return new j(R,new F({assetCode:this.code.padEnd(V,"\0"),issuer:_.Keypair.fromPublicKey(this.issuer).xdrAccountId()}))}},{key:"getCode",value:function(){if(this.code!==void 0)return String(this.code)}},{key:"getIssuer",value:function(){if(this.issuer!==void 0)return String(this.issuer)}},{key:"getAssetType",value:function(){switch(this.getRawAssetType()){case r.default.AssetType.assetTypeNative():return"native";case r.default.AssetType.assetTypeCreditAlphanum4():return"credit_alphanum4";case r.default.AssetType.assetTypeCreditAlphanum12():return"credit_alphanum12";default:return"unknown"}}},{key:"getRawAssetType",value:function(){return this.isNative()?r.default.AssetType.assetTypeNative():this.code.length<=4?r.default.AssetType.assetTypeCreditAlphanum4():r.default.AssetType.assetTypeCreditAlphanum12()}},{key:"isNative",value:function(){return!this.issuer}},{key:"equals",value:function(F){return this.code===F.getCode()&&this.issuer===F.getIssuer()}},{key:"toString",value:function(){return this.isNative()?"native":"".concat(this.getCode(),":").concat(this.getIssuer())}}],N=[{key:"native",value:function(){return new A("XLM")}},{key:"fromOperation",value:function(F){var R,j;switch(F.switch()){case r.default.AssetType.assetTypeNative():return this.native();case r.default.AssetType.assetTypeCreditAlphanum4():R=F.alphaNum4();case r.default.AssetType.assetTypeCreditAlphanum12():return R=R||F.alphaNum12(),j=d.StrKey.encodeEd25519PublicKey(R.issuer().ed25519()),new this((0,u.trimEnd)(R.assetCode(),"\0"),j);default:throw new Error("Invalid asset type: ".concat(F.switch().name))}}},{key:"compare",value:function(F,R){if(!(F&&F instanceof A))throw new Error("assetA is invalid");if(!(R&&R instanceof A))throw new Error("assetB is invalid");if(F.equals(R))return 0;var j=F.getRawAssetType().value,V=R.getRawAssetType().value;if(j!==V)return j<V?-1:1;var Y=p(F.getCode(),R.getCode());return Y!==0?Y:p(F.getIssuer(),R.getIssuer())}}],E&&w(L.prototype,E),N&&w(L,N),Object.defineProperty(L,"prototype",{writable:!1}),L;var L,E,N}();function p(A,L){return s.compare(s.from(A,"ascii"),s.from(L,"ascii"))}},5328:(o,a,i)=>{"use strict";var s=i(8287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.authorizeEntry=L,a.authorizeInvocation=function(N,F,R){var j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"",V=arguments.length>4&&arguments[4]!==void 0?arguments[4]:d.Networks.FUTURENET,Y=r.Keypair.random().rawPublicKey(),me=new u.default.Int64((C=Y,C.subarray(0,8).reduce(function(q,X){return q<<8|X},0))),le=j||N.publicKey(),C;if(!le)throw new Error("authorizeInvocation requires publicKey parameter");return L(new u.default.SorobanAuthorizationEntry({rootInvocation:R,credentials:u.default.SorobanCredentials.sorobanCredentialsAddress(new u.default.SorobanAddressCredentials({address:new T.Address(le).toScAddress(),nonce:me,signatureExpirationLedger:0,signature:u.default.ScVal.scvVec([])}))}),N,F,V)};var f,u=(f=i(1918))&&f.__esModule?f:{default:f},r=i(6691),_=i(7120),d=i(6202),b=i(9152),T=i(1180),w=i(7177);function g(N){return g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},g(N)}function p(){p=function(){return F};var N,F={},R=Object.prototype,j=R.hasOwnProperty,V=Object.defineProperty||function(Be,Re,$e){Be[Re]=$e.value},Y=typeof Symbol=="function"?Symbol:{},me=Y.iterator||"@@iterator",le=Y.asyncIterator||"@@asyncIterator",C=Y.toStringTag||"@@toStringTag";function q(Be,Re,$e){return Object.defineProperty(Be,Re,{value:$e,enumerable:!0,configurable:!0,writable:!0}),Be[Re]}try{q({},"")}catch{q=function(Re,$e,ve){return Re[$e]=ve}}function X(Be,Re,$e,ve){var ue=Re&&Re.prototype instanceof x?Re:x,c=Object.create(ue.prototype),y=new We(ve||[]);return V(c,"_invoke",{value:de(Be,$e,y)}),c}function ae(Be,Re,$e){try{return{type:"normal",arg:Be.call(Re,$e)}}catch(ve){return{type:"throw",arg:ve}}}F.wrap=X;var I="suspendedStart",S="suspendedYield",m="executing",P="completed",l={};function x(){}function W(){}function K(){}var re={};q(re,me,function(){return this});var oe=Object.getPrototypeOf,Ee=oe&&oe(oe(et([])));Ee&&Ee!==R&&j.call(Ee,me)&&(re=Ee);var Fe=K.prototype=x.prototype=Object.create(re);function Oe(Be){["next","throw","return"].forEach(function(Re){q(Be,Re,function($e){return this._invoke(Re,$e)})})}function $(Be,Re){function $e(ue,c,y,v){var B=ae(Be[ue],Be,c);if(B.type!=="throw"){var O=B.arg,h=O.value;return h&&g(h)=="object"&&j.call(h,"__await")?Re.resolve(h.__await).then(function(k){$e("next",k,y,v)},function(k){$e("throw",k,y,v)}):Re.resolve(h).then(function(k){O.value=k,y(O)},function(k){return $e("throw",k,y,v)})}v(B.arg)}var ve;V(this,"_invoke",{value:function(ue,c){function y(){return new Re(function(v,B){$e(ue,c,v,B)})}return ve=ve?ve.then(y,y):y()}})}function de(Be,Re,$e){var ve=I;return function(ue,c){if(ve===m)throw Error("Generator is already running");if(ve===P){if(ue==="throw")throw c;return{value:N,done:!0}}for($e.method=ue,$e.arg=c;;){var y=$e.delegate;if(y){var v=we(y,$e);if(v){if(v===l)continue;return v}}if($e.method==="next")$e.sent=$e._sent=$e.arg;else if($e.method==="throw"){if(ve===I)throw ve=P,$e.arg;$e.dispatchException($e.arg)}else $e.method==="return"&&$e.abrupt("return",$e.arg);ve=m;var B=ae(Be,Re,$e);if(B.type==="normal"){if(ve=$e.done?P:S,B.arg===l)continue;return{value:B.arg,done:$e.done}}B.type==="throw"&&(ve=P,$e.method="throw",$e.arg=B.arg)}}}function we(Be,Re){var $e=Re.method,ve=Be.iterator[$e];if(ve===N)return Re.delegate=null,$e==="throw"&&Be.iterator.return&&(Re.method="return",Re.arg=N,we(Be,Re),Re.method==="throw")||$e!=="return"&&(Re.method="throw",Re.arg=new TypeError("The iterator does not provide a '"+$e+"' method")),l;var ue=ae(ve,Be.iterator,Re.arg);if(ue.type==="throw")return Re.method="throw",Re.arg=ue.arg,Re.delegate=null,l;var c=ue.arg;return c?c.done?(Re[Be.resultName]=c.value,Re.next=Be.nextLoc,Re.method!=="return"&&(Re.method="next",Re.arg=N),Re.delegate=null,l):c:(Re.method="throw",Re.arg=new TypeError("iterator result is not an object"),Re.delegate=null,l)}function Qe(Be){var Re={tryLoc:Be[0]};1 in Be&&(Re.catchLoc=Be[1]),2 in Be&&(Re.finallyLoc=Be[2],Re.afterLoc=Be[3]),this.tryEntries.push(Re)}function ze(Be){var Re=Be.completion||{};Re.type="normal",delete Re.arg,Be.completion=Re}function We(Be){this.tryEntries=[{tryLoc:"root"}],Be.forEach(Qe,this),this.reset(!0)}function et(Be){if(Be||Be===""){var Re=Be[me];if(Re)return Re.call(Be);if(typeof Be.next=="function")return Be;if(!isNaN(Be.length)){var $e=-1,ve=function ue(){for(;++$e<Be.length;)if(j.call(Be,$e))return ue.value=Be[$e],ue.done=!1,ue;return ue.value=N,ue.done=!0,ue};return ve.next=ve}}throw new TypeError(g(Be)+" is not iterable")}return W.prototype=K,V(Fe,"constructor",{value:K,configurable:!0}),V(K,"constructor",{value:W,configurable:!0}),W.displayName=q(K,C,"GeneratorFunction"),F.isGeneratorFunction=function(Be){var Re=typeof Be=="function"&&Be.constructor;return!!Re&&(Re===W||(Re.displayName||Re.name)==="GeneratorFunction")},F.mark=function(Be){return Object.setPrototypeOf?Object.setPrototypeOf(Be,K):(Be.__proto__=K,q(Be,C,"GeneratorFunction")),Be.prototype=Object.create(Fe),Be},F.awrap=function(Be){return{__await:Be}},Oe($.prototype),q($.prototype,le,function(){return this}),F.AsyncIterator=$,F.async=function(Be,Re,$e,ve,ue){ue===void 0&&(ue=Promise);var c=new $(X(Be,Re,$e,ve),ue);return F.isGeneratorFunction(Re)?c:c.next().then(function(y){return y.done?y.value:c.next()})},Oe(Fe),q(Fe,C,"Generator"),q(Fe,me,function(){return this}),q(Fe,"toString",function(){return"[object Generator]"}),F.keys=function(Be){var Re=Object(Be),$e=[];for(var ve in Re)$e.push(ve);return $e.reverse(),function ue(){for(;$e.length;){var c=$e.pop();if(c in Re)return ue.value=c,ue.done=!1,ue}return ue.done=!0,ue}},F.values=et,We.prototype={constructor:We,reset:function(Be){if(this.prev=0,this.next=0,this.sent=this._sent=N,this.done=!1,this.delegate=null,this.method="next",this.arg=N,this.tryEntries.forEach(ze),!Be)for(var Re in this)Re.charAt(0)==="t"&&j.call(this,Re)&&!isNaN(+Re.slice(1))&&(this[Re]=N)},stop:function(){this.done=!0;var Be=this.tryEntries[0].completion;if(Be.type==="throw")throw Be.arg;return this.rval},dispatchException:function(Be){if(this.done)throw Be;var Re=this;function $e(B,O){return c.type="throw",c.arg=Be,Re.next=B,O&&(Re.method="next",Re.arg=N),!!O}for(var ve=this.tryEntries.length-1;ve>=0;--ve){var ue=this.tryEntries[ve],c=ue.completion;if(ue.tryLoc==="root")return $e("end");if(ue.tryLoc<=this.prev){var y=j.call(ue,"catchLoc"),v=j.call(ue,"finallyLoc");if(y&&v){if(this.prev<ue.catchLoc)return $e(ue.catchLoc,!0);if(this.prev<ue.finallyLoc)return $e(ue.finallyLoc)}else if(y){if(this.prev<ue.catchLoc)return $e(ue.catchLoc,!0)}else{if(!v)throw Error("try statement without catch or finally");if(this.prev<ue.finallyLoc)return $e(ue.finallyLoc)}}}},abrupt:function(Be,Re){for(var $e=this.tryEntries.length-1;$e>=0;--$e){var ve=this.tryEntries[$e];if(ve.tryLoc<=this.prev&&j.call(ve,"finallyLoc")&&this.prev<ve.finallyLoc){var ue=ve;break}}ue&&(Be==="break"||Be==="continue")&&ue.tryLoc<=Re&&Re<=ue.finallyLoc&&(ue=null);var c=ue?ue.completion:{};return c.type=Be,c.arg=Re,ue?(this.method="next",this.next=ue.finallyLoc,l):this.complete(c)},complete:function(Be,Re){if(Be.type==="throw")throw Be.arg;return Be.type==="break"||Be.type==="continue"?this.next=Be.arg:Be.type==="return"?(this.rval=this.arg=Be.arg,this.method="return",this.next="end"):Be.type==="normal"&&Re&&(this.next=Re),l},finish:function(Be){for(var Re=this.tryEntries.length-1;Re>=0;--Re){var $e=this.tryEntries[Re];if($e.finallyLoc===Be)return this.complete($e.completion,$e.afterLoc),ze($e),l}},catch:function(Be){for(var Re=this.tryEntries.length-1;Re>=0;--Re){var $e=this.tryEntries[Re];if($e.tryLoc===Be){var ve=$e.completion;if(ve.type==="throw"){var ue=ve.arg;ze($e)}return ue}}throw Error("illegal catch attempt")},delegateYield:function(Be,Re,$e){return this.delegate={iterator:et(Be),resultName:Re,nextLoc:$e},this.method==="next"&&(this.arg=N),l}},F}function A(N,F,R,j,V,Y,me){try{var le=N[Y](me),C=le.value}catch(q){return void R(q)}le.done?F(C):Promise.resolve(C).then(j,V)}function L(N,F,R){return E.apply(this,arguments)}function E(){var N;return N=p().mark(function F(R,j,V){var Y,me,le,C,q,X,ae,I,S,m=arguments;return p().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(Y=m.length>3&&m[3]!==void 0?m[3]:d.Networks.FUTURENET,R.credentials().switch().value===u.default.SorobanCredentialsType.sorobanCredentialsAddress().value){P.next=3;break}return P.abrupt("return",R);case 3:if(me=u.default.SorobanAuthorizationEntry.fromXDR(R.toXDR()),(le=me.credentials().address()).signatureExpirationLedger(V),C=(0,b.hash)(s.from(Y)),q=u.default.HashIdPreimage.envelopeTypeSorobanAuthorization(new u.default.HashIdPreimageSorobanAuthorization({networkId:C,nonce:le.nonce(),invocation:me.rootInvocation(),signatureExpirationLedger:le.signatureExpirationLedger()})),X=(0,b.hash)(q.toXDR()),typeof j!="function"){P.next=17;break}return P.t0=s,P.next=13,j(q);case 13:P.t1=P.sent,ae=P.t0.from.call(P.t0,P.t1),P.next=18;break;case 17:ae=s.from(j.sign(X));case 18:if(I=T.Address.fromScAddress(le.address()).toString(),r.Keypair.fromPublicKey(I).verify(X,ae)){P.next=21;break}throw new Error("signature doesn't match payload");case 21:return S=(0,w.nativeToScVal)({public_key:_.StrKey.decodeEd25519PublicKey(I),signature:ae},{type:{public_key:["symbol",null],signature:["symbol",null]}}),le.signature(u.default.ScVal.scvVec([S])),P.abrupt("return",me);case 24:case"end":return P.stop()}},F)}),E=function(){var F=this,R=arguments;return new Promise(function(j,V){var Y=N.apply(F,R);function me(C){A(Y,j,V,me,le,"next",C)}function le(C){A(Y,j,V,me,le,"throw",C)}me(void 0)})},E.apply(this,arguments)}},1387:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Claimant=void 0;var s,f=(s=i(1918))&&s.__esModule?s:{default:s},u=i(6691),r=i(7120);function _(T){return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},_(T)}function d(T,w){for(var g=0;g<w.length;g++){var p=w[g];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(T,b(p.key),p)}}function b(T){var w=function(g,p){if(_(g)!="object"||!g)return g;var A=g[Symbol.toPrimitive];if(A!==void 0){var L=A.call(g,p||"default");if(_(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(g)}(T,"string");return _(w)=="symbol"?w:w+""}a.Claimant=function(){return T=function p(A,L){if(function(E,N){if(!(E instanceof N))throw new TypeError("Cannot call a class as a function")}(this,p),A&&!r.StrKey.isValidEd25519PublicKey(A))throw new Error("Destination is invalid");if(this._destination=A,L){if(!(L instanceof f.default.ClaimPredicate))throw new Error("Predicate should be an xdr.ClaimPredicate");this._predicate=L}else this._predicate=f.default.ClaimPredicate.claimPredicateUnconditional()},g=[{key:"predicateUnconditional",value:function(){return f.default.ClaimPredicate.claimPredicateUnconditional()}},{key:"predicateAnd",value:function(p,A){if(!(p instanceof f.default.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(A instanceof f.default.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return f.default.ClaimPredicate.claimPredicateAnd([p,A])}},{key:"predicateOr",value:function(p,A){if(!(p instanceof f.default.ClaimPredicate))throw new Error("left Predicate should be an xdr.ClaimPredicate");if(!(A instanceof f.default.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return f.default.ClaimPredicate.claimPredicateOr([p,A])}},{key:"predicateNot",value:function(p){if(!(p instanceof f.default.ClaimPredicate))throw new Error("right Predicate should be an xdr.ClaimPredicate");return f.default.ClaimPredicate.claimPredicateNot(p)}},{key:"predicateBeforeAbsoluteTime",value:function(p){return f.default.ClaimPredicate.claimPredicateBeforeAbsoluteTime(f.default.Int64.fromString(p))}},{key:"predicateBeforeRelativeTime",value:function(p){return f.default.ClaimPredicate.claimPredicateBeforeRelativeTime(f.default.Int64.fromString(p))}},{key:"fromXDR",value:function(p){var A;if(p.switch()===f.default.ClaimantType.claimantTypeV0())return A=p.v0(),new this(r.StrKey.encodeEd25519PublicKey(A.destination().ed25519()),A.predicate());throw new Error("Invalid claimant type: ".concat(p.switch().name))}}],(w=[{key:"toXDRObject",value:function(){var p=new f.default.ClaimantV0({destination:u.Keypair.fromPublicKey(this._destination).xdrAccountId(),predicate:this._predicate});return f.default.Claimant.claimantTypeV0(p)}},{key:"destination",get:function(){return this._destination},set:function(p){throw new Error("Claimant is immutable")}},{key:"predicate",get:function(){return this._predicate},set:function(p){throw new Error("Claimant is immutable")}}])&&d(T.prototype,w),g&&d(T,g),Object.defineProperty(T,"prototype",{writable:!1}),T;var T,w,g}()},7452:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Contract=void 0;var s,f=i(1180),u=i(7237),r=(s=i(1918))&&s.__esModule?s:{default:s},_=i(7120);function d(w){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},d(w)}function b(w,g){for(var p=0;p<g.length;p++){var A=g[p];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,T(A.key),A)}}function T(w){var g=function(p,A){if(d(p)!="object"||!p)return p;var L=p[Symbol.toPrimitive];if(L!==void 0){var E=L.call(p,A||"default");if(d(E)!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(p)}(w,"string");return d(g)=="symbol"?g:g+""}a.Contract=function(){return w=function A(L){(function(E,N){if(!(E instanceof N))throw new TypeError("Cannot call a class as a function")})(this,A);try{this._id=_.StrKey.decodeContract(L)}catch{throw new Error("Invalid contract ID: ".concat(L))}},g=[{key:"contractId",value:function(){return _.StrKey.encodeContract(this._id)}},{key:"toString",value:function(){return this.contractId()}},{key:"address",value:function(){return f.Address.contract(this._id)}},{key:"call",value:function(A){for(var L=arguments.length,E=new Array(L>1?L-1:0),N=1;N<L;N++)E[N-1]=arguments[N];return u.Operation.invokeContractFunction({contract:this.address().toString(),function:A,args:E})}},{key:"getFootprint",value:function(){return r.default.LedgerKey.contractData(new r.default.LedgerKeyContractData({contract:this.address().toScAddress(),key:r.default.ScVal.scvLedgerKeyContractInstance(),durability:r.default.ContractDataDurability.persistent()}))}}],g&&b(w.prototype,g),p&&b(w,p),Object.defineProperty(w,"prototype",{writable:!1}),w;var w,g,p}()},3919:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.humanizeEvents=function(g){return g.map(function(p){return p instanceof f.default.DiagnosticEvent?w(p.event()):w(p)})};var s,f=(s=i(1918))&&s.__esModule?s:{default:s},u=i(7120),r=i(7177);function _(g){return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},_(g)}function d(g,p){var A=Object.keys(g);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(g);p&&(L=L.filter(function(E){return Object.getOwnPropertyDescriptor(g,E).enumerable})),A.push.apply(A,L)}return A}function b(g){for(var p=1;p<arguments.length;p++){var A=arguments[p]!=null?arguments[p]:{};p%2?d(Object(A),!0).forEach(function(L){T(g,L,A[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(A)):d(Object(A)).forEach(function(L){Object.defineProperty(g,L,Object.getOwnPropertyDescriptor(A,L))})}return g}function T(g,p,A){var L;return L=function(E,N){if(_(E)!="object"||!E)return E;var F=E[Symbol.toPrimitive];if(F!==void 0){var R=F.call(E,N||"default");if(_(R)!="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(N==="string"?String:Number)(E)}(p,"string"),(p=_(L)=="symbol"?L:L+"")in g?Object.defineProperty(g,p,{value:A,enumerable:!0,configurable:!0,writable:!0}):g[p]=A,g}function w(g){return b(b({},g.contractId()!=null&&{contractId:u.StrKey.encodeContract(g.contractId())}),{},{type:g.type().name,topics:g.body().value().topics().map(function(p){return(0,r.scValToNative)(p)}),data:(0,r.scValToNative)(g.body().value().data())})}},9260:(o,a,i)=>{"use strict";var s=i(8287).Buffer;function f(N){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},f(N)}Object.defineProperty(a,"__esModule",{value:!0}),a.FeeBumpTransaction=void 0;var u,r=(u=i(1918))&&u.__esModule?u:{default:u},_=i(9152),d=i(380),b=i(3758),T=i(6160);function w(N,F){for(var R=0;R<F.length;R++){var j=F[R];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(N,g(j.key),j)}}function g(N){var F=function(R,j){if(f(R)!="object"||!R)return R;var V=R[Symbol.toPrimitive];if(V!==void 0){var Y=V.call(R,j||"default");if(f(Y)!="object")return Y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(j==="string"?String:Number)(R)}(N,"string");return f(F)=="symbol"?F:F+""}function p(N,F,R){return F=L(F),function(j,V){if(V&&(f(V)==="object"||typeof V=="function"))return V;if(V!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Y){if(Y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Y}(j)}(N,A()?Reflect.construct(F,R||[],L(N).constructor):F.apply(N,R))}function A(){try{var N=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(A=function(){return!!N})()}function L(N){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(F){return F.__proto__||Object.getPrototypeOf(F)},L(N)}function E(N,F){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(R,j){return R.__proto__=j,R},E(N,F)}a.FeeBumpTransaction=function(N){function F(Y,me){var le;if(function(m,P){if(!(m instanceof P))throw new TypeError("Cannot call a class as a function")}(this,F),typeof Y=="string"){var C=s.from(Y,"base64");Y=r.default.TransactionEnvelope.fromXDR(C)}var q=Y.switch();if(q!==r.default.EnvelopeType.envelopeTypeTxFeeBump())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxFeeBump but received an ".concat(q.name,"."));var X=Y.value(),ae=X.tx(),I=ae.fee().toString();le=p(this,F,[ae,(X.signatures()||[]).slice(),I,me]);var S=r.default.TransactionEnvelope.envelopeTypeTx(ae.innerTx().v1());return le._feeSource=(0,T.encodeMuxedAccountToAddress)(le.tx.feeSource()),le._innerTransaction=new d.Transaction(S,me),le}return function(Y,me){if(typeof me!="function"&&me!==null)throw new TypeError("Super expression must either be null or a function");Y.prototype=Object.create(me&&me.prototype,{constructor:{value:Y,writable:!0,configurable:!0}}),Object.defineProperty(Y,"prototype",{writable:!1}),me&&E(Y,me)}(F,N),R=F,(j=[{key:"innerTransaction",get:function(){return this._innerTransaction}},{key:"operations",get:function(){return this._innerTransaction.operations}},{key:"feeSource",get:function(){return this._feeSource}},{key:"signatureBase",value:function(){var Y=new r.default.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTxFeeBump(this.tx);return new r.default.TransactionSignaturePayload({networkId:r.default.Hash.fromXDR((0,_.hash)(this.networkPassphrase)),taggedTransaction:Y}).toXDR()}},{key:"toEnvelope",value:function(){var Y=new r.default.FeeBumpTransactionEnvelope({tx:r.default.FeeBumpTransaction.fromXDR(this.tx.toXDR()),signatures:this.signatures.slice()});return new r.default.TransactionEnvelope.envelopeTypeTxFeeBump(Y)}}])&&w(R.prototype,j),V&&w(R,V),Object.defineProperty(R,"prototype",{writable:!1}),R;var R,j,V}(b.TransactionBase)},7938:(o,a,i)=>{"use strict";function s(r){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},s(r)}function f(r){if(typeof WeakMap!="function")return null;var _=new WeakMap,d=new WeakMap;return(f=function(b){return b?d:_})(r)}Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var u=function(r,_){if(!_&&r&&r.__esModule)return r;if(r===null||s(r)!="object"&&typeof r!="function")return{default:r};var d=f(_);if(d&&d.has(r))return d.get(r);var b={__proto__:null},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var w in r)if(w!=="default"&&{}.hasOwnProperty.call(r,w)){var g=T?Object.getOwnPropertyDescriptor(r,w):null;g&&(g.get||g.set)?Object.defineProperty(b,w,g):b[w]=r[w]}return b.default=r,d&&d.set(r,b),b}(i(3740)).config(function(r){var _=1024;r.typedef("Value",r.varOpaque()),r.struct("ScpBallot",[["counter",r.lookup("Uint32")],["value",r.lookup("Value")]]),r.enum("ScpStatementType",{scpStPrepare:0,scpStConfirm:1,scpStExternalize:2,scpStNominate:3}),r.struct("ScpNomination",[["quorumSetHash",r.lookup("Hash")],["votes",r.varArray(r.lookup("Value"),2147483647)],["accepted",r.varArray(r.lookup("Value"),2147483647)]]),r.struct("ScpStatementPrepare",[["quorumSetHash",r.lookup("Hash")],["ballot",r.lookup("ScpBallot")],["prepared",r.option(r.lookup("ScpBallot"))],["preparedPrime",r.option(r.lookup("ScpBallot"))],["nC",r.lookup("Uint32")],["nH",r.lookup("Uint32")]]),r.struct("ScpStatementConfirm",[["ballot",r.lookup("ScpBallot")],["nPrepared",r.lookup("Uint32")],["nCommit",r.lookup("Uint32")],["nH",r.lookup("Uint32")],["quorumSetHash",r.lookup("Hash")]]),r.struct("ScpStatementExternalize",[["commit",r.lookup("ScpBallot")],["nH",r.lookup("Uint32")],["commitQuorumSetHash",r.lookup("Hash")]]),r.union("ScpStatementPledges",{switchOn:r.lookup("ScpStatementType"),switchName:"type",switches:[["scpStPrepare","prepare"],["scpStConfirm","confirm"],["scpStExternalize","externalize"],["scpStNominate","nominate"]],arms:{prepare:r.lookup("ScpStatementPrepare"),confirm:r.lookup("ScpStatementConfirm"),externalize:r.lookup("ScpStatementExternalize"),nominate:r.lookup("ScpNomination")}}),r.struct("ScpStatement",[["nodeId",r.lookup("NodeId")],["slotIndex",r.lookup("Uint64")],["pledges",r.lookup("ScpStatementPledges")]]),r.struct("ScpEnvelope",[["statement",r.lookup("ScpStatement")],["signature",r.lookup("Signature")]]),r.struct("ScpQuorumSet",[["threshold",r.lookup("Uint32")],["validators",r.varArray(r.lookup("NodeId"),2147483647)],["innerSets",r.varArray(r.lookup("ScpQuorumSet"),2147483647)]]),r.typedef("Thresholds",r.opaque(4)),r.typedef("String32",r.string(32)),r.typedef("String64",r.string(64)),r.typedef("SequenceNumber",r.lookup("Int64")),r.typedef("DataValue",r.varOpaque(64)),r.typedef("PoolId",r.lookup("Hash")),r.typedef("AssetCode4",r.opaque(4)),r.typedef("AssetCode12",r.opaque(12)),r.enum("AssetType",{assetTypeNative:0,assetTypeCreditAlphanum4:1,assetTypeCreditAlphanum12:2,assetTypePoolShare:3}),r.union("AssetCode",{switchOn:r.lookup("AssetType"),switchName:"type",switches:[["assetTypeCreditAlphanum4","assetCode4"],["assetTypeCreditAlphanum12","assetCode12"]],arms:{assetCode4:r.lookup("AssetCode4"),assetCode12:r.lookup("AssetCode12")}}),r.struct("AlphaNum4",[["assetCode",r.lookup("AssetCode4")],["issuer",r.lookup("AccountId")]]),r.struct("AlphaNum12",[["assetCode",r.lookup("AssetCode12")],["issuer",r.lookup("AccountId")]]),r.union("Asset",{switchOn:r.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",r.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"]],arms:{alphaNum4:r.lookup("AlphaNum4"),alphaNum12:r.lookup("AlphaNum12")}}),r.struct("Price",[["n",r.lookup("Int32")],["d",r.lookup("Int32")]]),r.struct("Liabilities",[["buying",r.lookup("Int64")],["selling",r.lookup("Int64")]]),r.enum("ThresholdIndices",{thresholdMasterWeight:0,thresholdLow:1,thresholdMed:2,thresholdHigh:3}),r.enum("LedgerEntryType",{account:0,trustline:1,offer:2,data:3,claimableBalance:4,liquidityPool:5,contractData:6,contractCode:7,configSetting:8,ttl:9}),r.struct("Signer",[["key",r.lookup("SignerKey")],["weight",r.lookup("Uint32")]]),r.enum("AccountFlags",{authRequiredFlag:1,authRevocableFlag:2,authImmutableFlag:4,authClawbackEnabledFlag:8}),r.const("MASK_ACCOUNT_FLAGS",7),r.const("MASK_ACCOUNT_FLAGS_V17",15),r.const("MAX_SIGNERS",20),r.typedef("SponsorshipDescriptor",r.option(r.lookup("AccountId"))),r.struct("AccountEntryExtensionV3",[["ext",r.lookup("ExtensionPoint")],["seqLedger",r.lookup("Uint32")],["seqTime",r.lookup("TimePoint")]]),r.union("AccountEntryExtensionV2Ext",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()],[3,"v3"]],arms:{v3:r.lookup("AccountEntryExtensionV3")}}),r.struct("AccountEntryExtensionV2",[["numSponsored",r.lookup("Uint32")],["numSponsoring",r.lookup("Uint32")],["signerSponsoringIDs",r.varArray(r.lookup("SponsorshipDescriptor"),r.lookup("MAX_SIGNERS"))],["ext",r.lookup("AccountEntryExtensionV2Ext")]]),r.union("AccountEntryExtensionV1Ext",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()],[2,"v2"]],arms:{v2:r.lookup("AccountEntryExtensionV2")}}),r.struct("AccountEntryExtensionV1",[["liabilities",r.lookup("Liabilities")],["ext",r.lookup("AccountEntryExtensionV1Ext")]]),r.union("AccountEntryExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()],[1,"v1"]],arms:{v1:r.lookup("AccountEntryExtensionV1")}}),r.struct("AccountEntry",[["accountId",r.lookup("AccountId")],["balance",r.lookup("Int64")],["seqNum",r.lookup("SequenceNumber")],["numSubEntries",r.lookup("Uint32")],["inflationDest",r.option(r.lookup("AccountId"))],["flags",r.lookup("Uint32")],["homeDomain",r.lookup("String32")],["thresholds",r.lookup("Thresholds")],["signers",r.varArray(r.lookup("Signer"),r.lookup("MAX_SIGNERS"))],["ext",r.lookup("AccountEntryExt")]]),r.enum("TrustLineFlags",{authorizedFlag:1,authorizedToMaintainLiabilitiesFlag:2,trustlineClawbackEnabledFlag:4}),r.const("MASK_TRUSTLINE_FLAGS",1),r.const("MASK_TRUSTLINE_FLAGS_V13",3),r.const("MASK_TRUSTLINE_FLAGS_V17",7),r.enum("LiquidityPoolType",{liquidityPoolConstantProduct:0}),r.union("TrustLineAsset",{switchOn:r.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",r.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"],["assetTypePoolShare","liquidityPoolId"]],arms:{alphaNum4:r.lookup("AlphaNum4"),alphaNum12:r.lookup("AlphaNum12"),liquidityPoolId:r.lookup("PoolId")}}),r.union("TrustLineEntryExtensionV2Ext",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("TrustLineEntryExtensionV2",[["liquidityPoolUseCount",r.lookup("Int32")],["ext",r.lookup("TrustLineEntryExtensionV2Ext")]]),r.union("TrustLineEntryV1Ext",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()],[2,"v2"]],arms:{v2:r.lookup("TrustLineEntryExtensionV2")}}),r.struct("TrustLineEntryV1",[["liabilities",r.lookup("Liabilities")],["ext",r.lookup("TrustLineEntryV1Ext")]]),r.union("TrustLineEntryExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()],[1,"v1"]],arms:{v1:r.lookup("TrustLineEntryV1")}}),r.struct("TrustLineEntry",[["accountId",r.lookup("AccountId")],["asset",r.lookup("TrustLineAsset")],["balance",r.lookup("Int64")],["limit",r.lookup("Int64")],["flags",r.lookup("Uint32")],["ext",r.lookup("TrustLineEntryExt")]]),r.enum("OfferEntryFlags",{passiveFlag:1}),r.const("MASK_OFFERENTRY_FLAGS",1),r.union("OfferEntryExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("OfferEntry",[["sellerId",r.lookup("AccountId")],["offerId",r.lookup("Int64")],["selling",r.lookup("Asset")],["buying",r.lookup("Asset")],["amount",r.lookup("Int64")],["price",r.lookup("Price")],["flags",r.lookup("Uint32")],["ext",r.lookup("OfferEntryExt")]]),r.union("DataEntryExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("DataEntry",[["accountId",r.lookup("AccountId")],["dataName",r.lookup("String64")],["dataValue",r.lookup("DataValue")],["ext",r.lookup("DataEntryExt")]]),r.enum("ClaimPredicateType",{claimPredicateUnconditional:0,claimPredicateAnd:1,claimPredicateOr:2,claimPredicateNot:3,claimPredicateBeforeAbsoluteTime:4,claimPredicateBeforeRelativeTime:5}),r.union("ClaimPredicate",{switchOn:r.lookup("ClaimPredicateType"),switchName:"type",switches:[["claimPredicateUnconditional",r.void()],["claimPredicateAnd","andPredicates"],["claimPredicateOr","orPredicates"],["claimPredicateNot","notPredicate"],["claimPredicateBeforeAbsoluteTime","absBefore"],["claimPredicateBeforeRelativeTime","relBefore"]],arms:{andPredicates:r.varArray(r.lookup("ClaimPredicate"),2),orPredicates:r.varArray(r.lookup("ClaimPredicate"),2),notPredicate:r.option(r.lookup("ClaimPredicate")),absBefore:r.lookup("Int64"),relBefore:r.lookup("Int64")}}),r.enum("ClaimantType",{claimantTypeV0:0}),r.struct("ClaimantV0",[["destination",r.lookup("AccountId")],["predicate",r.lookup("ClaimPredicate")]]),r.union("Claimant",{switchOn:r.lookup("ClaimantType"),switchName:"type",switches:[["claimantTypeV0","v0"]],arms:{v0:r.lookup("ClaimantV0")}}),r.enum("ClaimableBalanceIdType",{claimableBalanceIdTypeV0:0}),r.union("ClaimableBalanceId",{switchOn:r.lookup("ClaimableBalanceIdType"),switchName:"type",switches:[["claimableBalanceIdTypeV0","v0"]],arms:{v0:r.lookup("Hash")}}),r.enum("ClaimableBalanceFlags",{claimableBalanceClawbackEnabledFlag:1}),r.const("MASK_CLAIMABLE_BALANCE_FLAGS",1),r.union("ClaimableBalanceEntryExtensionV1Ext",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("ClaimableBalanceEntryExtensionV1",[["ext",r.lookup("ClaimableBalanceEntryExtensionV1Ext")],["flags",r.lookup("Uint32")]]),r.union("ClaimableBalanceEntryExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()],[1,"v1"]],arms:{v1:r.lookup("ClaimableBalanceEntryExtensionV1")}}),r.struct("ClaimableBalanceEntry",[["balanceId",r.lookup("ClaimableBalanceId")],["claimants",r.varArray(r.lookup("Claimant"),10)],["asset",r.lookup("Asset")],["amount",r.lookup("Int64")],["ext",r.lookup("ClaimableBalanceEntryExt")]]),r.struct("LiquidityPoolConstantProductParameters",[["assetA",r.lookup("Asset")],["assetB",r.lookup("Asset")],["fee",r.lookup("Int32")]]),r.struct("LiquidityPoolEntryConstantProduct",[["params",r.lookup("LiquidityPoolConstantProductParameters")],["reserveA",r.lookup("Int64")],["reserveB",r.lookup("Int64")],["totalPoolShares",r.lookup("Int64")],["poolSharesTrustLineCount",r.lookup("Int64")]]),r.union("LiquidityPoolEntryBody",{switchOn:r.lookup("LiquidityPoolType"),switchName:"type",switches:[["liquidityPoolConstantProduct","constantProduct"]],arms:{constantProduct:r.lookup("LiquidityPoolEntryConstantProduct")}}),r.struct("LiquidityPoolEntry",[["liquidityPoolId",r.lookup("PoolId")],["body",r.lookup("LiquidityPoolEntryBody")]]),r.enum("ContractDataDurability",{temporary:0,persistent:1}),r.struct("ContractDataEntry",[["ext",r.lookup("ExtensionPoint")],["contract",r.lookup("ScAddress")],["key",r.lookup("ScVal")],["durability",r.lookup("ContractDataDurability")],["val",r.lookup("ScVal")]]),r.struct("ContractCodeCostInputs",[["ext",r.lookup("ExtensionPoint")],["nInstructions",r.lookup("Uint32")],["nFunctions",r.lookup("Uint32")],["nGlobals",r.lookup("Uint32")],["nTableEntries",r.lookup("Uint32")],["nTypes",r.lookup("Uint32")],["nDataSegments",r.lookup("Uint32")],["nElemSegments",r.lookup("Uint32")],["nImports",r.lookup("Uint32")],["nExports",r.lookup("Uint32")],["nDataSegmentBytes",r.lookup("Uint32")]]),r.struct("ContractCodeEntryV1",[["ext",r.lookup("ExtensionPoint")],["costInputs",r.lookup("ContractCodeCostInputs")]]),r.union("ContractCodeEntryExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()],[1,"v1"]],arms:{v1:r.lookup("ContractCodeEntryV1")}}),r.struct("ContractCodeEntry",[["ext",r.lookup("ContractCodeEntryExt")],["hash",r.lookup("Hash")],["code",r.varOpaque()]]),r.struct("TtlEntry",[["keyHash",r.lookup("Hash")],["liveUntilLedgerSeq",r.lookup("Uint32")]]),r.union("LedgerEntryExtensionV1Ext",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("LedgerEntryExtensionV1",[["sponsoringId",r.lookup("SponsorshipDescriptor")],["ext",r.lookup("LedgerEntryExtensionV1Ext")]]),r.union("LedgerEntryData",{switchOn:r.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"],["liquidityPool","liquidityPool"],["contractData","contractData"],["contractCode","contractCode"],["configSetting","configSetting"],["ttl","ttl"]],arms:{account:r.lookup("AccountEntry"),trustLine:r.lookup("TrustLineEntry"),offer:r.lookup("OfferEntry"),data:r.lookup("DataEntry"),claimableBalance:r.lookup("ClaimableBalanceEntry"),liquidityPool:r.lookup("LiquidityPoolEntry"),contractData:r.lookup("ContractDataEntry"),contractCode:r.lookup("ContractCodeEntry"),configSetting:r.lookup("ConfigSettingEntry"),ttl:r.lookup("TtlEntry")}}),r.union("LedgerEntryExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()],[1,"v1"]],arms:{v1:r.lookup("LedgerEntryExtensionV1")}}),r.struct("LedgerEntry",[["lastModifiedLedgerSeq",r.lookup("Uint32")],["data",r.lookup("LedgerEntryData")],["ext",r.lookup("LedgerEntryExt")]]),r.struct("LedgerKeyAccount",[["accountId",r.lookup("AccountId")]]),r.struct("LedgerKeyTrustLine",[["accountId",r.lookup("AccountId")],["asset",r.lookup("TrustLineAsset")]]),r.struct("LedgerKeyOffer",[["sellerId",r.lookup("AccountId")],["offerId",r.lookup("Int64")]]),r.struct("LedgerKeyData",[["accountId",r.lookup("AccountId")],["dataName",r.lookup("String64")]]),r.struct("LedgerKeyClaimableBalance",[["balanceId",r.lookup("ClaimableBalanceId")]]),r.struct("LedgerKeyLiquidityPool",[["liquidityPoolId",r.lookup("PoolId")]]),r.struct("LedgerKeyContractData",[["contract",r.lookup("ScAddress")],["key",r.lookup("ScVal")],["durability",r.lookup("ContractDataDurability")]]),r.struct("LedgerKeyContractCode",[["hash",r.lookup("Hash")]]),r.struct("LedgerKeyConfigSetting",[["configSettingId",r.lookup("ConfigSettingId")]]),r.struct("LedgerKeyTtl",[["keyHash",r.lookup("Hash")]]),r.union("LedgerKey",{switchOn:r.lookup("LedgerEntryType"),switchName:"type",switches:[["account","account"],["trustline","trustLine"],["offer","offer"],["data","data"],["claimableBalance","claimableBalance"],["liquidityPool","liquidityPool"],["contractData","contractData"],["contractCode","contractCode"],["configSetting","configSetting"],["ttl","ttl"]],arms:{account:r.lookup("LedgerKeyAccount"),trustLine:r.lookup("LedgerKeyTrustLine"),offer:r.lookup("LedgerKeyOffer"),data:r.lookup("LedgerKeyData"),claimableBalance:r.lookup("LedgerKeyClaimableBalance"),liquidityPool:r.lookup("LedgerKeyLiquidityPool"),contractData:r.lookup("LedgerKeyContractData"),contractCode:r.lookup("LedgerKeyContractCode"),configSetting:r.lookup("LedgerKeyConfigSetting"),ttl:r.lookup("LedgerKeyTtl")}}),r.enum("EnvelopeType",{envelopeTypeTxV0:0,envelopeTypeScp:1,envelopeTypeTx:2,envelopeTypeAuth:3,envelopeTypeScpvalue:4,envelopeTypeTxFeeBump:5,envelopeTypeOpId:6,envelopeTypePoolRevokeOpId:7,envelopeTypeContractId:8,envelopeTypeSorobanAuthorization:9}),r.typedef("UpgradeType",r.varOpaque(128)),r.enum("StellarValueType",{stellarValueBasic:0,stellarValueSigned:1}),r.struct("LedgerCloseValueSignature",[["nodeId",r.lookup("NodeId")],["signature",r.lookup("Signature")]]),r.union("StellarValueExt",{switchOn:r.lookup("StellarValueType"),switchName:"v",switches:[["stellarValueBasic",r.void()],["stellarValueSigned","lcValueSignature"]],arms:{lcValueSignature:r.lookup("LedgerCloseValueSignature")}}),r.struct("StellarValue",[["txSetHash",r.lookup("Hash")],["closeTime",r.lookup("TimePoint")],["upgrades",r.varArray(r.lookup("UpgradeType"),6)],["ext",r.lookup("StellarValueExt")]]),r.const("MASK_LEDGER_HEADER_FLAGS",7),r.enum("LedgerHeaderFlags",{disableLiquidityPoolTradingFlag:1,disableLiquidityPoolDepositFlag:2,disableLiquidityPoolWithdrawalFlag:4}),r.union("LedgerHeaderExtensionV1Ext",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("LedgerHeaderExtensionV1",[["flags",r.lookup("Uint32")],["ext",r.lookup("LedgerHeaderExtensionV1Ext")]]),r.union("LedgerHeaderExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()],[1,"v1"]],arms:{v1:r.lookup("LedgerHeaderExtensionV1")}}),r.struct("LedgerHeader",[["ledgerVersion",r.lookup("Uint32")],["previousLedgerHash",r.lookup("Hash")],["scpValue",r.lookup("StellarValue")],["txSetResultHash",r.lookup("Hash")],["bucketListHash",r.lookup("Hash")],["ledgerSeq",r.lookup("Uint32")],["totalCoins",r.lookup("Int64")],["feePool",r.lookup("Int64")],["inflationSeq",r.lookup("Uint32")],["idPool",r.lookup("Uint64")],["baseFee",r.lookup("Uint32")],["baseReserve",r.lookup("Uint32")],["maxTxSetSize",r.lookup("Uint32")],["skipList",r.array(r.lookup("Hash"),4)],["ext",r.lookup("LedgerHeaderExt")]]),r.enum("LedgerUpgradeType",{ledgerUpgradeVersion:1,ledgerUpgradeBaseFee:2,ledgerUpgradeMaxTxSetSize:3,ledgerUpgradeBaseReserve:4,ledgerUpgradeFlags:5,ledgerUpgradeConfig:6,ledgerUpgradeMaxSorobanTxSetSize:7}),r.struct("ConfigUpgradeSetKey",[["contractId",r.lookup("Hash")],["contentHash",r.lookup("Hash")]]),r.union("LedgerUpgrade",{switchOn:r.lookup("LedgerUpgradeType"),switchName:"type",switches:[["ledgerUpgradeVersion","newLedgerVersion"],["ledgerUpgradeBaseFee","newBaseFee"],["ledgerUpgradeMaxTxSetSize","newMaxTxSetSize"],["ledgerUpgradeBaseReserve","newBaseReserve"],["ledgerUpgradeFlags","newFlags"],["ledgerUpgradeConfig","newConfig"],["ledgerUpgradeMaxSorobanTxSetSize","newMaxSorobanTxSetSize"]],arms:{newLedgerVersion:r.lookup("Uint32"),newBaseFee:r.lookup("Uint32"),newMaxTxSetSize:r.lookup("Uint32"),newBaseReserve:r.lookup("Uint32"),newFlags:r.lookup("Uint32"),newConfig:r.lookup("ConfigUpgradeSetKey"),newMaxSorobanTxSetSize:r.lookup("Uint32")}}),r.struct("ConfigUpgradeSet",[["updatedEntry",r.varArray(r.lookup("ConfigSettingEntry"),2147483647)]]),r.enum("BucketEntryType",{metaentry:-1,liveentry:0,deadentry:1,initentry:2}),r.union("BucketMetadataExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("BucketMetadata",[["ledgerVersion",r.lookup("Uint32")],["ext",r.lookup("BucketMetadataExt")]]),r.union("BucketEntry",{switchOn:r.lookup("BucketEntryType"),switchName:"type",switches:[["liveentry","liveEntry"],["initentry","liveEntry"],["deadentry","deadEntry"],["metaentry","metaEntry"]],arms:{liveEntry:r.lookup("LedgerEntry"),deadEntry:r.lookup("LedgerKey"),metaEntry:r.lookup("BucketMetadata")}}),r.enum("TxSetComponentType",{txsetCompTxsMaybeDiscountedFee:0}),r.struct("TxSetComponentTxsMaybeDiscountedFee",[["baseFee",r.option(r.lookup("Int64"))],["txes",r.varArray(r.lookup("TransactionEnvelope"),2147483647)]]),r.union("TxSetComponent",{switchOn:r.lookup("TxSetComponentType"),switchName:"type",switches:[["txsetCompTxsMaybeDiscountedFee","txsMaybeDiscountedFee"]],arms:{txsMaybeDiscountedFee:r.lookup("TxSetComponentTxsMaybeDiscountedFee")}}),r.union("TransactionPhase",{switchOn:r.int(),switchName:"v",switches:[[0,"v0Components"]],arms:{v0Components:r.varArray(r.lookup("TxSetComponent"),2147483647)}}),r.struct("TransactionSet",[["previousLedgerHash",r.lookup("Hash")],["txes",r.varArray(r.lookup("TransactionEnvelope"),2147483647)]]),r.struct("TransactionSetV1",[["previousLedgerHash",r.lookup("Hash")],["phases",r.varArray(r.lookup("TransactionPhase"),2147483647)]]),r.union("GeneralizedTransactionSet",{switchOn:r.int(),switchName:"v",switches:[[1,"v1TxSet"]],arms:{v1TxSet:r.lookup("TransactionSetV1")}}),r.struct("TransactionResultPair",[["transactionHash",r.lookup("Hash")],["result",r.lookup("TransactionResult")]]),r.struct("TransactionResultSet",[["results",r.varArray(r.lookup("TransactionResultPair"),2147483647)]]),r.union("TransactionHistoryEntryExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()],[1,"generalizedTxSet"]],arms:{generalizedTxSet:r.lookup("GeneralizedTransactionSet")}}),r.struct("TransactionHistoryEntry",[["ledgerSeq",r.lookup("Uint32")],["txSet",r.lookup("TransactionSet")],["ext",r.lookup("TransactionHistoryEntryExt")]]),r.union("TransactionHistoryResultEntryExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("TransactionHistoryResultEntry",[["ledgerSeq",r.lookup("Uint32")],["txResultSet",r.lookup("TransactionResultSet")],["ext",r.lookup("TransactionHistoryResultEntryExt")]]),r.union("LedgerHeaderHistoryEntryExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("LedgerHeaderHistoryEntry",[["hash",r.lookup("Hash")],["header",r.lookup("LedgerHeader")],["ext",r.lookup("LedgerHeaderHistoryEntryExt")]]),r.struct("LedgerScpMessages",[["ledgerSeq",r.lookup("Uint32")],["messages",r.varArray(r.lookup("ScpEnvelope"),2147483647)]]),r.struct("ScpHistoryEntryV0",[["quorumSets",r.varArray(r.lookup("ScpQuorumSet"),2147483647)],["ledgerMessages",r.lookup("LedgerScpMessages")]]),r.union("ScpHistoryEntry",{switchOn:r.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:r.lookup("ScpHistoryEntryV0")}}),r.enum("LedgerEntryChangeType",{ledgerEntryCreated:0,ledgerEntryUpdated:1,ledgerEntryRemoved:2,ledgerEntryState:3}),r.union("LedgerEntryChange",{switchOn:r.lookup("LedgerEntryChangeType"),switchName:"type",switches:[["ledgerEntryCreated","created"],["ledgerEntryUpdated","updated"],["ledgerEntryRemoved","removed"],["ledgerEntryState","state"]],arms:{created:r.lookup("LedgerEntry"),updated:r.lookup("LedgerEntry"),removed:r.lookup("LedgerKey"),state:r.lookup("LedgerEntry")}}),r.typedef("LedgerEntryChanges",r.varArray(r.lookup("LedgerEntryChange"),2147483647)),r.struct("OperationMeta",[["changes",r.lookup("LedgerEntryChanges")]]),r.struct("TransactionMetaV1",[["txChanges",r.lookup("LedgerEntryChanges")],["operations",r.varArray(r.lookup("OperationMeta"),2147483647)]]),r.struct("TransactionMetaV2",[["txChangesBefore",r.lookup("LedgerEntryChanges")],["operations",r.varArray(r.lookup("OperationMeta"),2147483647)],["txChangesAfter",r.lookup("LedgerEntryChanges")]]),r.enum("ContractEventType",{system:0,contract:1,diagnostic:2}),r.struct("ContractEventV0",[["topics",r.varArray(r.lookup("ScVal"),2147483647)],["data",r.lookup("ScVal")]]),r.union("ContractEventBody",{switchOn:r.int(),switchName:"v",switches:[[0,"v0"]],arms:{v0:r.lookup("ContractEventV0")}}),r.struct("ContractEvent",[["ext",r.lookup("ExtensionPoint")],["contractId",r.option(r.lookup("Hash"))],["type",r.lookup("ContractEventType")],["body",r.lookup("ContractEventBody")]]),r.struct("DiagnosticEvent",[["inSuccessfulContractCall",r.bool()],["event",r.lookup("ContractEvent")]]),r.struct("SorobanTransactionMetaExtV1",[["ext",r.lookup("ExtensionPoint")],["totalNonRefundableResourceFeeCharged",r.lookup("Int64")],["totalRefundableResourceFeeCharged",r.lookup("Int64")],["rentFeeCharged",r.lookup("Int64")]]),r.union("SorobanTransactionMetaExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()],[1,"v1"]],arms:{v1:r.lookup("SorobanTransactionMetaExtV1")}}),r.struct("SorobanTransactionMeta",[["ext",r.lookup("SorobanTransactionMetaExt")],["events",r.varArray(r.lookup("ContractEvent"),2147483647)],["returnValue",r.lookup("ScVal")],["diagnosticEvents",r.varArray(r.lookup("DiagnosticEvent"),2147483647)]]),r.struct("TransactionMetaV3",[["ext",r.lookup("ExtensionPoint")],["txChangesBefore",r.lookup("LedgerEntryChanges")],["operations",r.varArray(r.lookup("OperationMeta"),2147483647)],["txChangesAfter",r.lookup("LedgerEntryChanges")],["sorobanMeta",r.option(r.lookup("SorobanTransactionMeta"))]]),r.struct("InvokeHostFunctionSuccessPreImage",[["returnValue",r.lookup("ScVal")],["events",r.varArray(r.lookup("ContractEvent"),2147483647)]]),r.union("TransactionMeta",{switchOn:r.int(),switchName:"v",switches:[[0,"operations"],[1,"v1"],[2,"v2"],[3,"v3"]],arms:{operations:r.varArray(r.lookup("OperationMeta"),2147483647),v1:r.lookup("TransactionMetaV1"),v2:r.lookup("TransactionMetaV2"),v3:r.lookup("TransactionMetaV3")}}),r.struct("TransactionResultMeta",[["result",r.lookup("TransactionResultPair")],["feeProcessing",r.lookup("LedgerEntryChanges")],["txApplyProcessing",r.lookup("TransactionMeta")]]),r.struct("UpgradeEntryMeta",[["upgrade",r.lookup("LedgerUpgrade")],["changes",r.lookup("LedgerEntryChanges")]]),r.struct("LedgerCloseMetaV0",[["ledgerHeader",r.lookup("LedgerHeaderHistoryEntry")],["txSet",r.lookup("TransactionSet")],["txProcessing",r.varArray(r.lookup("TransactionResultMeta"),2147483647)],["upgradesProcessing",r.varArray(r.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",r.varArray(r.lookup("ScpHistoryEntry"),2147483647)]]),r.struct("LedgerCloseMetaExtV1",[["ext",r.lookup("ExtensionPoint")],["sorobanFeeWrite1Kb",r.lookup("Int64")]]),r.union("LedgerCloseMetaExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()],[1,"v1"]],arms:{v1:r.lookup("LedgerCloseMetaExtV1")}}),r.struct("LedgerCloseMetaV1",[["ext",r.lookup("LedgerCloseMetaExt")],["ledgerHeader",r.lookup("LedgerHeaderHistoryEntry")],["txSet",r.lookup("GeneralizedTransactionSet")],["txProcessing",r.varArray(r.lookup("TransactionResultMeta"),2147483647)],["upgradesProcessing",r.varArray(r.lookup("UpgradeEntryMeta"),2147483647)],["scpInfo",r.varArray(r.lookup("ScpHistoryEntry"),2147483647)],["totalByteSizeOfBucketList",r.lookup("Uint64")],["evictedTemporaryLedgerKeys",r.varArray(r.lookup("LedgerKey"),2147483647)],["evictedPersistentLedgerEntries",r.varArray(r.lookup("LedgerEntry"),2147483647)]]),r.union("LedgerCloseMeta",{switchOn:r.int(),switchName:"v",switches:[[0,"v0"],[1,"v1"]],arms:{v0:r.lookup("LedgerCloseMetaV0"),v1:r.lookup("LedgerCloseMetaV1")}}),r.enum("ErrorCode",{errMisc:0,errData:1,errConf:2,errAuth:3,errLoad:4}),r.struct("Error",[["code",r.lookup("ErrorCode")],["msg",r.string(100)]]),r.struct("SendMore",[["numMessages",r.lookup("Uint32")]]),r.struct("SendMoreExtended",[["numMessages",r.lookup("Uint32")],["numBytes",r.lookup("Uint32")]]),r.struct("AuthCert",[["pubkey",r.lookup("Curve25519Public")],["expiration",r.lookup("Uint64")],["sig",r.lookup("Signature")]]),r.struct("Hello",[["ledgerVersion",r.lookup("Uint32")],["overlayVersion",r.lookup("Uint32")],["overlayMinVersion",r.lookup("Uint32")],["networkId",r.lookup("Hash")],["versionStr",r.string(100)],["listeningPort",r.int()],["peerId",r.lookup("NodeId")],["cert",r.lookup("AuthCert")],["nonce",r.lookup("Uint256")]]),r.const("AUTH_MSG_FLAG_FLOW_CONTROL_BYTES_REQUESTED",200),r.struct("Auth",[["flags",r.int()]]),r.enum("IpAddrType",{iPv4:0,iPv6:1}),r.union("PeerAddressIp",{switchOn:r.lookup("IpAddrType"),switchName:"type",switches:[["iPv4","ipv4"],["iPv6","ipv6"]],arms:{ipv4:r.opaque(4),ipv6:r.opaque(16)}}),r.struct("PeerAddress",[["ip",r.lookup("PeerAddressIp")],["port",r.lookup("Uint32")],["numFailures",r.lookup("Uint32")]]),r.enum("MessageType",{errorMsg:0,auth:2,dontHave:3,getPeers:4,peers:5,getTxSet:6,txSet:7,generalizedTxSet:17,transaction:8,getScpQuorumset:9,scpQuorumset:10,scpMessage:11,getScpState:12,hello:13,surveyRequest:14,surveyResponse:15,sendMore:16,sendMoreExtended:20,floodAdvert:18,floodDemand:19}),r.struct("DontHave",[["type",r.lookup("MessageType")],["reqHash",r.lookup("Uint256")]]),r.enum("SurveyMessageCommandType",{surveyTopology:0}),r.enum("SurveyMessageResponseType",{surveyTopologyResponseV0:0,surveyTopologyResponseV1:1}),r.struct("SurveyRequestMessage",[["surveyorPeerId",r.lookup("NodeId")],["surveyedPeerId",r.lookup("NodeId")],["ledgerNum",r.lookup("Uint32")],["encryptionKey",r.lookup("Curve25519Public")],["commandType",r.lookup("SurveyMessageCommandType")]]),r.struct("SignedSurveyRequestMessage",[["requestSignature",r.lookup("Signature")],["request",r.lookup("SurveyRequestMessage")]]),r.typedef("EncryptedBody",r.varOpaque(64e3)),r.struct("SurveyResponseMessage",[["surveyorPeerId",r.lookup("NodeId")],["surveyedPeerId",r.lookup("NodeId")],["ledgerNum",r.lookup("Uint32")],["commandType",r.lookup("SurveyMessageCommandType")],["encryptedBody",r.lookup("EncryptedBody")]]),r.struct("SignedSurveyResponseMessage",[["responseSignature",r.lookup("Signature")],["response",r.lookup("SurveyResponseMessage")]]),r.struct("PeerStats",[["id",r.lookup("NodeId")],["versionStr",r.string(100)],["messagesRead",r.lookup("Uint64")],["messagesWritten",r.lookup("Uint64")],["bytesRead",r.lookup("Uint64")],["bytesWritten",r.lookup("Uint64")],["secondsConnected",r.lookup("Uint64")],["uniqueFloodBytesRecv",r.lookup("Uint64")],["duplicateFloodBytesRecv",r.lookup("Uint64")],["uniqueFetchBytesRecv",r.lookup("Uint64")],["duplicateFetchBytesRecv",r.lookup("Uint64")],["uniqueFloodMessageRecv",r.lookup("Uint64")],["duplicateFloodMessageRecv",r.lookup("Uint64")],["uniqueFetchMessageRecv",r.lookup("Uint64")],["duplicateFetchMessageRecv",r.lookup("Uint64")]]),r.typedef("PeerStatList",r.varArray(r.lookup("PeerStats"),25)),r.struct("TopologyResponseBodyV0",[["inboundPeers",r.lookup("PeerStatList")],["outboundPeers",r.lookup("PeerStatList")],["totalInboundPeerCount",r.lookup("Uint32")],["totalOutboundPeerCount",r.lookup("Uint32")]]),r.struct("TopologyResponseBodyV1",[["inboundPeers",r.lookup("PeerStatList")],["outboundPeers",r.lookup("PeerStatList")],["totalInboundPeerCount",r.lookup("Uint32")],["totalOutboundPeerCount",r.lookup("Uint32")],["maxInboundPeerCount",r.lookup("Uint32")],["maxOutboundPeerCount",r.lookup("Uint32")]]),r.union("SurveyResponseBody",{switchOn:r.lookup("SurveyMessageResponseType"),switchName:"type",switches:[["surveyTopologyResponseV0","topologyResponseBodyV0"],["surveyTopologyResponseV1","topologyResponseBodyV1"]],arms:{topologyResponseBodyV0:r.lookup("TopologyResponseBodyV0"),topologyResponseBodyV1:r.lookup("TopologyResponseBodyV1")}}),r.const("TX_ADVERT_VECTOR_MAX_SIZE",1e3),r.typedef("TxAdvertVector",r.varArray(r.lookup("Hash"),r.lookup("TX_ADVERT_VECTOR_MAX_SIZE"))),r.struct("FloodAdvert",[["txHashes",r.lookup("TxAdvertVector")]]),r.const("TX_DEMAND_VECTOR_MAX_SIZE",1e3),r.typedef("TxDemandVector",r.varArray(r.lookup("Hash"),r.lookup("TX_DEMAND_VECTOR_MAX_SIZE"))),r.struct("FloodDemand",[["txHashes",r.lookup("TxDemandVector")]]),r.union("StellarMessage",{switchOn:r.lookup("MessageType"),switchName:"type",switches:[["errorMsg","error"],["hello","hello"],["auth","auth"],["dontHave","dontHave"],["getPeers",r.void()],["peers","peers"],["getTxSet","txSetHash"],["txSet","txSet"],["generalizedTxSet","generalizedTxSet"],["transaction","transaction"],["surveyRequest","signedSurveyRequestMessage"],["surveyResponse","signedSurveyResponseMessage"],["getScpQuorumset","qSetHash"],["scpQuorumset","qSet"],["scpMessage","envelope"],["getScpState","getScpLedgerSeq"],["sendMore","sendMoreMessage"],["sendMoreExtended","sendMoreExtendedMessage"],["floodAdvert","floodAdvert"],["floodDemand","floodDemand"]],arms:{error:r.lookup("Error"),hello:r.lookup("Hello"),auth:r.lookup("Auth"),dontHave:r.lookup("DontHave"),peers:r.varArray(r.lookup("PeerAddress"),100),txSetHash:r.lookup("Uint256"),txSet:r.lookup("TransactionSet"),generalizedTxSet:r.lookup("GeneralizedTransactionSet"),transaction:r.lookup("TransactionEnvelope"),signedSurveyRequestMessage:r.lookup("SignedSurveyRequestMessage"),signedSurveyResponseMessage:r.lookup("SignedSurveyResponseMessage"),qSetHash:r.lookup("Uint256"),qSet:r.lookup("ScpQuorumSet"),envelope:r.lookup("ScpEnvelope"),getScpLedgerSeq:r.lookup("Uint32"),sendMoreMessage:r.lookup("SendMore"),sendMoreExtendedMessage:r.lookup("SendMoreExtended"),floodAdvert:r.lookup("FloodAdvert"),floodDemand:r.lookup("FloodDemand")}}),r.struct("AuthenticatedMessageV0",[["sequence",r.lookup("Uint64")],["message",r.lookup("StellarMessage")],["mac",r.lookup("HmacSha256Mac")]]),r.union("AuthenticatedMessage",{switchOn:r.lookup("Uint32"),switchName:"v",switches:[[0,"v0"]],arms:{v0:r.lookup("AuthenticatedMessageV0")}}),r.const("MAX_OPS_PER_TX",100),r.union("LiquidityPoolParameters",{switchOn:r.lookup("LiquidityPoolType"),switchName:"type",switches:[["liquidityPoolConstantProduct","constantProduct"]],arms:{constantProduct:r.lookup("LiquidityPoolConstantProductParameters")}}),r.struct("MuxedAccountMed25519",[["id",r.lookup("Uint64")],["ed25519",r.lookup("Uint256")]]),r.union("MuxedAccount",{switchOn:r.lookup("CryptoKeyType"),switchName:"type",switches:[["keyTypeEd25519","ed25519"],["keyTypeMuxedEd25519","med25519"]],arms:{ed25519:r.lookup("Uint256"),med25519:r.lookup("MuxedAccountMed25519")}}),r.struct("DecoratedSignature",[["hint",r.lookup("SignatureHint")],["signature",r.lookup("Signature")]]),r.enum("OperationType",{createAccount:0,payment:1,pathPaymentStrictReceive:2,manageSellOffer:3,createPassiveSellOffer:4,setOptions:5,changeTrust:6,allowTrust:7,accountMerge:8,inflation:9,manageData:10,bumpSequence:11,manageBuyOffer:12,pathPaymentStrictSend:13,createClaimableBalance:14,claimClaimableBalance:15,beginSponsoringFutureReserves:16,endSponsoringFutureReserves:17,revokeSponsorship:18,clawback:19,clawbackClaimableBalance:20,setTrustLineFlags:21,liquidityPoolDeposit:22,liquidityPoolWithdraw:23,invokeHostFunction:24,extendFootprintTtl:25,restoreFootprint:26}),r.struct("CreateAccountOp",[["destination",r.lookup("AccountId")],["startingBalance",r.lookup("Int64")]]),r.struct("PaymentOp",[["destination",r.lookup("MuxedAccount")],["asset",r.lookup("Asset")],["amount",r.lookup("Int64")]]),r.struct("PathPaymentStrictReceiveOp",[["sendAsset",r.lookup("Asset")],["sendMax",r.lookup("Int64")],["destination",r.lookup("MuxedAccount")],["destAsset",r.lookup("Asset")],["destAmount",r.lookup("Int64")],["path",r.varArray(r.lookup("Asset"),5)]]),r.struct("PathPaymentStrictSendOp",[["sendAsset",r.lookup("Asset")],["sendAmount",r.lookup("Int64")],["destination",r.lookup("MuxedAccount")],["destAsset",r.lookup("Asset")],["destMin",r.lookup("Int64")],["path",r.varArray(r.lookup("Asset"),5)]]),r.struct("ManageSellOfferOp",[["selling",r.lookup("Asset")],["buying",r.lookup("Asset")],["amount",r.lookup("Int64")],["price",r.lookup("Price")],["offerId",r.lookup("Int64")]]),r.struct("ManageBuyOfferOp",[["selling",r.lookup("Asset")],["buying",r.lookup("Asset")],["buyAmount",r.lookup("Int64")],["price",r.lookup("Price")],["offerId",r.lookup("Int64")]]),r.struct("CreatePassiveSellOfferOp",[["selling",r.lookup("Asset")],["buying",r.lookup("Asset")],["amount",r.lookup("Int64")],["price",r.lookup("Price")]]),r.struct("SetOptionsOp",[["inflationDest",r.option(r.lookup("AccountId"))],["clearFlags",r.option(r.lookup("Uint32"))],["setFlags",r.option(r.lookup("Uint32"))],["masterWeight",r.option(r.lookup("Uint32"))],["lowThreshold",r.option(r.lookup("Uint32"))],["medThreshold",r.option(r.lookup("Uint32"))],["highThreshold",r.option(r.lookup("Uint32"))],["homeDomain",r.option(r.lookup("String32"))],["signer",r.option(r.lookup("Signer"))]]),r.union("ChangeTrustAsset",{switchOn:r.lookup("AssetType"),switchName:"type",switches:[["assetTypeNative",r.void()],["assetTypeCreditAlphanum4","alphaNum4"],["assetTypeCreditAlphanum12","alphaNum12"],["assetTypePoolShare","liquidityPool"]],arms:{alphaNum4:r.lookup("AlphaNum4"),alphaNum12:r.lookup("AlphaNum12"),liquidityPool:r.lookup("LiquidityPoolParameters")}}),r.struct("ChangeTrustOp",[["line",r.lookup("ChangeTrustAsset")],["limit",r.lookup("Int64")]]),r.struct("AllowTrustOp",[["trustor",r.lookup("AccountId")],["asset",r.lookup("AssetCode")],["authorize",r.lookup("Uint32")]]),r.struct("ManageDataOp",[["dataName",r.lookup("String64")],["dataValue",r.option(r.lookup("DataValue"))]]),r.struct("BumpSequenceOp",[["bumpTo",r.lookup("SequenceNumber")]]),r.struct("CreateClaimableBalanceOp",[["asset",r.lookup("Asset")],["amount",r.lookup("Int64")],["claimants",r.varArray(r.lookup("Claimant"),10)]]),r.struct("ClaimClaimableBalanceOp",[["balanceId",r.lookup("ClaimableBalanceId")]]),r.struct("BeginSponsoringFutureReservesOp",[["sponsoredId",r.lookup("AccountId")]]),r.enum("RevokeSponsorshipType",{revokeSponsorshipLedgerEntry:0,revokeSponsorshipSigner:1}),r.struct("RevokeSponsorshipOpSigner",[["accountId",r.lookup("AccountId")],["signerKey",r.lookup("SignerKey")]]),r.union("RevokeSponsorshipOp",{switchOn:r.lookup("RevokeSponsorshipType"),switchName:"type",switches:[["revokeSponsorshipLedgerEntry","ledgerKey"],["revokeSponsorshipSigner","signer"]],arms:{ledgerKey:r.lookup("LedgerKey"),signer:r.lookup("RevokeSponsorshipOpSigner")}}),r.struct("ClawbackOp",[["asset",r.lookup("Asset")],["from",r.lookup("MuxedAccount")],["amount",r.lookup("Int64")]]),r.struct("ClawbackClaimableBalanceOp",[["balanceId",r.lookup("ClaimableBalanceId")]]),r.struct("SetTrustLineFlagsOp",[["trustor",r.lookup("AccountId")],["asset",r.lookup("Asset")],["clearFlags",r.lookup("Uint32")],["setFlags",r.lookup("Uint32")]]),r.const("LIQUIDITY_POOL_FEE_V18",30),r.struct("LiquidityPoolDepositOp",[["liquidityPoolId",r.lookup("PoolId")],["maxAmountA",r.lookup("Int64")],["maxAmountB",r.lookup("Int64")],["minPrice",r.lookup("Price")],["maxPrice",r.lookup("Price")]]),r.struct("LiquidityPoolWithdrawOp",[["liquidityPoolId",r.lookup("PoolId")],["amount",r.lookup("Int64")],["minAmountA",r.lookup("Int64")],["minAmountB",r.lookup("Int64")]]),r.enum("HostFunctionType",{hostFunctionTypeInvokeContract:0,hostFunctionTypeCreateContract:1,hostFunctionTypeUploadContractWasm:2}),r.enum("ContractIdPreimageType",{contractIdPreimageFromAddress:0,contractIdPreimageFromAsset:1}),r.struct("ContractIdPreimageFromAddress",[["address",r.lookup("ScAddress")],["salt",r.lookup("Uint256")]]),r.union("ContractIdPreimage",{switchOn:r.lookup("ContractIdPreimageType"),switchName:"type",switches:[["contractIdPreimageFromAddress","fromAddress"],["contractIdPreimageFromAsset","fromAsset"]],arms:{fromAddress:r.lookup("ContractIdPreimageFromAddress"),fromAsset:r.lookup("Asset")}}),r.struct("CreateContractArgs",[["contractIdPreimage",r.lookup("ContractIdPreimage")],["executable",r.lookup("ContractExecutable")]]),r.struct("InvokeContractArgs",[["contractAddress",r.lookup("ScAddress")],["functionName",r.lookup("ScSymbol")],["args",r.varArray(r.lookup("ScVal"),2147483647)]]),r.union("HostFunction",{switchOn:r.lookup("HostFunctionType"),switchName:"type",switches:[["hostFunctionTypeInvokeContract","invokeContract"],["hostFunctionTypeCreateContract","createContract"],["hostFunctionTypeUploadContractWasm","wasm"]],arms:{invokeContract:r.lookup("InvokeContractArgs"),createContract:r.lookup("CreateContractArgs"),wasm:r.varOpaque()}}),r.enum("SorobanAuthorizedFunctionType",{sorobanAuthorizedFunctionTypeContractFn:0,sorobanAuthorizedFunctionTypeCreateContractHostFn:1}),r.union("SorobanAuthorizedFunction",{switchOn:r.lookup("SorobanAuthorizedFunctionType"),switchName:"type",switches:[["sorobanAuthorizedFunctionTypeContractFn","contractFn"],["sorobanAuthorizedFunctionTypeCreateContractHostFn","createContractHostFn"]],arms:{contractFn:r.lookup("InvokeContractArgs"),createContractHostFn:r.lookup("CreateContractArgs")}}),r.struct("SorobanAuthorizedInvocation",[["function",r.lookup("SorobanAuthorizedFunction")],["subInvocations",r.varArray(r.lookup("SorobanAuthorizedInvocation"),2147483647)]]),r.struct("SorobanAddressCredentials",[["address",r.lookup("ScAddress")],["nonce",r.lookup("Int64")],["signatureExpirationLedger",r.lookup("Uint32")],["signature",r.lookup("ScVal")]]),r.enum("SorobanCredentialsType",{sorobanCredentialsSourceAccount:0,sorobanCredentialsAddress:1}),r.union("SorobanCredentials",{switchOn:r.lookup("SorobanCredentialsType"),switchName:"type",switches:[["sorobanCredentialsSourceAccount",r.void()],["sorobanCredentialsAddress","address"]],arms:{address:r.lookup("SorobanAddressCredentials")}}),r.struct("SorobanAuthorizationEntry",[["credentials",r.lookup("SorobanCredentials")],["rootInvocation",r.lookup("SorobanAuthorizedInvocation")]]),r.struct("InvokeHostFunctionOp",[["hostFunction",r.lookup("HostFunction")],["auth",r.varArray(r.lookup("SorobanAuthorizationEntry"),2147483647)]]),r.struct("ExtendFootprintTtlOp",[["ext",r.lookup("ExtensionPoint")],["extendTo",r.lookup("Uint32")]]),r.struct("RestoreFootprintOp",[["ext",r.lookup("ExtensionPoint")]]),r.union("OperationBody",{switchOn:r.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountOp"],["payment","paymentOp"],["pathPaymentStrictReceive","pathPaymentStrictReceiveOp"],["manageSellOffer","manageSellOfferOp"],["createPassiveSellOffer","createPassiveSellOfferOp"],["setOptions","setOptionsOp"],["changeTrust","changeTrustOp"],["allowTrust","allowTrustOp"],["accountMerge","destination"],["inflation",r.void()],["manageData","manageDataOp"],["bumpSequence","bumpSequenceOp"],["manageBuyOffer","manageBuyOfferOp"],["pathPaymentStrictSend","pathPaymentStrictSendOp"],["createClaimableBalance","createClaimableBalanceOp"],["claimClaimableBalance","claimClaimableBalanceOp"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesOp"],["endSponsoringFutureReserves",r.void()],["revokeSponsorship","revokeSponsorshipOp"],["clawback","clawbackOp"],["clawbackClaimableBalance","clawbackClaimableBalanceOp"],["setTrustLineFlags","setTrustLineFlagsOp"],["liquidityPoolDeposit","liquidityPoolDepositOp"],["liquidityPoolWithdraw","liquidityPoolWithdrawOp"],["invokeHostFunction","invokeHostFunctionOp"],["extendFootprintTtl","extendFootprintTtlOp"],["restoreFootprint","restoreFootprintOp"]],arms:{createAccountOp:r.lookup("CreateAccountOp"),paymentOp:r.lookup("PaymentOp"),pathPaymentStrictReceiveOp:r.lookup("PathPaymentStrictReceiveOp"),manageSellOfferOp:r.lookup("ManageSellOfferOp"),createPassiveSellOfferOp:r.lookup("CreatePassiveSellOfferOp"),setOptionsOp:r.lookup("SetOptionsOp"),changeTrustOp:r.lookup("ChangeTrustOp"),allowTrustOp:r.lookup("AllowTrustOp"),destination:r.lookup("MuxedAccount"),manageDataOp:r.lookup("ManageDataOp"),bumpSequenceOp:r.lookup("BumpSequenceOp"),manageBuyOfferOp:r.lookup("ManageBuyOfferOp"),pathPaymentStrictSendOp:r.lookup("PathPaymentStrictSendOp"),createClaimableBalanceOp:r.lookup("CreateClaimableBalanceOp"),claimClaimableBalanceOp:r.lookup("ClaimClaimableBalanceOp"),beginSponsoringFutureReservesOp:r.lookup("BeginSponsoringFutureReservesOp"),revokeSponsorshipOp:r.lookup("RevokeSponsorshipOp"),clawbackOp:r.lookup("ClawbackOp"),clawbackClaimableBalanceOp:r.lookup("ClawbackClaimableBalanceOp"),setTrustLineFlagsOp:r.lookup("SetTrustLineFlagsOp"),liquidityPoolDepositOp:r.lookup("LiquidityPoolDepositOp"),liquidityPoolWithdrawOp:r.lookup("LiquidityPoolWithdrawOp"),invokeHostFunctionOp:r.lookup("InvokeHostFunctionOp"),extendFootprintTtlOp:r.lookup("ExtendFootprintTtlOp"),restoreFootprintOp:r.lookup("RestoreFootprintOp")}}),r.struct("Operation",[["sourceAccount",r.option(r.lookup("MuxedAccount"))],["body",r.lookup("OperationBody")]]),r.struct("HashIdPreimageOperationId",[["sourceAccount",r.lookup("AccountId")],["seqNum",r.lookup("SequenceNumber")],["opNum",r.lookup("Uint32")]]),r.struct("HashIdPreimageRevokeId",[["sourceAccount",r.lookup("AccountId")],["seqNum",r.lookup("SequenceNumber")],["opNum",r.lookup("Uint32")],["liquidityPoolId",r.lookup("PoolId")],["asset",r.lookup("Asset")]]),r.struct("HashIdPreimageContractId",[["networkId",r.lookup("Hash")],["contractIdPreimage",r.lookup("ContractIdPreimage")]]),r.struct("HashIdPreimageSorobanAuthorization",[["networkId",r.lookup("Hash")],["nonce",r.lookup("Int64")],["signatureExpirationLedger",r.lookup("Uint32")],["invocation",r.lookup("SorobanAuthorizedInvocation")]]),r.union("HashIdPreimage",{switchOn:r.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeOpId","operationId"],["envelopeTypePoolRevokeOpId","revokeId"],["envelopeTypeContractId","contractId"],["envelopeTypeSorobanAuthorization","sorobanAuthorization"]],arms:{operationId:r.lookup("HashIdPreimageOperationId"),revokeId:r.lookup("HashIdPreimageRevokeId"),contractId:r.lookup("HashIdPreimageContractId"),sorobanAuthorization:r.lookup("HashIdPreimageSorobanAuthorization")}}),r.enum("MemoType",{memoNone:0,memoText:1,memoId:2,memoHash:3,memoReturn:4}),r.union("Memo",{switchOn:r.lookup("MemoType"),switchName:"type",switches:[["memoNone",r.void()],["memoText","text"],["memoId","id"],["memoHash","hash"],["memoReturn","retHash"]],arms:{text:r.string(28),id:r.lookup("Uint64"),hash:r.lookup("Hash"),retHash:r.lookup("Hash")}}),r.struct("TimeBounds",[["minTime",r.lookup("TimePoint")],["maxTime",r.lookup("TimePoint")]]),r.struct("LedgerBounds",[["minLedger",r.lookup("Uint32")],["maxLedger",r.lookup("Uint32")]]),r.struct("PreconditionsV2",[["timeBounds",r.option(r.lookup("TimeBounds"))],["ledgerBounds",r.option(r.lookup("LedgerBounds"))],["minSeqNum",r.option(r.lookup("SequenceNumber"))],["minSeqAge",r.lookup("Duration")],["minSeqLedgerGap",r.lookup("Uint32")],["extraSigners",r.varArray(r.lookup("SignerKey"),2)]]),r.enum("PreconditionType",{precondNone:0,precondTime:1,precondV2:2}),r.union("Preconditions",{switchOn:r.lookup("PreconditionType"),switchName:"type",switches:[["precondNone",r.void()],["precondTime","timeBounds"],["precondV2","v2"]],arms:{timeBounds:r.lookup("TimeBounds"),v2:r.lookup("PreconditionsV2")}}),r.struct("LedgerFootprint",[["readOnly",r.varArray(r.lookup("LedgerKey"),2147483647)],["readWrite",r.varArray(r.lookup("LedgerKey"),2147483647)]]),r.struct("SorobanResources",[["footprint",r.lookup("LedgerFootprint")],["instructions",r.lookup("Uint32")],["readBytes",r.lookup("Uint32")],["writeBytes",r.lookup("Uint32")]]),r.struct("SorobanTransactionData",[["ext",r.lookup("ExtensionPoint")],["resources",r.lookup("SorobanResources")],["resourceFee",r.lookup("Int64")]]),r.union("TransactionV0Ext",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("TransactionV0",[["sourceAccountEd25519",r.lookup("Uint256")],["fee",r.lookup("Uint32")],["seqNum",r.lookup("SequenceNumber")],["timeBounds",r.option(r.lookup("TimeBounds"))],["memo",r.lookup("Memo")],["operations",r.varArray(r.lookup("Operation"),r.lookup("MAX_OPS_PER_TX"))],["ext",r.lookup("TransactionV0Ext")]]),r.struct("TransactionV0Envelope",[["tx",r.lookup("TransactionV0")],["signatures",r.varArray(r.lookup("DecoratedSignature"),20)]]),r.union("TransactionExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()],[1,"sorobanData"]],arms:{sorobanData:r.lookup("SorobanTransactionData")}}),r.struct("Transaction",[["sourceAccount",r.lookup("MuxedAccount")],["fee",r.lookup("Uint32")],["seqNum",r.lookup("SequenceNumber")],["cond",r.lookup("Preconditions")],["memo",r.lookup("Memo")],["operations",r.varArray(r.lookup("Operation"),r.lookup("MAX_OPS_PER_TX"))],["ext",r.lookup("TransactionExt")]]),r.struct("TransactionV1Envelope",[["tx",r.lookup("Transaction")],["signatures",r.varArray(r.lookup("DecoratedSignature"),20)]]),r.union("FeeBumpTransactionInnerTx",{switchOn:r.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","v1"]],arms:{v1:r.lookup("TransactionV1Envelope")}}),r.union("FeeBumpTransactionExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("FeeBumpTransaction",[["feeSource",r.lookup("MuxedAccount")],["fee",r.lookup("Int64")],["innerTx",r.lookup("FeeBumpTransactionInnerTx")],["ext",r.lookup("FeeBumpTransactionExt")]]),r.struct("FeeBumpTransactionEnvelope",[["tx",r.lookup("FeeBumpTransaction")],["signatures",r.varArray(r.lookup("DecoratedSignature"),20)]]),r.union("TransactionEnvelope",{switchOn:r.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTxV0","v0"],["envelopeTypeTx","v1"],["envelopeTypeTxFeeBump","feeBump"]],arms:{v0:r.lookup("TransactionV0Envelope"),v1:r.lookup("TransactionV1Envelope"),feeBump:r.lookup("FeeBumpTransactionEnvelope")}}),r.union("TransactionSignaturePayloadTaggedTransaction",{switchOn:r.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeTx","tx"],["envelopeTypeTxFeeBump","feeBump"]],arms:{tx:r.lookup("Transaction"),feeBump:r.lookup("FeeBumpTransaction")}}),r.struct("TransactionSignaturePayload",[["networkId",r.lookup("Hash")],["taggedTransaction",r.lookup("TransactionSignaturePayloadTaggedTransaction")]]),r.enum("ClaimAtomType",{claimAtomTypeV0:0,claimAtomTypeOrderBook:1,claimAtomTypeLiquidityPool:2}),r.struct("ClaimOfferAtomV0",[["sellerEd25519",r.lookup("Uint256")],["offerId",r.lookup("Int64")],["assetSold",r.lookup("Asset")],["amountSold",r.lookup("Int64")],["assetBought",r.lookup("Asset")],["amountBought",r.lookup("Int64")]]),r.struct("ClaimOfferAtom",[["sellerId",r.lookup("AccountId")],["offerId",r.lookup("Int64")],["assetSold",r.lookup("Asset")],["amountSold",r.lookup("Int64")],["assetBought",r.lookup("Asset")],["amountBought",r.lookup("Int64")]]),r.struct("ClaimLiquidityAtom",[["liquidityPoolId",r.lookup("PoolId")],["assetSold",r.lookup("Asset")],["amountSold",r.lookup("Int64")],["assetBought",r.lookup("Asset")],["amountBought",r.lookup("Int64")]]),r.union("ClaimAtom",{switchOn:r.lookup("ClaimAtomType"),switchName:"type",switches:[["claimAtomTypeV0","v0"],["claimAtomTypeOrderBook","orderBook"],["claimAtomTypeLiquidityPool","liquidityPool"]],arms:{v0:r.lookup("ClaimOfferAtomV0"),orderBook:r.lookup("ClaimOfferAtom"),liquidityPool:r.lookup("ClaimLiquidityAtom")}}),r.enum("CreateAccountResultCode",{createAccountSuccess:0,createAccountMalformed:-1,createAccountUnderfunded:-2,createAccountLowReserve:-3,createAccountAlreadyExist:-4}),r.union("CreateAccountResult",{switchOn:r.lookup("CreateAccountResultCode"),switchName:"code",switches:[["createAccountSuccess",r.void()],["createAccountMalformed",r.void()],["createAccountUnderfunded",r.void()],["createAccountLowReserve",r.void()],["createAccountAlreadyExist",r.void()]],arms:{}}),r.enum("PaymentResultCode",{paymentSuccess:0,paymentMalformed:-1,paymentUnderfunded:-2,paymentSrcNoTrust:-3,paymentSrcNotAuthorized:-4,paymentNoDestination:-5,paymentNoTrust:-6,paymentNotAuthorized:-7,paymentLineFull:-8,paymentNoIssuer:-9}),r.union("PaymentResult",{switchOn:r.lookup("PaymentResultCode"),switchName:"code",switches:[["paymentSuccess",r.void()],["paymentMalformed",r.void()],["paymentUnderfunded",r.void()],["paymentSrcNoTrust",r.void()],["paymentSrcNotAuthorized",r.void()],["paymentNoDestination",r.void()],["paymentNoTrust",r.void()],["paymentNotAuthorized",r.void()],["paymentLineFull",r.void()],["paymentNoIssuer",r.void()]],arms:{}}),r.enum("PathPaymentStrictReceiveResultCode",{pathPaymentStrictReceiveSuccess:0,pathPaymentStrictReceiveMalformed:-1,pathPaymentStrictReceiveUnderfunded:-2,pathPaymentStrictReceiveSrcNoTrust:-3,pathPaymentStrictReceiveSrcNotAuthorized:-4,pathPaymentStrictReceiveNoDestination:-5,pathPaymentStrictReceiveNoTrust:-6,pathPaymentStrictReceiveNotAuthorized:-7,pathPaymentStrictReceiveLineFull:-8,pathPaymentStrictReceiveNoIssuer:-9,pathPaymentStrictReceiveTooFewOffers:-10,pathPaymentStrictReceiveOfferCrossSelf:-11,pathPaymentStrictReceiveOverSendmax:-12}),r.struct("SimplePaymentResult",[["destination",r.lookup("AccountId")],["asset",r.lookup("Asset")],["amount",r.lookup("Int64")]]),r.struct("PathPaymentStrictReceiveResultSuccess",[["offers",r.varArray(r.lookup("ClaimAtom"),2147483647)],["last",r.lookup("SimplePaymentResult")]]),r.union("PathPaymentStrictReceiveResult",{switchOn:r.lookup("PathPaymentStrictReceiveResultCode"),switchName:"code",switches:[["pathPaymentStrictReceiveSuccess","success"],["pathPaymentStrictReceiveMalformed",r.void()],["pathPaymentStrictReceiveUnderfunded",r.void()],["pathPaymentStrictReceiveSrcNoTrust",r.void()],["pathPaymentStrictReceiveSrcNotAuthorized",r.void()],["pathPaymentStrictReceiveNoDestination",r.void()],["pathPaymentStrictReceiveNoTrust",r.void()],["pathPaymentStrictReceiveNotAuthorized",r.void()],["pathPaymentStrictReceiveLineFull",r.void()],["pathPaymentStrictReceiveNoIssuer","noIssuer"],["pathPaymentStrictReceiveTooFewOffers",r.void()],["pathPaymentStrictReceiveOfferCrossSelf",r.void()],["pathPaymentStrictReceiveOverSendmax",r.void()]],arms:{success:r.lookup("PathPaymentStrictReceiveResultSuccess"),noIssuer:r.lookup("Asset")}}),r.enum("PathPaymentStrictSendResultCode",{pathPaymentStrictSendSuccess:0,pathPaymentStrictSendMalformed:-1,pathPaymentStrictSendUnderfunded:-2,pathPaymentStrictSendSrcNoTrust:-3,pathPaymentStrictSendSrcNotAuthorized:-4,pathPaymentStrictSendNoDestination:-5,pathPaymentStrictSendNoTrust:-6,pathPaymentStrictSendNotAuthorized:-7,pathPaymentStrictSendLineFull:-8,pathPaymentStrictSendNoIssuer:-9,pathPaymentStrictSendTooFewOffers:-10,pathPaymentStrictSendOfferCrossSelf:-11,pathPaymentStrictSendUnderDestmin:-12}),r.struct("PathPaymentStrictSendResultSuccess",[["offers",r.varArray(r.lookup("ClaimAtom"),2147483647)],["last",r.lookup("SimplePaymentResult")]]),r.union("PathPaymentStrictSendResult",{switchOn:r.lookup("PathPaymentStrictSendResultCode"),switchName:"code",switches:[["pathPaymentStrictSendSuccess","success"],["pathPaymentStrictSendMalformed",r.void()],["pathPaymentStrictSendUnderfunded",r.void()],["pathPaymentStrictSendSrcNoTrust",r.void()],["pathPaymentStrictSendSrcNotAuthorized",r.void()],["pathPaymentStrictSendNoDestination",r.void()],["pathPaymentStrictSendNoTrust",r.void()],["pathPaymentStrictSendNotAuthorized",r.void()],["pathPaymentStrictSendLineFull",r.void()],["pathPaymentStrictSendNoIssuer","noIssuer"],["pathPaymentStrictSendTooFewOffers",r.void()],["pathPaymentStrictSendOfferCrossSelf",r.void()],["pathPaymentStrictSendUnderDestmin",r.void()]],arms:{success:r.lookup("PathPaymentStrictSendResultSuccess"),noIssuer:r.lookup("Asset")}}),r.enum("ManageSellOfferResultCode",{manageSellOfferSuccess:0,manageSellOfferMalformed:-1,manageSellOfferSellNoTrust:-2,manageSellOfferBuyNoTrust:-3,manageSellOfferSellNotAuthorized:-4,manageSellOfferBuyNotAuthorized:-5,manageSellOfferLineFull:-6,manageSellOfferUnderfunded:-7,manageSellOfferCrossSelf:-8,manageSellOfferSellNoIssuer:-9,manageSellOfferBuyNoIssuer:-10,manageSellOfferNotFound:-11,manageSellOfferLowReserve:-12}),r.enum("ManageOfferEffect",{manageOfferCreated:0,manageOfferUpdated:1,manageOfferDeleted:2}),r.union("ManageOfferSuccessResultOffer",{switchOn:r.lookup("ManageOfferEffect"),switchName:"effect",switches:[["manageOfferCreated","offer"],["manageOfferUpdated","offer"],["manageOfferDeleted",r.void()]],arms:{offer:r.lookup("OfferEntry")}}),r.struct("ManageOfferSuccessResult",[["offersClaimed",r.varArray(r.lookup("ClaimAtom"),2147483647)],["offer",r.lookup("ManageOfferSuccessResultOffer")]]),r.union("ManageSellOfferResult",{switchOn:r.lookup("ManageSellOfferResultCode"),switchName:"code",switches:[["manageSellOfferSuccess","success"],["manageSellOfferMalformed",r.void()],["manageSellOfferSellNoTrust",r.void()],["manageSellOfferBuyNoTrust",r.void()],["manageSellOfferSellNotAuthorized",r.void()],["manageSellOfferBuyNotAuthorized",r.void()],["manageSellOfferLineFull",r.void()],["manageSellOfferUnderfunded",r.void()],["manageSellOfferCrossSelf",r.void()],["manageSellOfferSellNoIssuer",r.void()],["manageSellOfferBuyNoIssuer",r.void()],["manageSellOfferNotFound",r.void()],["manageSellOfferLowReserve",r.void()]],arms:{success:r.lookup("ManageOfferSuccessResult")}}),r.enum("ManageBuyOfferResultCode",{manageBuyOfferSuccess:0,manageBuyOfferMalformed:-1,manageBuyOfferSellNoTrust:-2,manageBuyOfferBuyNoTrust:-3,manageBuyOfferSellNotAuthorized:-4,manageBuyOfferBuyNotAuthorized:-5,manageBuyOfferLineFull:-6,manageBuyOfferUnderfunded:-7,manageBuyOfferCrossSelf:-8,manageBuyOfferSellNoIssuer:-9,manageBuyOfferBuyNoIssuer:-10,manageBuyOfferNotFound:-11,manageBuyOfferLowReserve:-12}),r.union("ManageBuyOfferResult",{switchOn:r.lookup("ManageBuyOfferResultCode"),switchName:"code",switches:[["manageBuyOfferSuccess","success"],["manageBuyOfferMalformed",r.void()],["manageBuyOfferSellNoTrust",r.void()],["manageBuyOfferBuyNoTrust",r.void()],["manageBuyOfferSellNotAuthorized",r.void()],["manageBuyOfferBuyNotAuthorized",r.void()],["manageBuyOfferLineFull",r.void()],["manageBuyOfferUnderfunded",r.void()],["manageBuyOfferCrossSelf",r.void()],["manageBuyOfferSellNoIssuer",r.void()],["manageBuyOfferBuyNoIssuer",r.void()],["manageBuyOfferNotFound",r.void()],["manageBuyOfferLowReserve",r.void()]],arms:{success:r.lookup("ManageOfferSuccessResult")}}),r.enum("SetOptionsResultCode",{setOptionsSuccess:0,setOptionsLowReserve:-1,setOptionsTooManySigners:-2,setOptionsBadFlags:-3,setOptionsInvalidInflation:-4,setOptionsCantChange:-5,setOptionsUnknownFlag:-6,setOptionsThresholdOutOfRange:-7,setOptionsBadSigner:-8,setOptionsInvalidHomeDomain:-9,setOptionsAuthRevocableRequired:-10}),r.union("SetOptionsResult",{switchOn:r.lookup("SetOptionsResultCode"),switchName:"code",switches:[["setOptionsSuccess",r.void()],["setOptionsLowReserve",r.void()],["setOptionsTooManySigners",r.void()],["setOptionsBadFlags",r.void()],["setOptionsInvalidInflation",r.void()],["setOptionsCantChange",r.void()],["setOptionsUnknownFlag",r.void()],["setOptionsThresholdOutOfRange",r.void()],["setOptionsBadSigner",r.void()],["setOptionsInvalidHomeDomain",r.void()],["setOptionsAuthRevocableRequired",r.void()]],arms:{}}),r.enum("ChangeTrustResultCode",{changeTrustSuccess:0,changeTrustMalformed:-1,changeTrustNoIssuer:-2,changeTrustInvalidLimit:-3,changeTrustLowReserve:-4,changeTrustSelfNotAllowed:-5,changeTrustTrustLineMissing:-6,changeTrustCannotDelete:-7,changeTrustNotAuthMaintainLiabilities:-8}),r.union("ChangeTrustResult",{switchOn:r.lookup("ChangeTrustResultCode"),switchName:"code",switches:[["changeTrustSuccess",r.void()],["changeTrustMalformed",r.void()],["changeTrustNoIssuer",r.void()],["changeTrustInvalidLimit",r.void()],["changeTrustLowReserve",r.void()],["changeTrustSelfNotAllowed",r.void()],["changeTrustTrustLineMissing",r.void()],["changeTrustCannotDelete",r.void()],["changeTrustNotAuthMaintainLiabilities",r.void()]],arms:{}}),r.enum("AllowTrustResultCode",{allowTrustSuccess:0,allowTrustMalformed:-1,allowTrustNoTrustLine:-2,allowTrustTrustNotRequired:-3,allowTrustCantRevoke:-4,allowTrustSelfNotAllowed:-5,allowTrustLowReserve:-6}),r.union("AllowTrustResult",{switchOn:r.lookup("AllowTrustResultCode"),switchName:"code",switches:[["allowTrustSuccess",r.void()],["allowTrustMalformed",r.void()],["allowTrustNoTrustLine",r.void()],["allowTrustTrustNotRequired",r.void()],["allowTrustCantRevoke",r.void()],["allowTrustSelfNotAllowed",r.void()],["allowTrustLowReserve",r.void()]],arms:{}}),r.enum("AccountMergeResultCode",{accountMergeSuccess:0,accountMergeMalformed:-1,accountMergeNoAccount:-2,accountMergeImmutableSet:-3,accountMergeHasSubEntries:-4,accountMergeSeqnumTooFar:-5,accountMergeDestFull:-6,accountMergeIsSponsor:-7}),r.union("AccountMergeResult",{switchOn:r.lookup("AccountMergeResultCode"),switchName:"code",switches:[["accountMergeSuccess","sourceAccountBalance"],["accountMergeMalformed",r.void()],["accountMergeNoAccount",r.void()],["accountMergeImmutableSet",r.void()],["accountMergeHasSubEntries",r.void()],["accountMergeSeqnumTooFar",r.void()],["accountMergeDestFull",r.void()],["accountMergeIsSponsor",r.void()]],arms:{sourceAccountBalance:r.lookup("Int64")}}),r.enum("InflationResultCode",{inflationSuccess:0,inflationNotTime:-1}),r.struct("InflationPayout",[["destination",r.lookup("AccountId")],["amount",r.lookup("Int64")]]),r.union("InflationResult",{switchOn:r.lookup("InflationResultCode"),switchName:"code",switches:[["inflationSuccess","payouts"],["inflationNotTime",r.void()]],arms:{payouts:r.varArray(r.lookup("InflationPayout"),2147483647)}}),r.enum("ManageDataResultCode",{manageDataSuccess:0,manageDataNotSupportedYet:-1,manageDataNameNotFound:-2,manageDataLowReserve:-3,manageDataInvalidName:-4}),r.union("ManageDataResult",{switchOn:r.lookup("ManageDataResultCode"),switchName:"code",switches:[["manageDataSuccess",r.void()],["manageDataNotSupportedYet",r.void()],["manageDataNameNotFound",r.void()],["manageDataLowReserve",r.void()],["manageDataInvalidName",r.void()]],arms:{}}),r.enum("BumpSequenceResultCode",{bumpSequenceSuccess:0,bumpSequenceBadSeq:-1}),r.union("BumpSequenceResult",{switchOn:r.lookup("BumpSequenceResultCode"),switchName:"code",switches:[["bumpSequenceSuccess",r.void()],["bumpSequenceBadSeq",r.void()]],arms:{}}),r.enum("CreateClaimableBalanceResultCode",{createClaimableBalanceSuccess:0,createClaimableBalanceMalformed:-1,createClaimableBalanceLowReserve:-2,createClaimableBalanceNoTrust:-3,createClaimableBalanceNotAuthorized:-4,createClaimableBalanceUnderfunded:-5}),r.union("CreateClaimableBalanceResult",{switchOn:r.lookup("CreateClaimableBalanceResultCode"),switchName:"code",switches:[["createClaimableBalanceSuccess","balanceId"],["createClaimableBalanceMalformed",r.void()],["createClaimableBalanceLowReserve",r.void()],["createClaimableBalanceNoTrust",r.void()],["createClaimableBalanceNotAuthorized",r.void()],["createClaimableBalanceUnderfunded",r.void()]],arms:{balanceId:r.lookup("ClaimableBalanceId")}}),r.enum("ClaimClaimableBalanceResultCode",{claimClaimableBalanceSuccess:0,claimClaimableBalanceDoesNotExist:-1,claimClaimableBalanceCannotClaim:-2,claimClaimableBalanceLineFull:-3,claimClaimableBalanceNoTrust:-4,claimClaimableBalanceNotAuthorized:-5}),r.union("ClaimClaimableBalanceResult",{switchOn:r.lookup("ClaimClaimableBalanceResultCode"),switchName:"code",switches:[["claimClaimableBalanceSuccess",r.void()],["claimClaimableBalanceDoesNotExist",r.void()],["claimClaimableBalanceCannotClaim",r.void()],["claimClaimableBalanceLineFull",r.void()],["claimClaimableBalanceNoTrust",r.void()],["claimClaimableBalanceNotAuthorized",r.void()]],arms:{}}),r.enum("BeginSponsoringFutureReservesResultCode",{beginSponsoringFutureReservesSuccess:0,beginSponsoringFutureReservesMalformed:-1,beginSponsoringFutureReservesAlreadySponsored:-2,beginSponsoringFutureReservesRecursive:-3}),r.union("BeginSponsoringFutureReservesResult",{switchOn:r.lookup("BeginSponsoringFutureReservesResultCode"),switchName:"code",switches:[["beginSponsoringFutureReservesSuccess",r.void()],["beginSponsoringFutureReservesMalformed",r.void()],["beginSponsoringFutureReservesAlreadySponsored",r.void()],["beginSponsoringFutureReservesRecursive",r.void()]],arms:{}}),r.enum("EndSponsoringFutureReservesResultCode",{endSponsoringFutureReservesSuccess:0,endSponsoringFutureReservesNotSponsored:-1}),r.union("EndSponsoringFutureReservesResult",{switchOn:r.lookup("EndSponsoringFutureReservesResultCode"),switchName:"code",switches:[["endSponsoringFutureReservesSuccess",r.void()],["endSponsoringFutureReservesNotSponsored",r.void()]],arms:{}}),r.enum("RevokeSponsorshipResultCode",{revokeSponsorshipSuccess:0,revokeSponsorshipDoesNotExist:-1,revokeSponsorshipNotSponsor:-2,revokeSponsorshipLowReserve:-3,revokeSponsorshipOnlyTransferable:-4,revokeSponsorshipMalformed:-5}),r.union("RevokeSponsorshipResult",{switchOn:r.lookup("RevokeSponsorshipResultCode"),switchName:"code",switches:[["revokeSponsorshipSuccess",r.void()],["revokeSponsorshipDoesNotExist",r.void()],["revokeSponsorshipNotSponsor",r.void()],["revokeSponsorshipLowReserve",r.void()],["revokeSponsorshipOnlyTransferable",r.void()],["revokeSponsorshipMalformed",r.void()]],arms:{}}),r.enum("ClawbackResultCode",{clawbackSuccess:0,clawbackMalformed:-1,clawbackNotClawbackEnabled:-2,clawbackNoTrust:-3,clawbackUnderfunded:-4}),r.union("ClawbackResult",{switchOn:r.lookup("ClawbackResultCode"),switchName:"code",switches:[["clawbackSuccess",r.void()],["clawbackMalformed",r.void()],["clawbackNotClawbackEnabled",r.void()],["clawbackNoTrust",r.void()],["clawbackUnderfunded",r.void()]],arms:{}}),r.enum("ClawbackClaimableBalanceResultCode",{clawbackClaimableBalanceSuccess:0,clawbackClaimableBalanceDoesNotExist:-1,clawbackClaimableBalanceNotIssuer:-2,clawbackClaimableBalanceNotClawbackEnabled:-3}),r.union("ClawbackClaimableBalanceResult",{switchOn:r.lookup("ClawbackClaimableBalanceResultCode"),switchName:"code",switches:[["clawbackClaimableBalanceSuccess",r.void()],["clawbackClaimableBalanceDoesNotExist",r.void()],["clawbackClaimableBalanceNotIssuer",r.void()],["clawbackClaimableBalanceNotClawbackEnabled",r.void()]],arms:{}}),r.enum("SetTrustLineFlagsResultCode",{setTrustLineFlagsSuccess:0,setTrustLineFlagsMalformed:-1,setTrustLineFlagsNoTrustLine:-2,setTrustLineFlagsCantRevoke:-3,setTrustLineFlagsInvalidState:-4,setTrustLineFlagsLowReserve:-5}),r.union("SetTrustLineFlagsResult",{switchOn:r.lookup("SetTrustLineFlagsResultCode"),switchName:"code",switches:[["setTrustLineFlagsSuccess",r.void()],["setTrustLineFlagsMalformed",r.void()],["setTrustLineFlagsNoTrustLine",r.void()],["setTrustLineFlagsCantRevoke",r.void()],["setTrustLineFlagsInvalidState",r.void()],["setTrustLineFlagsLowReserve",r.void()]],arms:{}}),r.enum("LiquidityPoolDepositResultCode",{liquidityPoolDepositSuccess:0,liquidityPoolDepositMalformed:-1,liquidityPoolDepositNoTrust:-2,liquidityPoolDepositNotAuthorized:-3,liquidityPoolDepositUnderfunded:-4,liquidityPoolDepositLineFull:-5,liquidityPoolDepositBadPrice:-6,liquidityPoolDepositPoolFull:-7}),r.union("LiquidityPoolDepositResult",{switchOn:r.lookup("LiquidityPoolDepositResultCode"),switchName:"code",switches:[["liquidityPoolDepositSuccess",r.void()],["liquidityPoolDepositMalformed",r.void()],["liquidityPoolDepositNoTrust",r.void()],["liquidityPoolDepositNotAuthorized",r.void()],["liquidityPoolDepositUnderfunded",r.void()],["liquidityPoolDepositLineFull",r.void()],["liquidityPoolDepositBadPrice",r.void()],["liquidityPoolDepositPoolFull",r.void()]],arms:{}}),r.enum("LiquidityPoolWithdrawResultCode",{liquidityPoolWithdrawSuccess:0,liquidityPoolWithdrawMalformed:-1,liquidityPoolWithdrawNoTrust:-2,liquidityPoolWithdrawUnderfunded:-3,liquidityPoolWithdrawLineFull:-4,liquidityPoolWithdrawUnderMinimum:-5}),r.union("LiquidityPoolWithdrawResult",{switchOn:r.lookup("LiquidityPoolWithdrawResultCode"),switchName:"code",switches:[["liquidityPoolWithdrawSuccess",r.void()],["liquidityPoolWithdrawMalformed",r.void()],["liquidityPoolWithdrawNoTrust",r.void()],["liquidityPoolWithdrawUnderfunded",r.void()],["liquidityPoolWithdrawLineFull",r.void()],["liquidityPoolWithdrawUnderMinimum",r.void()]],arms:{}}),r.enum("InvokeHostFunctionResultCode",{invokeHostFunctionSuccess:0,invokeHostFunctionMalformed:-1,invokeHostFunctionTrapped:-2,invokeHostFunctionResourceLimitExceeded:-3,invokeHostFunctionEntryArchived:-4,invokeHostFunctionInsufficientRefundableFee:-5}),r.union("InvokeHostFunctionResult",{switchOn:r.lookup("InvokeHostFunctionResultCode"),switchName:"code",switches:[["invokeHostFunctionSuccess","success"],["invokeHostFunctionMalformed",r.void()],["invokeHostFunctionTrapped",r.void()],["invokeHostFunctionResourceLimitExceeded",r.void()],["invokeHostFunctionEntryArchived",r.void()],["invokeHostFunctionInsufficientRefundableFee",r.void()]],arms:{success:r.lookup("Hash")}}),r.enum("ExtendFootprintTtlResultCode",{extendFootprintTtlSuccess:0,extendFootprintTtlMalformed:-1,extendFootprintTtlResourceLimitExceeded:-2,extendFootprintTtlInsufficientRefundableFee:-3}),r.union("ExtendFootprintTtlResult",{switchOn:r.lookup("ExtendFootprintTtlResultCode"),switchName:"code",switches:[["extendFootprintTtlSuccess",r.void()],["extendFootprintTtlMalformed",r.void()],["extendFootprintTtlResourceLimitExceeded",r.void()],["extendFootprintTtlInsufficientRefundableFee",r.void()]],arms:{}}),r.enum("RestoreFootprintResultCode",{restoreFootprintSuccess:0,restoreFootprintMalformed:-1,restoreFootprintResourceLimitExceeded:-2,restoreFootprintInsufficientRefundableFee:-3}),r.union("RestoreFootprintResult",{switchOn:r.lookup("RestoreFootprintResultCode"),switchName:"code",switches:[["restoreFootprintSuccess",r.void()],["restoreFootprintMalformed",r.void()],["restoreFootprintResourceLimitExceeded",r.void()],["restoreFootprintInsufficientRefundableFee",r.void()]],arms:{}}),r.enum("OperationResultCode",{opInner:0,opBadAuth:-1,opNoAccount:-2,opNotSupported:-3,opTooManySubentries:-4,opExceededWorkLimit:-5,opTooManySponsoring:-6}),r.union("OperationResultTr",{switchOn:r.lookup("OperationType"),switchName:"type",switches:[["createAccount","createAccountResult"],["payment","paymentResult"],["pathPaymentStrictReceive","pathPaymentStrictReceiveResult"],["manageSellOffer","manageSellOfferResult"],["createPassiveSellOffer","createPassiveSellOfferResult"],["setOptions","setOptionsResult"],["changeTrust","changeTrustResult"],["allowTrust","allowTrustResult"],["accountMerge","accountMergeResult"],["inflation","inflationResult"],["manageData","manageDataResult"],["bumpSequence","bumpSeqResult"],["manageBuyOffer","manageBuyOfferResult"],["pathPaymentStrictSend","pathPaymentStrictSendResult"],["createClaimableBalance","createClaimableBalanceResult"],["claimClaimableBalance","claimClaimableBalanceResult"],["beginSponsoringFutureReserves","beginSponsoringFutureReservesResult"],["endSponsoringFutureReserves","endSponsoringFutureReservesResult"],["revokeSponsorship","revokeSponsorshipResult"],["clawback","clawbackResult"],["clawbackClaimableBalance","clawbackClaimableBalanceResult"],["setTrustLineFlags","setTrustLineFlagsResult"],["liquidityPoolDeposit","liquidityPoolDepositResult"],["liquidityPoolWithdraw","liquidityPoolWithdrawResult"],["invokeHostFunction","invokeHostFunctionResult"],["extendFootprintTtl","extendFootprintTtlResult"],["restoreFootprint","restoreFootprintResult"]],arms:{createAccountResult:r.lookup("CreateAccountResult"),paymentResult:r.lookup("PaymentResult"),pathPaymentStrictReceiveResult:r.lookup("PathPaymentStrictReceiveResult"),manageSellOfferResult:r.lookup("ManageSellOfferResult"),createPassiveSellOfferResult:r.lookup("ManageSellOfferResult"),setOptionsResult:r.lookup("SetOptionsResult"),changeTrustResult:r.lookup("ChangeTrustResult"),allowTrustResult:r.lookup("AllowTrustResult"),accountMergeResult:r.lookup("AccountMergeResult"),inflationResult:r.lookup("InflationResult"),manageDataResult:r.lookup("ManageDataResult"),bumpSeqResult:r.lookup("BumpSequenceResult"),manageBuyOfferResult:r.lookup("ManageBuyOfferResult"),pathPaymentStrictSendResult:r.lookup("PathPaymentStrictSendResult"),createClaimableBalanceResult:r.lookup("CreateClaimableBalanceResult"),claimClaimableBalanceResult:r.lookup("ClaimClaimableBalanceResult"),beginSponsoringFutureReservesResult:r.lookup("BeginSponsoringFutureReservesResult"),endSponsoringFutureReservesResult:r.lookup("EndSponsoringFutureReservesResult"),revokeSponsorshipResult:r.lookup("RevokeSponsorshipResult"),clawbackResult:r.lookup("ClawbackResult"),clawbackClaimableBalanceResult:r.lookup("ClawbackClaimableBalanceResult"),setTrustLineFlagsResult:r.lookup("SetTrustLineFlagsResult"),liquidityPoolDepositResult:r.lookup("LiquidityPoolDepositResult"),liquidityPoolWithdrawResult:r.lookup("LiquidityPoolWithdrawResult"),invokeHostFunctionResult:r.lookup("InvokeHostFunctionResult"),extendFootprintTtlResult:r.lookup("ExtendFootprintTtlResult"),restoreFootprintResult:r.lookup("RestoreFootprintResult")}}),r.union("OperationResult",{switchOn:r.lookup("OperationResultCode"),switchName:"code",switches:[["opInner","tr"],["opBadAuth",r.void()],["opNoAccount",r.void()],["opNotSupported",r.void()],["opTooManySubentries",r.void()],["opExceededWorkLimit",r.void()],["opTooManySponsoring",r.void()]],arms:{tr:r.lookup("OperationResultTr")}}),r.enum("TransactionResultCode",{txFeeBumpInnerSuccess:1,txSuccess:0,txFailed:-1,txTooEarly:-2,txTooLate:-3,txMissingOperation:-4,txBadSeq:-5,txBadAuth:-6,txInsufficientBalance:-7,txNoAccount:-8,txInsufficientFee:-9,txBadAuthExtra:-10,txInternalError:-11,txNotSupported:-12,txFeeBumpInnerFailed:-13,txBadSponsorship:-14,txBadMinSeqAgeOrGap:-15,txMalformed:-16,txSorobanInvalid:-17}),r.union("InnerTransactionResultResult",{switchOn:r.lookup("TransactionResultCode"),switchName:"code",switches:[["txSuccess","results"],["txFailed","results"],["txTooEarly",r.void()],["txTooLate",r.void()],["txMissingOperation",r.void()],["txBadSeq",r.void()],["txBadAuth",r.void()],["txInsufficientBalance",r.void()],["txNoAccount",r.void()],["txInsufficientFee",r.void()],["txBadAuthExtra",r.void()],["txInternalError",r.void()],["txNotSupported",r.void()],["txBadSponsorship",r.void()],["txBadMinSeqAgeOrGap",r.void()],["txMalformed",r.void()],["txSorobanInvalid",r.void()]],arms:{results:r.varArray(r.lookup("OperationResult"),2147483647)}}),r.union("InnerTransactionResultExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("InnerTransactionResult",[["feeCharged",r.lookup("Int64")],["result",r.lookup("InnerTransactionResultResult")],["ext",r.lookup("InnerTransactionResultExt")]]),r.struct("InnerTransactionResultPair",[["transactionHash",r.lookup("Hash")],["result",r.lookup("InnerTransactionResult")]]),r.union("TransactionResultResult",{switchOn:r.lookup("TransactionResultCode"),switchName:"code",switches:[["txFeeBumpInnerSuccess","innerResultPair"],["txFeeBumpInnerFailed","innerResultPair"],["txSuccess","results"],["txFailed","results"],["txTooEarly",r.void()],["txTooLate",r.void()],["txMissingOperation",r.void()],["txBadSeq",r.void()],["txBadAuth",r.void()],["txInsufficientBalance",r.void()],["txNoAccount",r.void()],["txInsufficientFee",r.void()],["txBadAuthExtra",r.void()],["txInternalError",r.void()],["txNotSupported",r.void()],["txBadSponsorship",r.void()],["txBadMinSeqAgeOrGap",r.void()],["txMalformed",r.void()],["txSorobanInvalid",r.void()]],arms:{innerResultPair:r.lookup("InnerTransactionResultPair"),results:r.varArray(r.lookup("OperationResult"),2147483647)}}),r.union("TransactionResultExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("TransactionResult",[["feeCharged",r.lookup("Int64")],["result",r.lookup("TransactionResultResult")],["ext",r.lookup("TransactionResultExt")]]),r.typedef("Hash",r.opaque(32)),r.typedef("Uint256",r.opaque(32)),r.typedef("Uint32",r.uint()),r.typedef("Int32",r.int()),r.typedef("Uint64",r.uhyper()),r.typedef("Int64",r.hyper()),r.typedef("TimePoint",r.lookup("Uint64")),r.typedef("Duration",r.lookup("Uint64")),r.union("ExtensionPoint",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.enum("CryptoKeyType",{keyTypeEd25519:0,keyTypePreAuthTx:1,keyTypeHashX:2,keyTypeEd25519SignedPayload:3,keyTypeMuxedEd25519:256}),r.enum("PublicKeyType",{publicKeyTypeEd25519:0}),r.enum("SignerKeyType",{signerKeyTypeEd25519:0,signerKeyTypePreAuthTx:1,signerKeyTypeHashX:2,signerKeyTypeEd25519SignedPayload:3}),r.union("PublicKey",{switchOn:r.lookup("PublicKeyType"),switchName:"type",switches:[["publicKeyTypeEd25519","ed25519"]],arms:{ed25519:r.lookup("Uint256")}}),r.struct("SignerKeyEd25519SignedPayload",[["ed25519",r.lookup("Uint256")],["payload",r.varOpaque(64)]]),r.union("SignerKey",{switchOn:r.lookup("SignerKeyType"),switchName:"type",switches:[["signerKeyTypeEd25519","ed25519"],["signerKeyTypePreAuthTx","preAuthTx"],["signerKeyTypeHashX","hashX"],["signerKeyTypeEd25519SignedPayload","ed25519SignedPayload"]],arms:{ed25519:r.lookup("Uint256"),preAuthTx:r.lookup("Uint256"),hashX:r.lookup("Uint256"),ed25519SignedPayload:r.lookup("SignerKeyEd25519SignedPayload")}}),r.typedef("Signature",r.varOpaque(64)),r.typedef("SignatureHint",r.opaque(4)),r.typedef("NodeId",r.lookup("PublicKey")),r.typedef("AccountId",r.lookup("PublicKey")),r.struct("Curve25519Secret",[["key",r.opaque(32)]]),r.struct("Curve25519Public",[["key",r.opaque(32)]]),r.struct("HmacSha256Key",[["key",r.opaque(32)]]),r.struct("HmacSha256Mac",[["mac",r.opaque(32)]]),r.enum("ScValType",{scvBool:0,scvVoid:1,scvError:2,scvU32:3,scvI32:4,scvU64:5,scvI64:6,scvTimepoint:7,scvDuration:8,scvU128:9,scvI128:10,scvU256:11,scvI256:12,scvBytes:13,scvString:14,scvSymbol:15,scvVec:16,scvMap:17,scvAddress:18,scvContractInstance:19,scvLedgerKeyContractInstance:20,scvLedgerKeyNonce:21}),r.enum("ScErrorType",{sceContract:0,sceWasmVm:1,sceContext:2,sceStorage:3,sceObject:4,sceCrypto:5,sceEvents:6,sceBudget:7,sceValue:8,sceAuth:9}),r.enum("ScErrorCode",{scecArithDomain:0,scecIndexBounds:1,scecInvalidInput:2,scecMissingValue:3,scecExistingValue:4,scecExceededLimit:5,scecInvalidAction:6,scecInternalError:7,scecUnexpectedType:8,scecUnexpectedSize:9}),r.union("ScError",{switchOn:r.lookup("ScErrorType"),switchName:"type",switches:[["sceContract","contractCode"],["sceWasmVm","code"],["sceContext","code"],["sceStorage","code"],["sceObject","code"],["sceCrypto","code"],["sceEvents","code"],["sceBudget","code"],["sceValue","code"],["sceAuth","code"]],arms:{contractCode:r.lookup("Uint32"),code:r.lookup("ScErrorCode")}}),r.struct("UInt128Parts",[["hi",r.lookup("Uint64")],["lo",r.lookup("Uint64")]]),r.struct("Int128Parts",[["hi",r.lookup("Int64")],["lo",r.lookup("Uint64")]]),r.struct("UInt256Parts",[["hiHi",r.lookup("Uint64")],["hiLo",r.lookup("Uint64")],["loHi",r.lookup("Uint64")],["loLo",r.lookup("Uint64")]]),r.struct("Int256Parts",[["hiHi",r.lookup("Int64")],["hiLo",r.lookup("Uint64")],["loHi",r.lookup("Uint64")],["loLo",r.lookup("Uint64")]]),r.enum("ContractExecutableType",{contractExecutableWasm:0,contractExecutableStellarAsset:1}),r.union("ContractExecutable",{switchOn:r.lookup("ContractExecutableType"),switchName:"type",switches:[["contractExecutableWasm","wasmHash"],["contractExecutableStellarAsset",r.void()]],arms:{wasmHash:r.lookup("Hash")}}),r.enum("ScAddressType",{scAddressTypeAccount:0,scAddressTypeContract:1}),r.union("ScAddress",{switchOn:r.lookup("ScAddressType"),switchName:"type",switches:[["scAddressTypeAccount","accountId"],["scAddressTypeContract","contractId"]],arms:{accountId:r.lookup("AccountId"),contractId:r.lookup("Hash")}}),r.const("SCSYMBOL_LIMIT",32),r.typedef("ScVec",r.varArray(r.lookup("ScVal"),2147483647)),r.typedef("ScMap",r.varArray(r.lookup("ScMapEntry"),2147483647)),r.typedef("ScBytes",r.varOpaque()),r.typedef("ScString",r.string()),r.typedef("ScSymbol",r.string(32)),r.struct("ScNonceKey",[["nonce",r.lookup("Int64")]]),r.struct("ScContractInstance",[["executable",r.lookup("ContractExecutable")],["storage",r.option(r.lookup("ScMap"))]]),r.union("ScVal",{switchOn:r.lookup("ScValType"),switchName:"type",switches:[["scvBool","b"],["scvVoid",r.void()],["scvError","error"],["scvU32","u32"],["scvI32","i32"],["scvU64","u64"],["scvI64","i64"],["scvTimepoint","timepoint"],["scvDuration","duration"],["scvU128","u128"],["scvI128","i128"],["scvU256","u256"],["scvI256","i256"],["scvBytes","bytes"],["scvString","str"],["scvSymbol","sym"],["scvVec","vec"],["scvMap","map"],["scvAddress","address"],["scvLedgerKeyContractInstance",r.void()],["scvLedgerKeyNonce","nonceKey"],["scvContractInstance","instance"]],arms:{b:r.bool(),error:r.lookup("ScError"),u32:r.lookup("Uint32"),i32:r.lookup("Int32"),u64:r.lookup("Uint64"),i64:r.lookup("Int64"),timepoint:r.lookup("TimePoint"),duration:r.lookup("Duration"),u128:r.lookup("UInt128Parts"),i128:r.lookup("Int128Parts"),u256:r.lookup("UInt256Parts"),i256:r.lookup("Int256Parts"),bytes:r.lookup("ScBytes"),str:r.lookup("ScString"),sym:r.lookup("ScSymbol"),vec:r.option(r.lookup("ScVec")),map:r.option(r.lookup("ScMap")),address:r.lookup("ScAddress"),nonceKey:r.lookup("ScNonceKey"),instance:r.lookup("ScContractInstance")}}),r.struct("ScMapEntry",[["key",r.lookup("ScVal")],["val",r.lookup("ScVal")]]),r.enum("ScEnvMetaKind",{scEnvMetaKindInterfaceVersion:0}),r.union("ScEnvMetaEntry",{switchOn:r.lookup("ScEnvMetaKind"),switchName:"kind",switches:[["scEnvMetaKindInterfaceVersion","interfaceVersion"]],arms:{interfaceVersion:r.lookup("Uint64")}}),r.struct("ScMetaV0",[["key",r.string()],["val",r.string()]]),r.enum("ScMetaKind",{scMetaV0:0}),r.union("ScMetaEntry",{switchOn:r.lookup("ScMetaKind"),switchName:"kind",switches:[["scMetaV0","v0"]],arms:{v0:r.lookup("ScMetaV0")}}),r.const("SC_SPEC_DOC_LIMIT",1024),r.enum("ScSpecType",{scSpecTypeVal:0,scSpecTypeBool:1,scSpecTypeVoid:2,scSpecTypeError:3,scSpecTypeU32:4,scSpecTypeI32:5,scSpecTypeU64:6,scSpecTypeI64:7,scSpecTypeTimepoint:8,scSpecTypeDuration:9,scSpecTypeU128:10,scSpecTypeI128:11,scSpecTypeU256:12,scSpecTypeI256:13,scSpecTypeBytes:14,scSpecTypeString:16,scSpecTypeSymbol:17,scSpecTypeAddress:19,scSpecTypeOption:1e3,scSpecTypeResult:1001,scSpecTypeVec:1002,scSpecTypeMap:1004,scSpecTypeTuple:1005,scSpecTypeBytesN:1006,scSpecTypeUdt:2e3}),r.struct("ScSpecTypeOption",[["valueType",r.lookup("ScSpecTypeDef")]]),r.struct("ScSpecTypeResult",[["okType",r.lookup("ScSpecTypeDef")],["errorType",r.lookup("ScSpecTypeDef")]]),r.struct("ScSpecTypeVec",[["elementType",r.lookup("ScSpecTypeDef")]]),r.struct("ScSpecTypeMap",[["keyType",r.lookup("ScSpecTypeDef")],["valueType",r.lookup("ScSpecTypeDef")]]),r.struct("ScSpecTypeTuple",[["valueTypes",r.varArray(r.lookup("ScSpecTypeDef"),12)]]),r.struct("ScSpecTypeBytesN",[["n",r.lookup("Uint32")]]),r.struct("ScSpecTypeUdt",[["name",r.string(60)]]),r.union("ScSpecTypeDef",{switchOn:r.lookup("ScSpecType"),switchName:"type",switches:[["scSpecTypeVal",r.void()],["scSpecTypeBool",r.void()],["scSpecTypeVoid",r.void()],["scSpecTypeError",r.void()],["scSpecTypeU32",r.void()],["scSpecTypeI32",r.void()],["scSpecTypeU64",r.void()],["scSpecTypeI64",r.void()],["scSpecTypeTimepoint",r.void()],["scSpecTypeDuration",r.void()],["scSpecTypeU128",r.void()],["scSpecTypeI128",r.void()],["scSpecTypeU256",r.void()],["scSpecTypeI256",r.void()],["scSpecTypeBytes",r.void()],["scSpecTypeString",r.void()],["scSpecTypeSymbol",r.void()],["scSpecTypeAddress",r.void()],["scSpecTypeOption","option"],["scSpecTypeResult","result"],["scSpecTypeVec","vec"],["scSpecTypeMap","map"],["scSpecTypeTuple","tuple"],["scSpecTypeBytesN","bytesN"],["scSpecTypeUdt","udt"]],arms:{option:r.lookup("ScSpecTypeOption"),result:r.lookup("ScSpecTypeResult"),vec:r.lookup("ScSpecTypeVec"),map:r.lookup("ScSpecTypeMap"),tuple:r.lookup("ScSpecTypeTuple"),bytesN:r.lookup("ScSpecTypeBytesN"),udt:r.lookup("ScSpecTypeUdt")}}),r.struct("ScSpecUdtStructFieldV0",[["doc",r.string(_)],["name",r.string(30)],["type",r.lookup("ScSpecTypeDef")]]),r.struct("ScSpecUdtStructV0",[["doc",r.string(_)],["lib",r.string(80)],["name",r.string(60)],["fields",r.varArray(r.lookup("ScSpecUdtStructFieldV0"),40)]]),r.struct("ScSpecUdtUnionCaseVoidV0",[["doc",r.string(_)],["name",r.string(60)]]),r.struct("ScSpecUdtUnionCaseTupleV0",[["doc",r.string(_)],["name",r.string(60)],["type",r.varArray(r.lookup("ScSpecTypeDef"),12)]]),r.enum("ScSpecUdtUnionCaseV0Kind",{scSpecUdtUnionCaseVoidV0:0,scSpecUdtUnionCaseTupleV0:1}),r.union("ScSpecUdtUnionCaseV0",{switchOn:r.lookup("ScSpecUdtUnionCaseV0Kind"),switchName:"kind",switches:[["scSpecUdtUnionCaseVoidV0","voidCase"],["scSpecUdtUnionCaseTupleV0","tupleCase"]],arms:{voidCase:r.lookup("ScSpecUdtUnionCaseVoidV0"),tupleCase:r.lookup("ScSpecUdtUnionCaseTupleV0")}}),r.struct("ScSpecUdtUnionV0",[["doc",r.string(_)],["lib",r.string(80)],["name",r.string(60)],["cases",r.varArray(r.lookup("ScSpecUdtUnionCaseV0"),50)]]),r.struct("ScSpecUdtEnumCaseV0",[["doc",r.string(_)],["name",r.string(60)],["value",r.lookup("Uint32")]]),r.struct("ScSpecUdtEnumV0",[["doc",r.string(_)],["lib",r.string(80)],["name",r.string(60)],["cases",r.varArray(r.lookup("ScSpecUdtEnumCaseV0"),50)]]),r.struct("ScSpecUdtErrorEnumCaseV0",[["doc",r.string(_)],["name",r.string(60)],["value",r.lookup("Uint32")]]),r.struct("ScSpecUdtErrorEnumV0",[["doc",r.string(_)],["lib",r.string(80)],["name",r.string(60)],["cases",r.varArray(r.lookup("ScSpecUdtErrorEnumCaseV0"),50)]]),r.struct("ScSpecFunctionInputV0",[["doc",r.string(_)],["name",r.string(30)],["type",r.lookup("ScSpecTypeDef")]]),r.struct("ScSpecFunctionV0",[["doc",r.string(_)],["name",r.lookup("ScSymbol")],["inputs",r.varArray(r.lookup("ScSpecFunctionInputV0"),10)],["outputs",r.varArray(r.lookup("ScSpecTypeDef"),1)]]),r.enum("ScSpecEntryKind",{scSpecEntryFunctionV0:0,scSpecEntryUdtStructV0:1,scSpecEntryUdtUnionV0:2,scSpecEntryUdtEnumV0:3,scSpecEntryUdtErrorEnumV0:4}),r.union("ScSpecEntry",{switchOn:r.lookup("ScSpecEntryKind"),switchName:"kind",switches:[["scSpecEntryFunctionV0","functionV0"],["scSpecEntryUdtStructV0","udtStructV0"],["scSpecEntryUdtUnionV0","udtUnionV0"],["scSpecEntryUdtEnumV0","udtEnumV0"],["scSpecEntryUdtErrorEnumV0","udtErrorEnumV0"]],arms:{functionV0:r.lookup("ScSpecFunctionV0"),udtStructV0:r.lookup("ScSpecUdtStructV0"),udtUnionV0:r.lookup("ScSpecUdtUnionV0"),udtEnumV0:r.lookup("ScSpecUdtEnumV0"),udtErrorEnumV0:r.lookup("ScSpecUdtErrorEnumV0")}}),r.struct("ConfigSettingContractExecutionLanesV0",[["ledgerMaxTxCount",r.lookup("Uint32")]]),r.struct("ConfigSettingContractComputeV0",[["ledgerMaxInstructions",r.lookup("Int64")],["txMaxInstructions",r.lookup("Int64")],["feeRatePerInstructionsIncrement",r.lookup("Int64")],["txMemoryLimit",r.lookup("Uint32")]]),r.struct("ConfigSettingContractLedgerCostV0",[["ledgerMaxReadLedgerEntries",r.lookup("Uint32")],["ledgerMaxReadBytes",r.lookup("Uint32")],["ledgerMaxWriteLedgerEntries",r.lookup("Uint32")],["ledgerMaxWriteBytes",r.lookup("Uint32")],["txMaxReadLedgerEntries",r.lookup("Uint32")],["txMaxReadBytes",r.lookup("Uint32")],["txMaxWriteLedgerEntries",r.lookup("Uint32")],["txMaxWriteBytes",r.lookup("Uint32")],["feeReadLedgerEntry",r.lookup("Int64")],["feeWriteLedgerEntry",r.lookup("Int64")],["feeRead1Kb",r.lookup("Int64")],["bucketListTargetSizeBytes",r.lookup("Int64")],["writeFee1KbBucketListLow",r.lookup("Int64")],["writeFee1KbBucketListHigh",r.lookup("Int64")],["bucketListWriteFeeGrowthFactor",r.lookup("Uint32")]]),r.struct("ConfigSettingContractHistoricalDataV0",[["feeHistorical1Kb",r.lookup("Int64")]]),r.struct("ConfigSettingContractEventsV0",[["txMaxContractEventsSizeBytes",r.lookup("Uint32")],["feeContractEvents1Kb",r.lookup("Int64")]]),r.struct("ConfigSettingContractBandwidthV0",[["ledgerMaxTxsSizeBytes",r.lookup("Uint32")],["txMaxSizeBytes",r.lookup("Uint32")],["feeTxSize1Kb",r.lookup("Int64")]]),r.enum("ContractCostType",{wasmInsnExec:0,memAlloc:1,memCpy:2,memCmp:3,dispatchHostFunction:4,visitObject:5,valSer:6,valDeser:7,computeSha256Hash:8,computeEd25519PubKey:9,verifyEd25519Sig:10,vmInstantiation:11,vmCachedInstantiation:12,invokeVmFunction:13,computeKeccak256Hash:14,decodeEcdsaCurve256Sig:15,recoverEcdsaSecp256k1Key:16,int256AddSub:17,int256Mul:18,int256Div:19,int256Pow:20,int256Shift:21,chaCha20DrawBytes:22,parseWasmInstructions:23,parseWasmFunctions:24,parseWasmGlobals:25,parseWasmTableEntries:26,parseWasmTypes:27,parseWasmDataSegments:28,parseWasmElemSegments:29,parseWasmImports:30,parseWasmExports:31,parseWasmDataSegmentBytes:32,instantiateWasmInstructions:33,instantiateWasmFunctions:34,instantiateWasmGlobals:35,instantiateWasmTableEntries:36,instantiateWasmTypes:37,instantiateWasmDataSegments:38,instantiateWasmElemSegments:39,instantiateWasmImports:40,instantiateWasmExports:41,instantiateWasmDataSegmentBytes:42,sec1DecodePointUncompressed:43,verifyEcdsaSecp256r1Sig:44}),r.struct("ContractCostParamEntry",[["ext",r.lookup("ExtensionPoint")],["constTerm",r.lookup("Int64")],["linearTerm",r.lookup("Int64")]]),r.struct("StateArchivalSettings",[["maxEntryTtl",r.lookup("Uint32")],["minTemporaryTtl",r.lookup("Uint32")],["minPersistentTtl",r.lookup("Uint32")],["persistentRentRateDenominator",r.lookup("Int64")],["tempRentRateDenominator",r.lookup("Int64")],["maxEntriesToArchive",r.lookup("Uint32")],["bucketListSizeWindowSampleSize",r.lookup("Uint32")],["bucketListWindowSamplePeriod",r.lookup("Uint32")],["evictionScanSize",r.lookup("Uint32")],["startingEvictionScanLevel",r.lookup("Uint32")]]),r.struct("EvictionIterator",[["bucketListLevel",r.lookup("Uint32")],["isCurrBucket",r.bool()],["bucketFileOffset",r.lookup("Uint64")]]),r.const("CONTRACT_COST_COUNT_LIMIT",1024),r.typedef("ContractCostParams",r.varArray(r.lookup("ContractCostParamEntry"),r.lookup("CONTRACT_COST_COUNT_LIMIT"))),r.enum("ConfigSettingId",{configSettingContractMaxSizeBytes:0,configSettingContractComputeV0:1,configSettingContractLedgerCostV0:2,configSettingContractHistoricalDataV0:3,configSettingContractEventsV0:4,configSettingContractBandwidthV0:5,configSettingContractCostParamsCpuInstructions:6,configSettingContractCostParamsMemoryBytes:7,configSettingContractDataKeySizeBytes:8,configSettingContractDataEntrySizeBytes:9,configSettingStateArchival:10,configSettingContractExecutionLanes:11,configSettingBucketlistSizeWindow:12,configSettingEvictionIterator:13}),r.union("ConfigSettingEntry",{switchOn:r.lookup("ConfigSettingId"),switchName:"configSettingId",switches:[["configSettingContractMaxSizeBytes","contractMaxSizeBytes"],["configSettingContractComputeV0","contractCompute"],["configSettingContractLedgerCostV0","contractLedgerCost"],["configSettingContractHistoricalDataV0","contractHistoricalData"],["configSettingContractEventsV0","contractEvents"],["configSettingContractBandwidthV0","contractBandwidth"],["configSettingContractCostParamsCpuInstructions","contractCostParamsCpuInsns"],["configSettingContractCostParamsMemoryBytes","contractCostParamsMemBytes"],["configSettingContractDataKeySizeBytes","contractDataKeySizeBytes"],["configSettingContractDataEntrySizeBytes","contractDataEntrySizeBytes"],["configSettingStateArchival","stateArchivalSettings"],["configSettingContractExecutionLanes","contractExecutionLanes"],["configSettingBucketlistSizeWindow","bucketListSizeWindow"],["configSettingEvictionIterator","evictionIterator"]],arms:{contractMaxSizeBytes:r.lookup("Uint32"),contractCompute:r.lookup("ConfigSettingContractComputeV0"),contractLedgerCost:r.lookup("ConfigSettingContractLedgerCostV0"),contractHistoricalData:r.lookup("ConfigSettingContractHistoricalDataV0"),contractEvents:r.lookup("ConfigSettingContractEventsV0"),contractBandwidth:r.lookup("ConfigSettingContractBandwidthV0"),contractCostParamsCpuInsns:r.lookup("ContractCostParams"),contractCostParamsMemBytes:r.lookup("ContractCostParams"),contractDataKeySizeBytes:r.lookup("Uint32"),contractDataEntrySizeBytes:r.lookup("Uint32"),stateArchivalSettings:r.lookup("StateArchivalSettings"),contractExecutionLanes:r.lookup("ConfigSettingContractExecutionLanesV0"),bucketListSizeWindow:r.varArray(r.lookup("Uint64"),2147483647),evictionIterator:r.lookup("EvictionIterator")}})});a.default=u},5578:(o,a,i)=>{"use strict";var s=i(8287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.LiquidityPoolFeeV18=void 0,a.getLiquidityPoolId=function(b){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(b!=="constant_product")throw new Error("liquidityPoolType is invalid");var w=T.assetA,g=T.assetB,p=T.fee;if(!(w&&w instanceof r.Asset))throw new Error("assetA is invalid");if(!(g&&g instanceof r.Asset))throw new Error("assetB is invalid");if(!p||p!==d)throw new Error("fee is invalid");if(r.Asset.compare(w,g)!==-1)throw new Error("Assets are not in lexicographic order");var A=u.default.LiquidityPoolType.liquidityPoolConstantProduct().toXDR(),L=new u.default.LiquidityPoolConstantProductParameters({assetA:w.toXDRObject(),assetB:g.toXDRObject(),fee:p}).toXDR(),E=s.concat([A,L]);return(0,_.hash)(E)};var f,u=(f=i(1918))&&f.__esModule?f:{default:f},r=i(1764),_=i(9152),d=a.LiquidityPoolFeeV18=30},9152:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.hash=function(f){var u=new s.sha256;return u.update(f,"utf8"),u.digest()};var s=i(2802)},356:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var s={xdr:!0,cereal:!0,hash:!0,sign:!0,verify:!0,FastSigning:!0,getLiquidityPoolId:!0,LiquidityPoolFeeV18:!0,Keypair:!0,UnsignedHyper:!0,Hyper:!0,TransactionBase:!0,Transaction:!0,FeeBumpTransaction:!0,TransactionBuilder:!0,TimeoutInfinite:!0,BASE_FEE:!0,Asset:!0,LiquidityPoolAsset:!0,LiquidityPoolId:!0,Operation:!0,AuthRequiredFlag:!0,AuthRevocableFlag:!0,AuthImmutableFlag:!0,AuthClawbackEnabledFlag:!0,Account:!0,MuxedAccount:!0,Claimant:!0,Networks:!0,StrKey:!0,SignerKey:!0,Soroban:!0,decodeAddressToMuxedAccount:!0,encodeMuxedAccountToAddress:!0,extractBaseAddress:!0,encodeMuxedAccount:!0,Contract:!0,Address:!0};Object.defineProperty(a,"Account",{enumerable:!0,get:function(){return j.Account}}),Object.defineProperty(a,"Address",{enumerable:!0,get:function(){return I.Address}}),Object.defineProperty(a,"Asset",{enumerable:!0,get:function(){return L.Asset}}),Object.defineProperty(a,"AuthClawbackEnabledFlag",{enumerable:!0,get:function(){return F.AuthClawbackEnabledFlag}}),Object.defineProperty(a,"AuthImmutableFlag",{enumerable:!0,get:function(){return F.AuthImmutableFlag}}),Object.defineProperty(a,"AuthRequiredFlag",{enumerable:!0,get:function(){return F.AuthRequiredFlag}}),Object.defineProperty(a,"AuthRevocableFlag",{enumerable:!0,get:function(){return F.AuthRevocableFlag}}),Object.defineProperty(a,"BASE_FEE",{enumerable:!0,get:function(){return A.BASE_FEE}}),Object.defineProperty(a,"Claimant",{enumerable:!0,get:function(){return Y.Claimant}}),Object.defineProperty(a,"Contract",{enumerable:!0,get:function(){return ae.Contract}}),Object.defineProperty(a,"FastSigning",{enumerable:!0,get:function(){return _.FastSigning}}),Object.defineProperty(a,"FeeBumpTransaction",{enumerable:!0,get:function(){return p.FeeBumpTransaction}}),Object.defineProperty(a,"Hyper",{enumerable:!0,get:function(){return T.Hyper}}),Object.defineProperty(a,"Keypair",{enumerable:!0,get:function(){return b.Keypair}}),Object.defineProperty(a,"LiquidityPoolAsset",{enumerable:!0,get:function(){return E.LiquidityPoolAsset}}),Object.defineProperty(a,"LiquidityPoolFeeV18",{enumerable:!0,get:function(){return d.LiquidityPoolFeeV18}}),Object.defineProperty(a,"LiquidityPoolId",{enumerable:!0,get:function(){return N.LiquidityPoolId}}),Object.defineProperty(a,"MuxedAccount",{enumerable:!0,get:function(){return V.MuxedAccount}}),Object.defineProperty(a,"Networks",{enumerable:!0,get:function(){return me.Networks}}),Object.defineProperty(a,"Operation",{enumerable:!0,get:function(){return F.Operation}}),Object.defineProperty(a,"SignerKey",{enumerable:!0,get:function(){return C.SignerKey}}),Object.defineProperty(a,"Soroban",{enumerable:!0,get:function(){return q.Soroban}}),Object.defineProperty(a,"StrKey",{enumerable:!0,get:function(){return le.StrKey}}),Object.defineProperty(a,"TimeoutInfinite",{enumerable:!0,get:function(){return A.TimeoutInfinite}}),Object.defineProperty(a,"Transaction",{enumerable:!0,get:function(){return g.Transaction}}),Object.defineProperty(a,"TransactionBase",{enumerable:!0,get:function(){return w.TransactionBase}}),Object.defineProperty(a,"TransactionBuilder",{enumerable:!0,get:function(){return A.TransactionBuilder}}),Object.defineProperty(a,"UnsignedHyper",{enumerable:!0,get:function(){return T.UnsignedHyper}}),Object.defineProperty(a,"cereal",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(a,"decodeAddressToMuxedAccount",{enumerable:!0,get:function(){return X.decodeAddressToMuxedAccount}}),a.default=void 0,Object.defineProperty(a,"encodeMuxedAccount",{enumerable:!0,get:function(){return X.encodeMuxedAccount}}),Object.defineProperty(a,"encodeMuxedAccountToAddress",{enumerable:!0,get:function(){return X.encodeMuxedAccountToAddress}}),Object.defineProperty(a,"extractBaseAddress",{enumerable:!0,get:function(){return X.extractBaseAddress}}),Object.defineProperty(a,"getLiquidityPoolId",{enumerable:!0,get:function(){return d.getLiquidityPoolId}}),Object.defineProperty(a,"hash",{enumerable:!0,get:function(){return r.hash}}),Object.defineProperty(a,"sign",{enumerable:!0,get:function(){return _.sign}}),Object.defineProperty(a,"verify",{enumerable:!0,get:function(){return _.verify}}),Object.defineProperty(a,"xdr",{enumerable:!0,get:function(){return f.default}});var f=K(i(1918)),u=K(i(3335)),r=i(9152),_=i(15),d=i(5578),b=i(6691),T=i(3740),w=i(3758),g=i(380),p=i(9260),A=i(6396),L=i(1764),E=i(2262),N=i(9353),F=i(7237),R=i(4172);Object.keys(R).forEach(function(re){re!=="default"&&re!=="__esModule"&&(Object.prototype.hasOwnProperty.call(s,re)||re in a&&a[re]===R[re]||Object.defineProperty(a,re,{enumerable:!0,get:function(){return R[re]}}))});var j=i(2135),V=i(2243),Y=i(1387),me=i(6202),le=i(7120),C=i(225),q=i(4062),X=i(6160),ae=i(7452),I=i(1180),S=i(8549);Object.keys(S).forEach(function(re){re!=="default"&&re!=="__esModule"&&(Object.prototype.hasOwnProperty.call(s,re)||re in a&&a[re]===S[re]||Object.defineProperty(a,re,{enumerable:!0,get:function(){return S[re]}}))});var m=i(7177);Object.keys(m).forEach(function(re){re!=="default"&&re!=="__esModule"&&(Object.prototype.hasOwnProperty.call(s,re)||re in a&&a[re]===m[re]||Object.defineProperty(a,re,{enumerable:!0,get:function(){return m[re]}}))});var P=i(3919);Object.keys(P).forEach(function(re){re!=="default"&&re!=="__esModule"&&(Object.prototype.hasOwnProperty.call(s,re)||re in a&&a[re]===P[re]||Object.defineProperty(a,re,{enumerable:!0,get:function(){return P[re]}}))});var l=i(4842);Object.keys(l).forEach(function(re){re!=="default"&&re!=="__esModule"&&(Object.prototype.hasOwnProperty.call(s,re)||re in a&&a[re]===l[re]||Object.defineProperty(a,re,{enumerable:!0,get:function(){return l[re]}}))});var x=i(5328);Object.keys(x).forEach(function(re){re!=="default"&&re!=="__esModule"&&(Object.prototype.hasOwnProperty.call(s,re)||re in a&&a[re]===x[re]||Object.defineProperty(a,re,{enumerable:!0,get:function(){return x[re]}}))});var W=i(3564);function K(re){return re&&re.__esModule?re:{default:re}}Object.keys(W).forEach(function(re){re!=="default"&&re!=="__esModule"&&(Object.prototype.hasOwnProperty.call(s,re)||re in a&&a[re]===W[re]||Object.defineProperty(a,re,{enumerable:!0,get:function(){return W[re]}}))}),a.default=o.exports},3564:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.buildInvocationTree=function _(d){var b=d.function(),T={},w=b.value();switch(b.switch().value){case 0:T.type="execute",T.args={source:f.Address.fromScAddress(w.contractAddress()).toString(),function:w.functionName(),args:w.args().map(function(E){return(0,u.scValToNative)(E)})};break;case 1:T.type="create",T.args={};var g=[w.executable(),w.contractIdPreimage()],p=g[0],A=g[1];if(!!p.switch().value!=!!A.switch().value)throw new Error("creation function appears invalid: ".concat(JSON.stringify(w)," (should be wasm+address or token+asset)"));switch(p.switch().value){case 0:var L=A.fromAddress();T.args.type="wasm",T.args.wasm={salt:L.salt().toString("hex"),hash:p.wasmHash().toString("hex"),address:f.Address.fromScAddress(L.address()).toString()};break;case 1:T.args.type="sac",T.args.asset=s.Asset.fromOperation(A.fromAsset()).toString();break;default:throw new Error("unknown creation type: ".concat(JSON.stringify(p)))}break;default:throw new Error("unknown invocation type (".concat(b.switch(),"): ").concat(JSON.stringify(b)))}return T.invocations=d.subInvocations().map(function(E){return _(E)}),T},a.walkInvocationTree=function(_,d){r(_,1,d)};var s=i(1764),f=i(1180),u=i(7177);function r(_,d,b,T){b(_,d,T)!==!1&&_.subInvocations().forEach(function(w){return r(w,d+1,b,_)})}},3335:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var s=i(3740),f={XdrWriter:s.XdrWriter,XdrReader:s.XdrReader};a.default=f},6691:(o,a,i)=>{"use strict";var s=i(8287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.Keypair=void 0;var f=b(i(4940)),u=i(15),r=i(7120),_=i(9152),d=b(i(1918));function b(p){return p&&p.__esModule?p:{default:p}}function T(p){return T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},T(p)}function w(p,A){for(var L=0;L<A.length;L++){var E=A[L];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(p,g(E.key),E)}}function g(p){var A=function(L,E){if(T(L)!="object"||!L)return L;var N=L[Symbol.toPrimitive];if(N!==void 0){var F=N.call(L,E||"default");if(T(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return(E==="string"?String:Number)(L)}(p,"string");return T(A)=="symbol"?A:A+""}a.Keypair=function(){return p=function E(N){if(function(F,R){if(!(F instanceof R))throw new TypeError("Cannot call a class as a function")}(this,E),N.type!=="ed25519")throw new Error("Invalid keys type");if(this.type=N.type,N.secretKey){if(N.secretKey=s.from(N.secretKey),N.secretKey.length!==32)throw new Error("secretKey length is invalid");if(this._secretSeed=N.secretKey,this._publicKey=(0,u.generate)(N.secretKey),this._secretKey=s.concat([N.secretKey,this._publicKey]),N.publicKey&&!this._publicKey.equals(s.from(N.publicKey)))throw new Error("secretKey does not match publicKey")}else if(this._publicKey=s.from(N.publicKey),this._publicKey.length!==32)throw new Error("publicKey length is invalid")},L=[{key:"fromSecret",value:function(E){var N=r.StrKey.decodeEd25519SecretSeed(E);return this.fromRawEd25519Seed(N)}},{key:"fromRawEd25519Seed",value:function(E){return new this({type:"ed25519",secretKey:E})}},{key:"master",value:function(E){if(!E)throw new Error("No network selected. Please pass a network argument, e.g. `Keypair.master(Networks.PUBLIC)`.");return this.fromRawEd25519Seed((0,_.hash)(E))}},{key:"fromPublicKey",value:function(E){if((E=r.StrKey.decodeEd25519PublicKey(E)).length!==32)throw new Error("Invalid Stellar public key");return new this({type:"ed25519",publicKey:E})}},{key:"random",value:function(){var E=f.default.randomBytes(32);return this.fromRawEd25519Seed(E)}}],(A=[{key:"xdrAccountId",value:function(){return new d.default.AccountId.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrPublicKey",value:function(){return new d.default.PublicKey.publicKeyTypeEd25519(this._publicKey)}},{key:"xdrMuxedAccount",value:function(E){if(E!==void 0){if(typeof E!="string")throw new TypeError("expected string for ID, got ".concat(T(E)));return d.default.MuxedAccount.keyTypeMuxedEd25519(new d.default.MuxedAccountMed25519({id:d.default.Uint64.fromString(E),ed25519:this._publicKey}))}return new d.default.MuxedAccount.keyTypeEd25519(this._publicKey)}},{key:"rawPublicKey",value:function(){return this._publicKey}},{key:"signatureHint",value:function(){var E=this.xdrAccountId().toXDR();return E.slice(E.length-4)}},{key:"publicKey",value:function(){return r.StrKey.encodeEd25519PublicKey(this._publicKey)}},{key:"secret",value:function(){if(!this._secretSeed)throw new Error("no secret key available");if(this.type==="ed25519")return r.StrKey.encodeEd25519SecretSeed(this._secretSeed);throw new Error("Invalid Keypair type")}},{key:"rawSecretKey",value:function(){return this._secretSeed}},{key:"canSign",value:function(){return!!this._secretKey}},{key:"sign",value:function(E){if(!this.canSign())throw new Error("cannot sign: no secret key available");return(0,u.sign)(E,this._secretKey)}},{key:"verify",value:function(E,N){return(0,u.verify)(E,N,this._publicKey)}},{key:"signDecorated",value:function(E){var N=this.sign(E),F=this.signatureHint();return new d.default.DecoratedSignature({hint:F,signature:N})}},{key:"signPayloadDecorated",value:function(E){var N=this.sign(E),F=this.signatureHint(),R=s.from(E.slice(-4));return R.length<4&&(R=s.concat([R,s.alloc(4-E.length,0)])),new d.default.DecoratedSignature({hint:R.map(function(j,V){return j^F[V]}),signature:N})}}])&&w(p.prototype,A),L&&w(p,L),Object.defineProperty(p,"prototype",{writable:!1}),p;var p,A,L}()},2262:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.LiquidityPoolAsset=void 0;var s,f=(s=i(1918))&&s.__esModule?s:{default:s},u=i(1764),r=i(5578);function _(p){return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},_(p)}function d(p,A){var L=Object.keys(p);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(p);A&&(E=E.filter(function(N){return Object.getOwnPropertyDescriptor(p,N).enumerable})),L.push.apply(L,E)}return L}function b(p){for(var A=1;A<arguments.length;A++){var L=arguments[A]!=null?arguments[A]:{};A%2?d(Object(L),!0).forEach(function(E){T(p,E,L[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(L)):d(Object(L)).forEach(function(E){Object.defineProperty(p,E,Object.getOwnPropertyDescriptor(L,E))})}return p}function T(p,A,L){return(A=g(A))in p?Object.defineProperty(p,A,{value:L,enumerable:!0,configurable:!0,writable:!0}):p[A]=L,p}function w(p,A){for(var L=0;L<A.length;L++){var E=A[L];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(p,g(E.key),E)}}function g(p){var A=function(L,E){if(_(L)!="object"||!L)return L;var N=L[Symbol.toPrimitive];if(N!==void 0){var F=N.call(L,E||"default");if(_(F)!="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return(E==="string"?String:Number)(L)}(p,"string");return _(A)=="symbol"?A:A+""}a.LiquidityPoolAsset=function(){return p=function E(N,F,R){if(function(j,V){if(!(j instanceof V))throw new TypeError("Cannot call a class as a function")}(this,E),!(N&&N instanceof u.Asset))throw new Error("assetA is invalid");if(!(F&&F instanceof u.Asset))throw new Error("assetB is invalid");if(u.Asset.compare(N,F)!==-1)throw new Error("Assets are not in lexicographic order");if(!R||R!==r.LiquidityPoolFeeV18)throw new Error("fee is invalid");this.assetA=N,this.assetB=F,this.fee=R},L=[{key:"fromOperation",value:function(E){var N=E.switch();if(N===f.default.AssetType.assetTypePoolShare()){var F=E.liquidityPool().constantProduct();return new this(u.Asset.fromOperation(F.assetA()),u.Asset.fromOperation(F.assetB()),F.fee())}throw new Error("Invalid asset type: ".concat(N.name))}}],(A=[{key:"toXDRObject",value:function(){var E=new f.default.LiquidityPoolConstantProductParameters({assetA:this.assetA.toXDRObject(),assetB:this.assetB.toXDRObject(),fee:this.fee}),N=new f.default.LiquidityPoolParameters("liquidityPoolConstantProduct",E);return new f.default.ChangeTrustAsset("assetTypePoolShare",N)}},{key:"getLiquidityPoolParameters",value:function(){return b(b({},this),{},{assetA:this.assetA,assetB:this.assetB,fee:this.fee})}},{key:"getAssetType",value:function(){return"liquidity_pool_shares"}},{key:"equals",value:function(E){return this.assetA.equals(E.assetA)&&this.assetB.equals(E.assetB)&&this.fee===E.fee}},{key:"toString",value:function(){var E=(0,r.getLiquidityPoolId)("constant_product",this.getLiquidityPoolParameters()).toString("hex");return"liquidity_pool:".concat(E)}}])&&w(p.prototype,A),L&&w(p,L),Object.defineProperty(p,"prototype",{writable:!1}),p;var p,A,L}()},9353:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.LiquidityPoolId=void 0;var s,f=(s=i(1918))&&s.__esModule?s:{default:s};function u(d){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},u(d)}function r(d,b){for(var T=0;T<b.length;T++){var w=b[T];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(d,_(w.key),w)}}function _(d){var b=function(T,w){if(u(T)!="object"||!T)return T;var g=T[Symbol.toPrimitive];if(g!==void 0){var p=g.call(T,w||"default");if(u(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(T)}(d,"string");return u(b)=="symbol"?b:b+""}a.LiquidityPoolId=function(){return d=function w(g){if(function(p,A){if(!(p instanceof A))throw new TypeError("Cannot call a class as a function")}(this,w),!g)throw new Error("liquidityPoolId cannot be empty");if(!/^[a-f0-9]{64}$/.test(g))throw new Error("Liquidity pool ID is not a valid hash");this.liquidityPoolId=g},T=[{key:"fromOperation",value:function(w){var g=w.switch();if(g===f.default.AssetType.assetTypePoolShare())return new this(w.liquidityPoolId().toString("hex"));throw new Error("Invalid asset type: ".concat(g.name))}}],(b=[{key:"toXDRObject",value:function(){var w=f.default.PoolId.fromXDR(this.liquidityPoolId,"hex");return new f.default.TrustLineAsset("assetTypePoolShare",w)}},{key:"getLiquidityPoolId",value:function(){return String(this.liquidityPoolId)}},{key:"getAssetType",value:function(){return"liquidity_pool_shares"}},{key:"equals",value:function(w){return this.liquidityPoolId===w.getLiquidityPoolId()}},{key:"toString",value:function(){return"liquidity_pool:".concat(this.liquidityPoolId)}}])&&r(d.prototype,b),T&&r(d,T),Object.defineProperty(d,"prototype",{writable:!1}),d;var d,b,T}()},4172:(o,a,i)=>{"use strict";var s=i(8287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.MemoText=a.MemoReturn=a.MemoNone=a.MemoID=a.MemoHash=a.Memo=void 0;var f=i(3740),u=_(i(1242)),r=_(i(1918));function _(E){return E&&E.__esModule?E:{default:E}}function d(E){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},d(E)}function b(E,N){for(var F=0;F<N.length;F++){var R=N[F];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(E,T(R.key),R)}}function T(E){var N=function(F,R){if(d(F)!="object"||!F)return F;var j=F[Symbol.toPrimitive];if(j!==void 0){var V=j.call(F,R||"default");if(d(V)!="object")return V;throw new TypeError("@@toPrimitive must return a primitive value.")}return(R==="string"?String:Number)(F)}(E,"string");return d(N)=="symbol"?N:N+""}var w=a.MemoNone="none",g=a.MemoID="id",p=a.MemoText="text",A=a.MemoHash="hash",L=a.MemoReturn="return";a.Memo=function(){function E(j){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;switch(function(Y,me){if(!(Y instanceof me))throw new TypeError("Cannot call a class as a function")}(this,E),this._type=j,this._value=V,this._type){case w:break;case g:E._validateIdValue(V);break;case p:E._validateTextValue(V);break;case A:case L:E._validateHashValue(V),typeof V=="string"&&(this._value=s.from(V,"hex"));break;default:throw new Error("Invalid memo type")}}return N=E,R=[{key:"_validateIdValue",value:function(j){var V,Y=new Error("Expects a int64 as a string. Got ".concat(j));if(typeof j!="string")throw Y;try{V=new u.default(j)}catch{throw Y}if(!V.isFinite()||V.isNaN())throw Y}},{key:"_validateTextValue",value:function(j){if(!r.default.Memo.armTypeForArm("text").isValid(j))throw new Error("Expects string, array or buffer, max 28 bytes")}},{key:"_validateHashValue",value:function(j){var V,Y=new Error("Expects a 32 byte hash value or hex encoded string. Got ".concat(j));if(j==null)throw Y;if(typeof j=="string"){if(!/^[0-9A-Fa-f]{64}$/g.test(j))throw Y;V=s.from(j,"hex")}else{if(!s.isBuffer(j))throw Y;V=s.from(j)}if(!V.length||V.length!==32)throw Y}},{key:"none",value:function(){return new E(w)}},{key:"text",value:function(j){return new E(p,j)}},{key:"id",value:function(j){return new E(g,j)}},{key:"hash",value:function(j){return new E(A,j)}},{key:"return",value:function(j){return new E(L,j)}},{key:"fromXDRObject",value:function(j){switch(j.arm()){case"id":return E.id(j.value().toString());case"text":return E.text(j.value());case"hash":return E.hash(j.value());case"retHash":return E.return(j.value())}if(j.value()===void 0)return E.none();throw new Error("Unknown type")}}],(F=[{key:"type",get:function(){return this._type},set:function(j){throw new Error("Memo is immutable")}},{key:"value",get:function(){switch(this._type){case w:return null;case g:case p:return this._value;case A:case L:return s.from(this._value);default:throw new Error("Invalid memo type")}},set:function(j){throw new Error("Memo is immutable")}},{key:"toXDRObject",value:function(){switch(this._type){case w:return r.default.Memo.memoNone();case g:return r.default.Memo.memoId(f.UnsignedHyper.fromString(this._value));case p:return r.default.Memo.memoText(this._value);case A:return r.default.Memo.memoHash(this._value);case L:return r.default.Memo.memoReturn(this._value);default:return null}}}])&&b(N.prototype,F),R&&b(N,R),Object.defineProperty(N,"prototype",{writable:!1}),N;var N,F,R}()},2243:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.MuxedAccount=void 0;var s,f=(s=i(1918))&&s.__esModule?s:{default:s},u=i(2135),r=i(7120),_=i(6160);function d(w){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},d(w)}function b(w,g){for(var p=0;p<g.length;p++){var A=g[p];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,T(A.key),A)}}function T(w){var g=function(p,A){if(d(p)!="object"||!p)return p;var L=p[Symbol.toPrimitive];if(L!==void 0){var E=L.call(p,A||"default");if(d(E)!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(p)}(w,"string");return d(g)=="symbol"?g:g+""}a.MuxedAccount=function(){function w(L,E){(function(F,R){if(!(F instanceof R))throw new TypeError("Cannot call a class as a function")})(this,w);var N=L.accountId();if(!r.StrKey.isValidEd25519PublicKey(N))throw new Error("accountId is invalid");this.account=L,this._muxedXdr=(0,_.encodeMuxedAccount)(N,E),this._mAddress=(0,_.encodeMuxedAccountToAddress)(this._muxedXdr),this._id=E}return g=w,A=[{key:"fromAddress",value:function(L,E){var N=(0,_.decodeAddressToMuxedAccount)(L),F=(0,_.extractBaseAddress)(L),R=N.med25519().id().toString();return new w(new u.Account(F,E),R)}}],(p=[{key:"baseAccount",value:function(){return this.account}},{key:"accountId",value:function(){return this._mAddress}},{key:"id",value:function(){return this._id}},{key:"setId",value:function(L){if(typeof L!="string")throw new Error("id should be a string representing a number (uint64)");return this._muxedXdr.med25519().id(f.default.Uint64.fromString(L)),this._mAddress=(0,_.encodeMuxedAccountToAddress)(this._muxedXdr),this._id=L,this}},{key:"sequenceNumber",value:function(){return this.account.sequenceNumber()}},{key:"incrementSequenceNumber",value:function(){return this.account.incrementSequenceNumber()}},{key:"toXDRObject",value:function(){return this._muxedXdr}},{key:"equals",value:function(L){return this.accountId()===L.accountId()}}])&&b(g.prototype,p),A&&b(g,A),Object.defineProperty(g,"prototype",{writable:!1}),g;var g,p,A}()},6202:(o,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Networks=void 0,a.Networks={PUBLIC:"Public Global Stellar Network ; September 2015",TESTNET:"Test SDF Network ; September 2015",FUTURENET:"Test SDF Future Network ; October 2022",SANDBOX:"Local Sandbox Stellar Network ; September 2022",STANDALONE:"Standalone Network ; February 2017"}},8549:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"Int128",{enumerable:!0,get:function(){return r.Int128}}),Object.defineProperty(a,"Int256",{enumerable:!0,get:function(){return _.Int256}}),Object.defineProperty(a,"ScInt",{enumerable:!0,get:function(){return d.ScInt}}),Object.defineProperty(a,"Uint128",{enumerable:!0,get:function(){return f.Uint128}}),Object.defineProperty(a,"Uint256",{enumerable:!0,get:function(){return u.Uint256}}),Object.defineProperty(a,"XdrLargeInt",{enumerable:!0,get:function(){return s.XdrLargeInt}}),a.scValToBigInt=function(b){var T=s.XdrLargeInt.getType(b.switch().name);switch(b.switch().name){case"scvU32":case"scvI32":return BigInt(b.value());case"scvU64":case"scvI64":return new s.XdrLargeInt(T,b.value()).toBigInt();case"scvU128":case"scvI128":return new s.XdrLargeInt(T,[b.value().lo(),b.value().hi()]).toBigInt();case"scvU256":case"scvI256":return new s.XdrLargeInt(T,[b.value().loLo(),b.value().loHi(),b.value().hiLo(),b.value().hiHi()]).toBigInt();default:throw TypeError("expected integer type, got ".concat(b.switch()))}};var s=i(7429),f=i(6272),u=i(8672),r=i(5487),_=i(4063),d=i(3317)},5487:(o,a,i)=>{"use strict";function s(w){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},s(w)}Object.defineProperty(a,"__esModule",{value:!0}),a.Int128=void 0;var f=i(3740);function u(w,g){for(var p=0;p<g.length;p++){var A=g[p];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,r(A.key),A)}}function r(w){var g=function(p,A){if(s(p)!="object"||!p)return p;var L=p[Symbol.toPrimitive];if(L!==void 0){var E=L.call(p,A||"default");if(s(E)!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(p)}(w,"string");return s(g)=="symbol"?g:g+""}function _(w,g,p){return g=b(g),function(A,L){if(L&&(s(L)==="object"||typeof L=="function"))return L;if(L!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(A)}(w,d()?Reflect.construct(g,p||[],b(w).constructor):g.apply(w,p))}function d(){try{var w=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d=function(){return!!w})()}function b(w){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(g){return g.__proto__||Object.getPrototypeOf(g)},b(w)}function T(w,g){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,A){return p.__proto__=A,p},T(w,g)}(a.Int128=function(w){function g(){(function(R,j){if(!(R instanceof j))throw new TypeError("Cannot call a class as a function")})(this,g);for(var E=arguments.length,N=new Array(E),F=0;F<E;F++)N[F]=arguments[F];return _(this,g,[N])}return function(E,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(N&&N.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),N&&T(E,N)}(g,w),p=g,(A=[{key:"unsigned",get:function(){return!1}},{key:"size",get:function(){return 128}}])&&u(p.prototype,A),L&&u(p,L),Object.defineProperty(p,"prototype",{writable:!1}),p;var p,A,L}(f.LargeInt)).defineIntBoundaries()},4063:(o,a,i)=>{"use strict";function s(w){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},s(w)}Object.defineProperty(a,"__esModule",{value:!0}),a.Int256=void 0;var f=i(3740);function u(w,g){for(var p=0;p<g.length;p++){var A=g[p];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,r(A.key),A)}}function r(w){var g=function(p,A){if(s(p)!="object"||!p)return p;var L=p[Symbol.toPrimitive];if(L!==void 0){var E=L.call(p,A||"default");if(s(E)!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(p)}(w,"string");return s(g)=="symbol"?g:g+""}function _(w,g,p){return g=b(g),function(A,L){if(L&&(s(L)==="object"||typeof L=="function"))return L;if(L!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(A)}(w,d()?Reflect.construct(g,p||[],b(w).constructor):g.apply(w,p))}function d(){try{var w=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d=function(){return!!w})()}function b(w){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(g){return g.__proto__||Object.getPrototypeOf(g)},b(w)}function T(w,g){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,A){return p.__proto__=A,p},T(w,g)}(a.Int256=function(w){function g(){(function(R,j){if(!(R instanceof j))throw new TypeError("Cannot call a class as a function")})(this,g);for(var E=arguments.length,N=new Array(E),F=0;F<E;F++)N[F]=arguments[F];return _(this,g,[N])}return function(E,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(N&&N.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),N&&T(E,N)}(g,w),p=g,(A=[{key:"unsigned",get:function(){return!1}},{key:"size",get:function(){return 256}}])&&u(p.prototype,A),L&&u(p,L),Object.defineProperty(p,"prototype",{writable:!1}),p;var p,A,L}(f.LargeInt)).defineIntBoundaries()},3317:(o,a,i)=>{"use strict";function s(w){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},s(w)}Object.defineProperty(a,"__esModule",{value:!0}),a.ScInt=void 0;var f=i(7429);function u(w,g){for(var p=0;p<g.length;p++){var A=g[p];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,r(A.key),A)}}function r(w){var g=function(p,A){if(s(p)!="object"||!p)return p;var L=p[Symbol.toPrimitive];if(L!==void 0){var E=L.call(p,A||"default");if(s(E)!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(p)}(w,"string");return s(g)=="symbol"?g:g+""}function _(w,g,p){return g=b(g),function(A,L){if(L&&(s(L)==="object"||typeof L=="function"))return L;if(L!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(A)}(w,d()?Reflect.construct(g,p||[],b(w).constructor):g.apply(w,p))}function d(){try{var w=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d=function(){return!!w})()}function b(w){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(g){return g.__proto__||Object.getPrototypeOf(g)},b(w)}function T(w,g){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,A){return p.__proto__=A,p},T(w,g)}a.ScInt=function(w){function g(E,N){var F;(function(Y,me){if(!(Y instanceof me))throw new TypeError("Cannot call a class as a function")})(this,g);var R=E<0,j=(F=N?.type)!==null&&F!==void 0?F:"";if(j.startsWith("u")&&R)throw TypeError("specified type ".concat(N.type," yet negative (").concat(E,")"));if(j===""){j=R?"i":"u";var V=function(Y){var me,le=Y.toString(2).length;return(me=[64,128,256].find(function(C){return le<=C}))!==null&&me!==void 0?me:le}(E);switch(V){case 64:case 128:case 256:j+=V.toString();break;default:throw RangeError("expected 64/128/256 bits for input (".concat(E,"), got ").concat(V))}}return _(this,g,[j,E])}return function(E,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(N&&N.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),N&&T(E,N)}(g,w),p=g,A&&u(p.prototype,A),L&&u(p,L),Object.defineProperty(p,"prototype",{writable:!1}),p;var p,A,L}(f.XdrLargeInt)},6272:(o,a,i)=>{"use strict";function s(w){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},s(w)}Object.defineProperty(a,"__esModule",{value:!0}),a.Uint128=void 0;var f=i(3740);function u(w,g){for(var p=0;p<g.length;p++){var A=g[p];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,r(A.key),A)}}function r(w){var g=function(p,A){if(s(p)!="object"||!p)return p;var L=p[Symbol.toPrimitive];if(L!==void 0){var E=L.call(p,A||"default");if(s(E)!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(p)}(w,"string");return s(g)=="symbol"?g:g+""}function _(w,g,p){return g=b(g),function(A,L){if(L&&(s(L)==="object"||typeof L=="function"))return L;if(L!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(A)}(w,d()?Reflect.construct(g,p||[],b(w).constructor):g.apply(w,p))}function d(){try{var w=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d=function(){return!!w})()}function b(w){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(g){return g.__proto__||Object.getPrototypeOf(g)},b(w)}function T(w,g){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,A){return p.__proto__=A,p},T(w,g)}(a.Uint128=function(w){function g(){(function(R,j){if(!(R instanceof j))throw new TypeError("Cannot call a class as a function")})(this,g);for(var E=arguments.length,N=new Array(E),F=0;F<E;F++)N[F]=arguments[F];return _(this,g,[N])}return function(E,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(N&&N.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),N&&T(E,N)}(g,w),p=g,(A=[{key:"unsigned",get:function(){return!0}},{key:"size",get:function(){return 128}}])&&u(p.prototype,A),L&&u(p,L),Object.defineProperty(p,"prototype",{writable:!1}),p;var p,A,L}(f.LargeInt)).defineIntBoundaries()},8672:(o,a,i)=>{"use strict";function s(w){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},s(w)}Object.defineProperty(a,"__esModule",{value:!0}),a.Uint256=void 0;var f=i(3740);function u(w,g){for(var p=0;p<g.length;p++){var A=g[p];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,r(A.key),A)}}function r(w){var g=function(p,A){if(s(p)!="object"||!p)return p;var L=p[Symbol.toPrimitive];if(L!==void 0){var E=L.call(p,A||"default");if(s(E)!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(p)}(w,"string");return s(g)=="symbol"?g:g+""}function _(w,g,p){return g=b(g),function(A,L){if(L&&(s(L)==="object"||typeof L=="function"))return L;if(L!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(E){if(E===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E}(A)}(w,d()?Reflect.construct(g,p||[],b(w).constructor):g.apply(w,p))}function d(){try{var w=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d=function(){return!!w})()}function b(w){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(g){return g.__proto__||Object.getPrototypeOf(g)},b(w)}function T(w,g){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(p,A){return p.__proto__=A,p},T(w,g)}(a.Uint256=function(w){function g(){(function(R,j){if(!(R instanceof j))throw new TypeError("Cannot call a class as a function")})(this,g);for(var E=arguments.length,N=new Array(E),F=0;F<E;F++)N[F]=arguments[F];return _(this,g,[N])}return function(E,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(N&&N.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),N&&T(E,N)}(g,w),p=g,(A=[{key:"unsigned",get:function(){return!0}},{key:"size",get:function(){return 256}}])&&u(p.prototype,A),L&&u(p,L),Object.defineProperty(p,"prototype",{writable:!1}),p;var p,A,L}(f.LargeInt)).defineIntBoundaries()},7429:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.XdrLargeInt=void 0;var s,f=i(3740),u=i(6272),r=i(8672),_=i(5487),d=i(4063),b=(s=i(1918))&&s.__esModule?s:{default:s};function T(A){return T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(L){return typeof L}:function(L){return L&&typeof Symbol=="function"&&L.constructor===Symbol&&L!==Symbol.prototype?"symbol":typeof L},T(A)}function w(A,L){for(var E=0;E<L.length;E++){var N=L[E];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(A,p(N.key),N)}}function g(A,L,E){return(L=p(L))in A?Object.defineProperty(A,L,{value:E,enumerable:!0,configurable:!0,writable:!0}):A[L]=E,A}function p(A){var L=function(E,N){if(T(E)!="object"||!E)return E;var F=E[Symbol.toPrimitive];if(F!==void 0){var R=F.call(E,N||"default");if(T(R)!="object")return R;throw new TypeError("@@toPrimitive must return a primitive value.")}return(N==="string"?String:Number)(E)}(A,"string");return T(L)=="symbol"?L:L+""}a.XdrLargeInt=function(){return A=function N(F,R){switch(function(j,V){if(!(j instanceof V))throw new TypeError("Cannot call a class as a function")}(this,N),g(this,"int",void 0),g(this,"type",void 0),R instanceof Array||(R=[R]),R=R.map(function(j){return typeof j=="bigint"?j:j instanceof N?j.toBigInt():BigInt(j)}),F){case"i64":this.int=new f.Hyper(R);break;case"i128":this.int=new _.Int128(R);break;case"i256":this.int=new d.Int256(R);break;case"u64":this.int=new f.UnsignedHyper(R);break;case"u128":this.int=new u.Uint128(R);break;case"u256":this.int=new r.Uint256(R);break;default:throw TypeError("invalid type: ".concat(F))}this.type=F},E=[{key:"isType",value:function(N){switch(N){case"i64":case"i128":case"i256":case"u64":case"u128":case"u256":return!0;default:return!1}}},{key:"getType",value:function(N){return N.slice(3).toLowerCase()}}],(L=[{key:"toNumber",value:function(){var N=this.int.toBigInt();if(N>Number.MAX_SAFE_INTEGER||N<Number.MIN_SAFE_INTEGER)throw RangeError("value ".concat(N," not in range for Number ")+"[".concat(Number.MAX_SAFE_INTEGER,", ").concat(Number.MIN_SAFE_INTEGER,"]"));return Number(N)}},{key:"toBigInt",value:function(){return this.int.toBigInt()}},{key:"toI64",value:function(){this._sizeCheck(64);var N=this.toBigInt();if(BigInt.asIntN(64,N)!==N)throw RangeError("value too large for i64: ".concat(N));return b.default.ScVal.scvI64(new b.default.Int64(N))}},{key:"toU64",value:function(){return this._sizeCheck(64),b.default.ScVal.scvU64(new b.default.Uint64(BigInt.asUintN(64,this.toBigInt())))}},{key:"toI128",value:function(){this._sizeCheck(128);var N=this.int.toBigInt(),F=BigInt.asIntN(64,N>>64n),R=BigInt.asUintN(64,N);return b.default.ScVal.scvI128(new b.default.Int128Parts({hi:new b.default.Int64(F),lo:new b.default.Uint64(R)}))}},{key:"toU128",value:function(){this._sizeCheck(128);var N=this.int.toBigInt();return b.default.ScVal.scvU128(new b.default.UInt128Parts({hi:new b.default.Uint64(BigInt.asUintN(64,N>>64n)),lo:new b.default.Uint64(BigInt.asUintN(64,N))}))}},{key:"toI256",value:function(){var N=this.int.toBigInt(),F=BigInt.asIntN(64,N>>192n),R=BigInt.asUintN(64,N>>128n),j=BigInt.asUintN(64,N>>64n),V=BigInt.asUintN(64,N);return b.default.ScVal.scvI256(new b.default.Int256Parts({hiHi:new b.default.Int64(F),hiLo:new b.default.Uint64(R),loHi:new b.default.Uint64(j),loLo:new b.default.Uint64(V)}))}},{key:"toU256",value:function(){var N=this.int.toBigInt(),F=BigInt.asUintN(64,N>>192n),R=BigInt.asUintN(64,N>>128n),j=BigInt.asUintN(64,N>>64n),V=BigInt.asUintN(64,N);return b.default.ScVal.scvU256(new b.default.UInt256Parts({hiHi:new b.default.Uint64(F),hiLo:new b.default.Uint64(R),loHi:new b.default.Uint64(j),loLo:new b.default.Uint64(V)}))}},{key:"toScVal",value:function(){switch(this.type){case"i64":return this.toI64();case"i128":return this.toI128();case"i256":return this.toI256();case"u64":return this.toU64();case"u128":return this.toU128();case"u256":return this.toU256();default:throw TypeError("invalid type: ".concat(this.type))}}},{key:"valueOf",value:function(){return this.int.valueOf()}},{key:"toString",value:function(){return this.int.toString()}},{key:"toJSON",value:function(){return{value:this.toBigInt().toString(),type:this.type}}},{key:"_sizeCheck",value:function(N){if(this.int.size>N)throw RangeError("value too large for ".concat(N," bits (").concat(this.type,")"))}}])&&w(A.prototype,L),E&&w(A,E),Object.defineProperty(A,"prototype",{writable:!1}),A;var A,L,E}()},7237:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.Operation=a.AuthRevocableFlag=a.AuthRequiredFlag=a.AuthImmutableFlag=a.AuthClawbackEnabledFlag=void 0;var s=i(3740),f=E(i(1242)),u=i(645),r=i(4151),_=i(1764),d=i(2262),b=i(1387),T=i(7120),w=i(9353),g=E(i(1918)),p=function(me,le){if(!le&&me&&me.__esModule)return me;if(me===null||N(me)!="object"&&typeof me!="function")return{default:me};var C=L(le);if(C&&C.has(me))return C.get(me);var q={__proto__:null},X=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ae in me)if(ae!=="default"&&{}.hasOwnProperty.call(me,ae)){var I=X?Object.getOwnPropertyDescriptor(me,ae):null;I&&(I.get||I.set)?Object.defineProperty(q,ae,I):q[ae]=me[ae]}return q.default=me,C&&C.set(me,q),q}(i(7511)),A=i(6160);function L(me){if(typeof WeakMap!="function")return null;var le=new WeakMap,C=new WeakMap;return(L=function(q){return q?C:le})(me)}function E(me){return me&&me.__esModule?me:{default:me}}function N(me){return N=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(le){return typeof le}:function(le){return le&&typeof Symbol=="function"&&le.constructor===Symbol&&le!==Symbol.prototype?"symbol":typeof le},N(me)}function F(me,le){for(var C=0;C<le.length;C++){var q=le[C];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(me,R(q.key),q)}}function R(me){var le=function(C,q){if(N(C)!="object"||!C)return C;var X=C[Symbol.toPrimitive];if(X!==void 0){var ae=X.call(C,q||"default");if(N(ae)!="object")return ae;throw new TypeError("@@toPrimitive must return a primitive value.")}return(q==="string"?String:Number)(C)}(me,"string");return N(le)=="symbol"?le:le+""}var j=1e7,V=(a.AuthRequiredFlag=1,a.AuthRevocableFlag=2,a.AuthImmutableFlag=4,a.AuthClawbackEnabledFlag=8,a.Operation=function(){return me=function q(){(function(X,ae){if(!(X instanceof ae))throw new TypeError("Cannot call a class as a function")})(this,q)},C=[{key:"setSourceAccount",value:function(q,X){if(X.source)try{q.sourceAccount=(0,A.decodeAddressToMuxedAccount)(X.source)}catch{throw new Error("Source address is invalid")}}},{key:"fromXDRObject",value:function(q){var X={};q.sourceAccount()&&(X.source=(0,A.encodeMuxedAccountToAddress)(q.sourceAccount()));var ae=q.body().value(),I=q.body().switch().name;switch(I){case"createAccount":X.type="createAccount",X.destination=Y(ae.destination()),X.startingBalance=this._fromXDRAmount(ae.startingBalance());break;case"payment":X.type="payment",X.destination=(0,A.encodeMuxedAccountToAddress)(ae.destination()),X.asset=_.Asset.fromOperation(ae.asset()),X.amount=this._fromXDRAmount(ae.amount());break;case"pathPaymentStrictReceive":X.type="pathPaymentStrictReceive",X.sendAsset=_.Asset.fromOperation(ae.sendAsset()),X.sendMax=this._fromXDRAmount(ae.sendMax()),X.destination=(0,A.encodeMuxedAccountToAddress)(ae.destination()),X.destAsset=_.Asset.fromOperation(ae.destAsset()),X.destAmount=this._fromXDRAmount(ae.destAmount()),X.path=[];var S=ae.path();Object.keys(S).forEach(function(Ee){X.path.push(_.Asset.fromOperation(S[Ee]))});break;case"pathPaymentStrictSend":X.type="pathPaymentStrictSend",X.sendAsset=_.Asset.fromOperation(ae.sendAsset()),X.sendAmount=this._fromXDRAmount(ae.sendAmount()),X.destination=(0,A.encodeMuxedAccountToAddress)(ae.destination()),X.destAsset=_.Asset.fromOperation(ae.destAsset()),X.destMin=this._fromXDRAmount(ae.destMin()),X.path=[];var m=ae.path();Object.keys(m).forEach(function(Ee){X.path.push(_.Asset.fromOperation(m[Ee]))});break;case"changeTrust":X.type="changeTrust",ae.line().switch()===g.default.AssetType.assetTypePoolShare()?X.line=d.LiquidityPoolAsset.fromOperation(ae.line()):X.line=_.Asset.fromOperation(ae.line()),X.limit=this._fromXDRAmount(ae.limit());break;case"allowTrust":X.type="allowTrust",X.trustor=Y(ae.trustor()),X.assetCode=ae.asset().value().toString(),X.assetCode=(0,u.trimEnd)(X.assetCode,"\0"),X.authorize=ae.authorize();break;case"setOptions":if(X.type="setOptions",ae.inflationDest()&&(X.inflationDest=Y(ae.inflationDest())),X.clearFlags=ae.clearFlags(),X.setFlags=ae.setFlags(),X.masterWeight=ae.masterWeight(),X.lowThreshold=ae.lowThreshold(),X.medThreshold=ae.medThreshold(),X.highThreshold=ae.highThreshold(),X.homeDomain=ae.homeDomain()!==void 0?ae.homeDomain().toString("ascii"):void 0,ae.signer()){var P={},l=ae.signer().key().arm();if(l==="ed25519")P.ed25519PublicKey=Y(ae.signer().key());else if(l==="preAuthTx")P.preAuthTx=ae.signer().key().preAuthTx();else if(l==="hashX")P.sha256Hash=ae.signer().key().hashX();else if(l==="ed25519SignedPayload"){var x=ae.signer().key().ed25519SignedPayload();P.ed25519SignedPayload=T.StrKey.encodeSignedPayload(x.toXDR())}P.weight=ae.signer().weight(),X.signer=P}break;case"manageOffer":case"manageSellOffer":X.type="manageSellOffer",X.selling=_.Asset.fromOperation(ae.selling()),X.buying=_.Asset.fromOperation(ae.buying()),X.amount=this._fromXDRAmount(ae.amount()),X.price=this._fromXDRPrice(ae.price()),X.offerId=ae.offerId().toString();break;case"manageBuyOffer":X.type="manageBuyOffer",X.selling=_.Asset.fromOperation(ae.selling()),X.buying=_.Asset.fromOperation(ae.buying()),X.buyAmount=this._fromXDRAmount(ae.buyAmount()),X.price=this._fromXDRPrice(ae.price()),X.offerId=ae.offerId().toString();break;case"createPassiveOffer":case"createPassiveSellOffer":X.type="createPassiveSellOffer",X.selling=_.Asset.fromOperation(ae.selling()),X.buying=_.Asset.fromOperation(ae.buying()),X.amount=this._fromXDRAmount(ae.amount()),X.price=this._fromXDRPrice(ae.price());break;case"accountMerge":X.type="accountMerge",X.destination=(0,A.encodeMuxedAccountToAddress)(ae);break;case"manageData":X.type="manageData",X.name=ae.dataName().toString("ascii"),X.value=ae.dataValue();break;case"inflation":X.type="inflation";break;case"bumpSequence":X.type="bumpSequence",X.bumpTo=ae.bumpTo().toString();break;case"createClaimableBalance":X.type="createClaimableBalance",X.asset=_.Asset.fromOperation(ae.asset()),X.amount=this._fromXDRAmount(ae.amount()),X.claimants=[],ae.claimants().forEach(function(Ee){X.claimants.push(b.Claimant.fromXDR(Ee))});break;case"claimClaimableBalance":X.type="claimClaimableBalance",X.balanceId=ae.toXDR("hex");break;case"beginSponsoringFutureReserves":X.type="beginSponsoringFutureReserves",X.sponsoredId=Y(ae.sponsoredId());break;case"endSponsoringFutureReserves":X.type="endSponsoringFutureReserves";break;case"revokeSponsorship":(function(Ee,Fe){switch(Ee.switch().name){case"revokeSponsorshipLedgerEntry":var Oe=Ee.ledgerKey();switch(Oe.switch().name){case g.default.LedgerEntryType.account().name:Fe.type="revokeAccountSponsorship",Fe.account=Y(Oe.account().accountId());break;case g.default.LedgerEntryType.trustline().name:Fe.type="revokeTrustlineSponsorship",Fe.account=Y(Oe.trustLine().accountId());var $=Oe.trustLine().asset();$.switch()===g.default.AssetType.assetTypePoolShare()?Fe.asset=w.LiquidityPoolId.fromOperation($):Fe.asset=_.Asset.fromOperation($);break;case g.default.LedgerEntryType.offer().name:Fe.type="revokeOfferSponsorship",Fe.seller=Y(Oe.offer().sellerId()),Fe.offerId=Oe.offer().offerId().toString();break;case g.default.LedgerEntryType.data().name:Fe.type="revokeDataSponsorship",Fe.account=Y(Oe.data().accountId()),Fe.name=Oe.data().dataName().toString("ascii");break;case g.default.LedgerEntryType.claimableBalance().name:Fe.type="revokeClaimableBalanceSponsorship",Fe.balanceId=Oe.claimableBalance().balanceId().toXDR("hex");break;case g.default.LedgerEntryType.liquidityPool().name:Fe.type="revokeLiquidityPoolSponsorship",Fe.liquidityPoolId=Oe.liquidityPool().liquidityPoolId().toString("hex");break;default:throw new Error("Unknown ledgerKey: ".concat(Ee.switch().name))}break;case"revokeSponsorshipSigner":Fe.type="revokeSignerSponsorship",Fe.account=Y(Ee.signer().accountId()),Fe.signer=function(de){var we={};switch(de.switch().name){case g.default.SignerKeyType.signerKeyTypeEd25519().name:we.ed25519PublicKey=T.StrKey.encodeEd25519PublicKey(de.ed25519());break;case g.default.SignerKeyType.signerKeyTypePreAuthTx().name:we.preAuthTx=de.preAuthTx().toString("hex");break;case g.default.SignerKeyType.signerKeyTypeHashX().name:we.sha256Hash=de.hashX().toString("hex");break;default:throw new Error("Unknown signerKey: ".concat(de.switch().name))}return we}(Ee.signer().signerKey());break;default:throw new Error("Unknown revokeSponsorship: ".concat(Ee.switch().name))}})(ae,X);break;case"clawback":X.type="clawback",X.amount=this._fromXDRAmount(ae.amount()),X.from=(0,A.encodeMuxedAccountToAddress)(ae.from()),X.asset=_.Asset.fromOperation(ae.asset());break;case"clawbackClaimableBalance":X.type="clawbackClaimableBalance",X.balanceId=ae.toXDR("hex");break;case"setTrustLineFlags":X.type="setTrustLineFlags",X.asset=_.Asset.fromOperation(ae.asset()),X.trustor=Y(ae.trustor());var W=ae.clearFlags(),K=ae.setFlags(),re={authorized:g.default.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:g.default.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:g.default.TrustLineFlags.trustlineClawbackEnabledFlag()};X.flags={},Object.keys(re).forEach(function(Ee){var Fe;X.flags[Ee]=(Fe=re[Ee].value,!!(K&Fe)||!(W&Fe)&&void 0)});break;case"liquidityPoolDeposit":X.type="liquidityPoolDeposit",X.liquidityPoolId=ae.liquidityPoolId().toString("hex"),X.maxAmountA=this._fromXDRAmount(ae.maxAmountA()),X.maxAmountB=this._fromXDRAmount(ae.maxAmountB()),X.minPrice=this._fromXDRPrice(ae.minPrice()),X.maxPrice=this._fromXDRPrice(ae.maxPrice());break;case"liquidityPoolWithdraw":X.type="liquidityPoolWithdraw",X.liquidityPoolId=ae.liquidityPoolId().toString("hex"),X.amount=this._fromXDRAmount(ae.amount()),X.minAmountA=this._fromXDRAmount(ae.minAmountA()),X.minAmountB=this._fromXDRAmount(ae.minAmountB());break;case"invokeHostFunction":var oe;X.type="invokeHostFunction",X.func=ae.hostFunction(),X.auth=(oe=ae.auth())!==null&&oe!==void 0?oe:[];break;case"extendFootprintTtl":X.type="extendFootprintTtl",X.extendTo=ae.extendTo();break;case"restoreFootprint":X.type="restoreFootprint";break;default:throw new Error("Unknown operation: ".concat(I))}return X}},{key:"isValidAmount",value:function(q){var X,ae=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(typeof q!="string")return!1;try{X=new f.default(q)}catch{return!1}return!(!ae&&X.isZero()||X.isNegative()||X.times(j).gt(new f.default("9223372036854775807").toString())||X.decimalPlaces()>7||X.isNaN()||!X.isFinite())}},{key:"constructAmountRequirementsError",value:function(q){return"".concat(q," argument must be of type String, represent a positive number and have at most 7 digits after the decimal")}},{key:"_checkUnsignedIntValue",value:function(q,X){var ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(X!==void 0)switch(typeof X=="string"&&(X=parseFloat(X)),!0){case(typeof X!="number"||!Number.isFinite(X)||X%1!=0):throw new Error("".concat(q," value is invalid"));case X<0:throw new Error("".concat(q," value must be unsigned"));case(!ae||ae&&ae(X,q)):return X;default:throw new Error("".concat(q," value is invalid"))}}},{key:"_toXDRAmount",value:function(q){var X=new f.default(q).times(j);return s.Hyper.fromString(X.toString())}},{key:"_fromXDRAmount",value:function(q){return new f.default(q).div(j).toFixed(7)}},{key:"_fromXDRPrice",value:function(q){return new f.default(q.n()).div(new f.default(q.d())).toString()}},{key:"_toXDRPrice",value:function(q){var X;if(q.n&&q.d)X=new g.default.Price(q);else{var ae=(0,r.best_r)(q);X=new g.default.Price({n:parseInt(ae[0],10),d:parseInt(ae[1],10)})}if(X.n()<0||X.d()<0)throw new Error("price must be positive");return X}}],(le=null)&&F(me.prototype,le),C&&F(me,C),Object.defineProperty(me,"prototype",{writable:!1}),me;var me,le,C}());function Y(me){return T.StrKey.encodeEd25519PublicKey(me.ed25519())}V.accountMerge=p.accountMerge,V.allowTrust=p.allowTrust,V.bumpSequence=p.bumpSequence,V.changeTrust=p.changeTrust,V.createAccount=p.createAccount,V.createClaimableBalance=p.createClaimableBalance,V.claimClaimableBalance=p.claimClaimableBalance,V.clawbackClaimableBalance=p.clawbackClaimableBalance,V.createPassiveSellOffer=p.createPassiveSellOffer,V.inflation=p.inflation,V.manageData=p.manageData,V.manageSellOffer=p.manageSellOffer,V.manageBuyOffer=p.manageBuyOffer,V.pathPaymentStrictReceive=p.pathPaymentStrictReceive,V.pathPaymentStrictSend=p.pathPaymentStrictSend,V.payment=p.payment,V.setOptions=p.setOptions,V.beginSponsoringFutureReserves=p.beginSponsoringFutureReserves,V.endSponsoringFutureReserves=p.endSponsoringFutureReserves,V.revokeAccountSponsorship=p.revokeAccountSponsorship,V.revokeTrustlineSponsorship=p.revokeTrustlineSponsorship,V.revokeOfferSponsorship=p.revokeOfferSponsorship,V.revokeDataSponsorship=p.revokeDataSponsorship,V.revokeClaimableBalanceSponsorship=p.revokeClaimableBalanceSponsorship,V.revokeLiquidityPoolSponsorship=p.revokeLiquidityPoolSponsorship,V.revokeSignerSponsorship=p.revokeSignerSponsorship,V.clawback=p.clawback,V.setTrustLineFlags=p.setTrustLineFlags,V.liquidityPoolDeposit=p.liquidityPoolDeposit,V.liquidityPoolWithdraw=p.liquidityPoolWithdraw,V.invokeHostFunction=p.invokeHostFunction,V.extendFootprintTtl=p.extendFootprintTtl,V.restoreFootprint=p.restoreFootprint,V.createStellarAssetContract=p.createStellarAssetContract,V.invokeContractFunction=p.invokeContractFunction,V.createCustomContract=p.createCustomContract,V.uploadContractWasm=p.uploadContractWasm},4295:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.accountMerge=function(r){var _={};try{_.body=f.default.OperationBody.accountMerge((0,u.decodeAddressToMuxedAccount)(r.destination))}catch{throw new Error("destination is invalid")}return this.setSourceAccount(_,r),new f.default.Operation(_)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s},u=i(6160)},3683:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.allowTrust=function(_){if(!r.StrKey.isValidEd25519PublicKey(_.trustor))throw new Error("trustor is invalid");var d={};if(d.trustor=u.Keypair.fromPublicKey(_.trustor).xdrAccountId(),_.assetCode.length<=4){var b=_.assetCode.padEnd(4,"\0");d.asset=f.default.AssetCode.assetTypeCreditAlphanum4(b)}else{if(!(_.assetCode.length<=12))throw new Error("Asset code must be 12 characters at max.");var T=_.assetCode.padEnd(12,"\0");d.asset=f.default.AssetCode.assetTypeCreditAlphanum12(T)}typeof _.authorize=="boolean"?_.authorize?d.authorize=f.default.TrustLineFlags.authorizedFlag().value:d.authorize=0:d.authorize=_.authorize;var w=new f.default.AllowTrustOp(d),g={};return g.body=f.default.OperationBody.allowTrust(w),this.setSourceAccount(g,_),new f.default.Operation(g)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s},u=i(6691),r=i(7120)},7505:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.beginSponsoringFutureReserves=function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!u.StrKey.isValidEd25519PublicKey(_.sponsoredId))throw new Error("sponsoredId is invalid");var d=new f.default.BeginSponsoringFutureReservesOp({sponsoredId:r.Keypair.fromPublicKey(_.sponsoredId).xdrAccountId()}),b={};return b.body=f.default.OperationBody.beginSponsoringFutureReserves(d),this.setSourceAccount(b,_),new f.default.Operation(b)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s},u=i(7120),r=i(6691)},6183:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.bumpSequence=function(_){var d={};if(typeof _.bumpTo!="string")throw new Error("bumpTo must be a string");try{new f.default(_.bumpTo)}catch{throw new Error("bumpTo must be a stringified number")}d.bumpTo=s.Hyper.fromString(_.bumpTo);var b=new u.default.BumpSequenceOp(d),T={};return T.body=u.default.OperationBody.bumpSequence(b),this.setSourceAccount(T,_),new u.default.Operation(T)};var s=i(3740),f=r(i(1242)),u=r(i(1918));function r(_){return _&&_.__esModule?_:{default:_}}},2810:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.changeTrust=function(T){var w={};if(T.asset instanceof r.Asset)w.line=T.asset.toChangeTrustXDRObject();else{if(!(T.asset instanceof _.LiquidityPoolAsset))throw new TypeError("asset must be Asset or LiquidityPoolAsset");w.line=T.asset.toXDRObject()}if(T.limit!==void 0&&!this.isValidAmount(T.limit,!0))throw new TypeError(this.constructAmountRequirementsError("limit"));T.limit?w.limit=this._toXDRAmount(T.limit):w.limit=s.Hyper.fromString(new f.default(b).toString()),T.source&&(w.source=T.source.masterKeypair);var g=new u.default.ChangeTrustOp(w),p={};return p.body=u.default.OperationBody.changeTrust(g),this.setSourceAccount(p,T),new u.default.Operation(p)};var s=i(3740),f=d(i(1242)),u=d(i(1918)),r=i(1764),_=i(2262);function d(T){return T&&T.__esModule?T:{default:T}}var b="9223372036854775807"},7239:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.claimClaimableBalance=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};u(r.balanceId);var _={};_.balanceId=f.default.ClaimableBalanceId.fromXDR(r.balanceId,"hex");var d=new f.default.ClaimClaimableBalanceOp(_),b={};return b.body=f.default.OperationBody.claimClaimableBalance(d),this.setSourceAccount(b,r),new f.default.Operation(b)},a.validateClaimableBalanceId=u;var s,f=(s=i(1918))&&s.__esModule?s:{default:s};function u(r){if(typeof r!="string"||r.length!==72)throw new Error("must provide a valid claimable balance id")}},7651:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.clawback=function(r){var _={};if(!this.isValidAmount(r.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));_.amount=this._toXDRAmount(r.amount),_.asset=r.asset.toXDRObject();try{_.from=(0,u.decodeAddressToMuxedAccount)(r.from)}catch{throw new Error("from address is invalid")}var d={body:f.default.OperationBody.clawback(new f.default.ClawbackOp(_))};return this.setSourceAccount(d,r),new f.default.Operation(d)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s},u=i(6160)},2203:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.clawbackClaimableBalance=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};(0,u.validateClaimableBalanceId)(r.balanceId);var _={balanceId:f.default.ClaimableBalanceId.fromXDR(r.balanceId,"hex")},d={body:f.default.OperationBody.clawbackClaimableBalance(new f.default.ClawbackClaimableBalanceOp(_))};return this.setSourceAccount(d,r),new f.default.Operation(d)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s},u=i(7239)},2115:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.createAccount=function(_){if(!r.StrKey.isValidEd25519PublicKey(_.destination))throw new Error("destination is invalid");if(!this.isValidAmount(_.startingBalance,!0))throw new TypeError(this.constructAmountRequirementsError("startingBalance"));var d={};d.destination=u.Keypair.fromPublicKey(_.destination).xdrAccountId(),d.startingBalance=this._toXDRAmount(_.startingBalance);var b=new f.default.CreateAccountOp(d),T={};return T.body=f.default.OperationBody.createAccount(b),this.setSourceAccount(T,_),new f.default.Operation(T)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s},u=i(6691),r=i(7120)},4831:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.createClaimableBalance=function(r){if(!(r.asset instanceof u.Asset))throw new Error("must provide an asset for create claimable balance operation");if(!this.isValidAmount(r.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(!Array.isArray(r.claimants)||r.claimants.length===0)throw new Error("must provide at least one claimant");var _={};_.asset=r.asset.toXDRObject(),_.amount=this._toXDRAmount(r.amount),_.claimants=Object.values(r.claimants).map(function(T){return T.toXDRObject()});var d=new f.default.CreateClaimableBalanceOp(_),b={};return b.body=f.default.OperationBody.createClaimableBalance(d),this.setSourceAccount(b,r),new f.default.Operation(b)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s},u=i(1764)},9073:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.createPassiveSellOffer=function(u){var r={};if(r.selling=u.selling.toXDRObject(),r.buying=u.buying.toXDRObject(),!this.isValidAmount(u.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(r.amount=this._toXDRAmount(u.amount),u.price===void 0)throw new TypeError("price argument is required");r.price=this._toXDRPrice(u.price);var _=new f.default.CreatePassiveSellOfferOp(r),d={};return d.body=f.default.OperationBody.createPassiveSellOffer(_),this.setSourceAccount(d,u),new f.default.Operation(d)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s}},721:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.endSponsoringFutureReserves=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r={};return r.body=f.default.OperationBody.endSponsoringFutureReserves(),this.setSourceAccount(r,u),new f.default.Operation(r)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s}},8752:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.extendFootprintTtl=function(u){var r;if(((r=u.extendTo)!==null&&r!==void 0?r:-1)<=0)throw new RangeError("extendTo isn't a ledger quantity (uint32)");var _=new f.default.ExtendFootprintTtlOp({ext:new f.default.ExtensionPoint(0),extendTo:u.extendTo}),d={body:f.default.OperationBody.extendFootprintTtl(_)};return this.setSourceAccount(d,u),new f.default.Operation(d)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s}},7511:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"accountMerge",{enumerable:!0,get:function(){return u.accountMerge}}),Object.defineProperty(a,"allowTrust",{enumerable:!0,get:function(){return r.allowTrust}}),Object.defineProperty(a,"beginSponsoringFutureReserves",{enumerable:!0,get:function(){return j.beginSponsoringFutureReserves}}),Object.defineProperty(a,"bumpSequence",{enumerable:!0,get:function(){return _.bumpSequence}}),Object.defineProperty(a,"changeTrust",{enumerable:!0,get:function(){return d.changeTrust}}),Object.defineProperty(a,"claimClaimableBalance",{enumerable:!0,get:function(){return w.claimClaimableBalance}}),Object.defineProperty(a,"clawback",{enumerable:!0,get:function(){return me.clawback}}),Object.defineProperty(a,"clawbackClaimableBalance",{enumerable:!0,get:function(){return g.clawbackClaimableBalance}}),Object.defineProperty(a,"createAccount",{enumerable:!0,get:function(){return b.createAccount}}),Object.defineProperty(a,"createClaimableBalance",{enumerable:!0,get:function(){return T.createClaimableBalance}}),Object.defineProperty(a,"createCustomContract",{enumerable:!0,get:function(){return X.createCustomContract}}),Object.defineProperty(a,"createPassiveSellOffer",{enumerable:!0,get:function(){return f.createPassiveSellOffer}}),Object.defineProperty(a,"createStellarAssetContract",{enumerable:!0,get:function(){return X.createStellarAssetContract}}),Object.defineProperty(a,"endSponsoringFutureReserves",{enumerable:!0,get:function(){return V.endSponsoringFutureReserves}}),Object.defineProperty(a,"extendFootprintTtl",{enumerable:!0,get:function(){return ae.extendFootprintTtl}}),Object.defineProperty(a,"inflation",{enumerable:!0,get:function(){return p.inflation}}),Object.defineProperty(a,"invokeContractFunction",{enumerable:!0,get:function(){return X.invokeContractFunction}}),Object.defineProperty(a,"invokeHostFunction",{enumerable:!0,get:function(){return X.invokeHostFunction}}),Object.defineProperty(a,"liquidityPoolDeposit",{enumerable:!0,get:function(){return C.liquidityPoolDeposit}}),Object.defineProperty(a,"liquidityPoolWithdraw",{enumerable:!0,get:function(){return q.liquidityPoolWithdraw}}),Object.defineProperty(a,"manageBuyOffer",{enumerable:!0,get:function(){return L.manageBuyOffer}}),Object.defineProperty(a,"manageData",{enumerable:!0,get:function(){return A.manageData}}),Object.defineProperty(a,"manageSellOffer",{enumerable:!0,get:function(){return s.manageSellOffer}}),Object.defineProperty(a,"pathPaymentStrictReceive",{enumerable:!0,get:function(){return E.pathPaymentStrictReceive}}),Object.defineProperty(a,"pathPaymentStrictSend",{enumerable:!0,get:function(){return N.pathPaymentStrictSend}}),Object.defineProperty(a,"payment",{enumerable:!0,get:function(){return F.payment}}),Object.defineProperty(a,"restoreFootprint",{enumerable:!0,get:function(){return I.restoreFootprint}}),Object.defineProperty(a,"revokeAccountSponsorship",{enumerable:!0,get:function(){return Y.revokeAccountSponsorship}}),Object.defineProperty(a,"revokeClaimableBalanceSponsorship",{enumerable:!0,get:function(){return Y.revokeClaimableBalanceSponsorship}}),Object.defineProperty(a,"revokeDataSponsorship",{enumerable:!0,get:function(){return Y.revokeDataSponsorship}}),Object.defineProperty(a,"revokeLiquidityPoolSponsorship",{enumerable:!0,get:function(){return Y.revokeLiquidityPoolSponsorship}}),Object.defineProperty(a,"revokeOfferSponsorship",{enumerable:!0,get:function(){return Y.revokeOfferSponsorship}}),Object.defineProperty(a,"revokeSignerSponsorship",{enumerable:!0,get:function(){return Y.revokeSignerSponsorship}}),Object.defineProperty(a,"revokeTrustlineSponsorship",{enumerable:!0,get:function(){return Y.revokeTrustlineSponsorship}}),Object.defineProperty(a,"setOptions",{enumerable:!0,get:function(){return R.setOptions}}),Object.defineProperty(a,"setTrustLineFlags",{enumerable:!0,get:function(){return le.setTrustLineFlags}}),Object.defineProperty(a,"uploadContractWasm",{enumerable:!0,get:function(){return X.uploadContractWasm}});var s=i(862),f=i(9073),u=i(4295),r=i(3683),_=i(6183),d=i(2810),b=i(2115),T=i(4831),w=i(7239),g=i(2203),p=i(7421),A=i(1411),L=i(1922),E=i(2075),N=i(3874),F=i(3533),R=i(2018),j=i(7505),V=i(721),Y=i(7790),me=i(7651),le=i(1804),C=i(9845),q=i(4737),X=i(4403),ae=i(8752),I=i(149)},7421:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.inflation=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r={};return r.body=f.default.OperationBody.inflation(),this.setSourceAccount(r,u),new f.default.Operation(r)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s}},4403:(o,a,i)=>{"use strict";var s=i(8287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.createCustomContract=function(T){var w=s.from(T.salt||r.Keypair.random().xdrPublicKey().value());if(!T.wasmHash||T.wasmHash.length!==32)throw new TypeError("expected hash(contract WASM) in 'opts.wasmHash', got ".concat(T.wasmHash));if(w.length!==32)throw new TypeError("expected 32-byte salt in 'opts.salt', got ".concat(T.wasmHash));return this.invokeHostFunction({source:T.source,auth:T.auth,func:u.default.HostFunction.hostFunctionTypeCreateContract(new u.default.CreateContractArgs({executable:u.default.ContractExecutable.contractExecutableWasm(s.from(T.wasmHash)),contractIdPreimage:u.default.ContractIdPreimage.contractIdPreimageFromAddress(new u.default.ContractIdPreimageFromAddress({address:T.address.toScAddress(),salt:w}))}))})},a.createStellarAssetContract=function(T){var w=T.asset;if(typeof w=="string"){var g=w.split(":"),p=(N=2,function(F){if(Array.isArray(F))return F}(E=g)||function(F,R){var j=F==null?null:typeof Symbol<"u"&&F[Symbol.iterator]||F["@@iterator"];if(j!=null){var V,Y,me,le,C=[],q=!0,X=!1;try{if(me=(j=j.call(F)).next,R===0){if(Object(j)!==j)return;q=!1}else for(;!(q=(V=me.call(j)).done)&&(C.push(V.value),C.length!==R);q=!0);}catch(ae){X=!0,Y=ae}finally{try{if(!q&&j.return!=null&&(le=j.return(),Object(le)!==le))return}finally{if(X)throw Y}}return C}}(E,N)||function(F,R){if(F){if(typeof F=="string")return b(F,R);var j=Object.prototype.toString.call(F).slice(8,-1);return j==="Object"&&F.constructor&&(j=F.constructor.name),j==="Map"||j==="Set"?Array.from(F):j==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j)?b(F,R):void 0}}(E,N)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
20
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()),A=p[0],L=p[1];w=new d.Asset(A,L)}var E,N;if(!(w instanceof d.Asset))throw new TypeError("expected Asset in 'opts.asset', got ".concat(w));return this.invokeHostFunction({source:T.source,auth:T.auth,func:u.default.HostFunction.hostFunctionTypeCreateContract(new u.default.CreateContractArgs({executable:u.default.ContractExecutable.contractExecutableStellarAsset(),contractIdPreimage:u.default.ContractIdPreimage.contractIdPreimageFromAsset(w.toXDRObject())}))})},a.invokeContractFunction=function(T){var w=new _.Address(T.contract);if(w._type!=="contract")throw new TypeError("expected contract strkey instance, got ".concat(w));return this.invokeHostFunction({source:T.source,auth:T.auth,func:u.default.HostFunction.hostFunctionTypeInvokeContract(new u.default.InvokeContractArgs({contractAddress:w.toScAddress(),functionName:T.function,args:T.args}))})},a.invokeHostFunction=function(T){if(!T.func)throw new TypeError("host function invocation ('func') required (got ".concat(JSON.stringify(T),")"));var w=new u.default.InvokeHostFunctionOp({hostFunction:T.func,auth:T.auth||[]}),g={body:u.default.OperationBody.invokeHostFunction(w)};return this.setSourceAccount(g,T),new u.default.Operation(g)},a.uploadContractWasm=function(T){return this.invokeHostFunction({source:T.source,auth:T.auth,func:u.default.HostFunction.hostFunctionTypeUploadContractWasm(s.from(T.wasm))})};var f,u=(f=i(1918))&&f.__esModule?f:{default:f},r=i(6691),_=i(1180),d=i(1764);function b(T,w){(w==null||w>T.length)&&(w=T.length);for(var g=0,p=new Array(w);g<w;g++)p[g]=T[g];return p}},9845:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.liquidityPoolDeposit=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=u.liquidityPoolId,_=u.maxAmountA,d=u.maxAmountB,b=u.minPrice,T=u.maxPrice,w={};if(!r)throw new TypeError("liquidityPoolId argument is required");if(w.liquidityPoolId=f.default.PoolId.fromXDR(r,"hex"),!this.isValidAmount(_,!0))throw new TypeError(this.constructAmountRequirementsError("maxAmountA"));if(w.maxAmountA=this._toXDRAmount(_),!this.isValidAmount(d,!0))throw new TypeError(this.constructAmountRequirementsError("maxAmountB"));if(w.maxAmountB=this._toXDRAmount(d),b===void 0)throw new TypeError("minPrice argument is required");if(w.minPrice=this._toXDRPrice(b),T===void 0)throw new TypeError("maxPrice argument is required");w.maxPrice=this._toXDRPrice(T);var g=new f.default.LiquidityPoolDepositOp(w),p={body:f.default.OperationBody.liquidityPoolDeposit(g)};return this.setSourceAccount(p,u),new f.default.Operation(p)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s}},4737:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.liquidityPoolWithdraw=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r={};if(!u.liquidityPoolId)throw new TypeError("liquidityPoolId argument is required");if(r.liquidityPoolId=f.default.PoolId.fromXDR(u.liquidityPoolId,"hex"),!this.isValidAmount(u.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));if(r.amount=this._toXDRAmount(u.amount),!this.isValidAmount(u.minAmountA,!0))throw new TypeError(this.constructAmountRequirementsError("minAmountA"));if(r.minAmountA=this._toXDRAmount(u.minAmountA),!this.isValidAmount(u.minAmountB,!0))throw new TypeError(this.constructAmountRequirementsError("minAmountB"));r.minAmountB=this._toXDRAmount(u.minAmountB);var _=new f.default.LiquidityPoolWithdrawOp(r),d={body:f.default.OperationBody.liquidityPoolWithdraw(_)};return this.setSourceAccount(d,u),new f.default.Operation(d)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s}},1922:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.manageBuyOffer=function(r){var _={};if(_.selling=r.selling.toXDRObject(),_.buying=r.buying.toXDRObject(),!this.isValidAmount(r.buyAmount,!0))throw new TypeError(this.constructAmountRequirementsError("buyAmount"));if(_.buyAmount=this._toXDRAmount(r.buyAmount),r.price===void 0)throw new TypeError("price argument is required");_.price=this._toXDRPrice(r.price),r.offerId!==void 0?r.offerId=r.offerId.toString():r.offerId="0",_.offerId=f.Hyper.fromString(r.offerId);var d=new u.default.ManageBuyOfferOp(_),b={};return b.body=u.default.OperationBody.manageBuyOffer(d),this.setSourceAccount(b,r),new u.default.Operation(b)};var s,f=i(3740),u=(s=i(1918))&&s.__esModule?s:{default:s}},1411:(o,a,i)=>{"use strict";var s=i(8287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.manageData=function(r){var _={};if(!(typeof r.name=="string"&&r.name.length<=64))throw new Error("name must be a string, up to 64 characters");if(_.dataName=r.name,typeof r.value!="string"&&!s.isBuffer(r.value)&&r.value!==null)throw new Error("value must be a string, Buffer or null");if(typeof r.value=="string"?_.dataValue=s.from(r.value):_.dataValue=r.value,_.dataValue!==null&&_.dataValue.length>64)throw new Error("value cannot be longer that 64 bytes");var d=new u.default.ManageDataOp(_),b={};return b.body=u.default.OperationBody.manageData(d),this.setSourceAccount(b,r),new u.default.Operation(b)};var f,u=(f=i(1918))&&f.__esModule?f:{default:f}},862:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.manageSellOffer=function(r){var _={};if(_.selling=r.selling.toXDRObject(),_.buying=r.buying.toXDRObject(),!this.isValidAmount(r.amount,!0))throw new TypeError(this.constructAmountRequirementsError("amount"));if(_.amount=this._toXDRAmount(r.amount),r.price===void 0)throw new TypeError("price argument is required");_.price=this._toXDRPrice(r.price),r.offerId!==void 0?r.offerId=r.offerId.toString():r.offerId="0",_.offerId=f.Hyper.fromString(r.offerId);var d=new u.default.ManageSellOfferOp(_),b={};return b.body=u.default.OperationBody.manageSellOffer(d),this.setSourceAccount(b,r),new u.default.Operation(b)};var s,f=i(3740),u=(s=i(1918))&&s.__esModule?s:{default:s}},2075:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.pathPaymentStrictReceive=function(r){switch(!0){case!r.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(r.sendMax):throw new TypeError(this.constructAmountRequirementsError("sendMax"));case!r.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(r.destAmount):throw new TypeError(this.constructAmountRequirementsError("destAmount"))}var _={};_.sendAsset=r.sendAsset.toXDRObject(),_.sendMax=this._toXDRAmount(r.sendMax);try{_.destination=(0,u.decodeAddressToMuxedAccount)(r.destination)}catch{throw new Error("destination is invalid")}_.destAsset=r.destAsset.toXDRObject(),_.destAmount=this._toXDRAmount(r.destAmount);var d=r.path?r.path:[];_.path=d.map(function(w){return w.toXDRObject()});var b=new f.default.PathPaymentStrictReceiveOp(_),T={};return T.body=f.default.OperationBody.pathPaymentStrictReceive(b),this.setSourceAccount(T,r),new f.default.Operation(T)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s},u=i(6160)},3874:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.pathPaymentStrictSend=function(r){switch(!0){case!r.sendAsset:throw new Error("Must specify a send asset");case!this.isValidAmount(r.sendAmount):throw new TypeError(this.constructAmountRequirementsError("sendAmount"));case!r.destAsset:throw new Error("Must provide a destAsset for a payment operation");case!this.isValidAmount(r.destMin):throw new TypeError(this.constructAmountRequirementsError("destMin"))}var _={};_.sendAsset=r.sendAsset.toXDRObject(),_.sendAmount=this._toXDRAmount(r.sendAmount);try{_.destination=(0,u.decodeAddressToMuxedAccount)(r.destination)}catch{throw new Error("destination is invalid")}_.destAsset=r.destAsset.toXDRObject(),_.destMin=this._toXDRAmount(r.destMin);var d=r.path?r.path:[];_.path=d.map(function(w){return w.toXDRObject()});var b=new f.default.PathPaymentStrictSendOp(_),T={};return T.body=f.default.OperationBody.pathPaymentStrictSend(b),this.setSourceAccount(T,r),new f.default.Operation(T)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s},u=i(6160)},3533:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.payment=function(r){if(!r.asset)throw new Error("Must provide an asset for a payment operation");if(!this.isValidAmount(r.amount))throw new TypeError(this.constructAmountRequirementsError("amount"));var _={};try{_.destination=(0,u.decodeAddressToMuxedAccount)(r.destination)}catch{throw new Error("destination is invalid")}_.asset=r.asset.toXDRObject(),_.amount=this._toXDRAmount(r.amount);var d=new f.default.PaymentOp(_),b={};return b.body=f.default.OperationBody.payment(d),this.setSourceAccount(b,r),new f.default.Operation(b)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s},u=i(6160)},149:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.restoreFootprint=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=new f.default.RestoreFootprintOp({ext:new f.default.ExtensionPoint(0)}),_={body:f.default.OperationBody.restoreFootprint(r)};return this.setSourceAccount(_,u??{}),new f.default.Operation(_)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s}},7790:(o,a,i)=>{"use strict";var s=i(8287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.revokeAccountSponsorship=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!r.StrKey.isValidEd25519PublicKey(T.account))throw new Error("account is invalid");var w=u.default.LedgerKey.account(new u.default.LedgerKeyAccount({accountId:_.Keypair.fromPublicKey(T.account).xdrAccountId()})),g=u.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(w),p={};return p.body=u.default.OperationBody.revokeSponsorship(g),this.setSourceAccount(p,T),new u.default.Operation(p)},a.revokeClaimableBalanceSponsorship=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(typeof T.balanceId!="string")throw new Error("balanceId is invalid");var w=u.default.LedgerKey.claimableBalance(new u.default.LedgerKeyClaimableBalance({balanceId:u.default.ClaimableBalanceId.fromXDR(T.balanceId,"hex")})),g=u.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(w),p={};return p.body=u.default.OperationBody.revokeSponsorship(g),this.setSourceAccount(p,T),new u.default.Operation(p)},a.revokeDataSponsorship=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!r.StrKey.isValidEd25519PublicKey(T.account))throw new Error("account is invalid");if(typeof T.name!="string"||T.name.length>64)throw new Error("name must be a string, up to 64 characters");var w=u.default.LedgerKey.data(new u.default.LedgerKeyData({accountId:_.Keypair.fromPublicKey(T.account).xdrAccountId(),dataName:T.name})),g=u.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(w),p={};return p.body=u.default.OperationBody.revokeSponsorship(g),this.setSourceAccount(p,T),new u.default.Operation(p)},a.revokeLiquidityPoolSponsorship=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(typeof T.liquidityPoolId!="string")throw new Error("liquidityPoolId is invalid");var w=u.default.LedgerKey.liquidityPool(new u.default.LedgerKeyLiquidityPool({liquidityPoolId:u.default.PoolId.fromXDR(T.liquidityPoolId,"hex")})),g=u.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(w),p={body:u.default.OperationBody.revokeSponsorship(g)};return this.setSourceAccount(p,T),new u.default.Operation(p)},a.revokeOfferSponsorship=function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!r.StrKey.isValidEd25519PublicKey(T.seller))throw new Error("seller is invalid");if(typeof T.offerId!="string")throw new Error("offerId is invalid");var w=u.default.LedgerKey.offer(new u.default.LedgerKeyOffer({sellerId:_.Keypair.fromPublicKey(T.seller).xdrAccountId(),offerId:u.default.Int64.fromString(T.offerId)})),g=u.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(w),p={};return p.body=u.default.OperationBody.revokeSponsorship(g),this.setSourceAccount(p,T),new u.default.Operation(p)},a.revokeSignerSponsorship=function(){var T,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!r.StrKey.isValidEd25519PublicKey(w.account))throw new Error("account is invalid");if(w.signer.ed25519PublicKey){if(!r.StrKey.isValidEd25519PublicKey(w.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var g=r.StrKey.decodeEd25519PublicKey(w.signer.ed25519PublicKey);T=new u.default.SignerKey.signerKeyTypeEd25519(g)}else if(w.signer.preAuthTx){var p;if(p=typeof w.signer.preAuthTx=="string"?s.from(w.signer.preAuthTx,"hex"):w.signer.preAuthTx,!s.isBuffer(p)||p.length!==32)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");T=new u.default.SignerKey.signerKeyTypePreAuthTx(p)}else{if(!w.signer.sha256Hash)throw new Error("signer is invalid");var A;if(A=typeof w.signer.sha256Hash=="string"?s.from(w.signer.sha256Hash,"hex"):w.signer.sha256Hash,!s.isBuffer(A)||A.length!==32)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");T=new u.default.SignerKey.signerKeyTypeHashX(A)}var L=new u.default.RevokeSponsorshipOpSigner({accountId:_.Keypair.fromPublicKey(w.account).xdrAccountId(),signerKey:T}),E=u.default.RevokeSponsorshipOp.revokeSponsorshipSigner(L),N={};return N.body=u.default.OperationBody.revokeSponsorship(E),this.setSourceAccount(N,w),new u.default.Operation(N)},a.revokeTrustlineSponsorship=function(){var T,w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!r.StrKey.isValidEd25519PublicKey(w.account))throw new Error("account is invalid");if(w.asset instanceof d.Asset)T=w.asset.toTrustLineXDRObject();else{if(!(w.asset instanceof b.LiquidityPoolId))throw new TypeError("asset must be an Asset or LiquidityPoolId");T=w.asset.toXDRObject()}var g=u.default.LedgerKey.trustline(new u.default.LedgerKeyTrustLine({accountId:_.Keypair.fromPublicKey(w.account).xdrAccountId(),asset:T})),p=u.default.RevokeSponsorshipOp.revokeSponsorshipLedgerEntry(g),A={};return A.body=u.default.OperationBody.revokeSponsorship(p),this.setSourceAccount(A,w),new u.default.Operation(A)};var f,u=(f=i(1918))&&f.__esModule?f:{default:f},r=i(7120),_=i(6691),d=i(1764),b=i(9353)},2018:(o,a,i)=>{"use strict";var s=i(8287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.setOptions=function(b){var T={};if(b.inflationDest){if(!_.StrKey.isValidEd25519PublicKey(b.inflationDest))throw new Error("inflationDest is invalid");T.inflationDest=r.Keypair.fromPublicKey(b.inflationDest).xdrAccountId()}if(T.clearFlags=this._checkUnsignedIntValue("clearFlags",b.clearFlags),T.setFlags=this._checkUnsignedIntValue("setFlags",b.setFlags),T.masterWeight=this._checkUnsignedIntValue("masterWeight",b.masterWeight,d),T.lowThreshold=this._checkUnsignedIntValue("lowThreshold",b.lowThreshold,d),T.medThreshold=this._checkUnsignedIntValue("medThreshold",b.medThreshold,d),T.highThreshold=this._checkUnsignedIntValue("highThreshold",b.highThreshold,d),b.homeDomain!==void 0&&typeof b.homeDomain!="string")throw new TypeError("homeDomain argument must be of type String");if(T.homeDomain=b.homeDomain,b.signer){var w,g=this._checkUnsignedIntValue("signer.weight",b.signer.weight,d),p=0;if(b.signer.ed25519PublicKey){if(!_.StrKey.isValidEd25519PublicKey(b.signer.ed25519PublicKey))throw new Error("signer.ed25519PublicKey is invalid.");var A=_.StrKey.decodeEd25519PublicKey(b.signer.ed25519PublicKey);w=new u.default.SignerKey.signerKeyTypeEd25519(A),p+=1}if(b.signer.preAuthTx){if(typeof b.signer.preAuthTx=="string"&&(b.signer.preAuthTx=s.from(b.signer.preAuthTx,"hex")),!s.isBuffer(b.signer.preAuthTx)||b.signer.preAuthTx.length!==32)throw new Error("signer.preAuthTx must be 32 bytes Buffer.");w=new u.default.SignerKey.signerKeyTypePreAuthTx(b.signer.preAuthTx),p+=1}if(b.signer.sha256Hash){if(typeof b.signer.sha256Hash=="string"&&(b.signer.sha256Hash=s.from(b.signer.sha256Hash,"hex")),!s.isBuffer(b.signer.sha256Hash)||b.signer.sha256Hash.length!==32)throw new Error("signer.sha256Hash must be 32 bytes Buffer.");w=new u.default.SignerKey.signerKeyTypeHashX(b.signer.sha256Hash),p+=1}if(b.signer.ed25519SignedPayload){if(!_.StrKey.isValidSignedPayload(b.signer.ed25519SignedPayload))throw new Error("signer.ed25519SignedPayload is invalid.");var L=_.StrKey.decodeSignedPayload(b.signer.ed25519SignedPayload),E=u.default.SignerKeyEd25519SignedPayload.fromXDR(L);w=u.default.SignerKey.signerKeyTypeEd25519SignedPayload(E),p+=1}if(p!==1)throw new Error("Signer object must contain exactly one of signer.ed25519PublicKey, signer.sha256Hash, signer.preAuthTx.");T.signer=new u.default.Signer({key:w,weight:g})}var N=new u.default.SetOptionsOp(T),F={};return F.body=u.default.OperationBody.setOptions(N),this.setSourceAccount(F,b),new u.default.Operation(F)};var f,u=(f=i(1918))&&f.__esModule?f:{default:f},r=i(6691),_=i(7120);function d(b,T){if(b>=0&&b<=255)return!0;throw new Error("".concat(T," value must be between 0 and 255"))}},1804:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.setTrustLineFlags=function(){var _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},d={};if(r(_.flags)!=="object"||Object.keys(_.flags).length===0)throw new Error("opts.flags must be a map of boolean flags to modify");var b={authorized:f.default.TrustLineFlags.authorizedFlag(),authorizedToMaintainLiabilities:f.default.TrustLineFlags.authorizedToMaintainLiabilitiesFlag(),clawbackEnabled:f.default.TrustLineFlags.trustlineClawbackEnabledFlag()},T=0,w=0;Object.keys(_.flags).forEach(function(p){if(!Object.prototype.hasOwnProperty.call(b,p))throw new Error("unsupported flag name specified: ".concat(p));var A=_.flags[p],L=b[p].value;A===!0?w|=L:A===!1&&(T|=L)}),d.trustor=u.Keypair.fromPublicKey(_.trustor).xdrAccountId(),d.asset=_.asset.toXDRObject(),d.clearFlags=T,d.setFlags=w;var g={body:f.default.OperationBody.setTrustLineFlags(new f.default.SetTrustLineFlagsOp(d))};return this.setSourceAccount(g,_),new f.default.Operation(g)};var s,f=(s=i(1918))&&s.__esModule?s:{default:s},u=i(6691);function r(_){return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},r(_)}},7177:(o,a,i)=>{"use strict";var s=i(8287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.nativeToScVal=function g(p){var A,L,E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};switch(w(p)){case"object":if(p===null)return u.default.ScVal.scvVoid();if(p instanceof u.default.ScVal)return p;if(p instanceof r.Address)return p.toScVal();if(p instanceof _.Contract)return p.address().toScVal();if(p instanceof Uint8Array||s.isBuffer(p)){var N,F=Uint8Array.from(p);switch((N=E?.type)!==null&&N!==void 0?N:"bytes"){case"bytes":return u.default.ScVal.scvBytes(F);case"symbol":return u.default.ScVal.scvSymbol(F);case"string":return u.default.ScVal.scvString(F);default:throw new TypeError("invalid type (".concat(E.type,") specified for bytes-like value"))}}if(Array.isArray(p)){if(p.length>0&&p.some(function(Y){return w(Y)!==w(p[0])}))throw new TypeError("array values (".concat(p,") must have the same type (types: ").concat(p.map(function(Y){return w(Y)}).join(","),")"));return u.default.ScVal.scvVec(p.map(function(Y){return g(Y,E)}))}var R;if(((A=(L=p.constructor)===null||L===void 0?void 0:L.name)!==null&&A!==void 0?A:"")!=="Object")throw new TypeError("cannot interpret ".concat((R=p.constructor)===null||R===void 0?void 0:R.name," value as ScVal (").concat(JSON.stringify(p),")"));return u.default.ScVal.scvMap(Object.entries(p).map(function(Y){var me,le,C=b(Y,2),q=C[0],X=C[1],ae=b((me=((le=E?.type)!==null&&le!==void 0?le:{})[q])!==null&&me!==void 0?me:[null,null],2),I=ae[0],S=ae[1],m=I?{type:I}:{},P=S?{type:S}:{};return new u.default.ScMapEntry({key:g(q,m),val:g(X,P)})}));case"number":case"bigint":switch(E?.type){case"u32":return u.default.ScVal.scvU32(p);case"i32":return u.default.ScVal.scvI32(p)}return new d.ScInt(p,{type:E?.type}).toScVal();case"string":var j,V=(j=E?.type)!==null&&j!==void 0?j:"string";switch(V){case"string":return u.default.ScVal.scvString(p);case"symbol":return u.default.ScVal.scvSymbol(p);case"address":return new r.Address(p).toScVal();default:if(d.XdrLargeInt.isType(V))return new d.XdrLargeInt(V,p).toScVal();throw new TypeError("invalid type (".concat(E.type,") specified for string value"))}case"boolean":return u.default.ScVal.scvBool(p);case"undefined":return u.default.ScVal.scvVoid();case"function":return g(p());default:throw new TypeError("failed to convert typeof ".concat(w(p)," (").concat(p,")"))}},a.scValToNative=function g(p){var A,L;switch(p.switch().value){case u.default.ScValType.scvVoid().value:return null;case u.default.ScValType.scvU64().value:case u.default.ScValType.scvI64().value:return p.value().toBigInt();case u.default.ScValType.scvU128().value:case u.default.ScValType.scvI128().value:case u.default.ScValType.scvU256().value:case u.default.ScValType.scvI256().value:return(0,d.scValToBigInt)(p);case u.default.ScValType.scvVec().value:return((A=p.vec())!==null&&A!==void 0?A:[]).map(g);case u.default.ScValType.scvAddress().value:return r.Address.fromScVal(p).toString();case u.default.ScValType.scvMap().value:return Object.fromEntries(((L=p.map())!==null&&L!==void 0?L:[]).map(function(N){return[g(N.key()),g(N.val())]}));case u.default.ScValType.scvBool().value:case u.default.ScValType.scvU32().value:case u.default.ScValType.scvI32().value:case u.default.ScValType.scvBytes().value:return p.value();case u.default.ScValType.scvSymbol().value:case u.default.ScValType.scvString().value:var E=p.value();if(s.isBuffer(E)||ArrayBuffer.isView(E))try{return new TextDecoder().decode(E)}catch{return new Uint8Array(E.buffer)}return E;case u.default.ScValType.scvTimepoint().value:case u.default.ScValType.scvDuration().value:return new u.default.Uint64(p.value()).toBigInt();case u.default.ScValType.scvStatus().value:switch(p.value().switch()){case u.default.ScStatusType.sstOk().value:case u.default.ScStatusType.sstUnknownError().value:case u.default.ScStatusType.sstHostValueError().value:case u.default.ScStatusType.sstHostObjectError().value:case u.default.ScStatusType.sstHostFunctionError().value:case u.default.ScStatusType.sstHostStorageError().value:case u.default.ScStatusType.sstHostContextError().value:case u.default.ScStatusType.sstVmError().value:case u.default.ScStatusType.sstContractError().value:case u.default.ScStatusType.sstHostAuthError().value:}default:return p.value()}};var f,u=(f=i(1918))&&f.__esModule?f:{default:f},r=i(1180),_=i(7452),d=i(8549);function b(g,p){return function(A){if(Array.isArray(A))return A}(g)||function(A,L){var E=A==null?null:typeof Symbol<"u"&&A[Symbol.iterator]||A["@@iterator"];if(E!=null){var N,F,R,j,V=[],Y=!0,me=!1;try{if(R=(E=E.call(A)).next,L===0){if(Object(E)!==E)return;Y=!1}else for(;!(Y=(N=R.call(E)).done)&&(V.push(N.value),V.length!==L);Y=!0);}catch(le){me=!0,F=le}finally{try{if(!Y&&E.return!=null&&(j=E.return(),Object(j)!==j))return}finally{if(me)throw F}}return V}}(g,p)||function(A,L){if(A){if(typeof A=="string")return T(A,L);var E=Object.prototype.toString.call(A).slice(8,-1);if(E==="Object"&&A.constructor&&(E=A.constructor.name),E==="Map"||E==="Set")return Array.from(A);if(E==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(E))return T(A,L)}}(g,p)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
21
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function T(g,p){(p==null||p>g.length)&&(p=g.length);for(var A=0,L=new Array(p);A<p;A++)L[A]=g[A];return L}function w(g){return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},w(g)}},225:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.SignerKey=void 0;var s,f=(s=i(1918))&&s.__esModule?s:{default:s},u=i(7120);function r(b){return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},r(b)}function _(b,T){for(var w=0;w<T.length;w++){var g=T[w];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(b,d(g.key),g)}}function d(b){var T=function(w,g){if(r(w)!="object"||!w)return w;var p=w[Symbol.toPrimitive];if(p!==void 0){var A=p.call(w,g||"default");if(r(A)!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(w)}(b,"string");return r(T)=="symbol"?T:T+""}a.SignerKey=function(){return b=function g(){(function(p,A){if(!(p instanceof A))throw new TypeError("Cannot call a class as a function")})(this,g)},w=[{key:"decodeAddress",value:function(g){var p={ed25519PublicKey:f.default.SignerKey.signerKeyTypeEd25519,preAuthTx:f.default.SignerKey.signerKeyTypePreAuthTx,sha256Hash:f.default.SignerKey.signerKeyTypeHashX,signedPayload:f.default.SignerKey.signerKeyTypeEd25519SignedPayload},A=u.StrKey.getVersionByteForPrefix(g),L=p[A];if(!L)throw new Error("invalid signer key type (".concat(A,")"));var E=(0,u.decodeCheck)(A,g);return L(A==="signedPayload"?new f.default.SignerKeyEd25519SignedPayload({ed25519:E.slice(0,32),payload:E.slice(36)}):E)}},{key:"encodeSignerKey",value:function(g){var p,A;switch(g.switch()){case f.default.SignerKeyType.signerKeyTypeEd25519():p="ed25519PublicKey",A=g.value();break;case f.default.SignerKeyType.signerKeyTypePreAuthTx():p="preAuthTx",A=g.value();break;case f.default.SignerKeyType.signerKeyTypeHashX():p="sha256Hash",A=g.value();break;case f.default.SignerKeyType.signerKeyTypeEd25519SignedPayload():p="signedPayload",A=g.ed25519SignedPayload().toXDR("raw");break;default:throw new Error("invalid SignerKey (type: ".concat(g.switch(),")"))}return(0,u.encodeCheck)(p,A)}}],(T=null)&&_(b.prototype,T),w&&_(b,w),Object.defineProperty(b,"prototype",{writable:!1}),b;var b,T,w}()},15:(o,a,i)=>{"use strict";var s=i(8287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.FastSigning=void 0,a.generate=function(r){return f.generate(r)},a.sign=function(r,_){return f.sign(r,_)},a.verify=function(r,_,d){return f.verify(r,_,d)};var f={};a.FastSigning=typeof window>"u"?function(){var r;try{r=i(Object(function(){var _=new Error("Cannot find module 'sodium-native'");throw _.code="MODULE_NOT_FOUND",_}()))}catch{return u()}return Object.keys(r).length?(f.generate=function(_){var d=s.alloc(r.crypto_sign_PUBLICKEYBYTES),b=s.alloc(r.crypto_sign_SECRETKEYBYTES);return r.crypto_sign_seed_keypair(d,b,_),d},f.sign=function(_,d){_=s.from(_);var b=s.alloc(r.crypto_sign_BYTES);return r.crypto_sign_detached(b,_,d),b},f.verify=function(_,d,b){_=s.from(_);try{return r.crypto_sign_verify_detached(d,_,b)}catch{return!1}},!0):u()}():u();function u(){var r=i(4940);return f.generate=function(_){var d=new Uint8Array(_),b=r.sign.keyPair.fromSeed(d);return s.from(b.publicKey)},f.sign=function(_,d){_=s.from(_),_=new Uint8Array(_.toJSON().data),d=new Uint8Array(d.toJSON().data);var b=r.sign.detached(_,d);return s.from(b)},f.verify=function(_,d,b){return _=s.from(_),_=new Uint8Array(_.toJSON().data),d=new Uint8Array(d.toJSON().data),b=new Uint8Array(b.toJSON().data),r.sign.detached.verify(_,d,b)},!1}},4062:(o,a)=>{"use strict";function i(_){return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},i(_)}function s(_){return function(d){if(Array.isArray(d))return d}(_)||function(d){if(typeof Symbol<"u"&&d[Symbol.iterator]!=null||d["@@iterator"]!=null)return Array.from(d)}(_)||function(d,b){if(d){if(typeof d=="string")return f(d,b);var T=Object.prototype.toString.call(d).slice(8,-1);if(T==="Object"&&d.constructor&&(T=d.constructor.name),T==="Map"||T==="Set")return Array.from(d);if(T==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T))return f(d,b)}}(_)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
22
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function f(_,d){(d==null||d>_.length)&&(d=_.length);for(var b=0,T=new Array(d);b<d;b++)T[b]=_[b];return T}function u(_,d){for(var b=0;b<d.length;b++){var T=d[b];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(_,r(T.key),T)}}function r(_){var d=function(b,T){if(i(b)!="object"||!b)return b;var w=b[Symbol.toPrimitive];if(w!==void 0){var g=w.call(b,T||"default");if(i(g)!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return(T==="string"?String:Number)(b)}(_,"string");return i(d)=="symbol"?d:d+""}Object.defineProperty(a,"__esModule",{value:!0}),a.Soroban=void 0,a.Soroban=function(){return _=function T(){(function(w,g){if(!(w instanceof g))throw new TypeError("Cannot call a class as a function")})(this,T)},b=[{key:"formatTokenAmount",value:function(T,w){if(T.includes("."))throw new TypeError("No decimals are allowed");var g=T;return w>0&&(g=w>g.length?["0",g.toString().padStart(w,"0")].join("."):[g.slice(0,-w),g.slice(-w)].join(".")),g.replace(/(\.\d*?)0+$/,"$1")}},{key:"parseTokenAmount",value:function(T,w){var g,p=s(T.split(".").slice()),A=p[0],L=p[1];if(p.slice(2).length)throw new Error("Invalid decimal value: ".concat(T));return BigInt(A+((g=L?.padEnd(w,"0"))!==null&&g!==void 0?g:"0".repeat(w))).toString()}}],(d=null)&&u(_.prototype,d),b&&u(_,b),Object.defineProperty(_,"prototype",{writable:!1}),_;var _,d,b}()},4842:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.SorobanDataBuilder=void 0;var s,f=(s=i(1918))&&s.__esModule?s:{default:s};function u(d){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},u(d)}function r(d,b){for(var T=0;T<b.length;T++){var w=b[T];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(d,_(w.key),w)}}function _(d){var b=function(T,w){if(u(T)!="object"||!T)return T;var g=T[Symbol.toPrimitive];if(g!==void 0){var p=g.call(T,w||"default");if(u(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(T)}(d,"string");return u(b)=="symbol"?b:b+""}a.SorobanDataBuilder=function(){return d=function w(g){var p;(function(A,L){if(!(A instanceof L))throw new TypeError("Cannot call a class as a function")})(this,w),function(A,L,E){(L=_(L))in A?Object.defineProperty(A,L,{value:E,enumerable:!0,configurable:!0,writable:!0}):A[L]=E}(this,"_data",void 0),p=g?typeof g=="string"||ArrayBuffer.isView(g)?w.fromXDR(g):w.fromXDR(g.toXDR()):new f.default.SorobanTransactionData({resources:new f.default.SorobanResources({footprint:new f.default.LedgerFootprint({readOnly:[],readWrite:[]}),instructions:0,readBytes:0,writeBytes:0}),ext:new f.default.ExtensionPoint(0),resourceFee:new f.default.Int64(0)}),this._data=p},T=[{key:"fromXDR",value:function(w){return f.default.SorobanTransactionData.fromXDR(w,typeof w=="string"?"base64":"raw")}}],(b=[{key:"setResourceFee",value:function(w){return this._data.resourceFee(new f.default.Int64(w)),this}},{key:"setResources",value:function(w,g,p){return this._data.resources().instructions(w),this._data.resources().readBytes(g),this._data.resources().writeBytes(p),this}},{key:"appendFootprint",value:function(w,g){return this.setFootprint(this.getReadOnly().concat(w),this.getReadWrite().concat(g))}},{key:"setFootprint",value:function(w,g){return w!==null&&this.setReadOnly(w),g!==null&&this.setReadWrite(g),this}},{key:"setReadOnly",value:function(w){return this._data.resources().footprint().readOnly(w??[]),this}},{key:"setReadWrite",value:function(w){return this._data.resources().footprint().readWrite(w??[]),this}},{key:"build",value:function(){return f.default.SorobanTransactionData.fromXDR(this._data.toXDR())}},{key:"getReadOnly",value:function(){return this.getFootprint().readOnly()}},{key:"getReadWrite",value:function(){return this.getFootprint().readWrite()}},{key:"getFootprint",value:function(){return this._data.resources().footprint()}}])&&r(d.prototype,b),T&&r(d,T),Object.defineProperty(d,"prototype",{writable:!1}),d;var d,b,T}()},7120:(o,a,i)=>{"use strict";var s=i(8287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.StrKey=void 0,a.decodeCheck=p,a.encodeCheck=A;var f,u=(f=i(5360))&&f.__esModule?f:{default:f},r=i(1346);function _(E){return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},_(E)}function d(E,N){for(var F=0;F<N.length;F++){var R=N[F];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(E,b(R.key),R)}}function b(E){var N=function(F,R){if(_(F)!="object"||!F)return F;var j=F[Symbol.toPrimitive];if(j!==void 0){var V=j.call(F,R||"default");if(_(V)!="object")return V;throw new TypeError("@@toPrimitive must return a primitive value.")}return(R==="string"?String:Number)(F)}(E,"string");return _(N)=="symbol"?N:N+""}var T={ed25519PublicKey:48,ed25519SecretSeed:144,med25519PublicKey:96,preAuthTx:152,sha256Hash:184,signedPayload:120,contract:16},w={G:"ed25519PublicKey",S:"ed25519SecretSeed",M:"med25519PublicKey",T:"preAuthTx",X:"sha256Hash",P:"signedPayload",C:"contract"};a.StrKey=function(){return E=function R(){(function(j,V){if(!(j instanceof V))throw new TypeError("Cannot call a class as a function")})(this,R)},F=[{key:"encodeEd25519PublicKey",value:function(R){return A("ed25519PublicKey",R)}},{key:"decodeEd25519PublicKey",value:function(R){return p("ed25519PublicKey",R)}},{key:"isValidEd25519PublicKey",value:function(R){return g("ed25519PublicKey",R)}},{key:"encodeEd25519SecretSeed",value:function(R){return A("ed25519SecretSeed",R)}},{key:"decodeEd25519SecretSeed",value:function(R){return p("ed25519SecretSeed",R)}},{key:"isValidEd25519SecretSeed",value:function(R){return g("ed25519SecretSeed",R)}},{key:"encodeMed25519PublicKey",value:function(R){return A("med25519PublicKey",R)}},{key:"decodeMed25519PublicKey",value:function(R){return p("med25519PublicKey",R)}},{key:"isValidMed25519PublicKey",value:function(R){return g("med25519PublicKey",R)}},{key:"encodePreAuthTx",value:function(R){return A("preAuthTx",R)}},{key:"decodePreAuthTx",value:function(R){return p("preAuthTx",R)}},{key:"encodeSha256Hash",value:function(R){return A("sha256Hash",R)}},{key:"decodeSha256Hash",value:function(R){return p("sha256Hash",R)}},{key:"encodeSignedPayload",value:function(R){return A("signedPayload",R)}},{key:"decodeSignedPayload",value:function(R){return p("signedPayload",R)}},{key:"isValidSignedPayload",value:function(R){return g("signedPayload",R)}},{key:"encodeContract",value:function(R){return A("contract",R)}},{key:"decodeContract",value:function(R){return p("contract",R)}},{key:"isValidContract",value:function(R){return g("contract",R)}},{key:"getVersionByteForPrefix",value:function(R){return w[R[0]]}}],(N=null)&&d(E.prototype,N),F&&d(E,F),Object.defineProperty(E,"prototype",{writable:!1}),E;var E,N,F}();function g(E,N){if(typeof N!="string")return!1;switch(E){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":case"contract":if(N.length!==56)return!1;break;case"med25519PublicKey":if(N.length!==69)return!1;break;case"signedPayload":if(N.length<56||N.length>165)return!1;break;default:return!1}var F="";try{F=p(E,N)}catch{return!1}switch(E){case"ed25519PublicKey":case"ed25519SecretSeed":case"preAuthTx":case"sha256Hash":case"contract":return F.length===32;case"med25519PublicKey":return F.length===40;case"signedPayload":return F.length>=40&&F.length<=100;default:return!1}}function p(E,N){if(typeof N!="string")throw new TypeError("encoded argument must be of type String");var F=u.default.decode(N),R=F[0],j=F.slice(0,-2),V=j.slice(1),Y=F.slice(-2);if(N!==u.default.encode(F))throw new Error("invalid encoded string");var me=T[E];if(me===void 0)throw new Error("".concat(E," is not a valid version byte name. ")+"Expected one of ".concat(Object.keys(T).join(", ")));if(R!==me)throw new Error("invalid version byte. expected ".concat(me,", got ").concat(R));var le=L(j);if(!(0,r.verifyChecksum)(le,Y))throw new Error("invalid checksum");return s.from(V)}function A(E,N){if(N==null)throw new Error("cannot encode null data");var F=T[E];if(F===void 0)throw new Error("".concat(E," is not a valid version byte name. ")+"Expected one of ".concat(Object.keys(T).join(", ")));N=s.from(N);var R=s.from([F]),j=s.concat([R,N]),V=s.from(L(j)),Y=s.concat([j,V]);return u.default.encode(Y)}function L(E){for(var N=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920],F=0,R=0;R<E.length;R+=1)F=F<<8^N[F>>8^E[R]],F&=65535;var j=new Uint8Array(2);return j[0]=255&F,j[1]=F>>8&255,j}},380:(o,a,i)=>{"use strict";var s=i(8287).Buffer;function f(R){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},f(R)}Object.defineProperty(a,"__esModule",{value:!0}),a.Transaction=void 0;var u,r=(u=i(1918))&&u.__esModule?u:{default:u},_=i(9152),d=i(7120),b=i(7237),T=i(4172),w=i(3758),g=i(6160);function p(R,j){for(var V=0;V<j.length;V++){var Y=j[V];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(R,A(Y.key),Y)}}function A(R){var j=function(V,Y){if(f(V)!="object"||!V)return V;var me=V[Symbol.toPrimitive];if(me!==void 0){var le=me.call(V,Y||"default");if(f(le)!="object")return le;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Y==="string"?String:Number)(V)}(R,"string");return f(j)=="symbol"?j:j+""}function L(R,j,V){return j=N(j),function(Y,me){if(me&&(f(me)==="object"||typeof me=="function"))return me;if(me!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(le){if(le===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return le}(Y)}(R,E()?Reflect.construct(j,V||[],N(R).constructor):j.apply(R,V))}function E(){try{var R=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(E=function(){return!!R})()}function N(R){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(j){return j.__proto__||Object.getPrototypeOf(j)},N(R)}function F(R,j){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(V,Y){return V.__proto__=Y,V},F(R,j)}a.Transaction=function(R){function j(le,C){var q;if(function(re,oe){if(!(re instanceof oe))throw new TypeError("Cannot call a class as a function")}(this,j),typeof le=="string"){var X=s.from(le,"base64");le=r.default.TransactionEnvelope.fromXDR(X)}var ae=le.switch();if(ae!==r.default.EnvelopeType.envelopeTypeTxV0()&&ae!==r.default.EnvelopeType.envelopeTypeTx())throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an ".concat(ae.name,"."));var I=le.value(),S=I.tx(),m=S.fee().toString();(q=L(this,j,[S,(I.signatures()||[]).slice(),m,C]))._envelopeType=ae,q._memo=S.memo(),q._sequence=S.seqNum().toString(),q._envelopeType===r.default.EnvelopeType.envelopeTypeTxV0()?q._source=d.StrKey.encodeEd25519PublicKey(q.tx.sourceAccountEd25519()):q._source=(0,g.encodeMuxedAccountToAddress)(q.tx.sourceAccount());var P=null,l=null;switch(q._envelopeType){case r.default.EnvelopeType.envelopeTypeTxV0():l=S.timeBounds();break;case r.default.EnvelopeType.envelopeTypeTx():switch(S.cond().switch()){case r.default.PreconditionType.precondTime():l=S.cond().timeBounds();break;case r.default.PreconditionType.precondV2():l=(P=S.cond().v2()).timeBounds()}}if(l&&(q._timeBounds={minTime:l.minTime().toString(),maxTime:l.maxTime().toString()}),P){var x=P.ledgerBounds();x&&(q._ledgerBounds={minLedger:x.minLedger(),maxLedger:x.maxLedger()});var W=P.minSeqNum();W&&(q._minAccountSequence=W.toString()),q._minAccountSequenceAge=P.minSeqAge(),q._minAccountSequenceLedgerGap=P.minSeqLedgerGap(),q._extraSigners=P.extraSigners()}var K=S.operations()||[];return q._operations=K.map(function(re){return b.Operation.fromXDRObject(re)}),q}return function(le,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");le.prototype=Object.create(C&&C.prototype,{constructor:{value:le,writable:!0,configurable:!0}}),Object.defineProperty(le,"prototype",{writable:!1}),C&&F(le,C)}(j,R),V=j,(Y=[{key:"timeBounds",get:function(){return this._timeBounds},set:function(le){throw new Error("Transaction is immutable")}},{key:"ledgerBounds",get:function(){return this._ledgerBounds},set:function(le){throw new Error("Transaction is immutable")}},{key:"minAccountSequence",get:function(){return this._minAccountSequence},set:function(le){throw new Error("Transaction is immutable")}},{key:"minAccountSequenceAge",get:function(){return this._minAccountSequenceAge},set:function(le){throw new Error("Transaction is immutable")}},{key:"minAccountSequenceLedgerGap",get:function(){return this._minAccountSequenceLedgerGap},set:function(le){throw new Error("Transaction is immutable")}},{key:"extraSigners",get:function(){return this._extraSigners},set:function(le){throw new Error("Transaction is immutable")}},{key:"sequence",get:function(){return this._sequence},set:function(le){throw new Error("Transaction is immutable")}},{key:"source",get:function(){return this._source},set:function(le){throw new Error("Transaction is immutable")}},{key:"operations",get:function(){return this._operations},set:function(le){throw new Error("Transaction is immutable")}},{key:"memo",get:function(){return T.Memo.fromXDRObject(this._memo)},set:function(le){throw new Error("Transaction is immutable")}},{key:"signatureBase",value:function(){var le=this.tx;this._envelopeType===r.default.EnvelopeType.envelopeTypeTxV0()&&(le=r.default.Transaction.fromXDR(s.concat([r.default.PublicKeyType.publicKeyTypeEd25519().toXDR(),le.toXDR()])));var C=new r.default.TransactionSignaturePayloadTaggedTransaction.envelopeTypeTx(le);return new r.default.TransactionSignaturePayload({networkId:r.default.Hash.fromXDR((0,_.hash)(this.networkPassphrase)),taggedTransaction:C}).toXDR()}},{key:"toEnvelope",value:function(){var le,C=this.tx.toXDR(),q=this.signatures.slice();switch(this._envelopeType){case r.default.EnvelopeType.envelopeTypeTxV0():le=new r.default.TransactionEnvelope.envelopeTypeTxV0(new r.default.TransactionV0Envelope({tx:r.default.TransactionV0.fromXDR(C),signatures:q}));break;case r.default.EnvelopeType.envelopeTypeTx():le=new r.default.TransactionEnvelope.envelopeTypeTx(new r.default.TransactionV1Envelope({tx:r.default.Transaction.fromXDR(C),signatures:q}));break;default:throw new Error("Invalid TransactionEnvelope: expected an envelopeTypeTxV0 or envelopeTypeTx but received an ".concat(this._envelopeType.name,"."))}return le}},{key:"getClaimableBalanceId",value:function(le){if(!Number.isInteger(le)||le<0||le>=this.operations.length)throw new RangeError("invalid operation index");var C=this.operations[le];try{C=b.Operation.createClaimableBalance(C)}catch(I){throw new TypeError("expected createClaimableBalance, got ".concat(C.type,": ").concat(I))}var q=d.StrKey.decodeEd25519PublicKey((0,g.extractBaseAddress)(this.source)),X=r.default.HashIdPreimage.envelopeTypeOpId(new r.default.HashIdPreimageOperationId({sourceAccount:r.default.AccountId.publicKeyTypeEd25519(q),seqNum:r.default.SequenceNumber.fromString(this.sequence),opNum:le})),ae=(0,_.hash)(X.toXDR("raw"));return r.default.ClaimableBalanceId.claimableBalanceIdTypeV0(ae).toXDR("hex")}}])&&p(V.prototype,Y),me&&p(V,me),Object.defineProperty(V,"prototype",{writable:!1}),V;var V,Y,me}(w.TransactionBase)},3758:(o,a,i)=>{"use strict";var s=i(8287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.TransactionBase=void 0;var f,u=(f=i(1918))&&f.__esModule?f:{default:f},r=i(9152),_=i(6691);function d(w){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},d(w)}function b(w,g){for(var p=0;p<g.length;p++){var A=g[p];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,T(A.key),A)}}function T(w){var g=function(p,A){if(d(p)!="object"||!p)return p;var L=p[Symbol.toPrimitive];if(L!==void 0){var E=L.call(p,A||"default");if(d(E)!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(p)}(w,"string");return d(g)=="symbol"?g:g+""}a.TransactionBase=function(){return w=function A(L,E,N,F){if(function(R,j){if(!(R instanceof j))throw new TypeError("Cannot call a class as a function")}(this,A),typeof F!="string")throw new Error("Invalid passphrase provided to Transaction: expected a string but got a ".concat(d(F)));this._networkPassphrase=F,this._tx=L,this._signatures=E,this._fee=N},g=[{key:"signatures",get:function(){return this._signatures},set:function(A){throw new Error("Transaction is immutable")}},{key:"tx",get:function(){return this._tx},set:function(A){throw new Error("Transaction is immutable")}},{key:"fee",get:function(){return this._fee},set:function(A){throw new Error("Transaction is immutable")}},{key:"networkPassphrase",get:function(){return this._networkPassphrase},set:function(A){this._networkPassphrase=A}},{key:"sign",value:function(){for(var A=this,L=this.hash(),E=arguments.length,N=new Array(E),F=0;F<E;F++)N[F]=arguments[F];N.forEach(function(R){var j=R.signDecorated(L);A.signatures.push(j)})}},{key:"getKeypairSignature",value:function(A){return A.sign(this.hash()).toString("base64")}},{key:"addSignature",value:function(){var A,L,E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(!N||typeof N!="string")throw new Error("Invalid signature");if(!E||typeof E!="string")throw new Error("Invalid publicKey");var F=s.from(N,"base64");try{L=(A=_.Keypair.fromPublicKey(E)).signatureHint()}catch{throw new Error("Invalid publicKey")}if(!A.verify(this.hash(),F))throw new Error("Invalid signature");this.signatures.push(new u.default.DecoratedSignature({hint:L,signature:F}))}},{key:"addDecoratedSignature",value:function(A){this.signatures.push(A)}},{key:"signHashX",value:function(A){if(typeof A=="string"&&(A=s.from(A,"hex")),A.length>64)throw new Error("preimage cannnot be longer than 64 bytes");var L=A,E=(0,r.hash)(A),N=E.slice(E.length-4);this.signatures.push(new u.default.DecoratedSignature({hint:N,signature:L}))}},{key:"hash",value:function(){return(0,r.hash)(this.signatureBase())}},{key:"signatureBase",value:function(){throw new Error("Implement in subclass")}},{key:"toEnvelope",value:function(){throw new Error("Implement in subclass")}},{key:"toXDR",value:function(){return this.toEnvelope().toXDR().toString("base64")}}],g&&b(w.prototype,g),p&&b(w,p),Object.defineProperty(w,"prototype",{writable:!1}),w;var w,g,p}()},6396:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.TransactionBuilder=a.TimeoutInfinite=a.BASE_FEE=void 0,a.isValidDate=C;var s=i(3740),f=L(i(1242)),u=L(i(1918)),r=i(2135),_=i(2243),d=i(6160),b=i(380),T=i(9260),w=i(4842),g=i(7120),p=i(225),A=i(4172);function L(q){return q&&q.__esModule?q:{default:q}}function E(q){return E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},E(q)}function N(q){return function(X){if(Array.isArray(X))return F(X)}(q)||function(X){if(typeof Symbol<"u"&&X[Symbol.iterator]!=null||X["@@iterator"]!=null)return Array.from(X)}(q)||function(X,ae){if(X){if(typeof X=="string")return F(X,ae);var I=Object.prototype.toString.call(X).slice(8,-1);if(I==="Object"&&X.constructor&&(I=X.constructor.name),I==="Map"||I==="Set")return Array.from(X);if(I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return F(X,ae)}}(q)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
23
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function F(q,X){(X==null||X>q.length)&&(X=q.length);for(var ae=0,I=new Array(X);ae<X;ae++)I[ae]=q[ae];return I}function R(q,X){var ae=Object.keys(q);if(Object.getOwnPropertySymbols){var I=Object.getOwnPropertySymbols(q);X&&(I=I.filter(function(S){return Object.getOwnPropertyDescriptor(q,S).enumerable})),ae.push.apply(ae,I)}return ae}function j(q){for(var X=1;X<arguments.length;X++){var ae=arguments[X]!=null?arguments[X]:{};X%2?R(Object(ae),!0).forEach(function(I){V(q,I,ae[I])}):Object.getOwnPropertyDescriptors?Object.defineProperties(q,Object.getOwnPropertyDescriptors(ae)):R(Object(ae)).forEach(function(I){Object.defineProperty(q,I,Object.getOwnPropertyDescriptor(ae,I))})}return q}function V(q,X,ae){return(X=me(X))in q?Object.defineProperty(q,X,{value:ae,enumerable:!0,configurable:!0,writable:!0}):q[X]=ae,q}function Y(q,X){for(var ae=0;ae<X.length;ae++){var I=X[ae];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(q,me(I.key),I)}}function me(q){var X=function(ae,I){if(E(ae)!="object"||!ae)return ae;var S=ae[Symbol.toPrimitive];if(S!==void 0){var m=S.call(ae,I||"default");if(E(m)!="object")return m;throw new TypeError("@@toPrimitive must return a primitive value.")}return(I==="string"?String:Number)(ae)}(q,"string");return E(X)=="symbol"?X:X+""}var le=a.BASE_FEE="100";a.TimeoutInfinite=0,a.TransactionBuilder=function(){function q(S){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(function(P,l){if(!(P instanceof l))throw new TypeError("Cannot call a class as a function")}(this,q),!S)throw new Error("must specify source account for the transaction");if(m.fee===void 0)throw new Error("must specify fee for the transaction (in stroops)");this.source=S,this.operations=[],this.baseFee=m.fee,this.timebounds=m.timebounds?j({},m.timebounds):null,this.ledgerbounds=m.ledgerbounds?j({},m.ledgerbounds):null,this.minAccountSequence=m.minAccountSequence||null,this.minAccountSequenceAge=m.minAccountSequenceAge||null,this.minAccountSequenceLedgerGap=m.minAccountSequenceLedgerGap||null,this.extraSigners=m.extraSigners?N(m.extraSigners):null,this.memo=m.memo||A.Memo.none(),this.networkPassphrase=m.networkPassphrase||null,this.sorobanData=m.sorobanData?new w.SorobanDataBuilder(m.sorobanData).build():null}return X=q,I=[{key:"cloneFrom",value:function(S){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(S instanceof b.Transaction))throw new TypeError("expected a 'Transaction', got: ".concat(S));var P,l=(BigInt(S.sequence)-1n).toString();if(g.StrKey.isValidMed25519PublicKey(S.source))P=_.MuxedAccount.fromAddress(S.source,l);else{if(!g.StrKey.isValidEd25519PublicKey(S.source))throw new TypeError("unsupported tx source account: ".concat(S.source));P=new r.Account(S.source,l)}var x=new q(P,j({fee:(parseInt(S.fee,10)/S.operations.length||le).toString(),memo:S.memo,networkPassphrase:S.networkPassphrase,timebounds:S.timeBounds,ledgerbounds:S.ledgerBounds,minAccountSequence:S.minAccountSequence,minAccountSequenceAge:S.minAccountSequenceAge,minAccountSequenceLedgerGap:S.minAccountSequenceLedgerGap,extraSigners:S.extraSigners},m));return S._tx.operations().forEach(function(W){return x.addOperation(W)}),x}},{key:"buildFeeBumpTransaction",value:function(S,m,P,l){var x=P.operations.length,W=new f.default(P.fee).div(x),K=new f.default(m);if(K.lt(W))throw new Error("Invalid baseFee, it should be at least ".concat(W," stroops."));var re=new f.default(le);if(K.lt(re))throw new Error("Invalid baseFee, it should be at least ".concat(re," stroops."));var oe,Ee=P.toEnvelope();if(Ee.switch()===u.default.EnvelopeType.envelopeTypeTxV0()){var Fe=Ee.v0().tx(),Oe=new u.default.Transaction({sourceAccount:new u.default.MuxedAccount.keyTypeEd25519(Fe.sourceAccountEd25519()),fee:Fe.fee(),seqNum:Fe.seqNum(),cond:u.default.Preconditions.precondTime(Fe.timeBounds()),memo:Fe.memo(),operations:Fe.operations(),ext:new u.default.TransactionExt(0)});Ee=new u.default.TransactionEnvelope.envelopeTypeTx(new u.default.TransactionV1Envelope({tx:Oe,signatures:Ee.v0().signatures()}))}oe=typeof S=="string"?(0,d.decodeAddressToMuxedAccount)(S):S.xdrMuxedAccount();var $=new u.default.FeeBumpTransaction({feeSource:oe,fee:u.default.Int64.fromString(K.times(x+1).toString()),innerTx:u.default.FeeBumpTransactionInnerTx.envelopeTypeTx(Ee.v1()),ext:new u.default.FeeBumpTransactionExt(0)}),de=new u.default.FeeBumpTransactionEnvelope({tx:$,signatures:[]}),we=new u.default.TransactionEnvelope.envelopeTypeTxFeeBump(de);return new T.FeeBumpTransaction(we,l)}},{key:"fromXDR",value:function(S,m){return typeof S=="string"&&(S=u.default.TransactionEnvelope.fromXDR(S,"base64")),S.switch()===u.default.EnvelopeType.envelopeTypeTxFeeBump()?new T.FeeBumpTransaction(S,m):new b.Transaction(S,m)}}],(ae=[{key:"addOperation",value:function(S){return this.operations.push(S),this}},{key:"clearOperations",value:function(){return this.operations=[],this}},{key:"addMemo",value:function(S){return this.memo=S,this}},{key:"setTimeout",value:function(S){if(this.timebounds!==null&&this.timebounds.maxTime>0)throw new Error("TimeBounds.max_time has been already set - setting timeout would overwrite it.");if(S<0)throw new Error("timeout cannot be negative");if(S>0){var m=Math.floor(Date.now()/1e3)+S;this.timebounds===null?this.timebounds={minTime:0,maxTime:m}:this.timebounds={minTime:this.timebounds.minTime,maxTime:m}}else this.timebounds={minTime:0,maxTime:0};return this}},{key:"setTimebounds",value:function(S,m){if(typeof S=="number"&&(S=new Date(1e3*S)),typeof m=="number"&&(m=new Date(1e3*m)),this.timebounds!==null)throw new Error("TimeBounds has been already set - setting timebounds would overwrite it.");var P=Math.floor(S.valueOf()/1e3),l=Math.floor(m.valueOf()/1e3);if(P<0)throw new Error("min_time cannot be negative");if(l<0)throw new Error("max_time cannot be negative");if(l>0&&P>l)throw new Error("min_time cannot be greater than max_time");return this.timebounds={minTime:P,maxTime:l},this}},{key:"setLedgerbounds",value:function(S,m){if(this.ledgerbounds!==null)throw new Error("LedgerBounds has been already set - setting ledgerbounds would overwrite it.");if(S<0)throw new Error("min_ledger cannot be negative");if(m<0)throw new Error("max_ledger cannot be negative");if(m>0&&S>m)throw new Error("min_ledger cannot be greater than max_ledger");return this.ledgerbounds={minLedger:S,maxLedger:m},this}},{key:"setMinAccountSequence",value:function(S){if(this.minAccountSequence!==null)throw new Error("min_account_sequence has been already set - setting min_account_sequence would overwrite it.");return this.minAccountSequence=S,this}},{key:"setMinAccountSequenceAge",value:function(S){if(typeof S!="number")throw new Error("min_account_sequence_age must be a number");if(this.minAccountSequenceAge!==null)throw new Error("min_account_sequence_age has been already set - setting min_account_sequence_age would overwrite it.");if(S<0)throw new Error("min_account_sequence_age cannot be negative");return this.minAccountSequenceAge=S,this}},{key:"setMinAccountSequenceLedgerGap",value:function(S){if(this.minAccountSequenceLedgerGap!==null)throw new Error("min_account_sequence_ledger_gap has been already set - setting min_account_sequence_ledger_gap would overwrite it.");if(S<0)throw new Error("min_account_sequence_ledger_gap cannot be negative");return this.minAccountSequenceLedgerGap=S,this}},{key:"setExtraSigners",value:function(S){if(!Array.isArray(S))throw new Error("extra_signers must be an array of strings.");if(this.extraSigners!==null)throw new Error("extra_signers has been already set - setting extra_signers would overwrite it.");if(S.length>2)throw new Error("extra_signers cannot be longer than 2 elements.");return this.extraSigners=N(S),this}},{key:"setNetworkPassphrase",value:function(S){return this.networkPassphrase=S,this}},{key:"setSorobanData",value:function(S){return this.sorobanData=new w.SorobanDataBuilder(S).build(),this}},{key:"build",value:function(){var S=new f.default(this.source.sequenceNumber()).plus(1),m={fee:new f.default(this.baseFee).times(this.operations.length).toNumber(),seqNum:u.default.SequenceNumber.fromString(S.toString()),memo:this.memo?this.memo.toXDRObject():null};if(this.timebounds===null||this.timebounds.minTime===void 0||this.timebounds.maxTime===void 0)throw new Error("TimeBounds has to be set or you must call setTimeout(TimeoutInfinite).");C(this.timebounds.minTime)&&(this.timebounds.minTime=this.timebounds.minTime.getTime()/1e3),C(this.timebounds.maxTime)&&(this.timebounds.maxTime=this.timebounds.maxTime.getTime()/1e3),this.timebounds.minTime=s.UnsignedHyper.fromString(this.timebounds.minTime.toString()),this.timebounds.maxTime=s.UnsignedHyper.fromString(this.timebounds.maxTime.toString());var P=new u.default.TimeBounds(this.timebounds);if(this.hasV2Preconditions()){var l=null;this.ledgerbounds!==null&&(l=new u.default.LedgerBounds(this.ledgerbounds));var x=this.minAccountSequence||"0";x=u.default.SequenceNumber.fromString(x);var W=s.UnsignedHyper.fromString(this.minAccountSequenceAge!==null?this.minAccountSequenceAge.toString():"0"),K=this.minAccountSequenceLedgerGap||0,re=this.extraSigners!==null?this.extraSigners.map(p.SignerKey.decodeAddress):[];m.cond=u.default.Preconditions.precondV2(new u.default.PreconditionsV2({timeBounds:P,ledgerBounds:l,minSeqNum:x,minSeqAge:W,minSeqLedgerGap:K,extraSigners:re}))}else m.cond=u.default.Preconditions.precondTime(P);m.sourceAccount=(0,d.decodeAddressToMuxedAccount)(this.source.accountId()),this.sorobanData?m.ext=new u.default.TransactionExt(1,this.sorobanData):m.ext=new u.default.TransactionExt(0,u.default.Void);var oe=new u.default.Transaction(m);oe.operations(this.operations);var Ee=new u.default.TransactionEnvelope.envelopeTypeTx(new u.default.TransactionV1Envelope({tx:oe})),Fe=new b.Transaction(Ee,this.networkPassphrase);return this.source.incrementSequenceNumber(),Fe}},{key:"hasV2Preconditions",value:function(){return this.ledgerbounds!==null||this.minAccountSequence!==null||this.minAccountSequenceAge!==null||this.minAccountSequenceLedgerGap!==null||this.extraSigners!==null&&this.extraSigners.length>0}}])&&Y(X.prototype,ae),I&&Y(X,I),Object.defineProperty(X,"prototype",{writable:!1}),X;var X,ae,I}();function C(q){return q instanceof Date&&!isNaN(q)}},1242:(o,a,i)=>{"use strict";var s;Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var f=((s=i(1594))&&s.__esModule?s:{default:s}).default.clone();f.DEBUG=!0,a.default=f},1346:(o,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.verifyChecksum=function(i,s){if(i.length!==s.length)return!1;if(i.length===0)return!0;for(var f=0;f<i.length;f+=1)if(i[f]!==s[f])return!1;return!0}},4151:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.best_r=function(_){for(var d,b,T=new f.default(_),w=[[new f.default(0),new f.default(1)],[new f.default(1),new f.default(0)]],g=2;!T.gt(r);){d=T.integerValue(f.default.ROUND_FLOOR),b=T.minus(d);var p=d.times(w[g-1][0]).plus(w[g-2][0]),A=d.times(w[g-1][1]).plus(w[g-2][1]);if(p.gt(r)||A.gt(r)||(w.push([p,A]),b.eq(0)))break;T=new f.default(1).div(b),g+=1}var L=function(F,R){return function(j){if(Array.isArray(j))return j}(F)||function(j,V){var Y=j==null?null:typeof Symbol<"u"&&j[Symbol.iterator]||j["@@iterator"];if(Y!=null){var me,le,C,q,X=[],ae=!0,I=!1;try{if(C=(Y=Y.call(j)).next,V===0){if(Object(Y)!==Y)return;ae=!1}else for(;!(ae=(me=C.call(Y)).done)&&(X.push(me.value),X.length!==V);ae=!0);}catch(S){I=!0,le=S}finally{try{if(!ae&&Y.return!=null&&(q=Y.return(),Object(q)!==q))return}finally{if(I)throw le}}return X}}(F,R)||function(j,V){if(j){if(typeof j=="string")return u(j,V);var Y=Object.prototype.toString.call(j).slice(8,-1);if(Y==="Object"&&j.constructor&&(Y=j.constructor.name),Y==="Map"||Y==="Set")return Array.from(j);if(Y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Y))return u(j,V)}}(F,R)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
24
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}(w[w.length-1],2),E=L[0],N=L[1];if(E.isZero()||N.isZero())throw new Error("Couldn't find approximation");return[E.toNumber(),N.toNumber()]};var s,f=(s=i(1242))&&s.__esModule?s:{default:s};function u(_,d){(d==null||d>_.length)&&(d=_.length);for(var b=0,T=new Array(d);b<d;b++)T[b]=_[b];return T}var r=2147483647},6160:(o,a,i)=>{"use strict";var s=i(8287).Buffer;Object.defineProperty(a,"__esModule",{value:!0}),a.decodeAddressToMuxedAccount=_,a.encodeMuxedAccount=function(b,T){if(!r.StrKey.isValidEd25519PublicKey(b))throw new Error("address should be a Stellar account ID (G...)");if(typeof T!="string")throw new Error("id should be a string representing a number (uint64)");return u.default.MuxedAccount.keyTypeMuxedEd25519(new u.default.MuxedAccountMed25519({id:u.default.Uint64.fromString(T),ed25519:r.StrKey.decodeEd25519PublicKey(b)}))},a.encodeMuxedAccountToAddress=d,a.extractBaseAddress=function(b){if(r.StrKey.isValidEd25519PublicKey(b))return b;if(!r.StrKey.isValidMed25519PublicKey(b))throw new TypeError("expected muxed account (M...), got ".concat(b));var T=_(b);return r.StrKey.encodeEd25519PublicKey(T.med25519().ed25519())};var f,u=(f=i(1918))&&f.__esModule?f:{default:f},r=i(7120);function _(b){return r.StrKey.isValidMed25519PublicKey(b)?function(T){var w=r.StrKey.decodeMed25519PublicKey(T);return u.default.MuxedAccount.keyTypeMuxedEd25519(new u.default.MuxedAccountMed25519({id:u.default.Uint64.fromXDR(w.subarray(-8)),ed25519:w.subarray(0,-8)}))}(b):u.default.MuxedAccount.keyTypeEd25519(r.StrKey.decodeEd25519PublicKey(b))}function d(b){return b.switch().value===u.default.CryptoKeyType.keyTypeMuxedEd25519().value?function(T){if(T.switch()===u.default.CryptoKeyType.keyTypeEd25519())return d(T);var w=T.med25519();return r.StrKey.encodeMed25519PublicKey(s.concat([w.ed25519(),w.id().toXDR("raw")]))}(b):r.StrKey.encodeEd25519PublicKey(b.ed25519())}},645:(o,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.trimEnd=void 0,a.trimEnd=function(i,s){for(var f=typeof i=="number",u=String(i);u.endsWith(s);)u=u.slice(0,-1);return f?Number(u):u}},1918:(o,a,i)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var s,f=(s=i(7938))&&s.__esModule?s:{default:s};a.default=f.default},4940:(o,a,i)=>{(function(s){"use strict";var f=function(je){var De,Xe=new Float64Array(16);if(je)for(De=0;De<je.length;De++)Xe[De]=je[De];return Xe},u=function(){throw new Error("no PRNG")},r=new Uint8Array(16),_=new Uint8Array(32);_[0]=9;var d=f(),b=f([1]),T=f([56129,1]),w=f([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),g=f([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),p=f([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),A=f([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),L=f([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function E(je,De,Xe,ie){je[De]=Xe>>24&255,je[De+1]=Xe>>16&255,je[De+2]=Xe>>8&255,je[De+3]=255&Xe,je[De+4]=ie>>24&255,je[De+5]=ie>>16&255,je[De+6]=ie>>8&255,je[De+7]=255&ie}function N(je,De,Xe,ie,Pe){var ct,dt=0;for(ct=0;ct<Pe;ct++)dt|=je[De+ct]^Xe[ie+ct];return(1&dt-1>>>8)-1}function F(je,De,Xe,ie){return N(je,De,Xe,ie,16)}function R(je,De,Xe,ie){return N(je,De,Xe,ie,32)}function j(je,De,Xe,ie){(function(Pe,ct,dt,xt){for(var st,$t=255&xt[0]|(255&xt[1])<<8|(255&xt[2])<<16|(255&xt[3])<<24,_t=255&dt[0]|(255&dt[1])<<8|(255&dt[2])<<16|(255&dt[3])<<24,Ct=255&dt[4]|(255&dt[5])<<8|(255&dt[6])<<16|(255&dt[7])<<24,it=255&dt[8]|(255&dt[9])<<8|(255&dt[10])<<16|(255&dt[11])<<24,Q=255&dt[12]|(255&dt[13])<<8|(255&dt[14])<<16|(255&dt[15])<<24,ce=255&xt[4]|(255&xt[5])<<8|(255&xt[6])<<16|(255&xt[7])<<24,be=255&ct[0]|(255&ct[1])<<8|(255&ct[2])<<16|(255&ct[3])<<24,D=255&ct[4]|(255&ct[5])<<8|(255&ct[6])<<16|(255&ct[7])<<24,xe=255&ct[8]|(255&ct[9])<<8|(255&ct[10])<<16|(255&ct[11])<<24,ot=255&ct[12]|(255&ct[13])<<8|(255&ct[14])<<16|(255&ct[15])<<24,at=255&xt[8]|(255&xt[9])<<8|(255&xt[10])<<16|(255&xt[11])<<24,yt=255&dt[16]|(255&dt[17])<<8|(255&dt[18])<<16|(255&dt[19])<<24,Tt=255&dt[20]|(255&dt[21])<<8|(255&dt[22])<<16|(255&dt[23])<<24,Kt=255&dt[24]|(255&dt[25])<<8|(255&dt[26])<<16|(255&dt[27])<<24,Et=255&dt[28]|(255&dt[29])<<8|(255&dt[30])<<16|(255&dt[31])<<24,Rt=255&xt[12]|(255&xt[13])<<8|(255&xt[14])<<16|(255&xt[15])<<24,St=$t,Ht=_t,Lt=Ct,qt=it,It=Q,rr=ce,ye=be,Me=D,H=xe,G=ot,ne=at,se=yt,he=Tt,Le=Kt,Ie=Et,Te=Rt,Ce=0;Ce<20;Ce+=2)St^=(st=(he^=(st=(H^=(st=(It^=(st=St+he|0)<<7|st>>>25)+St|0)<<9|st>>>23)+It|0)<<13|st>>>19)+H|0)<<18|st>>>14,rr^=(st=(Ht^=(st=(Le^=(st=(G^=(st=rr+Ht|0)<<7|st>>>25)+rr|0)<<9|st>>>23)+G|0)<<13|st>>>19)+Le|0)<<18|st>>>14,ne^=(st=(ye^=(st=(Lt^=(st=(Ie^=(st=ne+ye|0)<<7|st>>>25)+ne|0)<<9|st>>>23)+Ie|0)<<13|st>>>19)+Lt|0)<<18|st>>>14,Te^=(st=(se^=(st=(Me^=(st=(qt^=(st=Te+se|0)<<7|st>>>25)+Te|0)<<9|st>>>23)+qt|0)<<13|st>>>19)+Me|0)<<18|st>>>14,St^=(st=(qt^=(st=(Lt^=(st=(Ht^=(st=St+qt|0)<<7|st>>>25)+St|0)<<9|st>>>23)+Ht|0)<<13|st>>>19)+Lt|0)<<18|st>>>14,rr^=(st=(It^=(st=(Me^=(st=(ye^=(st=rr+It|0)<<7|st>>>25)+rr|0)<<9|st>>>23)+ye|0)<<13|st>>>19)+Me|0)<<18|st>>>14,ne^=(st=(G^=(st=(H^=(st=(se^=(st=ne+G|0)<<7|st>>>25)+ne|0)<<9|st>>>23)+se|0)<<13|st>>>19)+H|0)<<18|st>>>14,Te^=(st=(Ie^=(st=(Le^=(st=(he^=(st=Te+Ie|0)<<7|st>>>25)+Te|0)<<9|st>>>23)+he|0)<<13|st>>>19)+Le|0)<<18|st>>>14;St=St+$t|0,Ht=Ht+_t|0,Lt=Lt+Ct|0,qt=qt+it|0,It=It+Q|0,rr=rr+ce|0,ye=ye+be|0,Me=Me+D|0,H=H+xe|0,G=G+ot|0,ne=ne+at|0,se=se+yt|0,he=he+Tt|0,Le=Le+Kt|0,Ie=Ie+Et|0,Te=Te+Rt|0,Pe[0]=St>>>0&255,Pe[1]=St>>>8&255,Pe[2]=St>>>16&255,Pe[3]=St>>>24&255,Pe[4]=Ht>>>0&255,Pe[5]=Ht>>>8&255,Pe[6]=Ht>>>16&255,Pe[7]=Ht>>>24&255,Pe[8]=Lt>>>0&255,Pe[9]=Lt>>>8&255,Pe[10]=Lt>>>16&255,Pe[11]=Lt>>>24&255,Pe[12]=qt>>>0&255,Pe[13]=qt>>>8&255,Pe[14]=qt>>>16&255,Pe[15]=qt>>>24&255,Pe[16]=It>>>0&255,Pe[17]=It>>>8&255,Pe[18]=It>>>16&255,Pe[19]=It>>>24&255,Pe[20]=rr>>>0&255,Pe[21]=rr>>>8&255,Pe[22]=rr>>>16&255,Pe[23]=rr>>>24&255,Pe[24]=ye>>>0&255,Pe[25]=ye>>>8&255,Pe[26]=ye>>>16&255,Pe[27]=ye>>>24&255,Pe[28]=Me>>>0&255,Pe[29]=Me>>>8&255,Pe[30]=Me>>>16&255,Pe[31]=Me>>>24&255,Pe[32]=H>>>0&255,Pe[33]=H>>>8&255,Pe[34]=H>>>16&255,Pe[35]=H>>>24&255,Pe[36]=G>>>0&255,Pe[37]=G>>>8&255,Pe[38]=G>>>16&255,Pe[39]=G>>>24&255,Pe[40]=ne>>>0&255,Pe[41]=ne>>>8&255,Pe[42]=ne>>>16&255,Pe[43]=ne>>>24&255,Pe[44]=se>>>0&255,Pe[45]=se>>>8&255,Pe[46]=se>>>16&255,Pe[47]=se>>>24&255,Pe[48]=he>>>0&255,Pe[49]=he>>>8&255,Pe[50]=he>>>16&255,Pe[51]=he>>>24&255,Pe[52]=Le>>>0&255,Pe[53]=Le>>>8&255,Pe[54]=Le>>>16&255,Pe[55]=Le>>>24&255,Pe[56]=Ie>>>0&255,Pe[57]=Ie>>>8&255,Pe[58]=Ie>>>16&255,Pe[59]=Ie>>>24&255,Pe[60]=Te>>>0&255,Pe[61]=Te>>>8&255,Pe[62]=Te>>>16&255,Pe[63]=Te>>>24&255})(je,De,Xe,ie)}function V(je,De,Xe,ie){(function(Pe,ct,dt,xt){for(var st,$t=255&xt[0]|(255&xt[1])<<8|(255&xt[2])<<16|(255&xt[3])<<24,_t=255&dt[0]|(255&dt[1])<<8|(255&dt[2])<<16|(255&dt[3])<<24,Ct=255&dt[4]|(255&dt[5])<<8|(255&dt[6])<<16|(255&dt[7])<<24,it=255&dt[8]|(255&dt[9])<<8|(255&dt[10])<<16|(255&dt[11])<<24,Q=255&dt[12]|(255&dt[13])<<8|(255&dt[14])<<16|(255&dt[15])<<24,ce=255&xt[4]|(255&xt[5])<<8|(255&xt[6])<<16|(255&xt[7])<<24,be=255&ct[0]|(255&ct[1])<<8|(255&ct[2])<<16|(255&ct[3])<<24,D=255&ct[4]|(255&ct[5])<<8|(255&ct[6])<<16|(255&ct[7])<<24,xe=255&ct[8]|(255&ct[9])<<8|(255&ct[10])<<16|(255&ct[11])<<24,ot=255&ct[12]|(255&ct[13])<<8|(255&ct[14])<<16|(255&ct[15])<<24,at=255&xt[8]|(255&xt[9])<<8|(255&xt[10])<<16|(255&xt[11])<<24,yt=255&dt[16]|(255&dt[17])<<8|(255&dt[18])<<16|(255&dt[19])<<24,Tt=255&dt[20]|(255&dt[21])<<8|(255&dt[22])<<16|(255&dt[23])<<24,Kt=255&dt[24]|(255&dt[25])<<8|(255&dt[26])<<16|(255&dt[27])<<24,Et=255&dt[28]|(255&dt[29])<<8|(255&dt[30])<<16|(255&dt[31])<<24,Rt=255&xt[12]|(255&xt[13])<<8|(255&xt[14])<<16|(255&xt[15])<<24,St=0;St<20;St+=2)$t^=(st=(Tt^=(st=(xe^=(st=(Q^=(st=$t+Tt|0)<<7|st>>>25)+$t|0)<<9|st>>>23)+Q|0)<<13|st>>>19)+xe|0)<<18|st>>>14,ce^=(st=(_t^=(st=(Kt^=(st=(ot^=(st=ce+_t|0)<<7|st>>>25)+ce|0)<<9|st>>>23)+ot|0)<<13|st>>>19)+Kt|0)<<18|st>>>14,at^=(st=(be^=(st=(Ct^=(st=(Et^=(st=at+be|0)<<7|st>>>25)+at|0)<<9|st>>>23)+Et|0)<<13|st>>>19)+Ct|0)<<18|st>>>14,Rt^=(st=(yt^=(st=(D^=(st=(it^=(st=Rt+yt|0)<<7|st>>>25)+Rt|0)<<9|st>>>23)+it|0)<<13|st>>>19)+D|0)<<18|st>>>14,$t^=(st=(it^=(st=(Ct^=(st=(_t^=(st=$t+it|0)<<7|st>>>25)+$t|0)<<9|st>>>23)+_t|0)<<13|st>>>19)+Ct|0)<<18|st>>>14,ce^=(st=(Q^=(st=(D^=(st=(be^=(st=ce+Q|0)<<7|st>>>25)+ce|0)<<9|st>>>23)+be|0)<<13|st>>>19)+D|0)<<18|st>>>14,at^=(st=(ot^=(st=(xe^=(st=(yt^=(st=at+ot|0)<<7|st>>>25)+at|0)<<9|st>>>23)+yt|0)<<13|st>>>19)+xe|0)<<18|st>>>14,Rt^=(st=(Et^=(st=(Kt^=(st=(Tt^=(st=Rt+Et|0)<<7|st>>>25)+Rt|0)<<9|st>>>23)+Tt|0)<<13|st>>>19)+Kt|0)<<18|st>>>14;Pe[0]=$t>>>0&255,Pe[1]=$t>>>8&255,Pe[2]=$t>>>16&255,Pe[3]=$t>>>24&255,Pe[4]=ce>>>0&255,Pe[5]=ce>>>8&255,Pe[6]=ce>>>16&255,Pe[7]=ce>>>24&255,Pe[8]=at>>>0&255,Pe[9]=at>>>8&255,Pe[10]=at>>>16&255,Pe[11]=at>>>24&255,Pe[12]=Rt>>>0&255,Pe[13]=Rt>>>8&255,Pe[14]=Rt>>>16&255,Pe[15]=Rt>>>24&255,Pe[16]=be>>>0&255,Pe[17]=be>>>8&255,Pe[18]=be>>>16&255,Pe[19]=be>>>24&255,Pe[20]=D>>>0&255,Pe[21]=D>>>8&255,Pe[22]=D>>>16&255,Pe[23]=D>>>24&255,Pe[24]=xe>>>0&255,Pe[25]=xe>>>8&255,Pe[26]=xe>>>16&255,Pe[27]=xe>>>24&255,Pe[28]=ot>>>0&255,Pe[29]=ot>>>8&255,Pe[30]=ot>>>16&255,Pe[31]=ot>>>24&255})(je,De,Xe,ie)}var Y=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function me(je,De,Xe,ie,Pe,ct,dt){var xt,st,$t=new Uint8Array(16),_t=new Uint8Array(64);for(st=0;st<16;st++)$t[st]=0;for(st=0;st<8;st++)$t[st]=ct[st];for(;Pe>=64;){for(j(_t,$t,dt,Y),st=0;st<64;st++)je[De+st]=Xe[ie+st]^_t[st];for(xt=1,st=8;st<16;st++)xt=xt+(255&$t[st])|0,$t[st]=255&xt,xt>>>=8;Pe-=64,De+=64,ie+=64}if(Pe>0)for(j(_t,$t,dt,Y),st=0;st<Pe;st++)je[De+st]=Xe[ie+st]^_t[st];return 0}function le(je,De,Xe,ie,Pe){var ct,dt,xt=new Uint8Array(16),st=new Uint8Array(64);for(dt=0;dt<16;dt++)xt[dt]=0;for(dt=0;dt<8;dt++)xt[dt]=ie[dt];for(;Xe>=64;){for(j(st,xt,Pe,Y),dt=0;dt<64;dt++)je[De+dt]=st[dt];for(ct=1,dt=8;dt<16;dt++)ct=ct+(255&xt[dt])|0,xt[dt]=255&ct,ct>>>=8;Xe-=64,De+=64}if(Xe>0)for(j(st,xt,Pe,Y),dt=0;dt<Xe;dt++)je[De+dt]=st[dt];return 0}function C(je,De,Xe,ie,Pe){var ct=new Uint8Array(32);V(ct,ie,Pe,Y);for(var dt=new Uint8Array(8),xt=0;xt<8;xt++)dt[xt]=ie[xt+16];return le(je,De,Xe,dt,ct)}function q(je,De,Xe,ie,Pe,ct,dt){var xt=new Uint8Array(32);V(xt,ct,dt,Y);for(var st=new Uint8Array(8),$t=0;$t<8;$t++)st[$t]=ct[$t+16];return me(je,De,Xe,ie,Pe,st,xt)}var X=function(je){var De,Xe,ie,Pe,ct,dt,xt,st;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,De=255&je[0]|(255&je[1])<<8,this.r[0]=8191&De,Xe=255&je[2]|(255&je[3])<<8,this.r[1]=8191&(De>>>13|Xe<<3),ie=255&je[4]|(255&je[5])<<8,this.r[2]=7939&(Xe>>>10|ie<<6),Pe=255&je[6]|(255&je[7])<<8,this.r[3]=8191&(ie>>>7|Pe<<9),ct=255&je[8]|(255&je[9])<<8,this.r[4]=255&(Pe>>>4|ct<<12),this.r[5]=ct>>>1&8190,dt=255&je[10]|(255&je[11])<<8,this.r[6]=8191&(ct>>>14|dt<<2),xt=255&je[12]|(255&je[13])<<8,this.r[7]=8065&(dt>>>11|xt<<5),st=255&je[14]|(255&je[15])<<8,this.r[8]=8191&(xt>>>8|st<<8),this.r[9]=st>>>5&127,this.pad[0]=255&je[16]|(255&je[17])<<8,this.pad[1]=255&je[18]|(255&je[19])<<8,this.pad[2]=255&je[20]|(255&je[21])<<8,this.pad[3]=255&je[22]|(255&je[23])<<8,this.pad[4]=255&je[24]|(255&je[25])<<8,this.pad[5]=255&je[26]|(255&je[27])<<8,this.pad[6]=255&je[28]|(255&je[29])<<8,this.pad[7]=255&je[30]|(255&je[31])<<8};function ae(je,De,Xe,ie,Pe,ct){var dt=new X(ct);return dt.update(Xe,ie,Pe),dt.finish(je,De),0}function I(je,De,Xe,ie,Pe,ct){var dt=new Uint8Array(16);return ae(dt,0,Xe,ie,Pe,ct),F(je,De,dt,0)}function S(je,De,Xe,ie,Pe){var ct;if(Xe<32)return-1;for(q(je,0,De,0,Xe,ie,Pe),ae(je,16,je,32,Xe-32,je),ct=0;ct<16;ct++)je[ct]=0;return 0}function m(je,De,Xe,ie,Pe){var ct,dt=new Uint8Array(32);if(Xe<32||(C(dt,0,32,ie,Pe),I(De,16,De,32,Xe-32,dt)!==0))return-1;for(q(je,0,De,0,Xe,ie,Pe),ct=0;ct<32;ct++)je[ct]=0;return 0}function P(je,De){var Xe;for(Xe=0;Xe<16;Xe++)je[Xe]=0|De[Xe]}function l(je){var De,Xe,ie=1;for(De=0;De<16;De++)Xe=je[De]+ie+65535,ie=Math.floor(Xe/65536),je[De]=Xe-65536*ie;je[0]+=ie-1+37*(ie-1)}function x(je,De,Xe){for(var ie,Pe=~(Xe-1),ct=0;ct<16;ct++)ie=Pe&(je[ct]^De[ct]),je[ct]^=ie,De[ct]^=ie}function W(je,De){var Xe,ie,Pe,ct=f(),dt=f();for(Xe=0;Xe<16;Xe++)dt[Xe]=De[Xe];for(l(dt),l(dt),l(dt),ie=0;ie<2;ie++){for(ct[0]=dt[0]-65517,Xe=1;Xe<15;Xe++)ct[Xe]=dt[Xe]-65535-(ct[Xe-1]>>16&1),ct[Xe-1]&=65535;ct[15]=dt[15]-32767-(ct[14]>>16&1),Pe=ct[15]>>16&1,ct[14]&=65535,x(dt,ct,1-Pe)}for(Xe=0;Xe<16;Xe++)je[2*Xe]=255&dt[Xe],je[2*Xe+1]=dt[Xe]>>8}function K(je,De){var Xe=new Uint8Array(32),ie=new Uint8Array(32);return W(Xe,je),W(ie,De),R(Xe,0,ie,0)}function re(je){var De=new Uint8Array(32);return W(De,je),1&De[0]}function oe(je,De){var Xe;for(Xe=0;Xe<16;Xe++)je[Xe]=De[2*Xe]+(De[2*Xe+1]<<8);je[15]&=32767}function Ee(je,De,Xe){for(var ie=0;ie<16;ie++)je[ie]=De[ie]+Xe[ie]}function Fe(je,De,Xe){for(var ie=0;ie<16;ie++)je[ie]=De[ie]-Xe[ie]}function Oe(je,De,Xe){var ie,Pe,ct=0,dt=0,xt=0,st=0,$t=0,_t=0,Ct=0,it=0,Q=0,ce=0,be=0,D=0,xe=0,ot=0,at=0,yt=0,Tt=0,Kt=0,Et=0,Rt=0,St=0,Ht=0,Lt=0,qt=0,It=0,rr=0,ye=0,Me=0,H=0,G=0,ne=0,se=Xe[0],he=Xe[1],Le=Xe[2],Ie=Xe[3],Te=Xe[4],Ce=Xe[5],Ge=Xe[6],Je=Xe[7],ft=Xe[8],gt=Xe[9],Nt=Xe[10],Vt=Xe[11],Gt=Xe[12],Ye=Xe[13],ir=Xe[14],or=Xe[15];ct+=(ie=De[0])*se,dt+=ie*he,xt+=ie*Le,st+=ie*Ie,$t+=ie*Te,_t+=ie*Ce,Ct+=ie*Ge,it+=ie*Je,Q+=ie*ft,ce+=ie*gt,be+=ie*Nt,D+=ie*Vt,xe+=ie*Gt,ot+=ie*Ye,at+=ie*ir,yt+=ie*or,dt+=(ie=De[1])*se,xt+=ie*he,st+=ie*Le,$t+=ie*Ie,_t+=ie*Te,Ct+=ie*Ce,it+=ie*Ge,Q+=ie*Je,ce+=ie*ft,be+=ie*gt,D+=ie*Nt,xe+=ie*Vt,ot+=ie*Gt,at+=ie*Ye,yt+=ie*ir,Tt+=ie*or,xt+=(ie=De[2])*se,st+=ie*he,$t+=ie*Le,_t+=ie*Ie,Ct+=ie*Te,it+=ie*Ce,Q+=ie*Ge,ce+=ie*Je,be+=ie*ft,D+=ie*gt,xe+=ie*Nt,ot+=ie*Vt,at+=ie*Gt,yt+=ie*Ye,Tt+=ie*ir,Kt+=ie*or,st+=(ie=De[3])*se,$t+=ie*he,_t+=ie*Le,Ct+=ie*Ie,it+=ie*Te,Q+=ie*Ce,ce+=ie*Ge,be+=ie*Je,D+=ie*ft,xe+=ie*gt,ot+=ie*Nt,at+=ie*Vt,yt+=ie*Gt,Tt+=ie*Ye,Kt+=ie*ir,Et+=ie*or,$t+=(ie=De[4])*se,_t+=ie*he,Ct+=ie*Le,it+=ie*Ie,Q+=ie*Te,ce+=ie*Ce,be+=ie*Ge,D+=ie*Je,xe+=ie*ft,ot+=ie*gt,at+=ie*Nt,yt+=ie*Vt,Tt+=ie*Gt,Kt+=ie*Ye,Et+=ie*ir,Rt+=ie*or,_t+=(ie=De[5])*se,Ct+=ie*he,it+=ie*Le,Q+=ie*Ie,ce+=ie*Te,be+=ie*Ce,D+=ie*Ge,xe+=ie*Je,ot+=ie*ft,at+=ie*gt,yt+=ie*Nt,Tt+=ie*Vt,Kt+=ie*Gt,Et+=ie*Ye,Rt+=ie*ir,St+=ie*or,Ct+=(ie=De[6])*se,it+=ie*he,Q+=ie*Le,ce+=ie*Ie,be+=ie*Te,D+=ie*Ce,xe+=ie*Ge,ot+=ie*Je,at+=ie*ft,yt+=ie*gt,Tt+=ie*Nt,Kt+=ie*Vt,Et+=ie*Gt,Rt+=ie*Ye,St+=ie*ir,Ht+=ie*or,it+=(ie=De[7])*se,Q+=ie*he,ce+=ie*Le,be+=ie*Ie,D+=ie*Te,xe+=ie*Ce,ot+=ie*Ge,at+=ie*Je,yt+=ie*ft,Tt+=ie*gt,Kt+=ie*Nt,Et+=ie*Vt,Rt+=ie*Gt,St+=ie*Ye,Ht+=ie*ir,Lt+=ie*or,Q+=(ie=De[8])*se,ce+=ie*he,be+=ie*Le,D+=ie*Ie,xe+=ie*Te,ot+=ie*Ce,at+=ie*Ge,yt+=ie*Je,Tt+=ie*ft,Kt+=ie*gt,Et+=ie*Nt,Rt+=ie*Vt,St+=ie*Gt,Ht+=ie*Ye,Lt+=ie*ir,qt+=ie*or,ce+=(ie=De[9])*se,be+=ie*he,D+=ie*Le,xe+=ie*Ie,ot+=ie*Te,at+=ie*Ce,yt+=ie*Ge,Tt+=ie*Je,Kt+=ie*ft,Et+=ie*gt,Rt+=ie*Nt,St+=ie*Vt,Ht+=ie*Gt,Lt+=ie*Ye,qt+=ie*ir,It+=ie*or,be+=(ie=De[10])*se,D+=ie*he,xe+=ie*Le,ot+=ie*Ie,at+=ie*Te,yt+=ie*Ce,Tt+=ie*Ge,Kt+=ie*Je,Et+=ie*ft,Rt+=ie*gt,St+=ie*Nt,Ht+=ie*Vt,Lt+=ie*Gt,qt+=ie*Ye,It+=ie*ir,rr+=ie*or,D+=(ie=De[11])*se,xe+=ie*he,ot+=ie*Le,at+=ie*Ie,yt+=ie*Te,Tt+=ie*Ce,Kt+=ie*Ge,Et+=ie*Je,Rt+=ie*ft,St+=ie*gt,Ht+=ie*Nt,Lt+=ie*Vt,qt+=ie*Gt,It+=ie*Ye,rr+=ie*ir,ye+=ie*or,xe+=(ie=De[12])*se,ot+=ie*he,at+=ie*Le,yt+=ie*Ie,Tt+=ie*Te,Kt+=ie*Ce,Et+=ie*Ge,Rt+=ie*Je,St+=ie*ft,Ht+=ie*gt,Lt+=ie*Nt,qt+=ie*Vt,It+=ie*Gt,rr+=ie*Ye,ye+=ie*ir,Me+=ie*or,ot+=(ie=De[13])*se,at+=ie*he,yt+=ie*Le,Tt+=ie*Ie,Kt+=ie*Te,Et+=ie*Ce,Rt+=ie*Ge,St+=ie*Je,Ht+=ie*ft,Lt+=ie*gt,qt+=ie*Nt,It+=ie*Vt,rr+=ie*Gt,ye+=ie*Ye,Me+=ie*ir,H+=ie*or,at+=(ie=De[14])*se,yt+=ie*he,Tt+=ie*Le,Kt+=ie*Ie,Et+=ie*Te,Rt+=ie*Ce,St+=ie*Ge,Ht+=ie*Je,Lt+=ie*ft,qt+=ie*gt,It+=ie*Nt,rr+=ie*Vt,ye+=ie*Gt,Me+=ie*Ye,H+=ie*ir,G+=ie*or,yt+=(ie=De[15])*se,dt+=38*(Kt+=ie*Le),xt+=38*(Et+=ie*Ie),st+=38*(Rt+=ie*Te),$t+=38*(St+=ie*Ce),_t+=38*(Ht+=ie*Ge),Ct+=38*(Lt+=ie*Je),it+=38*(qt+=ie*ft),Q+=38*(It+=ie*gt),ce+=38*(rr+=ie*Nt),be+=38*(ye+=ie*Vt),D+=38*(Me+=ie*Gt),xe+=38*(H+=ie*Ye),ot+=38*(G+=ie*ir),at+=38*(ne+=ie*or),ct=(ie=(ct+=38*(Tt+=ie*he))+(Pe=1)+65535)-65536*(Pe=Math.floor(ie/65536)),dt=(ie=dt+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),xt=(ie=xt+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),st=(ie=st+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),$t=(ie=$t+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),_t=(ie=_t+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),Ct=(ie=Ct+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),it=(ie=it+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),Q=(ie=Q+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),ce=(ie=ce+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),be=(ie=be+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),D=(ie=D+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),xe=(ie=xe+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),ot=(ie=ot+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),at=(ie=at+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),yt=(ie=yt+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),ct=(ie=(ct+=Pe-1+37*(Pe-1))+(Pe=1)+65535)-65536*(Pe=Math.floor(ie/65536)),dt=(ie=dt+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),xt=(ie=xt+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),st=(ie=st+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),$t=(ie=$t+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),_t=(ie=_t+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),Ct=(ie=Ct+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),it=(ie=it+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),Q=(ie=Q+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),ce=(ie=ce+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),be=(ie=be+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),D=(ie=D+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),xe=(ie=xe+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),ot=(ie=ot+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),at=(ie=at+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),yt=(ie=yt+Pe+65535)-65536*(Pe=Math.floor(ie/65536)),ct+=Pe-1+37*(Pe-1),je[0]=ct,je[1]=dt,je[2]=xt,je[3]=st,je[4]=$t,je[5]=_t,je[6]=Ct,je[7]=it,je[8]=Q,je[9]=ce,je[10]=be,je[11]=D,je[12]=xe,je[13]=ot,je[14]=at,je[15]=yt}function $(je,De){Oe(je,De,De)}function de(je,De){var Xe,ie=f();for(Xe=0;Xe<16;Xe++)ie[Xe]=De[Xe];for(Xe=253;Xe>=0;Xe--)$(ie,ie),Xe!==2&&Xe!==4&&Oe(ie,ie,De);for(Xe=0;Xe<16;Xe++)je[Xe]=ie[Xe]}function we(je,De){var Xe,ie=f();for(Xe=0;Xe<16;Xe++)ie[Xe]=De[Xe];for(Xe=250;Xe>=0;Xe--)$(ie,ie),Xe!==1&&Oe(ie,ie,De);for(Xe=0;Xe<16;Xe++)je[Xe]=ie[Xe]}function Qe(je,De,Xe){var ie,Pe,ct=new Uint8Array(32),dt=new Float64Array(80),xt=f(),st=f(),$t=f(),_t=f(),Ct=f(),it=f();for(Pe=0;Pe<31;Pe++)ct[Pe]=De[Pe];for(ct[31]=127&De[31]|64,ct[0]&=248,oe(dt,Xe),Pe=0;Pe<16;Pe++)st[Pe]=dt[Pe],_t[Pe]=xt[Pe]=$t[Pe]=0;for(xt[0]=_t[0]=1,Pe=254;Pe>=0;--Pe)x(xt,st,ie=ct[Pe>>>3]>>>(7&Pe)&1),x($t,_t,ie),Ee(Ct,xt,$t),Fe(xt,xt,$t),Ee($t,st,_t),Fe(st,st,_t),$(_t,Ct),$(it,xt),Oe(xt,$t,xt),Oe($t,st,Ct),Ee(Ct,xt,$t),Fe(xt,xt,$t),$(st,xt),Fe($t,_t,it),Oe(xt,$t,T),Ee(xt,xt,_t),Oe($t,$t,xt),Oe(xt,_t,it),Oe(_t,st,dt),$(st,Ct),x(xt,st,ie),x($t,_t,ie);for(Pe=0;Pe<16;Pe++)dt[Pe+16]=xt[Pe],dt[Pe+32]=$t[Pe],dt[Pe+48]=st[Pe],dt[Pe+64]=_t[Pe];var Q=dt.subarray(32),ce=dt.subarray(16);return de(Q,Q),Oe(ce,ce,Q),W(je,ce),0}function ze(je,De){return Qe(je,De,_)}function We(je,De){return u(De,32),ze(je,De)}function et(je,De,Xe){var ie=new Uint8Array(32);return Qe(ie,Xe,De),V(je,r,ie,Y)}X.prototype.blocks=function(je,De,Xe){for(var ie,Pe,ct,dt,xt,st,$t,_t,Ct,it,Q,ce,be,D,xe,ot,at,yt,Tt,Kt=this.fin?0:2048,Et=this.h[0],Rt=this.h[1],St=this.h[2],Ht=this.h[3],Lt=this.h[4],qt=this.h[5],It=this.h[6],rr=this.h[7],ye=this.h[8],Me=this.h[9],H=this.r[0],G=this.r[1],ne=this.r[2],se=this.r[3],he=this.r[4],Le=this.r[5],Ie=this.r[6],Te=this.r[7],Ce=this.r[8],Ge=this.r[9];Xe>=16;)it=Ct=0,it+=(Et+=8191&(ie=255&je[De+0]|(255&je[De+1])<<8))*H,it+=(Rt+=8191&(ie>>>13|(Pe=255&je[De+2]|(255&je[De+3])<<8)<<3))*(5*Ge),it+=(St+=8191&(Pe>>>10|(ct=255&je[De+4]|(255&je[De+5])<<8)<<6))*(5*Ce),it+=(Ht+=8191&(ct>>>7|(dt=255&je[De+6]|(255&je[De+7])<<8)<<9))*(5*Te),Ct=(it+=(Lt+=8191&(dt>>>4|(xt=255&je[De+8]|(255&je[De+9])<<8)<<12))*(5*Ie))>>>13,it&=8191,it+=(qt+=xt>>>1&8191)*(5*Le),it+=(It+=8191&(xt>>>14|(st=255&je[De+10]|(255&je[De+11])<<8)<<2))*(5*he),it+=(rr+=8191&(st>>>11|($t=255&je[De+12]|(255&je[De+13])<<8)<<5))*(5*se),it+=(ye+=8191&($t>>>8|(_t=255&je[De+14]|(255&je[De+15])<<8)<<8))*(5*ne),Q=Ct+=(it+=(Me+=_t>>>5|Kt)*(5*G))>>>13,Q+=Et*G,Q+=Rt*H,Q+=St*(5*Ge),Q+=Ht*(5*Ce),Ct=(Q+=Lt*(5*Te))>>>13,Q&=8191,Q+=qt*(5*Ie),Q+=It*(5*Le),Q+=rr*(5*he),Q+=ye*(5*se),Ct+=(Q+=Me*(5*ne))>>>13,Q&=8191,ce=Ct,ce+=Et*ne,ce+=Rt*G,ce+=St*H,ce+=Ht*(5*Ge),Ct=(ce+=Lt*(5*Ce))>>>13,ce&=8191,ce+=qt*(5*Te),ce+=It*(5*Ie),ce+=rr*(5*Le),ce+=ye*(5*he),be=Ct+=(ce+=Me*(5*se))>>>13,be+=Et*se,be+=Rt*ne,be+=St*G,be+=Ht*H,Ct=(be+=Lt*(5*Ge))>>>13,be&=8191,be+=qt*(5*Ce),be+=It*(5*Te),be+=rr*(5*Ie),be+=ye*(5*Le),D=Ct+=(be+=Me*(5*he))>>>13,D+=Et*he,D+=Rt*se,D+=St*ne,D+=Ht*G,Ct=(D+=Lt*H)>>>13,D&=8191,D+=qt*(5*Ge),D+=It*(5*Ce),D+=rr*(5*Te),D+=ye*(5*Ie),xe=Ct+=(D+=Me*(5*Le))>>>13,xe+=Et*Le,xe+=Rt*he,xe+=St*se,xe+=Ht*ne,Ct=(xe+=Lt*G)>>>13,xe&=8191,xe+=qt*H,xe+=It*(5*Ge),xe+=rr*(5*Ce),xe+=ye*(5*Te),ot=Ct+=(xe+=Me*(5*Ie))>>>13,ot+=Et*Ie,ot+=Rt*Le,ot+=St*he,ot+=Ht*se,Ct=(ot+=Lt*ne)>>>13,ot&=8191,ot+=qt*G,ot+=It*H,ot+=rr*(5*Ge),ot+=ye*(5*Ce),at=Ct+=(ot+=Me*(5*Te))>>>13,at+=Et*Te,at+=Rt*Ie,at+=St*Le,at+=Ht*he,Ct=(at+=Lt*se)>>>13,at&=8191,at+=qt*ne,at+=It*G,at+=rr*H,at+=ye*(5*Ge),yt=Ct+=(at+=Me*(5*Ce))>>>13,yt+=Et*Ce,yt+=Rt*Te,yt+=St*Ie,yt+=Ht*Le,Ct=(yt+=Lt*he)>>>13,yt&=8191,yt+=qt*se,yt+=It*ne,yt+=rr*G,yt+=ye*H,Tt=Ct+=(yt+=Me*(5*Ge))>>>13,Tt+=Et*Ge,Tt+=Rt*Ce,Tt+=St*Te,Tt+=Ht*Ie,Ct=(Tt+=Lt*Le)>>>13,Tt&=8191,Tt+=qt*he,Tt+=It*se,Tt+=rr*ne,Tt+=ye*G,Et=it=8191&(Ct=(Ct=((Ct+=(Tt+=Me*H)>>>13)<<2)+Ct|0)+(it&=8191)|0),Rt=Q+=Ct>>>=13,St=ce&=8191,Ht=be&=8191,Lt=D&=8191,qt=xe&=8191,It=ot&=8191,rr=at&=8191,ye=yt&=8191,Me=Tt&=8191,De+=16,Xe-=16;this.h[0]=Et,this.h[1]=Rt,this.h[2]=St,this.h[3]=Ht,this.h[4]=Lt,this.h[5]=qt,this.h[6]=It,this.h[7]=rr,this.h[8]=ye,this.h[9]=Me},X.prototype.finish=function(je,De){var Xe,ie,Pe,ct,dt=new Uint16Array(10);if(this.leftover){for(ct=this.leftover,this.buffer[ct++]=1;ct<16;ct++)this.buffer[ct]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(Xe=this.h[1]>>>13,this.h[1]&=8191,ct=2;ct<10;ct++)this.h[ct]+=Xe,Xe=this.h[ct]>>>13,this.h[ct]&=8191;for(this.h[0]+=5*Xe,Xe=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=Xe,Xe=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=Xe,dt[0]=this.h[0]+5,Xe=dt[0]>>>13,dt[0]&=8191,ct=1;ct<10;ct++)dt[ct]=this.h[ct]+Xe,Xe=dt[ct]>>>13,dt[ct]&=8191;for(dt[9]-=8192,ie=(1^Xe)-1,ct=0;ct<10;ct++)dt[ct]&=ie;for(ie=~ie,ct=0;ct<10;ct++)this.h[ct]=this.h[ct]&ie|dt[ct];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),Pe=this.h[0]+this.pad[0],this.h[0]=65535&Pe,ct=1;ct<8;ct++)Pe=(this.h[ct]+this.pad[ct]|0)+(Pe>>>16)|0,this.h[ct]=65535&Pe;je[De+0]=this.h[0]>>>0&255,je[De+1]=this.h[0]>>>8&255,je[De+2]=this.h[1]>>>0&255,je[De+3]=this.h[1]>>>8&255,je[De+4]=this.h[2]>>>0&255,je[De+5]=this.h[2]>>>8&255,je[De+6]=this.h[3]>>>0&255,je[De+7]=this.h[3]>>>8&255,je[De+8]=this.h[4]>>>0&255,je[De+9]=this.h[4]>>>8&255,je[De+10]=this.h[5]>>>0&255,je[De+11]=this.h[5]>>>8&255,je[De+12]=this.h[6]>>>0&255,je[De+13]=this.h[6]>>>8&255,je[De+14]=this.h[7]>>>0&255,je[De+15]=this.h[7]>>>8&255},X.prototype.update=function(je,De,Xe){var ie,Pe;if(this.leftover){for((Pe=16-this.leftover)>Xe&&(Pe=Xe),ie=0;ie<Pe;ie++)this.buffer[this.leftover+ie]=je[De+ie];if(Xe-=Pe,De+=Pe,this.leftover+=Pe,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(Xe>=16&&(Pe=Xe-Xe%16,this.blocks(je,De,Pe),De+=Pe,Xe-=Pe),Xe){for(ie=0;ie<Xe;ie++)this.buffer[this.leftover+ie]=je[De+ie];this.leftover+=Xe}};var Be=S,Re=m,$e=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function ve(je,De,Xe,ie){for(var Pe,ct,dt,xt,st,$t,_t,Ct,it,Q,ce,be,D,xe,ot,at,yt,Tt,Kt,Et,Rt,St,Ht,Lt,qt,It,rr=new Int32Array(16),ye=new Int32Array(16),Me=je[0],H=je[1],G=je[2],ne=je[3],se=je[4],he=je[5],Le=je[6],Ie=je[7],Te=De[0],Ce=De[1],Ge=De[2],Je=De[3],ft=De[4],gt=De[5],Nt=De[6],Vt=De[7],Gt=0;ie>=128;){for(Kt=0;Kt<16;Kt++)Et=8*Kt+Gt,rr[Kt]=Xe[Et+0]<<24|Xe[Et+1]<<16|Xe[Et+2]<<8|Xe[Et+3],ye[Kt]=Xe[Et+4]<<24|Xe[Et+5]<<16|Xe[Et+6]<<8|Xe[Et+7];for(Kt=0;Kt<80;Kt++)if(Pe=Me,ct=H,dt=G,xt=ne,st=se,$t=he,_t=Le,it=Te,Q=Ce,ce=Ge,be=Je,D=ft,xe=gt,ot=Nt,Ht=65535&(St=Vt),Lt=St>>>16,qt=65535&(Rt=Ie),It=Rt>>>16,Ht+=65535&(St=(ft>>>14|se<<18)^(ft>>>18|se<<14)^(se>>>9|ft<<23)),Lt+=St>>>16,qt+=65535&(Rt=(se>>>14|ft<<18)^(se>>>18|ft<<14)^(ft>>>9|se<<23)),It+=Rt>>>16,Ht+=65535&(St=ft&gt^~ft&Nt),Lt+=St>>>16,qt+=65535&(Rt=se&he^~se&Le),It+=Rt>>>16,Rt=$e[2*Kt],Ht+=65535&(St=$e[2*Kt+1]),Lt+=St>>>16,qt+=65535&Rt,It+=Rt>>>16,Rt=rr[Kt%16],Lt+=(St=ye[Kt%16])>>>16,qt+=65535&Rt,It+=Rt>>>16,qt+=(Lt+=(Ht+=65535&St)>>>16)>>>16,Ht=65535&(St=Tt=65535&Ht|Lt<<16),Lt=St>>>16,qt=65535&(Rt=yt=65535&qt|(It+=qt>>>16)<<16),It=Rt>>>16,Ht+=65535&(St=(Te>>>28|Me<<4)^(Me>>>2|Te<<30)^(Me>>>7|Te<<25)),Lt+=St>>>16,qt+=65535&(Rt=(Me>>>28|Te<<4)^(Te>>>2|Me<<30)^(Te>>>7|Me<<25)),It+=Rt>>>16,Lt+=(St=Te&Ce^Te&Ge^Ce&Ge)>>>16,qt+=65535&(Rt=Me&H^Me&G^H&G),It+=Rt>>>16,Ct=65535&(qt+=(Lt+=(Ht+=65535&St)>>>16)>>>16)|(It+=qt>>>16)<<16,at=65535&Ht|Lt<<16,Ht=65535&(St=be),Lt=St>>>16,qt=65535&(Rt=xt),It=Rt>>>16,Lt+=(St=Tt)>>>16,qt+=65535&(Rt=yt),It+=Rt>>>16,H=Pe,G=ct,ne=dt,se=xt=65535&(qt+=(Lt+=(Ht+=65535&St)>>>16)>>>16)|(It+=qt>>>16)<<16,he=st,Le=$t,Ie=_t,Me=Ct,Ce=it,Ge=Q,Je=ce,ft=be=65535&Ht|Lt<<16,gt=D,Nt=xe,Vt=ot,Te=at,Kt%16==15)for(Et=0;Et<16;Et++)Rt=rr[Et],Ht=65535&(St=ye[Et]),Lt=St>>>16,qt=65535&Rt,It=Rt>>>16,Rt=rr[(Et+9)%16],Ht+=65535&(St=ye[(Et+9)%16]),Lt+=St>>>16,qt+=65535&Rt,It+=Rt>>>16,yt=rr[(Et+1)%16],Ht+=65535&(St=((Tt=ye[(Et+1)%16])>>>1|yt<<31)^(Tt>>>8|yt<<24)^(Tt>>>7|yt<<25)),Lt+=St>>>16,qt+=65535&(Rt=(yt>>>1|Tt<<31)^(yt>>>8|Tt<<24)^yt>>>7),It+=Rt>>>16,yt=rr[(Et+14)%16],Lt+=(St=((Tt=ye[(Et+14)%16])>>>19|yt<<13)^(yt>>>29|Tt<<3)^(Tt>>>6|yt<<26))>>>16,qt+=65535&(Rt=(yt>>>19|Tt<<13)^(Tt>>>29|yt<<3)^yt>>>6),It+=Rt>>>16,It+=(qt+=(Lt+=(Ht+=65535&St)>>>16)>>>16)>>>16,rr[Et]=65535&qt|It<<16,ye[Et]=65535&Ht|Lt<<16;Ht=65535&(St=Te),Lt=St>>>16,qt=65535&(Rt=Me),It=Rt>>>16,Rt=je[0],Lt+=(St=De[0])>>>16,qt+=65535&Rt,It+=Rt>>>16,It+=(qt+=(Lt+=(Ht+=65535&St)>>>16)>>>16)>>>16,je[0]=Me=65535&qt|It<<16,De[0]=Te=65535&Ht|Lt<<16,Ht=65535&(St=Ce),Lt=St>>>16,qt=65535&(Rt=H),It=Rt>>>16,Rt=je[1],Lt+=(St=De[1])>>>16,qt+=65535&Rt,It+=Rt>>>16,It+=(qt+=(Lt+=(Ht+=65535&St)>>>16)>>>16)>>>16,je[1]=H=65535&qt|It<<16,De[1]=Ce=65535&Ht|Lt<<16,Ht=65535&(St=Ge),Lt=St>>>16,qt=65535&(Rt=G),It=Rt>>>16,Rt=je[2],Lt+=(St=De[2])>>>16,qt+=65535&Rt,It+=Rt>>>16,It+=(qt+=(Lt+=(Ht+=65535&St)>>>16)>>>16)>>>16,je[2]=G=65535&qt|It<<16,De[2]=Ge=65535&Ht|Lt<<16,Ht=65535&(St=Je),Lt=St>>>16,qt=65535&(Rt=ne),It=Rt>>>16,Rt=je[3],Lt+=(St=De[3])>>>16,qt+=65535&Rt,It+=Rt>>>16,It+=(qt+=(Lt+=(Ht+=65535&St)>>>16)>>>16)>>>16,je[3]=ne=65535&qt|It<<16,De[3]=Je=65535&Ht|Lt<<16,Ht=65535&(St=ft),Lt=St>>>16,qt=65535&(Rt=se),It=Rt>>>16,Rt=je[4],Lt+=(St=De[4])>>>16,qt+=65535&Rt,It+=Rt>>>16,It+=(qt+=(Lt+=(Ht+=65535&St)>>>16)>>>16)>>>16,je[4]=se=65535&qt|It<<16,De[4]=ft=65535&Ht|Lt<<16,Ht=65535&(St=gt),Lt=St>>>16,qt=65535&(Rt=he),It=Rt>>>16,Rt=je[5],Lt+=(St=De[5])>>>16,qt+=65535&Rt,It+=Rt>>>16,It+=(qt+=(Lt+=(Ht+=65535&St)>>>16)>>>16)>>>16,je[5]=he=65535&qt|It<<16,De[5]=gt=65535&Ht|Lt<<16,Ht=65535&(St=Nt),Lt=St>>>16,qt=65535&(Rt=Le),It=Rt>>>16,Rt=je[6],Lt+=(St=De[6])>>>16,qt+=65535&Rt,It+=Rt>>>16,It+=(qt+=(Lt+=(Ht+=65535&St)>>>16)>>>16)>>>16,je[6]=Le=65535&qt|It<<16,De[6]=Nt=65535&Ht|Lt<<16,Ht=65535&(St=Vt),Lt=St>>>16,qt=65535&(Rt=Ie),It=Rt>>>16,Rt=je[7],Lt+=(St=De[7])>>>16,qt+=65535&Rt,It+=Rt>>>16,It+=(qt+=(Lt+=(Ht+=65535&St)>>>16)>>>16)>>>16,je[7]=Ie=65535&qt|It<<16,De[7]=Vt=65535&Ht|Lt<<16,Gt+=128,ie-=128}return ie}function ue(je,De,Xe){var ie,Pe=new Int32Array(8),ct=new Int32Array(8),dt=new Uint8Array(256),xt=Xe;for(Pe[0]=1779033703,Pe[1]=3144134277,Pe[2]=1013904242,Pe[3]=2773480762,Pe[4]=1359893119,Pe[5]=2600822924,Pe[6]=528734635,Pe[7]=1541459225,ct[0]=4089235720,ct[1]=2227873595,ct[2]=4271175723,ct[3]=1595750129,ct[4]=2917565137,ct[5]=725511199,ct[6]=4215389547,ct[7]=327033209,ve(Pe,ct,De,Xe),Xe%=128,ie=0;ie<Xe;ie++)dt[ie]=De[xt-Xe+ie];for(dt[Xe]=128,dt[(Xe=256-128*(Xe<112?1:0))-9]=0,E(dt,Xe-8,xt/536870912|0,xt<<3),ve(Pe,ct,dt,Xe),ie=0;ie<8;ie++)E(je,8*ie,Pe[ie],ct[ie]);return 0}function c(je,De){var Xe=f(),ie=f(),Pe=f(),ct=f(),dt=f(),xt=f(),st=f(),$t=f(),_t=f();Fe(Xe,je[1],je[0]),Fe(_t,De[1],De[0]),Oe(Xe,Xe,_t),Ee(ie,je[0],je[1]),Ee(_t,De[0],De[1]),Oe(ie,ie,_t),Oe(Pe,je[3],De[3]),Oe(Pe,Pe,g),Oe(ct,je[2],De[2]),Ee(ct,ct,ct),Fe(dt,ie,Xe),Fe(xt,ct,Pe),Ee(st,ct,Pe),Ee($t,ie,Xe),Oe(je[0],dt,xt),Oe(je[1],$t,st),Oe(je[2],st,xt),Oe(je[3],dt,$t)}function y(je,De,Xe){var ie;for(ie=0;ie<4;ie++)x(je[ie],De[ie],Xe)}function v(je,De){var Xe=f(),ie=f(),Pe=f();de(Pe,De[2]),Oe(Xe,De[0],Pe),Oe(ie,De[1],Pe),W(je,ie),je[31]^=re(Xe)<<7}function B(je,De,Xe){var ie,Pe;for(P(je[0],d),P(je[1],b),P(je[2],b),P(je[3],d),Pe=255;Pe>=0;--Pe)y(je,De,ie=Xe[Pe/8|0]>>(7&Pe)&1),c(De,je),c(je,je),y(je,De,ie)}function O(je,De){var Xe=[f(),f(),f(),f()];P(Xe[0],p),P(Xe[1],A),P(Xe[2],b),Oe(Xe[3],p,A),B(je,Xe,De)}function h(je,De,Xe){var ie,Pe=new Uint8Array(64),ct=[f(),f(),f(),f()];for(Xe||u(De,32),ue(Pe,De,32),Pe[0]&=248,Pe[31]&=127,Pe[31]|=64,O(ct,Pe),v(je,ct),ie=0;ie<32;ie++)De[ie+32]=je[ie];return 0}var k=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function U(je,De){var Xe,ie,Pe,ct;for(ie=63;ie>=32;--ie){for(Xe=0,Pe=ie-32,ct=ie-12;Pe<ct;++Pe)De[Pe]+=Xe-16*De[ie]*k[Pe-(ie-32)],Xe=Math.floor((De[Pe]+128)/256),De[Pe]-=256*Xe;De[Pe]+=Xe,De[ie]=0}for(Xe=0,Pe=0;Pe<32;Pe++)De[Pe]+=Xe-(De[31]>>4)*k[Pe],Xe=De[Pe]>>8,De[Pe]&=255;for(Pe=0;Pe<32;Pe++)De[Pe]-=Xe*k[Pe];for(ie=0;ie<32;ie++)De[ie+1]+=De[ie]>>8,je[ie]=255&De[ie]}function M(je){var De,Xe=new Float64Array(64);for(De=0;De<64;De++)Xe[De]=je[De];for(De=0;De<64;De++)je[De]=0;U(je,Xe)}function J(je,De,Xe,ie){var Pe,ct,dt=new Uint8Array(64),xt=new Uint8Array(64),st=new Uint8Array(64),$t=new Float64Array(64),_t=[f(),f(),f(),f()];ue(dt,ie,32),dt[0]&=248,dt[31]&=127,dt[31]|=64;var Ct=Xe+64;for(Pe=0;Pe<Xe;Pe++)je[64+Pe]=De[Pe];for(Pe=0;Pe<32;Pe++)je[32+Pe]=dt[32+Pe];for(ue(st,je.subarray(32),Xe+32),M(st),O(_t,st),v(je,_t),Pe=32;Pe<64;Pe++)je[Pe]=ie[Pe];for(ue(xt,je,Xe+64),M(xt),Pe=0;Pe<64;Pe++)$t[Pe]=0;for(Pe=0;Pe<32;Pe++)$t[Pe]=st[Pe];for(Pe=0;Pe<32;Pe++)for(ct=0;ct<32;ct++)$t[Pe+ct]+=xt[Pe]*dt[ct];return U(je.subarray(32),$t),Ct}function pe(je,De,Xe,ie){var Pe,ct=new Uint8Array(32),dt=new Uint8Array(64),xt=[f(),f(),f(),f()],st=[f(),f(),f(),f()];if(Xe<64||function($t,_t){var Ct=f(),it=f(),Q=f(),ce=f(),be=f(),D=f(),xe=f();return P($t[2],b),oe($t[1],_t),$(Q,$t[1]),Oe(ce,Q,w),Fe(Q,Q,$t[2]),Ee(ce,$t[2],ce),$(be,ce),$(D,be),Oe(xe,D,be),Oe(Ct,xe,Q),Oe(Ct,Ct,ce),we(Ct,Ct),Oe(Ct,Ct,Q),Oe(Ct,Ct,ce),Oe(Ct,Ct,ce),Oe($t[0],Ct,ce),$(it,$t[0]),Oe(it,it,ce),K(it,Q)&&Oe($t[0],$t[0],L),$(it,$t[0]),Oe(it,it,ce),K(it,Q)?-1:(re($t[0])===_t[31]>>7&&Fe($t[0],d,$t[0]),Oe($t[3],$t[0],$t[1]),0)}(st,ie))return-1;for(Pe=0;Pe<Xe;Pe++)je[Pe]=De[Pe];for(Pe=0;Pe<32;Pe++)je[Pe+32]=ie[Pe];if(ue(dt,je,Xe),M(dt),B(xt,st,dt),O(st,De.subarray(32)),c(xt,st),v(ct,xt),Xe-=64,R(De,0,ct,0)){for(Pe=0;Pe<Xe;Pe++)je[Pe]=0;return-1}for(Pe=0;Pe<Xe;Pe++)je[Pe]=De[Pe+64];return Xe}var Ne=16,tt=64,bt=32,Ot=64;function Ft(je,De){if(je.length!==32)throw new Error("bad key size");if(De.length!==24)throw new Error("bad nonce size")}function Yt(){for(var je=0;je<arguments.length;je++)if(!(arguments[je]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function yr(je){for(var De=0;De<je.length;De++)je[De]=0}s.lowlevel={crypto_core_hsalsa20:V,crypto_stream_xor:q,crypto_stream:C,crypto_stream_salsa20_xor:me,crypto_stream_salsa20:le,crypto_onetimeauth:ae,crypto_onetimeauth_verify:I,crypto_verify_16:F,crypto_verify_32:R,crypto_secretbox:S,crypto_secretbox_open:m,crypto_scalarmult:Qe,crypto_scalarmult_base:ze,crypto_box_beforenm:et,crypto_box_afternm:Be,crypto_box:function(je,De,Xe,ie,Pe,ct){var dt=new Uint8Array(32);return et(dt,Pe,ct),Be(je,De,Xe,ie,dt)},crypto_box_open:function(je,De,Xe,ie,Pe,ct){var dt=new Uint8Array(32);return et(dt,Pe,ct),Re(je,De,Xe,ie,dt)},crypto_box_keypair:We,crypto_hash:ue,crypto_sign:J,crypto_sign_keypair:h,crypto_sign_open:pe,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:Ne,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:tt,crypto_sign_PUBLICKEYBYTES:bt,crypto_sign_SECRETKEYBYTES:Ot,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:f,D:w,L:k,pack25519:W,unpack25519:oe,M:Oe,A:Ee,S:$,Z:Fe,pow2523:we,add:c,set25519:P,modL:U,scalarmult:B,scalarbase:O},s.randomBytes=function(je){var De=new Uint8Array(je);return u(De,je),De},s.secretbox=function(je,De,Xe){Yt(je,De,Xe),Ft(Xe,De);for(var ie=new Uint8Array(32+je.length),Pe=new Uint8Array(ie.length),ct=0;ct<je.length;ct++)ie[ct+32]=je[ct];return S(Pe,ie,ie.length,De,Xe),Pe.subarray(Ne)},s.secretbox.open=function(je,De,Xe){Yt(je,De,Xe),Ft(Xe,De);for(var ie=new Uint8Array(Ne+je.length),Pe=new Uint8Array(ie.length),ct=0;ct<je.length;ct++)ie[ct+Ne]=je[ct];return ie.length<32||m(Pe,ie,ie.length,De,Xe)!==0?null:Pe.subarray(32)},s.secretbox.keyLength=32,s.secretbox.nonceLength=24,s.secretbox.overheadLength=Ne,s.scalarMult=function(je,De){if(Yt(je,De),je.length!==32)throw new Error("bad n size");if(De.length!==32)throw new Error("bad p size");var Xe=new Uint8Array(32);return Qe(Xe,je,De),Xe},s.scalarMult.base=function(je){if(Yt(je),je.length!==32)throw new Error("bad n size");var De=new Uint8Array(32);return ze(De,je),De},s.scalarMult.scalarLength=32,s.scalarMult.groupElementLength=32,s.box=function(je,De,Xe,ie){var Pe=s.box.before(Xe,ie);return s.secretbox(je,De,Pe)},s.box.before=function(je,De){Yt(je,De),function(ie,Pe){if(ie.length!==32)throw new Error("bad public key size");if(Pe.length!==32)throw new Error("bad secret key size")}(je,De);var Xe=new Uint8Array(32);return et(Xe,je,De),Xe},s.box.after=s.secretbox,s.box.open=function(je,De,Xe,ie){var Pe=s.box.before(Xe,ie);return s.secretbox.open(je,De,Pe)},s.box.open.after=s.secretbox.open,s.box.keyPair=function(){var je=new Uint8Array(32),De=new Uint8Array(32);return We(je,De),{publicKey:je,secretKey:De}},s.box.keyPair.fromSecretKey=function(je){if(Yt(je),je.length!==32)throw new Error("bad secret key size");var De=new Uint8Array(32);return ze(De,je),{publicKey:De,secretKey:new Uint8Array(je)}},s.box.publicKeyLength=32,s.box.secretKeyLength=32,s.box.sharedKeyLength=32,s.box.nonceLength=24,s.box.overheadLength=s.secretbox.overheadLength,s.sign=function(je,De){if(Yt(je,De),De.length!==Ot)throw new Error("bad secret key size");var Xe=new Uint8Array(tt+je.length);return J(Xe,je,je.length,De),Xe},s.sign.open=function(je,De){if(Yt(je,De),De.length!==bt)throw new Error("bad public key size");var Xe=new Uint8Array(je.length),ie=pe(Xe,je,je.length,De);if(ie<0)return null;for(var Pe=new Uint8Array(ie),ct=0;ct<Pe.length;ct++)Pe[ct]=Xe[ct];return Pe},s.sign.detached=function(je,De){for(var Xe=s.sign(je,De),ie=new Uint8Array(tt),Pe=0;Pe<ie.length;Pe++)ie[Pe]=Xe[Pe];return ie},s.sign.detached.verify=function(je,De,Xe){if(Yt(je,De,Xe),De.length!==tt)throw new Error("bad signature size");if(Xe.length!==bt)throw new Error("bad public key size");var ie,Pe=new Uint8Array(tt+je.length),ct=new Uint8Array(tt+je.length);for(ie=0;ie<tt;ie++)Pe[ie]=De[ie];for(ie=0;ie<je.length;ie++)Pe[ie+tt]=je[ie];return pe(ct,Pe,Pe.length,Xe)>=0},s.sign.keyPair=function(){var je=new Uint8Array(bt),De=new Uint8Array(Ot);return h(je,De),{publicKey:je,secretKey:De}},s.sign.keyPair.fromSecretKey=function(je){if(Yt(je),je.length!==Ot)throw new Error("bad secret key size");for(var De=new Uint8Array(bt),Xe=0;Xe<De.length;Xe++)De[Xe]=je[32+Xe];return{publicKey:De,secretKey:new Uint8Array(je)}},s.sign.keyPair.fromSeed=function(je){if(Yt(je),je.length!==32)throw new Error("bad seed size");for(var De=new Uint8Array(bt),Xe=new Uint8Array(Ot),ie=0;ie<32;ie++)Xe[ie]=je[ie];return h(De,Xe,!0),{publicKey:De,secretKey:Xe}},s.sign.publicKeyLength=bt,s.sign.secretKeyLength=Ot,s.sign.seedLength=32,s.sign.signatureLength=tt,s.hash=function(je){Yt(je);var De=new Uint8Array(64);return ue(De,je,je.length),De},s.hash.hashLength=64,s.verify=function(je,De){return Yt(je,De),je.length!==0&&De.length!==0&&je.length===De.length&&N(je,0,De,0,je.length)===0},s.setPRNG=function(je){u=je},function(){var je=typeof self<"u"?self.crypto||self.msCrypto:null;je&&je.getRandomValues?s.setPRNG(function(De,Xe){var ie,Pe=new Uint8Array(Xe);for(ie=0;ie<Xe;ie+=65536)je.getRandomValues(Pe.subarray(ie,ie+Math.min(Xe-ie,65536)));for(ie=0;ie<Xe;ie++)De[ie]=Pe[ie];yr(Pe)}):(je=i(2894))&&je.randomBytes&&s.setPRNG(function(De,Xe){var ie,Pe=je.randomBytes(Xe);for(ie=0;ie<Xe;ie++)De[ie]=Pe[ie];yr(Pe)})}()})(o.exports?o.exports:self.nacl=self.nacl||{})},1924:(o,a,i)=>{"use strict";i.r(a),i.d(a,{StellarBase:()=>u,axios:()=>r.A,default:()=>_});var s=i(4356),f={};for(let d in s)["default","StellarBase","axios"].indexOf(d)<0&&(f[d]=()=>s[d]);i.d(a,f);var u=i(356),r=i(6266);let _=(o=i.hmd(o)).exports},8732:(o,a,i)=>{"use strict";function s(g){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},s(g)}function f(g,p){for(var A=0;A<p.length;A++){var L=p[A];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(g,u(L.key),L)}}function u(g){var p=function(A,L){if(s(A)!="object"||!A)return A;var E=A[Symbol.toPrimitive];if(E!==void 0){var N=E.call(A,L||"default");if(s(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return(L==="string"?String:Number)(A)}(g,"string");return s(p)=="symbol"?p:p+""}i.d(a,{T:()=>w});var r,_,d,b={allowHttp:!1,timeout:0},T=Object.assign({},b),w=(r=function g(){(function(p,A){if(!(p instanceof A))throw new TypeError("Cannot call a class as a function")})(this,g)},d=[{key:"setAllowHttp",value:function(g){T.allowHttp=g}},{key:"setTimeout",value:function(g){T.timeout=g}},{key:"isAllowHttp",value:function(){return T.allowHttp}},{key:"getTimeout",value:function(){return T.timeout}},{key:"setDefault",value:function(){T=Object.assign({},b)}}],(_=null)&&f(r.prototype,_),d&&f(r,d),Object.defineProperty(r,"prototype",{writable:!1}),r)},145:(o,a,i)=>{"use strict";i.r(a),i.d(a,{AssembledTransaction:()=>U,Client:()=>Me,Err:()=>p,NULL_ACCOUNT:()=>k,Ok:()=>g,SentTransaction:()=>oe,Spec:()=>_t,basicNodeSigner:()=>bt});var s=i(356),f=i(1575),u=i(4076),r=i(8680);function _(H){return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},_(H)}function d(H,G){if(!(H instanceof G))throw new TypeError("Cannot call a class as a function")}function b(H,G){for(var ne=0;ne<G.length;ne++){var se=G[ne];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(H,w(se.key),se)}}function T(H,G,ne){return G&&b(H.prototype,G),ne&&b(H,ne),Object.defineProperty(H,"prototype",{writable:!1}),H}function w(H){var G=function(ne,se){if(_(ne)!="object"||!ne)return ne;var he=ne[Symbol.toPrimitive];if(he!==void 0){var Le=he.call(ne,se||"default");if(_(Le)!="object")return Le;throw new TypeError("@@toPrimitive must return a primitive value.")}return(se==="string"?String:Number)(ne)}(H,"string");return _(G)=="symbol"?G:G+""}var g=T(function H(G){d(this,H),this.value=G},[{key:"unwrapErr",value:function(){throw new Error("No error")}},{key:"unwrap",value:function(){return this.value}},{key:"isOk",value:function(){return!0}},{key:"isErr",value:function(){return!1}}]),p=T(function H(G){d(this,H),this.error=G},[{key:"unwrapErr",value:function(){return this.error}},{key:"unwrap",value:function(){throw new Error(this.error.message)}},{key:"isOk",value:function(){return!1}},{key:"isErr",value:function(){return!0}}]);function A(){A=function(){return G};var H,G={},ne=Object.prototype,se=ne.hasOwnProperty,he=Object.defineProperty||function(fe,Se,Ue){fe[Se]=Ue.value},Le=typeof Symbol=="function"?Symbol:{},Ie=Le.iterator||"@@iterator",Te=Le.asyncIterator||"@@asyncIterator",Ce=Le.toStringTag||"@@toStringTag";function Ge(fe,Se,Ue){return Object.defineProperty(fe,Se,{value:Ue,enumerable:!0,configurable:!0,writable:!0}),fe[Se]}try{Ge({},"")}catch{Ge=function(Se,Ue,mt){return Se[Ue]=mt}}function Je(fe,Se,Ue,mt){var qe=Se&&Se.prototype instanceof ir?Se:ir,Ut=Object.create(qe.prototype),Zt=new Lr(mt||[]);return he(Ut,"_invoke",{value:er(fe,Ue,Zt)}),Ut}function ft(fe,Se,Ue){try{return{type:"normal",arg:fe.call(Se,Ue)}}catch(mt){return{type:"throw",arg:mt}}}G.wrap=Je;var gt="suspendedStart",Nt="suspendedYield",Vt="executing",Gt="completed",Ye={};function ir(){}function or(){}function sr(){}var pr={};Ge(pr,Ie,function(){return this});var Er=Object.getPrototypeOf,hr=Er&&Er(Er(Mt([])));hr&&hr!==ne&&se.call(hr,Ie)&&(pr=hr);var br=sr.prototype=ir.prototype=Object.create(pr);function ur(fe){["next","throw","return"].forEach(function(Se){Ge(fe,Se,function(Ue){return this._invoke(Se,Ue)})})}function ee(fe,Se){function Ue(qe,Ut,Zt,dr){var fr=ft(fe[qe],fe,Ut);if(fr.type!=="throw"){var Vr=fr.arg,Wr=Vr.value;return Wr&&L(Wr)=="object"&&se.call(Wr,"__await")?Se.resolve(Wr.__await).then(function(Nr){Ue("next",Nr,Zt,dr)},function(Nr){Ue("throw",Nr,Zt,dr)}):Se.resolve(Wr).then(function(Nr){Vr.value=Nr,Zt(Vr)},function(Nr){return Ue("throw",Nr,Zt,dr)})}dr(fr.arg)}var mt;he(this,"_invoke",{value:function(qe,Ut){function Zt(){return new Se(function(dr,fr){Ue(qe,Ut,dr,fr)})}return mt=mt?mt.then(Zt,Zt):Zt()}})}function er(fe,Se,Ue){var mt=gt;return function(qe,Ut){if(mt===Vt)throw Error("Generator is already running");if(mt===Gt){if(qe==="throw")throw Ut;return{value:H,done:!0}}for(Ue.method=qe,Ue.arg=Ut;;){var Zt=Ue.delegate;if(Zt){var dr=wr(Zt,Ue);if(dr){if(dr===Ye)continue;return dr}}if(Ue.method==="next")Ue.sent=Ue._sent=Ue.arg;else if(Ue.method==="throw"){if(mt===gt)throw mt=Gt,Ue.arg;Ue.dispatchException(Ue.arg)}else Ue.method==="return"&&Ue.abrupt("return",Ue.arg);mt=Vt;var fr=ft(fe,Se,Ue);if(fr.type==="normal"){if(mt=Ue.done?Gt:Nt,fr.arg===Ye)continue;return{value:fr.arg,done:Ue.done}}fr.type==="throw"&&(mt=Gt,Ue.method="throw",Ue.arg=fr.arg)}}}function wr(fe,Se){var Ue=Se.method,mt=fe.iterator[Ue];if(mt===H)return Se.delegate=null,Ue==="throw"&&fe.iterator.return&&(Se.method="return",Se.arg=H,wr(fe,Se),Se.method==="throw")||Ue!=="return"&&(Se.method="throw",Se.arg=new TypeError("The iterator does not provide a '"+Ue+"' method")),Ye;var qe=ft(mt,fe.iterator,Se.arg);if(qe.type==="throw")return Se.method="throw",Se.arg=qe.arg,Se.delegate=null,Ye;var Ut=qe.arg;return Ut?Ut.done?(Se[fe.resultName]=Ut.value,Se.next=fe.nextLoc,Se.method!=="return"&&(Se.method="next",Se.arg=H),Se.delegate=null,Ye):Ut:(Se.method="throw",Se.arg=new TypeError("iterator result is not an object"),Se.delegate=null,Ye)}function Pr(fe){var Se={tryLoc:fe[0]};1 in fe&&(Se.catchLoc=fe[1]),2 in fe&&(Se.finallyLoc=fe[2],Se.afterLoc=fe[3]),this.tryEntries.push(Se)}function jr(fe){var Se=fe.completion||{};Se.type="normal",delete Se.arg,fe.completion=Se}function Lr(fe){this.tryEntries=[{tryLoc:"root"}],fe.forEach(Pr,this),this.reset(!0)}function Mt(fe){if(fe||fe===""){var Se=fe[Ie];if(Se)return Se.call(fe);if(typeof fe.next=="function")return fe;if(!isNaN(fe.length)){var Ue=-1,mt=function qe(){for(;++Ue<fe.length;)if(se.call(fe,Ue))return qe.value=fe[Ue],qe.done=!1,qe;return qe.value=H,qe.done=!0,qe};return mt.next=mt}}throw new TypeError(L(fe)+" is not iterable")}return or.prototype=sr,he(br,"constructor",{value:sr,configurable:!0}),he(sr,"constructor",{value:or,configurable:!0}),or.displayName=Ge(sr,Ce,"GeneratorFunction"),G.isGeneratorFunction=function(fe){var Se=typeof fe=="function"&&fe.constructor;return!!Se&&(Se===or||(Se.displayName||Se.name)==="GeneratorFunction")},G.mark=function(fe){return Object.setPrototypeOf?Object.setPrototypeOf(fe,sr):(fe.__proto__=sr,Ge(fe,Ce,"GeneratorFunction")),fe.prototype=Object.create(br),fe},G.awrap=function(fe){return{__await:fe}},ur(ee.prototype),Ge(ee.prototype,Te,function(){return this}),G.AsyncIterator=ee,G.async=function(fe,Se,Ue,mt,qe){qe===void 0&&(qe=Promise);var Ut=new ee(Je(fe,Se,Ue,mt),qe);return G.isGeneratorFunction(Se)?Ut:Ut.next().then(function(Zt){return Zt.done?Zt.value:Ut.next()})},ur(br),Ge(br,Ce,"Generator"),Ge(br,Ie,function(){return this}),Ge(br,"toString",function(){return"[object Generator]"}),G.keys=function(fe){var Se=Object(fe),Ue=[];for(var mt in Se)Ue.push(mt);return Ue.reverse(),function qe(){for(;Ue.length;){var Ut=Ue.pop();if(Ut in Se)return qe.value=Ut,qe.done=!1,qe}return qe.done=!0,qe}},G.values=Mt,Lr.prototype={constructor:Lr,reset:function(fe){if(this.prev=0,this.next=0,this.sent=this._sent=H,this.done=!1,this.delegate=null,this.method="next",this.arg=H,this.tryEntries.forEach(jr),!fe)for(var Se in this)Se.charAt(0)==="t"&&se.call(this,Se)&&!isNaN(+Se.slice(1))&&(this[Se]=H)},stop:function(){this.done=!0;var fe=this.tryEntries[0].completion;if(fe.type==="throw")throw fe.arg;return this.rval},dispatchException:function(fe){if(this.done)throw fe;var Se=this;function Ue(fr,Vr){return Ut.type="throw",Ut.arg=fe,Se.next=fr,Vr&&(Se.method="next",Se.arg=H),!!Vr}for(var mt=this.tryEntries.length-1;mt>=0;--mt){var qe=this.tryEntries[mt],Ut=qe.completion;if(qe.tryLoc==="root")return Ue("end");if(qe.tryLoc<=this.prev){var Zt=se.call(qe,"catchLoc"),dr=se.call(qe,"finallyLoc");if(Zt&&dr){if(this.prev<qe.catchLoc)return Ue(qe.catchLoc,!0);if(this.prev<qe.finallyLoc)return Ue(qe.finallyLoc)}else if(Zt){if(this.prev<qe.catchLoc)return Ue(qe.catchLoc,!0)}else{if(!dr)throw Error("try statement without catch or finally");if(this.prev<qe.finallyLoc)return Ue(qe.finallyLoc)}}}},abrupt:function(fe,Se){for(var Ue=this.tryEntries.length-1;Ue>=0;--Ue){var mt=this.tryEntries[Ue];if(mt.tryLoc<=this.prev&&se.call(mt,"finallyLoc")&&this.prev<mt.finallyLoc){var qe=mt;break}}qe&&(fe==="break"||fe==="continue")&&qe.tryLoc<=Se&&Se<=qe.finallyLoc&&(qe=null);var Ut=qe?qe.completion:{};return Ut.type=fe,Ut.arg=Se,qe?(this.method="next",this.next=qe.finallyLoc,Ye):this.complete(Ut)},complete:function(fe,Se){if(fe.type==="throw")throw fe.arg;return fe.type==="break"||fe.type==="continue"?this.next=fe.arg:fe.type==="return"?(this.rval=this.arg=fe.arg,this.method="return",this.next="end"):fe.type==="normal"&&Se&&(this.next=Se),Ye},finish:function(fe){for(var Se=this.tryEntries.length-1;Se>=0;--Se){var Ue=this.tryEntries[Se];if(Ue.finallyLoc===fe)return this.complete(Ue.completion,Ue.afterLoc),jr(Ue),Ye}},catch:function(fe){for(var Se=this.tryEntries.length-1;Se>=0;--Se){var Ue=this.tryEntries[Se];if(Ue.tryLoc===fe){var mt=Ue.completion;if(mt.type==="throw"){var qe=mt.arg;jr(Ue)}return qe}}throw Error("illegal catch attempt")},delegateYield:function(fe,Se,Ue){return this.delegate={iterator:Mt(fe),resultName:Se,nextLoc:Ue},this.method==="next"&&(this.arg=H),Ye}},G}function L(H){return L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},L(H)}function E(H,G,ne,se,he,Le,Ie){try{var Te=H[Le](Ie),Ce=Te.value}catch(Ge){return void ne(Ge)}Te.done?G(Ce):Promise.resolve(Ce).then(se,he)}function N(H,G,ne){return F.apply(this,arguments)}function F(){var H;return H=A().mark(function G(ne,se,he){var Le,Ie,Te,Ce,Ge,Je,ft,gt=arguments;return A().wrap(function(Nt){for(;;)switch(Nt.prev=Nt.next){case 0:return Le=gt.length>3&&gt[3]!==void 0?gt[3]:1.5,Ie=gt.length>4&&gt[4]!==void 0&&gt[4],Te=[],Ce=0,Nt.t0=Te,Nt.next=7,ne();case 7:if(Nt.t1=Nt.sent,Nt.t0.push.call(Nt.t0,Nt.t1),se(Te[Te.length-1])){Nt.next=11;break}return Nt.abrupt("return",Te);case 11:Ge=new Date(Date.now()+1e3*he).valueOf(),ft=Je=1e3;case 14:if(!(Date.now()<Ge&&se(Te[Te.length-1]))){Nt.next=30;break}return Ce+=1,Ie&&console.info("Waiting ".concat(Je,"ms before trying again (bringing the total wait time to ").concat(ft,"ms so far, of total ").concat(1e3*he,"ms)")),Nt.next=19,new Promise(function(Vt){return setTimeout(Vt,Je)});case 19:return Je*=Le,new Date(Date.now()+Je).valueOf()>Ge&&(Je=Ge-Date.now(),Ie&&console.info("was gonna wait too long; new waitTime: ".concat(Je,"ms"))),ft=Je+ft,Nt.t2=Te,Nt.next=25,ne(Te[Te.length-1]);case 25:Nt.t3=Nt.sent,Nt.t2.push.call(Nt.t2,Nt.t3),Ie&&se(Te[Te.length-1])&&console.info("".concat(Ce,". Called ").concat(ne,"; ").concat(Te.length," prev attempts. Most recent: ").concat(JSON.stringify(Te[Te.length-1],null,2))),Nt.next=14;break;case 30:return Nt.abrupt("return",Te);case 31:case"end":return Nt.stop()}},G)}),F=function(){var G=this,ne=arguments;return new Promise(function(se,he){var Le=H.apply(G,ne);function Ie(Ce){E(Le,se,he,Ie,Te,"next",Ce)}function Te(Ce){E(Le,se,he,Ie,Te,"throw",Ce)}Ie(void 0)})},F.apply(this,arguments)}var R,j=/Error\(Contract, #(\d+)\)/;function V(H){for(var G=new s.cereal.XdrReader(H),ne=[];!G.eof;)ne.push(s.xdr.ScSpecEntry.read(G));return ne}function Y(H,G,ne){return G=X(G),function(se,he){if(he&&(ae(he)==="object"||typeof he=="function"))return he;if(he!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Le){if(Le===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Le}(se)}(H,C()?Reflect.construct(G,ne||[],X(H).constructor):G.apply(H,ne))}function me(H,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function");H.prototype=Object.create(G&&G.prototype,{constructor:{value:H,writable:!0,configurable:!0}}),Object.defineProperty(H,"prototype",{writable:!1}),G&&q(H,G)}function le(H){var G=typeof Map=="function"?new Map:void 0;return le=function(ne){if(ne===null||!function(he){try{return Function.toString.call(he).indexOf("[native code]")!==-1}catch{return typeof he=="function"}}(ne))return ne;if(typeof ne!="function")throw new TypeError("Super expression must either be null or a function");if(G!==void 0){if(G.has(ne))return G.get(ne);G.set(ne,se)}function se(){return function(he,Le,Ie){if(C())return Reflect.construct.apply(null,arguments);var Te=[null];Te.push.apply(Te,Le);var Ce=new(he.bind.apply(he,Te));return Ie&&q(Ce,Ie.prototype),Ce}(ne,arguments,X(this).constructor)}return se.prototype=Object.create(ne.prototype,{constructor:{value:se,enumerable:!1,writable:!0,configurable:!0}}),q(se,ne)},le(H)}function C(){try{var H=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(C=function(){return!!H})()}function q(H,G){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ne,se){return ne.__proto__=se,ne},q(H,G)}function X(H){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)},X(H)}function ae(H){return ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},ae(H)}function I(){I=function(){return G};var H,G={},ne=Object.prototype,se=ne.hasOwnProperty,he=Object.defineProperty||function(fe,Se,Ue){fe[Se]=Ue.value},Le=typeof Symbol=="function"?Symbol:{},Ie=Le.iterator||"@@iterator",Te=Le.asyncIterator||"@@asyncIterator",Ce=Le.toStringTag||"@@toStringTag";function Ge(fe,Se,Ue){return Object.defineProperty(fe,Se,{value:Ue,enumerable:!0,configurable:!0,writable:!0}),fe[Se]}try{Ge({},"")}catch{Ge=function(Se,Ue,mt){return Se[Ue]=mt}}function Je(fe,Se,Ue,mt){var qe=Se&&Se.prototype instanceof ir?Se:ir,Ut=Object.create(qe.prototype),Zt=new Lr(mt||[]);return he(Ut,"_invoke",{value:er(fe,Ue,Zt)}),Ut}function ft(fe,Se,Ue){try{return{type:"normal",arg:fe.call(Se,Ue)}}catch(mt){return{type:"throw",arg:mt}}}G.wrap=Je;var gt="suspendedStart",Nt="suspendedYield",Vt="executing",Gt="completed",Ye={};function ir(){}function or(){}function sr(){}var pr={};Ge(pr,Ie,function(){return this});var Er=Object.getPrototypeOf,hr=Er&&Er(Er(Mt([])));hr&&hr!==ne&&se.call(hr,Ie)&&(pr=hr);var br=sr.prototype=ir.prototype=Object.create(pr);function ur(fe){["next","throw","return"].forEach(function(Se){Ge(fe,Se,function(Ue){return this._invoke(Se,Ue)})})}function ee(fe,Se){function Ue(qe,Ut,Zt,dr){var fr=ft(fe[qe],fe,Ut);if(fr.type!=="throw"){var Vr=fr.arg,Wr=Vr.value;return Wr&&ae(Wr)=="object"&&se.call(Wr,"__await")?Se.resolve(Wr.__await).then(function(Nr){Ue("next",Nr,Zt,dr)},function(Nr){Ue("throw",Nr,Zt,dr)}):Se.resolve(Wr).then(function(Nr){Vr.value=Nr,Zt(Vr)},function(Nr){return Ue("throw",Nr,Zt,dr)})}dr(fr.arg)}var mt;he(this,"_invoke",{value:function(qe,Ut){function Zt(){return new Se(function(dr,fr){Ue(qe,Ut,dr,fr)})}return mt=mt?mt.then(Zt,Zt):Zt()}})}function er(fe,Se,Ue){var mt=gt;return function(qe,Ut){if(mt===Vt)throw Error("Generator is already running");if(mt===Gt){if(qe==="throw")throw Ut;return{value:H,done:!0}}for(Ue.method=qe,Ue.arg=Ut;;){var Zt=Ue.delegate;if(Zt){var dr=wr(Zt,Ue);if(dr){if(dr===Ye)continue;return dr}}if(Ue.method==="next")Ue.sent=Ue._sent=Ue.arg;else if(Ue.method==="throw"){if(mt===gt)throw mt=Gt,Ue.arg;Ue.dispatchException(Ue.arg)}else Ue.method==="return"&&Ue.abrupt("return",Ue.arg);mt=Vt;var fr=ft(fe,Se,Ue);if(fr.type==="normal"){if(mt=Ue.done?Gt:Nt,fr.arg===Ye)continue;return{value:fr.arg,done:Ue.done}}fr.type==="throw"&&(mt=Gt,Ue.method="throw",Ue.arg=fr.arg)}}}function wr(fe,Se){var Ue=Se.method,mt=fe.iterator[Ue];if(mt===H)return Se.delegate=null,Ue==="throw"&&fe.iterator.return&&(Se.method="return",Se.arg=H,wr(fe,Se),Se.method==="throw")||Ue!=="return"&&(Se.method="throw",Se.arg=new TypeError("The iterator does not provide a '"+Ue+"' method")),Ye;var qe=ft(mt,fe.iterator,Se.arg);if(qe.type==="throw")return Se.method="throw",Se.arg=qe.arg,Se.delegate=null,Ye;var Ut=qe.arg;return Ut?Ut.done?(Se[fe.resultName]=Ut.value,Se.next=fe.nextLoc,Se.method!=="return"&&(Se.method="next",Se.arg=H),Se.delegate=null,Ye):Ut:(Se.method="throw",Se.arg=new TypeError("iterator result is not an object"),Se.delegate=null,Ye)}function Pr(fe){var Se={tryLoc:fe[0]};1 in fe&&(Se.catchLoc=fe[1]),2 in fe&&(Se.finallyLoc=fe[2],Se.afterLoc=fe[3]),this.tryEntries.push(Se)}function jr(fe){var Se=fe.completion||{};Se.type="normal",delete Se.arg,fe.completion=Se}function Lr(fe){this.tryEntries=[{tryLoc:"root"}],fe.forEach(Pr,this),this.reset(!0)}function Mt(fe){if(fe||fe===""){var Se=fe[Ie];if(Se)return Se.call(fe);if(typeof fe.next=="function")return fe;if(!isNaN(fe.length)){var Ue=-1,mt=function qe(){for(;++Ue<fe.length;)if(se.call(fe,Ue))return qe.value=fe[Ue],qe.done=!1,qe;return qe.value=H,qe.done=!0,qe};return mt.next=mt}}throw new TypeError(ae(fe)+" is not iterable")}return or.prototype=sr,he(br,"constructor",{value:sr,configurable:!0}),he(sr,"constructor",{value:or,configurable:!0}),or.displayName=Ge(sr,Ce,"GeneratorFunction"),G.isGeneratorFunction=function(fe){var Se=typeof fe=="function"&&fe.constructor;return!!Se&&(Se===or||(Se.displayName||Se.name)==="GeneratorFunction")},G.mark=function(fe){return Object.setPrototypeOf?Object.setPrototypeOf(fe,sr):(fe.__proto__=sr,Ge(fe,Ce,"GeneratorFunction")),fe.prototype=Object.create(br),fe},G.awrap=function(fe){return{__await:fe}},ur(ee.prototype),Ge(ee.prototype,Te,function(){return this}),G.AsyncIterator=ee,G.async=function(fe,Se,Ue,mt,qe){qe===void 0&&(qe=Promise);var Ut=new ee(Je(fe,Se,Ue,mt),qe);return G.isGeneratorFunction(Se)?Ut:Ut.next().then(function(Zt){return Zt.done?Zt.value:Ut.next()})},ur(br),Ge(br,Ce,"Generator"),Ge(br,Ie,function(){return this}),Ge(br,"toString",function(){return"[object Generator]"}),G.keys=function(fe){var Se=Object(fe),Ue=[];for(var mt in Se)Ue.push(mt);return Ue.reverse(),function qe(){for(;Ue.length;){var Ut=Ue.pop();if(Ut in Se)return qe.value=Ut,qe.done=!1,qe}return qe.done=!0,qe}},G.values=Mt,Lr.prototype={constructor:Lr,reset:function(fe){if(this.prev=0,this.next=0,this.sent=this._sent=H,this.done=!1,this.delegate=null,this.method="next",this.arg=H,this.tryEntries.forEach(jr),!fe)for(var Se in this)Se.charAt(0)==="t"&&se.call(this,Se)&&!isNaN(+Se.slice(1))&&(this[Se]=H)},stop:function(){this.done=!0;var fe=this.tryEntries[0].completion;if(fe.type==="throw")throw fe.arg;return this.rval},dispatchException:function(fe){if(this.done)throw fe;var Se=this;function Ue(fr,Vr){return Ut.type="throw",Ut.arg=fe,Se.next=fr,Vr&&(Se.method="next",Se.arg=H),!!Vr}for(var mt=this.tryEntries.length-1;mt>=0;--mt){var qe=this.tryEntries[mt],Ut=qe.completion;if(qe.tryLoc==="root")return Ue("end");if(qe.tryLoc<=this.prev){var Zt=se.call(qe,"catchLoc"),dr=se.call(qe,"finallyLoc");if(Zt&&dr){if(this.prev<qe.catchLoc)return Ue(qe.catchLoc,!0);if(this.prev<qe.finallyLoc)return Ue(qe.finallyLoc)}else if(Zt){if(this.prev<qe.catchLoc)return Ue(qe.catchLoc,!0)}else{if(!dr)throw Error("try statement without catch or finally");if(this.prev<qe.finallyLoc)return Ue(qe.finallyLoc)}}}},abrupt:function(fe,Se){for(var Ue=this.tryEntries.length-1;Ue>=0;--Ue){var mt=this.tryEntries[Ue];if(mt.tryLoc<=this.prev&&se.call(mt,"finallyLoc")&&this.prev<mt.finallyLoc){var qe=mt;break}}qe&&(fe==="break"||fe==="continue")&&qe.tryLoc<=Se&&Se<=qe.finallyLoc&&(qe=null);var Ut=qe?qe.completion:{};return Ut.type=fe,Ut.arg=Se,qe?(this.method="next",this.next=qe.finallyLoc,Ye):this.complete(Ut)},complete:function(fe,Se){if(fe.type==="throw")throw fe.arg;return fe.type==="break"||fe.type==="continue"?this.next=fe.arg:fe.type==="return"?(this.rval=this.arg=fe.arg,this.method="return",this.next="end"):fe.type==="normal"&&Se&&(this.next=Se),Ye},finish:function(fe){for(var Se=this.tryEntries.length-1;Se>=0;--Se){var Ue=this.tryEntries[Se];if(Ue.finallyLoc===fe)return this.complete(Ue.completion,Ue.afterLoc),jr(Ue),Ye}},catch:function(fe){for(var Se=this.tryEntries.length-1;Se>=0;--Se){var Ue=this.tryEntries[Se];if(Ue.tryLoc===fe){var mt=Ue.completion;if(mt.type==="throw"){var qe=mt.arg;jr(Ue)}return qe}}throw Error("illegal catch attempt")},delegateYield:function(fe,Se,Ue){return this.delegate={iterator:Mt(fe),resultName:Se,nextLoc:Ue},this.method==="next"&&(this.arg=H),Ye}},G}function S(H,G,ne,se,he,Le,Ie){try{var Te=H[Le](Ie),Ce=Te.value}catch(Ge){return void ne(Ge)}Te.done?G(Ce):Promise.resolve(Ce).then(se,he)}function m(H){return function(){var G=this,ne=arguments;return new Promise(function(se,he){var Le=H.apply(G,ne);function Ie(Ce){S(Le,se,he,Ie,Te,"next",Ce)}function Te(Ce){S(Le,se,he,Ie,Te,"throw",Ce)}Ie(void 0)})}}function P(H,G){if(!(H instanceof G))throw new TypeError("Cannot call a class as a function")}function l(H,G){for(var ne=0;ne<G.length;ne++){var se=G[ne];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(H,K(se.key),se)}}function x(H,G,ne){return G&&l(H.prototype,G),ne&&l(H,ne),Object.defineProperty(H,"prototype",{writable:!1}),H}function W(H,G,ne){return(G=K(G))in H?Object.defineProperty(H,G,{value:ne,enumerable:!0,configurable:!0,writable:!0}):H[G]=ne,H}function K(H){var G=function(ne,se){if(ae(ne)!="object"||!ne)return ne;var he=ne[Symbol.toPrimitive];if(he!==void 0){var Le=he.call(ne,se||"default");if(ae(Le)!="object")return Le;throw new TypeError("@@toPrimitive must return a primitive value.")}return(se==="string"?String:Number)(ne)}(H,"string");return ae(G)=="symbol"?G:G+""}var re,oe=function(){function H(G,ne){var se,he=this;if(P(this,H),W(this,"send",m(I().mark(function Le(){var Ie,Te,Ce,Ge;return I().wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:return Te=(Ie=he.assembled.options.timeoutInSeconds)!==null&&Ie!==void 0?Ie:300,he.assembled.built=s.TransactionBuilder.cloneFrom(he.assembled.built,{fee:he.assembled.built.fee,timebounds:void 0,sorobanData:new s.SorobanDataBuilder(he.assembled.simulationData.transactionData.toXDR()).build()}).setTimeout(Te).build(),Je.next=4,he.signTransaction(he.assembled.built.toXDR(),{networkPassphrase:he.assembled.options.networkPassphrase});case 4:return Ce=Je.sent,he.signed=s.TransactionBuilder.fromXDR(Ce,he.assembled.options.networkPassphrase),Je.next=8,he.server.sendTransaction(he.signed);case 8:if(he.sendTransactionResponse=Je.sent,he.sendTransactionResponse.status==="PENDING"){Je.next=11;break}throw new H.Errors.SendFailed(`Sending the transaction to the network failed!
25
- `.concat(JSON.stringify(he.sendTransactionResponse,null,2)));case 11:return Ge=he.sendTransactionResponse.hash,Je.next=14,N(function(){return he.server.getTransaction(Ge)},function(ft){return ft.status===u.j.GetTransactionStatus.NOT_FOUND},Te);case 14:if(he.getTransactionResponseAll=Je.sent,he.getTransactionResponse=he.getTransactionResponseAll[he.getTransactionResponseAll.length-1],he.getTransactionResponse.status!==u.j.GetTransactionStatus.NOT_FOUND){Je.next=18;break}throw new H.Errors.TransactionStillPending("Waited ".concat(Te," seconds for transaction to complete, but it did not. ")+"Returning anyway. Check the transaction status manually. "+"Sent transaction: ".concat(JSON.stringify(he.sendTransactionResponse,null,2),`
26
- `)+"All attempts to get the result: ".concat(JSON.stringify(he.getTransactionResponseAll,null,2)));case 18:return Je.abrupt("return",he);case 19:case"end":return Je.stop()}},Le)}))),this.signTransaction=G,this.assembled=ne,!G)throw new Error("You must provide a `signTransaction` function to send a transaction");this.server=new f.gq(this.assembled.options.rpcUrl,{allowHttp:(se=this.assembled.options.allowHttp)!==null&&se!==void 0&&se})}return x(H,[{key:"result",get:function(){if("getTransactionResponse"in this&&this.getTransactionResponse){if("returnValue"in this.getTransactionResponse)return this.assembled.options.parseResultXdr(this.getTransactionResponse.returnValue);throw new Error("Transaction failed! Cannot parse result.")}if(this.sendTransactionResponse){var G,ne=(G=this.sendTransactionResponse.errorResult)===null||G===void 0?void 0:G.result();throw ne?new H.Errors.SendFailed("Transaction simulation looked correct, but attempting to send the transaction failed. Check `simulation` and `sendTransactionResponseAll` to troubleshoot. Decoded `sendTransactionResponse.errorResultXdr`: ".concat(ne)):new H.Errors.SendResultOnly("Transaction was sent to the network, but not yet awaited. No result to show. Await transaction completion with `getTransaction(sendTransactionResponse.hash)`")}throw new Error("Sending transaction failed: ".concat(JSON.stringify(this.assembled)))}}])}();R=oe,W(oe,"Errors",{SendFailed:function(H){function G(){return P(this,G),Y(this,G,arguments)}return me(G,H),x(G)}(le(Error)),SendResultOnly:function(H){function G(){return P(this,G),Y(this,G,arguments)}return me(G,H),x(G)}(le(Error)),TransactionStillPending:function(H){function G(){return P(this,G),Y(this,G,arguments)}return me(G,H),x(G)}(le(Error))}),W(oe,"init",(re=m(I().mark(function H(G,ne){var se,he;return I().wrap(function(Le){for(;;)switch(Le.prev=Le.next){case 0:return se=new R(G,ne),Le.next=3,se.send();case 3:return he=Le.sent,Le.abrupt("return",he);case 5:case"end":return Le.stop()}},H)})),function(H,G){return re.apply(this,arguments)}));var Ee=i(8287).Buffer;function Fe(H,G,ne){return G=Qe(G),function(se,he){if(he&&(ze(he)==="object"||typeof he=="function"))return he;if(he!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Le){if(Le===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Le}(se)}(H,de()?Reflect.construct(G,ne||[],Qe(H).constructor):G.apply(H,ne))}function Oe(H,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function");H.prototype=Object.create(G&&G.prototype,{constructor:{value:H,writable:!0,configurable:!0}}),Object.defineProperty(H,"prototype",{writable:!1}),G&&we(H,G)}function $(H){var G=typeof Map=="function"?new Map:void 0;return $=function(ne){if(ne===null||!function(he){try{return Function.toString.call(he).indexOf("[native code]")!==-1}catch{return typeof he=="function"}}(ne))return ne;if(typeof ne!="function")throw new TypeError("Super expression must either be null or a function");if(G!==void 0){if(G.has(ne))return G.get(ne);G.set(ne,se)}function se(){return function(he,Le,Ie){if(de())return Reflect.construct.apply(null,arguments);var Te=[null];Te.push.apply(Te,Le);var Ce=new(he.bind.apply(he,Te));return Ie&&we(Ce,Ie.prototype),Ce}(ne,arguments,Qe(this).constructor)}return se.prototype=Object.create(ne.prototype,{constructor:{value:se,enumerable:!1,writable:!0,configurable:!0}}),we(se,ne)},$(H)}function de(){try{var H=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(de=function(){return!!H})()}function we(H,G){return we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(ne,se){return ne.__proto__=se,ne},we(H,G)}function Qe(H){return Qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)},Qe(H)}function ze(H){return ze=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},ze(H)}function We(H,G){return function(ne){if(Array.isArray(ne))return ne}(H)||function(ne,se){var he=ne==null?null:typeof Symbol<"u"&&ne[Symbol.iterator]||ne["@@iterator"];if(he!=null){var Le,Ie,Te,Ce,Ge=[],Je=!0,ft=!1;try{if(Te=(he=he.call(ne)).next,se===0){if(Object(he)!==he)return;Je=!1}else for(;!(Je=(Le=Te.call(he)).done)&&(Ge.push(Le.value),Ge.length!==se);Je=!0);}catch(gt){ft=!0,Ie=gt}finally{try{if(!Je&&he.return!=null&&(Ce=he.return(),Object(Ce)!==Ce))return}finally{if(ft)throw Ie}}return Ge}}(H,G)||Re(H,G)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
27
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function et(H,G){var ne=typeof Symbol<"u"&&H[Symbol.iterator]||H["@@iterator"];if(!ne){if(Array.isArray(H)||(ne=Re(H))||G&&H&&typeof H.length=="number"){ne&&(H=ne);var se=0,he=function(){};return{s:he,n:function(){return se>=H.length?{done:!0}:{done:!1,value:H[se++]}},e:function(Ce){throw Ce},f:he}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
28
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Le,Ie=!0,Te=!1;return{s:function(){ne=ne.call(H)},n:function(){var Ce=ne.next();return Ie=Ce.done,Ce},e:function(Ce){Te=!0,Le=Ce},f:function(){try{Ie||ne.return==null||ne.return()}finally{if(Te)throw Le}}}}function Be(H){return function(G){if(Array.isArray(G))return $e(G)}(H)||function(G){if(typeof Symbol<"u"&&G[Symbol.iterator]!=null||G["@@iterator"]!=null)return Array.from(G)}(H)||Re(H)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
29
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Re(H,G){if(H){if(typeof H=="string")return $e(H,G);var ne=Object.prototype.toString.call(H).slice(8,-1);return ne==="Object"&&H.constructor&&(ne=H.constructor.name),ne==="Map"||ne==="Set"?Array.from(H):ne==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ne)?$e(H,G):void 0}}function $e(H,G){(G==null||G>H.length)&&(G=H.length);for(var ne=0,se=new Array(G);ne<G;ne++)se[ne]=H[ne];return se}function ve(){ve=function(){return G};var H,G={},ne=Object.prototype,se=ne.hasOwnProperty,he=Object.defineProperty||function(fe,Se,Ue){fe[Se]=Ue.value},Le=typeof Symbol=="function"?Symbol:{},Ie=Le.iterator||"@@iterator",Te=Le.asyncIterator||"@@asyncIterator",Ce=Le.toStringTag||"@@toStringTag";function Ge(fe,Se,Ue){return Object.defineProperty(fe,Se,{value:Ue,enumerable:!0,configurable:!0,writable:!0}),fe[Se]}try{Ge({},"")}catch{Ge=function(Se,Ue,mt){return Se[Ue]=mt}}function Je(fe,Se,Ue,mt){var qe=Se&&Se.prototype instanceof ir?Se:ir,Ut=Object.create(qe.prototype),Zt=new Lr(mt||[]);return he(Ut,"_invoke",{value:er(fe,Ue,Zt)}),Ut}function ft(fe,Se,Ue){try{return{type:"normal",arg:fe.call(Se,Ue)}}catch(mt){return{type:"throw",arg:mt}}}G.wrap=Je;var gt="suspendedStart",Nt="suspendedYield",Vt="executing",Gt="completed",Ye={};function ir(){}function or(){}function sr(){}var pr={};Ge(pr,Ie,function(){return this});var Er=Object.getPrototypeOf,hr=Er&&Er(Er(Mt([])));hr&&hr!==ne&&se.call(hr,Ie)&&(pr=hr);var br=sr.prototype=ir.prototype=Object.create(pr);function ur(fe){["next","throw","return"].forEach(function(Se){Ge(fe,Se,function(Ue){return this._invoke(Se,Ue)})})}function ee(fe,Se){function Ue(qe,Ut,Zt,dr){var fr=ft(fe[qe],fe,Ut);if(fr.type!=="throw"){var Vr=fr.arg,Wr=Vr.value;return Wr&&ze(Wr)=="object"&&se.call(Wr,"__await")?Se.resolve(Wr.__await).then(function(Nr){Ue("next",Nr,Zt,dr)},function(Nr){Ue("throw",Nr,Zt,dr)}):Se.resolve(Wr).then(function(Nr){Vr.value=Nr,Zt(Vr)},function(Nr){return Ue("throw",Nr,Zt,dr)})}dr(fr.arg)}var mt;he(this,"_invoke",{value:function(qe,Ut){function Zt(){return new Se(function(dr,fr){Ue(qe,Ut,dr,fr)})}return mt=mt?mt.then(Zt,Zt):Zt()}})}function er(fe,Se,Ue){var mt=gt;return function(qe,Ut){if(mt===Vt)throw Error("Generator is already running");if(mt===Gt){if(qe==="throw")throw Ut;return{value:H,done:!0}}for(Ue.method=qe,Ue.arg=Ut;;){var Zt=Ue.delegate;if(Zt){var dr=wr(Zt,Ue);if(dr){if(dr===Ye)continue;return dr}}if(Ue.method==="next")Ue.sent=Ue._sent=Ue.arg;else if(Ue.method==="throw"){if(mt===gt)throw mt=Gt,Ue.arg;Ue.dispatchException(Ue.arg)}else Ue.method==="return"&&Ue.abrupt("return",Ue.arg);mt=Vt;var fr=ft(fe,Se,Ue);if(fr.type==="normal"){if(mt=Ue.done?Gt:Nt,fr.arg===Ye)continue;return{value:fr.arg,done:Ue.done}}fr.type==="throw"&&(mt=Gt,Ue.method="throw",Ue.arg=fr.arg)}}}function wr(fe,Se){var Ue=Se.method,mt=fe.iterator[Ue];if(mt===H)return Se.delegate=null,Ue==="throw"&&fe.iterator.return&&(Se.method="return",Se.arg=H,wr(fe,Se),Se.method==="throw")||Ue!=="return"&&(Se.method="throw",Se.arg=new TypeError("The iterator does not provide a '"+Ue+"' method")),Ye;var qe=ft(mt,fe.iterator,Se.arg);if(qe.type==="throw")return Se.method="throw",Se.arg=qe.arg,Se.delegate=null,Ye;var Ut=qe.arg;return Ut?Ut.done?(Se[fe.resultName]=Ut.value,Se.next=fe.nextLoc,Se.method!=="return"&&(Se.method="next",Se.arg=H),Se.delegate=null,Ye):Ut:(Se.method="throw",Se.arg=new TypeError("iterator result is not an object"),Se.delegate=null,Ye)}function Pr(fe){var Se={tryLoc:fe[0]};1 in fe&&(Se.catchLoc=fe[1]),2 in fe&&(Se.finallyLoc=fe[2],Se.afterLoc=fe[3]),this.tryEntries.push(Se)}function jr(fe){var Se=fe.completion||{};Se.type="normal",delete Se.arg,fe.completion=Se}function Lr(fe){this.tryEntries=[{tryLoc:"root"}],fe.forEach(Pr,this),this.reset(!0)}function Mt(fe){if(fe||fe===""){var Se=fe[Ie];if(Se)return Se.call(fe);if(typeof fe.next=="function")return fe;if(!isNaN(fe.length)){var Ue=-1,mt=function qe(){for(;++Ue<fe.length;)if(se.call(fe,Ue))return qe.value=fe[Ue],qe.done=!1,qe;return qe.value=H,qe.done=!0,qe};return mt.next=mt}}throw new TypeError(ze(fe)+" is not iterable")}return or.prototype=sr,he(br,"constructor",{value:sr,configurable:!0}),he(sr,"constructor",{value:or,configurable:!0}),or.displayName=Ge(sr,Ce,"GeneratorFunction"),G.isGeneratorFunction=function(fe){var Se=typeof fe=="function"&&fe.constructor;return!!Se&&(Se===or||(Se.displayName||Se.name)==="GeneratorFunction")},G.mark=function(fe){return Object.setPrototypeOf?Object.setPrototypeOf(fe,sr):(fe.__proto__=sr,Ge(fe,Ce,"GeneratorFunction")),fe.prototype=Object.create(br),fe},G.awrap=function(fe){return{__await:fe}},ur(ee.prototype),Ge(ee.prototype,Te,function(){return this}),G.AsyncIterator=ee,G.async=function(fe,Se,Ue,mt,qe){qe===void 0&&(qe=Promise);var Ut=new ee(Je(fe,Se,Ue,mt),qe);return G.isGeneratorFunction(Se)?Ut:Ut.next().then(function(Zt){return Zt.done?Zt.value:Ut.next()})},ur(br),Ge(br,Ce,"Generator"),Ge(br,Ie,function(){return this}),Ge(br,"toString",function(){return"[object Generator]"}),G.keys=function(fe){var Se=Object(fe),Ue=[];for(var mt in Se)Ue.push(mt);return Ue.reverse(),function qe(){for(;Ue.length;){var Ut=Ue.pop();if(Ut in Se)return qe.value=Ut,qe.done=!1,qe}return qe.done=!0,qe}},G.values=Mt,Lr.prototype={constructor:Lr,reset:function(fe){if(this.prev=0,this.next=0,this.sent=this._sent=H,this.done=!1,this.delegate=null,this.method="next",this.arg=H,this.tryEntries.forEach(jr),!fe)for(var Se in this)Se.charAt(0)==="t"&&se.call(this,Se)&&!isNaN(+Se.slice(1))&&(this[Se]=H)},stop:function(){this.done=!0;var fe=this.tryEntries[0].completion;if(fe.type==="throw")throw fe.arg;return this.rval},dispatchException:function(fe){if(this.done)throw fe;var Se=this;function Ue(fr,Vr){return Ut.type="throw",Ut.arg=fe,Se.next=fr,Vr&&(Se.method="next",Se.arg=H),!!Vr}for(var mt=this.tryEntries.length-1;mt>=0;--mt){var qe=this.tryEntries[mt],Ut=qe.completion;if(qe.tryLoc==="root")return Ue("end");if(qe.tryLoc<=this.prev){var Zt=se.call(qe,"catchLoc"),dr=se.call(qe,"finallyLoc");if(Zt&&dr){if(this.prev<qe.catchLoc)return Ue(qe.catchLoc,!0);if(this.prev<qe.finallyLoc)return Ue(qe.finallyLoc)}else if(Zt){if(this.prev<qe.catchLoc)return Ue(qe.catchLoc,!0)}else{if(!dr)throw Error("try statement without catch or finally");if(this.prev<qe.finallyLoc)return Ue(qe.finallyLoc)}}}},abrupt:function(fe,Se){for(var Ue=this.tryEntries.length-1;Ue>=0;--Ue){var mt=this.tryEntries[Ue];if(mt.tryLoc<=this.prev&&se.call(mt,"finallyLoc")&&this.prev<mt.finallyLoc){var qe=mt;break}}qe&&(fe==="break"||fe==="continue")&&qe.tryLoc<=Se&&Se<=qe.finallyLoc&&(qe=null);var Ut=qe?qe.completion:{};return Ut.type=fe,Ut.arg=Se,qe?(this.method="next",this.next=qe.finallyLoc,Ye):this.complete(Ut)},complete:function(fe,Se){if(fe.type==="throw")throw fe.arg;return fe.type==="break"||fe.type==="continue"?this.next=fe.arg:fe.type==="return"?(this.rval=this.arg=fe.arg,this.method="return",this.next="end"):fe.type==="normal"&&Se&&(this.next=Se),Ye},finish:function(fe){for(var Se=this.tryEntries.length-1;Se>=0;--Se){var Ue=this.tryEntries[Se];if(Ue.finallyLoc===fe)return this.complete(Ue.completion,Ue.afterLoc),jr(Ue),Ye}},catch:function(fe){for(var Se=this.tryEntries.length-1;Se>=0;--Se){var Ue=this.tryEntries[Se];if(Ue.tryLoc===fe){var mt=Ue.completion;if(mt.type==="throw"){var qe=mt.arg;jr(Ue)}return qe}}throw Error("illegal catch attempt")},delegateYield:function(fe,Se,Ue){return this.delegate={iterator:Mt(fe),resultName:Se,nextLoc:Ue},this.method==="next"&&(this.arg=H),Ye}},G}function ue(H,G,ne,se,he,Le,Ie){try{var Te=H[Le](Ie),Ce=Te.value}catch(Ge){return void ne(Ge)}Te.done?G(Ce):Promise.resolve(Ce).then(se,he)}function c(H){return function(){var G=this,ne=arguments;return new Promise(function(se,he){var Le=H.apply(G,ne);function Ie(Ce){ue(Le,se,he,Ie,Te,"next",Ce)}function Te(Ce){ue(Le,se,he,Ie,Te,"throw",Ce)}Ie(void 0)})}}function y(H,G){if(!(H instanceof G))throw new TypeError("Cannot call a class as a function")}function v(H,G){for(var ne=0;ne<G.length;ne++){var se=G[ne];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(H,h(se.key),se)}}function B(H,G,ne){return G&&v(H.prototype,G),ne&&v(H,ne),Object.defineProperty(H,"prototype",{writable:!1}),H}function O(H,G,ne){return(G=h(G))in H?Object.defineProperty(H,G,{value:ne,enumerable:!0,configurable:!0,writable:!0}):H[G]=ne,H}function h(H){var G=function(ne,se){if(ze(ne)!="object"||!ne)return ne;var he=ne[Symbol.toPrimitive];if(he!==void 0){var Le=he.call(ne,se||"default");if(ze(Le)!="object")return Le;throw new TypeError("@@toPrimitive must return a primitive value.")}return(se==="string"?String:Number)(ne)}(H,"string");return ze(G)=="symbol"?G:G+""}var k="GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF",U=function(){function H(ne){var se,he,Le=this;y(this,H),O(this,"simulate",c(ve().mark(function Ie(){return ve().wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:if(Le.raw){Te.next=2;break}throw new Error("Transaction has not yet been assembled; call `AssembledTransaction.build` first.");case 2:return Le.built=Le.raw.build(),Te.next=5,Le.server.simulateTransaction(Le.built);case 5:return Le.simulation=Te.sent,u.j.isSimulationSuccess(Le.simulation)&&(Le.built=(0,r.X)(Le.built,Le.simulation).build()),Te.abrupt("return",Le);case 8:case"end":return Te.stop()}},Ie)}))),O(this,"signAndSend",c(ve().mark(function Ie(){var Te,Ce,Ge,Je,ft,gt,Nt,Vt=arguments;return ve().wrap(function(Gt){for(;;)switch(Gt.prev=Gt.next){case 0:if(Ce=(Te=Vt.length>0&&Vt[0]!==void 0?Vt[0]:{}).force,Ge=Ce!==void 0&&Ce,Je=Te.signTransaction,ft=Je===void 0?Le.options.signTransaction:Je,Le.built){Gt.next=3;break}throw new Error("Transaction has not yet been simulated");case 3:if(Ge||!Le.isReadCall){Gt.next=5;break}throw new H.Errors.NoSignatureNeeded("This is a read call. It requires no signature or sending. Use `force: true` to sign and send anyway.");case 5:if(ft){Gt.next=7;break}throw new H.Errors.NoSigner("You must provide a signTransaction function, either when calling `signAndSend` or when initializing your Client");case 7:if(!Le.needsNonInvokerSigningBy().length){Gt.next=9;break}throw new H.Errors.NeedsMoreSignatures("Transaction requires more signatures. See `needsNonInvokerSigningBy` for details.");case 9:return gt=Le,Gt.next=12,oe.init(ft,gt);case 12:return Nt=Gt.sent,Gt.abrupt("return",Nt);case 14:case"end":return Gt.stop()}},Ie)}))),O(this,"getStorageExpiration",c(ve().mark(function Ie(){var Te;return ve().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:return Ce.next=2,Le.server.getLedgerEntries(new s.Contract(Le.options.contractId).getFootprint());case 2:if((Te=Ce.sent).entries&&Te.entries.length&&Te.entries[0].liveUntilLedgerSeq){Ce.next=5;break}throw new Error("failed to get ledger entry");case 5:return Ce.abrupt("return",Te.entries[0].liveUntilLedgerSeq);case 6:case"end":return Ce.stop()}},Ie)}))),O(this,"needsNonInvokerSigningBy",function(){var Ie,Te=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).includeAlreadySigned,Ce=Te!==void 0&&Te;if(!Le.built)throw new Error("Transaction has not yet been simulated");if(!("operations"in Le.built))throw new Error("Unexpected Transaction type; no operations: ".concat(JSON.stringify(Le.built)));var Ge=Le.built.operations[0];return Be(new Set(((Ie=Ge.auth)!==null&&Ie!==void 0?Ie:[]).filter(function(Je){return Je.credentials().switch()===s.xdr.SorobanCredentialsType.sorobanCredentialsAddress()&&(Ce||Je.credentials().address().signature().switch().name==="scvVoid")}).map(function(Je){return s.StrKey.encodeEd25519PublicKey(Je.credentials().address().address().accountId().ed25519())})))}),O(this,"signAuthEntries",c(ve().mark(function Ie(){var Te,Ce,Ge,Je,ft,gt,Nt,Vt,Gt,Ye,ir,or,sr,pr,Er,hr,br=arguments;return ve().wrap(function(ur){for(;;)switch(ur.prev=ur.next){case 0:if(Ge=(Ce=br.length>0&&br[0]!==void 0?br[0]:{}).expiration,Je=Ge===void 0?Le.getStorageExpiration():Ge,ft=Ce.signAuthEntry,gt=ft===void 0?Le.options.signAuthEntry:ft,Nt=Ce.publicKey,Vt=Nt===void 0?Le.options.publicKey:Nt,Le.built){ur.next=3;break}throw new Error("Transaction has not yet been assembled or simulated");case 3:if(Gt=Le.needsNonInvokerSigningBy()){ur.next=6;break}throw new H.Errors.NoUnsignedNonInvokerAuthEntries("No unsigned non-invoker auth entries; maybe you already signed?");case 6:if(Gt.indexOf(Vt??"")!==-1){ur.next=8;break}throw new H.Errors.NoSignatureNeeded('No auth entries for public key "'.concat(Vt,'"'));case 8:if(gt){ur.next=10;break}throw new H.Errors.NoSigner("You must provide `signAuthEntry` when calling `signAuthEntries`, or when constructing the `Client` or `AssembledTransaction`");case 10:Ye=Le.built.operations[0],ir=(Te=Ye.auth)!==null&&Te!==void 0?Te:[],or=et(ir.entries()),ur.prev=13,or.s();case 15:if((sr=or.n()).done){ur.next=34;break}if(pr=We(sr.value,2),Er=pr[0],(hr=pr[1]).credentials().switch()===s.xdr.SorobanCredentialsType.sorobanCredentialsAddress()){ur.next=19;break}return ur.abrupt("continue",32);case 19:if(s.StrKey.encodeEd25519PublicKey(hr.credentials().address().address().accountId().ed25519())===Vt){ur.next=22;break}return ur.abrupt("continue",32);case 22:return ur.t0=s.authorizeEntry,ur.t1=hr,ur.t2=function(){var ee=c(ve().mark(function er(wr){return ve().wrap(function(Pr){for(;;)switch(Pr.prev=Pr.next){case 0:return Pr.t0=Ee,Pr.next=3,gt(wr.toXDR("base64"));case 3:return Pr.t1=Pr.sent,Pr.abrupt("return",Pr.t0.from.call(Pr.t0,Pr.t1,"base64"));case 5:case"end":return Pr.stop()}},er)}));return function(er){return ee.apply(this,arguments)}}(),ur.next=27,Je;case 27:return ur.t3=ur.sent,ur.t4=Le.options.networkPassphrase,ur.next=31,(0,ur.t0)(ur.t1,ur.t2,ur.t3,ur.t4);case 31:ir[Er]=ur.sent;case 32:ur.next=15;break;case 34:ur.next=39;break;case 36:ur.prev=36,ur.t5=ur.catch(13),or.e(ur.t5);case 39:return ur.prev=39,or.f(),ur.finish(39);case 42:case"end":return ur.stop()}},Ie,null,[[13,36,39,42]])}))),this.options=ne,this.options.simulate=(se=this.options.simulate)===null||se===void 0||se,this.server=new f.gq(this.options.rpcUrl,{allowHttp:(he=this.options.allowHttp)!==null&&he!==void 0&&he})}return B(H,[{key:"toJSON",value:function(){var ne;return JSON.stringify({method:this.options.method,tx:(ne=this.built)===null||ne===void 0?void 0:ne.toXDR(),simulationResult:{auth:this.simulationData.result.auth.map(function(se){return se.toXDR("base64")}),retval:this.simulationData.result.retval.toXDR("base64")},simulationTransactionData:this.simulationData.transactionData.toXDR("base64")})}},{key:"simulationData",get:function(){if(this.simulationResult&&this.simulationTransactionData)return{result:this.simulationResult,transactionData:this.simulationTransactionData};var ne=this.simulation;if(!ne)throw new H.Errors.NotYetSimulated("Transaction has not yet been simulated");if(u.j.isSimulationError(ne))throw new Error('Transaction simulation failed: "'.concat(ne.error,'"'));if(u.j.isSimulationRestore(ne))throw new H.Errors.ExpiredState("You need to restore some contract state before you can invoke this method. ".concat(JSON.stringify(ne,null,2)));if(!ne.result)throw new Error("Expected an invocation simulation, but got no 'result' field. Simulation: ".concat(JSON.stringify(ne,null,2)));return this.simulationResult=ne.result,this.simulationTransactionData=ne.transactionData.build(),{result:this.simulationResult,transactionData:this.simulationTransactionData}}},{key:"result",get:function(){try{return this.options.parseResultXdr(this.simulationData.result.retval)}catch(he){if(L(se=he)!=="object"||se===null||!("toString"in se))throw he;var ne=this.parseError(he.toString());if(ne)return ne;throw he}var se}},{key:"parseError",value:function(ne){if(this.options.errorTypes){var se=ne.match(j);if(se){var he=parseInt(se[1],10),Le=this.options.errorTypes[he];if(Le)return new p(Le)}}}},{key:"isReadCall",get:function(){var ne=this.simulationData.result.auth.length,se=this.simulationData.transactionData.resources().footprint().readWrite().length;return ne===0&&se===0}}],[{key:"fromJSON",value:function(ne,se){var he=se.tx,Le=se.simulationResult,Ie=se.simulationTransactionData,Te=new H(ne);return Te.built=s.TransactionBuilder.fromXDR(he,ne.networkPassphrase),Te.simulationResult={auth:Le.auth.map(function(Ce){return s.xdr.SorobanAuthorizationEntry.fromXDR(Ce,"base64")}),retval:s.xdr.ScVal.fromXDR(Le.retval,"base64")},Te.simulationTransactionData=s.xdr.SorobanTransactionData.fromXDR(Ie,"base64"),Te}},{key:"build",value:(G=c(ve().mark(function ne(se){var he,Le,Ie,Te,Ce,Ge;return ve().wrap(function(Je){for(;;)switch(Je.prev=Je.next){case 0:if(Te=new H(se),Ce=new s.Contract(se.contractId),!se.publicKey){Je.next=8;break}return Je.next=5,Te.server.getAccount(se.publicKey);case 5:Je.t0=Je.sent,Je.next=9;break;case 8:Je.t0=new s.Account(k,"0");case 9:if(Ge=Je.t0,Te.raw=new s.TransactionBuilder(Ge,{fee:(he=se.fee)!==null&&he!==void 0?he:s.BASE_FEE,networkPassphrase:se.networkPassphrase}).addOperation(Ce.call.apply(Ce,[se.method].concat(Be((Le=se.args)!==null&&Le!==void 0?Le:[])))).setTimeout((Ie=se.timeoutInSeconds)!==null&&Ie!==void 0?Ie:300),!se.simulate){Je.next=14;break}return Je.next=14,Te.simulate();case 14:return Je.abrupt("return",Te);case 15:case"end":return Je.stop()}},ne)})),function(ne){return G.apply(this,arguments)})}]);var G}();O(U,"Errors",{ExpiredState:function(H){function G(){return y(this,G),Fe(this,G,arguments)}return Oe(G,H),B(G)}($(Error)),NeedsMoreSignatures:function(H){function G(){return y(this,G),Fe(this,G,arguments)}return Oe(G,H),B(G)}($(Error)),NoSignatureNeeded:function(H){function G(){return y(this,G),Fe(this,G,arguments)}return Oe(G,H),B(G)}($(Error)),NoUnsignedNonInvokerAuthEntries:function(H){function G(){return y(this,G),Fe(this,G,arguments)}return Oe(G,H),B(G)}($(Error)),NoSigner:function(H){function G(){return y(this,G),Fe(this,G,arguments)}return Oe(G,H),B(G)}($(Error)),NotYetSimulated:function(H){function G(){return y(this,G),Fe(this,G,arguments)}return Oe(G,H),B(G)}($(Error)),FakeAccount:function(H){function G(){return y(this,G),Fe(this,G,arguments)}return Oe(G,H),B(G)}($(Error))});var M=i(8287).Buffer;function J(H){return J=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},J(H)}function pe(){pe=function(){return G};var H,G={},ne=Object.prototype,se=ne.hasOwnProperty,he=Object.defineProperty||function(fe,Se,Ue){fe[Se]=Ue.value},Le=typeof Symbol=="function"?Symbol:{},Ie=Le.iterator||"@@iterator",Te=Le.asyncIterator||"@@asyncIterator",Ce=Le.toStringTag||"@@toStringTag";function Ge(fe,Se,Ue){return Object.defineProperty(fe,Se,{value:Ue,enumerable:!0,configurable:!0,writable:!0}),fe[Se]}try{Ge({},"")}catch{Ge=function(Se,Ue,mt){return Se[Ue]=mt}}function Je(fe,Se,Ue,mt){var qe=Se&&Se.prototype instanceof ir?Se:ir,Ut=Object.create(qe.prototype),Zt=new Lr(mt||[]);return he(Ut,"_invoke",{value:er(fe,Ue,Zt)}),Ut}function ft(fe,Se,Ue){try{return{type:"normal",arg:fe.call(Se,Ue)}}catch(mt){return{type:"throw",arg:mt}}}G.wrap=Je;var gt="suspendedStart",Nt="suspendedYield",Vt="executing",Gt="completed",Ye={};function ir(){}function or(){}function sr(){}var pr={};Ge(pr,Ie,function(){return this});var Er=Object.getPrototypeOf,hr=Er&&Er(Er(Mt([])));hr&&hr!==ne&&se.call(hr,Ie)&&(pr=hr);var br=sr.prototype=ir.prototype=Object.create(pr);function ur(fe){["next","throw","return"].forEach(function(Se){Ge(fe,Se,function(Ue){return this._invoke(Se,Ue)})})}function ee(fe,Se){function Ue(qe,Ut,Zt,dr){var fr=ft(fe[qe],fe,Ut);if(fr.type!=="throw"){var Vr=fr.arg,Wr=Vr.value;return Wr&&J(Wr)=="object"&&se.call(Wr,"__await")?Se.resolve(Wr.__await).then(function(Nr){Ue("next",Nr,Zt,dr)},function(Nr){Ue("throw",Nr,Zt,dr)}):Se.resolve(Wr).then(function(Nr){Vr.value=Nr,Zt(Vr)},function(Nr){return Ue("throw",Nr,Zt,dr)})}dr(fr.arg)}var mt;he(this,"_invoke",{value:function(qe,Ut){function Zt(){return new Se(function(dr,fr){Ue(qe,Ut,dr,fr)})}return mt=mt?mt.then(Zt,Zt):Zt()}})}function er(fe,Se,Ue){var mt=gt;return function(qe,Ut){if(mt===Vt)throw Error("Generator is already running");if(mt===Gt){if(qe==="throw")throw Ut;return{value:H,done:!0}}for(Ue.method=qe,Ue.arg=Ut;;){var Zt=Ue.delegate;if(Zt){var dr=wr(Zt,Ue);if(dr){if(dr===Ye)continue;return dr}}if(Ue.method==="next")Ue.sent=Ue._sent=Ue.arg;else if(Ue.method==="throw"){if(mt===gt)throw mt=Gt,Ue.arg;Ue.dispatchException(Ue.arg)}else Ue.method==="return"&&Ue.abrupt("return",Ue.arg);mt=Vt;var fr=ft(fe,Se,Ue);if(fr.type==="normal"){if(mt=Ue.done?Gt:Nt,fr.arg===Ye)continue;return{value:fr.arg,done:Ue.done}}fr.type==="throw"&&(mt=Gt,Ue.method="throw",Ue.arg=fr.arg)}}}function wr(fe,Se){var Ue=Se.method,mt=fe.iterator[Ue];if(mt===H)return Se.delegate=null,Ue==="throw"&&fe.iterator.return&&(Se.method="return",Se.arg=H,wr(fe,Se),Se.method==="throw")||Ue!=="return"&&(Se.method="throw",Se.arg=new TypeError("The iterator does not provide a '"+Ue+"' method")),Ye;var qe=ft(mt,fe.iterator,Se.arg);if(qe.type==="throw")return Se.method="throw",Se.arg=qe.arg,Se.delegate=null,Ye;var Ut=qe.arg;return Ut?Ut.done?(Se[fe.resultName]=Ut.value,Se.next=fe.nextLoc,Se.method!=="return"&&(Se.method="next",Se.arg=H),Se.delegate=null,Ye):Ut:(Se.method="throw",Se.arg=new TypeError("iterator result is not an object"),Se.delegate=null,Ye)}function Pr(fe){var Se={tryLoc:fe[0]};1 in fe&&(Se.catchLoc=fe[1]),2 in fe&&(Se.finallyLoc=fe[2],Se.afterLoc=fe[3]),this.tryEntries.push(Se)}function jr(fe){var Se=fe.completion||{};Se.type="normal",delete Se.arg,fe.completion=Se}function Lr(fe){this.tryEntries=[{tryLoc:"root"}],fe.forEach(Pr,this),this.reset(!0)}function Mt(fe){if(fe||fe===""){var Se=fe[Ie];if(Se)return Se.call(fe);if(typeof fe.next=="function")return fe;if(!isNaN(fe.length)){var Ue=-1,mt=function qe(){for(;++Ue<fe.length;)if(se.call(fe,Ue))return qe.value=fe[Ue],qe.done=!1,qe;return qe.value=H,qe.done=!0,qe};return mt.next=mt}}throw new TypeError(J(fe)+" is not iterable")}return or.prototype=sr,he(br,"constructor",{value:sr,configurable:!0}),he(sr,"constructor",{value:or,configurable:!0}),or.displayName=Ge(sr,Ce,"GeneratorFunction"),G.isGeneratorFunction=function(fe){var Se=typeof fe=="function"&&fe.constructor;return!!Se&&(Se===or||(Se.displayName||Se.name)==="GeneratorFunction")},G.mark=function(fe){return Object.setPrototypeOf?Object.setPrototypeOf(fe,sr):(fe.__proto__=sr,Ge(fe,Ce,"GeneratorFunction")),fe.prototype=Object.create(br),fe},G.awrap=function(fe){return{__await:fe}},ur(ee.prototype),Ge(ee.prototype,Te,function(){return this}),G.AsyncIterator=ee,G.async=function(fe,Se,Ue,mt,qe){qe===void 0&&(qe=Promise);var Ut=new ee(Je(fe,Se,Ue,mt),qe);return G.isGeneratorFunction(Se)?Ut:Ut.next().then(function(Zt){return Zt.done?Zt.value:Ut.next()})},ur(br),Ge(br,Ce,"Generator"),Ge(br,Ie,function(){return this}),Ge(br,"toString",function(){return"[object Generator]"}),G.keys=function(fe){var Se=Object(fe),Ue=[];for(var mt in Se)Ue.push(mt);return Ue.reverse(),function qe(){for(;Ue.length;){var Ut=Ue.pop();if(Ut in Se)return qe.value=Ut,qe.done=!1,qe}return qe.done=!0,qe}},G.values=Mt,Lr.prototype={constructor:Lr,reset:function(fe){if(this.prev=0,this.next=0,this.sent=this._sent=H,this.done=!1,this.delegate=null,this.method="next",this.arg=H,this.tryEntries.forEach(jr),!fe)for(var Se in this)Se.charAt(0)==="t"&&se.call(this,Se)&&!isNaN(+Se.slice(1))&&(this[Se]=H)},stop:function(){this.done=!0;var fe=this.tryEntries[0].completion;if(fe.type==="throw")throw fe.arg;return this.rval},dispatchException:function(fe){if(this.done)throw fe;var Se=this;function Ue(fr,Vr){return Ut.type="throw",Ut.arg=fe,Se.next=fr,Vr&&(Se.method="next",Se.arg=H),!!Vr}for(var mt=this.tryEntries.length-1;mt>=0;--mt){var qe=this.tryEntries[mt],Ut=qe.completion;if(qe.tryLoc==="root")return Ue("end");if(qe.tryLoc<=this.prev){var Zt=se.call(qe,"catchLoc"),dr=se.call(qe,"finallyLoc");if(Zt&&dr){if(this.prev<qe.catchLoc)return Ue(qe.catchLoc,!0);if(this.prev<qe.finallyLoc)return Ue(qe.finallyLoc)}else if(Zt){if(this.prev<qe.catchLoc)return Ue(qe.catchLoc,!0)}else{if(!dr)throw Error("try statement without catch or finally");if(this.prev<qe.finallyLoc)return Ue(qe.finallyLoc)}}}},abrupt:function(fe,Se){for(var Ue=this.tryEntries.length-1;Ue>=0;--Ue){var mt=this.tryEntries[Ue];if(mt.tryLoc<=this.prev&&se.call(mt,"finallyLoc")&&this.prev<mt.finallyLoc){var qe=mt;break}}qe&&(fe==="break"||fe==="continue")&&qe.tryLoc<=Se&&Se<=qe.finallyLoc&&(qe=null);var Ut=qe?qe.completion:{};return Ut.type=fe,Ut.arg=Se,qe?(this.method="next",this.next=qe.finallyLoc,Ye):this.complete(Ut)},complete:function(fe,Se){if(fe.type==="throw")throw fe.arg;return fe.type==="break"||fe.type==="continue"?this.next=fe.arg:fe.type==="return"?(this.rval=this.arg=fe.arg,this.method="return",this.next="end"):fe.type==="normal"&&Se&&(this.next=Se),Ye},finish:function(fe){for(var Se=this.tryEntries.length-1;Se>=0;--Se){var Ue=this.tryEntries[Se];if(Ue.finallyLoc===fe)return this.complete(Ue.completion,Ue.afterLoc),jr(Ue),Ye}},catch:function(fe){for(var Se=this.tryEntries.length-1;Se>=0;--Se){var Ue=this.tryEntries[Se];if(Ue.tryLoc===fe){var mt=Ue.completion;if(mt.type==="throw"){var qe=mt.arg;jr(Ue)}return qe}}throw Error("illegal catch attempt")},delegateYield:function(fe,Se,Ue){return this.delegate={iterator:Mt(fe),resultName:Se,nextLoc:Ue},this.method==="next"&&(this.arg=H),Ye}},G}function Ne(H,G,ne,se,he,Le,Ie){try{var Te=H[Le](Ie),Ce=Te.value}catch(Ge){return void ne(Ge)}Te.done?G(Ce):Promise.resolve(Ce).then(se,he)}function tt(H){return function(){var G=this,ne=arguments;return new Promise(function(se,he){var Le=H.apply(G,ne);function Ie(Ce){Ne(Le,se,he,Ie,Te,"next",Ce)}function Te(Ce){Ne(Le,se,he,Ie,Te,"throw",Ce)}Ie(void 0)})}}var bt=function(H,G){return{signTransaction:(se=tt(pe().mark(function he(Le){var Ie;return pe().wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:return(Ie=s.TransactionBuilder.fromXDR(Le,G)).sign(H),Te.abrupt("return",Ie.toXDR());case 3:case"end":return Te.stop()}},he)})),function(he){return se.apply(this,arguments)}),signAuthEntry:(ne=tt(pe().mark(function he(Le){return pe().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return Ie.abrupt("return",H.sign((0,s.hash)(M.from(Le,"base64"))).toString("base64"));case 1:case"end":return Ie.stop()}},he)})),function(he){return ne.apply(this,arguments)})};var ne,se},Ot=i(8287).Buffer;function Ft(H,G){var ne=Object.keys(H);if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(H);G&&(se=se.filter(function(he){return Object.getOwnPropertyDescriptor(H,he).enumerable})),ne.push.apply(ne,se)}return ne}function Yt(H){for(var G=1;G<arguments.length;G++){var ne=arguments[G]!=null?arguments[G]:{};G%2?Ft(Object(ne),!0).forEach(function(se){Xe(H,se,ne[se])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(ne)):Ft(Object(ne)).forEach(function(se){Object.defineProperty(H,se,Object.getOwnPropertyDescriptor(ne,se))})}return H}function yr(H,G){var ne=typeof Symbol<"u"&&H[Symbol.iterator]||H["@@iterator"];if(!ne){if(Array.isArray(H)||(ne=ct(H))||G&&H&&typeof H.length=="number"){ne&&(H=ne);var se=0,he=function(){};return{s:he,n:function(){return se>=H.length?{done:!0}:{done:!1,value:H[se++]}},e:function(Ce){throw Ce},f:he}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
30
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Le,Ie=!0,Te=!1;return{s:function(){ne=ne.call(H)},n:function(){var Ce=ne.next();return Ie=Ce.done,Ce},e:function(Ce){Te=!0,Le=Ce},f:function(){try{Ie||ne.return==null||ne.return()}finally{if(Te)throw Le}}}}function je(H){return je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},je(H)}function De(H,G){for(var ne=0;ne<G.length;ne++){var se=G[ne];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(H,ie(se.key),se)}}function Xe(H,G,ne){return(G=ie(G))in H?Object.defineProperty(H,G,{value:ne,enumerable:!0,configurable:!0,writable:!0}):H[G]=ne,H}function ie(H){var G=function(ne,se){if(je(ne)!="object"||!ne)return ne;var he=ne[Symbol.toPrimitive];if(he!==void 0){var Le=he.call(ne,se||"default");if(je(Le)!="object")return Le;throw new TypeError("@@toPrimitive must return a primitive value.")}return(se==="string"?String:Number)(ne)}(H,"string");return je(G)=="symbol"?G:G+""}function Pe(H,G){return function(ne){if(Array.isArray(ne))return ne}(H)||function(ne,se){var he=ne==null?null:typeof Symbol<"u"&&ne[Symbol.iterator]||ne["@@iterator"];if(he!=null){var Le,Ie,Te,Ce,Ge=[],Je=!0,ft=!1;try{if(Te=(he=he.call(ne)).next,se===0){if(Object(he)!==he)return;Je=!1}else for(;!(Je=(Le=Te.call(he)).done)&&(Ge.push(Le.value),Ge.length!==se);Je=!0);}catch(gt){ft=!0,Ie=gt}finally{try{if(!Je&&he.return!=null&&(Ce=he.return(),Object(Ce)!==Ce))return}finally{if(ft)throw Ie}}return Ge}}(H,G)||ct(H,G)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
31
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ct(H,G){if(H){if(typeof H=="string")return dt(H,G);var ne=Object.prototype.toString.call(H).slice(8,-1);return ne==="Object"&&H.constructor&&(ne=H.constructor.name),ne==="Map"||ne==="Set"?Array.from(H):ne==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ne)?dt(H,G):void 0}}function dt(H,G){(G==null||G>H.length)&&(G=H.length);for(var ne=0,se=new Array(G);ne<G;ne++)se[ne]=H[ne];return se}var xt,st,$t,_t=(xt=function H(G){if(function(se,he){if(!(se instanceof he))throw new TypeError("Cannot call a class as a function")}(this,H),Xe(this,"entries",[]),G.length==0)throw new Error("Contract spec must have at least one entry");var ne=G[0];this.entries=typeof ne=="string"?G.map(function(se){return s.xdr.ScSpecEntry.fromXDR(se,"base64")}):G},st=[{key:"funcs",value:function(){return this.entries.filter(function(H){return H.switch().value===s.xdr.ScSpecEntryKind.scSpecEntryFunctionV0().value}).map(function(H){return H.functionV0()})}},{key:"getFunc",value:function(H){var G=this.findEntry(H);if(G.switch().value!==s.xdr.ScSpecEntryKind.scSpecEntryFunctionV0().value)throw new Error("".concat(H," is not a function"));return G.functionV0()}},{key:"funcArgsToScVals",value:function(H,G){var ne=this;return this.getFunc(H).inputs().map(function(se){return ne.nativeToScVal(function(he,Le){var Ie=Le.name().toString(),Te=Object.entries(he).find(function(Ce){var Ge=Pe(Ce,2),Je=Ge[0];return Ge[1],Je===Ie});if(!Te)throw new Error("Missing field ".concat(Ie));return Te[1]}(G,se),se.type())})}},{key:"funcResToNative",value:function(H,G){var ne=typeof G=="string"?s.xdr.ScVal.fromXDR(G,"base64"):G,se=this.getFunc(H).outputs();if(se.length===0){var he=ne.switch();if(he.value!==s.xdr.ScValType.scvVoid().value)throw new Error("Expected void, got ".concat(he.name));return null}if(se.length>1)throw new Error("Multiple outputs not supported");var Le=se[0];return Le.switch().value===s.xdr.ScSpecType.scSpecTypeResult().value?new g(this.scValToNative(ne,Le.result().okType())):this.scValToNative(ne,Le)}},{key:"findEntry",value:function(H){var G=this.entries.find(function(ne){return ne.value().name().toString()===H});if(!G)throw new Error("no such entry: ".concat(H));return G}},{key:"nativeToScVal",value:function(H,G){var ne=this,se=G.switch(),he=se.value;if(se.value===s.xdr.ScSpecType.scSpecTypeUdt().value){var Le=G.udt();return this.nativeToUdt(H,Le.name().toString())}if(he===s.xdr.ScSpecType.scSpecTypeOption().value){var Ie=G.option();return H===void 0?s.xdr.ScVal.scvVoid():this.nativeToScVal(H,Ie.valueType())}switch(je(H)){case"object":var Te,Ce,Ge;if(H===null){if(he===s.xdr.ScSpecType.scSpecTypeVoid().value)return s.xdr.ScVal.scvVoid();throw new TypeError("Type ".concat(G," was not void, but value was null"))}if(H instanceof s.xdr.ScVal)return H;if(H instanceof s.Address){if(G.switch().value!==s.xdr.ScSpecType.scSpecTypeAddress().value)throw new TypeError("Type ".concat(G," was not address, but value was Address"));return H.toScVal()}if(H instanceof s.Contract){if(G.switch().value!==s.xdr.ScSpecType.scSpecTypeAddress().value)throw new TypeError("Type ".concat(G," was not address, but value was Address"));return H.address().toScVal()}if(H instanceof Uint8Array||Ot.isBuffer(H)){var Je=Uint8Array.from(H);switch(he){case s.xdr.ScSpecType.scSpecTypeBytesN().value:var ft=G.bytesN();if(Je.length!==ft.n())throw new TypeError("expected ".concat(ft.n()," bytes, but got ").concat(Je.length));return s.xdr.ScVal.scvBytes(Je);case s.xdr.ScSpecType.scSpecTypeBytes().value:return s.xdr.ScVal.scvBytes(Je);default:throw new TypeError("invalid type (".concat(G,") specified for Bytes and BytesN"))}}if(Array.isArray(H))switch(he){case s.xdr.ScSpecType.scSpecTypeVec().value:var gt=G.vec().elementType();return s.xdr.ScVal.scvVec(H.map(function(wr){return ne.nativeToScVal(wr,gt)}));case s.xdr.ScSpecType.scSpecTypeTuple().value:var Nt=G.tuple().valueTypes();if(H.length!==Nt.length)throw new TypeError("Tuple expects ".concat(Nt.length," values, but ").concat(H.length," were provided"));return s.xdr.ScVal.scvVec(H.map(function(wr,Pr){return ne.nativeToScVal(wr,Nt[Pr])}));case s.xdr.ScSpecType.scSpecTypeMap().value:var Vt=G.map(),Gt=Vt.keyType(),Ye=Vt.valueType();return s.xdr.ScVal.scvMap(H.map(function(wr){var Pr=ne.nativeToScVal(wr[0],Gt),jr=ne.nativeToScVal(wr[1],Ye);return new s.xdr.ScMapEntry({key:Pr,val:jr})}));default:throw new TypeError("Type ".concat(G," was not vec, but value was Array"))}if(H.constructor===Map){if(he!==s.xdr.ScSpecType.scSpecTypeMap().value)throw new TypeError("Type ".concat(G," was not map, but value was Map"));for(var ir=G.map(),or=[],sr=H.entries(),pr=sr.next();!pr.done;){var Er=Pe(pr.value,2),hr=Er[0],br=Er[1],ur=this.nativeToScVal(hr,ir.keyType()),ee=this.nativeToScVal(br,ir.valueType());or.push(new s.xdr.ScMapEntry({key:ur,val:ee})),pr=sr.next()}return s.xdr.ScVal.scvMap(or)}throw((Te=(Ce=H.constructor)===null||Ce===void 0?void 0:Ce.name)!==null&&Te!==void 0?Te:"")!=="Object"?new TypeError("cannot interpret ".concat((Ge=H.constructor)===null||Ge===void 0?void 0:Ge.name," value as ScVal (").concat(JSON.stringify(H),")")):new TypeError("Received object ".concat(H," did not match the provided type ").concat(G));case"number":case"bigint":switch(he){case s.xdr.ScSpecType.scSpecTypeU32().value:return s.xdr.ScVal.scvU32(H);case s.xdr.ScSpecType.scSpecTypeI32().value:return s.xdr.ScVal.scvI32(H);case s.xdr.ScSpecType.scSpecTypeU64().value:case s.xdr.ScSpecType.scSpecTypeI64().value:case s.xdr.ScSpecType.scSpecTypeU128().value:case s.xdr.ScSpecType.scSpecTypeI128().value:case s.xdr.ScSpecType.scSpecTypeU256().value:case s.xdr.ScSpecType.scSpecTypeI256().value:var er=se.name.substring(10).toLowerCase();return new s.XdrLargeInt(er,H).toScVal();default:throw new TypeError("invalid type (".concat(G,") specified for integer"))}case"string":return function(wr,Pr){switch(Pr.value){case s.xdr.ScSpecType.scSpecTypeString().value:return s.xdr.ScVal.scvString(wr);case s.xdr.ScSpecType.scSpecTypeSymbol().value:return s.xdr.ScVal.scvSymbol(wr);case s.xdr.ScSpecType.scSpecTypeAddress().value:var jr=s.Address.fromString(wr);return s.xdr.ScVal.scvAddress(jr.toScAddress());case s.xdr.ScSpecType.scSpecTypeU64().value:return new s.XdrLargeInt("u64",wr).toScVal();case s.xdr.ScSpecType.scSpecTypeI64().value:return new s.XdrLargeInt("i64",wr).toScVal();case s.xdr.ScSpecType.scSpecTypeU128().value:return new s.XdrLargeInt("u128",wr).toScVal();case s.xdr.ScSpecType.scSpecTypeI128().value:return new s.XdrLargeInt("i128",wr).toScVal();case s.xdr.ScSpecType.scSpecTypeU256().value:return new s.XdrLargeInt("u256",wr).toScVal();case s.xdr.ScSpecType.scSpecTypeI256().value:return new s.XdrLargeInt("i256",wr).toScVal();case s.xdr.ScSpecType.scSpecTypeBytes().value:case s.xdr.ScSpecType.scSpecTypeBytesN().value:return s.xdr.ScVal.scvBytes(Ot.from(wr,"base64"));default:throw new TypeError("invalid type ".concat(Pr.name," specified for string value"))}}(H,se);case"boolean":if(he!==s.xdr.ScSpecType.scSpecTypeBool().value)throw TypeError("Type ".concat(G," was not bool, but value was bool"));return s.xdr.ScVal.scvBool(H);case"undefined":if(!G)return s.xdr.ScVal.scvVoid();switch(he){case s.xdr.ScSpecType.scSpecTypeVoid().value:case s.xdr.ScSpecType.scSpecTypeOption().value:return s.xdr.ScVal.scvVoid();default:throw new TypeError("Type ".concat(G," was not void, but value was undefined"))}case"function":return this.nativeToScVal(H(),G);default:throw new TypeError("failed to convert typeof ".concat(je(H)," (").concat(H,")"))}}},{key:"nativeToUdt",value:function(H,G){var ne=this.findEntry(G);switch(ne.switch()){case s.xdr.ScSpecEntryKind.scSpecEntryUdtEnumV0():if(typeof H!="number")throw new TypeError("expected number for enum ".concat(G,", but got ").concat(je(H)));return this.nativeToEnum(H,ne.udtEnumV0());case s.xdr.ScSpecEntryKind.scSpecEntryUdtStructV0():return this.nativeToStruct(H,ne.udtStructV0());case s.xdr.ScSpecEntryKind.scSpecEntryUdtUnionV0():return this.nativeToUnion(H,ne.udtUnionV0());default:throw new Error("failed to parse udt ".concat(G))}}},{key:"nativeToUnion",value:function(H,G){var ne=this,se=H.tag,he=G.cases().find(function(Ce){return Ce.value().name().toString()===se});if(!he)throw new TypeError("no such enum entry: ".concat(se," in ").concat(G));var Le=s.xdr.ScVal.scvSymbol(se);switch(he.switch()){case s.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0():return s.xdr.ScVal.scvVec([Le]);case s.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0():var Ie=he.tupleCase().type();if(Array.isArray(H.values)){if(H.values.length!=Ie.length)throw new TypeError("union ".concat(G," expects ").concat(Ie.length," values, but got ").concat(H.values.length));var Te=H.values.map(function(Ce,Ge){return ne.nativeToScVal(Ce,Ie[Ge])});return Te.unshift(Le),s.xdr.ScVal.scvVec(Te)}throw new Error("failed to parse union case ".concat(he," with ").concat(H));default:throw new Error("failed to parse union ".concat(G," with ").concat(H))}}},{key:"nativeToStruct",value:function(H,G){var ne=this,se=G.fields();if(se.some(Ct)){if(!se.every(Ct))throw new Error("mixed numeric and non-numeric field names are not allowed");return s.xdr.ScVal.scvVec(se.map(function(he,Le){return ne.nativeToScVal(H[Le],se[Le].type())}))}return s.xdr.ScVal.scvMap(se.map(function(he){var Le=he.name().toString();return new s.xdr.ScMapEntry({key:ne.nativeToScVal(Le,s.xdr.ScSpecTypeDef.scSpecTypeSymbol()),val:ne.nativeToScVal(H[Le],he.type())})}))}},{key:"nativeToEnum",value:function(H,G){if(G.cases().some(function(ne){return ne.value()===H}))return s.xdr.ScVal.scvU32(H);throw new TypeError("no such enum entry: ".concat(H," in ").concat(G))}},{key:"scValStrToNative",value:function(H,G){return this.scValToNative(s.xdr.ScVal.fromXDR(H,"base64"),G)}},{key:"scValToNative",value:function(H,G){var ne=this,se=G.switch(),he=se.value;if(he===s.xdr.ScSpecType.scSpecTypeUdt().value)return this.scValUdtToNative(H,G.udt());switch(H.switch().value){case s.xdr.ScValType.scvVoid().value:return;case s.xdr.ScValType.scvU64().value:case s.xdr.ScValType.scvI64().value:case s.xdr.ScValType.scvU128().value:case s.xdr.ScValType.scvI128().value:case s.xdr.ScValType.scvU256().value:case s.xdr.ScValType.scvI256().value:return(0,s.scValToBigInt)(H);case s.xdr.ScValType.scvVec().value:if(he==s.xdr.ScSpecType.scSpecTypeVec().value){var Le,Ie=G.vec();return((Le=H.vec())!==null&&Le!==void 0?Le:[]).map(function(Gt){return ne.scValToNative(Gt,Ie.elementType())})}if(he==s.xdr.ScSpecType.scSpecTypeTuple().value){var Te,Ce=G.tuple().valueTypes();return((Te=H.vec())!==null&&Te!==void 0?Te:[]).map(function(Gt,Ye){return ne.scValToNative(Gt,Ce[Ye])})}throw new TypeError("Type ".concat(G," was not vec, but ").concat(H," is"));case s.xdr.ScValType.scvAddress().value:return s.Address.fromScVal(H).toString();case s.xdr.ScValType.scvMap().value:var Ge,Je=(Ge=H.map())!==null&&Ge!==void 0?Ge:[];if(he==s.xdr.ScSpecType.scSpecTypeMap().value){var ft=G.map(),gt=ft.keyType(),Nt=ft.valueType();return Je.map(function(Gt){return[ne.scValToNative(Gt.key(),gt),ne.scValToNative(Gt.val(),Nt)]})}throw new TypeError("ScSpecType ".concat(se.name," was not map, but ").concat(JSON.stringify(H,null,2)," is"));case s.xdr.ScValType.scvBool().value:case s.xdr.ScValType.scvU32().value:case s.xdr.ScValType.scvI32().value:case s.xdr.ScValType.scvBytes().value:return H.value();case s.xdr.ScValType.scvString().value:case s.xdr.ScValType.scvSymbol().value:var Vt;if(he!==s.xdr.ScSpecType.scSpecTypeString().value&&he!==s.xdr.ScSpecType.scSpecTypeSymbol().value)throw new Error("ScSpecType ".concat(se.name," was not string or symbol, but ").concat(JSON.stringify(H,null,2)," is"));return(Vt=H.value())===null||Vt===void 0?void 0:Vt.toString();case s.xdr.ScValType.scvTimepoint().value:case s.xdr.ScValType.scvDuration().value:return(0,s.scValToBigInt)(s.xdr.ScVal.scvU64(H.u64()));default:throw new TypeError("failed to convert ".concat(JSON.stringify(H,null,2)," to native type from type ").concat(se.name))}}},{key:"scValUdtToNative",value:function(H,G){var ne=this.findEntry(G.name().toString());switch(ne.switch()){case s.xdr.ScSpecEntryKind.scSpecEntryUdtEnumV0():return this.enumToNative(H);case s.xdr.ScSpecEntryKind.scSpecEntryUdtStructV0():return this.structToNative(H,ne.udtStructV0());case s.xdr.ScSpecEntryKind.scSpecEntryUdtUnionV0():return this.unionToNative(H,ne.udtUnionV0());default:throw new Error("failed to parse udt ".concat(G.name().toString(),": ").concat(ne))}}},{key:"unionToNative",value:function(H,G){var ne=this,se=H.vec();if(!se)throw new Error("".concat(JSON.stringify(H,null,2)," is not a vec"));if(se.length===0&&G.cases.length!==0)throw new Error("".concat(H," has length 0, but the there are at least one case in the union"));var he=se[0].sym().toString();if(se[0].switch().value!=s.xdr.ScValType.scvSymbol().value)throw new Error("{vec[0]} is not a symbol");var Le=G.cases().find(function(Ce){return function(Ge){switch(Ge.switch().value){case s.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0().value:return Ge.tupleCase().name().toString()===Ce;case s.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0().value:return Ge.voidCase().name().toString()===Ce;default:return!1}}}(he));if(!Le)throw new Error("failed to find entry ".concat(he," in union {udt.name().toString()}"));var Ie={tag:he};if(Le.switch().value===s.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0().value){var Te=Le.tupleCase().type().map(function(Ce,Ge){return ne.scValToNative(se[Ge+1],Ce)});Ie.values=Te}return Ie}},{key:"structToNative",value:function(H,G){var ne,se,he=this,Le={},Ie=G.fields();return Ie.some(Ct)?(se=H.vec())===null||se===void 0?void 0:se.map(function(Te,Ce){return he.scValToNative(Te,Ie[Ce].type())}):((ne=H.map())===null||ne===void 0||ne.forEach(function(Te,Ce){var Ge=Ie[Ce];Le[Ge.name().toString()]=he.scValToNative(Te.val(),Ge.type())}),Le)}},{key:"enumToNative",value:function(H){if(H.switch().value!==s.xdr.ScValType.scvU32().value)throw new Error("Enum must have a u32 value");return H.u32()}},{key:"errorCases",value:function(){return this.entries.filter(function(H){return H.switch().value===s.xdr.ScSpecEntryKind.scSpecEntryUdtErrorEnumV0().value}).flatMap(function(H){return H.value().cases()})}},{key:"jsonSchema",value:function(H){var G,ne={},se=yr(this.entries);try{for(se.s();!(G=se.n()).done;){var he=G.value;switch(he.switch().value){case s.xdr.ScSpecEntryKind.scSpecEntryUdtEnumV0().value:var Le=he.udtEnumV0();ne[Le.name().toString()]=ot(Le);break;case s.xdr.ScSpecEntryKind.scSpecEntryUdtStructV0().value:var Ie=he.udtStructV0();ne[Ie.name().toString()]=ce(Ie);break;case s.xdr.ScSpecEntryKind.scSpecEntryUdtUnionV0().value:var Te=he.udtUnionV0();ne[Te.name().toString()]=xe(Te);break;case s.xdr.ScSpecEntryKind.scSpecEntryFunctionV0().value:var Ce=he.functionV0(),Ge=Ce.name().toString(),Je=D(Ce).input;ne[Ge]=Je;case s.xdr.ScSpecEntryKind.scSpecEntryUdtErrorEnumV0().value:}}}catch(gt){se.e(gt)}finally{se.f()}var ft={$schema:"http://json-schema.org/draft-07/schema#",definitions:Yt(Yt({},it),ne)};return H&&(ft.$ref="#/definitions/".concat(H)),ft}}],st&&De(xt.prototype,st),$t&&De(xt,$t),Object.defineProperty(xt,"prototype",{writable:!1}),xt);function Ct(H){return/^\d+$/.test(H.name().toString())}var it={U32:{type:"integer",minimum:0,maximum:4294967295},I32:{type:"integer",minimum:-2147483648,maximum:2147483647},U64:{type:"string",pattern:"^([1-9][0-9]*|0)$",minLength:1,maxLength:20},I64:{type:"string",pattern:"^(-?[1-9][0-9]*|0)$",minLength:1,maxLength:21},U128:{type:"string",pattern:"^([1-9][0-9]*|0)$",minLength:1,maxLength:39},I128:{type:"string",pattern:"^(-?[1-9][0-9]*|0)$",minLength:1,maxLength:40},U256:{type:"string",pattern:"^([1-9][0-9]*|0)$",minLength:1,maxLength:78},I256:{type:"string",pattern:"^(-?[1-9][0-9]*|0)$",minLength:1,maxLength:79},Address:{type:"string",format:"address",description:"Address can be a public key or contract id"},ScString:{type:"string",description:"ScString is a string"},ScSymbol:{type:"string",description:"ScString is a string"},DataUrl:{type:"string",pattern:"^(?:[A-Za-z0-9+\\/]{4})*(?:[A-Za-z0-9+\\/]{2}==|[A-Za-z0-9+\\/]{3}=)?$"}};function Q(H){var G;switch(H.switch().value){case s.xdr.ScSpecType.scSpecTypeVal().value:G="Val";break;case s.xdr.ScSpecType.scSpecTypeBool().value:return{type:"boolean"};case s.xdr.ScSpecType.scSpecTypeVoid().value:return{type:"null"};case s.xdr.ScSpecType.scSpecTypeError().value:G="Error";break;case s.xdr.ScSpecType.scSpecTypeU32().value:G="U32";break;case s.xdr.ScSpecType.scSpecTypeI32().value:G="I32";break;case s.xdr.ScSpecType.scSpecTypeU64().value:G="U64";break;case s.xdr.ScSpecType.scSpecTypeI64().value:G="I64";break;case s.xdr.ScSpecType.scSpecTypeTimepoint().value:throw new Error("Timepoint type not supported");case s.xdr.ScSpecType.scSpecTypeDuration().value:throw new Error("Duration not supported");case s.xdr.ScSpecType.scSpecTypeU128().value:G="U128";break;case s.xdr.ScSpecType.scSpecTypeI128().value:G="I128";break;case s.xdr.ScSpecType.scSpecTypeU256().value:G="U256";break;case s.xdr.ScSpecType.scSpecTypeI256().value:G="I256";break;case s.xdr.ScSpecType.scSpecTypeBytes().value:G="DataUrl";break;case s.xdr.ScSpecType.scSpecTypeString().value:G="ScString";break;case s.xdr.ScSpecType.scSpecTypeSymbol().value:G="ScSymbol";break;case s.xdr.ScSpecType.scSpecTypeAddress().value:G="Address";break;case s.xdr.ScSpecType.scSpecTypeOption().value:return Q(H.option().valueType());case s.xdr.ScSpecType.scSpecTypeResult().value:break;case s.xdr.ScSpecType.scSpecTypeVec().value:return{type:"array",items:Q(H.vec().elementType())};case s.xdr.ScSpecType.scSpecTypeMap().value:var ne=H.map();return{type:"array",items:{type:"array",items:[Q(ne.keyType()),Q(ne.valueType())],minItems:2,maxItems:2}};case s.xdr.ScSpecType.scSpecTypeTuple().value:var se=H.tuple(),he=se.valueTypes().length,Le=he;return{type:"array",items:se.valueTypes().map(Q),minItems:he,maxItems:Le};case s.xdr.ScSpecType.scSpecTypeBytesN().value:return{$ref:"#/definitions/DataUrl",maxLength:H.bytesN().n()};case s.xdr.ScSpecType.scSpecTypeUdt().value:G=H.udt().name().toString()}return{$ref:"#/definitions/".concat(G)}}function ce(H){var G=H.fields();if(G.some(Ct)){if(!G.every(Ct))throw new Error("mixed numeric and non-numeric field names are not allowed");return{type:"array",items:G.map(function(Ie,Te){return Q(G[Te].type())}),minItems:G.length,maxItems:G.length}}var ne=H.doc().toString(),se=be(G),he=se.properties,Le=se.required;return he.additionalProperties=!1,{description:ne,properties:he,required:Le,type:"object"}}function be(H){var G,ne={},se=[],he=yr(H);try{for(he.s();!(G=he.n()).done;){var Le=G.value,Ie=Le.type(),Te=Le.name().toString();ne[Te]=Q(Ie),Ie.switch().value!=s.xdr.ScSpecType.scSpecTypeOption().value&&se.push(Te)}}catch(Ge){he.e(Ge)}finally{he.f()}var Ce={properties:ne};return se.length>0&&(Ce.required=se),Ce}function D(H){var G=be(H.inputs()),ne=G.properties,se=G.required,he={additionalProperties:!1,properties:ne,type:"object"};se?.length>0&&(he.required=se);var Le={properties:{args:he}},Ie=H.outputs(),Te=Ie.length>0?Q(Ie[0]):Q(s.xdr.ScSpecTypeDef.scSpecTypeVoid()),Ce=H.doc().toString();return Ce.length>0&&(Le.description=Ce),Le.additionalProperties=!1,Te.additionalProperties=!1,{input:Le,output:Te}}function xe(H){var G,ne=H.doc().toString(),se=[],he=yr(H.cases());try{for(he.s();!(G=he.n()).done;){var Le=G.value;switch(Le.switch().value){case s.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseVoidV0().value:var Ie=Le.voidCase().name().toString();se.push({type:"object",title:Ie,properties:{tag:Ie},additionalProperties:!1,required:["tag"]});break;case s.xdr.ScSpecUdtUnionCaseV0Kind.scSpecUdtUnionCaseTupleV0().value:var Te=Le.tupleCase(),Ce=Te.name().toString();se.push({type:"object",title:Ce,properties:{tag:Ce,values:{type:"array",items:Te.type().map(Q)}},required:["tag","values"],additionalProperties:!1})}}}catch(Je){he.e(Je)}finally{he.f()}var Ge={oneOf:se};return ne.length>0&&(Ge.description=ne),Ge}function ot(H){var G,ne=H.doc().toString(),se=[],he=yr(H.cases());try{for(he.s();!(G=he.n()).done;){var Le=G.value,Ie=Le.name().toString(),Te=Le.doc().toString();se.push({description:Te,title:Ie,enum:[Le.value()],type:"number"})}}catch(Ge){he.e(Ge)}finally{he.f()}var Ce={oneOf:se};return ne.length>0&&(Ce.description=ne),Ce}var at=i(1660),yt=i(8287).Buffer,Tt=["method"];function Kt(H){return Kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},Kt(H)}function Et(){Et=function(){return G};var H,G={},ne=Object.prototype,se=ne.hasOwnProperty,he=Object.defineProperty||function(fe,Se,Ue){fe[Se]=Ue.value},Le=typeof Symbol=="function"?Symbol:{},Ie=Le.iterator||"@@iterator",Te=Le.asyncIterator||"@@asyncIterator",Ce=Le.toStringTag||"@@toStringTag";function Ge(fe,Se,Ue){return Object.defineProperty(fe,Se,{value:Ue,enumerable:!0,configurable:!0,writable:!0}),fe[Se]}try{Ge({},"")}catch{Ge=function(Se,Ue,mt){return Se[Ue]=mt}}function Je(fe,Se,Ue,mt){var qe=Se&&Se.prototype instanceof ir?Se:ir,Ut=Object.create(qe.prototype),Zt=new Lr(mt||[]);return he(Ut,"_invoke",{value:er(fe,Ue,Zt)}),Ut}function ft(fe,Se,Ue){try{return{type:"normal",arg:fe.call(Se,Ue)}}catch(mt){return{type:"throw",arg:mt}}}G.wrap=Je;var gt="suspendedStart",Nt="suspendedYield",Vt="executing",Gt="completed",Ye={};function ir(){}function or(){}function sr(){}var pr={};Ge(pr,Ie,function(){return this});var Er=Object.getPrototypeOf,hr=Er&&Er(Er(Mt([])));hr&&hr!==ne&&se.call(hr,Ie)&&(pr=hr);var br=sr.prototype=ir.prototype=Object.create(pr);function ur(fe){["next","throw","return"].forEach(function(Se){Ge(fe,Se,function(Ue){return this._invoke(Se,Ue)})})}function ee(fe,Se){function Ue(qe,Ut,Zt,dr){var fr=ft(fe[qe],fe,Ut);if(fr.type!=="throw"){var Vr=fr.arg,Wr=Vr.value;return Wr&&Kt(Wr)=="object"&&se.call(Wr,"__await")?Se.resolve(Wr.__await).then(function(Nr){Ue("next",Nr,Zt,dr)},function(Nr){Ue("throw",Nr,Zt,dr)}):Se.resolve(Wr).then(function(Nr){Vr.value=Nr,Zt(Vr)},function(Nr){return Ue("throw",Nr,Zt,dr)})}dr(fr.arg)}var mt;he(this,"_invoke",{value:function(qe,Ut){function Zt(){return new Se(function(dr,fr){Ue(qe,Ut,dr,fr)})}return mt=mt?mt.then(Zt,Zt):Zt()}})}function er(fe,Se,Ue){var mt=gt;return function(qe,Ut){if(mt===Vt)throw Error("Generator is already running");if(mt===Gt){if(qe==="throw")throw Ut;return{value:H,done:!0}}for(Ue.method=qe,Ue.arg=Ut;;){var Zt=Ue.delegate;if(Zt){var dr=wr(Zt,Ue);if(dr){if(dr===Ye)continue;return dr}}if(Ue.method==="next")Ue.sent=Ue._sent=Ue.arg;else if(Ue.method==="throw"){if(mt===gt)throw mt=Gt,Ue.arg;Ue.dispatchException(Ue.arg)}else Ue.method==="return"&&Ue.abrupt("return",Ue.arg);mt=Vt;var fr=ft(fe,Se,Ue);if(fr.type==="normal"){if(mt=Ue.done?Gt:Nt,fr.arg===Ye)continue;return{value:fr.arg,done:Ue.done}}fr.type==="throw"&&(mt=Gt,Ue.method="throw",Ue.arg=fr.arg)}}}function wr(fe,Se){var Ue=Se.method,mt=fe.iterator[Ue];if(mt===H)return Se.delegate=null,Ue==="throw"&&fe.iterator.return&&(Se.method="return",Se.arg=H,wr(fe,Se),Se.method==="throw")||Ue!=="return"&&(Se.method="throw",Se.arg=new TypeError("The iterator does not provide a '"+Ue+"' method")),Ye;var qe=ft(mt,fe.iterator,Se.arg);if(qe.type==="throw")return Se.method="throw",Se.arg=qe.arg,Se.delegate=null,Ye;var Ut=qe.arg;return Ut?Ut.done?(Se[fe.resultName]=Ut.value,Se.next=fe.nextLoc,Se.method!=="return"&&(Se.method="next",Se.arg=H),Se.delegate=null,Ye):Ut:(Se.method="throw",Se.arg=new TypeError("iterator result is not an object"),Se.delegate=null,Ye)}function Pr(fe){var Se={tryLoc:fe[0]};1 in fe&&(Se.catchLoc=fe[1]),2 in fe&&(Se.finallyLoc=fe[2],Se.afterLoc=fe[3]),this.tryEntries.push(Se)}function jr(fe){var Se=fe.completion||{};Se.type="normal",delete Se.arg,fe.completion=Se}function Lr(fe){this.tryEntries=[{tryLoc:"root"}],fe.forEach(Pr,this),this.reset(!0)}function Mt(fe){if(fe||fe===""){var Se=fe[Ie];if(Se)return Se.call(fe);if(typeof fe.next=="function")return fe;if(!isNaN(fe.length)){var Ue=-1,mt=function qe(){for(;++Ue<fe.length;)if(se.call(fe,Ue))return qe.value=fe[Ue],qe.done=!1,qe;return qe.value=H,qe.done=!0,qe};return mt.next=mt}}throw new TypeError(Kt(fe)+" is not iterable")}return or.prototype=sr,he(br,"constructor",{value:sr,configurable:!0}),he(sr,"constructor",{value:or,configurable:!0}),or.displayName=Ge(sr,Ce,"GeneratorFunction"),G.isGeneratorFunction=function(fe){var Se=typeof fe=="function"&&fe.constructor;return!!Se&&(Se===or||(Se.displayName||Se.name)==="GeneratorFunction")},G.mark=function(fe){return Object.setPrototypeOf?Object.setPrototypeOf(fe,sr):(fe.__proto__=sr,Ge(fe,Ce,"GeneratorFunction")),fe.prototype=Object.create(br),fe},G.awrap=function(fe){return{__await:fe}},ur(ee.prototype),Ge(ee.prototype,Te,function(){return this}),G.AsyncIterator=ee,G.async=function(fe,Se,Ue,mt,qe){qe===void 0&&(qe=Promise);var Ut=new ee(Je(fe,Se,Ue,mt),qe);return G.isGeneratorFunction(Se)?Ut:Ut.next().then(function(Zt){return Zt.done?Zt.value:Ut.next()})},ur(br),Ge(br,Ce,"Generator"),Ge(br,Ie,function(){return this}),Ge(br,"toString",function(){return"[object Generator]"}),G.keys=function(fe){var Se=Object(fe),Ue=[];for(var mt in Se)Ue.push(mt);return Ue.reverse(),function qe(){for(;Ue.length;){var Ut=Ue.pop();if(Ut in Se)return qe.value=Ut,qe.done=!1,qe}return qe.done=!0,qe}},G.values=Mt,Lr.prototype={constructor:Lr,reset:function(fe){if(this.prev=0,this.next=0,this.sent=this._sent=H,this.done=!1,this.delegate=null,this.method="next",this.arg=H,this.tryEntries.forEach(jr),!fe)for(var Se in this)Se.charAt(0)==="t"&&se.call(this,Se)&&!isNaN(+Se.slice(1))&&(this[Se]=H)},stop:function(){this.done=!0;var fe=this.tryEntries[0].completion;if(fe.type==="throw")throw fe.arg;return this.rval},dispatchException:function(fe){if(this.done)throw fe;var Se=this;function Ue(fr,Vr){return Ut.type="throw",Ut.arg=fe,Se.next=fr,Vr&&(Se.method="next",Se.arg=H),!!Vr}for(var mt=this.tryEntries.length-1;mt>=0;--mt){var qe=this.tryEntries[mt],Ut=qe.completion;if(qe.tryLoc==="root")return Ue("end");if(qe.tryLoc<=this.prev){var Zt=se.call(qe,"catchLoc"),dr=se.call(qe,"finallyLoc");if(Zt&&dr){if(this.prev<qe.catchLoc)return Ue(qe.catchLoc,!0);if(this.prev<qe.finallyLoc)return Ue(qe.finallyLoc)}else if(Zt){if(this.prev<qe.catchLoc)return Ue(qe.catchLoc,!0)}else{if(!dr)throw Error("try statement without catch or finally");if(this.prev<qe.finallyLoc)return Ue(qe.finallyLoc)}}}},abrupt:function(fe,Se){for(var Ue=this.tryEntries.length-1;Ue>=0;--Ue){var mt=this.tryEntries[Ue];if(mt.tryLoc<=this.prev&&se.call(mt,"finallyLoc")&&this.prev<mt.finallyLoc){var qe=mt;break}}qe&&(fe==="break"||fe==="continue")&&qe.tryLoc<=Se&&Se<=qe.finallyLoc&&(qe=null);var Ut=qe?qe.completion:{};return Ut.type=fe,Ut.arg=Se,qe?(this.method="next",this.next=qe.finallyLoc,Ye):this.complete(Ut)},complete:function(fe,Se){if(fe.type==="throw")throw fe.arg;return fe.type==="break"||fe.type==="continue"?this.next=fe.arg:fe.type==="return"?(this.rval=this.arg=fe.arg,this.method="return",this.next="end"):fe.type==="normal"&&Se&&(this.next=Se),Ye},finish:function(fe){for(var Se=this.tryEntries.length-1;Se>=0;--Se){var Ue=this.tryEntries[Se];if(Ue.finallyLoc===fe)return this.complete(Ue.completion,Ue.afterLoc),jr(Ue),Ye}},catch:function(fe){for(var Se=this.tryEntries.length-1;Se>=0;--Se){var Ue=this.tryEntries[Se];if(Ue.tryLoc===fe){var mt=Ue.completion;if(mt.type==="throw"){var qe=mt.arg;jr(Ue)}return qe}}throw Error("illegal catch attempt")},delegateYield:function(fe,Se,Ue){return this.delegate={iterator:Mt(fe),resultName:Se,nextLoc:Ue},this.method==="next"&&(this.arg=H),Ye}},G}function Rt(H,G,ne,se,he,Le,Ie){try{var Te=H[Le](Ie),Ce=Te.value}catch(Ge){return void ne(Ge)}Te.done?G(Ce):Promise.resolve(Ce).then(se,he)}function St(H){return function(){var G=this,ne=arguments;return new Promise(function(se,he){var Le=H.apply(G,ne);function Ie(Ce){Rt(Le,se,he,Ie,Te,"next",Ce)}function Te(Ce){Rt(Le,se,he,Ie,Te,"throw",Ce)}Ie(void 0)})}}function Ht(H,G){var ne=Object.keys(H);if(Object.getOwnPropertySymbols){var se=Object.getOwnPropertySymbols(H);G&&(se=se.filter(function(he){return Object.getOwnPropertyDescriptor(H,he).enumerable})),ne.push.apply(ne,se)}return ne}function Lt(H){for(var G=1;G<arguments.length;G++){var ne=arguments[G]!=null?arguments[G]:{};G%2?Ht(Object(ne),!0).forEach(function(se){rr(H,se,ne[se])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(ne)):Ht(Object(ne)).forEach(function(se){Object.defineProperty(H,se,Object.getOwnPropertyDescriptor(ne,se))})}return H}function qt(H,G){if(H==null)return{};var ne,se,he=function(Ie,Te){if(Ie==null)return{};var Ce={};for(var Ge in Ie)if(Object.prototype.hasOwnProperty.call(Ie,Ge)){if(Te.indexOf(Ge)>=0)continue;Ce[Ge]=Ie[Ge]}return Ce}(H,G);if(Object.getOwnPropertySymbols){var Le=Object.getOwnPropertySymbols(H);for(se=0;se<Le.length;se++)ne=Le[se],G.indexOf(ne)>=0||Object.prototype.propertyIsEnumerable.call(H,ne)&&(he[ne]=H[ne])}return he}function It(H,G){for(var ne=0;ne<G.length;ne++){var se=G[ne];se.enumerable=se.enumerable||!1,se.configurable=!0,"value"in se&&(se.writable=!0),Object.defineProperty(H,ye(se.key),se)}}function rr(H,G,ne){return(G=ye(G))in H?Object.defineProperty(H,G,{value:ne,enumerable:!0,configurable:!0,writable:!0}):H[G]=ne,H}function ye(H){var G=function(ne,se){if(Kt(ne)!="object"||!ne)return ne;var he=ne[Symbol.toPrimitive];if(he!==void 0){var Le=he.call(ne,se||"default");if(Kt(Le)!="object")return Le;throw new TypeError("@@toPrimitive must return a primitive value.")}return(se==="string"?String:Number)(ne)}(H,"string");return Kt(G)=="symbol"?G:G+""}var Me=function(){function H(he,Le){var Ie=this;(function(Te,Ce){if(!(Te instanceof Ce))throw new TypeError("Cannot call a class as a function")})(this,H),rr(this,"txFromJSON",function(Te){var Ce=JSON.parse(Te),Ge=Ce.method,Je=qt(Ce,Tt);return U.fromJSON(Lt(Lt({},Ie.options),{},{method:Ge,parseResultXdr:function(ft){return Ie.spec.funcResToNative(Ge,ft)}}),Je)}),this.spec=he,this.options=Le,this.spec.funcs().forEach(function(Te){var Ce=Te.name().toString(),Ge=function(Je,ft){return U.build(Lt(Lt(Lt({method:Ce,args:Je&&he.funcArgsToScVals(Ce,Je)},Le),ft),{},{errorTypes:he.errorCases().reduce(function(gt,Nt){return Lt(Lt({},gt),{},rr({},Nt.value(),{message:Nt.doc().toString()}))},{}),parseResultXdr:function(gt){return he.funcResToNative(Ce,gt)}}))};Ie[Ce]=he.getFunc(Ce).inputs().length===0?function(Je){return Ge(void 0,Je)}:Ge})}return function(he,Le,Ie){return Le&&It(he.prototype,Le),Ie&&It(he,Ie),Object.defineProperty(he,"prototype",{writable:!1}),he}(H,null,[{key:"fromWasmHash",value:(se=St(Et().mark(function he(Le,Ie){var Te,Ce,Ge,Je,ft,gt,Nt=arguments;return Et().wrap(function(Vt){for(;;)switch(Vt.prev=Vt.next){case 0:if(Te=Nt.length>2&&Nt[2]!==void 0?Nt[2]:"hex",Ie&&Ie.rpcUrl){Vt.next=3;break}throw new TypeError("options must contain rpcUrl");case 3:return Ce=Ie.rpcUrl,Ge=Ie.allowHttp,Je={allowHttp:Ge},ft=new at.Server(Ce,Je),Vt.next=8,ft.getContractWasmByHash(Le,Te);case 8:return gt=Vt.sent,Vt.abrupt("return",H.fromWasm(gt,Ie));case 10:case"end":return Vt.stop()}},he)})),function(he,Le){return se.apply(this,arguments)})},{key:"fromWasm",value:(ne=St(Et().mark(function he(Le,Ie){var Te,Ce,Ge,Je,ft;return Et().wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:return gt.next=2,WebAssembly.compile(Le);case 2:if(Te=gt.sent,(Ce=WebAssembly.Module.customSections(Te,"contractspecv0")).length!==0){gt.next=6;break}throw new Error("Could not obtain contract spec from wasm");case 6:return Ge=yt.from(Ce[0]),Je=V(Ge),ft=new _t(Je),gt.abrupt("return",new H(ft,Ie));case 10:case"end":return gt.stop()}},he)})),function(he,Le){return ne.apply(this,arguments)})},{key:"from",value:(G=St(Et().mark(function he(Le){var Ie,Te,Ce,Ge,Je,ft;return Et().wrap(function(gt){for(;;)switch(gt.prev=gt.next){case 0:if(Le&&Le.rpcUrl&&Le.contractId){gt.next=2;break}throw new TypeError("options must contain rpcUrl and contractId");case 2:return Ie=Le.rpcUrl,Te=Le.contractId,Ce=Le.allowHttp,Ge={allowHttp:Ce},Je=new at.Server(Ie,Ge),gt.next=7,Je.getContractWasmByContractId(Te);case 7:return ft=gt.sent,gt.abrupt("return",H.fromWasm(ft,Le));case 9:case"end":return gt.stop()}},he)})),function(he){return G.apply(this,arguments)})}]);var G,ne,se}()},5885:(o,a,i)=>{"use strict";function s(R){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},s(R)}function f(R,j){if(!(R instanceof j))throw new TypeError("Cannot call a class as a function")}function u(R,j){for(var V=0;V<j.length;V++){var Y=j[V];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(R,_(Y.key),Y)}}function r(R,j,V){return j&&u(R.prototype,j),V&&u(R,V),Object.defineProperty(R,"prototype",{writable:!1}),R}function _(R){var j=function(V,Y){if(s(V)!="object"||!V)return V;var me=V[Symbol.toPrimitive];if(me!==void 0){var le=me.call(V,Y||"default");if(s(le)!="object")return le;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Y==="string"?String:Number)(V)}(R,"string");return s(j)=="symbol"?j:j+""}function d(R,j,V){return j=p(j),function(Y,me){if(me&&(s(me)==="object"||typeof me=="function"))return me;if(me!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(le){if(le===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return le}(Y)}(R,w()?Reflect.construct(j,V||[],p(R).constructor):j.apply(R,V))}function b(R,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(j&&j.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),Object.defineProperty(R,"prototype",{writable:!1}),j&&g(R,j)}function T(R){var j=typeof Map=="function"?new Map:void 0;return T=function(V){if(V===null||!function(me){try{return Function.toString.call(me).indexOf("[native code]")!==-1}catch{return typeof me=="function"}}(V))return V;if(typeof V!="function")throw new TypeError("Super expression must either be null or a function");if(j!==void 0){if(j.has(V))return j.get(V);j.set(V,Y)}function Y(){return function(me,le,C){if(w())return Reflect.construct.apply(null,arguments);var q=[null];q.push.apply(q,le);var X=new(me.bind.apply(me,q));return C&&g(X,C.prototype),X}(V,arguments,p(this).constructor)}return Y.prototype=Object.create(V.prototype,{constructor:{value:Y,enumerable:!1,writable:!0,configurable:!0}}),g(Y,V)},T(R)}function w(){try{var R=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(w=function(){return!!R})()}function g(R,j){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(V,Y){return V.__proto__=Y,V},g(R,j)}function p(R){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(j){return j.__proto__||Object.getPrototypeOf(j)},p(R)}i.d(a,{Cu:()=>F,Dr:()=>A,m_:()=>L,nS:()=>N,v7:()=>E});var A=function(R){function j(V,Y){var me;f(this,j);var le=(this instanceof j?this.constructor:void 0).prototype;return(me=d(this,j,[V])).__proto__=le,me.constructor=j,me.response=Y,me}return b(j,R),r(j,[{key:"getResponse",value:function(){return this.response}}])}(T(Error)),L=function(R){function j(V,Y){var me;f(this,j);var le=(this instanceof j?this.constructor:void 0).prototype;return(me=d(this,j,[V,Y])).__proto__=le,me.constructor=j,me.name="NotFoundError",me}return b(j,R),r(j)}(A),E=function(R){function j(V,Y){var me;f(this,j);var le=(this instanceof j?this.constructor:void 0).prototype;return(me=d(this,j,[V,Y])).__proto__=le,me.constructor=j,me.name="BadRequestError",me}return b(j,R),r(j)}(A),N=function(R){function j(V,Y){var me;f(this,j);var le=(this instanceof j?this.constructor:void 0).prototype;return(me=d(this,j,[V,Y])).__proto__=le,me.constructor=j,me.name="BadResponseError",me}return b(j,R),r(j)}(A),F=function(R){function j(V,Y,me){var le;f(this,j);var C=(this instanceof j?this.constructor:void 0).prototype;return(le=d(this,j,[V])).__proto__=C,le.constructor=j,le.name="AccountRequiresMemoError",le.accountId=Y,le.operationIndex=me,le}return b(j,R),r(j)}(T(Error))},7600:(o,a,i)=>{"use strict";i.r(a),i.d(a,{Api:()=>s,FEDERATION_RESPONSE_MAX_SIZE:()=>R,Server:()=>j});var s={};i.r(s),i.d(s,{Api:()=>{}});var f=i(6266),u=i(356),r=i(4193),_=i.n(r),d=i(8732),b=i(5885),T=i(3898);function w(V){return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Y){return typeof Y}:function(Y){return Y&&typeof Symbol=="function"&&Y.constructor===Symbol&&Y!==Symbol.prototype?"symbol":typeof Y},w(V)}function g(V,Y){return function(me){if(Array.isArray(me))return me}(V)||function(me,le){var C=me==null?null:typeof Symbol<"u"&&me[Symbol.iterator]||me["@@iterator"];if(C!=null){var q,X,ae,I,S=[],m=!0,P=!1;try{if(ae=(C=C.call(me)).next,le===0){if(Object(C)!==C)return;m=!1}else for(;!(m=(q=ae.call(C)).done)&&(S.push(q.value),S.length!==le);m=!0);}catch(l){P=!0,X=l}finally{try{if(!m&&C.return!=null&&(I=C.return(),Object(I)!==I))return}finally{if(P)throw X}}return S}}(V,Y)||function(me,le){if(me){if(typeof me=="string")return p(me,le);var C=Object.prototype.toString.call(me).slice(8,-1);if(C==="Object"&&me.constructor&&(C=me.constructor.name),C==="Map"||C==="Set")return Array.from(me);if(C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C))return p(me,le)}}(V,Y)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
32
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function p(V,Y){(Y==null||Y>V.length)&&(Y=V.length);for(var me=0,le=new Array(Y);me<Y;me++)le[me]=V[me];return le}function A(){A=function(){return Y};var V,Y={},me=Object.prototype,le=me.hasOwnProperty,C=Object.defineProperty||function(ue,c,y){ue[c]=y.value},q=typeof Symbol=="function"?Symbol:{},X=q.iterator||"@@iterator",ae=q.asyncIterator||"@@asyncIterator",I=q.toStringTag||"@@toStringTag";function S(ue,c,y){return Object.defineProperty(ue,c,{value:y,enumerable:!0,configurable:!0,writable:!0}),ue[c]}try{S({},"")}catch{S=function(c,y,v){return c[y]=v}}function m(ue,c,y,v){var B=c&&c.prototype instanceof oe?c:oe,O=Object.create(B.prototype),h=new $e(v||[]);return C(O,"_invoke",{value:We(ue,y,h)}),O}function P(ue,c,y){try{return{type:"normal",arg:ue.call(c,y)}}catch(v){return{type:"throw",arg:v}}}Y.wrap=m;var l="suspendedStart",x="suspendedYield",W="executing",K="completed",re={};function oe(){}function Ee(){}function Fe(){}var Oe={};S(Oe,X,function(){return this});var $=Object.getPrototypeOf,de=$&&$($(ve([])));de&&de!==me&&le.call(de,X)&&(Oe=de);var we=Fe.prototype=oe.prototype=Object.create(Oe);function Qe(ue){["next","throw","return"].forEach(function(c){S(ue,c,function(y){return this._invoke(c,y)})})}function ze(ue,c){function y(B,O,h,k){var U=P(ue[B],ue,O);if(U.type!=="throw"){var M=U.arg,J=M.value;return J&&w(J)=="object"&&le.call(J,"__await")?c.resolve(J.__await).then(function(pe){y("next",pe,h,k)},function(pe){y("throw",pe,h,k)}):c.resolve(J).then(function(pe){M.value=pe,h(M)},function(pe){return y("throw",pe,h,k)})}k(U.arg)}var v;C(this,"_invoke",{value:function(B,O){function h(){return new c(function(k,U){y(B,O,k,U)})}return v=v?v.then(h,h):h()}})}function We(ue,c,y){var v=l;return function(B,O){if(v===W)throw Error("Generator is already running");if(v===K){if(B==="throw")throw O;return{value:V,done:!0}}for(y.method=B,y.arg=O;;){var h=y.delegate;if(h){var k=et(h,y);if(k){if(k===re)continue;return k}}if(y.method==="next")y.sent=y._sent=y.arg;else if(y.method==="throw"){if(v===l)throw v=K,y.arg;y.dispatchException(y.arg)}else y.method==="return"&&y.abrupt("return",y.arg);v=W;var U=P(ue,c,y);if(U.type==="normal"){if(v=y.done?K:x,U.arg===re)continue;return{value:U.arg,done:y.done}}U.type==="throw"&&(v=K,y.method="throw",y.arg=U.arg)}}}function et(ue,c){var y=c.method,v=ue.iterator[y];if(v===V)return c.delegate=null,y==="throw"&&ue.iterator.return&&(c.method="return",c.arg=V,et(ue,c),c.method==="throw")||y!=="return"&&(c.method="throw",c.arg=new TypeError("The iterator does not provide a '"+y+"' method")),re;var B=P(v,ue.iterator,c.arg);if(B.type==="throw")return c.method="throw",c.arg=B.arg,c.delegate=null,re;var O=B.arg;return O?O.done?(c[ue.resultName]=O.value,c.next=ue.nextLoc,c.method!=="return"&&(c.method="next",c.arg=V),c.delegate=null,re):O:(c.method="throw",c.arg=new TypeError("iterator result is not an object"),c.delegate=null,re)}function Be(ue){var c={tryLoc:ue[0]};1 in ue&&(c.catchLoc=ue[1]),2 in ue&&(c.finallyLoc=ue[2],c.afterLoc=ue[3]),this.tryEntries.push(c)}function Re(ue){var c=ue.completion||{};c.type="normal",delete c.arg,ue.completion=c}function $e(ue){this.tryEntries=[{tryLoc:"root"}],ue.forEach(Be,this),this.reset(!0)}function ve(ue){if(ue||ue===""){var c=ue[X];if(c)return c.call(ue);if(typeof ue.next=="function")return ue;if(!isNaN(ue.length)){var y=-1,v=function B(){for(;++y<ue.length;)if(le.call(ue,y))return B.value=ue[y],B.done=!1,B;return B.value=V,B.done=!0,B};return v.next=v}}throw new TypeError(w(ue)+" is not iterable")}return Ee.prototype=Fe,C(we,"constructor",{value:Fe,configurable:!0}),C(Fe,"constructor",{value:Ee,configurable:!0}),Ee.displayName=S(Fe,I,"GeneratorFunction"),Y.isGeneratorFunction=function(ue){var c=typeof ue=="function"&&ue.constructor;return!!c&&(c===Ee||(c.displayName||c.name)==="GeneratorFunction")},Y.mark=function(ue){return Object.setPrototypeOf?Object.setPrototypeOf(ue,Fe):(ue.__proto__=Fe,S(ue,I,"GeneratorFunction")),ue.prototype=Object.create(we),ue},Y.awrap=function(ue){return{__await:ue}},Qe(ze.prototype),S(ze.prototype,ae,function(){return this}),Y.AsyncIterator=ze,Y.async=function(ue,c,y,v,B){B===void 0&&(B=Promise);var O=new ze(m(ue,c,y,v),B);return Y.isGeneratorFunction(c)?O:O.next().then(function(h){return h.done?h.value:O.next()})},Qe(we),S(we,I,"Generator"),S(we,X,function(){return this}),S(we,"toString",function(){return"[object Generator]"}),Y.keys=function(ue){var c=Object(ue),y=[];for(var v in c)y.push(v);return y.reverse(),function B(){for(;y.length;){var O=y.pop();if(O in c)return B.value=O,B.done=!1,B}return B.done=!0,B}},Y.values=ve,$e.prototype={constructor:$e,reset:function(ue){if(this.prev=0,this.next=0,this.sent=this._sent=V,this.done=!1,this.delegate=null,this.method="next",this.arg=V,this.tryEntries.forEach(Re),!ue)for(var c in this)c.charAt(0)==="t"&&le.call(this,c)&&!isNaN(+c.slice(1))&&(this[c]=V)},stop:function(){this.done=!0;var ue=this.tryEntries[0].completion;if(ue.type==="throw")throw ue.arg;return this.rval},dispatchException:function(ue){if(this.done)throw ue;var c=this;function y(U,M){return O.type="throw",O.arg=ue,c.next=U,M&&(c.method="next",c.arg=V),!!M}for(var v=this.tryEntries.length-1;v>=0;--v){var B=this.tryEntries[v],O=B.completion;if(B.tryLoc==="root")return y("end");if(B.tryLoc<=this.prev){var h=le.call(B,"catchLoc"),k=le.call(B,"finallyLoc");if(h&&k){if(this.prev<B.catchLoc)return y(B.catchLoc,!0);if(this.prev<B.finallyLoc)return y(B.finallyLoc)}else if(h){if(this.prev<B.catchLoc)return y(B.catchLoc,!0)}else{if(!k)throw Error("try statement without catch or finally");if(this.prev<B.finallyLoc)return y(B.finallyLoc)}}}},abrupt:function(ue,c){for(var y=this.tryEntries.length-1;y>=0;--y){var v=this.tryEntries[y];if(v.tryLoc<=this.prev&&le.call(v,"finallyLoc")&&this.prev<v.finallyLoc){var B=v;break}}B&&(ue==="break"||ue==="continue")&&B.tryLoc<=c&&c<=B.finallyLoc&&(B=null);var O=B?B.completion:{};return O.type=ue,O.arg=c,B?(this.method="next",this.next=B.finallyLoc,re):this.complete(O)},complete:function(ue,c){if(ue.type==="throw")throw ue.arg;return ue.type==="break"||ue.type==="continue"?this.next=ue.arg:ue.type==="return"?(this.rval=this.arg=ue.arg,this.method="return",this.next="end"):ue.type==="normal"&&c&&(this.next=c),re},finish:function(ue){for(var c=this.tryEntries.length-1;c>=0;--c){var y=this.tryEntries[c];if(y.finallyLoc===ue)return this.complete(y.completion,y.afterLoc),Re(y),re}},catch:function(ue){for(var c=this.tryEntries.length-1;c>=0;--c){var y=this.tryEntries[c];if(y.tryLoc===ue){var v=y.completion;if(v.type==="throw"){var B=v.arg;Re(y)}return B}}throw Error("illegal catch attempt")},delegateYield:function(ue,c,y){return this.delegate={iterator:ve(ue),resultName:c,nextLoc:y},this.method==="next"&&(this.arg=V),re}},Y}function L(V,Y,me,le,C,q,X){try{var ae=V[q](X),I=ae.value}catch(S){return void me(S)}ae.done?Y(I):Promise.resolve(I).then(le,C)}function E(V){return function(){var Y=this,me=arguments;return new Promise(function(le,C){var q=V.apply(Y,me);function X(I){L(q,le,C,X,ae,"next",I)}function ae(I){L(q,le,C,X,ae,"throw",I)}X(void 0)})}}function N(V,Y){for(var me=0;me<Y.length;me++){var le=Y[me];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(V,F(le.key),le)}}function F(V){var Y=function(me,le){if(w(me)!="object"||!me)return me;var C=me[Symbol.toPrimitive];if(C!==void 0){var q=C.call(me,le||"default");if(w(q)!="object")return q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(le==="string"?String:Number)(me)}(V,"string");return w(Y)=="symbol"?Y:Y+""}var R=102400,j=function(){function V(m,P){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};(function(W,K){if(!(W instanceof K))throw new TypeError("Cannot call a class as a function")})(this,V),this.serverURL=_()(m),this.domain=P;var x=l.allowHttp===void 0?d.T.isAllowHttp():l.allowHttp;if(this.timeout=l.timeout===void 0?d.T.getTimeout():l.timeout,this.serverURL.protocol()!=="https"&&!x)throw new Error("Cannot connect to insecure federation server")}return Y=V,me=[{key:"resolveAddress",value:(S=E(A().mark(function m(P){var l,x;return A().wrap(function(W){for(;;)switch(W.prev=W.next){case 0:if(l=P,!(P.indexOf("*")<0)){W.next=5;break}if(this.domain){W.next=4;break}return W.abrupt("return",Promise.reject(new Error("Unknown domain. Make sure `address` contains a domain (ex. `bob*stellar.org`) or pass `domain` parameter when instantiating the server object.")));case 4:l="".concat(P,"*").concat(this.domain);case 5:return x=this.serverURL.query({type:"name",q:l}),W.abrupt("return",this._sendRequest(x));case 7:case"end":return W.stop()}},m,this)})),function(m){return S.apply(this,arguments)})},{key:"resolveAccountId",value:(I=E(A().mark(function m(P){var l;return A().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return l=this.serverURL.query({type:"id",q:P}),x.abrupt("return",this._sendRequest(l));case 2:case"end":return x.stop()}},m,this)})),function(m){return I.apply(this,arguments)})},{key:"resolveTransactionId",value:(ae=E(A().mark(function m(P){var l;return A().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return l=this.serverURL.query({type:"txid",q:P}),x.abrupt("return",this._sendRequest(l));case 2:case"end":return x.stop()}},m,this)})),function(m){return ae.apply(this,arguments)})},{key:"_sendRequest",value:(X=E(A().mark(function m(P){var l;return A().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return l=this.timeout,x.abrupt("return",f.A.get(P.toString(),{maxContentLength:R,timeout:l}).then(function(W){if(W.data.memo!==void 0&&typeof W.data.memo!="string")throw new Error("memo value should be of type string");return W.data}).catch(function(W){if(W instanceof Error){if(W.message.match(/^maxContentLength size/))throw new Error("federation response exceeds allowed size of ".concat(R));return Promise.reject(W)}return Promise.reject(new b.nS("Server query failed. Server responded: ".concat(W.status," ").concat(W.statusText),W.data))}));case 2:case"end":return x.stop()}},m,this)})),function(m){return X.apply(this,arguments)})}],le=[{key:"resolve",value:(q=E(A().mark(function m(P){var l,x,W,K,re,oe=arguments;return A().wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:if(l=oe.length>1&&oe[1]!==void 0?oe[1]:{},!(P.indexOf("*")<0)){Ee.next=5;break}if(u.StrKey.isValidEd25519PublicKey(P)){Ee.next=4;break}return Ee.abrupt("return",Promise.reject(new Error("Invalid Account ID")));case 4:return Ee.abrupt("return",Promise.resolve({account_id:P}));case 5:if(x=P.split("*"),W=g(x,2),K=W[1],x.length===2&&K){Ee.next=9;break}return Ee.abrupt("return",Promise.reject(new Error("Invalid Stellar address")));case 9:return Ee.next=11,V.createForDomain(K,l);case 11:return re=Ee.sent,Ee.abrupt("return",re.resolveAddress(P));case 13:case"end":return Ee.stop()}},m)})),function(m){return q.apply(this,arguments)})},{key:"createForDomain",value:(C=E(A().mark(function m(P){var l,x,W=arguments;return A().wrap(function(K){for(;;)switch(K.prev=K.next){case 0:return l=W.length>1&&W[1]!==void 0?W[1]:{},K.next=3,T.Resolver.resolve(P,l);case 3:if((x=K.sent).FEDERATION_SERVER){K.next=6;break}return K.abrupt("return",Promise.reject(new Error("stellar.toml does not contain FEDERATION_SERVER field")));case 6:return K.abrupt("return",new V(x.FEDERATION_SERVER,P,l));case 7:case"end":return K.stop()}},m)})),function(m){return C.apply(this,arguments)})}],me&&N(Y.prototype,me),le&&N(Y,le),Object.defineProperty(Y,"prototype",{writable:!1}),Y;var Y,me,le,C,q,X,ae,I,S}()},8242:(o,a,i)=>{"use strict";i.r(a),i.d(a,{Api:()=>{}})},2731:(o,a,i)=>{"use strict";var s,f;i.r(a),i.d(a,{AccountResponse:()=>A,AxiosClient:()=>Qe,HorizonApi:()=>s,SERVER_TIME_MAP:()=>$,Server:()=>cu,ServerApi:()=>f,default:()=>Ja,getCurrentServerTime:()=>ze}),function(ge){var Z=function(Ke){return Ke.constantProduct="constant_product",Ke}({});ge.LiquidityPoolType=Z;var z=function(Ke){return Ke.createAccount="create_account",Ke.payment="payment",Ke.pathPayment="path_payment_strict_receive",Ke.createPassiveOffer="create_passive_sell_offer",Ke.manageOffer="manage_sell_offer",Ke.setOptions="set_options",Ke.changeTrust="change_trust",Ke.allowTrust="allow_trust",Ke.accountMerge="account_merge",Ke.inflation="inflation",Ke.manageData="manage_data",Ke.bumpSequence="bump_sequence",Ke.manageBuyOffer="manage_buy_offer",Ke.pathPaymentStrictSend="path_payment_strict_send",Ke.createClaimableBalance="create_claimable_balance",Ke.claimClaimableBalance="claim_claimable_balance",Ke.beginSponsoringFutureReserves="begin_sponsoring_future_reserves",Ke.endSponsoringFutureReserves="end_sponsoring_future_reserves",Ke.revokeSponsorship="revoke_sponsorship",Ke.clawback="clawback",Ke.clawbackClaimableBalance="clawback_claimable_balance",Ke.setTrustLineFlags="set_trust_line_flags",Ke.liquidityPoolDeposit="liquidity_pool_deposit",Ke.liquidityPoolWithdraw="liquidity_pool_withdraw",Ke.invokeHostFunction="invoke_host_function",Ke.bumpFootprintExpiration="bump_footprint_expiration",Ke.restoreFootprint="restore_footprint",Ke}({});ge.OperationResponseType=z;var te=function(Ke){return Ke[Ke.createAccount=0]="createAccount",Ke[Ke.payment=1]="payment",Ke[Ke.pathPayment=2]="pathPayment",Ke[Ke.createPassiveOffer=3]="createPassiveOffer",Ke[Ke.manageOffer=4]="manageOffer",Ke[Ke.setOptions=5]="setOptions",Ke[Ke.changeTrust=6]="changeTrust",Ke[Ke.allowTrust=7]="allowTrust",Ke[Ke.accountMerge=8]="accountMerge",Ke[Ke.inflation=9]="inflation",Ke[Ke.manageData=10]="manageData",Ke[Ke.bumpSequence=11]="bumpSequence",Ke[Ke.manageBuyOffer=12]="manageBuyOffer",Ke[Ke.pathPaymentStrictSend=13]="pathPaymentStrictSend",Ke[Ke.createClaimableBalance=14]="createClaimableBalance",Ke[Ke.claimClaimableBalance=15]="claimClaimableBalance",Ke[Ke.beginSponsoringFutureReserves=16]="beginSponsoringFutureReserves",Ke[Ke.endSponsoringFutureReserves=17]="endSponsoringFutureReserves",Ke[Ke.revokeSponsorship=18]="revokeSponsorship",Ke[Ke.clawback=19]="clawback",Ke[Ke.clawbackClaimableBalance=20]="clawbackClaimableBalance",Ke[Ke.setTrustLineFlags=21]="setTrustLineFlags",Ke[Ke.liquidityPoolDeposit=22]="liquidityPoolDeposit",Ke[Ke.liquidityPoolWithdraw=23]="liquidityPoolWithdraw",Ke[Ke.invokeHostFunction=24]="invokeHostFunction",Ke[Ke.bumpFootprintExpiration=25]="bumpFootprintExpiration",Ke[Ke.restoreFootprint=26]="restoreFootprint",Ke}({});ge.OperationResponseTypeI=te;var Ve=function(Ke){return Ke.TX_FAILED="tx_failed",Ke.TX_BAD_SEQ="tx_bad_seq",Ke.TX_BAD_AUTH="tx_bad_auth",Ke.TX_BAD_AUTH_EXTRA="tx_bad_auth_extra",Ke.TX_FEE_BUMP_INNER_SUCCESS="tx_fee_bump_inner_success",Ke.TX_FEE_BUMP_INNER_FAILED="tx_fee_bump_inner_failed",Ke.TX_NOT_SUPPORTED="tx_not_supported",Ke.TX_SUCCESS="tx_success",Ke.TX_TOO_EARLY="tx_too_early",Ke.TX_TOO_LATE="tx_too_late",Ke.TX_MISSING_OPERATION="tx_missing_operation",Ke.TX_INSUFFICIENT_BALANCE="tx_insufficient_balance",Ke.TX_NO_SOURCE_ACCOUNT="tx_no_source_account",Ke.TX_INSUFFICIENT_FEE="tx_insufficient_fee",Ke.TX_INTERNAL_ERROR="tx_internal_error",Ke}({});ge.TransactionFailedResultCodes=Ve}(s||(s={})),function(ge){var Z=function(z){return z.all="all",z.liquidityPools="liquidity_pool",z.orderbook="orderbook",z}({});ge.TradeType=Z,s.OperationResponseType,s.OperationResponseTypeI}(f||(f={}));var u=i(356);function r(ge){return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},r(ge)}function _(ge,Z){return function(z){if(Array.isArray(z))return z}(ge)||function(z,te){var Ve=z==null?null:typeof Symbol<"u"&&z[Symbol.iterator]||z["@@iterator"];if(Ve!=null){var Ke,zt,_r,Ar,mr=[],ln=!0,an=!1;try{if(_r=(Ve=Ve.call(z)).next,te===0){if(Object(Ve)!==Ve)return;ln=!1}else for(;!(ln=(Ke=_r.call(Ve)).done)&&(mr.push(Ke.value),mr.length!==te);ln=!0);}catch(vr){an=!0,zt=vr}finally{try{if(!ln&&Ve.return!=null&&(Ar=Ve.return(),Object(Ar)!==Ar))return}finally{if(an)throw zt}}return mr}}(ge,Z)||function(z,te){if(z){if(typeof z=="string")return d(z,te);var Ve=Object.prototype.toString.call(z).slice(8,-1);if(Ve==="Object"&&z.constructor&&(Ve=z.constructor.name),Ve==="Map"||Ve==="Set")return Array.from(z);if(Ve==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ve))return d(z,te)}}(ge,Z)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
33
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function d(ge,Z){(Z==null||Z>ge.length)&&(Z=ge.length);for(var z=0,te=new Array(Z);z<Z;z++)te[z]=ge[z];return te}function b(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,T(te.key),te)}}function T(ge){var Z=function(z,te){if(r(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(r(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return r(Z)=="symbol"?Z:Z+""}var w,g,p,A=(w=function ge(Z){var z=this;(function(te,Ve){if(!(te instanceof Ve))throw new TypeError("Cannot call a class as a function")})(this,ge),this._baseAccount=new u.Account(Z.account_id,Z.sequence),Object.entries(Z).forEach(function(te){var Ve=_(te,2),Ke=Ve[0],zt=Ve[1];z[Ke]=zt})},(g=[{key:"accountId",value:function(){return this._baseAccount.accountId()}},{key:"sequenceNumber",value:function(){return this._baseAccount.sequenceNumber()}},{key:"incrementSequenceNumber",value:function(){this._baseAccount.incrementSequenceNumber(),this.sequence=this._baseAccount.sequenceNumber()}}])&&b(w.prototype,g),p&&b(w,p),Object.defineProperty(w,"prototype",{writable:!1}),w),L=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,E=Math.ceil,N=Math.floor,F="[BigNumber Error] ",R=F+"Number primitive has more than 15 significant digits: ",j=1e14,V=14,Y=9007199254740991,me=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],le=1e7,C=1e9;function q(ge){var Z=0|ge;return ge>0||ge===Z?Z:Z-1}function X(ge){for(var Z,z,te=1,Ve=ge.length,Ke=ge[0]+"";te<Ve;){for(Z=ge[te++]+"",z=V-Z.length;z--;Z="0"+Z);Ke+=Z}for(Ve=Ke.length;Ke.charCodeAt(--Ve)===48;);return Ke.slice(0,Ve+1||1)}function ae(ge,Z){var z,te,Ve=ge.c,Ke=Z.c,zt=ge.s,_r=Z.s,Ar=ge.e,mr=Z.e;if(!zt||!_r)return null;if(z=Ve&&!Ve[0],te=Ke&&!Ke[0],z||te)return z?te?0:-_r:zt;if(zt!=_r)return zt;if(z=zt<0,te=Ar==mr,!Ve||!Ke)return te?0:!Ve^z?1:-1;if(!te)return Ar>mr^z?1:-1;for(_r=(Ar=Ve.length)<(mr=Ke.length)?Ar:mr,zt=0;zt<_r;zt++)if(Ve[zt]!=Ke[zt])return Ve[zt]>Ke[zt]^z?1:-1;return Ar==mr?0:Ar>mr^z?1:-1}function I(ge,Z,z,te){if(ge<Z||ge>z||ge!==N(ge))throw Error(F+(te||"Argument")+(typeof ge=="number"?ge<Z||ge>z?" out of range: ":" not an integer: ":" not a primitive number: ")+String(ge))}function S(ge){var Z=ge.c.length-1;return q(ge.e/V)==Z&&ge.c[Z]%2!=0}function m(ge,Z){return(ge.length>1?ge.charAt(0)+"."+ge.slice(1):ge)+(Z<0?"e":"e+")+Z}function P(ge,Z,z){var te,Ve;if(Z<0){for(Ve=z+".";++Z;Ve+=z);ge=Ve+ge}else if(++Z>(te=ge.length)){for(Ve=z,Z-=te;--Z;Ve+=z);ge+=Ve}else Z<te&&(ge=ge.slice(0,Z)+"."+ge.slice(Z));return ge}var l=function ge(Z){var z,te,Ve,Ke,zt,_r,Ar,mr,ln,an,vr=nr.prototype={constructor:nr,toString:null,valueOf:null},Yn=new nr(1),pn=20,en=4,Qr=-7,bn=21,wn=-1e7,rn=1e7,Cn=!1,Sn=1,yn=0,Tn={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},Gn="0123456789abcdefghijklmnopqrstuvwxyz",zn=!0;function nr(_e,ke){var He,ht,Ze,pt,wt,vt,kt,Dt,Bt=this;if(!(Bt instanceof nr))return new nr(_e,ke);if(ke==null){if(_e&&_e._isBigNumber===!0)return Bt.s=_e.s,void(!_e.c||_e.e>rn?Bt.c=Bt.e=null:_e.e<wn?Bt.c=[Bt.e=0]:(Bt.e=_e.e,Bt.c=_e.c.slice()));if((vt=typeof _e=="number")&&0*_e==0){if(Bt.s=1/_e<0?(_e=-_e,-1):1,_e===~~_e){for(pt=0,wt=_e;wt>=10;wt/=10,pt++);return void(pt>rn?Bt.c=Bt.e=null:(Bt.e=pt,Bt.c=[_e]))}Dt=String(_e)}else{if(!L.test(Dt=String(_e)))return Ve(Bt,Dt,vt);Bt.s=Dt.charCodeAt(0)==45?(Dt=Dt.slice(1),-1):1}(pt=Dt.indexOf("."))>-1&&(Dt=Dt.replace(".","")),(wt=Dt.search(/e/i))>0?(pt<0&&(pt=wt),pt+=+Dt.slice(wt+1),Dt=Dt.substring(0,wt)):pt<0&&(pt=Dt.length)}else{if(I(ke,2,Gn.length,"Base"),ke==10&&zn)return kn(Bt=new nr(_e),pn+Bt.e+1,en);if(Dt=String(_e),vt=typeof _e=="number"){if(0*_e!=0)return Ve(Bt,Dt,vt,ke);if(Bt.s=1/_e<0?(Dt=Dt.slice(1),-1):1,nr.DEBUG&&Dt.replace(/^0\.0*|\./,"").length>15)throw Error(R+_e)}else Bt.s=Dt.charCodeAt(0)===45?(Dt=Dt.slice(1),-1):1;for(He=Gn.slice(0,ke),pt=wt=0,kt=Dt.length;wt<kt;wt++)if(He.indexOf(ht=Dt.charAt(wt))<0){if(ht=="."){if(wt>pt){pt=kt;continue}}else if(!Ze&&(Dt==Dt.toUpperCase()&&(Dt=Dt.toLowerCase())||Dt==Dt.toLowerCase()&&(Dt=Dt.toUpperCase()))){Ze=!0,wt=-1,pt=0;continue}return Ve(Bt,String(_e),vt,ke)}vt=!1,(pt=(Dt=te(Dt,ke,10,Bt.s)).indexOf("."))>-1?Dt=Dt.replace(".",""):pt=Dt.length}for(wt=0;Dt.charCodeAt(wt)===48;wt++);for(kt=Dt.length;Dt.charCodeAt(--kt)===48;);if(Dt=Dt.slice(wt,++kt)){if(kt-=wt,vt&&nr.DEBUG&&kt>15&&(_e>Y||_e!==N(_e)))throw Error(R+Bt.s*_e);if((pt=pt-wt-1)>rn)Bt.c=Bt.e=null;else if(pt<wn)Bt.c=[Bt.e=0];else{if(Bt.e=pt,Bt.c=[],wt=(pt+1)%V,pt<0&&(wt+=V),wt<kt){for(wt&&Bt.c.push(+Dt.slice(0,wt)),kt-=V;wt<kt;)Bt.c.push(+Dt.slice(wt,wt+=V));wt=V-(Dt=Dt.slice(wt)).length}else wt-=kt;for(;wt--;Dt+="0");Bt.c.push(+Dt)}}else Bt.c=[Bt.e=0]}function ko(_e,ke,He,ht){var Ze,pt,wt,vt,kt;if(He==null?He=en:I(He,0,8),!_e.c)return _e.toString();if(Ze=_e.c[0],wt=_e.e,ke==null)kt=X(_e.c),kt=ht==1||ht==2&&(wt<=Qr||wt>=bn)?m(kt,wt):P(kt,wt,"0");else if(pt=(_e=kn(new nr(_e),ke,He)).e,vt=(kt=X(_e.c)).length,ht==1||ht==2&&(ke<=pt||pt<=Qr)){for(;vt<ke;kt+="0",vt++);kt=m(kt,pt)}else if(ke-=wt,kt=P(kt,pt,"0"),pt+1>vt){if(--ke>0)for(kt+=".";ke--;kt+="0");}else if((ke+=pt-vt)>0)for(pt+1==vt&&(kt+=".");ke--;kt+="0");return _e.s<0&&Ze?"-"+kt:kt}function si(_e,ke){for(var He,ht,Ze=1,pt=new nr(_e[0]);Ze<_e.length;Ze++)(!(ht=new nr(_e[Ze])).s||(He=ae(pt,ht))===ke||He===0&&pt.s===ke)&&(pt=ht);return pt}function Oo(_e,ke,He){for(var ht=1,Ze=ke.length;!ke[--Ze];ke.pop());for(Ze=ke[0];Ze>=10;Ze/=10,ht++);return(He=ht+He*V-1)>rn?_e.c=_e.e=null:He<wn?_e.c=[_e.e=0]:(_e.e=He,_e.c=ke),_e}function kn(_e,ke,He,ht){var Ze,pt,wt,vt,kt,Dt,Bt,ar=_e.c,Ir=me;if(ar){e:{for(Ze=1,vt=ar[0];vt>=10;vt/=10,Ze++);if((pt=ke-Ze)<0)pt+=V,wt=ke,kt=ar[Dt=0],Bt=N(kt/Ir[Ze-wt-1]%10);else if((Dt=E((pt+1)/V))>=ar.length){if(!ht)break e;for(;ar.length<=Dt;ar.push(0));kt=Bt=0,Ze=1,wt=(pt%=V)-V+1}else{for(kt=vt=ar[Dt],Ze=1;vt>=10;vt/=10,Ze++);Bt=(wt=(pt%=V)-V+Ze)<0?0:N(kt/Ir[Ze-wt-1]%10)}if(ht=ht||ke<0||ar[Dt+1]!=null||(wt<0?kt:kt%Ir[Ze-wt-1]),ht=He<4?(Bt||ht)&&(He==0||He==(_e.s<0?3:2)):Bt>5||Bt==5&&(He==4||ht||He==6&&(pt>0?wt>0?kt/Ir[Ze-wt]:0:ar[Dt-1])%10&1||He==(_e.s<0?8:7)),ke<1||!ar[0])return ar.length=0,ht?(ke-=_e.e+1,ar[0]=Ir[(V-ke%V)%V],_e.e=-ke||0):ar[0]=_e.e=0,_e;if(pt==0?(ar.length=Dt,vt=1,Dt--):(ar.length=Dt+1,vt=Ir[V-pt],ar[Dt]=wt>0?N(kt/Ir[Ze-wt]%Ir[wt])*vt:0),ht)for(;;){if(Dt==0){for(pt=1,wt=ar[0];wt>=10;wt/=10,pt++);for(wt=ar[0]+=vt,vt=1;wt>=10;wt/=10,vt++);pt!=vt&&(_e.e++,ar[0]==j&&(ar[0]=1));break}if(ar[Dt]+=vt,ar[Dt]!=j)break;ar[Dt--]=0,vt=1}for(pt=ar.length;ar[--pt]===0;ar.pop());}_e.e>rn?_e.c=_e.e=null:_e.e<wn&&(_e.c=[_e.e=0])}return _e}function Xn(_e){var ke,He=_e.e;return He===null?_e.toString():(ke=X(_e.c),ke=He<=Qr||He>=bn?m(ke,He):P(ke,He,"0"),_e.s<0?"-"+ke:ke)}return nr.clone=ge,nr.ROUND_UP=0,nr.ROUND_DOWN=1,nr.ROUND_CEIL=2,nr.ROUND_FLOOR=3,nr.ROUND_HALF_UP=4,nr.ROUND_HALF_DOWN=5,nr.ROUND_HALF_EVEN=6,nr.ROUND_HALF_CEIL=7,nr.ROUND_HALF_FLOOR=8,nr.EUCLID=9,nr.config=nr.set=function(_e){var ke,He;if(_e!=null){if(typeof _e!="object")throw Error(F+"Object expected: "+_e);if(_e.hasOwnProperty(ke="DECIMAL_PLACES")&&(I(He=_e[ke],0,C,ke),pn=He),_e.hasOwnProperty(ke="ROUNDING_MODE")&&(I(He=_e[ke],0,8,ke),en=He),_e.hasOwnProperty(ke="EXPONENTIAL_AT")&&((He=_e[ke])&&He.pop?(I(He[0],-C,0,ke),I(He[1],0,C,ke),Qr=He[0],bn=He[1]):(I(He,-C,C,ke),Qr=-(bn=He<0?-He:He))),_e.hasOwnProperty(ke="RANGE"))if((He=_e[ke])&&He.pop)I(He[0],-C,-1,ke),I(He[1],1,C,ke),wn=He[0],rn=He[1];else{if(I(He,-C,C,ke),!He)throw Error(F+ke+" cannot be zero: "+He);wn=-(rn=He<0?-He:He)}if(_e.hasOwnProperty(ke="CRYPTO")){if((He=_e[ke])!==!!He)throw Error(F+ke+" not true or false: "+He);if(He){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Cn=!He,Error(F+"crypto unavailable");Cn=He}else Cn=He}if(_e.hasOwnProperty(ke="MODULO_MODE")&&(I(He=_e[ke],0,9,ke),Sn=He),_e.hasOwnProperty(ke="POW_PRECISION")&&(I(He=_e[ke],0,C,ke),yn=He),_e.hasOwnProperty(ke="FORMAT")){if(typeof(He=_e[ke])!="object")throw Error(F+ke+" not an object: "+He);Tn=He}if(_e.hasOwnProperty(ke="ALPHABET")){if(typeof(He=_e[ke])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(He))throw Error(F+ke+" invalid: "+He);zn=He.slice(0,10)=="0123456789",Gn=He}}return{DECIMAL_PLACES:pn,ROUNDING_MODE:en,EXPONENTIAL_AT:[Qr,bn],RANGE:[wn,rn],CRYPTO:Cn,MODULO_MODE:Sn,POW_PRECISION:yn,FORMAT:Tn,ALPHABET:Gn}},nr.isBigNumber=function(_e){if(!_e||_e._isBigNumber!==!0)return!1;if(!nr.DEBUG)return!0;var ke,He,ht=_e.c,Ze=_e.e,pt=_e.s;e:if({}.toString.call(ht)=="[object Array]"){if((pt===1||pt===-1)&&Ze>=-C&&Ze<=C&&Ze===N(Ze)){if(ht[0]===0){if(Ze===0&&ht.length===1)return!0;break e}if((ke=(Ze+1)%V)<1&&(ke+=V),String(ht[0]).length==ke){for(ke=0;ke<ht.length;ke++)if((He=ht[ke])<0||He>=j||He!==N(He))break e;if(He!==0)return!0}}}else if(ht===null&&Ze===null&&(pt===null||pt===1||pt===-1))return!0;throw Error(F+"Invalid BigNumber: "+_e)},nr.maximum=nr.max=function(){return si(arguments,-1)},nr.minimum=nr.min=function(){return si(arguments,1)},nr.random=(Ke=9007199254740992,zt=Math.random()*Ke&2097151?function(){return N(Math.random()*Ke)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(_e){var ke,He,ht,Ze,pt,wt=0,vt=[],kt=new nr(Yn);if(_e==null?_e=pn:I(_e,0,C),Ze=E(_e/V),Cn)if(crypto.getRandomValues){for(ke=crypto.getRandomValues(new Uint32Array(Ze*=2));wt<Ze;)(pt=131072*ke[wt]+(ke[wt+1]>>>11))>=9e15?(He=crypto.getRandomValues(new Uint32Array(2)),ke[wt]=He[0],ke[wt+1]=He[1]):(vt.push(pt%1e14),wt+=2);wt=Ze/2}else{if(!crypto.randomBytes)throw Cn=!1,Error(F+"crypto unavailable");for(ke=crypto.randomBytes(Ze*=7);wt<Ze;)(pt=281474976710656*(31&ke[wt])+1099511627776*ke[wt+1]+4294967296*ke[wt+2]+16777216*ke[wt+3]+(ke[wt+4]<<16)+(ke[wt+5]<<8)+ke[wt+6])>=9e15?crypto.randomBytes(7).copy(ke,wt):(vt.push(pt%1e14),wt+=7);wt=Ze/7}if(!Cn)for(;wt<Ze;)(pt=zt())<9e15&&(vt[wt++]=pt%1e14);for(Ze=vt[--wt],_e%=V,Ze&&_e&&(pt=me[V-_e],vt[wt]=N(Ze/pt)*pt);vt[wt]===0;vt.pop(),wt--);if(wt<0)vt=[ht=0];else{for(ht=-1;vt[0]===0;vt.splice(0,1),ht-=V);for(wt=1,pt=vt[0];pt>=10;pt/=10,wt++);wt<V&&(ht-=V-wt)}return kt.e=ht,kt.c=vt,kt}),nr.sum=function(){for(var _e=1,ke=arguments,He=new nr(ke[0]);_e<ke.length;)He=He.plus(ke[_e++]);return He},te=function(){var _e="0123456789";function ke(He,ht,Ze,pt){for(var wt,vt,kt=[0],Dt=0,Bt=He.length;Dt<Bt;){for(vt=kt.length;vt--;kt[vt]*=ht);for(kt[0]+=pt.indexOf(He.charAt(Dt++)),wt=0;wt<kt.length;wt++)kt[wt]>Ze-1&&(kt[wt+1]==null&&(kt[wt+1]=0),kt[wt+1]+=kt[wt]/Ze|0,kt[wt]%=Ze)}return kt.reverse()}return function(He,ht,Ze,pt,wt){var vt,kt,Dt,Bt,ar,Ir,Ur,nn,An=He.indexOf("."),Bn=pn,tn=en;for(An>=0&&(Bt=yn,yn=0,He=He.replace(".",""),Ir=(nn=new nr(ht)).pow(He.length-An),yn=Bt,nn.c=ke(P(X(Ir.c),Ir.e,"0"),10,Ze,_e),nn.e=nn.c.length),Dt=Bt=(Ur=ke(He,ht,Ze,wt?(vt=Gn,_e):(vt=_e,Gn))).length;Ur[--Bt]==0;Ur.pop());if(!Ur[0])return vt.charAt(0);if(An<0?--Dt:(Ir.c=Ur,Ir.e=Dt,Ir.s=pt,Ur=(Ir=z(Ir,nn,Bn,tn,Ze)).c,ar=Ir.r,Dt=Ir.e),An=Ur[kt=Dt+Bn+1],Bt=Ze/2,ar=ar||kt<0||Ur[kt+1]!=null,ar=tn<4?(An!=null||ar)&&(tn==0||tn==(Ir.s<0?3:2)):An>Bt||An==Bt&&(tn==4||ar||tn==6&&1&Ur[kt-1]||tn==(Ir.s<0?8:7)),kt<1||!Ur[0])He=ar?P(vt.charAt(1),-Bn,vt.charAt(0)):vt.charAt(0);else{if(Ur.length=kt,ar)for(--Ze;++Ur[--kt]>Ze;)Ur[kt]=0,kt||(++Dt,Ur=[1].concat(Ur));for(Bt=Ur.length;!Ur[--Bt];);for(An=0,He="";An<=Bt;He+=vt.charAt(Ur[An++]));He=P(He,Dt,vt.charAt(0))}return He}}(),z=function(){function _e(ht,Ze,pt){var wt,vt,kt,Dt,Bt=0,ar=ht.length,Ir=Ze%le,Ur=Ze/le|0;for(ht=ht.slice();ar--;)Bt=((vt=Ir*(kt=ht[ar]%le)+(wt=Ur*kt+(Dt=ht[ar]/le|0)*Ir)%le*le+Bt)/pt|0)+(wt/le|0)+Ur*Dt,ht[ar]=vt%pt;return Bt&&(ht=[Bt].concat(ht)),ht}function ke(ht,Ze,pt,wt){var vt,kt;if(pt!=wt)kt=pt>wt?1:-1;else for(vt=kt=0;vt<pt;vt++)if(ht[vt]!=Ze[vt]){kt=ht[vt]>Ze[vt]?1:-1;break}return kt}function He(ht,Ze,pt,wt){for(var vt=0;pt--;)ht[pt]-=vt,vt=ht[pt]<Ze[pt]?1:0,ht[pt]=vt*wt+ht[pt]-Ze[pt];for(;!ht[0]&&ht.length>1;ht.splice(0,1));}return function(ht,Ze,pt,wt,vt){var kt,Dt,Bt,ar,Ir,Ur,nn,An,Bn,tn,sn,Wn,lu,wl,Sl,jo,Za,go=ht.s==Ze.s?1:-1,Jn=ht.c,mn=Ze.c;if(!(Jn&&Jn[0]&&mn&&mn[0]))return new nr(ht.s&&Ze.s&&(Jn?!mn||Jn[0]!=mn[0]:mn)?Jn&&Jn[0]==0||!mn?0*go:go/0:NaN);for(Bn=(An=new nr(go)).c=[],go=pt+(Dt=ht.e-Ze.e)+1,vt||(vt=j,Dt=q(ht.e/V)-q(Ze.e/V),go=go/V|0),Bt=0;mn[Bt]==(Jn[Bt]||0);Bt++);if(mn[Bt]>(Jn[Bt]||0)&&Dt--,go<0)Bn.push(1),ar=!0;else{for(wl=Jn.length,jo=mn.length,Bt=0,go+=2,(Ir=N(vt/(mn[0]+1)))>1&&(mn=_e(mn,Ir,vt),Jn=_e(Jn,Ir,vt),jo=mn.length,wl=Jn.length),lu=jo,sn=(tn=Jn.slice(0,jo)).length;sn<jo;tn[sn++]=0);Za=mn.slice(),Za=[0].concat(Za),Sl=mn[0],mn[1]>=vt/2&&Sl++;do{if(Ir=0,(kt=ke(mn,tn,jo,sn))<0){if(Wn=tn[0],jo!=sn&&(Wn=Wn*vt+(tn[1]||0)),(Ir=N(Wn/Sl))>1)for(Ir>=vt&&(Ir=vt-1),nn=(Ur=_e(mn,Ir,vt)).length,sn=tn.length;ke(Ur,tn,nn,sn)==1;)Ir--,He(Ur,jo<nn?Za:mn,nn,vt),nn=Ur.length,kt=1;else Ir==0&&(kt=Ir=1),nn=(Ur=mn.slice()).length;if(nn<sn&&(Ur=[0].concat(Ur)),He(tn,Ur,sn,vt),sn=tn.length,kt==-1)for(;ke(mn,tn,jo,sn)<1;)Ir++,He(tn,jo<sn?Za:mn,sn,vt),sn=tn.length}else kt===0&&(Ir++,tn=[0]);Bn[Bt++]=Ir,tn[0]?tn[sn++]=Jn[lu]||0:(tn=[Jn[lu]],sn=1)}while((lu++<wl||tn[0]!=null)&&go--);ar=tn[0]!=null,Bn[0]||Bn.splice(0,1)}if(vt==j){for(Bt=1,go=Bn[0];go>=10;go/=10,Bt++);kn(An,pt+(An.e=Bt+Dt*V-1)+1,wt,ar)}else An.e=Dt,An.r=+ar;return An}}(),_r=/^(-?)0([xbo])(?=\w[\w.]*$)/i,Ar=/^([^.]+)\.$/,mr=/^\.([^.]+)$/,ln=/^-?(Infinity|NaN)$/,an=/^\s*\+(?=[\w.])|^\s+|\s+$/g,Ve=function(_e,ke,He,ht){var Ze,pt=He?ke:ke.replace(an,"");if(ln.test(pt))_e.s=isNaN(pt)?null:pt<0?-1:1;else{if(!He&&(pt=pt.replace(_r,function(wt,vt,kt){return Ze=(kt=kt.toLowerCase())=="x"?16:kt=="b"?2:8,ht&&ht!=Ze?wt:vt}),ht&&(Ze=ht,pt=pt.replace(Ar,"$1").replace(mr,"0.$1")),ke!=pt))return new nr(pt,Ze);if(nr.DEBUG)throw Error(F+"Not a"+(ht?" base "+ht:"")+" number: "+ke);_e.s=null}_e.c=_e.e=null},vr.absoluteValue=vr.abs=function(){var _e=new nr(this);return _e.s<0&&(_e.s=1),_e},vr.comparedTo=function(_e,ke){return ae(this,new nr(_e,ke))},vr.decimalPlaces=vr.dp=function(_e,ke){var He,ht,Ze,pt=this;if(_e!=null)return I(_e,0,C),ke==null?ke=en:I(ke,0,8),kn(new nr(pt),_e+pt.e+1,ke);if(!(He=pt.c))return null;if(ht=((Ze=He.length-1)-q(this.e/V))*V,Ze=He[Ze])for(;Ze%10==0;Ze/=10,ht--);return ht<0&&(ht=0),ht},vr.dividedBy=vr.div=function(_e,ke){return z(this,new nr(_e,ke),pn,en)},vr.dividedToIntegerBy=vr.idiv=function(_e,ke){return z(this,new nr(_e,ke),0,1)},vr.exponentiatedBy=vr.pow=function(_e,ke){var He,ht,Ze,pt,wt,vt,kt,Dt,Bt=this;if((_e=new nr(_e)).c&&!_e.isInteger())throw Error(F+"Exponent not an integer: "+Xn(_e));if(ke!=null&&(ke=new nr(ke)),wt=_e.e>14,!Bt.c||!Bt.c[0]||Bt.c[0]==1&&!Bt.e&&Bt.c.length==1||!_e.c||!_e.c[0])return Dt=new nr(Math.pow(+Xn(Bt),wt?_e.s*(2-S(_e)):+Xn(_e))),ke?Dt.mod(ke):Dt;if(vt=_e.s<0,ke){if(ke.c?!ke.c[0]:!ke.s)return new nr(NaN);(ht=!vt&&Bt.isInteger()&&ke.isInteger())&&(Bt=Bt.mod(ke))}else{if(_e.e>9&&(Bt.e>0||Bt.e<-1||(Bt.e==0?Bt.c[0]>1||wt&&Bt.c[1]>=24e7:Bt.c[0]<8e13||wt&&Bt.c[0]<=9999975e7)))return pt=Bt.s<0&&S(_e)?-0:0,Bt.e>-1&&(pt=1/pt),new nr(vt?1/pt:pt);yn&&(pt=E(yn/V+2))}for(wt?(He=new nr(.5),vt&&(_e.s=1),kt=S(_e)):kt=(Ze=Math.abs(+Xn(_e)))%2,Dt=new nr(Yn);;){if(kt){if(!(Dt=Dt.times(Bt)).c)break;pt?Dt.c.length>pt&&(Dt.c.length=pt):ht&&(Dt=Dt.mod(ke))}if(Ze){if((Ze=N(Ze/2))===0)break;kt=Ze%2}else if(kn(_e=_e.times(He),_e.e+1,1),_e.e>14)kt=S(_e);else{if((Ze=+Xn(_e))==0)break;kt=Ze%2}Bt=Bt.times(Bt),pt?Bt.c&&Bt.c.length>pt&&(Bt.c.length=pt):ht&&(Bt=Bt.mod(ke))}return ht?Dt:(vt&&(Dt=Yn.div(Dt)),ke?Dt.mod(ke):pt?kn(Dt,yn,en,void 0):Dt)},vr.integerValue=function(_e){var ke=new nr(this);return _e==null?_e=en:I(_e,0,8),kn(ke,ke.e+1,_e)},vr.isEqualTo=vr.eq=function(_e,ke){return ae(this,new nr(_e,ke))===0},vr.isFinite=function(){return!!this.c},vr.isGreaterThan=vr.gt=function(_e,ke){return ae(this,new nr(_e,ke))>0},vr.isGreaterThanOrEqualTo=vr.gte=function(_e,ke){return(ke=ae(this,new nr(_e,ke)))===1||ke===0},vr.isInteger=function(){return!!this.c&&q(this.e/V)>this.c.length-2},vr.isLessThan=vr.lt=function(_e,ke){return ae(this,new nr(_e,ke))<0},vr.isLessThanOrEqualTo=vr.lte=function(_e,ke){return(ke=ae(this,new nr(_e,ke)))===-1||ke===0},vr.isNaN=function(){return!this.s},vr.isNegative=function(){return this.s<0},vr.isPositive=function(){return this.s>0},vr.isZero=function(){return!!this.c&&this.c[0]==0},vr.minus=function(_e,ke){var He,ht,Ze,pt,wt=this,vt=wt.s;if(ke=(_e=new nr(_e,ke)).s,!vt||!ke)return new nr(NaN);if(vt!=ke)return _e.s=-ke,wt.plus(_e);var kt=wt.e/V,Dt=_e.e/V,Bt=wt.c,ar=_e.c;if(!kt||!Dt){if(!Bt||!ar)return Bt?(_e.s=-ke,_e):new nr(ar?wt:NaN);if(!Bt[0]||!ar[0])return ar[0]?(_e.s=-ke,_e):new nr(Bt[0]?wt:en==3?-0:0)}if(kt=q(kt),Dt=q(Dt),Bt=Bt.slice(),vt=kt-Dt){for((pt=vt<0)?(vt=-vt,Ze=Bt):(Dt=kt,Ze=ar),Ze.reverse(),ke=vt;ke--;Ze.push(0));Ze.reverse()}else for(ht=(pt=(vt=Bt.length)<(ke=ar.length))?vt:ke,vt=ke=0;ke<ht;ke++)if(Bt[ke]!=ar[ke]){pt=Bt[ke]<ar[ke];break}if(pt&&(Ze=Bt,Bt=ar,ar=Ze,_e.s=-_e.s),(ke=(ht=ar.length)-(He=Bt.length))>0)for(;ke--;Bt[He++]=0);for(ke=j-1;ht>vt;){if(Bt[--ht]<ar[ht]){for(He=ht;He&&!Bt[--He];Bt[He]=ke);--Bt[He],Bt[ht]+=j}Bt[ht]-=ar[ht]}for(;Bt[0]==0;Bt.splice(0,1),--Dt);return Bt[0]?Oo(_e,Bt,Dt):(_e.s=en==3?-1:1,_e.c=[_e.e=0],_e)},vr.modulo=vr.mod=function(_e,ke){var He,ht,Ze=this;return _e=new nr(_e,ke),!Ze.c||!_e.s||_e.c&&!_e.c[0]?new nr(NaN):!_e.c||Ze.c&&!Ze.c[0]?new nr(Ze):(Sn==9?(ht=_e.s,_e.s=1,He=z(Ze,_e,0,3),_e.s=ht,He.s*=ht):He=z(Ze,_e,0,Sn),(_e=Ze.minus(He.times(_e))).c[0]||Sn!=1||(_e.s=Ze.s),_e)},vr.multipliedBy=vr.times=function(_e,ke){var He,ht,Ze,pt,wt,vt,kt,Dt,Bt,ar,Ir,Ur,nn,An,Bn,tn=this,sn=tn.c,Wn=(_e=new nr(_e,ke)).c;if(!(sn&&Wn&&sn[0]&&Wn[0]))return!tn.s||!_e.s||sn&&!sn[0]&&!Wn||Wn&&!Wn[0]&&!sn?_e.c=_e.e=_e.s=null:(_e.s*=tn.s,sn&&Wn?(_e.c=[0],_e.e=0):_e.c=_e.e=null),_e;for(ht=q(tn.e/V)+q(_e.e/V),_e.s*=tn.s,(kt=sn.length)<(ar=Wn.length)&&(nn=sn,sn=Wn,Wn=nn,Ze=kt,kt=ar,ar=Ze),Ze=kt+ar,nn=[];Ze--;nn.push(0));for(An=j,Bn=le,Ze=ar;--Ze>=0;){for(He=0,Ir=Wn[Ze]%Bn,Ur=Wn[Ze]/Bn|0,pt=Ze+(wt=kt);pt>Ze;)He=((Dt=Ir*(Dt=sn[--wt]%Bn)+(vt=Ur*Dt+(Bt=sn[wt]/Bn|0)*Ir)%Bn*Bn+nn[pt]+He)/An|0)+(vt/Bn|0)+Ur*Bt,nn[pt--]=Dt%An;nn[pt]=He}return He?++ht:nn.splice(0,1),Oo(_e,nn,ht)},vr.negated=function(){var _e=new nr(this);return _e.s=-_e.s||null,_e},vr.plus=function(_e,ke){var He,ht=this,Ze=ht.s;if(ke=(_e=new nr(_e,ke)).s,!Ze||!ke)return new nr(NaN);if(Ze!=ke)return _e.s=-ke,ht.minus(_e);var pt=ht.e/V,wt=_e.e/V,vt=ht.c,kt=_e.c;if(!pt||!wt){if(!vt||!kt)return new nr(Ze/0);if(!vt[0]||!kt[0])return kt[0]?_e:new nr(vt[0]?ht:0*Ze)}if(pt=q(pt),wt=q(wt),vt=vt.slice(),Ze=pt-wt){for(Ze>0?(wt=pt,He=kt):(Ze=-Ze,He=vt),He.reverse();Ze--;He.push(0));He.reverse()}for((Ze=vt.length)-(ke=kt.length)<0&&(He=kt,kt=vt,vt=He,ke=Ze),Ze=0;ke;)Ze=(vt[--ke]=vt[ke]+kt[ke]+Ze)/j|0,vt[ke]=j===vt[ke]?0:vt[ke]%j;return Ze&&(vt=[Ze].concat(vt),++wt),Oo(_e,vt,wt)},vr.precision=vr.sd=function(_e,ke){var He,ht,Ze,pt=this;if(_e!=null&&_e!==!!_e)return I(_e,1,C),ke==null?ke=en:I(ke,0,8),kn(new nr(pt),_e,ke);if(!(He=pt.c))return null;if(ht=(Ze=He.length-1)*V+1,Ze=He[Ze]){for(;Ze%10==0;Ze/=10,ht--);for(Ze=He[0];Ze>=10;Ze/=10,ht++);}return _e&&pt.e+1>ht&&(ht=pt.e+1),ht},vr.shiftedBy=function(_e){return I(_e,-9007199254740991,Y),this.times("1e"+_e)},vr.squareRoot=vr.sqrt=function(){var _e,ke,He,ht,Ze,pt=this,wt=pt.c,vt=pt.s,kt=pt.e,Dt=pn+4,Bt=new nr("0.5");if(vt!==1||!wt||!wt[0])return new nr(!vt||vt<0&&(!wt||wt[0])?NaN:wt?pt:1/0);if((vt=Math.sqrt(+Xn(pt)))==0||vt==1/0?(((ke=X(wt)).length+kt)%2==0&&(ke+="0"),vt=Math.sqrt(+ke),kt=q((kt+1)/2)-(kt<0||kt%2),He=new nr(ke=vt==1/0?"5e"+kt:(ke=vt.toExponential()).slice(0,ke.indexOf("e")+1)+kt)):He=new nr(vt+""),He.c[0]){for((vt=(kt=He.e)+Dt)<3&&(vt=0);;)if(Ze=He,He=Bt.times(Ze.plus(z(pt,Ze,Dt,1))),X(Ze.c).slice(0,vt)===(ke=X(He.c)).slice(0,vt)){if(He.e<kt&&--vt,(ke=ke.slice(vt-3,vt+1))!="9999"&&(ht||ke!="4999")){+ke&&(+ke.slice(1)||ke.charAt(0)!="5")||(kn(He,He.e+pn+2,1),_e=!He.times(He).eq(pt));break}if(!ht&&(kn(Ze,Ze.e+pn+2,0),Ze.times(Ze).eq(pt))){He=Ze;break}Dt+=4,vt+=4,ht=1}}return kn(He,He.e+pn+1,en,_e)},vr.toExponential=function(_e,ke){return _e!=null&&(I(_e,0,C),_e++),ko(this,_e,ke,1)},vr.toFixed=function(_e,ke){return _e!=null&&(I(_e,0,C),_e=_e+this.e+1),ko(this,_e,ke)},vr.toFormat=function(_e,ke,He){var ht,Ze=this;if(He==null)_e!=null&&ke&&typeof ke=="object"?(He=ke,ke=null):_e&&typeof _e=="object"?(He=_e,_e=ke=null):He=Tn;else if(typeof He!="object")throw Error(F+"Argument not an object: "+He);if(ht=Ze.toFixed(_e,ke),Ze.c){var pt,wt=ht.split("."),vt=+He.groupSize,kt=+He.secondaryGroupSize,Dt=He.groupSeparator||"",Bt=wt[0],ar=wt[1],Ir=Ze.s<0,Ur=Ir?Bt.slice(1):Bt,nn=Ur.length;if(kt&&(pt=vt,vt=kt,kt=pt,nn-=pt),vt>0&&nn>0){for(pt=nn%vt||vt,Bt=Ur.substr(0,pt);pt<nn;pt+=vt)Bt+=Dt+Ur.substr(pt,vt);kt>0&&(Bt+=Dt+Ur.slice(pt)),Ir&&(Bt="-"+Bt)}ht=ar?Bt+(He.decimalSeparator||"")+((kt=+He.fractionGroupSize)?ar.replace(new RegExp("\\d{"+kt+"}\\B","g"),"$&"+(He.fractionGroupSeparator||"")):ar):Bt}return(He.prefix||"")+ht+(He.suffix||"")},vr.toFraction=function(_e){var ke,He,ht,Ze,pt,wt,vt,kt,Dt,Bt,ar,Ir,Ur=this,nn=Ur.c;if(_e!=null&&(!(vt=new nr(_e)).isInteger()&&(vt.c||vt.s!==1)||vt.lt(Yn)))throw Error(F+"Argument "+(vt.isInteger()?"out of range: ":"not an integer: ")+Xn(vt));if(!nn)return new nr(Ur);for(ke=new nr(Yn),Dt=He=new nr(Yn),ht=kt=new nr(Yn),Ir=X(nn),pt=ke.e=Ir.length-Ur.e-1,ke.c[0]=me[(wt=pt%V)<0?V+wt:wt],_e=!_e||vt.comparedTo(ke)>0?pt>0?ke:Dt:vt,wt=rn,rn=1/0,vt=new nr(Ir),kt.c[0]=0;Bt=z(vt,ke,0,1),(Ze=He.plus(Bt.times(ht))).comparedTo(_e)!=1;)He=ht,ht=Ze,Dt=kt.plus(Bt.times(Ze=Dt)),kt=Ze,ke=vt.minus(Bt.times(Ze=ke)),vt=Ze;return Ze=z(_e.minus(He),ht,0,1),kt=kt.plus(Ze.times(Dt)),He=He.plus(Ze.times(ht)),kt.s=Dt.s=Ur.s,ar=z(Dt,ht,pt*=2,en).minus(Ur).abs().comparedTo(z(kt,He,pt,en).minus(Ur).abs())<1?[Dt,ht]:[kt,He],rn=wt,ar},vr.toNumber=function(){return+Xn(this)},vr.toPrecision=function(_e,ke){return _e!=null&&I(_e,1,C),ko(this,_e,ke,2)},vr.toString=function(_e){var ke,He=this,ht=He.s,Ze=He.e;return Ze===null?ht?(ke="Infinity",ht<0&&(ke="-"+ke)):ke="NaN":(_e==null?ke=Ze<=Qr||Ze>=bn?m(X(He.c),Ze):P(X(He.c),Ze,"0"):_e===10&&zn?ke=P(X((He=kn(new nr(He),pn+Ze+1,en)).c),He.e,"0"):(I(_e,2,Gn.length,"Base"),ke=te(P(X(He.c),Ze,"0"),10,_e,ht,!0)),ht<0&&He.c[0]&&(ke="-"+ke)),ke},vr.valueOf=vr.toJSON=function(){return Xn(this)},vr._isBigNumber=!0,vr[Symbol.toStringTag]="BigNumber",vr[Symbol.for("nodejs.util.inspect.custom")]=vr.valueOf,Z!=null&&nr.set(Z),nr}();let x=l;var W=i(4193),K=i.n(W),re=i(9127),oe=i.n(re),Ee=i(5885),Fe=i(6266),Oe=i(8330).rE,$={},de=Fe.A.create({headers:{"X-Client-Name":"js-stellar-sdk","X-Client-Version":Oe}});function we(ge){return Math.floor(ge/1e3)}de.interceptors.response.use(function(ge){var Z=K()(ge.config.url).hostname(),z=we(Date.parse(ge.headers.date)),te=we(new Date().getTime());return isNaN(z)||($[Z]={serverTime:z,localTimeRecorded:te}),ge});let Qe=de;function ze(ge){var Z=$[ge];if(!Z||!Z.localTimeRecorded||!Z.serverTime)return null;var z=Z.serverTime,te=Z.localTimeRecorded,Ve=we(new Date().getTime());return Ve-te>300?null:Ve-te+z}function We(ge){return We=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},We(ge)}var et,Be,Re;function $e(){$e=function(){return Z};var ge,Z={},z=Object.prototype,te=z.hasOwnProperty,Ve=Object.defineProperty||function(_e,ke,He){_e[ke]=He.value},Ke=typeof Symbol=="function"?Symbol:{},zt=Ke.iterator||"@@iterator",_r=Ke.asyncIterator||"@@asyncIterator",Ar=Ke.toStringTag||"@@toStringTag";function mr(_e,ke,He){return Object.defineProperty(_e,ke,{value:He,enumerable:!0,configurable:!0,writable:!0}),_e[ke]}try{mr({},"")}catch{mr=function(ke,He,ht){return ke[He]=ht}}function ln(_e,ke,He,ht){var Ze=ke&&ke.prototype instanceof bn?ke:bn,pt=Object.create(Ze.prototype),wt=new kn(ht||[]);return Ve(pt,"_invoke",{value:nr(_e,He,wt)}),pt}function an(_e,ke,He){try{return{type:"normal",arg:_e.call(ke,He)}}catch(ht){return{type:"throw",arg:ht}}}Z.wrap=ln;var vr="suspendedStart",Yn="suspendedYield",pn="executing",en="completed",Qr={};function bn(){}function wn(){}function rn(){}var Cn={};mr(Cn,zt,function(){return this});var Sn=Object.getPrototypeOf,yn=Sn&&Sn(Sn(Xn([])));yn&&yn!==z&&te.call(yn,zt)&&(Cn=yn);var Tn=rn.prototype=bn.prototype=Object.create(Cn);function Gn(_e){["next","throw","return"].forEach(function(ke){mr(_e,ke,function(He){return this._invoke(ke,He)})})}function zn(_e,ke){function He(Ze,pt,wt,vt){var kt=an(_e[Ze],_e,pt);if(kt.type!=="throw"){var Dt=kt.arg,Bt=Dt.value;return Bt&&We(Bt)=="object"&&te.call(Bt,"__await")?ke.resolve(Bt.__await).then(function(ar){He("next",ar,wt,vt)},function(ar){He("throw",ar,wt,vt)}):ke.resolve(Bt).then(function(ar){Dt.value=ar,wt(Dt)},function(ar){return He("throw",ar,wt,vt)})}vt(kt.arg)}var ht;Ve(this,"_invoke",{value:function(Ze,pt){function wt(){return new ke(function(vt,kt){He(Ze,pt,vt,kt)})}return ht=ht?ht.then(wt,wt):wt()}})}function nr(_e,ke,He){var ht=vr;return function(Ze,pt){if(ht===pn)throw Error("Generator is already running");if(ht===en){if(Ze==="throw")throw pt;return{value:ge,done:!0}}for(He.method=Ze,He.arg=pt;;){var wt=He.delegate;if(wt){var vt=ko(wt,He);if(vt){if(vt===Qr)continue;return vt}}if(He.method==="next")He.sent=He._sent=He.arg;else if(He.method==="throw"){if(ht===vr)throw ht=en,He.arg;He.dispatchException(He.arg)}else He.method==="return"&&He.abrupt("return",He.arg);ht=pn;var kt=an(_e,ke,He);if(kt.type==="normal"){if(ht=He.done?en:Yn,kt.arg===Qr)continue;return{value:kt.arg,done:He.done}}kt.type==="throw"&&(ht=en,He.method="throw",He.arg=kt.arg)}}}function ko(_e,ke){var He=ke.method,ht=_e.iterator[He];if(ht===ge)return ke.delegate=null,He==="throw"&&_e.iterator.return&&(ke.method="return",ke.arg=ge,ko(_e,ke),ke.method==="throw")||He!=="return"&&(ke.method="throw",ke.arg=new TypeError("The iterator does not provide a '"+He+"' method")),Qr;var Ze=an(ht,_e.iterator,ke.arg);if(Ze.type==="throw")return ke.method="throw",ke.arg=Ze.arg,ke.delegate=null,Qr;var pt=Ze.arg;return pt?pt.done?(ke[_e.resultName]=pt.value,ke.next=_e.nextLoc,ke.method!=="return"&&(ke.method="next",ke.arg=ge),ke.delegate=null,Qr):pt:(ke.method="throw",ke.arg=new TypeError("iterator result is not an object"),ke.delegate=null,Qr)}function si(_e){var ke={tryLoc:_e[0]};1 in _e&&(ke.catchLoc=_e[1]),2 in _e&&(ke.finallyLoc=_e[2],ke.afterLoc=_e[3]),this.tryEntries.push(ke)}function Oo(_e){var ke=_e.completion||{};ke.type="normal",delete ke.arg,_e.completion=ke}function kn(_e){this.tryEntries=[{tryLoc:"root"}],_e.forEach(si,this),this.reset(!0)}function Xn(_e){if(_e||_e===""){var ke=_e[zt];if(ke)return ke.call(_e);if(typeof _e.next=="function")return _e;if(!isNaN(_e.length)){var He=-1,ht=function Ze(){for(;++He<_e.length;)if(te.call(_e,He))return Ze.value=_e[He],Ze.done=!1,Ze;return Ze.value=ge,Ze.done=!0,Ze};return ht.next=ht}}throw new TypeError(We(_e)+" is not iterable")}return wn.prototype=rn,Ve(Tn,"constructor",{value:rn,configurable:!0}),Ve(rn,"constructor",{value:wn,configurable:!0}),wn.displayName=mr(rn,Ar,"GeneratorFunction"),Z.isGeneratorFunction=function(_e){var ke=typeof _e=="function"&&_e.constructor;return!!ke&&(ke===wn||(ke.displayName||ke.name)==="GeneratorFunction")},Z.mark=function(_e){return Object.setPrototypeOf?Object.setPrototypeOf(_e,rn):(_e.__proto__=rn,mr(_e,Ar,"GeneratorFunction")),_e.prototype=Object.create(Tn),_e},Z.awrap=function(_e){return{__await:_e}},Gn(zn.prototype),mr(zn.prototype,_r,function(){return this}),Z.AsyncIterator=zn,Z.async=function(_e,ke,He,ht,Ze){Ze===void 0&&(Ze=Promise);var pt=new zn(ln(_e,ke,He,ht),Ze);return Z.isGeneratorFunction(ke)?pt:pt.next().then(function(wt){return wt.done?wt.value:pt.next()})},Gn(Tn),mr(Tn,Ar,"Generator"),mr(Tn,zt,function(){return this}),mr(Tn,"toString",function(){return"[object Generator]"}),Z.keys=function(_e){var ke=Object(_e),He=[];for(var ht in ke)He.push(ht);return He.reverse(),function Ze(){for(;He.length;){var pt=He.pop();if(pt in ke)return Ze.value=pt,Ze.done=!1,Ze}return Ze.done=!0,Ze}},Z.values=Xn,kn.prototype={constructor:kn,reset:function(_e){if(this.prev=0,this.next=0,this.sent=this._sent=ge,this.done=!1,this.delegate=null,this.method="next",this.arg=ge,this.tryEntries.forEach(Oo),!_e)for(var ke in this)ke.charAt(0)==="t"&&te.call(this,ke)&&!isNaN(+ke.slice(1))&&(this[ke]=ge)},stop:function(){this.done=!0;var _e=this.tryEntries[0].completion;if(_e.type==="throw")throw _e.arg;return this.rval},dispatchException:function(_e){if(this.done)throw _e;var ke=this;function He(kt,Dt){return pt.type="throw",pt.arg=_e,ke.next=kt,Dt&&(ke.method="next",ke.arg=ge),!!Dt}for(var ht=this.tryEntries.length-1;ht>=0;--ht){var Ze=this.tryEntries[ht],pt=Ze.completion;if(Ze.tryLoc==="root")return He("end");if(Ze.tryLoc<=this.prev){var wt=te.call(Ze,"catchLoc"),vt=te.call(Ze,"finallyLoc");if(wt&&vt){if(this.prev<Ze.catchLoc)return He(Ze.catchLoc,!0);if(this.prev<Ze.finallyLoc)return He(Ze.finallyLoc)}else if(wt){if(this.prev<Ze.catchLoc)return He(Ze.catchLoc,!0)}else{if(!vt)throw Error("try statement without catch or finally");if(this.prev<Ze.finallyLoc)return He(Ze.finallyLoc)}}}},abrupt:function(_e,ke){for(var He=this.tryEntries.length-1;He>=0;--He){var ht=this.tryEntries[He];if(ht.tryLoc<=this.prev&&te.call(ht,"finallyLoc")&&this.prev<ht.finallyLoc){var Ze=ht;break}}Ze&&(_e==="break"||_e==="continue")&&Ze.tryLoc<=ke&&ke<=Ze.finallyLoc&&(Ze=null);var pt=Ze?Ze.completion:{};return pt.type=_e,pt.arg=ke,Ze?(this.method="next",this.next=Ze.finallyLoc,Qr):this.complete(pt)},complete:function(_e,ke){if(_e.type==="throw")throw _e.arg;return _e.type==="break"||_e.type==="continue"?this.next=_e.arg:_e.type==="return"?(this.rval=this.arg=_e.arg,this.method="return",this.next="end"):_e.type==="normal"&&ke&&(this.next=ke),Qr},finish:function(_e){for(var ke=this.tryEntries.length-1;ke>=0;--ke){var He=this.tryEntries[ke];if(He.finallyLoc===_e)return this.complete(He.completion,He.afterLoc),Oo(He),Qr}},catch:function(_e){for(var ke=this.tryEntries.length-1;ke>=0;--ke){var He=this.tryEntries[ke];if(He.tryLoc===_e){var ht=He.completion;if(ht.type==="throw"){var Ze=ht.arg;Oo(He)}return Ze}}throw Error("illegal catch attempt")},delegateYield:function(_e,ke,He){return this.delegate={iterator:Xn(_e),resultName:ke,nextLoc:He},this.method==="next"&&(this.arg=ge),Qr}},Z}function ve(ge,Z,z,te,Ve,Ke,zt){try{var _r=ge[Ke](zt),Ar=_r.value}catch(mr){return void z(mr)}_r.done?Z(Ar):Promise.resolve(Ar).then(te,Ve)}function ue(ge){return function(){var Z=this,z=arguments;return new Promise(function(te,Ve){var Ke=ge.apply(Z,z);function zt(Ar){ve(Ke,te,Ve,zt,_r,"next",Ar)}function _r(Ar){ve(Ke,te,Ve,zt,_r,"throw",Ar)}zt(void 0)})}}function c(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,y(te.key),te)}}function y(ge){var Z=function(z,te){if(We(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(We(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return We(Z)=="symbol"?Z:Z+""}var v,B,O=["transaction"],h=i.g,k=(et=(Be=h.EventSource)!==null&&Be!==void 0?Be:(Re=h.window)===null||Re===void 0?void 0:Re.EventSource)!==null&&et!==void 0?et:i(1731),U=function(ge,Z,z){return Z&&c(ge.prototype,Z),z&&c(ge,z),Object.defineProperty(ge,"prototype",{writable:!1}),ge}(function ge(Z){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(function(te,Ve){if(!(te instanceof Ve))throw new TypeError("Cannot call a class as a function")})(this,ge),this.url=Z.clone(),this.filter=[],this.originalSegments=this.url.segment()||[],this.neighborRoot=z},[{key:"call",value:function(){var ge=this;return this.checkFilter(),this._sendNormalRequest(this.url).then(function(Z){return ge._parseResponse(Z)})}},{key:"stream",value:function(){var ge,Z,z=this,te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.checkFilter(),this.url.setQuery("X-Client-Name","js-stellar-sdk"),this.url.setQuery("X-Client-Version",Oe);var Ve=function(){Z=setTimeout(function(){var zt;(zt=ge)===null||zt===void 0||zt.close(),ge=Ke()},te.reconnectTimeout||15e3)},Ke=function zt(){try{ge=new k(z.url.toString())}catch(an){te.onerror&&te.onerror(an)}if(Ve(),!ge)return ge;var _r=!1,Ar=function(){_r||(clearTimeout(Z),ge.close(),zt(),_r=!0)},mr=function(an){if(an.type!=="close"){var vr=an.data?z._parseRecord(JSON.parse(an.data)):an;vr.paging_token&&z.url.setQuery("cursor",vr.paging_token),clearTimeout(Z),Ve(),te.onmessage!==void 0&&te.onmessage(vr)}else Ar()},ln=function(an){te.onerror&&te.onerror(an)};return ge.addEventListener?(ge.addEventListener("message",mr.bind(z)),ge.addEventListener("error",ln.bind(z)),ge.addEventListener("close",Ar.bind(z))):(ge.onmessage=mr.bind(z),ge.onerror=ln.bind(z)),ge};return Ke(),function(){var zt;clearTimeout(Z),(zt=ge)===null||zt===void 0||zt.close()}}},{key:"cursor",value:function(ge){return this.url.setQuery("cursor",ge),this}},{key:"limit",value:function(ge){return this.url.setQuery("limit",ge.toString()),this}},{key:"order",value:function(ge){return this.url.setQuery("order",ge),this}},{key:"join",value:function(ge){return this.url.setQuery("join",ge),this}},{key:"forEndpoint",value:function(ge,Z){if(this.neighborRoot==="")throw new Error("Invalid usage: neighborRoot not set in constructor");return this.filter.push([ge,Z,this.neighborRoot]),this}},{key:"checkFilter",value:function(){if(this.filter.length>=2)throw new Ee.v7("Too many filters specified",this.filter);if(this.filter.length===1){var ge=this.originalSegments.concat(this.filter[0]);this.url.segment(ge)}}},{key:"_requestFnForLink",value:function(ge){var Z=this;return ue($e().mark(function z(){var te,Ve,Ke,zt,_r=arguments;return $e().wrap(function(Ar){for(;;)switch(Ar.prev=Ar.next){case 0:return te=_r.length>0&&_r[0]!==void 0?_r[0]:{},ge.templated?(Ke=oe()(ge.href),Ve=K()(Ke.expand(te))):Ve=K()(ge.href),Ar.next=4,Z._sendNormalRequest(Ve);case 4:return zt=Ar.sent,Ar.abrupt("return",Z._parseResponse(zt));case 6:case"end":return Ar.stop()}},z)}))}},{key:"_parseRecord",value:function(ge){var Z=this;if(!ge._links)return ge;for(var z=function(){var Ke=Ve[te],zt=ge._links[Ke],_r=!1;if(ge[Ke]!==void 0&&(ge["".concat(Ke,"_attr")]=ge[Ke],_r=!0),_r&&O.indexOf(Ke)>=0){var Ar=Z._parseRecord(ge[Ke]);ge[Ke]=ue($e().mark(function mr(){return $e().wrap(function(ln){for(;;)switch(ln.prev=ln.next){case 0:return ln.abrupt("return",Ar);case 1:case"end":return ln.stop()}},mr)}))}else ge[Ke]=Z._requestFnForLink(zt)},te=0,Ve=Object.keys(ge._links);te<Ve.length;te++)z();return ge}},{key:"_sendNormalRequest",value:(B=ue($e().mark(function ge(Z){var z;return $e().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return(z=Z).authority()===""&&(z=z.authority(this.url.authority())),z.protocol()===""&&(z=z.protocol(this.url.protocol())),te.abrupt("return",de.get(z.toString()).then(function(Ve){return Ve.data}).catch(this._handleNetworkError));case 4:case"end":return te.stop()}},ge,this)})),function(ge){return B.apply(this,arguments)})},{key:"_parseResponse",value:function(ge){return ge._embedded&&ge._embedded.records?this._toCollectionPage(ge):this._parseRecord(ge)}},{key:"_toCollectionPage",value:function(ge){for(var Z,z,te=this,Ve=0;Ve<ge._embedded.records.length;Ve+=1)ge._embedded.records[Ve]=this._parseRecord(ge._embedded.records[Ve]);return{records:ge._embedded.records,next:(z=ue($e().mark(function Ke(){var zt;return $e().wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:return _r.next=2,te._sendNormalRequest(K()(ge._links.next.href));case 2:return zt=_r.sent,_r.abrupt("return",te._toCollectionPage(zt));case 4:case"end":return _r.stop()}},Ke)})),function(){return z.apply(this,arguments)}),prev:(Z=ue($e().mark(function Ke(){var zt;return $e().wrap(function(_r){for(;;)switch(_r.prev=_r.next){case 0:return _r.next=2,te._sendNormalRequest(K()(ge._links.prev.href));case 2:return zt=_r.sent,_r.abrupt("return",te._toCollectionPage(zt));case 4:case"end":return _r.stop()}},Ke)})),function(){return Z.apply(this,arguments)})}}},{key:"_handleNetworkError",value:(v=ue($e().mark(function ge(Z){return $e().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:if(!(Z.response&&Z.response.status&&Z.response.statusText)){z.next=8;break}z.t0=Z.response.status,z.next=z.t0===404?4:5;break;case 4:return z.abrupt("return",Promise.reject(new Ee.m_(Z.response.statusText,Z.response.data)));case 5:return z.abrupt("return",Promise.reject(new Ee.Dr(Z.response.statusText,Z.response.data)));case 6:z.next=9;break;case 8:return z.abrupt("return",Promise.reject(new Error(Z.message)));case 9:case"end":return z.stop()}},ge)})),function(ge){return v.apply(this,arguments)})}]),M=i(8732);function J(ge){return J=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},J(ge)}function pe(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,Ne(te.key),te)}}function Ne(ge){var Z=function(z,te){if(J(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(J(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return J(Z)=="symbol"?Z:Z+""}function tt(ge,Z,z){return Z=Ot(Z),function(te,Ve){if(Ve&&(J(Ve)==="object"||typeof Ve=="function"))return Ve;if(Ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ke){if(Ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ke}(te)}(ge,bt()?Reflect.construct(Z,z||[],Ot(ge).constructor):Z.apply(ge,z))}function bt(){try{var ge=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bt=function(){return!!ge})()}function Ot(ge){return Ot=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},Ot(ge)}function Ft(ge,Z){return Ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,te){return z.__proto__=te,z},Ft(ge,Z)}var Yt=function(ge){function Z(z){var te;return function(Ve,Ke){if(!(Ve instanceof Ke))throw new TypeError("Cannot call a class as a function")}(this,Z),(te=tt(this,Z,[z])).url.segment("accounts"),te}return function(z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(te&&te.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),te&&Ft(z,te)}(Z,ge),function(z,te,Ve){return te&&pe(z.prototype,te),Ve&&pe(z,Ve),Object.defineProperty(z,"prototype",{writable:!1}),z}(Z,[{key:"accountId",value:function(z){var te=new U(this.url.clone());return te.filter.push([z]),te}},{key:"forSigner",value:function(z){return this.url.setQuery("signer",z),this}},{key:"forAsset",value:function(z){return this.url.setQuery("asset","".concat(z)),this}},{key:"sponsor",value:function(z){return this.url.setQuery("sponsor",z),this}},{key:"forLiquidityPool",value:function(z){return this.url.setQuery("liquidity_pool",z),this}}])}(U);function yr(ge){return yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},yr(ge)}function je(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,De(te.key),te)}}function De(ge){var Z=function(z,te){if(yr(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(yr(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return yr(Z)=="symbol"?Z:Z+""}function Xe(ge,Z,z){return Z=Pe(Z),function(te,Ve){if(Ve&&(yr(Ve)==="object"||typeof Ve=="function"))return Ve;if(Ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ke){if(Ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ke}(te)}(ge,ie()?Reflect.construct(Z,z||[],Pe(ge).constructor):Z.apply(ge,z))}function ie(){try{var ge=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ie=function(){return!!ge})()}function Pe(ge){return Pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},Pe(ge)}function ct(ge,Z){return ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,te){return z.__proto__=te,z},ct(ge,Z)}var dt=function(ge){function Z(z){var te;return function(Ve,Ke){if(!(Ve instanceof Ke))throw new TypeError("Cannot call a class as a function")}(this,Z),(te=Xe(this,Z,[z])).url.segment("assets"),te}return function(z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(te&&te.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),te&&ct(z,te)}(Z,ge),function(z,te,Ve){return te&&je(z.prototype,te),Ve&&je(z,Ve),Object.defineProperty(z,"prototype",{writable:!1}),z}(Z,[{key:"forCode",value:function(z){return this.url.setQuery("asset_code",z),this}},{key:"forIssuer",value:function(z){return this.url.setQuery("asset_issuer",z),this}}])}(U);function xt(ge){return xt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},xt(ge)}function st(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,$t(te.key),te)}}function $t(ge){var Z=function(z,te){if(xt(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(xt(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return xt(Z)=="symbol"?Z:Z+""}function _t(ge,Z,z){return Z=it(Z),function(te,Ve){if(Ve&&(xt(Ve)==="object"||typeof Ve=="function"))return Ve;if(Ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ke){if(Ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ke}(te)}(ge,Ct()?Reflect.construct(Z,z||[],it(ge).constructor):Z.apply(ge,z))}function Ct(){try{var ge=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ct=function(){return!!ge})()}function it(ge){return it=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},it(ge)}function Q(ge,Z){return Q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,te){return z.__proto__=te,z},Q(ge,Z)}var ce=function(ge){function Z(z){var te;return function(Ve,Ke){if(!(Ve instanceof Ke))throw new TypeError("Cannot call a class as a function")}(this,Z),(te=_t(this,Z,[z])).url.segment("claimable_balances"),te}return function(z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(te&&te.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),te&&Q(z,te)}(Z,ge),function(z,te,Ve){return te&&st(z.prototype,te),Ve&&st(z,Ve),Object.defineProperty(z,"prototype",{writable:!1}),z}(Z,[{key:"claimableBalance",value:function(z){var te=new U(this.url.clone());return te.filter.push([z]),te}},{key:"sponsor",value:function(z){return this.url.setQuery("sponsor",z),this}},{key:"claimant",value:function(z){return this.url.setQuery("claimant",z),this}},{key:"asset",value:function(z){return this.url.setQuery("asset",z.toString()),this}}])}(U);function be(ge){return be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},be(ge)}function D(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,xe(te.key),te)}}function xe(ge){var Z=function(z,te){if(be(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(be(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return be(Z)=="symbol"?Z:Z+""}function ot(ge,Z,z){return Z=yt(Z),function(te,Ve){if(Ve&&(be(Ve)==="object"||typeof Ve=="function"))return Ve;if(Ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ke){if(Ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ke}(te)}(ge,at()?Reflect.construct(Z,z||[],yt(ge).constructor):Z.apply(ge,z))}function at(){try{var ge=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(at=function(){return!!ge})()}function yt(ge){return yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},yt(ge)}function Tt(ge,Z){return Tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,te){return z.__proto__=te,z},Tt(ge,Z)}var Kt=function(ge){function Z(z){var te;return function(Ve,Ke){if(!(Ve instanceof Ke))throw new TypeError("Cannot call a class as a function")}(this,Z),(te=ot(this,Z,[z,"effects"])).url.segment("effects"),te}return function(z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(te&&te.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),te&&Tt(z,te)}(Z,ge),function(z,te,Ve){return te&&D(z.prototype,te),Ve&&D(z,Ve),Object.defineProperty(z,"prototype",{writable:!1}),z}(Z,[{key:"forAccount",value:function(z){return this.forEndpoint("accounts",z)}},{key:"forLedger",value:function(z){return this.forEndpoint("ledgers",z.toString())}},{key:"forTransaction",value:function(z){return this.forEndpoint("transactions",z)}},{key:"forOperation",value:function(z){return this.forEndpoint("operations",z)}},{key:"forLiquidityPool",value:function(z){return this.forEndpoint("liquidity_pools",z)}}])}(U);function Et(ge){return Et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},Et(ge)}function Rt(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,St(te.key),te)}}function St(ge){var Z=function(z,te){if(Et(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(Et(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return Et(Z)=="symbol"?Z:Z+""}function Ht(ge,Z,z){return Z=qt(Z),function(te,Ve){if(Ve&&(Et(Ve)==="object"||typeof Ve=="function"))return Ve;if(Ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ke){if(Ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ke}(te)}(ge,Lt()?Reflect.construct(Z,z||[],qt(ge).constructor):Z.apply(ge,z))}function Lt(){try{var ge=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lt=function(){return!!ge})()}function qt(ge){return qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},qt(ge)}function It(ge,Z){return It=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,te){return z.__proto__=te,z},It(ge,Z)}var rr=function(ge){function Z(z,te){var Ve;return function(Ke,zt){if(!(Ke instanceof zt))throw new TypeError("Cannot call a class as a function")}(this,Z),(Ve=Ht(this,Z,[z])).url.segment("friendbot"),Ve.url.setQuery("addr",te),Ve}return function(z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(te&&te.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),te&&It(z,te)}(Z,ge),function(z,te,Ve){return te&&Rt(z.prototype,te),Ve&&Rt(z,Ve),Object.defineProperty(z,"prototype",{writable:!1}),z}(Z)}(U);function ye(ge){return ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},ye(ge)}function Me(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,H(te.key),te)}}function H(ge){var Z=function(z,te){if(ye(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(ye(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return ye(Z)=="symbol"?Z:Z+""}function G(ge,Z,z){return Z=se(Z),function(te,Ve){if(Ve&&(ye(Ve)==="object"||typeof Ve=="function"))return Ve;if(Ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ke){if(Ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ke}(te)}(ge,ne()?Reflect.construct(Z,z||[],se(ge).constructor):Z.apply(ge,z))}function ne(){try{var ge=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ne=function(){return!!ge})()}function se(ge){return se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},se(ge)}function he(ge,Z){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,te){return z.__proto__=te,z},he(ge,Z)}var Le=function(ge){function Z(z){var te;return function(Ve,Ke){if(!(Ve instanceof Ke))throw new TypeError("Cannot call a class as a function")}(this,Z),(te=G(this,Z,[z])).url.segment("ledgers"),te}return function(z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(te&&te.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),te&&he(z,te)}(Z,ge),function(z,te,Ve){return te&&Me(z.prototype,te),Ve&&Me(z,Ve),Object.defineProperty(z,"prototype",{writable:!1}),z}(Z,[{key:"ledger",value:function(z){return this.filter.push(["ledgers",z.toString()]),this}}])}(U);function Ie(ge){return Ie=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},Ie(ge)}function Te(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,Ce(te.key),te)}}function Ce(ge){var Z=function(z,te){if(Ie(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(Ie(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return Ie(Z)=="symbol"?Z:Z+""}function Ge(ge,Z,z){return Z=ft(Z),function(te,Ve){if(Ve&&(Ie(Ve)==="object"||typeof Ve=="function"))return Ve;if(Ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ke){if(Ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ke}(te)}(ge,Je()?Reflect.construct(Z,z||[],ft(ge).constructor):Z.apply(ge,z))}function Je(){try{var ge=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Je=function(){return!!ge})()}function ft(ge){return ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},ft(ge)}function gt(ge,Z){return gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,te){return z.__proto__=te,z},gt(ge,Z)}var Nt=function(ge){function Z(z){var te;return function(Ve,Ke){if(!(Ve instanceof Ke))throw new TypeError("Cannot call a class as a function")}(this,Z),(te=Ge(this,Z,[z])).url.segment("liquidity_pools"),te}return function(z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(te&&te.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),te&&gt(z,te)}(Z,ge),function(z,te,Ve){return te&&Te(z.prototype,te),Ve&&Te(z,Ve),Object.defineProperty(z,"prototype",{writable:!1}),z}(Z,[{key:"forAssets",value:function(){for(var z=arguments.length,te=new Array(z),Ve=0;Ve<z;Ve++)te[Ve]=arguments[Ve];var Ke=te.map(function(zt){return zt.toString()}).join(",");return this.url.setQuery("reserves",Ke),this}},{key:"forAccount",value:function(z){return this.url.setQuery("account",z),this}},{key:"liquidityPoolId",value:function(z){if(!z.match(/[a-fA-F0-9]{64}/))throw new TypeError("".concat(z," does not look like a liquidity pool ID"));var te=new U(this.url.clone());return te.filter.push([z.toLowerCase()]),te}}])}(U);function Vt(ge){return Vt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},Vt(ge)}function Gt(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,Ye(te.key),te)}}function Ye(ge){var Z=function(z,te){if(Vt(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(Vt(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return Vt(Z)=="symbol"?Z:Z+""}function ir(ge,Z,z){return Z=sr(Z),function(te,Ve){if(Ve&&(Vt(Ve)==="object"||typeof Ve=="function"))return Ve;if(Ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ke){if(Ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ke}(te)}(ge,or()?Reflect.construct(Z,z||[],sr(ge).constructor):Z.apply(ge,z))}function or(){try{var ge=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(or=function(){return!!ge})()}function sr(ge){return sr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},sr(ge)}function pr(ge,Z){return pr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,te){return z.__proto__=te,z},pr(ge,Z)}var Er=function(ge){function Z(z){var te;return function(Ve,Ke){if(!(Ve instanceof Ke))throw new TypeError("Cannot call a class as a function")}(this,Z),(te=ir(this,Z,[z,"offers"])).url.segment("offers"),te}return function(z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(te&&te.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),te&&pr(z,te)}(Z,ge),function(z,te,Ve){return te&&Gt(z.prototype,te),Ve&&Gt(z,Ve),Object.defineProperty(z,"prototype",{writable:!1}),z}(Z,[{key:"offer",value:function(z){var te=new U(this.url.clone());return te.filter.push([z]),te}},{key:"forAccount",value:function(z){return this.forEndpoint("accounts",z)}},{key:"buying",value:function(z){return z.isNative()?this.url.setQuery("buying_asset_type","native"):(this.url.setQuery("buying_asset_type",z.getAssetType()),this.url.setQuery("buying_asset_code",z.getCode()),this.url.setQuery("buying_asset_issuer",z.getIssuer())),this}},{key:"selling",value:function(z){return z.isNative()?this.url.setQuery("selling_asset_type","native"):(this.url.setQuery("selling_asset_type",z.getAssetType()),this.url.setQuery("selling_asset_code",z.getCode()),this.url.setQuery("selling_asset_issuer",z.getIssuer())),this}},{key:"sponsor",value:function(z){return this.url.setQuery("sponsor",z),this}},{key:"seller",value:function(z){return this.url.setQuery("seller",z),this}}])}(U);function hr(ge){return hr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},hr(ge)}function br(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,ur(te.key),te)}}function ur(ge){var Z=function(z,te){if(hr(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(hr(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return hr(Z)=="symbol"?Z:Z+""}function ee(ge,Z,z){return Z=wr(Z),function(te,Ve){if(Ve&&(hr(Ve)==="object"||typeof Ve=="function"))return Ve;if(Ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ke){if(Ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ke}(te)}(ge,er()?Reflect.construct(Z,z||[],wr(ge).constructor):Z.apply(ge,z))}function er(){try{var ge=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(er=function(){return!!ge})()}function wr(ge){return wr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},wr(ge)}function Pr(ge,Z){return Pr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,te){return z.__proto__=te,z},Pr(ge,Z)}var jr=function(ge){function Z(z){var te;return function(Ve,Ke){if(!(Ve instanceof Ke))throw new TypeError("Cannot call a class as a function")}(this,Z),(te=ee(this,Z,[z,"operations"])).url.segment("operations"),te}return function(z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(te&&te.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),te&&Pr(z,te)}(Z,ge),function(z,te,Ve){return te&&br(z.prototype,te),Ve&&br(z,Ve),Object.defineProperty(z,"prototype",{writable:!1}),z}(Z,[{key:"operation",value:function(z){var te=new U(this.url.clone());return te.filter.push([z]),te}},{key:"forAccount",value:function(z){return this.forEndpoint("accounts",z)}},{key:"forClaimableBalance",value:function(z){return this.forEndpoint("claimable_balances",z)}},{key:"forLedger",value:function(z){return this.forEndpoint("ledgers",z.toString())}},{key:"forTransaction",value:function(z){return this.forEndpoint("transactions",z)}},{key:"forLiquidityPool",value:function(z){return this.forEndpoint("liquidity_pools",z)}},{key:"includeFailed",value:function(z){return this.url.setQuery("include_failed",z.toString()),this}}])}(U);function Lr(ge){return Lr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},Lr(ge)}function Mt(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,fe(te.key),te)}}function fe(ge){var Z=function(z,te){if(Lr(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(Lr(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return Lr(Z)=="symbol"?Z:Z+""}function Se(ge,Z,z){return Z=mt(Z),function(te,Ve){if(Ve&&(Lr(Ve)==="object"||typeof Ve=="function"))return Ve;if(Ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ke){if(Ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ke}(te)}(ge,Ue()?Reflect.construct(Z,z||[],mt(ge).constructor):Z.apply(ge,z))}function Ue(){try{var ge=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ue=function(){return!!ge})()}function mt(ge){return mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},mt(ge)}function qe(ge,Z){return qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,te){return z.__proto__=te,z},qe(ge,Z)}var Ut=function(ge){function Z(z,te,Ve){var Ke;return function(zt,_r){if(!(zt instanceof _r))throw new TypeError("Cannot call a class as a function")}(this,Z),(Ke=Se(this,Z,[z])).url.segment("order_book"),te.isNative()?Ke.url.setQuery("selling_asset_type","native"):(Ke.url.setQuery("selling_asset_type",te.getAssetType()),Ke.url.setQuery("selling_asset_code",te.getCode()),Ke.url.setQuery("selling_asset_issuer",te.getIssuer())),Ve.isNative()?Ke.url.setQuery("buying_asset_type","native"):(Ke.url.setQuery("buying_asset_type",Ve.getAssetType()),Ke.url.setQuery("buying_asset_code",Ve.getCode()),Ke.url.setQuery("buying_asset_issuer",Ve.getIssuer())),Ke}return function(z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(te&&te.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),te&&qe(z,te)}(Z,ge),function(z,te,Ve){return te&&Mt(z.prototype,te),Ve&&Mt(z,Ve),Object.defineProperty(z,"prototype",{writable:!1}),z}(Z)}(U);function Zt(ge){return Zt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},Zt(ge)}function dr(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,fr(te.key),te)}}function fr(ge){var Z=function(z,te){if(Zt(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(Zt(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return Zt(Z)=="symbol"?Z:Z+""}function Vr(ge,Z,z){return Z=Nr(Z),function(te,Ve){if(Ve&&(Zt(Ve)==="object"||typeof Ve=="function"))return Ve;if(Ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ke){if(Ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ke}(te)}(ge,Wr()?Reflect.construct(Z,z||[],Nr(ge).constructor):Z.apply(ge,z))}function Wr(){try{var ge=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Wr=function(){return!!ge})()}function Nr(ge){return Nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},Nr(ge)}function Ko(ge,Z){return Ko=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,te){return z.__proto__=te,z},Ko(ge,Z)}var Ka=function(ge){function Z(z){var te;return function(Ve,Ke){if(!(Ve instanceof Ke))throw new TypeError("Cannot call a class as a function")}(this,Z),(te=Vr(this,Z,[z,"payments"])).url.segment("payments"),te}return function(z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(te&&te.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),te&&Ko(z,te)}(Z,ge),function(z,te,Ve){return te&&dr(z.prototype,te),Ve&&dr(z,Ve),Object.defineProperty(z,"prototype",{writable:!1}),z}(Z,[{key:"forAccount",value:function(z){return this.forEndpoint("accounts",z)}},{key:"forLedger",value:function(z){return this.forEndpoint("ledgers",z.toString())}},{key:"forTransaction",value:function(z){return this.forEndpoint("transactions",z)}}])}(U);function fo(ge){return fo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},fo(ge)}function Ha(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,ou(te.key),te)}}function ou(ge){var Z=function(z,te){if(fo(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(fo(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return fo(Z)=="symbol"?Z:Z+""}function iu(ge,Z,z){return Z=ki(Z),function(te,Ve){if(Ve&&(fo(Ve)==="object"||typeof Ve=="function"))return Ve;if(Ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ke){if(Ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ke}(te)}(ge,za()?Reflect.construct(Z,z||[],ki(ge).constructor):Z.apply(ge,z))}function za(){try{var ge=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(za=function(){return!!ge})()}function ki(ge){return ki=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},ki(ge)}function Zi(ge,Z){return Zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,te){return z.__proto__=te,z},Zi(ge,Z)}var au=function(ge){function Z(z,te,Ve,Ke){var zt;if(function(Ar,mr){if(!(Ar instanceof mr))throw new TypeError("Cannot call a class as a function")}(this,Z),(zt=iu(this,Z,[z])).url.segment("paths/strict-receive"),typeof te=="string")zt.url.setQuery("source_account",te);else{var _r=te.map(function(Ar){return Ar.isNative()?"native":"".concat(Ar.getCode(),":").concat(Ar.getIssuer())}).join(",");zt.url.setQuery("source_assets",_r)}return zt.url.setQuery("destination_amount",Ke),Ve.isNative()?zt.url.setQuery("destination_asset_type","native"):(zt.url.setQuery("destination_asset_type",Ve.getAssetType()),zt.url.setQuery("destination_asset_code",Ve.getCode()),zt.url.setQuery("destination_asset_issuer",Ve.getIssuer())),zt}return function(z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(te&&te.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),te&&Zi(z,te)}(Z,ge),function(z,te,Ve){return te&&Ha(z.prototype,te),Ve&&Ha(z,Ve),Object.defineProperty(z,"prototype",{writable:!1}),z}(Z)}(U);function Co(ge){return Co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},Co(ge)}function Xa(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,ea(te.key),te)}}function ea(ge){var Z=function(z,te){if(Co(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(Co(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return Co(Z)=="symbol"?Z:Z+""}function oo(ge,Z,z){return Z=Oi(Z),function(te,Ve){if(Ve&&(Co(Ve)==="object"||typeof Ve=="function"))return Ve;if(Ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ke){if(Ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ke}(te)}(ge,Ga()?Reflect.construct(Z,z||[],Oi(ge).constructor):Z.apply(ge,z))}function Ga(){try{var ge=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ga=function(){return!!ge})()}function Oi(ge){return Oi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},Oi(ge)}function ta(ge,Z){return ta=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,te){return z.__proto__=te,z},ta(ge,Z)}var Sr=function(ge){function Z(z,te,Ve,Ke){var zt;if(function(Ar,mr){if(!(Ar instanceof mr))throw new TypeError("Cannot call a class as a function")}(this,Z),(zt=oo(this,Z,[z])).url.segment("paths/strict-send"),te.isNative()?zt.url.setQuery("source_asset_type","native"):(zt.url.setQuery("source_asset_type",te.getAssetType()),zt.url.setQuery("source_asset_code",te.getCode()),zt.url.setQuery("source_asset_issuer",te.getIssuer())),zt.url.setQuery("source_amount",Ve),typeof Ke=="string")zt.url.setQuery("destination_account",Ke);else{var _r=Ke.map(function(Ar){return Ar.isNative()?"native":"".concat(Ar.getCode(),":").concat(Ar.getIssuer())}).join(",");zt.url.setQuery("destination_assets",_r)}return zt}return function(z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(te&&te.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),te&&ta(z,te)}(Z,ge),function(z,te,Ve){return te&&Xa(z.prototype,te),Ve&&Xa(z,Ve),Object.defineProperty(z,"prototype",{writable:!1}),z}(Z)}(U);function Rn(ge){return Rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},Rn(ge)}function Wa(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,ra(te.key),te)}}function ra(ge){var Z=function(z,te){if(Rn(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(Rn(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return Rn(Z)=="symbol"?Z:Z+""}function io(ge,Z,z){return Z=Pi(Z),function(te,Ve){if(Ve&&(Rn(Ve)==="object"||typeof Ve=="function"))return Ve;if(Ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ke){if(Ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ke}(te)}(ge,Jr()?Reflect.construct(Z,z||[],Pi(ge).constructor):Z.apply(ge,z))}function Jr(){try{var ge=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Jr=function(){return!!ge})()}function Pi(ge){return Pi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},Pi(ge)}function Ho(ge,Z){return Ho=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,te){return z.__proto__=te,z},Ho(ge,Z)}var su=[6e4,3e5,9e5,36e5,864e5,6048e5],uu=function(ge){function Z(z,te,Ve,Ke,zt,_r,Ar){var mr;if(function(ln,an){if(!(ln instanceof an))throw new TypeError("Cannot call a class as a function")}(this,Z),(mr=io(this,Z,[z])).url.segment("trade_aggregations"),te.isNative()?mr.url.setQuery("base_asset_type","native"):(mr.url.setQuery("base_asset_type",te.getAssetType()),mr.url.setQuery("base_asset_code",te.getCode()),mr.url.setQuery("base_asset_issuer",te.getIssuer())),Ve.isNative()?mr.url.setQuery("counter_asset_type","native"):(mr.url.setQuery("counter_asset_type",Ve.getAssetType()),mr.url.setQuery("counter_asset_code",Ve.getCode()),mr.url.setQuery("counter_asset_issuer",Ve.getIssuer())),typeof Ke!="number"||typeof zt!="number")throw new Ee.v7("Invalid time bounds",[Ke,zt]);if(mr.url.setQuery("start_time",Ke.toString()),mr.url.setQuery("end_time",zt.toString()),!mr.isValidResolution(_r))throw new Ee.v7("Invalid resolution",_r);if(mr.url.setQuery("resolution",_r.toString()),!mr.isValidOffset(Ar,_r))throw new Ee.v7("Invalid offset",Ar);return mr.url.setQuery("offset",Ar.toString()),mr}return function(z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(te&&te.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),te&&Ho(z,te)}(Z,ge),function(z,te,Ve){return te&&Wa(z.prototype,te),Ve&&Wa(z,Ve),Object.defineProperty(z,"prototype",{writable:!1}),z}(Z,[{key:"isValidResolution",value:function(z){for(var te=0,Ve=su;te<Ve.length;te++)if(Ve[te]===z)return!0;return!1}},{key:"isValidOffset",value:function(z,te){var Ve=36e5;return!(z>te||z>=24*Ve||z%Ve!=0)}}])}(U);function Bo(ge){return Bo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},Bo(ge)}function En(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,Ae(te.key),te)}}function Ae(ge){var Z=function(z,te){if(Bo(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(Bo(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return Bo(Z)=="symbol"?Z:Z+""}function rt(ge,Z,z){return Z=nt(Z),function(te,Ve){if(Ve&&(Bo(Ve)==="object"||typeof Ve=="function"))return Ve;if(Ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ke){if(Ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ke}(te)}(ge,lt()?Reflect.construct(Z,z||[],nt(ge).constructor):Z.apply(ge,z))}function lt(){try{var ge=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lt=function(){return!!ge})()}function nt(ge){return nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},nt(ge)}function ut(ge,Z){return ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,te){return z.__proto__=te,z},ut(ge,Z)}var Pt=function(ge){function Z(z){var te;return function(Ve,Ke){if(!(Ve instanceof Ke))throw new TypeError("Cannot call a class as a function")}(this,Z),(te=rt(this,Z,[z,"trades"])).url.segment("trades"),te}return function(z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(te&&te.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),te&&ut(z,te)}(Z,ge),function(z,te,Ve){return te&&En(z.prototype,te),Ve&&En(z,Ve),Object.defineProperty(z,"prototype",{writable:!1}),z}(Z,[{key:"forAssetPair",value:function(z,te){return z.isNative()?this.url.setQuery("base_asset_type","native"):(this.url.setQuery("base_asset_type",z.getAssetType()),this.url.setQuery("base_asset_code",z.getCode()),this.url.setQuery("base_asset_issuer",z.getIssuer())),te.isNative()?this.url.setQuery("counter_asset_type","native"):(this.url.setQuery("counter_asset_type",te.getAssetType()),this.url.setQuery("counter_asset_code",te.getCode()),this.url.setQuery("counter_asset_issuer",te.getIssuer())),this}},{key:"forOffer",value:function(z){return this.url.setQuery("offer_id",z),this}},{key:"forType",value:function(z){return this.url.setQuery("trade_type",z),this}},{key:"forAccount",value:function(z){return this.forEndpoint("accounts",z)}},{key:"forLiquidityPool",value:function(z){return this.forEndpoint("liquidity_pools",z)}}])}(U);function At(ge){return At=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},At(ge)}function cr(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,lr(te.key),te)}}function lr(ge){var Z=function(z,te){if(At(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if(At(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return At(Z)=="symbol"?Z:Z+""}function xr(ge,Z,z){return Z=gr(Z),function(te,Ve){if(Ve&&(At(Ve)==="object"||typeof Ve=="function"))return Ve;if(Ve!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ke){if(Ke===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ke}(te)}(ge,kr()?Reflect.construct(Z,z||[],gr(ge).constructor):Z.apply(ge,z))}function kr(){try{var ge=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kr=function(){return!!ge})()}function gr(ge){return gr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},gr(ge)}function tr(ge,Z){return tr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(z,te){return z.__proto__=te,z},tr(ge,Z)}var Zr=function(ge){function Z(z){var te;return function(Ve,Ke){if(!(Ve instanceof Ke))throw new TypeError("Cannot call a class as a function")}(this,Z),(te=xr(this,Z,[z,"transactions"])).url.segment("transactions"),te}return function(z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(te&&te.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),te&&tr(z,te)}(Z,ge),function(z,te,Ve){return te&&cr(z.prototype,te),Ve&&cr(z,Ve),Object.defineProperty(z,"prototype",{writable:!1}),z}(Z,[{key:"transaction",value:function(z){var te=new U(this.url.clone());return te.filter.push([z]),te}},{key:"forAccount",value:function(z){return this.forEndpoint("accounts",z)}},{key:"forClaimableBalance",value:function(z){return this.forEndpoint("claimable_balances",z)}},{key:"forLedger",value:function(z){return this.forEndpoint("ledgers",z.toString())}},{key:"forLiquidityPool",value:function(z){return this.forEndpoint("liquidity_pools",z)}},{key:"includeFailed",value:function(z){return this.url.setQuery("include_failed",z.toString()),this}}])}(U);function $r(ge){return $r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Z){return typeof Z}:function(Z){return Z&&typeof Symbol=="function"&&Z.constructor===Symbol&&Z!==Symbol.prototype?"symbol":typeof Z},$r(ge)}function Br(){Br=function(){return Z};var ge,Z={},z=Object.prototype,te=z.hasOwnProperty,Ve=Object.defineProperty||function(_e,ke,He){_e[ke]=He.value},Ke=typeof Symbol=="function"?Symbol:{},zt=Ke.iterator||"@@iterator",_r=Ke.asyncIterator||"@@asyncIterator",Ar=Ke.toStringTag||"@@toStringTag";function mr(_e,ke,He){return Object.defineProperty(_e,ke,{value:He,enumerable:!0,configurable:!0,writable:!0}),_e[ke]}try{mr({},"")}catch{mr=function(ke,He,ht){return ke[He]=ht}}function ln(_e,ke,He,ht){var Ze=ke&&ke.prototype instanceof bn?ke:bn,pt=Object.create(Ze.prototype),wt=new kn(ht||[]);return Ve(pt,"_invoke",{value:nr(_e,He,wt)}),pt}function an(_e,ke,He){try{return{type:"normal",arg:_e.call(ke,He)}}catch(ht){return{type:"throw",arg:ht}}}Z.wrap=ln;var vr="suspendedStart",Yn="suspendedYield",pn="executing",en="completed",Qr={};function bn(){}function wn(){}function rn(){}var Cn={};mr(Cn,zt,function(){return this});var Sn=Object.getPrototypeOf,yn=Sn&&Sn(Sn(Xn([])));yn&&yn!==z&&te.call(yn,zt)&&(Cn=yn);var Tn=rn.prototype=bn.prototype=Object.create(Cn);function Gn(_e){["next","throw","return"].forEach(function(ke){mr(_e,ke,function(He){return this._invoke(ke,He)})})}function zn(_e,ke){function He(Ze,pt,wt,vt){var kt=an(_e[Ze],_e,pt);if(kt.type!=="throw"){var Dt=kt.arg,Bt=Dt.value;return Bt&&$r(Bt)=="object"&&te.call(Bt,"__await")?ke.resolve(Bt.__await).then(function(ar){He("next",ar,wt,vt)},function(ar){He("throw",ar,wt,vt)}):ke.resolve(Bt).then(function(ar){Dt.value=ar,wt(Dt)},function(ar){return He("throw",ar,wt,vt)})}vt(kt.arg)}var ht;Ve(this,"_invoke",{value:function(Ze,pt){function wt(){return new ke(function(vt,kt){He(Ze,pt,vt,kt)})}return ht=ht?ht.then(wt,wt):wt()}})}function nr(_e,ke,He){var ht=vr;return function(Ze,pt){if(ht===pn)throw Error("Generator is already running");if(ht===en){if(Ze==="throw")throw pt;return{value:ge,done:!0}}for(He.method=Ze,He.arg=pt;;){var wt=He.delegate;if(wt){var vt=ko(wt,He);if(vt){if(vt===Qr)continue;return vt}}if(He.method==="next")He.sent=He._sent=He.arg;else if(He.method==="throw"){if(ht===vr)throw ht=en,He.arg;He.dispatchException(He.arg)}else He.method==="return"&&He.abrupt("return",He.arg);ht=pn;var kt=an(_e,ke,He);if(kt.type==="normal"){if(ht=He.done?en:Yn,kt.arg===Qr)continue;return{value:kt.arg,done:He.done}}kt.type==="throw"&&(ht=en,He.method="throw",He.arg=kt.arg)}}}function ko(_e,ke){var He=ke.method,ht=_e.iterator[He];if(ht===ge)return ke.delegate=null,He==="throw"&&_e.iterator.return&&(ke.method="return",ke.arg=ge,ko(_e,ke),ke.method==="throw")||He!=="return"&&(ke.method="throw",ke.arg=new TypeError("The iterator does not provide a '"+He+"' method")),Qr;var Ze=an(ht,_e.iterator,ke.arg);if(Ze.type==="throw")return ke.method="throw",ke.arg=Ze.arg,ke.delegate=null,Qr;var pt=Ze.arg;return pt?pt.done?(ke[_e.resultName]=pt.value,ke.next=_e.nextLoc,ke.method!=="return"&&(ke.method="next",ke.arg=ge),ke.delegate=null,Qr):pt:(ke.method="throw",ke.arg=new TypeError("iterator result is not an object"),ke.delegate=null,Qr)}function si(_e){var ke={tryLoc:_e[0]};1 in _e&&(ke.catchLoc=_e[1]),2 in _e&&(ke.finallyLoc=_e[2],ke.afterLoc=_e[3]),this.tryEntries.push(ke)}function Oo(_e){var ke=_e.completion||{};ke.type="normal",delete ke.arg,_e.completion=ke}function kn(_e){this.tryEntries=[{tryLoc:"root"}],_e.forEach(si,this),this.reset(!0)}function Xn(_e){if(_e||_e===""){var ke=_e[zt];if(ke)return ke.call(_e);if(typeof _e.next=="function")return _e;if(!isNaN(_e.length)){var He=-1,ht=function Ze(){for(;++He<_e.length;)if(te.call(_e,He))return Ze.value=_e[He],Ze.done=!1,Ze;return Ze.value=ge,Ze.done=!0,Ze};return ht.next=ht}}throw new TypeError($r(_e)+" is not iterable")}return wn.prototype=rn,Ve(Tn,"constructor",{value:rn,configurable:!0}),Ve(rn,"constructor",{value:wn,configurable:!0}),wn.displayName=mr(rn,Ar,"GeneratorFunction"),Z.isGeneratorFunction=function(_e){var ke=typeof _e=="function"&&_e.constructor;return!!ke&&(ke===wn||(ke.displayName||ke.name)==="GeneratorFunction")},Z.mark=function(_e){return Object.setPrototypeOf?Object.setPrototypeOf(_e,rn):(_e.__proto__=rn,mr(_e,Ar,"GeneratorFunction")),_e.prototype=Object.create(Tn),_e},Z.awrap=function(_e){return{__await:_e}},Gn(zn.prototype),mr(zn.prototype,_r,function(){return this}),Z.AsyncIterator=zn,Z.async=function(_e,ke,He,ht,Ze){Ze===void 0&&(Ze=Promise);var pt=new zn(ln(_e,ke,He,ht),Ze);return Z.isGeneratorFunction(ke)?pt:pt.next().then(function(wt){return wt.done?wt.value:pt.next()})},Gn(Tn),mr(Tn,Ar,"Generator"),mr(Tn,zt,function(){return this}),mr(Tn,"toString",function(){return"[object Generator]"}),Z.keys=function(_e){var ke=Object(_e),He=[];for(var ht in ke)He.push(ht);return He.reverse(),function Ze(){for(;He.length;){var pt=He.pop();if(pt in ke)return Ze.value=pt,Ze.done=!1,Ze}return Ze.done=!0,Ze}},Z.values=Xn,kn.prototype={constructor:kn,reset:function(_e){if(this.prev=0,this.next=0,this.sent=this._sent=ge,this.done=!1,this.delegate=null,this.method="next",this.arg=ge,this.tryEntries.forEach(Oo),!_e)for(var ke in this)ke.charAt(0)==="t"&&te.call(this,ke)&&!isNaN(+ke.slice(1))&&(this[ke]=ge)},stop:function(){this.done=!0;var _e=this.tryEntries[0].completion;if(_e.type==="throw")throw _e.arg;return this.rval},dispatchException:function(_e){if(this.done)throw _e;var ke=this;function He(kt,Dt){return pt.type="throw",pt.arg=_e,ke.next=kt,Dt&&(ke.method="next",ke.arg=ge),!!Dt}for(var ht=this.tryEntries.length-1;ht>=0;--ht){var Ze=this.tryEntries[ht],pt=Ze.completion;if(Ze.tryLoc==="root")return He("end");if(Ze.tryLoc<=this.prev){var wt=te.call(Ze,"catchLoc"),vt=te.call(Ze,"finallyLoc");if(wt&&vt){if(this.prev<Ze.catchLoc)return He(Ze.catchLoc,!0);if(this.prev<Ze.finallyLoc)return He(Ze.finallyLoc)}else if(wt){if(this.prev<Ze.catchLoc)return He(Ze.catchLoc,!0)}else{if(!vt)throw Error("try statement without catch or finally");if(this.prev<Ze.finallyLoc)return He(Ze.finallyLoc)}}}},abrupt:function(_e,ke){for(var He=this.tryEntries.length-1;He>=0;--He){var ht=this.tryEntries[He];if(ht.tryLoc<=this.prev&&te.call(ht,"finallyLoc")&&this.prev<ht.finallyLoc){var Ze=ht;break}}Ze&&(_e==="break"||_e==="continue")&&Ze.tryLoc<=ke&&ke<=Ze.finallyLoc&&(Ze=null);var pt=Ze?Ze.completion:{};return pt.type=_e,pt.arg=ke,Ze?(this.method="next",this.next=Ze.finallyLoc,Qr):this.complete(pt)},complete:function(_e,ke){if(_e.type==="throw")throw _e.arg;return _e.type==="break"||_e.type==="continue"?this.next=_e.arg:_e.type==="return"?(this.rval=this.arg=_e.arg,this.method="return",this.next="end"):_e.type==="normal"&&ke&&(this.next=ke),Qr},finish:function(_e){for(var ke=this.tryEntries.length-1;ke>=0;--ke){var He=this.tryEntries[ke];if(He.finallyLoc===_e)return this.complete(He.completion,He.afterLoc),Oo(He),Qr}},catch:function(_e){for(var ke=this.tryEntries.length-1;ke>=0;--ke){var He=this.tryEntries[ke];if(He.tryLoc===_e){var ht=He.completion;if(ht.type==="throw"){var Ze=ht.arg;Oo(He)}return Ze}}throw Error("illegal catch attempt")},delegateYield:function(_e,ke,He){return this.delegate={iterator:Xn(_e),resultName:ke,nextLoc:He},this.method==="next"&&(this.arg=ge),Qr}},Z}function on(ge,Z,z,te,Ve,Ke,zt){try{var _r=ge[Ke](zt),Ar=_r.value}catch(mr){return void z(mr)}_r.done?Z(Ar):Promise.resolve(Ar).then(te,Ve)}function Dr(ge){return function(){var Z=this,z=arguments;return new Promise(function(te,Ve){var Ke=ge.apply(Z,z);function zt(Ar){on(Ke,te,Ve,zt,_r,"next",Ar)}function _r(Ar){on(Ke,te,Ve,zt,_r,"throw",Ar)}zt(void 0)})}}function dn(ge,Z){for(var z=0;z<Z.length;z++){var te=Z[z];te.enumerable=te.enumerable||!1,te.configurable=!0,"value"in te&&(te.writable=!0),Object.defineProperty(ge,In(te.key),te)}}function In(ge){var Z=function(z,te){if($r(z)!="object"||!z)return z;var Ve=z[Symbol.toPrimitive];if(Ve!==void 0){var Ke=Ve.call(z,te||"default");if($r(Ke)!="object")return Ke;throw new TypeError("@@toPrimitive must return a primitive value.")}return(te==="string"?String:Number)(z)}(ge,"string");return $r(Z)=="symbol"?Z:Z+""}function Nn(ge){return new x(ge).div(1e7).toString()}var Hn,zo,$a,xi,Qa,Ya,cu=function(ge,Z,z){return Z&&dn(ge.prototype,Z),z&&dn(ge,z),Object.defineProperty(ge,"prototype",{writable:!1}),ge}(function ge(Z){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(function(Ke,zt){if(!(Ke instanceof zt))throw new TypeError("Cannot call a class as a function")})(this,ge),this.serverURL=K()(Z);var te=z.allowHttp===void 0?M.T.isAllowHttp():z.allowHttp,Ve={};if(z.appName&&(Ve["X-App-Name"]=z.appName),z.appVersion&&(Ve["X-App-Version"]=z.appVersion),z.authToken&&(Ve["X-Auth-Token"]=z.authToken),Object.keys(Ve).length>0&&Qe.interceptors.request.use(function(Ke){return Ke.headers=Object.assign(Ke.headers,Ve),Ke}),this.serverURL.protocol()!=="https"&&!te)throw new Error("Cannot connect to insecure horizon server")},[{key:"fetchTimebounds",value:(Ya=Dr(Br().mark(function ge(Z){var z,te,Ve=arguments;return Br().wrap(function(Ke){for(;;)switch(Ke.prev=Ke.next){case 0:if(z=Ve.length>1&&Ve[1]!==void 0&&Ve[1],!(te=ze(this.serverURL.hostname()))){Ke.next=4;break}return Ke.abrupt("return",{minTime:0,maxTime:te+Z});case 4:if(!z){Ke.next=6;break}return Ke.abrupt("return",{minTime:0,maxTime:Math.floor(new Date().getTime()/1e3)+Z});case 6:return Ke.next=8,Qe.get(K()(this.serverURL).toString());case 8:return Ke.next=10,this.fetchTimebounds(Z,!0);case 10:return Ke.abrupt("return",Ke.sent);case 11:case"end":return Ke.stop()}},ge,this)})),function(ge){return Ya.apply(this,arguments)})},{key:"fetchBaseFee",value:(Qa=Dr(Br().mark(function ge(){var Z;return Br().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return z.next=2,this.feeStats();case 2:return Z=z.sent,z.abrupt("return",parseInt(Z.last_ledger_base_fee,10)||100);case 4:case"end":return z.stop()}},ge,this)})),function(){return Qa.apply(this,arguments)})},{key:"feeStats",value:(xi=Dr(Br().mark(function ge(){var Z;return Br().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:return(Z=new U(K()(this.serverURL))).filter.push(["fee_stats"]),z.abrupt("return",Z.call());case 3:case"end":return z.stop()}},ge,this)})),function(){return xi.apply(this,arguments)})},{key:"submitTransaction",value:($a=Dr(Br().mark(function ge(Z){var z,te=arguments;return Br().wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:if((te.length>1&&te[1]!==void 0?te[1]:{skipMemoRequiredCheck:!1}).skipMemoRequiredCheck){Ve.next=4;break}return Ve.next=4,this.checkMemoRequired(Z);case 4:return z=encodeURIComponent(Z.toEnvelope().toXDR().toString("base64")),Ve.abrupt("return",Qe.post(K()(this.serverURL).segment("transactions").toString(),"tx=".concat(z),{timeout:6e4}).then(function(Ke){if(!Ke.data.result_xdr)return Ke.data;var zt,_r,Ar=u.xdr.TransactionResult.fromXDR(Ke.data.result_xdr,"base64").result().value();return Ar.length&&(zt=Ar.map(function(mr,ln){if(mr.value().switch().name!=="manageBuyOffer"&&mr.value().switch().name!=="manageSellOffer")return null;_r=!0;var an,vr=new x(0),Yn=new x(0),pn=mr.value().value().success(),en=pn.offersClaimed().map(function(Cn){var Sn=Cn.value(),yn="";switch(Cn.switch()){case u.xdr.ClaimAtomType.claimAtomTypeV0():yn=u.StrKey.encodeEd25519PublicKey(Sn.sellerEd25519());break;case u.xdr.ClaimAtomType.claimAtomTypeOrderBook():yn=u.StrKey.encodeEd25519PublicKey(Sn.sellerId().ed25519());break;default:throw new Error("Invalid offer result type: "+Cn.switch())}var Tn=new x(Sn.amountBought().toString()),Gn=new x(Sn.amountSold().toString());vr=vr.plus(Gn),Yn=Yn.plus(Tn);var zn=u.Asset.fromOperation(Sn.assetSold()),nr=u.Asset.fromOperation(Sn.assetBought()),ko={type:zn.getAssetType(),assetCode:zn.getCode(),issuer:zn.getIssuer()},si={type:nr.getAssetType(),assetCode:nr.getCode(),issuer:nr.getIssuer()};return{sellerId:yn,offerId:Sn.offerId().toString(),assetSold:ko,amountSold:Nn(Gn),assetBought:si,amountBought:Nn(Tn)}}),Qr=pn.offer().switch().name;if(typeof pn.offer().value=="function"&&pn.offer().value()){var bn=pn.offer().value();an={offerId:bn.offerId().toString(),selling:{},buying:{},amount:Nn(bn.amount().toString()),price:{n:bn.price().n(),d:bn.price().d()}};var wn=u.Asset.fromOperation(bn.selling());an.selling={type:wn.getAssetType(),assetCode:wn.getCode(),issuer:wn.getIssuer()};var rn=u.Asset.fromOperation(bn.buying());an.buying={type:rn.getAssetType(),assetCode:rn.getCode(),issuer:rn.getIssuer()}}return{offersClaimed:en,effect:Qr,operationIndex:ln,currentOffer:an,amountBought:Nn(vr),amountSold:Nn(Yn),isFullyOpen:!en.length&&Qr!=="manageOfferDeleted",wasPartiallyFilled:!!en.length&&Qr!=="manageOfferDeleted",wasImmediatelyFilled:!!en.length&&Qr==="manageOfferDeleted",wasImmediatelyDeleted:!en.length&&Qr==="manageOfferDeleted"}}).filter(function(mr){return!!mr})),Object.assign({},Ke.data,{offerResults:_r?zt:void 0})}).catch(function(Ke){return Ke instanceof Error?Promise.reject(Ke):Promise.reject(new Ee.nS("Transaction submission failed. Server responded: ".concat(Ke.status," ").concat(Ke.statusText),Ke.data))}));case 6:case"end":return Ve.stop()}},ge,this)})),function(ge){return $a.apply(this,arguments)})},{key:"accounts",value:function(){return new Yt(K()(this.serverURL))}},{key:"claimableBalances",value:function(){return new ce(K()(this.serverURL))}},{key:"ledgers",value:function(){return new Le(K()(this.serverURL))}},{key:"transactions",value:function(){return new Zr(K()(this.serverURL))}},{key:"offers",value:function(){return new Er(K()(this.serverURL))}},{key:"orderbook",value:function(ge,Z){return new Ut(K()(this.serverURL),ge,Z)}},{key:"trades",value:function(){return new Pt(K()(this.serverURL))}},{key:"operations",value:function(){return new jr(K()(this.serverURL))}},{key:"liquidityPools",value:function(){return new Nt(K()(this.serverURL))}},{key:"strictReceivePaths",value:function(ge,Z,z){return new au(K()(this.serverURL),ge,Z,z)}},{key:"strictSendPaths",value:function(ge,Z,z){return new Sr(K()(this.serverURL),ge,Z,z)}},{key:"payments",value:function(){return new Ka(K()(this.serverURL))}},{key:"effects",value:function(){return new Kt(K()(this.serverURL))}},{key:"friendbot",value:function(ge){return new rr(K()(this.serverURL),ge)}},{key:"assets",value:function(){return new dt(K()(this.serverURL))}},{key:"loadAccount",value:(zo=Dr(Br().mark(function ge(Z){var z;return Br().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:return te.next=2,this.accounts().accountId(Z).call();case 2:return z=te.sent,te.abrupt("return",new A(z));case 4:case"end":return te.stop()}},ge,this)})),function(ge){return zo.apply(this,arguments)})},{key:"tradeAggregation",value:function(ge,Z,z,te,Ve,Ke){return new uu(K()(this.serverURL),ge,Z,z,te,Ve,Ke)}},{key:"checkMemoRequired",value:(Hn=Dr(Br().mark(function ge(Z){var z,te,Ve,Ke;return Br().wrap(function(zt){for(;;)switch(zt.prev=zt.next){case 0:if(Z instanceof u.FeeBumpTransaction&&(Z=Z.innerTransaction),Z.memo.type==="none"){zt.next=3;break}return zt.abrupt("return");case 3:z=new Set,te=0;case 5:if(!(te<Z.operations.length)){zt.next=36;break}Ve=Z.operations[te],zt.t0=Ve.type,zt.next=zt.t0==="payment"||zt.t0==="pathPaymentStrictReceive"||zt.t0==="pathPaymentStrictSend"||zt.t0==="accountMerge"?10:11;break;case 10:return zt.abrupt("break",12);case 11:return zt.abrupt("continue",33);case 12:if(Ke=Ve.destination,!z.has(Ke)){zt.next=15;break}return zt.abrupt("continue",33);case 15:if(z.add(Ke),!Ke.startsWith("M")){zt.next=18;break}return zt.abrupt("continue",33);case 18:return zt.prev=18,zt.next=21,this.loadAccount(Ke);case 21:if(zt.sent.data_attr["config.memo_required"]!=="MQ=="){zt.next=24;break}throw new Ee.Cu("account requires memo",Ke,te);case 24:zt.next=33;break;case 26:if(zt.prev=26,zt.t1=zt.catch(18),!(zt.t1 instanceof Ee.Cu)){zt.next=30;break}throw zt.t1;case 30:if(zt.t1 instanceof Ee.m_){zt.next=32;break}throw zt.t1;case 32:return zt.abrupt("continue",33);case 33:te++,zt.next=5;break;case 36:case"end":return zt.stop()}},ge,this,[[18,26]])})),function(ge){return Hn.apply(this,arguments)})}]);let Ja=(o=i.hmd(o)).exports},4356:(o,a,i)=>{"use strict";i.r(a),i.d(a,{AccountRequiresMemoError:()=>s.Cu,BadRequestError:()=>s.v7,BadResponseError:()=>s.nS,Config:()=>f.T,Federation:()=>_,Friendbot:()=>b,Horizon:()=>T,NetworkError:()=>s.Dr,NotFoundError:()=>s.m_,SorobanRpc:()=>w,StellarToml:()=>r,Utils:()=>u.A,WebAuth:()=>d,contract:()=>g,default:()=>L,rpc:()=>w});var s=i(5885),f=i(8732),u=i(3121),r=i(3898),_=i(7600),d=i(5479),b=i(8242),T=i(2731),w=i(1660),g=i(145),p=i(356),A={};for(let E in p)["default","Config","Utils","StellarToml","Federation","WebAuth","Friendbot","Horizon","rpc","SorobanRpc","contract","AccountRequiresMemoError","BadRequestError","BadResponseError","NetworkError","NotFoundError"].indexOf(E)<0&&(A[E]=()=>p[E]);i.d(a,A);let L=(o=i.hmd(o)).exports},4076:(o,a,i)=>{"use strict";var s;i.d(a,{j:()=>s}),function(f){var u=function(_){return _.SUCCESS="SUCCESS",_.NOT_FOUND="NOT_FOUND",_.FAILED="FAILED",_}({});function r(_){return"transactionData"in _}f.GetTransactionStatus=u,f.isSimulationError=function(_){return"error"in _},f.isSimulationSuccess=r,f.isSimulationRestore=function(_){return r(_)&&"restorePreamble"in _&&!!_.restorePreamble.transactionData},f.isSimulationRaw=function(_){return!_._parsed}}(s||(s={}))},4982:(o,a,i)=>{"use strict";i.d(a,{Ay:()=>u});var s=i(6266),f=i(8330).rE;let u=s.A.create({headers:{"X-Client-Name":"js-soroban-client","X-Client-Version":f}})},1660:(o,a,i)=>{"use strict";i.r(a),i.d(a,{Api:()=>s.j,AxiosClient:()=>u.Ay,Durability:()=>f.ku,Server:()=>f.gq,assembleTransaction:()=>_.X,default:()=>d,parseRawEvents:()=>r.fG,parseRawSimulation:()=>r.jr});var s=i(4076),f=i(1575),u=i(4982),r=i(784),_=i(8680);let d=(o=i.hmd(o)).exports},784:(o,a,i)=>{"use strict";i.d(a,{$D:()=>w,Af:()=>b,fG:()=>T,jr:()=>g});var s=i(356),f=i(4076);function u(p){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},u(p)}function r(p,A){var L=Object.keys(p);if(Object.getOwnPropertySymbols){var E=Object.getOwnPropertySymbols(p);A&&(E=E.filter(function(N){return Object.getOwnPropertyDescriptor(p,N).enumerable})),L.push.apply(L,E)}return L}function _(p){for(var A=1;A<arguments.length;A++){var L=arguments[A]!=null?arguments[A]:{};A%2?r(Object(L),!0).forEach(function(E){d(p,E,L[E])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(L)):r(Object(L)).forEach(function(E){Object.defineProperty(p,E,Object.getOwnPropertyDescriptor(L,E))})}return p}function d(p,A,L){var E;return E=function(N,F){if(u(N)!="object"||!N)return N;var R=N[Symbol.toPrimitive];if(R!==void 0){var j=R.call(N,F||"default");if(u(j)!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(N)}(A,"string"),(A=u(E)=="symbol"?E:E+"")in p?Object.defineProperty(p,A,{value:L,enumerable:!0,configurable:!0,writable:!0}):p[A]=L,p}function b(p){var A=p.errorResultXdr,L=p.diagnosticEventsXdr;return delete p.errorResultXdr,delete p.diagnosticEventsXdr,A?_(_(_({},p),L!==void 0&&L.length>0&&{diagnosticEvents:L.map(function(E){return s.xdr.DiagnosticEvent.fromXDR(E,"base64")})}),{},{errorResult:s.xdr.TransactionResult.fromXDR(A,"base64")}):_({},p)}function T(p){var A;return{latestLedger:p.latestLedger,events:((A=p.events)!==null&&A!==void 0?A:[]).map(function(L){var E=_({},L);return delete E.contractId,_(_(_({},E),L.contractId!==""&&{contractId:new s.Contract(L.contractId)}),{},{topic:L.topic.map(function(N){return s.xdr.ScVal.fromXDR(N,"base64")}),value:s.xdr.ScVal.fromXDR(L.value,"base64")})})}}function w(p){var A;return{latestLedger:p.latestLedger,entries:((A=p.entries)!==null&&A!==void 0?A:[]).map(function(L){if(!L.key||!L.xdr)throw new TypeError("invalid ledger entry: ".concat(JSON.stringify(L)));return _({lastModifiedLedgerSeq:L.lastModifiedLedgerSeq,key:s.xdr.LedgerKey.fromXDR(L.key,"base64"),val:s.xdr.LedgerEntryData.fromXDR(L.xdr,"base64")},L.liveUntilLedgerSeq!==void 0&&{liveUntilLedgerSeq:L.liveUntilLedgerSeq})})}}function g(p){var A,L;if(!f.j.isSimulationRaw(p))return p;var E={_parsed:!0,id:p.id,latestLedger:p.latestLedger,events:(A=(L=p.events)===null||L===void 0?void 0:L.map(function(N){return s.xdr.DiagnosticEvent.fromXDR(N,"base64")}))!==null&&A!==void 0?A:[]};return typeof p.error=="string"?_(_({},E),{},{error:p.error}):function(N,F){var R,j,V=_(_({},F),{},{transactionData:new s.SorobanDataBuilder(N.transactionData),minResourceFee:N.minResourceFee,cost:N.cost},(R=(j=N.results)===null||j===void 0?void 0:j.length)!==null&&R!==void 0&&R&&{result:N.results.map(function(Y){var me;return{auth:((me=Y.auth)!==null&&me!==void 0?me:[]).map(function(le){return s.xdr.SorobanAuthorizationEntry.fromXDR(le,"base64")}),retval:Y.xdr?s.xdr.ScVal.fromXDR(Y.xdr,"base64"):s.xdr.ScVal.scvVoid()}})[0]});return!N.restorePreamble||N.restorePreamble.transactionData===""?V:_(_({},V),{},{restorePreamble:{minResourceFee:N.restorePreamble.minResourceFee,transactionData:new s.SorobanDataBuilder(N.restorePreamble.transactionData)}})}(p,E)}},1575:(o,a,i)=>{"use strict";i.d(a,{ku:()=>Be,gq:()=>Re});var s=i(4193),f=i.n(s),u=i(356),r=i(4982);function _(ve){return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ue){return typeof ue}:function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},_(ve)}function d(){d=function(){return ue};var ve,ue={},c=Object.prototype,y=c.hasOwnProperty,v=Object.defineProperty||function(it,Q,ce){it[Q]=ce.value},B=typeof Symbol=="function"?Symbol:{},O=B.iterator||"@@iterator",h=B.asyncIterator||"@@asyncIterator",k=B.toStringTag||"@@toStringTag";function U(it,Q,ce){return Object.defineProperty(it,Q,{value:ce,enumerable:!0,configurable:!0,writable:!0}),it[Q]}try{U({},"")}catch{U=function(Q,ce,be){return Q[ce]=be}}function M(it,Q,ce,be){var D=Q&&Q.prototype instanceof Ft?Q:Ft,xe=Object.create(D.prototype),ot=new _t(be||[]);return v(xe,"_invoke",{value:dt(it,ce,ot)}),xe}function J(it,Q,ce){try{return{type:"normal",arg:it.call(Q,ce)}}catch(be){return{type:"throw",arg:be}}}ue.wrap=M;var pe="suspendedStart",Ne="suspendedYield",tt="executing",bt="completed",Ot={};function Ft(){}function Yt(){}function yr(){}var je={};U(je,O,function(){return this});var De=Object.getPrototypeOf,Xe=De&&De(De(Ct([])));Xe&&Xe!==c&&y.call(Xe,O)&&(je=Xe);var ie=yr.prototype=Ft.prototype=Object.create(je);function Pe(it){["next","throw","return"].forEach(function(Q){U(it,Q,function(ce){return this._invoke(Q,ce)})})}function ct(it,Q){function ce(D,xe,ot,at){var yt=J(it[D],it,xe);if(yt.type!=="throw"){var Tt=yt.arg,Kt=Tt.value;return Kt&&_(Kt)=="object"&&y.call(Kt,"__await")?Q.resolve(Kt.__await).then(function(Et){ce("next",Et,ot,at)},function(Et){ce("throw",Et,ot,at)}):Q.resolve(Kt).then(function(Et){Tt.value=Et,ot(Tt)},function(Et){return ce("throw",Et,ot,at)})}at(yt.arg)}var be;v(this,"_invoke",{value:function(D,xe){function ot(){return new Q(function(at,yt){ce(D,xe,at,yt)})}return be=be?be.then(ot,ot):ot()}})}function dt(it,Q,ce){var be=pe;return function(D,xe){if(be===tt)throw Error("Generator is already running");if(be===bt){if(D==="throw")throw xe;return{value:ve,done:!0}}for(ce.method=D,ce.arg=xe;;){var ot=ce.delegate;if(ot){var at=xt(ot,ce);if(at){if(at===Ot)continue;return at}}if(ce.method==="next")ce.sent=ce._sent=ce.arg;else if(ce.method==="throw"){if(be===pe)throw be=bt,ce.arg;ce.dispatchException(ce.arg)}else ce.method==="return"&&ce.abrupt("return",ce.arg);be=tt;var yt=J(it,Q,ce);if(yt.type==="normal"){if(be=ce.done?bt:Ne,yt.arg===Ot)continue;return{value:yt.arg,done:ce.done}}yt.type==="throw"&&(be=bt,ce.method="throw",ce.arg=yt.arg)}}}function xt(it,Q){var ce=Q.method,be=it.iterator[ce];if(be===ve)return Q.delegate=null,ce==="throw"&&it.iterator.return&&(Q.method="return",Q.arg=ve,xt(it,Q),Q.method==="throw")||ce!=="return"&&(Q.method="throw",Q.arg=new TypeError("The iterator does not provide a '"+ce+"' method")),Ot;var D=J(be,it.iterator,Q.arg);if(D.type==="throw")return Q.method="throw",Q.arg=D.arg,Q.delegate=null,Ot;var xe=D.arg;return xe?xe.done?(Q[it.resultName]=xe.value,Q.next=it.nextLoc,Q.method!=="return"&&(Q.method="next",Q.arg=ve),Q.delegate=null,Ot):xe:(Q.method="throw",Q.arg=new TypeError("iterator result is not an object"),Q.delegate=null,Ot)}function st(it){var Q={tryLoc:it[0]};1 in it&&(Q.catchLoc=it[1]),2 in it&&(Q.finallyLoc=it[2],Q.afterLoc=it[3]),this.tryEntries.push(Q)}function $t(it){var Q=it.completion||{};Q.type="normal",delete Q.arg,it.completion=Q}function _t(it){this.tryEntries=[{tryLoc:"root"}],it.forEach(st,this),this.reset(!0)}function Ct(it){if(it||it===""){var Q=it[O];if(Q)return Q.call(it);if(typeof it.next=="function")return it;if(!isNaN(it.length)){var ce=-1,be=function D(){for(;++ce<it.length;)if(y.call(it,ce))return D.value=it[ce],D.done=!1,D;return D.value=ve,D.done=!0,D};return be.next=be}}throw new TypeError(_(it)+" is not iterable")}return Yt.prototype=yr,v(ie,"constructor",{value:yr,configurable:!0}),v(yr,"constructor",{value:Yt,configurable:!0}),Yt.displayName=U(yr,k,"GeneratorFunction"),ue.isGeneratorFunction=function(it){var Q=typeof it=="function"&&it.constructor;return!!Q&&(Q===Yt||(Q.displayName||Q.name)==="GeneratorFunction")},ue.mark=function(it){return Object.setPrototypeOf?Object.setPrototypeOf(it,yr):(it.__proto__=yr,U(it,k,"GeneratorFunction")),it.prototype=Object.create(ie),it},ue.awrap=function(it){return{__await:it}},Pe(ct.prototype),U(ct.prototype,h,function(){return this}),ue.AsyncIterator=ct,ue.async=function(it,Q,ce,be,D){D===void 0&&(D=Promise);var xe=new ct(M(it,Q,ce,be),D);return ue.isGeneratorFunction(Q)?xe:xe.next().then(function(ot){return ot.done?ot.value:xe.next()})},Pe(ie),U(ie,k,"Generator"),U(ie,O,function(){return this}),U(ie,"toString",function(){return"[object Generator]"}),ue.keys=function(it){var Q=Object(it),ce=[];for(var be in Q)ce.push(be);return ce.reverse(),function D(){for(;ce.length;){var xe=ce.pop();if(xe in Q)return D.value=xe,D.done=!1,D}return D.done=!0,D}},ue.values=Ct,_t.prototype={constructor:_t,reset:function(it){if(this.prev=0,this.next=0,this.sent=this._sent=ve,this.done=!1,this.delegate=null,this.method="next",this.arg=ve,this.tryEntries.forEach($t),!it)for(var Q in this)Q.charAt(0)==="t"&&y.call(this,Q)&&!isNaN(+Q.slice(1))&&(this[Q]=ve)},stop:function(){this.done=!0;var it=this.tryEntries[0].completion;if(it.type==="throw")throw it.arg;return this.rval},dispatchException:function(it){if(this.done)throw it;var Q=this;function ce(yt,Tt){return xe.type="throw",xe.arg=it,Q.next=yt,Tt&&(Q.method="next",Q.arg=ve),!!Tt}for(var be=this.tryEntries.length-1;be>=0;--be){var D=this.tryEntries[be],xe=D.completion;if(D.tryLoc==="root")return ce("end");if(D.tryLoc<=this.prev){var ot=y.call(D,"catchLoc"),at=y.call(D,"finallyLoc");if(ot&&at){if(this.prev<D.catchLoc)return ce(D.catchLoc,!0);if(this.prev<D.finallyLoc)return ce(D.finallyLoc)}else if(ot){if(this.prev<D.catchLoc)return ce(D.catchLoc,!0)}else{if(!at)throw Error("try statement without catch or finally");if(this.prev<D.finallyLoc)return ce(D.finallyLoc)}}}},abrupt:function(it,Q){for(var ce=this.tryEntries.length-1;ce>=0;--ce){var be=this.tryEntries[ce];if(be.tryLoc<=this.prev&&y.call(be,"finallyLoc")&&this.prev<be.finallyLoc){var D=be;break}}D&&(it==="break"||it==="continue")&&D.tryLoc<=Q&&Q<=D.finallyLoc&&(D=null);var xe=D?D.completion:{};return xe.type=it,xe.arg=Q,D?(this.method="next",this.next=D.finallyLoc,Ot):this.complete(xe)},complete:function(it,Q){if(it.type==="throw")throw it.arg;return it.type==="break"||it.type==="continue"?this.next=it.arg:it.type==="return"?(this.rval=this.arg=it.arg,this.method="return",this.next="end"):it.type==="normal"&&Q&&(this.next=Q),Ot},finish:function(it){for(var Q=this.tryEntries.length-1;Q>=0;--Q){var ce=this.tryEntries[Q];if(ce.finallyLoc===it)return this.complete(ce.completion,ce.afterLoc),$t(ce),Ot}},catch:function(it){for(var Q=this.tryEntries.length-1;Q>=0;--Q){var ce=this.tryEntries[Q];if(ce.tryLoc===it){var be=ce.completion;if(be.type==="throw"){var D=be.arg;$t(ce)}return D}}throw Error("illegal catch attempt")},delegateYield:function(it,Q,ce){return this.delegate={iterator:Ct(it),resultName:Q,nextLoc:ce},this.method==="next"&&(this.arg=ve),Ot}},ue}function b(ve,ue,c,y,v,B,O){try{var h=ve[B](O),k=h.value}catch(U){return void c(U)}h.done?ue(k):Promise.resolve(k).then(y,v)}function T(ve,ue){return w.apply(this,arguments)}function w(){var ve;return ve=d().mark(function ue(c,y){var v,B,O,h=arguments;return d().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:return v=h.length>2&&h[2]!==void 0?h[2]:null,k.next=3,r.Ay.post(c,{jsonrpc:"2.0",id:1,method:y,params:v});case 3:if(B=k.sent,U=B.data,M="error",!U.hasOwnProperty(M)){k.next=8;break}throw B.data.error;case 8:return k.abrupt("return",(O=B.data)===null||O===void 0?void 0:O.result);case 9:case"end":return k.stop()}var U,M},ue)}),w=function(){var ue=this,c=arguments;return new Promise(function(y,v){var B=ve.apply(ue,c);function O(k){b(B,y,v,O,h,"next",k)}function h(k){b(B,y,v,O,h,"throw",k)}O(void 0)})},w.apply(this,arguments)}var g=i(4076),p=i(8680),A=i(784),L=i(8287).Buffer;function E(ve){return E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ue){return typeof ue}:function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},E(ve)}function N(ve,ue){var c=typeof Symbol<"u"&&ve[Symbol.iterator]||ve["@@iterator"];if(!c){if(Array.isArray(ve)||(c=function(k,U){if(k){if(typeof k=="string")return F(k,U);var M=Object.prototype.toString.call(k).slice(8,-1);if(M==="Object"&&k.constructor&&(M=k.constructor.name),M==="Map"||M==="Set")return Array.from(k);if(M==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(M))return F(k,U)}}(ve))||ue&&ve&&typeof ve.length=="number"){c&&(ve=c);var y=0,v=function(){};return{s:v,n:function(){return y>=ve.length?{done:!0}:{done:!1,value:ve[y++]}},e:function(k){throw k},f:v}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
34
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var B,O=!0,h=!1;return{s:function(){c=c.call(ve)},n:function(){var k=c.next();return O=k.done,k},e:function(k){h=!0,B=k},f:function(){try{O||c.return==null||c.return()}finally{if(h)throw B}}}}function F(ve,ue){(ue==null||ue>ve.length)&&(ue=ve.length);for(var c=0,y=new Array(ue);c<ue;c++)y[c]=ve[c];return y}function R(ve,ue){var c=Object.keys(ve);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(ve);ue&&(y=y.filter(function(v){return Object.getOwnPropertyDescriptor(ve,v).enumerable})),c.push.apply(c,y)}return c}function j(ve){for(var ue=1;ue<arguments.length;ue++){var c=arguments[ue]!=null?arguments[ue]:{};ue%2?R(Object(c),!0).forEach(function(y){V(ve,y,c[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ve,Object.getOwnPropertyDescriptors(c)):R(Object(c)).forEach(function(y){Object.defineProperty(ve,y,Object.getOwnPropertyDescriptor(c,y))})}return ve}function V(ve,ue,c){return(ue=q(ue))in ve?Object.defineProperty(ve,ue,{value:c,enumerable:!0,configurable:!0,writable:!0}):ve[ue]=c,ve}function Y(){Y=function(){return ue};var ve,ue={},c=Object.prototype,y=c.hasOwnProperty,v=Object.defineProperty||function(it,Q,ce){it[Q]=ce.value},B=typeof Symbol=="function"?Symbol:{},O=B.iterator||"@@iterator",h=B.asyncIterator||"@@asyncIterator",k=B.toStringTag||"@@toStringTag";function U(it,Q,ce){return Object.defineProperty(it,Q,{value:ce,enumerable:!0,configurable:!0,writable:!0}),it[Q]}try{U({},"")}catch{U=function(Q,ce,be){return Q[ce]=be}}function M(it,Q,ce,be){var D=Q&&Q.prototype instanceof Ft?Q:Ft,xe=Object.create(D.prototype),ot=new _t(be||[]);return v(xe,"_invoke",{value:dt(it,ce,ot)}),xe}function J(it,Q,ce){try{return{type:"normal",arg:it.call(Q,ce)}}catch(be){return{type:"throw",arg:be}}}ue.wrap=M;var pe="suspendedStart",Ne="suspendedYield",tt="executing",bt="completed",Ot={};function Ft(){}function Yt(){}function yr(){}var je={};U(je,O,function(){return this});var De=Object.getPrototypeOf,Xe=De&&De(De(Ct([])));Xe&&Xe!==c&&y.call(Xe,O)&&(je=Xe);var ie=yr.prototype=Ft.prototype=Object.create(je);function Pe(it){["next","throw","return"].forEach(function(Q){U(it,Q,function(ce){return this._invoke(Q,ce)})})}function ct(it,Q){function ce(D,xe,ot,at){var yt=J(it[D],it,xe);if(yt.type!=="throw"){var Tt=yt.arg,Kt=Tt.value;return Kt&&E(Kt)=="object"&&y.call(Kt,"__await")?Q.resolve(Kt.__await).then(function(Et){ce("next",Et,ot,at)},function(Et){ce("throw",Et,ot,at)}):Q.resolve(Kt).then(function(Et){Tt.value=Et,ot(Tt)},function(Et){return ce("throw",Et,ot,at)})}at(yt.arg)}var be;v(this,"_invoke",{value:function(D,xe){function ot(){return new Q(function(at,yt){ce(D,xe,at,yt)})}return be=be?be.then(ot,ot):ot()}})}function dt(it,Q,ce){var be=pe;return function(D,xe){if(be===tt)throw Error("Generator is already running");if(be===bt){if(D==="throw")throw xe;return{value:ve,done:!0}}for(ce.method=D,ce.arg=xe;;){var ot=ce.delegate;if(ot){var at=xt(ot,ce);if(at){if(at===Ot)continue;return at}}if(ce.method==="next")ce.sent=ce._sent=ce.arg;else if(ce.method==="throw"){if(be===pe)throw be=bt,ce.arg;ce.dispatchException(ce.arg)}else ce.method==="return"&&ce.abrupt("return",ce.arg);be=tt;var yt=J(it,Q,ce);if(yt.type==="normal"){if(be=ce.done?bt:Ne,yt.arg===Ot)continue;return{value:yt.arg,done:ce.done}}yt.type==="throw"&&(be=bt,ce.method="throw",ce.arg=yt.arg)}}}function xt(it,Q){var ce=Q.method,be=it.iterator[ce];if(be===ve)return Q.delegate=null,ce==="throw"&&it.iterator.return&&(Q.method="return",Q.arg=ve,xt(it,Q),Q.method==="throw")||ce!=="return"&&(Q.method="throw",Q.arg=new TypeError("The iterator does not provide a '"+ce+"' method")),Ot;var D=J(be,it.iterator,Q.arg);if(D.type==="throw")return Q.method="throw",Q.arg=D.arg,Q.delegate=null,Ot;var xe=D.arg;return xe?xe.done?(Q[it.resultName]=xe.value,Q.next=it.nextLoc,Q.method!=="return"&&(Q.method="next",Q.arg=ve),Q.delegate=null,Ot):xe:(Q.method="throw",Q.arg=new TypeError("iterator result is not an object"),Q.delegate=null,Ot)}function st(it){var Q={tryLoc:it[0]};1 in it&&(Q.catchLoc=it[1]),2 in it&&(Q.finallyLoc=it[2],Q.afterLoc=it[3]),this.tryEntries.push(Q)}function $t(it){var Q=it.completion||{};Q.type="normal",delete Q.arg,it.completion=Q}function _t(it){this.tryEntries=[{tryLoc:"root"}],it.forEach(st,this),this.reset(!0)}function Ct(it){if(it||it===""){var Q=it[O];if(Q)return Q.call(it);if(typeof it.next=="function")return it;if(!isNaN(it.length)){var ce=-1,be=function D(){for(;++ce<it.length;)if(y.call(it,ce))return D.value=it[ce],D.done=!1,D;return D.value=ve,D.done=!0,D};return be.next=be}}throw new TypeError(E(it)+" is not iterable")}return Yt.prototype=yr,v(ie,"constructor",{value:yr,configurable:!0}),v(yr,"constructor",{value:Yt,configurable:!0}),Yt.displayName=U(yr,k,"GeneratorFunction"),ue.isGeneratorFunction=function(it){var Q=typeof it=="function"&&it.constructor;return!!Q&&(Q===Yt||(Q.displayName||Q.name)==="GeneratorFunction")},ue.mark=function(it){return Object.setPrototypeOf?Object.setPrototypeOf(it,yr):(it.__proto__=yr,U(it,k,"GeneratorFunction")),it.prototype=Object.create(ie),it},ue.awrap=function(it){return{__await:it}},Pe(ct.prototype),U(ct.prototype,h,function(){return this}),ue.AsyncIterator=ct,ue.async=function(it,Q,ce,be,D){D===void 0&&(D=Promise);var xe=new ct(M(it,Q,ce,be),D);return ue.isGeneratorFunction(Q)?xe:xe.next().then(function(ot){return ot.done?ot.value:xe.next()})},Pe(ie),U(ie,k,"Generator"),U(ie,O,function(){return this}),U(ie,"toString",function(){return"[object Generator]"}),ue.keys=function(it){var Q=Object(it),ce=[];for(var be in Q)ce.push(be);return ce.reverse(),function D(){for(;ce.length;){var xe=ce.pop();if(xe in Q)return D.value=xe,D.done=!1,D}return D.done=!0,D}},ue.values=Ct,_t.prototype={constructor:_t,reset:function(it){if(this.prev=0,this.next=0,this.sent=this._sent=ve,this.done=!1,this.delegate=null,this.method="next",this.arg=ve,this.tryEntries.forEach($t),!it)for(var Q in this)Q.charAt(0)==="t"&&y.call(this,Q)&&!isNaN(+Q.slice(1))&&(this[Q]=ve)},stop:function(){this.done=!0;var it=this.tryEntries[0].completion;if(it.type==="throw")throw it.arg;return this.rval},dispatchException:function(it){if(this.done)throw it;var Q=this;function ce(yt,Tt){return xe.type="throw",xe.arg=it,Q.next=yt,Tt&&(Q.method="next",Q.arg=ve),!!Tt}for(var be=this.tryEntries.length-1;be>=0;--be){var D=this.tryEntries[be],xe=D.completion;if(D.tryLoc==="root")return ce("end");if(D.tryLoc<=this.prev){var ot=y.call(D,"catchLoc"),at=y.call(D,"finallyLoc");if(ot&&at){if(this.prev<D.catchLoc)return ce(D.catchLoc,!0);if(this.prev<D.finallyLoc)return ce(D.finallyLoc)}else if(ot){if(this.prev<D.catchLoc)return ce(D.catchLoc,!0)}else{if(!at)throw Error("try statement without catch or finally");if(this.prev<D.finallyLoc)return ce(D.finallyLoc)}}}},abrupt:function(it,Q){for(var ce=this.tryEntries.length-1;ce>=0;--ce){var be=this.tryEntries[ce];if(be.tryLoc<=this.prev&&y.call(be,"finallyLoc")&&this.prev<be.finallyLoc){var D=be;break}}D&&(it==="break"||it==="continue")&&D.tryLoc<=Q&&Q<=D.finallyLoc&&(D=null);var xe=D?D.completion:{};return xe.type=it,xe.arg=Q,D?(this.method="next",this.next=D.finallyLoc,Ot):this.complete(xe)},complete:function(it,Q){if(it.type==="throw")throw it.arg;return it.type==="break"||it.type==="continue"?this.next=it.arg:it.type==="return"?(this.rval=this.arg=it.arg,this.method="return",this.next="end"):it.type==="normal"&&Q&&(this.next=Q),Ot},finish:function(it){for(var Q=this.tryEntries.length-1;Q>=0;--Q){var ce=this.tryEntries[Q];if(ce.finallyLoc===it)return this.complete(ce.completion,ce.afterLoc),$t(ce),Ot}},catch:function(it){for(var Q=this.tryEntries.length-1;Q>=0;--Q){var ce=this.tryEntries[Q];if(ce.tryLoc===it){var be=ce.completion;if(be.type==="throw"){var D=be.arg;$t(ce)}return D}}throw Error("illegal catch attempt")},delegateYield:function(it,Q,ce){return this.delegate={iterator:Ct(it),resultName:Q,nextLoc:ce},this.method==="next"&&(this.arg=ve),Ot}},ue}function me(ve,ue,c,y,v,B,O){try{var h=ve[B](O),k=h.value}catch(U){return void c(U)}h.done?ue(k):Promise.resolve(k).then(y,v)}function le(ve){return function(){var ue=this,c=arguments;return new Promise(function(y,v){var B=ve.apply(ue,c);function O(k){me(B,y,v,O,h,"next",k)}function h(k){me(B,y,v,O,h,"throw",k)}O(void 0)})}}function C(ve,ue){for(var c=0;c<ue.length;c++){var y=ue[c];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(ve,q(y.key),y)}}function q(ve){var ue=function(c,y){if(E(c)!="object"||!c)return c;var v=c[Symbol.toPrimitive];if(v!==void 0){var B=v.call(c,y||"default");if(E(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(c)}(ve,"string");return E(ue)=="symbol"?ue:ue+""}var X,ae,I,S,m,P,l,x,W,K,re,oe,Ee,Fe,Oe,$,de,we,Qe,ze,We,et,Be=function(ve){return ve.Temporary="temporary",ve.Persistent="persistent",ve}({}),Re=(X=function ve(ue){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(function(y,v){if(!(y instanceof v))throw new TypeError("Cannot call a class as a function")}(this,ve),this.serverURL=f()(ue),c.headers&&Object.keys(c.headers).length===0&&r.Ay.interceptors.request.use(function(y){return y.headers=Object.assign(y.headers,c.headers),y}),this.serverURL.protocol()!=="https"&&!c.allowHttp)throw new Error("Cannot connect to insecure Soroban RPC server if `allowHttp` isn't set")},ae=[{key:"getAccount",value:(et=le(Y().mark(function ve(ue){var c,y,v;return Y().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return c=u.xdr.LedgerKey.account(new u.xdr.LedgerKeyAccount({accountId:u.Keypair.fromPublicKey(ue).xdrPublicKey()})),B.next=3,this.getLedgerEntries(c);case 3:if((y=B.sent).entries.length!==0){B.next=6;break}return B.abrupt("return",Promise.reject({code:404,message:"Account not found: ".concat(ue)}));case 6:return v=y.entries[0].val.account(),B.abrupt("return",new u.Account(ue,v.seqNum().toString()));case 8:case"end":return B.stop()}},ve,this)})),function(ve){return et.apply(this,arguments)})},{key:"getHealth",value:(We=le(Y().mark(function ve(){return Y().wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.abrupt("return",T(this.serverURL.toString(),"getHealth"));case 1:case"end":return ue.stop()}},ve,this)})),function(){return We.apply(this,arguments)})},{key:"getContractData",value:(ze=le(Y().mark(function ve(ue,c){var y,v,B,O,h=arguments;return Y().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:if(y=h.length>2&&h[2]!==void 0?h[2]:Be.Persistent,typeof ue!="string"){k.next=5;break}v=new u.Contract(ue).address().toScAddress(),k.next=14;break;case 5:if(!(ue instanceof u.Address)){k.next=9;break}v=ue.toScAddress(),k.next=14;break;case 9:if(!(ue instanceof u.Contract)){k.next=13;break}v=ue.address().toScAddress(),k.next=14;break;case 13:throw new TypeError("unknown contract type: ".concat(ue));case 14:k.t0=y,k.next=k.t0===Be.Temporary?17:k.t0===Be.Persistent?19:21;break;case 17:return B=u.xdr.ContractDataDurability.temporary(),k.abrupt("break",22);case 19:return B=u.xdr.ContractDataDurability.persistent(),k.abrupt("break",22);case 21:throw new TypeError("invalid durability: ".concat(y));case 22:return O=u.xdr.LedgerKey.contractData(new u.xdr.LedgerKeyContractData({key:c,contract:v,durability:B})),k.abrupt("return",this.getLedgerEntries(O).then(function(U){return U.entries.length===0?Promise.reject({code:404,message:"Contract data not found. Contract: ".concat(u.Address.fromScAddress(v).toString(),", Key: ").concat(c.toXDR("base64"),", Durability: ").concat(y)}):U.entries[0]}));case 24:case"end":return k.stop()}},ve,this)})),function(ve,ue){return ze.apply(this,arguments)})},{key:"getContractWasmByContractId",value:(Qe=le(Y().mark(function ve(ue){var c,y,v,B;return Y().wrap(function(O){for(;;)switch(O.prev=O.next){case 0:return y=new u.Contract(ue).getFootprint(),O.next=3,this.getLedgerEntries(y);case 3:if((v=O.sent).entries.length&&(c=v.entries[0])!==null&&c!==void 0&&c.val){O.next=6;break}return O.abrupt("return",Promise.reject({code:404,message:"Could not obtain contract hash from server"}));case 6:return B=v.entries[0].val.contractData().val().instance().executable().wasmHash(),O.abrupt("return",this.getContractWasmByHash(B));case 8:case"end":return O.stop()}},ve,this)})),function(ve){return Qe.apply(this,arguments)})},{key:"getContractWasmByHash",value:(we=le(Y().mark(function ve(ue){var c,y,v,B,O,h,k=arguments;return Y().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:return y=k.length>1&&k[1]!==void 0?k[1]:void 0,v=typeof ue=="string"?L.from(ue,y):ue,B=u.xdr.LedgerKey.contractCode(new u.xdr.LedgerKeyContractCode({hash:v})),U.next=5,this.getLedgerEntries(B);case 5:if((O=U.sent).entries.length&&(c=O.entries[0])!==null&&c!==void 0&&c.val){U.next=8;break}return U.abrupt("return",Promise.reject({code:404,message:"Could not obtain contract wasm from server"}));case 8:return h=O.entries[0].val.contractCode().code(),U.abrupt("return",h);case 10:case"end":return U.stop()}},ve,this)})),function(ve){return we.apply(this,arguments)})},{key:"getLedgerEntries",value:(de=le(Y().mark(function ve(){var ue=arguments;return Y().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",this._getLedgerEntries.apply(this,ue).then(A.$D));case 1:case"end":return c.stop()}},ve,this)})),function(){return de.apply(this,arguments)})},{key:"_getLedgerEntries",value:($=le(Y().mark(function ve(){var ue,c,y,v=arguments;return Y().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:for(ue=v.length,c=new Array(ue),y=0;y<ue;y++)c[y]=v[y];return B.abrupt("return",T(this.serverURL.toString(),"getLedgerEntries",{keys:c.map(function(O){return O.toXDR("base64")})}));case 2:case"end":return B.stop()}},ve,this)})),function(){return $.apply(this,arguments)})},{key:"getTransaction",value:(Oe=le(Y().mark(function ve(ue){return Y().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",this._getTransaction(ue).then(function(y){var v={};if(y.status!==g.j.GetTransactionStatus.NOT_FOUND){var B,O=u.xdr.TransactionMeta.fromXDR(y.resultMetaXdr,"base64");v=j({ledger:y.ledger,createdAt:y.createdAt,applicationOrder:y.applicationOrder,feeBump:y.feeBump,envelopeXdr:u.xdr.TransactionEnvelope.fromXDR(y.envelopeXdr,"base64"),resultXdr:u.xdr.TransactionResult.fromXDR(y.resultXdr,"base64"),resultMetaXdr:O},O.switch()===3&&O.v3().sorobanMeta()!==null&&y.status===g.j.GetTransactionStatus.SUCCESS&&{returnValue:(B=O.v3().sorobanMeta())===null||B===void 0?void 0:B.returnValue()})}return j({status:y.status,latestLedger:y.latestLedger,latestLedgerCloseTime:y.latestLedgerCloseTime,oldestLedger:y.oldestLedger,oldestLedgerCloseTime:y.oldestLedgerCloseTime},v)}));case 1:case"end":return c.stop()}},ve,this)})),function(ve){return Oe.apply(this,arguments)})},{key:"_getTransaction",value:(Fe=le(Y().mark(function ve(ue){return Y().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",T(this.serverURL.toString(),"getTransaction",{hash:ue}));case 1:case"end":return c.stop()}},ve,this)})),function(ve){return Fe.apply(this,arguments)})},{key:"getEvents",value:(Ee=le(Y().mark(function ve(ue){return Y().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",this._getEvents(ue).then(A.fG));case 1:case"end":return c.stop()}},ve,this)})),function(ve){return Ee.apply(this,arguments)})},{key:"_getEvents",value:(oe=le(Y().mark(function ve(ue){var c;return Y().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.abrupt("return",T(this.serverURL.toString(),"getEvents",j({filters:(c=ue.filters)!==null&&c!==void 0?c:[],pagination:j(j({},ue.cursor&&{cursor:ue.cursor}),ue.limit&&{limit:ue.limit})},ue.startLedger&&{startLedger:ue.startLedger})));case 1:case"end":return y.stop()}},ve,this)})),function(ve){return oe.apply(this,arguments)})},{key:"getNetwork",value:(re=le(Y().mark(function ve(){return Y().wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.next=2,T(this.serverURL.toString(),"getNetwork");case 2:return ue.abrupt("return",ue.sent);case 3:case"end":return ue.stop()}},ve,this)})),function(){return re.apply(this,arguments)})},{key:"getLatestLedger",value:(K=le(Y().mark(function ve(){return Y().wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:return ue.abrupt("return",T(this.serverURL.toString(),"getLatestLedger"));case 1:case"end":return ue.stop()}},ve,this)})),function(){return K.apply(this,arguments)})},{key:"simulateTransaction",value:(W=le(Y().mark(function ve(ue,c){return Y().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.abrupt("return",this._simulateTransaction(ue,c).then(A.jr));case 1:case"end":return y.stop()}},ve,this)})),function(ve,ue){return W.apply(this,arguments)})},{key:"_simulateTransaction",value:(x=le(Y().mark(function ve(ue,c){return Y().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.abrupt("return",T(this.serverURL.toString(),"simulateTransaction",j({transaction:ue.toXDR()},c!==void 0&&{resourceConfig:{instructionLeeway:c.cpuInstructions}})));case 1:case"end":return y.stop()}},ve,this)})),function(ve,ue){return x.apply(this,arguments)})},{key:"prepareTransaction",value:(l=le(Y().mark(function ve(ue){var c;return Y().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,this.simulateTransaction(ue);case 2:if(c=y.sent,!g.j.isSimulationError(c)){y.next=5;break}throw c.error;case 5:return y.abrupt("return",(0,p.X)(ue,c).build());case 6:case"end":return y.stop()}},ve,this)})),function(ve){return l.apply(this,arguments)})},{key:"sendTransaction",value:(P=le(Y().mark(function ve(ue){return Y().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",this._sendTransaction(ue).then(A.Af));case 1:case"end":return c.stop()}},ve,this)})),function(ve){return P.apply(this,arguments)})},{key:"_sendTransaction",value:(m=le(Y().mark(function ve(ue){return Y().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.abrupt("return",T(this.serverURL.toString(),"sendTransaction",{transaction:ue.toXDR()}));case 1:case"end":return c.stop()}},ve,this)})),function(ve){return m.apply(this,arguments)})},{key:"requestAirdrop",value:(S=le(Y().mark(function ve(ue,c){var y,v,B,O,h,k;return Y().wrap(function(U){for(;;)switch(U.prev=U.next){case 0:if(y=typeof ue=="string"?ue:ue.accountId(),U.t0=c,U.t0){U.next=6;break}return U.next=5,this.getNetwork();case 5:U.t0=U.sent.friendbotUrl;case 6:if(c=U.t0){U.next=9;break}throw new Error("No friendbot URL configured for current network");case 9:return U.prev=9,U.next=12,r.Ay.post("".concat(c,"?addr=").concat(encodeURIComponent(y)));case 12:return v=U.sent,B=u.xdr.TransactionMeta.fromXDR(v.data.result_meta_xdr,"base64"),O=$e(B),U.abrupt("return",new u.Account(y,O));case 18:if(U.prev=18,U.t1=U.catch(9),((h=U.t1.response)===null||h===void 0?void 0:h.status)!==400){U.next=23;break}if((k=U.t1.response.detail)===null||k===void 0||!k.includes("createAccountAlreadyExist")){U.next=23;break}return U.abrupt("return",this.getAccount(y));case 23:throw U.t1;case 24:case"end":return U.stop()}},ve,this,[[9,18]])})),function(ve,ue){return S.apply(this,arguments)})}],ae&&C(X.prototype,ae),I&&C(X,I),Object.defineProperty(X,"prototype",{writable:!1}),X);function $e(ve){var ue=[];switch(ve.switch()){case 0:ue=ve.operations();break;case 1:case 2:case 3:ue=ve.value().operations();break;default:throw new Error("Unexpected transaction meta switch value")}var c,y=N(ue);try{for(y.s();!(c=y.n()).done;){var v,B=N(c.value.changes());try{for(B.s();!(v=B.n()).done;){var O=v.value;if(O.switch()===u.xdr.LedgerEntryChangeType.ledgerEntryCreated()){var h=O.created().data();if(h.switch()===u.xdr.LedgerEntryType.account())return h.account().seqNum().toString()}}}catch(k){B.e(k)}finally{B.f()}}}catch(k){y.e(k)}finally{y.f()}throw new Error("No account created in transaction")}},8680:(o,a,i)=>{"use strict";i.d(a,{X:()=>r});var s=i(356),f=i(4076),u=i(784);function r(_,d){var b;if("innerTransaction"in _)return r(_.innerTransaction,d);if(!function(E){if(E.operations.length!==1)return!1;switch(E.operations[0].type){case"invokeHostFunction":case"extendFootprintTtl":case"restoreFootprint":return!0;default:return!1}}(_))throw new TypeError("unsupported transaction: must contain exactly one invokeHostFunction, extendFootprintTtl, or restoreFootprint operation");var T=(0,u.jr)(d);if(!f.j.isSimulationSuccess(T))throw new Error("simulation incorrect: ".concat(JSON.stringify(T)));var w=parseInt(_.fee)||0,g=parseInt(T.minResourceFee)||0,p=s.TransactionBuilder.cloneFrom(_,{fee:(w+g).toString(),sorobanData:T.transactionData.build(),networkPassphrase:_.networkPassphrase});if(_.operations[0].type==="invokeHostFunction"){p.clearOperations();var A=_.operations[0],L=(b=A.auth)!==null&&b!==void 0?b:[];p.addOperation(s.Operation.invokeHostFunction({source:A.source,func:A.func,auth:L.length>0?L:T.result.auth}))}return p}},3898:(o,a,i)=>{"use strict";i.r(a),i.d(a,{Api:()=>{},Resolver:()=>R,STELLAR_TOML_MAX_SIZE:()=>N});var s=i(6266),f=i(1293),u=i.n(f),r=i(8732);function _(j){return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},_(j)}function d(){d=function(){return V};var j,V={},Y=Object.prototype,me=Y.hasOwnProperty,le=Object.defineProperty||function(ve,ue,c){ve[ue]=c.value},C=typeof Symbol=="function"?Symbol:{},q=C.iterator||"@@iterator",X=C.asyncIterator||"@@asyncIterator",ae=C.toStringTag||"@@toStringTag";function I(ve,ue,c){return Object.defineProperty(ve,ue,{value:c,enumerable:!0,configurable:!0,writable:!0}),ve[ue]}try{I({},"")}catch{I=function(ue,c,y){return ue[c]=y}}function S(ve,ue,c,y){var v=ue&&ue.prototype instanceof re?ue:re,B=Object.create(v.prototype),O=new Re(y||[]);return le(B,"_invoke",{value:ze(ve,c,O)}),B}function m(ve,ue,c){try{return{type:"normal",arg:ve.call(ue,c)}}catch(y){return{type:"throw",arg:y}}}V.wrap=S;var P="suspendedStart",l="suspendedYield",x="executing",W="completed",K={};function re(){}function oe(){}function Ee(){}var Fe={};I(Fe,q,function(){return this});var Oe=Object.getPrototypeOf,$=Oe&&Oe(Oe($e([])));$&&$!==Y&&me.call($,q)&&(Fe=$);var de=Ee.prototype=re.prototype=Object.create(Fe);function we(ve){["next","throw","return"].forEach(function(ue){I(ve,ue,function(c){return this._invoke(ue,c)})})}function Qe(ve,ue){function c(v,B,O,h){var k=m(ve[v],ve,B);if(k.type!=="throw"){var U=k.arg,M=U.value;return M&&_(M)=="object"&&me.call(M,"__await")?ue.resolve(M.__await).then(function(J){c("next",J,O,h)},function(J){c("throw",J,O,h)}):ue.resolve(M).then(function(J){U.value=J,O(U)},function(J){return c("throw",J,O,h)})}h(k.arg)}var y;le(this,"_invoke",{value:function(v,B){function O(){return new ue(function(h,k){c(v,B,h,k)})}return y=y?y.then(O,O):O()}})}function ze(ve,ue,c){var y=P;return function(v,B){if(y===x)throw Error("Generator is already running");if(y===W){if(v==="throw")throw B;return{value:j,done:!0}}for(c.method=v,c.arg=B;;){var O=c.delegate;if(O){var h=We(O,c);if(h){if(h===K)continue;return h}}if(c.method==="next")c.sent=c._sent=c.arg;else if(c.method==="throw"){if(y===P)throw y=W,c.arg;c.dispatchException(c.arg)}else c.method==="return"&&c.abrupt("return",c.arg);y=x;var k=m(ve,ue,c);if(k.type==="normal"){if(y=c.done?W:l,k.arg===K)continue;return{value:k.arg,done:c.done}}k.type==="throw"&&(y=W,c.method="throw",c.arg=k.arg)}}}function We(ve,ue){var c=ue.method,y=ve.iterator[c];if(y===j)return ue.delegate=null,c==="throw"&&ve.iterator.return&&(ue.method="return",ue.arg=j,We(ve,ue),ue.method==="throw")||c!=="return"&&(ue.method="throw",ue.arg=new TypeError("The iterator does not provide a '"+c+"' method")),K;var v=m(y,ve.iterator,ue.arg);if(v.type==="throw")return ue.method="throw",ue.arg=v.arg,ue.delegate=null,K;var B=v.arg;return B?B.done?(ue[ve.resultName]=B.value,ue.next=ve.nextLoc,ue.method!=="return"&&(ue.method="next",ue.arg=j),ue.delegate=null,K):B:(ue.method="throw",ue.arg=new TypeError("iterator result is not an object"),ue.delegate=null,K)}function et(ve){var ue={tryLoc:ve[0]};1 in ve&&(ue.catchLoc=ve[1]),2 in ve&&(ue.finallyLoc=ve[2],ue.afterLoc=ve[3]),this.tryEntries.push(ue)}function Be(ve){var ue=ve.completion||{};ue.type="normal",delete ue.arg,ve.completion=ue}function Re(ve){this.tryEntries=[{tryLoc:"root"}],ve.forEach(et,this),this.reset(!0)}function $e(ve){if(ve||ve===""){var ue=ve[q];if(ue)return ue.call(ve);if(typeof ve.next=="function")return ve;if(!isNaN(ve.length)){var c=-1,y=function v(){for(;++c<ve.length;)if(me.call(ve,c))return v.value=ve[c],v.done=!1,v;return v.value=j,v.done=!0,v};return y.next=y}}throw new TypeError(_(ve)+" is not iterable")}return oe.prototype=Ee,le(de,"constructor",{value:Ee,configurable:!0}),le(Ee,"constructor",{value:oe,configurable:!0}),oe.displayName=I(Ee,ae,"GeneratorFunction"),V.isGeneratorFunction=function(ve){var ue=typeof ve=="function"&&ve.constructor;return!!ue&&(ue===oe||(ue.displayName||ue.name)==="GeneratorFunction")},V.mark=function(ve){return Object.setPrototypeOf?Object.setPrototypeOf(ve,Ee):(ve.__proto__=Ee,I(ve,ae,"GeneratorFunction")),ve.prototype=Object.create(de),ve},V.awrap=function(ve){return{__await:ve}},we(Qe.prototype),I(Qe.prototype,X,function(){return this}),V.AsyncIterator=Qe,V.async=function(ve,ue,c,y,v){v===void 0&&(v=Promise);var B=new Qe(S(ve,ue,c,y),v);return V.isGeneratorFunction(ue)?B:B.next().then(function(O){return O.done?O.value:B.next()})},we(de),I(de,ae,"Generator"),I(de,q,function(){return this}),I(de,"toString",function(){return"[object Generator]"}),V.keys=function(ve){var ue=Object(ve),c=[];for(var y in ue)c.push(y);return c.reverse(),function v(){for(;c.length;){var B=c.pop();if(B in ue)return v.value=B,v.done=!1,v}return v.done=!0,v}},V.values=$e,Re.prototype={constructor:Re,reset:function(ve){if(this.prev=0,this.next=0,this.sent=this._sent=j,this.done=!1,this.delegate=null,this.method="next",this.arg=j,this.tryEntries.forEach(Be),!ve)for(var ue in this)ue.charAt(0)==="t"&&me.call(this,ue)&&!isNaN(+ue.slice(1))&&(this[ue]=j)},stop:function(){this.done=!0;var ve=this.tryEntries[0].completion;if(ve.type==="throw")throw ve.arg;return this.rval},dispatchException:function(ve){if(this.done)throw ve;var ue=this;function c(k,U){return B.type="throw",B.arg=ve,ue.next=k,U&&(ue.method="next",ue.arg=j),!!U}for(var y=this.tryEntries.length-1;y>=0;--y){var v=this.tryEntries[y],B=v.completion;if(v.tryLoc==="root")return c("end");if(v.tryLoc<=this.prev){var O=me.call(v,"catchLoc"),h=me.call(v,"finallyLoc");if(O&&h){if(this.prev<v.catchLoc)return c(v.catchLoc,!0);if(this.prev<v.finallyLoc)return c(v.finallyLoc)}else if(O){if(this.prev<v.catchLoc)return c(v.catchLoc,!0)}else{if(!h)throw Error("try statement without catch or finally");if(this.prev<v.finallyLoc)return c(v.finallyLoc)}}}},abrupt:function(ve,ue){for(var c=this.tryEntries.length-1;c>=0;--c){var y=this.tryEntries[c];if(y.tryLoc<=this.prev&&me.call(y,"finallyLoc")&&this.prev<y.finallyLoc){var v=y;break}}v&&(ve==="break"||ve==="continue")&&v.tryLoc<=ue&&ue<=v.finallyLoc&&(v=null);var B=v?v.completion:{};return B.type=ve,B.arg=ue,v?(this.method="next",this.next=v.finallyLoc,K):this.complete(B)},complete:function(ve,ue){if(ve.type==="throw")throw ve.arg;return ve.type==="break"||ve.type==="continue"?this.next=ve.arg:ve.type==="return"?(this.rval=this.arg=ve.arg,this.method="return",this.next="end"):ve.type==="normal"&&ue&&(this.next=ue),K},finish:function(ve){for(var ue=this.tryEntries.length-1;ue>=0;--ue){var c=this.tryEntries[ue];if(c.finallyLoc===ve)return this.complete(c.completion,c.afterLoc),Be(c),K}},catch:function(ve){for(var ue=this.tryEntries.length-1;ue>=0;--ue){var c=this.tryEntries[ue];if(c.tryLoc===ve){var y=c.completion;if(y.type==="throw"){var v=y.arg;Be(c)}return v}}throw Error("illegal catch attempt")},delegateYield:function(ve,ue,c){return this.delegate={iterator:$e(ve),resultName:ue,nextLoc:c},this.method==="next"&&(this.arg=j),K}},V}function b(j,V,Y,me,le,C,q){try{var X=j[C](q),ae=X.value}catch(I){return void Y(I)}X.done?V(ae):Promise.resolve(ae).then(me,le)}function T(j,V){for(var Y=0;Y<V.length;Y++){var me=V[Y];me.enumerable=me.enumerable||!1,me.configurable=!0,"value"in me&&(me.writable=!0),Object.defineProperty(j,w(me.key),me)}}function w(j){var V=function(Y,me){if(_(Y)!="object"||!Y)return Y;var le=Y[Symbol.toPrimitive];if(le!==void 0){var C=le.call(Y,me||"default");if(_(C)!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(me==="string"?String:Number)(Y)}(j,"string");return _(V)=="symbol"?V:V+""}var g,p,A,L,E,N=102400,F=s.A.CancelToken,R=(g=function j(){(function(V,Y){if(!(V instanceof Y))throw new TypeError("Cannot call a class as a function")})(this,j)},p=null,A=[{key:"resolve",value:(L=d().mark(function j(V){var Y,me,le,C,q=arguments;return d().wrap(function(X){for(;;)switch(X.prev=X.next){case 0:return me=(Y=q.length>1&&q[1]!==void 0?q[1]:{}).allowHttp===void 0?r.T.isAllowHttp():Y.allowHttp,le=Y.timeout===void 0?r.T.getTimeout():Y.timeout,C=me?"http":"https",X.abrupt("return",s.A.get("".concat(C,"://").concat(V,"/.well-known/stellar.toml"),{maxContentLength:N,cancelToken:le?new F(function(ae){return setTimeout(function(){return ae("timeout of ".concat(le,"ms exceeded"))},le)}):void 0,timeout:le}).then(function(ae){try{var I=u().parse(ae.data);return Promise.resolve(I)}catch(S){return Promise.reject(new Error("stellar.toml is invalid - Parsing error on line ".concat(S.line,", column ").concat(S.column,": ").concat(S.message)))}}).catch(function(ae){throw ae.message.match(/^maxContentLength size/)?new Error("stellar.toml file exceeds allowed size of ".concat(N)):ae}));case 5:case"end":return X.stop()}},j)}),E=function(){var j=this,V=arguments;return new Promise(function(Y,me){var le=L.apply(j,V);function C(X){b(le,Y,me,C,q,"next",X)}function q(X){b(le,Y,me,C,q,"throw",X)}C(void 0)})},function(j){return E.apply(this,arguments)})}],p&&T(g.prototype,p),A&&T(g,A),Object.defineProperty(g,"prototype",{writable:!1}),g)},3121:(o,a,i)=>{"use strict";function s(T){return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},s(T)}function f(T,w){for(var g=0;g<w.length;g++){var p=w[g];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(T,u(p.key),p)}}function u(T){var w=function(g,p){if(s(g)!="object"||!g)return g;var A=g[Symbol.toPrimitive];if(A!==void 0){var L=A.call(g,p||"default");if(s(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(g)}(T,"string");return s(w)=="symbol"?w:w+""}i.d(a,{A:()=>b});var r,_,d,b=(r=function T(){(function(w,g){if(!(w instanceof g))throw new TypeError("Cannot call a class as a function")})(this,T)},d=[{key:"validateTimebounds",value:function(T){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!T.timeBounds)return!1;var g=Math.floor(Date.now()/1e3),p=T.timeBounds,A=p.minTime,L=p.maxTime;return g>=Number.parseInt(A,10)-w&&g<=Number.parseInt(L,10)+w}}],(_=null)&&f(r.prototype,_),d&&f(r,d),Object.defineProperty(r,"prototype",{writable:!1}),r)},5479:(o,a,i)=>{"use strict";i.r(a),i.d(a,{InvalidChallengeError:()=>L,buildChallengeTx:()=>le,gatherTxSigners:()=>I,readChallengeTx:()=>C,verifyChallengeTxSigners:()=>X,verifyChallengeTxThreshold:()=>q,verifyTxSignedBy:()=>ae});var s=i(3209),f=i.n(s),u=i(356),r=i(3121);function _(S){return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},_(S)}function d(S,m){for(var P=0;P<m.length;P++){var l=m[P];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(S,b(l.key),l)}}function b(S){var m=function(P,l){if(_(P)!="object"||!P)return P;var x=P[Symbol.toPrimitive];if(x!==void 0){var W=x.call(P,l||"default");if(_(W)!="object")return W;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(P)}(S,"string");return _(m)=="symbol"?m:m+""}function T(S,m,P){return m=A(m),function(l,x){if(x&&(_(x)==="object"||typeof x=="function"))return x;if(x!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(W){if(W===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W}(l)}(S,g()?Reflect.construct(m,P||[],A(S).constructor):m.apply(S,P))}function w(S){var m=typeof Map=="function"?new Map:void 0;return w=function(P){if(P===null||!function(x){try{return Function.toString.call(x).indexOf("[native code]")!==-1}catch{return typeof x=="function"}}(P))return P;if(typeof P!="function")throw new TypeError("Super expression must either be null or a function");if(m!==void 0){if(m.has(P))return m.get(P);m.set(P,l)}function l(){return function(x,W,K){if(g())return Reflect.construct.apply(null,arguments);var re=[null];re.push.apply(re,W);var oe=new(x.bind.apply(x,re));return K&&p(oe,K.prototype),oe}(P,arguments,A(this).constructor)}return l.prototype=Object.create(P.prototype,{constructor:{value:l,enumerable:!1,writable:!0,configurable:!0}}),p(l,P)},w(S)}function g(){try{var S=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(g=function(){return!!S})()}function p(S,m){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(P,l){return P.__proto__=l,P},p(S,m)}function A(S){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(m){return m.__proto__||Object.getPrototypeOf(m)},A(S)}var L=function(S){function m(W){var K;(function(oe,Ee){if(!(oe instanceof Ee))throw new TypeError("Cannot call a class as a function")})(this,m);var re=(this instanceof m?this.constructor:void 0).prototype;return(K=T(this,m,[W])).__proto__=re,K.constructor=m,K.name="InvalidChallengeError",K}return function(W,K){if(typeof K!="function"&&K!==null)throw new TypeError("Super expression must either be null or a function");W.prototype=Object.create(K&&K.prototype,{constructor:{value:W,writable:!0,configurable:!0}}),Object.defineProperty(W,"prototype",{writable:!1}),K&&p(W,K)}(m,S),P=m,l&&d(P.prototype,l),x&&d(P,x),Object.defineProperty(P,"prototype",{writable:!1}),P;var P,l,x}(w(Error)),E=i(8287).Buffer;function N(S){return function(m){if(Array.isArray(m))return Y(m)}(S)||me(S)||V(S)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
35
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function F(S,m){var P=typeof Symbol<"u"&&S[Symbol.iterator]||S["@@iterator"];if(!P){if(Array.isArray(S)||(P=V(S))||m&&S&&typeof S.length=="number"){P&&(S=P);var l=0,x=function(){};return{s:x,n:function(){return l>=S.length?{done:!0}:{done:!1,value:S[l++]}},e:function(oe){throw oe},f:x}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
36
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var W,K=!0,re=!1;return{s:function(){P=P.call(S)},n:function(){var oe=P.next();return K=oe.done,oe},e:function(oe){re=!0,W=oe},f:function(){try{K||P.return==null||P.return()}finally{if(re)throw W}}}}function R(S){return R=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},R(S)}function j(S){return function(m){if(Array.isArray(m))return m}(S)||me(S)||V(S)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
37
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function V(S,m){if(S){if(typeof S=="string")return Y(S,m);var P=Object.prototype.toString.call(S).slice(8,-1);return P==="Object"&&S.constructor&&(P=S.constructor.name),P==="Map"||P==="Set"?Array.from(S):P==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(P)?Y(S,m):void 0}}function Y(S,m){(m==null||m>S.length)&&(m=S.length);for(var P=0,l=new Array(m);P<m;P++)l[P]=S[P];return l}function me(S){if(typeof Symbol<"u"&&S[Symbol.iterator]!=null||S["@@iterator"]!=null)return Array.from(S)}function le(S,m,P){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:300,x=arguments.length>4?arguments[4]:void 0,W=arguments.length>5?arguments[5]:void 0,K=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,re=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,oe=arguments.length>8&&arguments[8]!==void 0?arguments[8]:null;if(m.startsWith("M")&&K)throw Error("memo cannot be used if clientAccountID is a muxed account");var Ee=new u.Account(S.publicKey(),"-1"),Fe=Math.floor(Date.now()/1e3),Oe=f()(48).toString("base64"),$=new u.TransactionBuilder(Ee,{fee:u.BASE_FEE,networkPassphrase:x,timebounds:{minTime:Fe,maxTime:Fe+l}}).addOperation(u.Operation.manageData({name:"".concat(P," auth"),value:Oe,source:m})).addOperation(u.Operation.manageData({name:"web_auth_domain",value:W,source:Ee.accountId()}));if(re){if(!oe)throw Error("clientSigningKey is required if clientDomain is provided");$.addOperation(u.Operation.manageData({name:"client_domain",value:re,source:oe}))}K&&$.addMemo(u.Memo.id(K));var de=$.build();return de.sign(S),de.toEnvelope().toXDR("base64").toString()}function C(S,m,P,l,x){var W,K;if(m.startsWith("M"))throw Error("Invalid serverAccountID: multiplexed accounts are not supported.");try{K=new u.Transaction(S,P)}catch{try{K=new u.FeeBumpTransaction(S,P)}catch{throw new L("Invalid challenge: unable to deserialize challengeTx transaction string")}throw new L("Invalid challenge: expected a Transaction but received a FeeBumpTransaction")}if(Number.parseInt(K.sequence,10)!==0)throw new L("The transaction sequence number should be zero");if(K.source!==m)throw new L("The transaction source account is not equal to the server's account");if(K.operations.length<1)throw new L("The transaction should contain at least one operation");var re=j(K.operations),oe=re[0],Ee=re.slice(1);if(!oe.source)throw new L("The transaction's operation should contain a source account");var Fe,Oe=oe.source,$=null;if(K.memo.type!==u.MemoNone){if(Oe.startsWith("M"))throw new L("The transaction has a memo but the client account ID is a muxed account");if(K.memo.type!==u.MemoID)throw new L("The transaction's memo must be of type `id`");$=K.memo.value}if(oe.type!=="manageData")throw new L("The transaction's operation type should be 'manageData'");if(K.timeBounds&&Number.parseInt((W=K.timeBounds)===null||W===void 0?void 0:W.maxTime,10)===u.TimeoutInfinite)throw new L("The transaction requires non-infinite timebounds");if(!r.A.validateTimebounds(K,300))throw new L("The transaction has expired");if(oe.value===void 0)throw new L("The transaction's operation values should not be null");if(!oe.value)throw new L("The transaction's operation value should not be null");if(E.from(oe.value.toString(),"base64").length!==48)throw new L("The transaction's operation value should be a 64 bytes base64 random string");if(!l)throw new L("Invalid homeDomains: a home domain must be provided for verification");if(typeof l=="string")"".concat(l," auth")===oe.name&&(Fe=l);else{if(!Array.isArray(l))throw new L("Invalid homeDomains: homeDomains type is ".concat(R(l)," but should be a string or an array"));Fe=l.find(function(ze){return"".concat(ze," auth")===oe.name})}if(!Fe)throw new L("Invalid homeDomains: the transaction's operation key name does not match the expected home domain");var de,we=F(Ee);try{for(we.s();!(de=we.n()).done;){var Qe=de.value;if(Qe.type!=="manageData")throw new L("The transaction has operations that are not of type 'manageData'");if(Qe.source!==m&&Qe.name!=="client_domain")throw new L("The transaction has operations that are unrecognized");if(Qe.name==="web_auth_domain"){if(Qe.value===void 0)throw new L("'web_auth_domain' operation value should not be null");if(Qe.value.compare(E.from(x)))throw new L("'web_auth_domain' operation value does not match ".concat(x))}}}catch(ze){we.e(ze)}finally{we.f()}if(!ae(K,m))throw new L("Transaction not signed by server: '".concat(m,"'"));return{tx:K,clientAccountID:Oe,matchedHomeDomain:Fe,memo:$}}function q(S,m,P,l,x,W,K){for(var re=X(S,m,P,x.map(function($){return $.key}),W,K),oe=0,Ee=function(){var $,de=Oe[Fe],we=(($=x.find(function(Qe){return Qe.key===de}))===null||$===void 0?void 0:$.weight)||0;oe+=we},Fe=0,Oe=re;Fe<Oe.length;Fe++)Ee();if(oe<l)throw new L("signers with weight ".concat(oe," do not meet threshold ").concat(l,'"'));return re}function X(S,m,P,l,x,W){var K,re=C(S,m,P,x,W).tx;try{K=u.Keypair.fromPublicKey(m)}catch(ue){throw new Error("Couldn't infer keypair from the provided 'serverAccountID': "+ue.message)}var oe,Ee,Fe=new Set,Oe=F(l);try{for(Oe.s();!(oe=Oe.n()).done;){var $=oe.value;$!==K.publicKey()&&$.charAt(0)==="G"&&Fe.add($)}}catch(ue){Oe.e(ue)}finally{Oe.f()}if(Fe.size===0)throw new L("No verifiable client signers provided, at least one G... address must be provided");var de,we=F(re.operations);try{for(we.s();!(de=we.n()).done;){var Qe=de.value;if(Qe.type==="manageData"&&Qe.name==="client_domain"){if(Ee)throw new L("Found more than one client_domain operation");Ee=Qe.source}}}catch(ue){we.e(ue)}finally{we.f()}var ze=[K.publicKey()].concat(N(Array.from(Fe)));Ee&&ze.push(Ee);for(var We=I(re,ze),et=!1,Be=!1,Re=0,$e=We;Re<$e.length;Re++){var ve=$e[Re];ve===K.publicKey()&&(et=!0),ve===Ee&&(Be=!0)}if(!et)throw new L("Transaction not signed by server: '"+K.publicKey()+"'");if(Ee&&!Be)throw new L("Transaction not signed by the source account of the 'client_domain' ManageData operation");if(We.length===1)throw new L("None of the given signers match the transaction signatures");if(We.length!==re.signatures.length)throw new L("Transaction has unrecognized signatures");return We.splice(We.indexOf(K.publicKey()),1),Ee&&We.splice(We.indexOf(Ee),1),We}function ae(S,m){return I(S,[m]).length!==0}function I(S,m){var P,l=S.hash(),x=N(S.signatures),W=new Set,K=F(m);try{for(K.s();!(P=K.n()).done;){var re=P.value;if(x.length===0)break;var oe=void 0;try{oe=u.Keypair.fromPublicKey(re)}catch(Oe){throw new L("Signer is not a valid address: "+Oe.message)}for(var Ee=0;Ee<x.length;Ee++){var Fe=x[Ee];if(Fe.hint().equals(oe.signatureHint())&&oe.verify(l,Fe.signature())){W.add(re),x.splice(Ee,1);break}}}}catch(Oe){K.e(Oe)}finally{K.f()}return Array.from(W)}},5360:(o,a)=>{"use strict";var i=function(d,b){return b||(b={}),d.split("").forEach(function(T,w){T in b||(b[T]=w)}),b},s={alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",charmap:{0:14,1:8}};s.charmap=i(s.alphabet,s.charmap);var f={alphabet:"0123456789ABCDEFGHJKMNPQRSTVWXYZ",charmap:{O:0,I:1,L:1}};f.charmap=i(f.alphabet,f.charmap);var u={alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",charmap:{}};function r(d){if(this.buf=[],this.shift=8,this.carry=0,d){switch(d.type){case"rfc4648":this.charmap=a.rfc4648.charmap;break;case"crockford":this.charmap=a.crockford.charmap;break;case"base32hex":this.charmap=a.base32hex.charmap;break;default:throw new Error("invalid type")}d.charmap&&(this.charmap=d.charmap)}}function _(d){if(this.buf="",this.shift=3,this.carry=0,d){switch(d.type){case"rfc4648":this.alphabet=a.rfc4648.alphabet;break;case"crockford":this.alphabet=a.crockford.alphabet;break;case"base32hex":this.alphabet=a.base32hex.alphabet;break;default:throw new Error("invalid type")}d.alphabet?this.alphabet=d.alphabet:d.lc&&(this.alphabet=this.alphabet.toLowerCase())}}u.charmap=i(u.alphabet,u.charmap),r.prototype.charmap=s.charmap,r.prototype.write=function(d){var b=this.charmap,T=this.buf,w=this.shift,g=this.carry;return d.toUpperCase().split("").forEach(function(p){if(p!="="){var A=255&b[p];(w-=5)>0?g|=A<<w:w<0?(T.push(g|A>>-w),g=A<<(w+=8)&255):(T.push(g|A),w=8,g=0)}}),this.shift=w,this.carry=g,this},r.prototype.finalize=function(d){return d&&this.write(d),this.shift!==8&&this.carry!==0&&(this.buf.push(this.carry),this.shift=8,this.carry=0),this.buf},_.prototype.alphabet=s.alphabet,_.prototype.write=function(d){var b,T,w,g=this.shift,p=this.carry;for(w=0;w<d.length;w++)b=p|(T=d[w])>>g,this.buf+=this.alphabet[31&b],g>5&&(b=T>>(g-=5),this.buf+=this.alphabet[31&b]),p=T<<(g=5-g),g=8-g;return this.shift=g,this.carry=p,this},_.prototype.finalize=function(d){return d&&this.write(d),this.shift!==3&&(this.buf+=this.alphabet[31&this.carry],this.shift=3,this.carry=0),this.buf},a.encode=function(d,b){return new _(b).finalize(d)},a.decode=function(d,b){return new r(b).finalize(d)},a.Decoder=r,a.Encoder=_,a.charmap=i,a.crockford=f,a.rfc4648=s,a.base32hex=u},7526:(o,a)=>{"use strict";a.byteLength=function(b){var T=_(b),w=T[0],g=T[1];return 3*(w+g)/4-g},a.toByteArray=function(b){var T,w,g=_(b),p=g[0],A=g[1],L=new f(function(F,R,j){return 3*(R+j)/4-j}(0,p,A)),E=0,N=A>0?p-4:p;for(w=0;w<N;w+=4)T=s[b.charCodeAt(w)]<<18|s[b.charCodeAt(w+1)]<<12|s[b.charCodeAt(w+2)]<<6|s[b.charCodeAt(w+3)],L[E++]=T>>16&255,L[E++]=T>>8&255,L[E++]=255&T;return A===2&&(T=s[b.charCodeAt(w)]<<2|s[b.charCodeAt(w+1)]>>4,L[E++]=255&T),A===1&&(T=s[b.charCodeAt(w)]<<10|s[b.charCodeAt(w+1)]<<4|s[b.charCodeAt(w+2)]>>2,L[E++]=T>>8&255,L[E++]=255&T),L},a.fromByteArray=function(b){for(var T,w=b.length,g=w%3,p=[],A=16383,L=0,E=w-g;L<E;L+=A)p.push(d(b,L,L+A>E?E:L+A));return g===1?(T=b[w-1],p.push(i[T>>2]+i[T<<4&63]+"==")):g===2&&(T=(b[w-2]<<8)+b[w-1],p.push(i[T>>10]+i[T>>4&63]+i[T<<2&63]+"=")),p.join("")};for(var i=[],s=[],f=typeof Uint8Array<"u"?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0;r<64;++r)i[r]=u[r],s[u.charCodeAt(r)]=r;function _(b){var T=b.length;if(T%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=b.indexOf("=");return w===-1&&(w=T),[w,w===T?0:4-w%4]}function d(b,T,w){for(var g,p,A=[],L=T;L<w;L+=3)g=(b[L]<<16&16711680)+(b[L+1]<<8&65280)+(255&b[L+2]),A.push(i[(p=g)>>18&63]+i[p>>12&63]+i[p>>6&63]+i[63&p]);return A.join("")}s[45]=62,s[95]=63},1594:function(o,a,i){var s;(function(f){"use strict";var u,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,_=Math.ceil,d=Math.floor,b="[BigNumber Error] ",T=b+"Number primitive has more than 15 significant digits: ",w=1e14,g=14,p=9007199254740991,A=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],L=1e7,E=1e9;function N(le){var C=0|le;return le>0||le===C?C:C-1}function F(le){for(var C,q,X=1,ae=le.length,I=le[0]+"";X<ae;){for(C=le[X++]+"",q=g-C.length;q--;C="0"+C);I+=C}for(ae=I.length;I.charCodeAt(--ae)===48;);return I.slice(0,ae+1||1)}function R(le,C){var q,X,ae=le.c,I=C.c,S=le.s,m=C.s,P=le.e,l=C.e;if(!S||!m)return null;if(q=ae&&!ae[0],X=I&&!I[0],q||X)return q?X?0:-m:S;if(S!=m)return S;if(q=S<0,X=P==l,!ae||!I)return X?0:!ae^q?1:-1;if(!X)return P>l^q?1:-1;for(m=(P=ae.length)<(l=I.length)?P:l,S=0;S<m;S++)if(ae[S]!=I[S])return ae[S]>I[S]^q?1:-1;return P==l?0:P>l^q?1:-1}function j(le,C,q,X){if(le<C||le>q||le!==d(le))throw Error(b+(X||"Argument")+(typeof le=="number"?le<C||le>q?" out of range: ":" not an integer: ":" not a primitive number: ")+String(le))}function V(le){var C=le.c.length-1;return N(le.e/g)==C&&le.c[C]%2!=0}function Y(le,C){return(le.length>1?le.charAt(0)+"."+le.slice(1):le)+(C<0?"e":"e+")+C}function me(le,C,q){var X,ae;if(C<0){for(ae=q+".";++C;ae+=q);le=ae+le}else if(++C>(X=le.length)){for(ae=q,C-=X;--C;ae+=q);le+=ae}else C<X&&(le=le.slice(0,C)+"."+le.slice(C));return le}u=function le(C){var q,X,ae,I,S,m,P,l,x,W,K=Re.prototype={constructor:Re,toString:null,valueOf:null},re=new Re(1),oe=20,Ee=4,Fe=-7,Oe=21,$=-1e7,de=1e7,we=!1,Qe=1,ze=0,We={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},et="0123456789abcdefghijklmnopqrstuvwxyz",Be=!0;function Re(v,B){var O,h,k,U,M,J,pe,Ne,tt=this;if(!(tt instanceof Re))return new Re(v,B);if(B==null){if(v&&v._isBigNumber===!0)return tt.s=v.s,void(!v.c||v.e>de?tt.c=tt.e=null:v.e<$?tt.c=[tt.e=0]:(tt.e=v.e,tt.c=v.c.slice()));if((J=typeof v=="number")&&0*v==0){if(tt.s=1/v<0?(v=-v,-1):1,v===~~v){for(U=0,M=v;M>=10;M/=10,U++);return void(U>de?tt.c=tt.e=null:(tt.e=U,tt.c=[v]))}Ne=String(v)}else{if(!r.test(Ne=String(v)))return ae(tt,Ne,J);tt.s=Ne.charCodeAt(0)==45?(Ne=Ne.slice(1),-1):1}(U=Ne.indexOf("."))>-1&&(Ne=Ne.replace(".","")),(M=Ne.search(/e/i))>0?(U<0&&(U=M),U+=+Ne.slice(M+1),Ne=Ne.substring(0,M)):U<0&&(U=Ne.length)}else{if(j(B,2,et.length,"Base"),B==10&&Be)return c(tt=new Re(v),oe+tt.e+1,Ee);if(Ne=String(v),J=typeof v=="number"){if(0*v!=0)return ae(tt,Ne,J,B);if(tt.s=1/v<0?(Ne=Ne.slice(1),-1):1,Re.DEBUG&&Ne.replace(/^0\.0*|\./,"").length>15)throw Error(T+v)}else tt.s=Ne.charCodeAt(0)===45?(Ne=Ne.slice(1),-1):1;for(O=et.slice(0,B),U=M=0,pe=Ne.length;M<pe;M++)if(O.indexOf(h=Ne.charAt(M))<0){if(h=="."){if(M>U){U=pe;continue}}else if(!k&&(Ne==Ne.toUpperCase()&&(Ne=Ne.toLowerCase())||Ne==Ne.toLowerCase()&&(Ne=Ne.toUpperCase()))){k=!0,M=-1,U=0;continue}return ae(tt,String(v),J,B)}J=!1,(U=(Ne=X(Ne,B,10,tt.s)).indexOf("."))>-1?Ne=Ne.replace(".",""):U=Ne.length}for(M=0;Ne.charCodeAt(M)===48;M++);for(pe=Ne.length;Ne.charCodeAt(--pe)===48;);if(Ne=Ne.slice(M,++pe)){if(pe-=M,J&&Re.DEBUG&&pe>15&&(v>p||v!==d(v)))throw Error(T+tt.s*v);if((U=U-M-1)>de)tt.c=tt.e=null;else if(U<$)tt.c=[tt.e=0];else{if(tt.e=U,tt.c=[],M=(U+1)%g,U<0&&(M+=g),M<pe){for(M&&tt.c.push(+Ne.slice(0,M)),pe-=g;M<pe;)tt.c.push(+Ne.slice(M,M+=g));M=g-(Ne=Ne.slice(M)).length}else M-=pe;for(;M--;Ne+="0");tt.c.push(+Ne)}}else tt.c=[tt.e=0]}function $e(v,B,O,h){var k,U,M,J,pe;if(O==null?O=Ee:j(O,0,8),!v.c)return v.toString();if(k=v.c[0],M=v.e,B==null)pe=F(v.c),pe=h==1||h==2&&(M<=Fe||M>=Oe)?Y(pe,M):me(pe,M,"0");else if(U=(v=c(new Re(v),B,O)).e,J=(pe=F(v.c)).length,h==1||h==2&&(B<=U||U<=Fe)){for(;J<B;pe+="0",J++);pe=Y(pe,U)}else if(B-=M,pe=me(pe,U,"0"),U+1>J){if(--B>0)for(pe+=".";B--;pe+="0");}else if((B+=U-J)>0)for(U+1==J&&(pe+=".");B--;pe+="0");return v.s<0&&k?"-"+pe:pe}function ve(v,B){for(var O,h,k=1,U=new Re(v[0]);k<v.length;k++)(!(h=new Re(v[k])).s||(O=R(U,h))===B||O===0&&U.s===B)&&(U=h);return U}function ue(v,B,O){for(var h=1,k=B.length;!B[--k];B.pop());for(k=B[0];k>=10;k/=10,h++);return(O=h+O*g-1)>de?v.c=v.e=null:O<$?v.c=[v.e=0]:(v.e=O,v.c=B),v}function c(v,B,O,h){var k,U,M,J,pe,Ne,tt,bt=v.c,Ot=A;if(bt){e:{for(k=1,J=bt[0];J>=10;J/=10,k++);if((U=B-k)<0)U+=g,M=B,pe=bt[Ne=0],tt=d(pe/Ot[k-M-1]%10);else if((Ne=_((U+1)/g))>=bt.length){if(!h)break e;for(;bt.length<=Ne;bt.push(0));pe=tt=0,k=1,M=(U%=g)-g+1}else{for(pe=J=bt[Ne],k=1;J>=10;J/=10,k++);tt=(M=(U%=g)-g+k)<0?0:d(pe/Ot[k-M-1]%10)}if(h=h||B<0||bt[Ne+1]!=null||(M<0?pe:pe%Ot[k-M-1]),h=O<4?(tt||h)&&(O==0||O==(v.s<0?3:2)):tt>5||tt==5&&(O==4||h||O==6&&(U>0?M>0?pe/Ot[k-M]:0:bt[Ne-1])%10&1||O==(v.s<0?8:7)),B<1||!bt[0])return bt.length=0,h?(B-=v.e+1,bt[0]=Ot[(g-B%g)%g],v.e=-B||0):bt[0]=v.e=0,v;if(U==0?(bt.length=Ne,J=1,Ne--):(bt.length=Ne+1,J=Ot[g-U],bt[Ne]=M>0?d(pe/Ot[k-M]%Ot[M])*J:0),h)for(;;){if(Ne==0){for(U=1,M=bt[0];M>=10;M/=10,U++);for(M=bt[0]+=J,J=1;M>=10;M/=10,J++);U!=J&&(v.e++,bt[0]==w&&(bt[0]=1));break}if(bt[Ne]+=J,bt[Ne]!=w)break;bt[Ne--]=0,J=1}for(U=bt.length;bt[--U]===0;bt.pop());}v.e>de?v.c=v.e=null:v.e<$&&(v.c=[v.e=0])}return v}function y(v){var B,O=v.e;return O===null?v.toString():(B=F(v.c),B=O<=Fe||O>=Oe?Y(B,O):me(B,O,"0"),v.s<0?"-"+B:B)}return Re.clone=le,Re.ROUND_UP=0,Re.ROUND_DOWN=1,Re.ROUND_CEIL=2,Re.ROUND_FLOOR=3,Re.ROUND_HALF_UP=4,Re.ROUND_HALF_DOWN=5,Re.ROUND_HALF_EVEN=6,Re.ROUND_HALF_CEIL=7,Re.ROUND_HALF_FLOOR=8,Re.EUCLID=9,Re.config=Re.set=function(v){var B,O;if(v!=null){if(typeof v!="object")throw Error(b+"Object expected: "+v);if(v.hasOwnProperty(B="DECIMAL_PLACES")&&(j(O=v[B],0,E,B),oe=O),v.hasOwnProperty(B="ROUNDING_MODE")&&(j(O=v[B],0,8,B),Ee=O),v.hasOwnProperty(B="EXPONENTIAL_AT")&&((O=v[B])&&O.pop?(j(O[0],-E,0,B),j(O[1],0,E,B),Fe=O[0],Oe=O[1]):(j(O,-E,E,B),Fe=-(Oe=O<0?-O:O))),v.hasOwnProperty(B="RANGE"))if((O=v[B])&&O.pop)j(O[0],-E,-1,B),j(O[1],1,E,B),$=O[0],de=O[1];else{if(j(O,-E,E,B),!O)throw Error(b+B+" cannot be zero: "+O);$=-(de=O<0?-O:O)}if(v.hasOwnProperty(B="CRYPTO")){if((O=v[B])!==!!O)throw Error(b+B+" not true or false: "+O);if(O){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw we=!O,Error(b+"crypto unavailable");we=O}else we=O}if(v.hasOwnProperty(B="MODULO_MODE")&&(j(O=v[B],0,9,B),Qe=O),v.hasOwnProperty(B="POW_PRECISION")&&(j(O=v[B],0,E,B),ze=O),v.hasOwnProperty(B="FORMAT")){if(typeof(O=v[B])!="object")throw Error(b+B+" not an object: "+O);We=O}if(v.hasOwnProperty(B="ALPHABET")){if(typeof(O=v[B])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(O))throw Error(b+B+" invalid: "+O);Be=O.slice(0,10)=="0123456789",et=O}}return{DECIMAL_PLACES:oe,ROUNDING_MODE:Ee,EXPONENTIAL_AT:[Fe,Oe],RANGE:[$,de],CRYPTO:we,MODULO_MODE:Qe,POW_PRECISION:ze,FORMAT:We,ALPHABET:et}},Re.isBigNumber=function(v){if(!v||v._isBigNumber!==!0)return!1;if(!Re.DEBUG)return!0;var B,O,h=v.c,k=v.e,U=v.s;e:if({}.toString.call(h)=="[object Array]"){if((U===1||U===-1)&&k>=-E&&k<=E&&k===d(k)){if(h[0]===0){if(k===0&&h.length===1)return!0;break e}if((B=(k+1)%g)<1&&(B+=g),String(h[0]).length==B){for(B=0;B<h.length;B++)if((O=h[B])<0||O>=w||O!==d(O))break e;if(O!==0)return!0}}}else if(h===null&&k===null&&(U===null||U===1||U===-1))return!0;throw Error(b+"Invalid BigNumber: "+v)},Re.maximum=Re.max=function(){return ve(arguments,-1)},Re.minimum=Re.min=function(){return ve(arguments,1)},Re.random=(I=9007199254740992,S=Math.random()*I&2097151?function(){return d(Math.random()*I)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(v){var B,O,h,k,U,M=0,J=[],pe=new Re(re);if(v==null?v=oe:j(v,0,E),k=_(v/g),we)if(crypto.getRandomValues){for(B=crypto.getRandomValues(new Uint32Array(k*=2));M<k;)(U=131072*B[M]+(B[M+1]>>>11))>=9e15?(O=crypto.getRandomValues(new Uint32Array(2)),B[M]=O[0],B[M+1]=O[1]):(J.push(U%1e14),M+=2);M=k/2}else{if(!crypto.randomBytes)throw we=!1,Error(b+"crypto unavailable");for(B=crypto.randomBytes(k*=7);M<k;)(U=281474976710656*(31&B[M])+1099511627776*B[M+1]+4294967296*B[M+2]+16777216*B[M+3]+(B[M+4]<<16)+(B[M+5]<<8)+B[M+6])>=9e15?crypto.randomBytes(7).copy(B,M):(J.push(U%1e14),M+=7);M=k/7}if(!we)for(;M<k;)(U=S())<9e15&&(J[M++]=U%1e14);for(k=J[--M],v%=g,k&&v&&(U=A[g-v],J[M]=d(k/U)*U);J[M]===0;J.pop(),M--);if(M<0)J=[h=0];else{for(h=-1;J[0]===0;J.splice(0,1),h-=g);for(M=1,U=J[0];U>=10;U/=10,M++);M<g&&(h-=g-M)}return pe.e=h,pe.c=J,pe}),Re.sum=function(){for(var v=1,B=arguments,O=new Re(B[0]);v<B.length;)O=O.plus(B[v++]);return O},X=function(){var v="0123456789";function B(O,h,k,U){for(var M,J,pe=[0],Ne=0,tt=O.length;Ne<tt;){for(J=pe.length;J--;pe[J]*=h);for(pe[0]+=U.indexOf(O.charAt(Ne++)),M=0;M<pe.length;M++)pe[M]>k-1&&(pe[M+1]==null&&(pe[M+1]=0),pe[M+1]+=pe[M]/k|0,pe[M]%=k)}return pe.reverse()}return function(O,h,k,U,M){var J,pe,Ne,tt,bt,Ot,Ft,Yt,yr=O.indexOf("."),je=oe,De=Ee;for(yr>=0&&(tt=ze,ze=0,O=O.replace(".",""),Ot=(Yt=new Re(h)).pow(O.length-yr),ze=tt,Yt.c=B(me(F(Ot.c),Ot.e,"0"),10,k,v),Yt.e=Yt.c.length),Ne=tt=(Ft=B(O,h,k,M?(J=et,v):(J=v,et))).length;Ft[--tt]==0;Ft.pop());if(!Ft[0])return J.charAt(0);if(yr<0?--Ne:(Ot.c=Ft,Ot.e=Ne,Ot.s=U,Ft=(Ot=q(Ot,Yt,je,De,k)).c,bt=Ot.r,Ne=Ot.e),yr=Ft[pe=Ne+je+1],tt=k/2,bt=bt||pe<0||Ft[pe+1]!=null,bt=De<4?(yr!=null||bt)&&(De==0||De==(Ot.s<0?3:2)):yr>tt||yr==tt&&(De==4||bt||De==6&&1&Ft[pe-1]||De==(Ot.s<0?8:7)),pe<1||!Ft[0])O=bt?me(J.charAt(1),-je,J.charAt(0)):J.charAt(0);else{if(Ft.length=pe,bt)for(--k;++Ft[--pe]>k;)Ft[pe]=0,pe||(++Ne,Ft=[1].concat(Ft));for(tt=Ft.length;!Ft[--tt];);for(yr=0,O="";yr<=tt;O+=J.charAt(Ft[yr++]));O=me(O,Ne,J.charAt(0))}return O}}(),q=function(){function v(h,k,U){var M,J,pe,Ne,tt=0,bt=h.length,Ot=k%L,Ft=k/L|0;for(h=h.slice();bt--;)tt=((J=Ot*(pe=h[bt]%L)+(M=Ft*pe+(Ne=h[bt]/L|0)*Ot)%L*L+tt)/U|0)+(M/L|0)+Ft*Ne,h[bt]=J%U;return tt&&(h=[tt].concat(h)),h}function B(h,k,U,M){var J,pe;if(U!=M)pe=U>M?1:-1;else for(J=pe=0;J<U;J++)if(h[J]!=k[J]){pe=h[J]>k[J]?1:-1;break}return pe}function O(h,k,U,M){for(var J=0;U--;)h[U]-=J,J=h[U]<k[U]?1:0,h[U]=J*M+h[U]-k[U];for(;!h[0]&&h.length>1;h.splice(0,1));}return function(h,k,U,M,J){var pe,Ne,tt,bt,Ot,Ft,Yt,yr,je,De,Xe,ie,Pe,ct,dt,xt,st,$t=h.s==k.s?1:-1,_t=h.c,Ct=k.c;if(!(_t&&_t[0]&&Ct&&Ct[0]))return new Re(h.s&&k.s&&(_t?!Ct||_t[0]!=Ct[0]:Ct)?_t&&_t[0]==0||!Ct?0*$t:$t/0:NaN);for(je=(yr=new Re($t)).c=[],$t=U+(Ne=h.e-k.e)+1,J||(J=w,Ne=N(h.e/g)-N(k.e/g),$t=$t/g|0),tt=0;Ct[tt]==(_t[tt]||0);tt++);if(Ct[tt]>(_t[tt]||0)&&Ne--,$t<0)je.push(1),bt=!0;else{for(ct=_t.length,xt=Ct.length,tt=0,$t+=2,(Ot=d(J/(Ct[0]+1)))>1&&(Ct=v(Ct,Ot,J),_t=v(_t,Ot,J),xt=Ct.length,ct=_t.length),Pe=xt,Xe=(De=_t.slice(0,xt)).length;Xe<xt;De[Xe++]=0);st=Ct.slice(),st=[0].concat(st),dt=Ct[0],Ct[1]>=J/2&&dt++;do{if(Ot=0,(pe=B(Ct,De,xt,Xe))<0){if(ie=De[0],xt!=Xe&&(ie=ie*J+(De[1]||0)),(Ot=d(ie/dt))>1)for(Ot>=J&&(Ot=J-1),Yt=(Ft=v(Ct,Ot,J)).length,Xe=De.length;B(Ft,De,Yt,Xe)==1;)Ot--,O(Ft,xt<Yt?st:Ct,Yt,J),Yt=Ft.length,pe=1;else Ot==0&&(pe=Ot=1),Yt=(Ft=Ct.slice()).length;if(Yt<Xe&&(Ft=[0].concat(Ft)),O(De,Ft,Xe,J),Xe=De.length,pe==-1)for(;B(Ct,De,xt,Xe)<1;)Ot++,O(De,xt<Xe?st:Ct,Xe,J),Xe=De.length}else pe===0&&(Ot++,De=[0]);je[tt++]=Ot,De[0]?De[Xe++]=_t[Pe]||0:(De=[_t[Pe]],Xe=1)}while((Pe++<ct||De[0]!=null)&&$t--);bt=De[0]!=null,je[0]||je.splice(0,1)}if(J==w){for(tt=1,$t=je[0];$t>=10;$t/=10,tt++);c(yr,U+(yr.e=tt+Ne*g-1)+1,M,bt)}else yr.e=Ne,yr.r=+bt;return yr}}(),m=/^(-?)0([xbo])(?=\w[\w.]*$)/i,P=/^([^.]+)\.$/,l=/^\.([^.]+)$/,x=/^-?(Infinity|NaN)$/,W=/^\s*\+(?=[\w.])|^\s+|\s+$/g,ae=function(v,B,O,h){var k,U=O?B:B.replace(W,"");if(x.test(U))v.s=isNaN(U)?null:U<0?-1:1;else{if(!O&&(U=U.replace(m,function(M,J,pe){return k=(pe=pe.toLowerCase())=="x"?16:pe=="b"?2:8,h&&h!=k?M:J}),h&&(k=h,U=U.replace(P,"$1").replace(l,"0.$1")),B!=U))return new Re(U,k);if(Re.DEBUG)throw Error(b+"Not a"+(h?" base "+h:"")+" number: "+B);v.s=null}v.c=v.e=null},K.absoluteValue=K.abs=function(){var v=new Re(this);return v.s<0&&(v.s=1),v},K.comparedTo=function(v,B){return R(this,new Re(v,B))},K.decimalPlaces=K.dp=function(v,B){var O,h,k,U=this;if(v!=null)return j(v,0,E),B==null?B=Ee:j(B,0,8),c(new Re(U),v+U.e+1,B);if(!(O=U.c))return null;if(h=((k=O.length-1)-N(this.e/g))*g,k=O[k])for(;k%10==0;k/=10,h--);return h<0&&(h=0),h},K.dividedBy=K.div=function(v,B){return q(this,new Re(v,B),oe,Ee)},K.dividedToIntegerBy=K.idiv=function(v,B){return q(this,new Re(v,B),0,1)},K.exponentiatedBy=K.pow=function(v,B){var O,h,k,U,M,J,pe,Ne,tt=this;if((v=new Re(v)).c&&!v.isInteger())throw Error(b+"Exponent not an integer: "+y(v));if(B!=null&&(B=new Re(B)),M=v.e>14,!tt.c||!tt.c[0]||tt.c[0]==1&&!tt.e&&tt.c.length==1||!v.c||!v.c[0])return Ne=new Re(Math.pow(+y(tt),M?v.s*(2-V(v)):+y(v))),B?Ne.mod(B):Ne;if(J=v.s<0,B){if(B.c?!B.c[0]:!B.s)return new Re(NaN);(h=!J&&tt.isInteger()&&B.isInteger())&&(tt=tt.mod(B))}else{if(v.e>9&&(tt.e>0||tt.e<-1||(tt.e==0?tt.c[0]>1||M&&tt.c[1]>=24e7:tt.c[0]<8e13||M&&tt.c[0]<=9999975e7)))return U=tt.s<0&&V(v)?-0:0,tt.e>-1&&(U=1/U),new Re(J?1/U:U);ze&&(U=_(ze/g+2))}for(M?(O=new Re(.5),J&&(v.s=1),pe=V(v)):pe=(k=Math.abs(+y(v)))%2,Ne=new Re(re);;){if(pe){if(!(Ne=Ne.times(tt)).c)break;U?Ne.c.length>U&&(Ne.c.length=U):h&&(Ne=Ne.mod(B))}if(k){if((k=d(k/2))===0)break;pe=k%2}else if(c(v=v.times(O),v.e+1,1),v.e>14)pe=V(v);else{if((k=+y(v))==0)break;pe=k%2}tt=tt.times(tt),U?tt.c&&tt.c.length>U&&(tt.c.length=U):h&&(tt=tt.mod(B))}return h?Ne:(J&&(Ne=re.div(Ne)),B?Ne.mod(B):U?c(Ne,ze,Ee,void 0):Ne)},K.integerValue=function(v){var B=new Re(this);return v==null?v=Ee:j(v,0,8),c(B,B.e+1,v)},K.isEqualTo=K.eq=function(v,B){return R(this,new Re(v,B))===0},K.isFinite=function(){return!!this.c},K.isGreaterThan=K.gt=function(v,B){return R(this,new Re(v,B))>0},K.isGreaterThanOrEqualTo=K.gte=function(v,B){return(B=R(this,new Re(v,B)))===1||B===0},K.isInteger=function(){return!!this.c&&N(this.e/g)>this.c.length-2},K.isLessThan=K.lt=function(v,B){return R(this,new Re(v,B))<0},K.isLessThanOrEqualTo=K.lte=function(v,B){return(B=R(this,new Re(v,B)))===-1||B===0},K.isNaN=function(){return!this.s},K.isNegative=function(){return this.s<0},K.isPositive=function(){return this.s>0},K.isZero=function(){return!!this.c&&this.c[0]==0},K.minus=function(v,B){var O,h,k,U,M=this,J=M.s;if(B=(v=new Re(v,B)).s,!J||!B)return new Re(NaN);if(J!=B)return v.s=-B,M.plus(v);var pe=M.e/g,Ne=v.e/g,tt=M.c,bt=v.c;if(!pe||!Ne){if(!tt||!bt)return tt?(v.s=-B,v):new Re(bt?M:NaN);if(!tt[0]||!bt[0])return bt[0]?(v.s=-B,v):new Re(tt[0]?M:Ee==3?-0:0)}if(pe=N(pe),Ne=N(Ne),tt=tt.slice(),J=pe-Ne){for((U=J<0)?(J=-J,k=tt):(Ne=pe,k=bt),k.reverse(),B=J;B--;k.push(0));k.reverse()}else for(h=(U=(J=tt.length)<(B=bt.length))?J:B,J=B=0;B<h;B++)if(tt[B]!=bt[B]){U=tt[B]<bt[B];break}if(U&&(k=tt,tt=bt,bt=k,v.s=-v.s),(B=(h=bt.length)-(O=tt.length))>0)for(;B--;tt[O++]=0);for(B=w-1;h>J;){if(tt[--h]<bt[h]){for(O=h;O&&!tt[--O];tt[O]=B);--tt[O],tt[h]+=w}tt[h]-=bt[h]}for(;tt[0]==0;tt.splice(0,1),--Ne);return tt[0]?ue(v,tt,Ne):(v.s=Ee==3?-1:1,v.c=[v.e=0],v)},K.modulo=K.mod=function(v,B){var O,h,k=this;return v=new Re(v,B),!k.c||!v.s||v.c&&!v.c[0]?new Re(NaN):!v.c||k.c&&!k.c[0]?new Re(k):(Qe==9?(h=v.s,v.s=1,O=q(k,v,0,3),v.s=h,O.s*=h):O=q(k,v,0,Qe),(v=k.minus(O.times(v))).c[0]||Qe!=1||(v.s=k.s),v)},K.multipliedBy=K.times=function(v,B){var O,h,k,U,M,J,pe,Ne,tt,bt,Ot,Ft,Yt,yr,je,De=this,Xe=De.c,ie=(v=new Re(v,B)).c;if(!(Xe&&ie&&Xe[0]&&ie[0]))return!De.s||!v.s||Xe&&!Xe[0]&&!ie||ie&&!ie[0]&&!Xe?v.c=v.e=v.s=null:(v.s*=De.s,Xe&&ie?(v.c=[0],v.e=0):v.c=v.e=null),v;for(h=N(De.e/g)+N(v.e/g),v.s*=De.s,(pe=Xe.length)<(bt=ie.length)&&(Yt=Xe,Xe=ie,ie=Yt,k=pe,pe=bt,bt=k),k=pe+bt,Yt=[];k--;Yt.push(0));for(yr=w,je=L,k=bt;--k>=0;){for(O=0,Ot=ie[k]%je,Ft=ie[k]/je|0,U=k+(M=pe);U>k;)O=((Ne=Ot*(Ne=Xe[--M]%je)+(J=Ft*Ne+(tt=Xe[M]/je|0)*Ot)%je*je+Yt[U]+O)/yr|0)+(J/je|0)+Ft*tt,Yt[U--]=Ne%yr;Yt[U]=O}return O?++h:Yt.splice(0,1),ue(v,Yt,h)},K.negated=function(){var v=new Re(this);return v.s=-v.s||null,v},K.plus=function(v,B){var O,h=this,k=h.s;if(B=(v=new Re(v,B)).s,!k||!B)return new Re(NaN);if(k!=B)return v.s=-B,h.minus(v);var U=h.e/g,M=v.e/g,J=h.c,pe=v.c;if(!U||!M){if(!J||!pe)return new Re(k/0);if(!J[0]||!pe[0])return pe[0]?v:new Re(J[0]?h:0*k)}if(U=N(U),M=N(M),J=J.slice(),k=U-M){for(k>0?(M=U,O=pe):(k=-k,O=J),O.reverse();k--;O.push(0));O.reverse()}for((k=J.length)-(B=pe.length)<0&&(O=pe,pe=J,J=O,B=k),k=0;B;)k=(J[--B]=J[B]+pe[B]+k)/w|0,J[B]=w===J[B]?0:J[B]%w;return k&&(J=[k].concat(J),++M),ue(v,J,M)},K.precision=K.sd=function(v,B){var O,h,k,U=this;if(v!=null&&v!==!!v)return j(v,1,E),B==null?B=Ee:j(B,0,8),c(new Re(U),v,B);if(!(O=U.c))return null;if(h=(k=O.length-1)*g+1,k=O[k]){for(;k%10==0;k/=10,h--);for(k=O[0];k>=10;k/=10,h++);}return v&&U.e+1>h&&(h=U.e+1),h},K.shiftedBy=function(v){return j(v,-9007199254740991,p),this.times("1e"+v)},K.squareRoot=K.sqrt=function(){var v,B,O,h,k,U=this,M=U.c,J=U.s,pe=U.e,Ne=oe+4,tt=new Re("0.5");if(J!==1||!M||!M[0])return new Re(!J||J<0&&(!M||M[0])?NaN:M?U:1/0);if((J=Math.sqrt(+y(U)))==0||J==1/0?(((B=F(M)).length+pe)%2==0&&(B+="0"),J=Math.sqrt(+B),pe=N((pe+1)/2)-(pe<0||pe%2),O=new Re(B=J==1/0?"5e"+pe:(B=J.toExponential()).slice(0,B.indexOf("e")+1)+pe)):O=new Re(J+""),O.c[0]){for((J=(pe=O.e)+Ne)<3&&(J=0);;)if(k=O,O=tt.times(k.plus(q(U,k,Ne,1))),F(k.c).slice(0,J)===(B=F(O.c)).slice(0,J)){if(O.e<pe&&--J,(B=B.slice(J-3,J+1))!="9999"&&(h||B!="4999")){+B&&(+B.slice(1)||B.charAt(0)!="5")||(c(O,O.e+oe+2,1),v=!O.times(O).eq(U));break}if(!h&&(c(k,k.e+oe+2,0),k.times(k).eq(U))){O=k;break}Ne+=4,J+=4,h=1}}return c(O,O.e+oe+1,Ee,v)},K.toExponential=function(v,B){return v!=null&&(j(v,0,E),v++),$e(this,v,B,1)},K.toFixed=function(v,B){return v!=null&&(j(v,0,E),v=v+this.e+1),$e(this,v,B)},K.toFormat=function(v,B,O){var h,k=this;if(O==null)v!=null&&B&&typeof B=="object"?(O=B,B=null):v&&typeof v=="object"?(O=v,v=B=null):O=We;else if(typeof O!="object")throw Error(b+"Argument not an object: "+O);if(h=k.toFixed(v,B),k.c){var U,M=h.split("."),J=+O.groupSize,pe=+O.secondaryGroupSize,Ne=O.groupSeparator||"",tt=M[0],bt=M[1],Ot=k.s<0,Ft=Ot?tt.slice(1):tt,Yt=Ft.length;if(pe&&(U=J,J=pe,pe=U,Yt-=U),J>0&&Yt>0){for(U=Yt%J||J,tt=Ft.substr(0,U);U<Yt;U+=J)tt+=Ne+Ft.substr(U,J);pe>0&&(tt+=Ne+Ft.slice(U)),Ot&&(tt="-"+tt)}h=bt?tt+(O.decimalSeparator||"")+((pe=+O.fractionGroupSize)?bt.replace(new RegExp("\\d{"+pe+"}\\B","g"),"$&"+(O.fractionGroupSeparator||"")):bt):tt}return(O.prefix||"")+h+(O.suffix||"")},K.toFraction=function(v){var B,O,h,k,U,M,J,pe,Ne,tt,bt,Ot,Ft=this,Yt=Ft.c;if(v!=null&&(!(J=new Re(v)).isInteger()&&(J.c||J.s!==1)||J.lt(re)))throw Error(b+"Argument "+(J.isInteger()?"out of range: ":"not an integer: ")+y(J));if(!Yt)return new Re(Ft);for(B=new Re(re),Ne=O=new Re(re),h=pe=new Re(re),Ot=F(Yt),U=B.e=Ot.length-Ft.e-1,B.c[0]=A[(M=U%g)<0?g+M:M],v=!v||J.comparedTo(B)>0?U>0?B:Ne:J,M=de,de=1/0,J=new Re(Ot),pe.c[0]=0;tt=q(J,B,0,1),(k=O.plus(tt.times(h))).comparedTo(v)!=1;)O=h,h=k,Ne=pe.plus(tt.times(k=Ne)),pe=k,B=J.minus(tt.times(k=B)),J=k;return k=q(v.minus(O),h,0,1),pe=pe.plus(k.times(Ne)),O=O.plus(k.times(h)),pe.s=Ne.s=Ft.s,bt=q(Ne,h,U*=2,Ee).minus(Ft).abs().comparedTo(q(pe,O,U,Ee).minus(Ft).abs())<1?[Ne,h]:[pe,O],de=M,bt},K.toNumber=function(){return+y(this)},K.toPrecision=function(v,B){return v!=null&&j(v,1,E),$e(this,v,B,2)},K.toString=function(v){var B,O=this,h=O.s,k=O.e;return k===null?h?(B="Infinity",h<0&&(B="-"+B)):B="NaN":(v==null?B=k<=Fe||k>=Oe?Y(F(O.c),k):me(F(O.c),k,"0"):v===10&&Be?B=me(F((O=c(new Re(O),oe+k+1,Ee)).c),O.e,"0"):(j(v,2,et.length,"Base"),B=X(me(F(O.c),k,"0"),10,v,h,!0)),h<0&&O.c[0]&&(B="-"+B)),B},K.valueOf=K.toJSON=function(){return y(this)},K._isBigNumber=!0,C!=null&&Re.set(C),Re}(),u.default=u.BigNumber=u,(s=function(){return u}.call(a,i,a,o))===void 0||(o.exports=s)})()},8287:(o,a,i)=>{"use strict";let s=i(7526),f=i(251),u=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;a.Buffer=d,a.SlowBuffer=function(c){return+c!=c&&(c=0),d.alloc(+c)},a.INSPECT_MAX_BYTES=50;let r=2147483647;function _(c){if(c>r)throw new RangeError('The value "'+c+'" is invalid for option "size"');let y=new Uint8Array(c);return Object.setPrototypeOf(y,d.prototype),y}function d(c,y,v){if(typeof c=="number"){if(typeof y=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(c)}return b(c,y,v)}function b(c,y,v){if(typeof c=="string")return function(h,k){if(typeof k=="string"&&k!==""||(k="utf8"),!d.isEncoding(k))throw new TypeError("Unknown encoding: "+k);let U=0|L(h,k),M=_(U),J=M.write(h,k);return J!==U&&(M=M.slice(0,J)),M}(c,y);if(ArrayBuffer.isView(c))return function(h){if(Be(h,Uint8Array)){let k=new Uint8Array(h);return p(k.buffer,k.byteOffset,k.byteLength)}return g(h)}(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c);if(Be(c,ArrayBuffer)||c&&Be(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Be(c,SharedArrayBuffer)||c&&Be(c.buffer,SharedArrayBuffer)))return p(c,y,v);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let B=c.valueOf&&c.valueOf();if(B!=null&&B!==c)return d.from(B,y,v);let O=function(h){if(d.isBuffer(h)){let k=0|A(h.length),U=_(k);return U.length===0||h.copy(U,0,0,k),U}if(h.length!==void 0)return typeof h.length!="number"||Re(h.length)?_(0):g(h);if(h.type==="Buffer"&&Array.isArray(h.data))return g(h.data)}(c);if(O)return O;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return d.from(c[Symbol.toPrimitive]("string"),y,v);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c)}function T(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function w(c){return T(c),_(c<0?0:0|A(c))}function g(c){let y=c.length<0?0:0|A(c.length),v=_(y);for(let B=0;B<y;B+=1)v[B]=255&c[B];return v}function p(c,y,v){if(y<0||c.byteLength<y)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<y+(v||0))throw new RangeError('"length" is outside of buffer bounds');let B;return B=y===void 0&&v===void 0?new Uint8Array(c):v===void 0?new Uint8Array(c,y):new Uint8Array(c,y,v),Object.setPrototypeOf(B,d.prototype),B}function A(c){if(c>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|c}function L(c,y){if(d.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||Be(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof c);let v=c.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&v===0)return 0;let O=!1;for(;;)switch(y){case"ascii":case"latin1":case"binary":return v;case"utf8":case"utf-8":return ze(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*v;case"hex":return v>>>1;case"base64":return We(c).length;default:if(O)return B?-1:ze(c).length;y=(""+y).toLowerCase(),O=!0}}function E(c,y,v){let B=!1;if((y===void 0||y<0)&&(y=0),y>this.length||((v===void 0||v>this.length)&&(v=this.length),v<=0)||(v>>>=0)<=(y>>>=0))return"";for(c||(c="utf8");;)switch(c){case"hex":return S(this,y,v);case"utf8":case"utf-8":return q(this,y,v);case"ascii":return ae(this,y,v);case"latin1":case"binary":return I(this,y,v);case"base64":return C(this,y,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,y,v);default:if(B)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),B=!0}}function N(c,y,v){let B=c[y];c[y]=c[v],c[v]=B}function F(c,y,v,B,O){if(c.length===0)return-1;if(typeof v=="string"?(B=v,v=0):v>2147483647?v=2147483647:v<-2147483648&&(v=-2147483648),Re(v=+v)&&(v=O?0:c.length-1),v<0&&(v=c.length+v),v>=c.length){if(O)return-1;v=c.length-1}else if(v<0){if(!O)return-1;v=0}if(typeof y=="string"&&(y=d.from(y,B)),d.isBuffer(y))return y.length===0?-1:R(c,y,v,B,O);if(typeof y=="number")return y&=255,typeof Uint8Array.prototype.indexOf=="function"?O?Uint8Array.prototype.indexOf.call(c,y,v):Uint8Array.prototype.lastIndexOf.call(c,y,v):R(c,[y],v,B,O);throw new TypeError("val must be string, number or Buffer")}function R(c,y,v,B,O){let h,k=1,U=c.length,M=y.length;if(B!==void 0&&((B=String(B).toLowerCase())==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(c.length<2||y.length<2)return-1;k=2,U/=2,M/=2,v/=2}function J(pe,Ne){return k===1?pe[Ne]:pe.readUInt16BE(Ne*k)}if(O){let pe=-1;for(h=v;h<U;h++)if(J(c,h)===J(y,pe===-1?0:h-pe)){if(pe===-1&&(pe=h),h-pe+1===M)return pe*k}else pe!==-1&&(h-=h-pe),pe=-1}else for(v+M>U&&(v=U-M),h=v;h>=0;h--){let pe=!0;for(let Ne=0;Ne<M;Ne++)if(J(c,h+Ne)!==J(y,Ne)){pe=!1;break}if(pe)return h}return-1}function j(c,y,v,B){v=Number(v)||0;let O=c.length-v;B?(B=Number(B))>O&&(B=O):B=O;let h=y.length,k;for(B>h/2&&(B=h/2),k=0;k<B;++k){let U=parseInt(y.substr(2*k,2),16);if(Re(U))return k;c[v+k]=U}return k}function V(c,y,v,B){return et(ze(y,c.length-v),c,v,B)}function Y(c,y,v,B){return et(function(O){let h=[];for(let k=0;k<O.length;++k)h.push(255&O.charCodeAt(k));return h}(y),c,v,B)}function me(c,y,v,B){return et(We(y),c,v,B)}function le(c,y,v,B){return et(function(O,h){let k,U,M,J=[];for(let pe=0;pe<O.length&&!((h-=2)<0);++pe)k=O.charCodeAt(pe),U=k>>8,M=k%256,J.push(M),J.push(U);return J}(y,c.length-v),c,v,B)}function C(c,y,v){return y===0&&v===c.length?s.fromByteArray(c):s.fromByteArray(c.slice(y,v))}function q(c,y,v){v=Math.min(c.length,v);let B=[],O=y;for(;O<v;){let h=c[O],k=null,U=h>239?4:h>223?3:h>191?2:1;if(O+U<=v){let M,J,pe,Ne;switch(U){case 1:h<128&&(k=h);break;case 2:M=c[O+1],(192&M)==128&&(Ne=(31&h)<<6|63&M,Ne>127&&(k=Ne));break;case 3:M=c[O+1],J=c[O+2],(192&M)==128&&(192&J)==128&&(Ne=(15&h)<<12|(63&M)<<6|63&J,Ne>2047&&(Ne<55296||Ne>57343)&&(k=Ne));break;case 4:M=c[O+1],J=c[O+2],pe=c[O+3],(192&M)==128&&(192&J)==128&&(192&pe)==128&&(Ne=(15&h)<<18|(63&M)<<12|(63&J)<<6|63&pe,Ne>65535&&Ne<1114112&&(k=Ne))}}k===null?(k=65533,U=1):k>65535&&(k-=65536,B.push(k>>>10&1023|55296),k=56320|1023&k),B.push(k),O+=U}return function(h){let k=h.length;if(k<=X)return String.fromCharCode.apply(String,h);let U="",M=0;for(;M<k;)U+=String.fromCharCode.apply(String,h.slice(M,M+=X));return U}(B)}a.kMaxLength=r,d.TYPED_ARRAY_SUPPORT=function(){try{let c=new Uint8Array(1),y={foo:function(){return 42}};return Object.setPrototypeOf(y,Uint8Array.prototype),Object.setPrototypeOf(c,y),c.foo()===42}catch{return!1}}(),d.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}}),d.poolSize=8192,d.from=function(c,y,v){return b(c,y,v)},Object.setPrototypeOf(d.prototype,Uint8Array.prototype),Object.setPrototypeOf(d,Uint8Array),d.alloc=function(c,y,v){return function(B,O,h){return T(B),B<=0?_(B):O!==void 0?typeof h=="string"?_(B).fill(O,h):_(B).fill(O):_(B)}(c,y,v)},d.allocUnsafe=function(c){return w(c)},d.allocUnsafeSlow=function(c){return w(c)},d.isBuffer=function(c){return c!=null&&c._isBuffer===!0&&c!==d.prototype},d.compare=function(c,y){if(Be(c,Uint8Array)&&(c=d.from(c,c.offset,c.byteLength)),Be(y,Uint8Array)&&(y=d.from(y,y.offset,y.byteLength)),!d.isBuffer(c)||!d.isBuffer(y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(c===y)return 0;let v=c.length,B=y.length;for(let O=0,h=Math.min(v,B);O<h;++O)if(c[O]!==y[O]){v=c[O],B=y[O];break}return v<B?-1:B<v?1:0},d.isEncoding=function(c){switch(String(c).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}},d.concat=function(c,y){if(!Array.isArray(c))throw new TypeError('"list" argument must be an Array of Buffers');if(c.length===0)return d.alloc(0);let v;if(y===void 0)for(y=0,v=0;v<c.length;++v)y+=c[v].length;let B=d.allocUnsafe(y),O=0;for(v=0;v<c.length;++v){let h=c[v];if(Be(h,Uint8Array))O+h.length>B.length?(d.isBuffer(h)||(h=d.from(h)),h.copy(B,O)):Uint8Array.prototype.set.call(B,h,O);else{if(!d.isBuffer(h))throw new TypeError('"list" argument must be an Array of Buffers');h.copy(B,O)}O+=h.length}return B},d.byteLength=L,d.prototype._isBuffer=!0,d.prototype.swap16=function(){let c=this.length;if(c%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let y=0;y<c;y+=2)N(this,y,y+1);return this},d.prototype.swap32=function(){let c=this.length;if(c%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let y=0;y<c;y+=4)N(this,y,y+3),N(this,y+1,y+2);return this},d.prototype.swap64=function(){let c=this.length;if(c%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let y=0;y<c;y+=8)N(this,y,y+7),N(this,y+1,y+6),N(this,y+2,y+5),N(this,y+3,y+4);return this},d.prototype.toString=function(){let c=this.length;return c===0?"":arguments.length===0?q(this,0,c):E.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(c){if(!d.isBuffer(c))throw new TypeError("Argument must be a Buffer");return this===c||d.compare(this,c)===0},d.prototype.inspect=function(){let c="",y=a.INSPECT_MAX_BYTES;return c=this.toString("hex",0,y).replace(/(.{2})/g,"$1 ").trim(),this.length>y&&(c+=" ... "),"<Buffer "+c+">"},u&&(d.prototype[u]=d.prototype.inspect),d.prototype.compare=function(c,y,v,B,O){if(Be(c,Uint8Array)&&(c=d.from(c,c.offset,c.byteLength)),!d.isBuffer(c))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof c);if(y===void 0&&(y=0),v===void 0&&(v=c?c.length:0),B===void 0&&(B=0),O===void 0&&(O=this.length),y<0||v>c.length||B<0||O>this.length)throw new RangeError("out of range index");if(B>=O&&y>=v)return 0;if(B>=O)return-1;if(y>=v)return 1;if(this===c)return 0;let h=(O>>>=0)-(B>>>=0),k=(v>>>=0)-(y>>>=0),U=Math.min(h,k),M=this.slice(B,O),J=c.slice(y,v);for(let pe=0;pe<U;++pe)if(M[pe]!==J[pe]){h=M[pe],k=J[pe];break}return h<k?-1:k<h?1:0},d.prototype.includes=function(c,y,v){return this.indexOf(c,y,v)!==-1},d.prototype.indexOf=function(c,y,v){return F(this,c,y,v,!0)},d.prototype.lastIndexOf=function(c,y,v){return F(this,c,y,v,!1)},d.prototype.write=function(c,y,v,B){if(y===void 0)B="utf8",v=this.length,y=0;else if(v===void 0&&typeof y=="string")B=y,v=this.length,y=0;else{if(!isFinite(y))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");y>>>=0,isFinite(v)?(v>>>=0,B===void 0&&(B="utf8")):(B=v,v=void 0)}let O=this.length-y;if((v===void 0||v>O)&&(v=O),c.length>0&&(v<0||y<0)||y>this.length)throw new RangeError("Attempt to write outside buffer bounds");B||(B="utf8");let h=!1;for(;;)switch(B){case"hex":return j(this,c,y,v);case"utf8":case"utf-8":return V(this,c,y,v);case"ascii":case"latin1":case"binary":return Y(this,c,y,v);case"base64":return me(this,c,y,v);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le(this,c,y,v);default:if(h)throw new TypeError("Unknown encoding: "+B);B=(""+B).toLowerCase(),h=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};let X=4096;function ae(c,y,v){let B="";v=Math.min(c.length,v);for(let O=y;O<v;++O)B+=String.fromCharCode(127&c[O]);return B}function I(c,y,v){let B="";v=Math.min(c.length,v);for(let O=y;O<v;++O)B+=String.fromCharCode(c[O]);return B}function S(c,y,v){let B=c.length;(!y||y<0)&&(y=0),(!v||v<0||v>B)&&(v=B);let O="";for(let h=y;h<v;++h)O+=$e[c[h]];return O}function m(c,y,v){let B=c.slice(y,v),O="";for(let h=0;h<B.length-1;h+=2)O+=String.fromCharCode(B[h]+256*B[h+1]);return O}function P(c,y,v){if(c%1!=0||c<0)throw new RangeError("offset is not uint");if(c+y>v)throw new RangeError("Trying to access beyond buffer length")}function l(c,y,v,B,O,h){if(!d.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(y>O||y<h)throw new RangeError('"value" argument is out of bounds');if(v+B>c.length)throw new RangeError("Index out of range")}function x(c,y,v,B,O){$(y,B,O,c,v,7);let h=Number(y&BigInt(4294967295));c[v++]=h,h>>=8,c[v++]=h,h>>=8,c[v++]=h,h>>=8,c[v++]=h;let k=Number(y>>BigInt(32)&BigInt(4294967295));return c[v++]=k,k>>=8,c[v++]=k,k>>=8,c[v++]=k,k>>=8,c[v++]=k,v}function W(c,y,v,B,O){$(y,B,O,c,v,7);let h=Number(y&BigInt(4294967295));c[v+7]=h,h>>=8,c[v+6]=h,h>>=8,c[v+5]=h,h>>=8,c[v+4]=h;let k=Number(y>>BigInt(32)&BigInt(4294967295));return c[v+3]=k,k>>=8,c[v+2]=k,k>>=8,c[v+1]=k,k>>=8,c[v]=k,v+8}function K(c,y,v,B,O,h){if(v+B>c.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("Index out of range")}function re(c,y,v,B,O){return y=+y,v>>>=0,O||K(c,0,v,4),f.write(c,y,v,B,23,4),v+4}function oe(c,y,v,B,O){return y=+y,v>>>=0,O||K(c,0,v,8),f.write(c,y,v,B,52,8),v+8}d.prototype.slice=function(c,y){let v=this.length;(c=~~c)<0?(c+=v)<0&&(c=0):c>v&&(c=v),(y=y===void 0?v:~~y)<0?(y+=v)<0&&(y=0):y>v&&(y=v),y<c&&(y=c);let B=this.subarray(c,y);return Object.setPrototypeOf(B,d.prototype),B},d.prototype.readUintLE=d.prototype.readUIntLE=function(c,y,v){c>>>=0,y>>>=0,v||P(c,y,this.length);let B=this[c],O=1,h=0;for(;++h<y&&(O*=256);)B+=this[c+h]*O;return B},d.prototype.readUintBE=d.prototype.readUIntBE=function(c,y,v){c>>>=0,y>>>=0,v||P(c,y,this.length);let B=this[c+--y],O=1;for(;y>0&&(O*=256);)B+=this[c+--y]*O;return B},d.prototype.readUint8=d.prototype.readUInt8=function(c,y){return c>>>=0,y||P(c,1,this.length),this[c]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(c,y){return c>>>=0,y||P(c,2,this.length),this[c]|this[c+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(c,y){return c>>>=0,y||P(c,2,this.length),this[c]<<8|this[c+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(c,y){return c>>>=0,y||P(c,4,this.length),(this[c]|this[c+1]<<8|this[c+2]<<16)+16777216*this[c+3]},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(c,y){return c>>>=0,y||P(c,4,this.length),16777216*this[c]+(this[c+1]<<16|this[c+2]<<8|this[c+3])},d.prototype.readBigUInt64LE=ve(function(c){de(c>>>=0,"offset");let y=this[c],v=this[c+7];y!==void 0&&v!==void 0||we(c,this.length-8);let B=y+256*this[++c]+65536*this[++c]+this[++c]*2**24,O=this[++c]+256*this[++c]+65536*this[++c]+v*2**24;return BigInt(B)+(BigInt(O)<<BigInt(32))}),d.prototype.readBigUInt64BE=ve(function(c){de(c>>>=0,"offset");let y=this[c],v=this[c+7];y!==void 0&&v!==void 0||we(c,this.length-8);let B=y*2**24+65536*this[++c]+256*this[++c]+this[++c],O=this[++c]*2**24+65536*this[++c]+256*this[++c]+v;return(BigInt(B)<<BigInt(32))+BigInt(O)}),d.prototype.readIntLE=function(c,y,v){c>>>=0,y>>>=0,v||P(c,y,this.length);let B=this[c],O=1,h=0;for(;++h<y&&(O*=256);)B+=this[c+h]*O;return O*=128,B>=O&&(B-=Math.pow(2,8*y)),B},d.prototype.readIntBE=function(c,y,v){c>>>=0,y>>>=0,v||P(c,y,this.length);let B=y,O=1,h=this[c+--B];for(;B>0&&(O*=256);)h+=this[c+--B]*O;return O*=128,h>=O&&(h-=Math.pow(2,8*y)),h},d.prototype.readInt8=function(c,y){return c>>>=0,y||P(c,1,this.length),128&this[c]?-1*(255-this[c]+1):this[c]},d.prototype.readInt16LE=function(c,y){c>>>=0,y||P(c,2,this.length);let v=this[c]|this[c+1]<<8;return 32768&v?4294901760|v:v},d.prototype.readInt16BE=function(c,y){c>>>=0,y||P(c,2,this.length);let v=this[c+1]|this[c]<<8;return 32768&v?4294901760|v:v},d.prototype.readInt32LE=function(c,y){return c>>>=0,y||P(c,4,this.length),this[c]|this[c+1]<<8|this[c+2]<<16|this[c+3]<<24},d.prototype.readInt32BE=function(c,y){return c>>>=0,y||P(c,4,this.length),this[c]<<24|this[c+1]<<16|this[c+2]<<8|this[c+3]},d.prototype.readBigInt64LE=ve(function(c){de(c>>>=0,"offset");let y=this[c],v=this[c+7];y!==void 0&&v!==void 0||we(c,this.length-8);let B=this[c+4]+256*this[c+5]+65536*this[c+6]+(v<<24);return(BigInt(B)<<BigInt(32))+BigInt(y+256*this[++c]+65536*this[++c]+this[++c]*16777216)}),d.prototype.readBigInt64BE=ve(function(c){de(c>>>=0,"offset");let y=this[c],v=this[c+7];y!==void 0&&v!==void 0||we(c,this.length-8);let B=(y<<24)+65536*this[++c]+256*this[++c]+this[++c];return(BigInt(B)<<BigInt(32))+BigInt(this[++c]*16777216+65536*this[++c]+256*this[++c]+v)}),d.prototype.readFloatLE=function(c,y){return c>>>=0,y||P(c,4,this.length),f.read(this,c,!0,23,4)},d.prototype.readFloatBE=function(c,y){return c>>>=0,y||P(c,4,this.length),f.read(this,c,!1,23,4)},d.prototype.readDoubleLE=function(c,y){return c>>>=0,y||P(c,8,this.length),f.read(this,c,!0,52,8)},d.prototype.readDoubleBE=function(c,y){return c>>>=0,y||P(c,8,this.length),f.read(this,c,!1,52,8)},d.prototype.writeUintLE=d.prototype.writeUIntLE=function(c,y,v,B){c=+c,y>>>=0,v>>>=0,!B&&l(this,c,y,v,Math.pow(2,8*v)-1,0);let O=1,h=0;for(this[y]=255&c;++h<v&&(O*=256);)this[y+h]=c/O&255;return y+v},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(c,y,v,B){c=+c,y>>>=0,v>>>=0,!B&&l(this,c,y,v,Math.pow(2,8*v)-1,0);let O=v-1,h=1;for(this[y+O]=255&c;--O>=0&&(h*=256);)this[y+O]=c/h&255;return y+v},d.prototype.writeUint8=d.prototype.writeUInt8=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,1,255,0),this[y]=255&c,y+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,2,65535,0),this[y]=255&c,this[y+1]=c>>>8,y+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,2,65535,0),this[y]=c>>>8,this[y+1]=255&c,y+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,4,4294967295,0),this[y+3]=c>>>24,this[y+2]=c>>>16,this[y+1]=c>>>8,this[y]=255&c,y+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,4,4294967295,0),this[y]=c>>>24,this[y+1]=c>>>16,this[y+2]=c>>>8,this[y+3]=255&c,y+4},d.prototype.writeBigUInt64LE=ve(function(c,y=0){return x(this,c,y,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=ve(function(c,y=0){return W(this,c,y,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(c,y,v,B){if(c=+c,y>>>=0,!B){let U=Math.pow(2,8*v-1);l(this,c,y,v,U-1,-U)}let O=0,h=1,k=0;for(this[y]=255&c;++O<v&&(h*=256);)c<0&&k===0&&this[y+O-1]!==0&&(k=1),this[y+O]=(c/h|0)-k&255;return y+v},d.prototype.writeIntBE=function(c,y,v,B){if(c=+c,y>>>=0,!B){let U=Math.pow(2,8*v-1);l(this,c,y,v,U-1,-U)}let O=v-1,h=1,k=0;for(this[y+O]=255&c;--O>=0&&(h*=256);)c<0&&k===0&&this[y+O+1]!==0&&(k=1),this[y+O]=(c/h|0)-k&255;return y+v},d.prototype.writeInt8=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,1,127,-128),c<0&&(c=255+c+1),this[y]=255&c,y+1},d.prototype.writeInt16LE=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,2,32767,-32768),this[y]=255&c,this[y+1]=c>>>8,y+2},d.prototype.writeInt16BE=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,2,32767,-32768),this[y]=c>>>8,this[y+1]=255&c,y+2},d.prototype.writeInt32LE=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,4,2147483647,-2147483648),this[y]=255&c,this[y+1]=c>>>8,this[y+2]=c>>>16,this[y+3]=c>>>24,y+4},d.prototype.writeInt32BE=function(c,y,v){return c=+c,y>>>=0,v||l(this,c,y,4,2147483647,-2147483648),c<0&&(c=4294967295+c+1),this[y]=c>>>24,this[y+1]=c>>>16,this[y+2]=c>>>8,this[y+3]=255&c,y+4},d.prototype.writeBigInt64LE=ve(function(c,y=0){return x(this,c,y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=ve(function(c,y=0){return W(this,c,y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeFloatLE=function(c,y,v){return re(this,c,y,!0,v)},d.prototype.writeFloatBE=function(c,y,v){return re(this,c,y,!1,v)},d.prototype.writeDoubleLE=function(c,y,v){return oe(this,c,y,!0,v)},d.prototype.writeDoubleBE=function(c,y,v){return oe(this,c,y,!1,v)},d.prototype.copy=function(c,y,v,B){if(!d.isBuffer(c))throw new TypeError("argument should be a Buffer");if(v||(v=0),B||B===0||(B=this.length),y>=c.length&&(y=c.length),y||(y=0),B>0&&B<v&&(B=v),B===v||c.length===0||this.length===0)return 0;if(y<0)throw new RangeError("targetStart out of bounds");if(v<0||v>=this.length)throw new RangeError("Index out of range");if(B<0)throw new RangeError("sourceEnd out of bounds");B>this.length&&(B=this.length),c.length-y<B-v&&(B=c.length-y+v);let O=B-v;return this===c&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(y,v,B):Uint8Array.prototype.set.call(c,this.subarray(v,B),y),O},d.prototype.fill=function(c,y,v,B){if(typeof c=="string"){if(typeof y=="string"?(B=y,y=0,v=this.length):typeof v=="string"&&(B=v,v=this.length),B!==void 0&&typeof B!="string")throw new TypeError("encoding must be a string");if(typeof B=="string"&&!d.isEncoding(B))throw new TypeError("Unknown encoding: "+B);if(c.length===1){let h=c.charCodeAt(0);(B==="utf8"&&h<128||B==="latin1")&&(c=h)}}else typeof c=="number"?c&=255:typeof c=="boolean"&&(c=Number(c));if(y<0||this.length<y||this.length<v)throw new RangeError("Out of range index");if(v<=y)return this;let O;if(y>>>=0,v=v===void 0?this.length:v>>>0,c||(c=0),typeof c=="number")for(O=y;O<v;++O)this[O]=c;else{let h=d.isBuffer(c)?c:d.from(c,B),k=h.length;if(k===0)throw new TypeError('The value "'+c+'" is invalid for argument "value"');for(O=0;O<v-y;++O)this[O+y]=h[O%k]}return this};let Ee={};function Fe(c,y,v){Ee[c]=class extends v{constructor(){super(),Object.defineProperty(this,"message",{value:y.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${c}]`,this.stack,delete this.name}get code(){return c}set code(B){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:B,writable:!0})}toString(){return`${this.name} [${c}]: ${this.message}`}}}function Oe(c){let y="",v=c.length,B=c[0]==="-"?1:0;for(;v>=B+4;v-=3)y=`_${c.slice(v-3,v)}${y}`;return`${c.slice(0,v)}${y}`}function $(c,y,v,B,O,h){if(c>v||c<y){let k=typeof y=="bigint"?"n":"",U;throw U=h>3?y===0||y===BigInt(0)?`>= 0${k} and < 2${k} ** ${8*(h+1)}${k}`:`>= -(2${k} ** ${8*(h+1)-1}${k}) and < 2 ** ${8*(h+1)-1}${k}`:`>= ${y}${k} and <= ${v}${k}`,new Ee.ERR_OUT_OF_RANGE("value",U,c)}(function(k,U,M){de(U,"offset"),k[U]!==void 0&&k[U+M]!==void 0||we(U,k.length-(M+1))})(B,O,h)}function de(c,y){if(typeof c!="number")throw new Ee.ERR_INVALID_ARG_TYPE(y,"number",c)}function we(c,y,v){throw Math.floor(c)!==c?(de(c,v),new Ee.ERR_OUT_OF_RANGE(v||"offset","an integer",c)):y<0?new Ee.ERR_BUFFER_OUT_OF_BOUNDS:new Ee.ERR_OUT_OF_RANGE(v||"offset",`>= ${v?1:0} and <= ${y}`,c)}Fe("ERR_BUFFER_OUT_OF_BOUNDS",function(c){return c?`${c} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),Fe("ERR_INVALID_ARG_TYPE",function(c,y){return`The "${c}" argument must be of type number. Received type ${typeof y}`},TypeError),Fe("ERR_OUT_OF_RANGE",function(c,y,v){let B=`The value of "${c}" is out of range.`,O=v;return Number.isInteger(v)&&Math.abs(v)>4294967296?O=Oe(String(v)):typeof v=="bigint"&&(O=String(v),(v>BigInt(2)**BigInt(32)||v<-(BigInt(2)**BigInt(32)))&&(O=Oe(O)),O+="n"),B+=` It must be ${y}. Received ${O}`,B},RangeError);let Qe=/[^+/0-9A-Za-z-_]/g;function ze(c,y){let v;y=y||1/0;let B=c.length,O=null,h=[];for(let k=0;k<B;++k){if(v=c.charCodeAt(k),v>55295&&v<57344){if(!O){if(v>56319){(y-=3)>-1&&h.push(239,191,189);continue}if(k+1===B){(y-=3)>-1&&h.push(239,191,189);continue}O=v;continue}if(v<56320){(y-=3)>-1&&h.push(239,191,189),O=v;continue}v=65536+(O-55296<<10|v-56320)}else O&&(y-=3)>-1&&h.push(239,191,189);if(O=null,v<128){if((y-=1)<0)break;h.push(v)}else if(v<2048){if((y-=2)<0)break;h.push(v>>6|192,63&v|128)}else if(v<65536){if((y-=3)<0)break;h.push(v>>12|224,v>>6&63|128,63&v|128)}else{if(!(v<1114112))throw new Error("Invalid code point");if((y-=4)<0)break;h.push(v>>18|240,v>>12&63|128,v>>6&63|128,63&v|128)}}return h}function We(c){return s.toByteArray(function(y){if((y=(y=y.split("=")[0]).trim().replace(Qe,"")).length<2)return"";for(;y.length%4!=0;)y+="=";return y}(c))}function et(c,y,v,B){let O;for(O=0;O<B&&!(O+v>=y.length||O>=c.length);++O)y[O+v]=c[O];return O}function Be(c,y){return c instanceof y||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===y.name}function Re(c){return c!=c}let $e=function(){let c="0123456789abcdef",y=new Array(256);for(let v=0;v<16;++v){let B=16*v;for(let O=0;O<16;++O)y[B+O]=c[v]+c[O]}return y}();function ve(c){return typeof BigInt>"u"?ue:c}function ue(){throw new Error("BigInt not supported")}},6866:o=>{o.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},8075:(o,a,i)=>{"use strict";var s=i(453),f=i(487),u=f(s("String.prototype.indexOf"));o.exports=function(r,_){var d=s(r,!!_);return typeof d=="function"&&u(r,".prototype.")>-1?f(d):d}},487:(o,a,i)=>{"use strict";var s=i(6743),f=i(453),u=i(6897),r=i(9675),_=f("%Function.prototype.apply%"),d=f("%Function.prototype.call%"),b=f("%Reflect.apply%",!0)||s.call(d,_),T=i(655),w=f("%Math.max%");o.exports=function(p){if(typeof p!="function")throw new r("a function is required");var A=b(s,d,arguments);return u(A,1+w(0,p.length-(arguments.length-1)),!0)};var g=function(){return b(s,_,arguments)};T?T(o.exports,"apply",{value:g}):o.exports.apply=g},41:(o,a,i)=>{"use strict";var s=i(655),f=i(8068),u=i(9675),r=i(5795);o.exports=function(_,d,b){if(!_||typeof _!="object"&&typeof _!="function")throw new u("`obj` must be an object or a function`");if(typeof d!="string"&&typeof d!="symbol")throw new u("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new u("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new u("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new u("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new u("`loose`, if provided, must be a boolean");var T=arguments.length>3?arguments[3]:null,w=arguments.length>4?arguments[4]:null,g=arguments.length>5?arguments[5]:null,p=arguments.length>6&&arguments[6],A=!!r&&r(_,d);if(s)s(_,d,{configurable:g===null&&A?A.configurable:!g,enumerable:T===null&&A?A.enumerable:!T,value:b,writable:w===null&&A?A.writable:!w});else{if(!p&&(T||w||g))throw new f("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");_[d]=b}}},655:(o,a,i)=>{"use strict";var s=i(453)("%Object.defineProperty%",!0)||!1;if(s)try{s({},"a",{value:1})}catch{s=!1}o.exports=s},1237:o=>{"use strict";o.exports=EvalError},9383:o=>{"use strict";o.exports=Error},9290:o=>{"use strict";o.exports=RangeError},9538:o=>{"use strict";o.exports=ReferenceError},8068:o=>{"use strict";o.exports=SyntaxError},9675:o=>{"use strict";o.exports=TypeError},5345:o=>{"use strict";o.exports=URIError},7007:o=>{"use strict";var a,i=typeof Reflect=="object"?Reflect:null,s=i&&typeof i.apply=="function"?i.apply:function(E,N,F){return Function.prototype.apply.call(E,N,F)};a=i&&typeof i.ownKeys=="function"?i.ownKeys:Object.getOwnPropertySymbols?function(E){return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E))}:function(E){return Object.getOwnPropertyNames(E)};var f=Number.isNaN||function(E){return E!=E};function u(){u.init.call(this)}o.exports=u,o.exports.once=function(E,N){return new Promise(function(F,R){function j(Y){E.removeListener(N,V),R(Y)}function V(){typeof E.removeListener=="function"&&E.removeListener("error",j),F([].slice.call(arguments))}L(E,N,V,{once:!0}),N!=="error"&&function(Y,me,le){typeof Y.on=="function"&&L(Y,"error",me,le)}(E,j,{once:!0})})},u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var r=10;function _(E){if(typeof E!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof E)}function d(E){return E._maxListeners===void 0?u.defaultMaxListeners:E._maxListeners}function b(E,N,F,R){var j,V,Y,me;if(_(F),(V=E._events)===void 0?(V=E._events=Object.create(null),E._eventsCount=0):(V.newListener!==void 0&&(E.emit("newListener",N,F.listener?F.listener:F),V=E._events),Y=V[N]),Y===void 0)Y=V[N]=F,++E._eventsCount;else if(typeof Y=="function"?Y=V[N]=R?[F,Y]:[Y,F]:R?Y.unshift(F):Y.push(F),(j=d(E))>0&&Y.length>j&&!Y.warned){Y.warned=!0;var le=new Error("Possible EventEmitter memory leak detected. "+Y.length+" "+String(N)+" listeners added. Use emitter.setMaxListeners() to increase limit");le.name="MaxListenersExceededWarning",le.emitter=E,le.type=N,le.count=Y.length,me=le,console&&console.warn&&console.warn(me)}return E}function T(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function w(E,N,F){var R={fired:!1,wrapFn:void 0,target:E,type:N,listener:F},j=T.bind(R);return j.listener=F,R.wrapFn=j,j}function g(E,N,F){var R=E._events;if(R===void 0)return[];var j=R[N];return j===void 0?[]:typeof j=="function"?F?[j.listener||j]:[j]:F?function(V){for(var Y=new Array(V.length),me=0;me<Y.length;++me)Y[me]=V[me].listener||V[me];return Y}(j):A(j,j.length)}function p(E){var N=this._events;if(N!==void 0){var F=N[E];if(typeof F=="function")return 1;if(F!==void 0)return F.length}return 0}function A(E,N){for(var F=new Array(N),R=0;R<N;++R)F[R]=E[R];return F}function L(E,N,F,R){if(typeof E.on=="function")R.once?E.once(N,F):E.on(N,F);else{if(typeof E.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof E);E.addEventListener(N,function j(V){R.once&&E.removeEventListener(N,j),F(V)})}}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return r},set:function(E){if(typeof E!="number"||E<0||f(E))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+E+".");r=E}}),u.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(E){if(typeof E!="number"||E<0||f(E))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+E+".");return this._maxListeners=E,this},u.prototype.getMaxListeners=function(){return d(this)},u.prototype.emit=function(E){for(var N=[],F=1;F<arguments.length;F++)N.push(arguments[F]);var R=E==="error",j=this._events;if(j!==void 0)R=R&&j.error===void 0;else if(!R)return!1;if(R){var V;if(N.length>0&&(V=N[0]),V instanceof Error)throw V;var Y=new Error("Unhandled error."+(V?" ("+V.message+")":""));throw Y.context=V,Y}var me=j[E];if(me===void 0)return!1;if(typeof me=="function")s(me,this,N);else{var le=me.length,C=A(me,le);for(F=0;F<le;++F)s(C[F],this,N)}return!0},u.prototype.addListener=function(E,N){return b(this,E,N,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(E,N){return b(this,E,N,!0)},u.prototype.once=function(E,N){return _(N),this.on(E,w(this,E,N)),this},u.prototype.prependOnceListener=function(E,N){return _(N),this.prependListener(E,w(this,E,N)),this},u.prototype.removeListener=function(E,N){var F,R,j,V,Y;if(_(N),(R=this._events)===void 0)return this;if((F=R[E])===void 0)return this;if(F===N||F.listener===N)--this._eventsCount==0?this._events=Object.create(null):(delete R[E],R.removeListener&&this.emit("removeListener",E,F.listener||N));else if(typeof F!="function"){for(j=-1,V=F.length-1;V>=0;V--)if(F[V]===N||F[V].listener===N){Y=F[V].listener,j=V;break}if(j<0)return this;j===0?F.shift():function(me,le){for(;le+1<me.length;le++)me[le]=me[le+1];me.pop()}(F,j),F.length===1&&(R[E]=F[0]),R.removeListener!==void 0&&this.emit("removeListener",E,Y||N)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(E){var N,F,R;if((F=this._events)===void 0)return this;if(F.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):F[E]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete F[E]),this;if(arguments.length===0){var j,V=Object.keys(F);for(R=0;R<V.length;++R)(j=V[R])!=="removeListener"&&this.removeAllListeners(j);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(N=F[E])=="function")this.removeListener(E,N);else if(N!==void 0)for(R=N.length-1;R>=0;R--)this.removeListener(E,N[R]);return this},u.prototype.listeners=function(E){return g(this,E,!0)},u.prototype.rawListeners=function(E){return g(this,E,!1)},u.listenerCount=function(E,N){return typeof E.listenerCount=="function"?E.listenerCount(N):p.call(E,N)},u.prototype.listenerCount=p,u.prototype.eventNames=function(){return this._eventsCount>0?a(this._events):[]}},1731:(o,a,i)=>{var s=i(8287).Buffer,f=i(8835).parse,u=i(7007),r=i(1083),_=i(1568),d=i(537),b=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","servername","checkServerIdentity"],T=[239,187,191],w=262144,g=/^(cookie|authorization)$/i;function p(E,N){var F=p.CONNECTING,R=N&&N.headers,j=!1;Object.defineProperty(this,"readyState",{get:function(){return F}}),Object.defineProperty(this,"url",{get:function(){return E}});var V,Y=this;function me(P){F!==p.CLOSED&&(F=p.CONNECTING,S("error",new A("error",{message:P})),ae&&(E=ae,ae=null,j=!1),setTimeout(function(){F!==p.CONNECTING||Y.connectionInProgress||(Y.connectionInProgress=!0,I())},Y.reconnectInterval))}Y.reconnectInterval=1e3,Y.connectionInProgress=!1;var le="";R&&R["Last-Event-ID"]&&(le=R["Last-Event-ID"],delete R["Last-Event-ID"]);var C=!1,q="",X="",ae=null;function I(){var P=f(E),l=P.protocol==="https:";if(P.headers={"Cache-Control":"no-cache",Accept:"text/event-stream"},le&&(P.headers["Last-Event-ID"]=le),R){var x=j?function(Fe){var Oe={};for(var $ in Fe)g.test($)||(Oe[$]=Fe[$]);return Oe}(R):R;for(var W in x){var K=x[W];K&&(P.headers[W]=K)}}if(P.rejectUnauthorized=!(N&&!N.rejectUnauthorized),N&&N.createConnection!==void 0&&(P.createConnection=N.createConnection),N&&N.proxy){var re=f(N.proxy);l=re.protocol==="https:",P.protocol=l?"https:":"http:",P.path=E,P.headers.Host=P.host,P.hostname=re.hostname,P.host=re.host,P.port=re.port}if(N&&N.https){for(var oe in N.https)if(b.indexOf(oe)!==-1){var Ee=N.https[oe];Ee!==void 0&&(P[oe]=Ee)}}N&&N.withCredentials!==void 0&&(P.withCredentials=N.withCredentials),V=(l?r:_).request(P,function(Fe){if(Y.connectionInProgress=!1,Fe.statusCode===500||Fe.statusCode===502||Fe.statusCode===503||Fe.statusCode===504)return S("error",new A("error",{status:Fe.statusCode,message:Fe.statusMessage})),void me();if(Fe.statusCode===301||Fe.statusCode===302||Fe.statusCode===307){var Oe=Fe.headers.location;if(!Oe)return void S("error",new A("error",{status:Fe.statusCode,message:Fe.statusMessage}));var $=new URL(E).origin,de=new URL(Oe).origin;return j=$!==de,Fe.statusCode===307&&(ae=E),E=Oe,void process.nextTick(I)}if(Fe.statusCode!==200)return S("error",new A("error",{status:Fe.statusCode,message:Fe.statusMessage})),Y.close();var we,Qe;F=p.OPEN,Fe.on("close",function(){Fe.removeAllListeners("close"),Fe.removeAllListeners("end"),me()}),Fe.on("end",function(){Fe.removeAllListeners("close"),Fe.removeAllListeners("end"),me()}),S("open",new A("open"));var ze=0,We=-1,et=0,Be=0;Fe.on("data",function(Re){we?(Re.length>we.length-Be&&((et=2*we.length+Re.length)>w&&(et=we.length+Re.length+w),Qe=s.alloc(et),we.copy(Qe,0,0,Be),we=Qe),Re.copy(we,Be),Be+=Re.length):(function(B){return T.every(function(O,h){return B[h]===O})}(we=Re)&&(we=we.slice(T.length)),Be=we.length);for(var $e=0,ve=Be;$e<ve;){C&&(we[$e]===10&&++$e,C=!1);for(var ue,c=-1,y=We,v=ze;c<0&&v<ve;++v)(ue=we[v])===58?y<0&&(y=v-$e):ue===13?(C=!0,c=v-$e):ue===10&&(c=v-$e);if(c<0){ze=ve-$e,We=y;break}ze=0,We=-1,m(we,$e,y,c),$e+=c+1}$e===ve?(we=void 0,Be=0):$e>0&&(we=we.slice($e,Be),Be=we.length)})}),V.on("error",function(Fe){Y.connectionInProgress=!1,me(Fe.message)}),V.setNoDelay&&V.setNoDelay(!0),V.end()}function S(){Y.listeners(arguments[0]).length>0&&Y.emit.apply(Y,arguments)}function m(P,l,x,W){if(W===0){if(q.length>0){var K=X||"message";S(K,new L(K,{data:q.slice(0,-1),lastEventId:le,origin:new URL(E).origin})),q=""}X=void 0}else if(x>0){var re=x<0,oe=0,Ee=P.slice(l,l+(re?W:x)).toString();l+=oe=re?W:P[l+x+1]!==32?x+1:x+2;var Fe=W-oe,Oe=P.slice(l,l+Fe).toString();if(Ee==="data")q+=Oe+`
38
- `;else if(Ee==="event")X=Oe;else if(Ee==="id")le=Oe;else if(Ee==="retry"){var $=parseInt(Oe,10);Number.isNaN($)||(Y.reconnectInterval=$)}}}I(),this._close=function(){F!==p.CLOSED&&(F=p.CLOSED,V.abort&&V.abort(),V.xhr&&V.xhr.abort&&V.xhr.abort())}}function A(E,N){if(Object.defineProperty(this,"type",{writable:!1,value:E,enumerable:!0}),N)for(var F in N)N.hasOwnProperty(F)&&Object.defineProperty(this,F,{writable:!1,value:N[F],enumerable:!0})}function L(E,N){for(var F in Object.defineProperty(this,"type",{writable:!1,value:E,enumerable:!0}),N)N.hasOwnProperty(F)&&Object.defineProperty(this,F,{writable:!1,value:N[F],enumerable:!0})}o.exports=p,d.inherits(p,u.EventEmitter),p.prototype.constructor=p,["open","error","message"].forEach(function(E){Object.defineProperty(p.prototype,"on"+E,{get:function(){var N=this.listeners(E)[0];return N?N._listener?N._listener:N:void 0},set:function(N){this.removeAllListeners(E),this.addEventListener(E,N)}})}),Object.defineProperty(p,"CONNECTING",{enumerable:!0,value:0}),Object.defineProperty(p,"OPEN",{enumerable:!0,value:1}),Object.defineProperty(p,"CLOSED",{enumerable:!0,value:2}),p.prototype.CONNECTING=0,p.prototype.OPEN=1,p.prototype.CLOSED=2,p.prototype.close=function(){this._close()},p.prototype.addEventListener=function(E,N){typeof N=="function"&&(N._listener=N,this.on(E,N))},p.prototype.dispatchEvent=function(E){if(!E.type)throw new Error("UNSPECIFIED_EVENT_TYPE_ERR");this.emit(E.type,E.detail)},p.prototype.removeEventListener=function(E,N){typeof N=="function"&&(N._listener=void 0,this.removeListener(E,N))}},2682:(o,a,i)=>{"use strict";var s=i(9600),f=Object.prototype.toString,u=Object.prototype.hasOwnProperty;o.exports=function(r,_,d){if(!s(_))throw new TypeError("iterator must be a function");var b;arguments.length>=3&&(b=d),f.call(r)==="[object Array]"?function(T,w,g){for(var p=0,A=T.length;p<A;p++)u.call(T,p)&&(g==null?w(T[p],p,T):w.call(g,T[p],p,T))}(r,_,b):typeof r=="string"?function(T,w,g){for(var p=0,A=T.length;p<A;p++)g==null?w(T.charAt(p),p,T):w.call(g,T.charAt(p),p,T)}(r,_,b):function(T,w,g){for(var p in T)u.call(T,p)&&(g==null?w(T[p],p,T):w.call(g,T[p],p,T))}(r,_,b)}},1734:o=>{"use strict";var a=Object.prototype.toString,i=Math.max,s=function(f,u){for(var r=[],_=0;_<f.length;_+=1)r[_]=f[_];for(var d=0;d<u.length;d+=1)r[d+f.length]=u[d];return r};o.exports=function(f){var u=this;if(typeof u!="function"||a.apply(u)!=="[object Function]")throw new TypeError("Function.prototype.bind called on incompatible "+u);for(var r,_=function(g,p){for(var A=[],L=p||0,E=0;L<g.length;L+=1,E+=1)A[E]=g[L];return A}(arguments,1),d=i(0,u.length-_.length),b=[],T=0;T<d;T++)b[T]="$"+T;if(r=Function("binder","return function ("+function(g,p){for(var A="",L=0;L<g.length;L+=1)A+=g[L],L+1<g.length&&(A+=p);return A}(b,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof r){var g=u.apply(this,s(_,arguments));return Object(g)===g?g:this}return u.apply(f,s(_,arguments))}),u.prototype){var w=function(){};w.prototype=u.prototype,r.prototype=new w,w.prototype=null}return r}},6743:(o,a,i)=>{"use strict";var s=i(1734);o.exports=Function.prototype.bind||s},453:(o,a,i)=>{"use strict";var s,f=i(9383),u=i(1237),r=i(9290),_=i(9538),d=i(8068),b=i(9675),T=i(5345),w=Function,g=function(W){try{return w('"use strict"; return ('+W+").constructor;")()}catch{}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch{p=null}var A=function(){throw new b},L=p?function(){try{return A}catch{try{return p(arguments,"callee").get}catch{return A}}}():A,E=i(4039)(),N=i(24)(),F=Object.getPrototypeOf||(N?function(W){return W.__proto__}:null),R={},j=typeof Uint8Array<"u"&&F?F(Uint8Array):s,V={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?s:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?s:ArrayBuffer,"%ArrayIteratorPrototype%":E&&F?F([][Symbol.iterator]()):s,"%AsyncFromSyncIteratorPrototype%":s,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":typeof Atomics>"u"?s:Atomics,"%BigInt%":typeof BigInt>"u"?s:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?s:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?s:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?s:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":f,"%eval%":eval,"%EvalError%":u,"%Float32Array%":typeof Float32Array>"u"?s:Float32Array,"%Float64Array%":typeof Float64Array>"u"?s:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?s:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":R,"%Int8Array%":typeof Int8Array>"u"?s:Int8Array,"%Int16Array%":typeof Int16Array>"u"?s:Int16Array,"%Int32Array%":typeof Int32Array>"u"?s:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&F?F(F([][Symbol.iterator]())):s,"%JSON%":typeof JSON=="object"?JSON:s,"%Map%":typeof Map>"u"?s:Map,"%MapIteratorPrototype%":typeof Map<"u"&&E&&F?F(new Map()[Symbol.iterator]()):s,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?s:Promise,"%Proxy%":typeof Proxy>"u"?s:Proxy,"%RangeError%":r,"%ReferenceError%":_,"%Reflect%":typeof Reflect>"u"?s:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?s:Set,"%SetIteratorPrototype%":typeof Set<"u"&&E&&F?F(new Set()[Symbol.iterator]()):s,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?s:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&F?F(""[Symbol.iterator]()):s,"%Symbol%":E?Symbol:s,"%SyntaxError%":d,"%ThrowTypeError%":L,"%TypedArray%":j,"%TypeError%":b,"%Uint8Array%":typeof Uint8Array>"u"?s:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?s:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?s:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?s:Uint32Array,"%URIError%":T,"%WeakMap%":typeof WeakMap>"u"?s:WeakMap,"%WeakRef%":typeof WeakRef>"u"?s:WeakRef,"%WeakSet%":typeof WeakSet>"u"?s:WeakSet};if(F)try{null.error}catch(W){var Y=F(F(W));V["%Error.prototype%"]=Y}var me=function W(K){var re;if(K==="%AsyncFunction%")re=g("async function () {}");else if(K==="%GeneratorFunction%")re=g("function* () {}");else if(K==="%AsyncGeneratorFunction%")re=g("async function* () {}");else if(K==="%AsyncGenerator%"){var oe=W("%AsyncGeneratorFunction%");oe&&(re=oe.prototype)}else if(K==="%AsyncIteratorPrototype%"){var Ee=W("%AsyncGenerator%");Ee&&F&&(re=F(Ee.prototype))}return V[K]=re,re},le={__proto__:null,"%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"]},C=i(6743),q=i(9957),X=C.call(Function.call,Array.prototype.concat),ae=C.call(Function.apply,Array.prototype.splice),I=C.call(Function.call,String.prototype.replace),S=C.call(Function.call,String.prototype.slice),m=C.call(Function.call,RegExp.prototype.exec),P=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,l=/\\(\\)?/g,x=function(W,K){var re,oe=W;if(q(le,oe)&&(oe="%"+(re=le[oe])[0]+"%"),q(V,oe)){var Ee=V[oe];if(Ee===R&&(Ee=me(oe)),Ee===void 0&&!K)throw new b("intrinsic "+W+" exists, but is not available. Please file an issue!");return{alias:re,name:oe,value:Ee}}throw new d("intrinsic "+W+" does not exist!")};o.exports=function(W,K){if(typeof W!="string"||W.length===0)throw new b("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof K!="boolean")throw new b('"allowMissing" argument must be a boolean');if(m(/^%?[^%]*%?$/,W)===null)throw new d("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var re=function(Re){var $e=S(Re,0,1),ve=S(Re,-1);if($e==="%"&&ve!=="%")throw new d("invalid intrinsic syntax, expected closing `%`");if(ve==="%"&&$e!=="%")throw new d("invalid intrinsic syntax, expected opening `%`");var ue=[];return I(Re,P,function(c,y,v,B){ue[ue.length]=v?I(B,l,"$1"):y||c}),ue}(W),oe=re.length>0?re[0]:"",Ee=x("%"+oe+"%",K),Fe=Ee.name,Oe=Ee.value,$=!1,de=Ee.alias;de&&(oe=de[0],ae(re,X([0,1],de)));for(var we=1,Qe=!0;we<re.length;we+=1){var ze=re[we],We=S(ze,0,1),et=S(ze,-1);if((We==='"'||We==="'"||We==="`"||et==='"'||et==="'"||et==="`")&&We!==et)throw new d("property names with quotes must have matching quotes");if(ze!=="constructor"&&Qe||($=!0),q(V,Fe="%"+(oe+="."+ze)+"%"))Oe=V[Fe];else if(Oe!=null){if(!(ze in Oe)){if(!K)throw new b("base intrinsic for "+W+" exists, but the property is not available.");return}if(p&&we+1>=re.length){var Be=p(Oe,ze);Oe=(Qe=!!Be)&&"get"in Be&&!("originalValue"in Be.get)?Be.get:Oe[ze]}else Qe=q(Oe,ze),Oe=Oe[ze];Qe&&!$&&(V[Fe]=Oe)}}return Oe}},5795:(o,a,i)=>{"use strict";var s=i(453)("%Object.getOwnPropertyDescriptor%",!0);if(s)try{s([],"length")}catch{s=null}o.exports=s},592:(o,a,i)=>{"use strict";var s=i(655),f=function(){return!!s};f.hasArrayLengthDefineBug=function(){if(!s)return null;try{return s([],"length",{value:1}).length!==1}catch{return!0}},o.exports=f},24:o=>{"use strict";var a={__proto__:null,foo:{}},i=Object;o.exports=function(){return{__proto__:a}.foo===a.foo&&!(a instanceof i)}},4039:(o,a,i)=>{"use strict";var s=typeof Symbol<"u"&&Symbol,f=i(1333);o.exports=function(){return typeof s=="function"&&typeof Symbol=="function"&&typeof s("foo")=="symbol"&&typeof Symbol("bar")=="symbol"&&f()}},1333:o=>{"use strict";o.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var a={},i=Symbol("test"),s=Object(i);if(typeof i=="string"||Object.prototype.toString.call(i)!=="[object Symbol]"||Object.prototype.toString.call(s)!=="[object Symbol]")return!1;for(i in a[i]=42,a)return!1;if(typeof Object.keys=="function"&&Object.keys(a).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(a).length!==0)return!1;var f=Object.getOwnPropertySymbols(a);if(f.length!==1||f[0]!==i||!Object.prototype.propertyIsEnumerable.call(a,i))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(a,i);if(u.value!==42||u.enumerable!==!0)return!1}return!0}},9092:(o,a,i)=>{"use strict";var s=i(1333);o.exports=function(){return s()&&!!Symbol.toStringTag}},9957:(o,a,i)=>{"use strict";var s=Function.prototype.call,f=Object.prototype.hasOwnProperty,u=i(6743);o.exports=u.call(s,f)},1083:(o,a,i)=>{var s=i(1568),f=i(8835),u=o.exports;for(var r in s)s.hasOwnProperty(r)&&(u[r]=s[r]);function _(d){if(typeof d=="string"&&(d=f.parse(d)),d.protocol||(d.protocol="https:"),d.protocol!=="https:")throw new Error('Protocol "'+d.protocol+'" not supported. Expected "https:"');return d}u.request=function(d,b){return d=_(d),s.request.call(this,d,b)},u.get=function(d,b){return d=_(d),s.get.call(this,d,b)}},251:(o,a)=>{a.read=function(i,s,f,u,r){var _,d,b=8*r-u-1,T=(1<<b)-1,w=T>>1,g=-7,p=f?r-1:0,A=f?-1:1,L=i[s+p];for(p+=A,_=L&(1<<-g)-1,L>>=-g,g+=b;g>0;_=256*_+i[s+p],p+=A,g-=8);for(d=_&(1<<-g)-1,_>>=-g,g+=u;g>0;d=256*d+i[s+p],p+=A,g-=8);if(_===0)_=1-w;else{if(_===T)return d?NaN:1/0*(L?-1:1);d+=Math.pow(2,u),_-=w}return(L?-1:1)*d*Math.pow(2,_-u)},a.write=function(i,s,f,u,r,_){var d,b,T,w=8*_-r-1,g=(1<<w)-1,p=g>>1,A=r===23?Math.pow(2,-24)-Math.pow(2,-77):0,L=u?0:_-1,E=u?1:-1,N=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(b=isNaN(s)?1:0,d=g):(d=Math.floor(Math.log(s)/Math.LN2),s*(T=Math.pow(2,-d))<1&&(d--,T*=2),(s+=d+p>=1?A/T:A*Math.pow(2,1-p))*T>=2&&(d++,T/=2),d+p>=g?(b=0,d=g):d+p>=1?(b=(s*T-1)*Math.pow(2,r),d+=p):(b=s*Math.pow(2,p-1)*Math.pow(2,r),d=0));r>=8;i[f+L]=255&b,L+=E,b/=256,r-=8);for(d=d<<r|b,w+=r;w>0;i[f+L]=255&d,L+=E,d/=256,w-=8);i[f+L-E]|=128*N}},6698:o=>{typeof Object.create=="function"?o.exports=function(a,i){i&&(a.super_=i,a.prototype=Object.create(i.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}))}:o.exports=function(a,i){if(i){a.super_=i;var s=function(){};s.prototype=i.prototype,a.prototype=new s,a.prototype.constructor=a}}},7244:(o,a,i)=>{"use strict";var s=i(9092)(),f=i(8075)("Object.prototype.toString"),u=function(d){return!(s&&d&&typeof d=="object"&&Symbol.toStringTag in d)&&f(d)==="[object Arguments]"},r=function(d){return!!u(d)||d!==null&&typeof d=="object"&&typeof d.length=="number"&&d.length>=0&&f(d)!=="[object Array]"&&f(d.callee)==="[object Function]"},_=function(){return u(arguments)}();u.isLegacyArguments=r,o.exports=_?u:r},9600:o=>{"use strict";var a,i,s=Function.prototype.toString,f=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply;if(typeof f=="function"&&typeof Object.defineProperty=="function")try{a=Object.defineProperty({},"length",{get:function(){throw i}}),i={},f(function(){throw 42},null,a)}catch(p){p!==i&&(f=null)}else f=null;var u=/^\s*class\b/,r=function(p){try{var A=s.call(p);return u.test(A)}catch{return!1}},_=function(p){try{return!r(p)&&(s.call(p),!0)}catch{return!1}},d=Object.prototype.toString,b=typeof Symbol=="function"&&!!Symbol.toStringTag,T=!(0 in[,]),w=function(){return!1};if(typeof document=="object"){var g=document.all;d.call(g)===d.call(document.all)&&(w=function(p){if((T||!p)&&(p===void 0||typeof p=="object"))try{var A=d.call(p);return(A==="[object HTMLAllCollection]"||A==="[object HTML document.all class]"||A==="[object HTMLCollection]"||A==="[object Object]")&&p("")==null}catch{}return!1})}o.exports=f?function(p){if(w(p))return!0;if(!p||typeof p!="function"&&typeof p!="object")return!1;try{f(p,null,a)}catch(A){if(A!==i)return!1}return!r(p)&&_(p)}:function(p){if(w(p))return!0;if(!p||typeof p!="function"&&typeof p!="object")return!1;if(b)return _(p);if(r(p))return!1;var A=d.call(p);return!(A!=="[object Function]"&&A!=="[object GeneratorFunction]"&&!/^\[object HTML/.test(A))&&_(p)}},8184:(o,a,i)=>{"use strict";var s,f=Object.prototype.toString,u=Function.prototype.toString,r=/^\s*(?:function)?\*/,_=i(9092)(),d=Object.getPrototypeOf;o.exports=function(b){if(typeof b!="function")return!1;if(r.test(u.call(b)))return!0;if(!_)return f.call(b)==="[object GeneratorFunction]";if(!d)return!1;if(s===void 0){var T=function(){if(!_)return!1;try{return Function("return function*() {}")()}catch{}}();s=!!T&&d(T)}return d(b)===s}},5680:(o,a,i)=>{"use strict";var s=i(5767);o.exports=function(f){return!!s(f)}},8859:(o,a,i)=>{var s=typeof Map=="function"&&Map.prototype,f=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,u=s&&f&&typeof f.get=="function"?f.get:null,r=s&&Map.prototype.forEach,_=typeof Set=="function"&&Set.prototype,d=Object.getOwnPropertyDescriptor&&_?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,b=_&&d&&typeof d.get=="function"?d.get:null,T=_&&Set.prototype.forEach,w=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap.prototype.has:null,g=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet.prototype.has:null,p=typeof WeakRef=="function"&&WeakRef.prototype?WeakRef.prototype.deref:null,A=Boolean.prototype.valueOf,L=Object.prototype.toString,E=Function.prototype.toString,N=String.prototype.match,F=String.prototype.slice,R=String.prototype.replace,j=String.prototype.toUpperCase,V=String.prototype.toLowerCase,Y=RegExp.prototype.test,me=Array.prototype.concat,le=Array.prototype.join,C=Array.prototype.slice,q=Math.floor,X=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ae=Object.getOwnPropertySymbols,I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,S=typeof Symbol=="function"&&typeof Symbol.iterator=="object",m=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===S||!0)?Symbol.toStringTag:null,P=Object.prototype.propertyIsEnumerable,l=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(c){return c.__proto__}:null);function x(c,y){if(c===1/0||c===-1/0||c!=c||c&&c>-1e3&&c<1e3||Y.call(/e/,y))return y;var v=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof c=="number"){var B=c<0?-q(-c):q(c);if(B!==c){var O=String(B),h=F.call(y,O.length+1);return R.call(O,v,"$&_")+"."+R.call(R.call(h,/([0-9]{3})/g,"$&_"),/_$/,"")}}return R.call(y,v,"$&_")}var W=i(2634),K=W.custom,re=$(K)?K:null;function oe(c,y,v){var B=(v.quoteStyle||y)==="double"?'"':"'";return B+c+B}function Ee(c){return R.call(String(c),/"/g,"&quot;")}function Fe(c){return!(Qe(c)!=="[object Array]"||m&&typeof c=="object"&&m in c)}function Oe(c){return!(Qe(c)!=="[object RegExp]"||m&&typeof c=="object"&&m in c)}function $(c){if(S)return c&&typeof c=="object"&&c instanceof Symbol;if(typeof c=="symbol")return!0;if(!c||typeof c!="object"||!I)return!1;try{return I.call(c),!0}catch{}return!1}o.exports=function c(y,v,B,O){var h=v||{};if(we(h,"quoteStyle")&&h.quoteStyle!=="single"&&h.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(we(h,"maxStringLength")&&(typeof h.maxStringLength=="number"?h.maxStringLength<0&&h.maxStringLength!==1/0:h.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var k=!we(h,"customInspect")||h.customInspect;if(typeof k!="boolean"&&k!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(we(h,"indent")&&h.indent!==null&&h.indent!==" "&&!(parseInt(h.indent,10)===h.indent&&h.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(we(h,"numericSeparator")&&typeof h.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var U=h.numericSeparator;if(y===void 0)return"undefined";if(y===null)return"null";if(typeof y=="boolean")return y?"true":"false";if(typeof y=="string")return We(y,h);if(typeof y=="number"){if(y===0)return 1/0/y>0?"0":"-0";var M=String(y);return U?x(y,M):M}if(typeof y=="bigint"){var J=String(y)+"n";return U?x(y,J):J}var pe=h.depth===void 0?5:h.depth;if(B===void 0&&(B=0),B>=pe&&pe>0&&typeof y=="object")return Fe(y)?"[Array]":"[Object]";var Ne=function(_t,Ct){var it;if(_t.indent===" ")it=" ";else{if(!(typeof _t.indent=="number"&&_t.indent>0))return null;it=le.call(Array(_t.indent+1)," ")}return{base:it,prev:le.call(Array(Ct+1),it)}}(h,B);if(O===void 0)O=[];else if(ze(O,y)>=0)return"[Circular]";function tt(_t,Ct,it){if(Ct&&(O=C.call(O)).push(Ct),it){var Q={depth:h.depth};return we(h,"quoteStyle")&&(Q.quoteStyle=h.quoteStyle),c(_t,Q,B+1,O)}return c(_t,h,B+1,O)}if(typeof y=="function"&&!Oe(y)){var bt=function(_t){if(_t.name)return _t.name;var Ct=N.call(E.call(_t),/^function\s*([\w$]+)/);return Ct?Ct[1]:null}(y),Ot=ue(y,tt);return"[Function"+(bt?": "+bt:" (anonymous)")+"]"+(Ot.length>0?" { "+le.call(Ot,", ")+" }":"")}if($(y)){var Ft=S?R.call(String(y),/^(Symbol\(.*\))_[^)]*$/,"$1"):I.call(y);return typeof y!="object"||S?Ft:Be(Ft)}if(function(_t){return!_t||typeof _t!="object"?!1:typeof HTMLElement<"u"&&_t instanceof HTMLElement?!0:typeof _t.nodeName=="string"&&typeof _t.getAttribute=="function"}(y)){for(var Yt="<"+V.call(String(y.nodeName)),yr=y.attributes||[],je=0;je<yr.length;je++)Yt+=" "+yr[je].name+"="+oe(Ee(yr[je].value),"double",h);return Yt+=">",y.childNodes&&y.childNodes.length&&(Yt+="..."),Yt+="</"+V.call(String(y.nodeName))+">"}if(Fe(y)){if(y.length===0)return"[]";var De=ue(y,tt);return Ne&&!function(_t){for(var Ct=0;Ct<_t.length;Ct++)if(ze(_t[Ct],`
39
- `)>=0)return!1;return!0}(De)?"["+ve(De,Ne)+"]":"[ "+le.call(De,", ")+" ]"}if(function(_t){return!(Qe(_t)!=="[object Error]"||m&&typeof _t=="object"&&m in _t)}(y)){var Xe=ue(y,tt);return"cause"in Error.prototype||!("cause"in y)||P.call(y,"cause")?Xe.length===0?"["+String(y)+"]":"{ ["+String(y)+"] "+le.call(Xe,", ")+" }":"{ ["+String(y)+"] "+le.call(me.call("[cause]: "+tt(y.cause),Xe),", ")+" }"}if(typeof y=="object"&&k){if(re&&typeof y[re]=="function"&&W)return W(y,{depth:pe-B});if(k!=="symbol"&&typeof y.inspect=="function")return y.inspect()}if(function(_t){if(!u||!_t||typeof _t!="object")return!1;try{u.call(_t);try{b.call(_t)}catch{return!0}return _t instanceof Map}catch{}return!1}(y)){var ie=[];return r&&r.call(y,function(_t,Ct){ie.push(tt(Ct,y,!0)+" => "+tt(_t,y))}),$e("Map",u.call(y),ie,Ne)}if(function(_t){if(!b||!_t||typeof _t!="object")return!1;try{b.call(_t);try{u.call(_t)}catch{return!0}return _t instanceof Set}catch{}return!1}(y)){var Pe=[];return T&&T.call(y,function(_t){Pe.push(tt(_t,y))}),$e("Set",b.call(y),Pe,Ne)}if(function(_t){if(!w||!_t||typeof _t!="object")return!1;try{w.call(_t,w);try{g.call(_t,g)}catch{return!0}return _t instanceof WeakMap}catch{}return!1}(y))return Re("WeakMap");if(function(_t){if(!g||!_t||typeof _t!="object")return!1;try{g.call(_t,g);try{w.call(_t,w)}catch{return!0}return _t instanceof WeakSet}catch{}return!1}(y))return Re("WeakSet");if(function(_t){if(!p||!_t||typeof _t!="object")return!1;try{return p.call(_t),!0}catch{}return!1}(y))return Re("WeakRef");if(function(_t){return!(Qe(_t)!=="[object Number]"||m&&typeof _t=="object"&&m in _t)}(y))return Be(tt(Number(y)));if(function(_t){if(!_t||typeof _t!="object"||!X)return!1;try{return X.call(_t),!0}catch{}return!1}(y))return Be(tt(X.call(y)));if(function(_t){return!(Qe(_t)!=="[object Boolean]"||m&&typeof _t=="object"&&m in _t)}(y))return Be(A.call(y));if(function(_t){return!(Qe(_t)!=="[object String]"||m&&typeof _t=="object"&&m in _t)}(y))return Be(tt(String(y)));if(typeof window<"u"&&y===window)return"{ [object Window] }";if(y===i.g)return"{ [object globalThis] }";if(!function(_t){return!(Qe(_t)!=="[object Date]"||m&&typeof _t=="object"&&m in _t)}(y)&&!Oe(y)){var ct=ue(y,tt),dt=l?l(y)===Object.prototype:y instanceof Object||y.constructor===Object,xt=y instanceof Object?"":"null prototype",st=!dt&&m&&Object(y)===y&&m in y?F.call(Qe(y),8,-1):xt?"Object":"",$t=(dt||typeof y.constructor!="function"?"":y.constructor.name?y.constructor.name+" ":"")+(st||xt?"["+le.call(me.call([],st||[],xt||[]),": ")+"] ":"");return ct.length===0?$t+"{}":Ne?$t+"{"+ve(ct,Ne)+"}":$t+"{ "+le.call(ct,", ")+" }"}return String(y)};var de=Object.prototype.hasOwnProperty||function(c){return c in this};function we(c,y){return de.call(c,y)}function Qe(c){return L.call(c)}function ze(c,y){if(c.indexOf)return c.indexOf(y);for(var v=0,B=c.length;v<B;v++)if(c[v]===y)return v;return-1}function We(c,y){if(c.length>y.maxStringLength){var v=c.length-y.maxStringLength,B="... "+v+" more character"+(v>1?"s":"");return We(F.call(c,0,y.maxStringLength),y)+B}return oe(R.call(R.call(c,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,et),"single",y)}function et(c){var y=c.charCodeAt(0),v={8:"b",9:"t",10:"n",12:"f",13:"r"}[y];return v?"\\"+v:"\\x"+(y<16?"0":"")+j.call(y.toString(16))}function Be(c){return"Object("+c+")"}function Re(c){return c+" { ? }"}function $e(c,y,v,B){return c+" ("+y+") {"+(B?ve(v,B):le.call(v,", "))+"}"}function ve(c,y){if(c.length===0)return"";var v=`
40
- `+y.prev+y.base;return v+le.call(c,","+v)+`
41
- `+y.prev}function ue(c,y){var v=Fe(c),B=[];if(v){B.length=c.length;for(var O=0;O<c.length;O++)B[O]=we(c,O)?y(c[O],c):""}var h,k=typeof ae=="function"?ae(c):[];if(S){h={};for(var U=0;U<k.length;U++)h["$"+k[U]]=k[U]}for(var M in c)we(c,M)&&(v&&String(Number(M))===M&&M<c.length||S&&h["$"+M]instanceof Symbol||(Y.call(/[^\w$]/,M)?B.push(y(M,c)+": "+y(c[M],c)):B.push(M+": "+y(c[M],c))));if(typeof ae=="function")for(var J=0;J<k.length;J++)P.call(c,k[J])&&B.push("["+y(k[J])+"]: "+y(c[k[J]],c));return B}},6578:o=>{"use strict";o.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},4765:o=>{"use strict";var a=String.prototype.replace,i=/%20/g,s="RFC1738",f="RFC3986";o.exports={default:f,formatters:{RFC1738:function(u){return a.call(u,i,"+")},RFC3986:function(u){return String(u)}},RFC1738:s,RFC3986:f}},5373:(o,a,i)=>{"use strict";var s=i(8636),f=i(2642),u=i(4765);o.exports={formats:u,parse:f,stringify:s}},2642:(o,a,i)=>{"use strict";var s=i(7720),f=Object.prototype.hasOwnProperty,u=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:s.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},_=function(T){return T.replace(/&#(\d+);/g,function(w,g){return String.fromCharCode(parseInt(g,10))})},d=function(T,w){return T&&typeof T=="string"&&w.comma&&T.indexOf(",")>-1?T.split(","):T},b=function(T,w,g,p){if(T){var A=g.allowDots?T.replace(/\.([^.[]+)/g,"[$1]"):T,L=/(\[[^[\]]*])/g,E=g.depth>0&&/(\[[^[\]]*])/.exec(A),N=E?A.slice(0,E.index):A,F=[];if(N){if(!g.plainObjects&&f.call(Object.prototype,N)&&!g.allowPrototypes)return;F.push(N)}for(var R=0;g.depth>0&&(E=L.exec(A))!==null&&R<g.depth;){if(R+=1,!g.plainObjects&&f.call(Object.prototype,E[1].slice(1,-1))&&!g.allowPrototypes)return;F.push(E[1])}return E&&F.push("["+A.slice(E.index)+"]"),function(j,V,Y,me){for(var le=me?V:d(V,Y),C=j.length-1;C>=0;--C){var q,X=j[C];if(X==="[]"&&Y.parseArrays)q=Y.allowEmptyArrays&&le===""?[]:[].concat(le);else{q=Y.plainObjects?Object.create(null):{};var ae=X.charAt(0)==="["&&X.charAt(X.length-1)==="]"?X.slice(1,-1):X,I=Y.decodeDotInKeys?ae.replace(/%2E/g,"."):ae,S=parseInt(I,10);Y.parseArrays||I!==""?!isNaN(S)&&X!==I&&String(S)===I&&S>=0&&Y.parseArrays&&S<=Y.arrayLimit?(q=[])[S]=le:I!=="__proto__"&&(q[I]=le):q={0:le}}le=q}return le}(F,w,g,p)}};o.exports=function(T,w){var g=function(R){if(!R)return r;if(R.allowEmptyArrays!==void 0&&typeof R.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(R.decodeDotInKeys!==void 0&&typeof R.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(R.decoder!==null&&R.decoder!==void 0&&typeof R.decoder!="function")throw new TypeError("Decoder has to be a function.");if(R.charset!==void 0&&R.charset!=="utf-8"&&R.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var j=R.charset===void 0?r.charset:R.charset,V=R.duplicates===void 0?r.duplicates:R.duplicates;if(V!=="combine"&&V!=="first"&&V!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:R.allowDots===void 0?R.decodeDotInKeys===!0||r.allowDots:!!R.allowDots,allowEmptyArrays:typeof R.allowEmptyArrays=="boolean"?!!R.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof R.allowPrototypes=="boolean"?R.allowPrototypes:r.allowPrototypes,allowSparse:typeof R.allowSparse=="boolean"?R.allowSparse:r.allowSparse,arrayLimit:typeof R.arrayLimit=="number"?R.arrayLimit:r.arrayLimit,charset:j,charsetSentinel:typeof R.charsetSentinel=="boolean"?R.charsetSentinel:r.charsetSentinel,comma:typeof R.comma=="boolean"?R.comma:r.comma,decodeDotInKeys:typeof R.decodeDotInKeys=="boolean"?R.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof R.decoder=="function"?R.decoder:r.decoder,delimiter:typeof R.delimiter=="string"||s.isRegExp(R.delimiter)?R.delimiter:r.delimiter,depth:typeof R.depth=="number"||R.depth===!1?+R.depth:r.depth,duplicates:V,ignoreQueryPrefix:R.ignoreQueryPrefix===!0,interpretNumericEntities:typeof R.interpretNumericEntities=="boolean"?R.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof R.parameterLimit=="number"?R.parameterLimit:r.parameterLimit,parseArrays:R.parseArrays!==!1,plainObjects:typeof R.plainObjects=="boolean"?R.plainObjects:r.plainObjects,strictNullHandling:typeof R.strictNullHandling=="boolean"?R.strictNullHandling:r.strictNullHandling}}(w);if(T===""||T==null)return g.plainObjects?Object.create(null):{};for(var p=typeof T=="string"?function(R,j){var V,Y={__proto__:null},me=j.ignoreQueryPrefix?R.replace(/^\?/,""):R,le=j.parameterLimit===1/0?void 0:j.parameterLimit,C=me.split(j.delimiter,le),q=-1,X=j.charset;if(j.charsetSentinel)for(V=0;V<C.length;++V)C[V].indexOf("utf8=")===0&&(C[V]==="utf8=%E2%9C%93"?X="utf-8":C[V]==="utf8=%26%2310003%3B"&&(X="iso-8859-1"),q=V,V=C.length);for(V=0;V<C.length;++V)if(V!==q){var ae,I,S=C[V],m=S.indexOf("]="),P=m===-1?S.indexOf("="):m+1;P===-1?(ae=j.decoder(S,r.decoder,X,"key"),I=j.strictNullHandling?null:""):(ae=j.decoder(S.slice(0,P),r.decoder,X,"key"),I=s.maybeMap(d(S.slice(P+1),j),function(x){return j.decoder(x,r.decoder,X,"value")})),I&&j.interpretNumericEntities&&X==="iso-8859-1"&&(I=_(I)),S.indexOf("[]=")>-1&&(I=u(I)?[I]:I);var l=f.call(Y,ae);l&&j.duplicates==="combine"?Y[ae]=s.combine(Y[ae],I):l&&j.duplicates!=="last"||(Y[ae]=I)}return Y}(T,g):T,A=g.plainObjects?Object.create(null):{},L=Object.keys(p),E=0;E<L.length;++E){var N=L[E],F=b(N,p[N],g,typeof T=="string");A=s.merge(A,F,g)}return g.allowSparse===!0?A:s.compact(A)}},8636:(o,a,i)=>{"use strict";var s=i(920),f=i(7720),u=i(4765),r=Object.prototype.hasOwnProperty,_={brackets:function(E){return E+"[]"},comma:"comma",indices:function(E,N){return E+"["+N+"]"},repeat:function(E){return E}},d=Array.isArray,b=Array.prototype.push,T=function(E,N){b.apply(E,d(N)?N:[N])},w=Date.prototype.toISOString,g=u.default,p={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:f.encode,encodeValuesOnly:!1,format:g,formatter:u.formatters[g],indices:!1,serializeDate:function(E){return w.call(E)},skipNulls:!1,strictNullHandling:!1},A={},L=function E(N,F,R,j,V,Y,me,le,C,q,X,ae,I,S,m,P,l,x){for(var W,K=N,re=x,oe=0,Ee=!1;(re=re.get(A))!==void 0&&!Ee;){var Fe=re.get(N);if(oe+=1,Fe!==void 0){if(Fe===oe)throw new RangeError("Cyclic object value");Ee=!0}re.get(A)===void 0&&(oe=0)}if(typeof q=="function"?K=q(F,K):K instanceof Date?K=I(K):R==="comma"&&d(K)&&(K=f.maybeMap(K,function(ve){return ve instanceof Date?I(ve):ve})),K===null){if(Y)return C&&!P?C(F,p.encoder,l,"key",S):F;K=""}if(typeof(W=K)=="string"||typeof W=="number"||typeof W=="boolean"||typeof W=="symbol"||typeof W=="bigint"||f.isBuffer(K))return C?[m(P?F:C(F,p.encoder,l,"key",S))+"="+m(C(K,p.encoder,l,"value",S))]:[m(F)+"="+m(String(K))];var Oe,$=[];if(K===void 0)return $;if(R==="comma"&&d(K))P&&C&&(K=f.maybeMap(K,C)),Oe=[{value:K.length>0?K.join(",")||null:void 0}];else if(d(q))Oe=q;else{var de=Object.keys(K);Oe=X?de.sort(X):de}var we=le?F.replace(/\./g,"%2E"):F,Qe=j&&d(K)&&K.length===1?we+"[]":we;if(V&&d(K)&&K.length===0)return Qe+"[]";for(var ze=0;ze<Oe.length;++ze){var We=Oe[ze],et=typeof We=="object"&&We.value!==void 0?We.value:K[We];if(!me||et!==null){var Be=ae&&le?We.replace(/\./g,"%2E"):We,Re=d(K)?typeof R=="function"?R(Qe,Be):Qe:Qe+(ae?"."+Be:"["+Be+"]");x.set(N,oe);var $e=s();$e.set(A,x),T($,E(et,Re,R,j,V,Y,me,le,R==="comma"&&P&&d(K)?null:C,q,X,ae,I,S,m,P,l,$e))}}return $};o.exports=function(E,N){var F,R=E,j=function(I){if(!I)return p;if(I.allowEmptyArrays!==void 0&&typeof I.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(I.encodeDotInKeys!==void 0&&typeof I.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(I.encoder!==null&&I.encoder!==void 0&&typeof I.encoder!="function")throw new TypeError("Encoder has to be a function.");var S=I.charset||p.charset;if(I.charset!==void 0&&I.charset!=="utf-8"&&I.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var m=u.default;if(I.format!==void 0){if(!r.call(u.formatters,I.format))throw new TypeError("Unknown format option provided.");m=I.format}var P,l=u.formatters[m],x=p.filter;if((typeof I.filter=="function"||d(I.filter))&&(x=I.filter),P=I.arrayFormat in _?I.arrayFormat:"indices"in I?I.indices?"indices":"repeat":p.arrayFormat,"commaRoundTrip"in I&&typeof I.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var W=I.allowDots===void 0?I.encodeDotInKeys===!0||p.allowDots:!!I.allowDots;return{addQueryPrefix:typeof I.addQueryPrefix=="boolean"?I.addQueryPrefix:p.addQueryPrefix,allowDots:W,allowEmptyArrays:typeof I.allowEmptyArrays=="boolean"?!!I.allowEmptyArrays:p.allowEmptyArrays,arrayFormat:P,charset:S,charsetSentinel:typeof I.charsetSentinel=="boolean"?I.charsetSentinel:p.charsetSentinel,commaRoundTrip:I.commaRoundTrip,delimiter:I.delimiter===void 0?p.delimiter:I.delimiter,encode:typeof I.encode=="boolean"?I.encode:p.encode,encodeDotInKeys:typeof I.encodeDotInKeys=="boolean"?I.encodeDotInKeys:p.encodeDotInKeys,encoder:typeof I.encoder=="function"?I.encoder:p.encoder,encodeValuesOnly:typeof I.encodeValuesOnly=="boolean"?I.encodeValuesOnly:p.encodeValuesOnly,filter:x,format:m,formatter:l,serializeDate:typeof I.serializeDate=="function"?I.serializeDate:p.serializeDate,skipNulls:typeof I.skipNulls=="boolean"?I.skipNulls:p.skipNulls,sort:typeof I.sort=="function"?I.sort:null,strictNullHandling:typeof I.strictNullHandling=="boolean"?I.strictNullHandling:p.strictNullHandling}}(N);typeof j.filter=="function"?R=(0,j.filter)("",R):d(j.filter)&&(F=j.filter);var V=[];if(typeof R!="object"||R===null)return"";var Y=_[j.arrayFormat],me=Y==="comma"&&j.commaRoundTrip;F||(F=Object.keys(R)),j.sort&&F.sort(j.sort);for(var le=s(),C=0;C<F.length;++C){var q=F[C];j.skipNulls&&R[q]===null||T(V,L(R[q],q,Y,me,j.allowEmptyArrays,j.strictNullHandling,j.skipNulls,j.encodeDotInKeys,j.encode?j.encoder:null,j.filter,j.sort,j.allowDots,j.serializeDate,j.format,j.formatter,j.encodeValuesOnly,j.charset,le))}var X=V.join(j.delimiter),ae=j.addQueryPrefix===!0?"?":"";return j.charsetSentinel&&(j.charset==="iso-8859-1"?ae+="utf8=%26%2310003%3B&":ae+="utf8=%E2%9C%93&"),X.length>0?ae+X:""}},7720:(o,a,i)=>{"use strict";var s=i(4765),f=Object.prototype.hasOwnProperty,u=Array.isArray,r=function(){for(var b=[],T=0;T<256;++T)b.push("%"+((T<16?"0":"")+T.toString(16)).toUpperCase());return b}(),_=function(b,T){for(var w=T&&T.plainObjects?Object.create(null):{},g=0;g<b.length;++g)b[g]!==void 0&&(w[g]=b[g]);return w},d=1024;o.exports={arrayToObject:_,assign:function(b,T){return Object.keys(T).reduce(function(w,g){return w[g]=T[g],w},b)},combine:function(b,T){return[].concat(b,T)},compact:function(b){for(var T=[{obj:{o:b},prop:"o"}],w=[],g=0;g<T.length;++g)for(var p=T[g],A=p.obj[p.prop],L=Object.keys(A),E=0;E<L.length;++E){var N=L[E],F=A[N];typeof F=="object"&&F!==null&&w.indexOf(F)===-1&&(T.push({obj:A,prop:N}),w.push(F))}return function(R){for(;R.length>1;){var j=R.pop(),V=j.obj[j.prop];if(u(V)){for(var Y=[],me=0;me<V.length;++me)V[me]!==void 0&&Y.push(V[me]);j.obj[j.prop]=Y}}}(T),b},decode:function(b,T,w){var g=b.replace(/\+/g," ");if(w==="iso-8859-1")return g.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(g)}catch{return g}},encode:function(b,T,w,g,p){if(b.length===0)return b;var A=b;if(typeof b=="symbol"?A=Symbol.prototype.toString.call(b):typeof b!="string"&&(A=String(b)),w==="iso-8859-1")return escape(A).replace(/%u[0-9a-f]{4}/gi,function(V){return"%26%23"+parseInt(V.slice(2),16)+"%3B"});for(var L="",E=0;E<A.length;E+=d){for(var N=A.length>=d?A.slice(E,E+d):A,F=[],R=0;R<N.length;++R){var j=N.charCodeAt(R);j===45||j===46||j===95||j===126||j>=48&&j<=57||j>=65&&j<=90||j>=97&&j<=122||p===s.RFC1738&&(j===40||j===41)?F[F.length]=N.charAt(R):j<128?F[F.length]=r[j]:j<2048?F[F.length]=r[192|j>>6]+r[128|63&j]:j<55296||j>=57344?F[F.length]=r[224|j>>12]+r[128|j>>6&63]+r[128|63&j]:(R+=1,j=65536+((1023&j)<<10|1023&N.charCodeAt(R)),F[F.length]=r[240|j>>18]+r[128|j>>12&63]+r[128|j>>6&63]+r[128|63&j])}L+=F.join("")}return L},isBuffer:function(b){return!(!b||typeof b!="object")&&!!(b.constructor&&b.constructor.isBuffer&&b.constructor.isBuffer(b))},isRegExp:function(b){return Object.prototype.toString.call(b)==="[object RegExp]"},maybeMap:function(b,T){if(u(b)){for(var w=[],g=0;g<b.length;g+=1)w.push(T(b[g]));return w}return T(b)},merge:function b(T,w,g){if(!w)return T;if(typeof w!="object"){if(u(T))T.push(w);else{if(!T||typeof T!="object")return[T,w];(g&&(g.plainObjects||g.allowPrototypes)||!f.call(Object.prototype,w))&&(T[w]=!0)}return T}if(!T||typeof T!="object")return[T].concat(w);var p=T;return u(T)&&!u(w)&&(p=_(T,g)),u(T)&&u(w)?(w.forEach(function(A,L){if(f.call(T,L)){var E=T[L];E&&typeof E=="object"&&A&&typeof A=="object"?T[L]=b(E,A,g):T.push(A)}else T[L]=A}),T):Object.keys(w).reduce(function(A,L){var E=w[L];return f.call(A,L)?A[L]=b(A[L],E,g):A[L]=E,A},p)}}},3209:(o,a,i)=>{"use strict";var s=65536,f=4294967295,u=i(2861).Buffer,r=i.g.crypto||i.g.msCrypto;r&&r.getRandomValues?o.exports=function(_,d){if(_>f)throw new RangeError("requested too many random bytes");var b=u.allocUnsafe(_);if(_>0)if(_>s)for(var T=0;T<_;T+=s)r.getRandomValues(b.slice(T,T+s));else r.getRandomValues(b);return typeof d=="function"?process.nextTick(function(){d(null,b)}):b}:o.exports=function(){throw new Error(`Secure random number generation is not supported by this browser.
42
- Use Chrome, Firefox or Internet Explorer 11`)}},6048:o=>{"use strict";var a={};function i(f,u,r){r||(r=Error);var _=function(d){var b,T;function w(g,p,A){return d.call(this,function(L,E,N){return typeof u=="string"?u:u(L,E,N)}(g,p,A))||this}return T=d,(b=w).prototype=Object.create(T.prototype),b.prototype.constructor=b,b.__proto__=T,w}(r);_.prototype.name=r.name,_.prototype.code=f,a[f]=_}function s(f,u){if(Array.isArray(f)){var r=f.length;return f=f.map(function(_){return String(_)}),r>2?"one of ".concat(u," ").concat(f.slice(0,r-1).join(", "),", or ")+f[r-1]:r===2?"one of ".concat(u," ").concat(f[0]," or ").concat(f[1]):"of ".concat(u," ").concat(f[0])}return"of ".concat(u," ").concat(String(f))}i("ERR_INVALID_OPT_VALUE",function(f,u){return'The value "'+u+'" is invalid for option "'+f+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(f,u,r){var _,d,b,T;if(typeof u=="string"&&(d="not ",u.substr(!b||b<0?0:+b,d.length)===d)?(_="must not be",u=u.replace(/^not /,"")):_="must be",function(g,p,A){return(A===void 0||A>g.length)&&(A=g.length),g.substring(A-p.length,A)===p}(f," argument"))T="The ".concat(f," ").concat(_," ").concat(s(u,"type"));else{var w=function(g,p,A){return typeof A!="number"&&(A=0),!(A+p.length>g.length)&&g.indexOf(p,A)!==-1}(f,".")?"property":"argument";T='The "'.concat(f,'" ').concat(w," ").concat(_," ").concat(s(u,"type"))}return T+=". Received type ".concat(typeof r)},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(f){return"The "+f+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(f){return"Cannot call "+f+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(f){return"Unknown encoding: "+f},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),o.exports.F=a},5382:(o,a,i)=>{"use strict";var s=Object.keys||function(g){var p=[];for(var A in g)p.push(A);return p};o.exports=b;var f=i(5412),u=i(6708);i(6698)(b,f);for(var r=s(u.prototype),_=0;_<r.length;_++){var d=r[_];b.prototype[d]||(b.prototype[d]=u.prototype[d])}function b(g){if(!(this instanceof b))return new b(g);f.call(this,g),u.call(this,g),this.allowHalfOpen=!0,g&&(g.readable===!1&&(this.readable=!1),g.writable===!1&&(this.writable=!1),g.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",T)))}function T(){this._writableState.ended||process.nextTick(w,this)}function w(g){g.end()}Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(b.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(b.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(b.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(g){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=g,this._writableState.destroyed=g)}})},3600:(o,a,i)=>{"use strict";o.exports=f;var s=i(4610);function f(u){if(!(this instanceof f))return new f(u);s.call(this,u)}i(6698)(f,s),f.prototype._transform=function(u,r,_){_(null,u)}},5412:(o,a,i)=>{"use strict";var s;o.exports=le,le.ReadableState=me,i(7007).EventEmitter;var f=function(Oe,$){return Oe.listeners($).length},u=i(345),r=i(8287).Buffer,_=(i.g!==void 0?i.g:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},d,b=i(9838);d=b&&b.debuglog?b.debuglog("stream"):function(){};var T,w,g,p=i(2726),A=i(5896),L=i(5291).getHighWaterMark,E=i(6048).F,N=E.ERR_INVALID_ARG_TYPE,F=E.ERR_STREAM_PUSH_AFTER_EOF,R=E.ERR_METHOD_NOT_IMPLEMENTED,j=E.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;i(6698)(le,u);var V=A.errorOrDestroy,Y=["error","close","destroy","pause","resume"];function me(Oe,$,de){s=s||i(5382),Oe=Oe||{},typeof de!="boolean"&&(de=$ instanceof s),this.objectMode=!!Oe.objectMode,de&&(this.objectMode=this.objectMode||!!Oe.readableObjectMode),this.highWaterMark=L(this,Oe,"readableHighWaterMark",de),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=Oe.emitClose!==!1,this.autoDestroy=!!Oe.autoDestroy,this.destroyed=!1,this.defaultEncoding=Oe.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Oe.encoding&&(T||(T=i(3141).I),this.decoder=new T(Oe.encoding),this.encoding=Oe.encoding)}function le(Oe){if(s=s||i(5382),!(this instanceof le))return new le(Oe);var $=this instanceof s;this._readableState=new me(Oe,this,$),this.readable=!0,Oe&&(typeof Oe.read=="function"&&(this._read=Oe.read),typeof Oe.destroy=="function"&&(this._destroy=Oe.destroy)),u.call(this)}function C(Oe,$,de,we,Qe){d("readableAddChunk",$);var ze,We=Oe._readableState;if($===null)We.reading=!1,function(et,Be){if(d("onEofChunk"),!Be.ended){if(Be.decoder){var Re=Be.decoder.end();Re&&Re.length&&(Be.buffer.push(Re),Be.length+=Be.objectMode?1:Re.length)}Be.ended=!0,Be.sync?I(et):(Be.needReadable=!1,Be.emittedReadable||(Be.emittedReadable=!0,S(et)))}}(Oe,We);else if(Qe||(ze=function(et,Be){var Re;$e=Be,r.isBuffer($e)||$e instanceof _||typeof Be=="string"||Be===void 0||et.objectMode||(Re=new N("chunk",["string","Buffer","Uint8Array"],Be));var $e;return Re}(We,$)),ze)V(Oe,ze);else if(We.objectMode||$&&$.length>0)if(typeof $=="string"||We.objectMode||Object.getPrototypeOf($)===r.prototype||($=function(et){return r.from(et)}($)),we)We.endEmitted?V(Oe,new j):q(Oe,We,$,!0);else if(We.ended)V(Oe,new F);else{if(We.destroyed)return!1;We.reading=!1,We.decoder&&!de?($=We.decoder.write($),We.objectMode||$.length!==0?q(Oe,We,$,!1):m(Oe,We)):q(Oe,We,$,!1)}else we||(We.reading=!1,m(Oe,We));return!We.ended&&(We.length<We.highWaterMark||We.length===0)}function q(Oe,$,de,we){$.flowing&&$.length===0&&!$.sync?($.awaitDrain=0,Oe.emit("data",de)):($.length+=$.objectMode?1:de.length,we?$.buffer.unshift(de):$.buffer.push(de),$.needReadable&&I(Oe)),m(Oe,$)}Object.defineProperty(le.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(Oe){this._readableState&&(this._readableState.destroyed=Oe)}}),le.prototype.destroy=A.destroy,le.prototype._undestroy=A.undestroy,le.prototype._destroy=function(Oe,$){$(Oe)},le.prototype.push=function(Oe,$){var de,we=this._readableState;return we.objectMode?de=!0:typeof Oe=="string"&&(($=$||we.defaultEncoding)!==we.encoding&&(Oe=r.from(Oe,$),$=""),de=!0),C(this,Oe,$,!1,de)},le.prototype.unshift=function(Oe){return C(this,Oe,null,!0,!1)},le.prototype.isPaused=function(){return this._readableState.flowing===!1},le.prototype.setEncoding=function(Oe){T||(T=i(3141).I);var $=new T(Oe);this._readableState.decoder=$,this._readableState.encoding=this._readableState.decoder.encoding;for(var de=this._readableState.buffer.head,we="";de!==null;)we+=$.write(de.data),de=de.next;return this._readableState.buffer.clear(),we!==""&&this._readableState.buffer.push(we),this._readableState.length=we.length,this};var X=1073741824;function ae(Oe,$){return Oe<=0||$.length===0&&$.ended?0:$.objectMode?1:Oe!=Oe?$.flowing&&$.length?$.buffer.head.data.length:$.length:(Oe>$.highWaterMark&&($.highWaterMark=function(de){return de>=X?de=X:(de--,de|=de>>>1,de|=de>>>2,de|=de>>>4,de|=de>>>8,de|=de>>>16,de++),de}(Oe)),Oe<=$.length?Oe:$.ended?$.length:($.needReadable=!0,0))}function I(Oe){var $=Oe._readableState;d("emitReadable",$.needReadable,$.emittedReadable),$.needReadable=!1,$.emittedReadable||(d("emitReadable",$.flowing),$.emittedReadable=!0,process.nextTick(S,Oe))}function S(Oe){var $=Oe._readableState;d("emitReadable_",$.destroyed,$.length,$.ended),$.destroyed||!$.length&&!$.ended||(Oe.emit("readable"),$.emittedReadable=!1),$.needReadable=!$.flowing&&!$.ended&&$.length<=$.highWaterMark,K(Oe)}function m(Oe,$){$.readingMore||($.readingMore=!0,process.nextTick(P,Oe,$))}function P(Oe,$){for(;!$.reading&&!$.ended&&($.length<$.highWaterMark||$.flowing&&$.length===0);){var de=$.length;if(d("maybeReadMore read 0"),Oe.read(0),de===$.length)break}$.readingMore=!1}function l(Oe){var $=Oe._readableState;$.readableListening=Oe.listenerCount("readable")>0,$.resumeScheduled&&!$.paused?$.flowing=!0:Oe.listenerCount("data")>0&&Oe.resume()}function x(Oe){d("readable nexttick read 0"),Oe.read(0)}function W(Oe,$){d("resume",$.reading),$.reading||Oe.read(0),$.resumeScheduled=!1,Oe.emit("resume"),K(Oe),$.flowing&&!$.reading&&Oe.read(0)}function K(Oe){var $=Oe._readableState;for(d("flow",$.flowing);$.flowing&&Oe.read()!==null;);}function re(Oe,$){return $.length===0?null:($.objectMode?de=$.buffer.shift():!Oe||Oe>=$.length?(de=$.decoder?$.buffer.join(""):$.buffer.length===1?$.buffer.first():$.buffer.concat($.length),$.buffer.clear()):de=$.buffer.consume(Oe,$.decoder),de);var de}function oe(Oe){var $=Oe._readableState;d("endReadable",$.endEmitted),$.endEmitted||($.ended=!0,process.nextTick(Ee,$,Oe))}function Ee(Oe,$){if(d("endReadableNT",Oe.endEmitted,Oe.length),!Oe.endEmitted&&Oe.length===0&&(Oe.endEmitted=!0,$.readable=!1,$.emit("end"),Oe.autoDestroy)){var de=$._writableState;(!de||de.autoDestroy&&de.finished)&&$.destroy()}}function Fe(Oe,$){for(var de=0,we=Oe.length;de<we;de++)if(Oe[de]===$)return de;return-1}le.prototype.read=function(Oe){d("read",Oe),Oe=parseInt(Oe,10);var $=this._readableState,de=Oe;if(Oe!==0&&($.emittedReadable=!1),Oe===0&&$.needReadable&&(($.highWaterMark!==0?$.length>=$.highWaterMark:$.length>0)||$.ended))return d("read: emitReadable",$.length,$.ended),$.length===0&&$.ended?oe(this):I(this),null;if((Oe=ae(Oe,$))===0&&$.ended)return $.length===0&&oe(this),null;var we,Qe=$.needReadable;return d("need readable",Qe),($.length===0||$.length-Oe<$.highWaterMark)&&d("length less than watermark",Qe=!0),$.ended||$.reading?d("reading or ended",Qe=!1):Qe&&(d("do read"),$.reading=!0,$.sync=!0,$.length===0&&($.needReadable=!0),this._read($.highWaterMark),$.sync=!1,$.reading||(Oe=ae(de,$))),(we=Oe>0?re(Oe,$):null)===null?($.needReadable=$.length<=$.highWaterMark,Oe=0):($.length-=Oe,$.awaitDrain=0),$.length===0&&($.ended||($.needReadable=!0),de!==Oe&&$.ended&&oe(this)),we!==null&&this.emit("data",we),we},le.prototype._read=function(Oe){V(this,new R("_read()"))},le.prototype.pipe=function(Oe,$){var de=this,we=this._readableState;switch(we.pipesCount){case 0:we.pipes=Oe;break;case 1:we.pipes=[we.pipes,Oe];break;default:we.pipes.push(Oe)}we.pipesCount+=1,d("pipe count=%d opts=%j",we.pipesCount,$);var Qe=(!$||$.end!==!1)&&Oe!==process.stdout&&Oe!==process.stderr?We:c;function ze(y,v){d("onunpipe"),y===de&&v&&v.hasUnpiped===!1&&(v.hasUnpiped=!0,d("cleanup"),Oe.removeListener("close",ve),Oe.removeListener("finish",ue),Oe.removeListener("drain",et),Oe.removeListener("error",$e),Oe.removeListener("unpipe",ze),de.removeListener("end",We),de.removeListener("end",c),de.removeListener("data",Re),Be=!0,!we.awaitDrain||Oe._writableState&&!Oe._writableState.needDrain||et())}function We(){d("onend"),Oe.end()}we.endEmitted?process.nextTick(Qe):de.once("end",Qe),Oe.on("unpipe",ze);var et=function(y){return function(){var v=y._readableState;d("pipeOnDrain",v.awaitDrain),v.awaitDrain&&v.awaitDrain--,v.awaitDrain===0&&f(y,"data")&&(v.flowing=!0,K(y))}}(de);Oe.on("drain",et);var Be=!1;function Re(y){d("ondata");var v=Oe.write(y);d("dest.write",v),v===!1&&((we.pipesCount===1&&we.pipes===Oe||we.pipesCount>1&&Fe(we.pipes,Oe)!==-1)&&!Be&&(d("false write response, pause",we.awaitDrain),we.awaitDrain++),de.pause())}function $e(y){d("onerror",y),c(),Oe.removeListener("error",$e),f(Oe,"error")===0&&V(Oe,y)}function ve(){Oe.removeListener("finish",ue),c()}function ue(){d("onfinish"),Oe.removeListener("close",ve),c()}function c(){d("unpipe"),de.unpipe(Oe)}return de.on("data",Re),function(y,v,B){if(typeof y.prependListener=="function")return y.prependListener(v,B);y._events&&y._events[v]?Array.isArray(y._events[v])?y._events[v].unshift(B):y._events[v]=[B,y._events[v]]:y.on(v,B)}(Oe,"error",$e),Oe.once("close",ve),Oe.once("finish",ue),Oe.emit("pipe",de),we.flowing||(d("pipe resume"),de.resume()),Oe},le.prototype.unpipe=function(Oe){var $=this._readableState,de={hasUnpiped:!1};if($.pipesCount===0)return this;if($.pipesCount===1)return Oe&&Oe!==$.pipes||(Oe||(Oe=$.pipes),$.pipes=null,$.pipesCount=0,$.flowing=!1,Oe&&Oe.emit("unpipe",this,de)),this;if(!Oe){var we=$.pipes,Qe=$.pipesCount;$.pipes=null,$.pipesCount=0,$.flowing=!1;for(var ze=0;ze<Qe;ze++)we[ze].emit("unpipe",this,{hasUnpiped:!1});return this}var We=Fe($.pipes,Oe);return We===-1||($.pipes.splice(We,1),$.pipesCount-=1,$.pipesCount===1&&($.pipes=$.pipes[0]),Oe.emit("unpipe",this,de)),this},le.prototype.on=function(Oe,$){var de=u.prototype.on.call(this,Oe,$),we=this._readableState;return Oe==="data"?(we.readableListening=this.listenerCount("readable")>0,we.flowing!==!1&&this.resume()):Oe==="readable"&&(we.endEmitted||we.readableListening||(we.readableListening=we.needReadable=!0,we.flowing=!1,we.emittedReadable=!1,d("on readable",we.length,we.reading),we.length?I(this):we.reading||process.nextTick(x,this))),de},le.prototype.addListener=le.prototype.on,le.prototype.removeListener=function(Oe,$){var de=u.prototype.removeListener.call(this,Oe,$);return Oe==="readable"&&process.nextTick(l,this),de},le.prototype.removeAllListeners=function(Oe){var $=u.prototype.removeAllListeners.apply(this,arguments);return Oe!=="readable"&&Oe!==void 0||process.nextTick(l,this),$},le.prototype.resume=function(){var Oe=this._readableState;return Oe.flowing||(d("resume"),Oe.flowing=!Oe.readableListening,function($,de){de.resumeScheduled||(de.resumeScheduled=!0,process.nextTick(W,$,de))}(this,Oe)),Oe.paused=!1,this},le.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},le.prototype.wrap=function(Oe){var $=this,de=this._readableState,we=!1;for(var Qe in Oe.on("end",function(){if(d("wrapped end"),de.decoder&&!de.ended){var We=de.decoder.end();We&&We.length&&$.push(We)}$.push(null)}),Oe.on("data",function(We){d("wrapped data"),de.decoder&&(We=de.decoder.write(We)),de.objectMode&&We==null||(de.objectMode||We&&We.length)&&($.push(We)||(we=!0,Oe.pause()))}),Oe)this[Qe]===void 0&&typeof Oe[Qe]=="function"&&(this[Qe]=function(We){return function(){return Oe[We].apply(Oe,arguments)}}(Qe));for(var ze=0;ze<Y.length;ze++)Oe.on(Y[ze],this.emit.bind(this,Y[ze]));return this._read=function(We){d("wrapped _read",We),we&&(we=!1,Oe.resume())},this},typeof Symbol=="function"&&(le.prototype[Symbol.asyncIterator]=function(){return w===void 0&&(w=i(2955)),w(this)}),Object.defineProperty(le.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(le.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(le.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Oe){this._readableState&&(this._readableState.flowing=Oe)}}),le._fromList=re,Object.defineProperty(le.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(le.from=function(Oe,$){return g===void 0&&(g=i(5157)),g(le,Oe,$)})},4610:(o,a,i)=>{"use strict";o.exports=T;var s=i(6048).F,f=s.ERR_METHOD_NOT_IMPLEMENTED,u=s.ERR_MULTIPLE_CALLBACK,r=s.ERR_TRANSFORM_ALREADY_TRANSFORMING,_=s.ERR_TRANSFORM_WITH_LENGTH_0,d=i(5382);function b(p,A){var L=this._transformState;L.transforming=!1;var E=L.writecb;if(E===null)return this.emit("error",new u);L.writechunk=null,L.writecb=null,A!=null&&this.push(A),E(p);var N=this._readableState;N.reading=!1,(N.needReadable||N.length<N.highWaterMark)&&this._read(N.highWaterMark)}function T(p){if(!(this instanceof T))return new T(p);d.call(this,p),this._transformState={afterTransform:b.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,p&&(typeof p.transform=="function"&&(this._transform=p.transform),typeof p.flush=="function"&&(this._flush=p.flush)),this.on("prefinish",w)}function w(){var p=this;typeof this._flush!="function"||this._readableState.destroyed?g(this,null,null):this._flush(function(A,L){g(p,A,L)})}function g(p,A,L){if(A)return p.emit("error",A);if(L!=null&&p.push(L),p._writableState.length)throw new _;if(p._transformState.transforming)throw new r;return p.push(null)}i(6698)(T,d),T.prototype.push=function(p,A){return this._transformState.needTransform=!1,d.prototype.push.call(this,p,A)},T.prototype._transform=function(p,A,L){L(new f("_transform()"))},T.prototype._write=function(p,A,L){var E=this._transformState;if(E.writecb=L,E.writechunk=p,E.writeencoding=A,!E.transforming){var N=this._readableState;(E.needTransform||N.needReadable||N.length<N.highWaterMark)&&this._read(N.highWaterMark)}},T.prototype._read=function(p){var A=this._transformState;A.writechunk===null||A.transforming?A.needTransform=!0:(A.transforming=!0,this._transform(A.writechunk,A.writeencoding,A.afterTransform))},T.prototype._destroy=function(p,A){d.prototype._destroy.call(this,p,function(L){A(L)})}},6708:(o,a,i)=>{"use strict";function s(m){var P=this;this.next=null,this.entry=null,this.finish=function(){(function(l,x,W){var K=l.entry;for(l.entry=null;K;){var re=K.callback;x.pendingcb--,re(W),K=K.next}x.corkedRequestsFree.next=l})(P,m)}}var f;o.exports=le,le.WritableState=me;var u={deprecate:i(4643)},r=i(345),_=i(8287).Buffer,d=(i.g!==void 0?i.g:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},b,T=i(5896),w=i(5291).getHighWaterMark,g=i(6048).F,p=g.ERR_INVALID_ARG_TYPE,A=g.ERR_METHOD_NOT_IMPLEMENTED,L=g.ERR_MULTIPLE_CALLBACK,E=g.ERR_STREAM_CANNOT_PIPE,N=g.ERR_STREAM_DESTROYED,F=g.ERR_STREAM_NULL_VALUES,R=g.ERR_STREAM_WRITE_AFTER_END,j=g.ERR_UNKNOWN_ENCODING,V=T.errorOrDestroy;function Y(){}function me(m,P,l){f=f||i(5382),m=m||{},typeof l!="boolean"&&(l=P instanceof f),this.objectMode=!!m.objectMode,l&&(this.objectMode=this.objectMode||!!m.writableObjectMode),this.highWaterMark=w(this,m,"writableHighWaterMark",l),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var x=m.decodeStrings===!1;this.decodeStrings=!x,this.defaultEncoding=m.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(W){(function(K,re){var oe=K._writableState,Ee=oe.sync,Fe=oe.writecb;if(typeof Fe!="function")throw new L;if(function($){$.writing=!1,$.writecb=null,$.length-=$.writelen,$.writelen=0}(oe),re)(function($,de,we,Qe,ze){--de.pendingcb,we?(process.nextTick(ze,Qe),process.nextTick(S,$,de),$._writableState.errorEmitted=!0,V($,Qe)):(ze(Qe),$._writableState.errorEmitted=!0,V($,Qe),S($,de))})(K,oe,Ee,re,Fe);else{var Oe=ae(oe)||K.destroyed;Oe||oe.corked||oe.bufferProcessing||!oe.bufferedRequest||X(K,oe),Ee?process.nextTick(q,K,oe,Oe,Fe):q(K,oe,Oe,Fe)}})(P,W)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=m.emitClose!==!1,this.autoDestroy=!!m.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function le(m){var P=this instanceof(f=f||i(5382));if(!P&&!b.call(le,this))return new le(m);this._writableState=new me(m,this,P),this.writable=!0,m&&(typeof m.write=="function"&&(this._write=m.write),typeof m.writev=="function"&&(this._writev=m.writev),typeof m.destroy=="function"&&(this._destroy=m.destroy),typeof m.final=="function"&&(this._final=m.final)),r.call(this)}function C(m,P,l,x,W,K,re){P.writelen=x,P.writecb=re,P.writing=!0,P.sync=!0,P.destroyed?P.onwrite(new N("write")):l?m._writev(W,P.onwrite):m._write(W,K,P.onwrite),P.sync=!1}function q(m,P,l,x){l||function(W,K){K.length===0&&K.needDrain&&(K.needDrain=!1,W.emit("drain"))}(m,P),P.pendingcb--,x(),S(m,P)}function X(m,P){P.bufferProcessing=!0;var l=P.bufferedRequest;if(m._writev&&l&&l.next){var x=P.bufferedRequestCount,W=new Array(x),K=P.corkedRequestsFree;K.entry=l;for(var re=0,oe=!0;l;)W[re]=l,l.isBuf||(oe=!1),l=l.next,re+=1;W.allBuffers=oe,C(m,P,!0,P.length,W,"",K.finish),P.pendingcb++,P.lastBufferedRequest=null,K.next?(P.corkedRequestsFree=K.next,K.next=null):P.corkedRequestsFree=new s(P),P.bufferedRequestCount=0}else{for(;l;){var Ee=l.chunk,Fe=l.encoding,Oe=l.callback;if(C(m,P,!1,P.objectMode?1:Ee.length,Ee,Fe,Oe),l=l.next,P.bufferedRequestCount--,P.writing)break}l===null&&(P.lastBufferedRequest=null)}P.bufferedRequest=l,P.bufferProcessing=!1}function ae(m){return m.ending&&m.length===0&&m.bufferedRequest===null&&!m.finished&&!m.writing}function I(m,P){m._final(function(l){P.pendingcb--,l&&V(m,l),P.prefinished=!0,m.emit("prefinish"),S(m,P)})}function S(m,P){var l=ae(P);if(l&&(function(W,K){K.prefinished||K.finalCalled||(typeof W._final!="function"||K.destroyed?(K.prefinished=!0,W.emit("prefinish")):(K.pendingcb++,K.finalCalled=!0,process.nextTick(I,W,K)))}(m,P),P.pendingcb===0&&(P.finished=!0,m.emit("finish"),P.autoDestroy))){var x=m._readableState;(!x||x.autoDestroy&&x.endEmitted)&&m.destroy()}return l}i(6698)(le,r),me.prototype.getBuffer=function(){for(var m=this.bufferedRequest,P=[];m;)P.push(m),m=m.next;return P},function(){try{Object.defineProperty(me.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(b=Function.prototype[Symbol.hasInstance],Object.defineProperty(le,Symbol.hasInstance,{value:function(m){return!!b.call(this,m)||this===le&&m&&m._writableState instanceof me}})):b=function(m){return m instanceof this},le.prototype.pipe=function(){V(this,new E)},le.prototype.write=function(m,P,l){var x,W=this._writableState,K=!1,re=!W.objectMode&&(x=m,_.isBuffer(x)||x instanceof d);return re&&!_.isBuffer(m)&&(m=function(oe){return _.from(oe)}(m)),typeof P=="function"&&(l=P,P=null),re?P="buffer":P||(P=W.defaultEncoding),typeof l!="function"&&(l=Y),W.ending?function(oe,Ee){var Fe=new R;V(oe,Fe),process.nextTick(Ee,Fe)}(this,l):(re||function(oe,Ee,Fe,Oe){var $;return Fe===null?$=new F:typeof Fe=="string"||Ee.objectMode||($=new p("chunk",["string","Buffer"],Fe)),!$||(V(oe,$),process.nextTick(Oe,$),!1)}(this,W,m,l))&&(W.pendingcb++,K=function(oe,Ee,Fe,Oe,$,de){if(!Fe){var we=function(et,Be,Re){return et.objectMode||et.decodeStrings===!1||typeof Be!="string"||(Be=_.from(Be,Re)),Be}(Ee,Oe,$);Oe!==we&&(Fe=!0,$="buffer",Oe=we)}var Qe=Ee.objectMode?1:Oe.length;Ee.length+=Qe;var ze=Ee.length<Ee.highWaterMark;if(ze||(Ee.needDrain=!0),Ee.writing||Ee.corked){var We=Ee.lastBufferedRequest;Ee.lastBufferedRequest={chunk:Oe,encoding:$,isBuf:Fe,callback:de,next:null},We?We.next=Ee.lastBufferedRequest:Ee.bufferedRequest=Ee.lastBufferedRequest,Ee.bufferedRequestCount+=1}else C(oe,Ee,!1,Qe,Oe,$,de);return ze}(this,W,re,m,P,l)),K},le.prototype.cork=function(){this._writableState.corked++},le.prototype.uncork=function(){var m=this._writableState;m.corked&&(m.corked--,m.writing||m.corked||m.bufferProcessing||!m.bufferedRequest||X(this,m))},le.prototype.setDefaultEncoding=function(m){if(typeof m=="string"&&(m=m.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((m+"").toLowerCase())>-1))throw new j(m);return this._writableState.defaultEncoding=m,this},Object.defineProperty(le.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(le.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),le.prototype._write=function(m,P,l){l(new A("_write()"))},le.prototype._writev=null,le.prototype.end=function(m,P,l){var x=this._writableState;return typeof m=="function"?(l=m,m=null,P=null):typeof P=="function"&&(l=P,P=null),m!=null&&this.write(m,P),x.corked&&(x.corked=1,this.uncork()),x.ending||function(W,K,re){K.ending=!0,S(W,K),re&&(K.finished?process.nextTick(re):W.once("finish",re)),K.ended=!0,W.writable=!1}(this,x,l),this},Object.defineProperty(le.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(le.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(m){this._writableState&&(this._writableState.destroyed=m)}}),le.prototype.destroy=T.destroy,le.prototype._undestroy=T.undestroy,le.prototype._destroy=function(m,P){P(m)}},2955:(o,a,i)=>{"use strict";var s;function f(F,R,j){return(R=function(V){var Y=function(me,le){if(typeof me!="object"||me===null)return me;var C=me[Symbol.toPrimitive];if(C!==void 0){var q=C.call(me,le||"default");if(typeof q!="object")return q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(le==="string"?String:Number)(me)}(V,"string");return typeof Y=="symbol"?Y:String(Y)}(R))in F?Object.defineProperty(F,R,{value:j,enumerable:!0,configurable:!0,writable:!0}):F[R]=j,F}var u=i(6238),r=Symbol("lastResolve"),_=Symbol("lastReject"),d=Symbol("error"),b=Symbol("ended"),T=Symbol("lastPromise"),w=Symbol("handlePromise"),g=Symbol("stream");function p(F,R){return{value:F,done:R}}function A(F){var R=F[r];if(R!==null){var j=F[g].read();j!==null&&(F[T]=null,F[r]=null,F[_]=null,R(p(j,!1)))}}function L(F){process.nextTick(A,F)}var E=Object.getPrototypeOf(function(){}),N=Object.setPrototypeOf((f(s={get stream(){return this[g]},next:function(){var F=this,R=this[d];if(R!==null)return Promise.reject(R);if(this[b])return Promise.resolve(p(void 0,!0));if(this[g].destroyed)return new Promise(function(me,le){process.nextTick(function(){F[d]?le(F[d]):me(p(void 0,!0))})});var j,V=this[T];if(V)j=new Promise(function(me,le){return function(C,q){me.then(function(){le[b]?C(p(void 0,!0)):le[w](C,q)},q)}}(V,this));else{var Y=this[g].read();if(Y!==null)return Promise.resolve(p(Y,!1));j=new Promise(this[w])}return this[T]=j,j}},Symbol.asyncIterator,function(){return this}),f(s,"return",function(){var F=this;return new Promise(function(R,j){F[g].destroy(null,function(V){V?j(V):R(p(void 0,!0))})})}),s),E);o.exports=function(F){var R,j=Object.create(N,(f(R={},g,{value:F,writable:!0}),f(R,r,{value:null,writable:!0}),f(R,_,{value:null,writable:!0}),f(R,d,{value:null,writable:!0}),f(R,b,{value:F._readableState.endEmitted,writable:!0}),f(R,w,{value:function(V,Y){var me=j[g].read();me?(j[T]=null,j[r]=null,j[_]=null,V(p(me,!1))):(j[r]=V,j[_]=Y)},writable:!0}),R));return j[T]=null,u(F,function(V){if(V&&V.code!=="ERR_STREAM_PREMATURE_CLOSE"){var Y=j[_];return Y!==null&&(j[T]=null,j[r]=null,j[_]=null,Y(V)),void(j[d]=V)}var me=j[r];me!==null&&(j[T]=null,j[r]=null,j[_]=null,me(p(void 0,!0))),j[b]=!0}),F.on("readable",L.bind(null,j)),j}},2726:(o,a,i)=>{"use strict";function s(w,g){var p=Object.keys(w);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(w);g&&(A=A.filter(function(L){return Object.getOwnPropertyDescriptor(w,L).enumerable})),p.push.apply(p,A)}return p}function f(w){for(var g=1;g<arguments.length;g++){var p=arguments[g]!=null?arguments[g]:{};g%2?s(Object(p),!0).forEach(function(A){u(w,A,p[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(p)):s(Object(p)).forEach(function(A){Object.defineProperty(w,A,Object.getOwnPropertyDescriptor(p,A))})}return w}function u(w,g,p){return(g=_(g))in w?Object.defineProperty(w,g,{value:p,enumerable:!0,configurable:!0,writable:!0}):w[g]=p,w}function r(w,g){for(var p=0;p<g.length;p++){var A=g[p];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(w,_(A.key),A)}}function _(w){var g=function(p,A){if(typeof p!="object"||p===null)return p;var L=p[Symbol.toPrimitive];if(L!==void 0){var E=L.call(p,A||"default");if(typeof E!="object")return E;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(p)}(w,"string");return typeof g=="symbol"?g:String(g)}var d=i(8287).Buffer,b=i(5340).inspect,T=b&&b.custom||"inspect";o.exports=function(){function w(){(function(L,E){if(!(L instanceof E))throw new TypeError("Cannot call a class as a function")})(this,w),this.head=null,this.tail=null,this.length=0}var g,p,A;return g=w,(p=[{key:"push",value:function(L){var E={data:L,next:null};this.length>0?this.tail.next=E:this.head=E,this.tail=E,++this.length}},{key:"unshift",value:function(L){var E={data:L,next:this.head};this.length===0&&(this.tail=E),this.head=E,++this.length}},{key:"shift",value:function(){if(this.length!==0){var L=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,L}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(L){if(this.length===0)return"";for(var E=this.head,N=""+E.data;E=E.next;)N+=L+E.data;return N}},{key:"concat",value:function(L){if(this.length===0)return d.alloc(0);for(var E,N,F,R=d.allocUnsafe(L>>>0),j=this.head,V=0;j;)E=j.data,N=R,F=V,d.prototype.copy.call(E,N,F),V+=j.data.length,j=j.next;return R}},{key:"consume",value:function(L,E){var N;return L<this.head.data.length?(N=this.head.data.slice(0,L),this.head.data=this.head.data.slice(L)):N=L===this.head.data.length?this.shift():E?this._getString(L):this._getBuffer(L),N}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(L){var E=this.head,N=1,F=E.data;for(L-=F.length;E=E.next;){var R=E.data,j=L>R.length?R.length:L;if(j===R.length?F+=R:F+=R.slice(0,L),(L-=j)==0){j===R.length?(++N,E.next?this.head=E.next:this.head=this.tail=null):(this.head=E,E.data=R.slice(j));break}++N}return this.length-=N,F}},{key:"_getBuffer",value:function(L){var E=d.allocUnsafe(L),N=this.head,F=1;for(N.data.copy(E),L-=N.data.length;N=N.next;){var R=N.data,j=L>R.length?R.length:L;if(R.copy(E,E.length-L,0,j),(L-=j)==0){j===R.length?(++F,N.next?this.head=N.next:this.head=this.tail=null):(this.head=N,N.data=R.slice(j));break}++F}return this.length-=F,E}},{key:T,value:function(L,E){return b(this,f(f({},E),{},{depth:0,customInspect:!1}))}}])&&r(g.prototype,p),A&&r(g,A),Object.defineProperty(g,"prototype",{writable:!1}),w}()},5896:o=>{"use strict";function a(f,u){s(f,u),i(f)}function i(f){f._writableState&&!f._writableState.emitClose||f._readableState&&!f._readableState.emitClose||f.emit("close")}function s(f,u){f.emit("error",u)}o.exports={destroy:function(f,u){var r=this,_=this._readableState&&this._readableState.destroyed,d=this._writableState&&this._writableState.destroyed;return _||d?(u?u(f):f&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(s,this,f)):process.nextTick(s,this,f)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(f||null,function(b){!u&&b?r._writableState?r._writableState.errorEmitted?process.nextTick(i,r):(r._writableState.errorEmitted=!0,process.nextTick(a,r,b)):process.nextTick(a,r,b):u?(process.nextTick(i,r),u(b)):process.nextTick(i,r)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(f,u){var r=f._readableState,_=f._writableState;r&&r.autoDestroy||_&&_.autoDestroy?f.destroy(u):f.emit("error",u)}}},6238:(o,a,i)=>{"use strict";var s=i(6048).F.ERR_STREAM_PREMATURE_CLOSE;function f(){}o.exports=function u(r,_,d){if(typeof _=="function")return u(r,null,_);_||(_={}),d=function(R){var j=!1;return function(){if(!j){j=!0;for(var V=arguments.length,Y=new Array(V),me=0;me<V;me++)Y[me]=arguments[me];R.apply(this,Y)}}}(d||f);var b=_.readable||_.readable!==!1&&r.readable,T=_.writable||_.writable!==!1&&r.writable,w=function(){r.writable||p()},g=r._writableState&&r._writableState.finished,p=function(){T=!1,g=!0,b||d.call(r)},A=r._readableState&&r._readableState.endEmitted,L=function(){b=!1,A=!0,T||d.call(r)},E=function(R){d.call(r,R)},N=function(){var R;return b&&!A?(r._readableState&&r._readableState.ended||(R=new s),d.call(r,R)):T&&!g?(r._writableState&&r._writableState.ended||(R=new s),d.call(r,R)):void 0},F=function(){r.req.on("finish",p)};return function(R){return R.setHeader&&typeof R.abort=="function"}(r)?(r.on("complete",p),r.on("abort",N),r.req?F():r.on("request",F)):T&&!r._writableState&&(r.on("end",w),r.on("close",w)),r.on("end",L),r.on("finish",p),_.error!==!1&&r.on("error",E),r.on("close",N),function(){r.removeListener("complete",p),r.removeListener("abort",N),r.removeListener("request",F),r.req&&r.req.removeListener("finish",p),r.removeListener("end",w),r.removeListener("close",w),r.removeListener("finish",p),r.removeListener("end",L),r.removeListener("error",E),r.removeListener("close",N)}}},5157:o=>{o.exports=function(){throw new Error("Readable.from is not available in the browser")}},7758:(o,a,i)=>{"use strict";var s,f=i(6048).F,u=f.ERR_MISSING_ARGS,r=f.ERR_STREAM_DESTROYED;function _(T){if(T)throw T}function d(T){T()}function b(T,w){return T.pipe(w)}o.exports=function(){for(var T=arguments.length,w=new Array(T),g=0;g<T;g++)w[g]=arguments[g];var p,A=function(E){return E.length?typeof E[E.length-1]!="function"?_:E.pop():_}(w);if(Array.isArray(w[0])&&(w=w[0]),w.length<2)throw new u("streams");var L=w.map(function(E,N){var F=N<w.length-1;return function(R,j,V,Y){Y=function(C){var q=!1;return function(){q||(q=!0,C.apply(void 0,arguments))}}(Y);var me=!1;R.on("close",function(){me=!0}),s===void 0&&(s=i(6238)),s(R,{readable:j,writable:V},function(C){if(C)return Y(C);me=!0,Y()});var le=!1;return function(C){if(!me&&!le)return le=!0,function(q){return q.setHeader&&typeof q.abort=="function"}(R)?R.abort():typeof R.destroy=="function"?R.destroy():void Y(C||new r("pipe"))}}(E,F,N>0,function(R){p||(p=R),R&&L.forEach(d),F||(L.forEach(d),A(p))})});return w.reduce(b)}},5291:(o,a,i)=>{"use strict";var s=i(6048).F.ERR_INVALID_OPT_VALUE;o.exports={getHighWaterMark:function(f,u,r,_){var d=function(b,T,w){return b.highWaterMark!=null?b.highWaterMark:T?b[w]:null}(u,_,r);if(d!=null){if(!isFinite(d)||Math.floor(d)!==d||d<0)throw new s(_?r:"highWaterMark",d);return Math.floor(d)}return f.objectMode?16:16384}}},345:(o,a,i)=>{o.exports=i(7007).EventEmitter},8399:(o,a,i)=>{(a=o.exports=i(5412)).Stream=a,a.Readable=a,a.Writable=i(6708),a.Duplex=i(5382),a.Transform=i(4610),a.PassThrough=i(3600),a.finished=i(6238),a.pipeline=i(7758)},2861:(o,a,i)=>{var s=i(8287),f=s.Buffer;function u(_,d){for(var b in _)d[b]=_[b]}function r(_,d,b){return f(_,d,b)}f.from&&f.alloc&&f.allocUnsafe&&f.allocUnsafeSlow?o.exports=s:(u(s,a),a.Buffer=r),r.prototype=Object.create(f.prototype),u(f,r),r.from=function(_,d,b){if(typeof _=="number")throw new TypeError("Argument must not be a number");return f(_,d,b)},r.alloc=function(_,d,b){if(typeof _!="number")throw new TypeError("Argument must be a number");var T=f(_);return d!==void 0?typeof b=="string"?T.fill(d,b):T.fill(d):T.fill(0),T},r.allocUnsafe=function(_){if(typeof _!="number")throw new TypeError("Argument must be a number");return f(_)},r.allocUnsafeSlow=function(_){if(typeof _!="number")throw new TypeError("Argument must be a number");return s.SlowBuffer(_)}},6897:(o,a,i)=>{"use strict";var s=i(453),f=i(41),u=i(592)(),r=i(5795),_=i(9675),d=s("%Math.floor%");o.exports=function(b,T){if(typeof b!="function")throw new _("`fn` is not a function");if(typeof T!="number"||T<0||T>4294967295||d(T)!==T)throw new _("`length` must be a positive 32-bit integer");var w=arguments.length>2&&!!arguments[2],g=!0,p=!0;if("length"in b&&r){var A=r(b,"length");A&&!A.configurable&&(g=!1),A&&!A.writable&&(p=!1)}return(g||p||!w)&&(u?f(b,"length",T,!0,!0):f(b,"length",T)),b}},392:(o,a,i)=>{var s=i(2861).Buffer;function f(u,r){this._block=s.alloc(u),this._finalSize=r,this._blockSize=u,this._len=0}f.prototype.update=function(u,r){typeof u=="string"&&(r=r||"utf8",u=s.from(u,r));for(var _=this._block,d=this._blockSize,b=u.length,T=this._len,w=0;w<b;){for(var g=T%d,p=Math.min(b-w,d-g),A=0;A<p;A++)_[g+A]=u[w+A];w+=p,(T+=p)%d==0&&this._update(_)}return this._len+=b,this},f.prototype.digest=function(u){var r=this._len%this._blockSize;this._block[r]=128,this._block.fill(0,r+1),r>=this._finalSize&&(this._update(this._block),this._block.fill(0));var _=8*this._len;if(_<=4294967295)this._block.writeUInt32BE(_,this._blockSize-4);else{var d=(4294967295&_)>>>0,b=(_-d)/4294967296;this._block.writeUInt32BE(b,this._blockSize-8),this._block.writeUInt32BE(d,this._blockSize-4)}this._update(this._block);var T=this._hash();return u?T.toString(u):T},f.prototype._update=function(){throw new Error("_update must be implemented by subclass")},o.exports=f},2802:(o,a,i)=>{var s=o.exports=function(f){f=f.toLowerCase();var u=s[f];if(!u)throw new Error(f+" is not supported (we accept pull requests)");return new u};s.sha=i(7816),s.sha1=i(3737),s.sha224=i(6710),s.sha256=i(4107),s.sha384=i(2827),s.sha512=i(2890)},7816:(o,a,i)=>{var s=i(6698),f=i(392),u=i(2861).Buffer,r=[1518500249,1859775393,-1894007588,-899497514],_=new Array(80);function d(){this.init(),this._w=_,f.call(this,64,56)}function b(w){return w<<30|w>>>2}function T(w,g,p,A){return w===0?g&p|~g&A:w===2?g&p|g&A|p&A:g^p^A}s(d,f),d.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},d.prototype._update=function(w){for(var g,p=this._w,A=0|this._a,L=0|this._b,E=0|this._c,N=0|this._d,F=0|this._e,R=0;R<16;++R)p[R]=w.readInt32BE(4*R);for(;R<80;++R)p[R]=p[R-3]^p[R-8]^p[R-14]^p[R-16];for(var j=0;j<80;++j){var V=~~(j/20),Y=0|((g=A)<<5|g>>>27)+T(V,L,E,N)+F+p[j]+r[V];F=N,N=E,E=b(L),L=A,A=Y}this._a=A+this._a|0,this._b=L+this._b|0,this._c=E+this._c|0,this._d=N+this._d|0,this._e=F+this._e|0},d.prototype._hash=function(){var w=u.allocUnsafe(20);return w.writeInt32BE(0|this._a,0),w.writeInt32BE(0|this._b,4),w.writeInt32BE(0|this._c,8),w.writeInt32BE(0|this._d,12),w.writeInt32BE(0|this._e,16),w},o.exports=d},3737:(o,a,i)=>{var s=i(6698),f=i(392),u=i(2861).Buffer,r=[1518500249,1859775393,-1894007588,-899497514],_=new Array(80);function d(){this.init(),this._w=_,f.call(this,64,56)}function b(g){return g<<5|g>>>27}function T(g){return g<<30|g>>>2}function w(g,p,A,L){return g===0?p&A|~p&L:g===2?p&A|p&L|A&L:p^A^L}s(d,f),d.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},d.prototype._update=function(g){for(var p,A=this._w,L=0|this._a,E=0|this._b,N=0|this._c,F=0|this._d,R=0|this._e,j=0;j<16;++j)A[j]=g.readInt32BE(4*j);for(;j<80;++j)A[j]=(p=A[j-3]^A[j-8]^A[j-14]^A[j-16])<<1|p>>>31;for(var V=0;V<80;++V){var Y=~~(V/20),me=b(L)+w(Y,E,N,F)+R+A[V]+r[Y]|0;R=F,F=N,N=T(E),E=L,L=me}this._a=L+this._a|0,this._b=E+this._b|0,this._c=N+this._c|0,this._d=F+this._d|0,this._e=R+this._e|0},d.prototype._hash=function(){var g=u.allocUnsafe(20);return g.writeInt32BE(0|this._a,0),g.writeInt32BE(0|this._b,4),g.writeInt32BE(0|this._c,8),g.writeInt32BE(0|this._d,12),g.writeInt32BE(0|this._e,16),g},o.exports=d},6710:(o,a,i)=>{var s=i(6698),f=i(4107),u=i(392),r=i(2861).Buffer,_=new Array(64);function d(){this.init(),this._w=_,u.call(this,64,56)}s(d,f),d.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},d.prototype._hash=function(){var b=r.allocUnsafe(28);return b.writeInt32BE(this._a,0),b.writeInt32BE(this._b,4),b.writeInt32BE(this._c,8),b.writeInt32BE(this._d,12),b.writeInt32BE(this._e,16),b.writeInt32BE(this._f,20),b.writeInt32BE(this._g,24),b},o.exports=d},4107:(o,a,i)=>{var s=i(6698),f=i(392),u=i(2861).Buffer,r=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],_=new Array(64);function d(){this.init(),this._w=_,f.call(this,64,56)}function b(A,L,E){return E^A&(L^E)}function T(A,L,E){return A&L|E&(A|L)}function w(A){return(A>>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10)}function g(A){return(A>>>6|A<<26)^(A>>>11|A<<21)^(A>>>25|A<<7)}function p(A){return(A>>>7|A<<25)^(A>>>18|A<<14)^A>>>3}s(d,f),d.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},d.prototype._update=function(A){for(var L,E=this._w,N=0|this._a,F=0|this._b,R=0|this._c,j=0|this._d,V=0|this._e,Y=0|this._f,me=0|this._g,le=0|this._h,C=0;C<16;++C)E[C]=A.readInt32BE(4*C);for(;C<64;++C)E[C]=0|(((L=E[C-2])>>>17|L<<15)^(L>>>19|L<<13)^L>>>10)+E[C-7]+p(E[C-15])+E[C-16];for(var q=0;q<64;++q){var X=le+g(V)+b(V,Y,me)+r[q]+E[q]|0,ae=w(N)+T(N,F,R)|0;le=me,me=Y,Y=V,V=j+X|0,j=R,R=F,F=N,N=X+ae|0}this._a=N+this._a|0,this._b=F+this._b|0,this._c=R+this._c|0,this._d=j+this._d|0,this._e=V+this._e|0,this._f=Y+this._f|0,this._g=me+this._g|0,this._h=le+this._h|0},d.prototype._hash=function(){var A=u.allocUnsafe(32);return A.writeInt32BE(this._a,0),A.writeInt32BE(this._b,4),A.writeInt32BE(this._c,8),A.writeInt32BE(this._d,12),A.writeInt32BE(this._e,16),A.writeInt32BE(this._f,20),A.writeInt32BE(this._g,24),A.writeInt32BE(this._h,28),A},o.exports=d},2827:(o,a,i)=>{var s=i(6698),f=i(2890),u=i(392),r=i(2861).Buffer,_=new Array(160);function d(){this.init(),this._w=_,u.call(this,128,112)}s(d,f),d.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},d.prototype._hash=function(){var b=r.allocUnsafe(48);function T(w,g,p){b.writeInt32BE(w,p),b.writeInt32BE(g,p+4)}return T(this._ah,this._al,0),T(this._bh,this._bl,8),T(this._ch,this._cl,16),T(this._dh,this._dl,24),T(this._eh,this._el,32),T(this._fh,this._fl,40),b},o.exports=d},2890:(o,a,i)=>{var s=i(6698),f=i(392),u=i(2861).Buffer,r=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],_=new Array(160);function d(){this.init(),this._w=_,f.call(this,128,112)}function b(F,R,j){return j^F&(R^j)}function T(F,R,j){return F&R|j&(F|R)}function w(F,R){return(F>>>28|R<<4)^(R>>>2|F<<30)^(R>>>7|F<<25)}function g(F,R){return(F>>>14|R<<18)^(F>>>18|R<<14)^(R>>>9|F<<23)}function p(F,R){return(F>>>1|R<<31)^(F>>>8|R<<24)^F>>>7}function A(F,R){return(F>>>1|R<<31)^(F>>>8|R<<24)^(F>>>7|R<<25)}function L(F,R){return(F>>>19|R<<13)^(R>>>29|F<<3)^F>>>6}function E(F,R){return(F>>>19|R<<13)^(R>>>29|F<<3)^(F>>>6|R<<26)}function N(F,R){return F>>>0<R>>>0?1:0}s(d,f),d.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},d.prototype._update=function(F){for(var R=this._w,j=0|this._ah,V=0|this._bh,Y=0|this._ch,me=0|this._dh,le=0|this._eh,C=0|this._fh,q=0|this._gh,X=0|this._hh,ae=0|this._al,I=0|this._bl,S=0|this._cl,m=0|this._dl,P=0|this._el,l=0|this._fl,x=0|this._gl,W=0|this._hl,K=0;K<32;K+=2)R[K]=F.readInt32BE(4*K),R[K+1]=F.readInt32BE(4*K+4);for(;K<160;K+=2){var re=R[K-30],oe=R[K-30+1],Ee=p(re,oe),Fe=A(oe,re),Oe=L(re=R[K-4],oe=R[K-4+1]),$=E(oe,re),de=R[K-14],we=R[K-14+1],Qe=R[K-32],ze=R[K-32+1],We=Fe+we|0,et=Ee+de+N(We,Fe)|0;et=(et=et+Oe+N(We=We+$|0,$)|0)+Qe+N(We=We+ze|0,ze)|0,R[K]=et,R[K+1]=We}for(var Be=0;Be<160;Be+=2){et=R[Be],We=R[Be+1];var Re=T(j,V,Y),$e=T(ae,I,S),ve=w(j,ae),ue=w(ae,j),c=g(le,P),y=g(P,le),v=r[Be],B=r[Be+1],O=b(le,C,q),h=b(P,l,x),k=W+y|0,U=X+c+N(k,W)|0;U=(U=(U=U+O+N(k=k+h|0,h)|0)+v+N(k=k+B|0,B)|0)+et+N(k=k+We|0,We)|0;var M=ue+$e|0,J=ve+Re+N(M,ue)|0;X=q,W=x,q=C,x=l,C=le,l=P,le=me+U+N(P=m+k|0,m)|0,me=Y,m=S,Y=V,S=I,V=j,I=ae,j=U+J+N(ae=k+M|0,k)|0}this._al=this._al+ae|0,this._bl=this._bl+I|0,this._cl=this._cl+S|0,this._dl=this._dl+m|0,this._el=this._el+P|0,this._fl=this._fl+l|0,this._gl=this._gl+x|0,this._hl=this._hl+W|0,this._ah=this._ah+j+N(this._al,ae)|0,this._bh=this._bh+V+N(this._bl,I)|0,this._ch=this._ch+Y+N(this._cl,S)|0,this._dh=this._dh+me+N(this._dl,m)|0,this._eh=this._eh+le+N(this._el,P)|0,this._fh=this._fh+C+N(this._fl,l)|0,this._gh=this._gh+q+N(this._gl,x)|0,this._hh=this._hh+X+N(this._hl,W)|0},d.prototype._hash=function(){var F=u.allocUnsafe(64);function R(j,V,Y){F.writeInt32BE(j,Y),F.writeInt32BE(V,Y+4)}return R(this._ah,this._al,0),R(this._bh,this._bl,8),R(this._ch,this._cl,16),R(this._dh,this._dl,24),R(this._eh,this._el,32),R(this._fh,this._fl,40),R(this._gh,this._gl,48),R(this._hh,this._hl,56),F},o.exports=d},920:(o,a,i)=>{"use strict";var s=i(453),f=i(8075),u=i(8859),r=i(9675),_=s("%WeakMap%",!0),d=s("%Map%",!0),b=f("WeakMap.prototype.get",!0),T=f("WeakMap.prototype.set",!0),w=f("WeakMap.prototype.has",!0),g=f("Map.prototype.get",!0),p=f("Map.prototype.set",!0),A=f("Map.prototype.has",!0),L=function(E,N){for(var F,R=E;(F=R.next)!==null;R=F)if(F.key===N)return R.next=F.next,F.next=E.next,E.next=F,F};o.exports=function(){var E,N,F,R={assert:function(j){if(!R.has(j))throw new r("Side channel does not contain "+u(j))},get:function(j){if(_&&j&&(typeof j=="object"||typeof j=="function")){if(E)return b(E,j)}else if(d){if(N)return g(N,j)}else if(F)return function(V,Y){var me=L(V,Y);return me&&me.value}(F,j)},has:function(j){if(_&&j&&(typeof j=="object"||typeof j=="function")){if(E)return w(E,j)}else if(d){if(N)return A(N,j)}else if(F)return function(V,Y){return!!L(V,Y)}(F,j);return!1},set:function(j,V){_&&j&&(typeof j=="object"||typeof j=="function")?(E||(E=new _),T(E,j,V)):d?(N||(N=new d),p(N,j,V)):(F||(F={key:{},next:null}),function(Y,me,le){var C=L(Y,me);C?C.value=le:Y.next={key:me,next:Y.next,value:le}}(F,j,V))}};return R}},1568:(o,a,i)=>{var s=i(5537),f=i(6917),u=i(7510),r=i(6866),_=i(8835),d=a;d.request=function(b,T){b=typeof b=="string"?_.parse(b):u(b);var w=i.g.location.protocol.search(/^https?:$/)===-1?"http:":"",g=b.protocol||w,p=b.hostname||b.host,A=b.port,L=b.path||"/";p&&p.indexOf(":")!==-1&&(p="["+p+"]"),b.url=(p?g+"//"+p:"")+(A?":"+A:"")+L,b.method=(b.method||"GET").toUpperCase(),b.headers=b.headers||{};var E=new s(b);return T&&E.on("response",T),E},d.get=function(b,T){var w=d.request(b,T);return w.end(),w},d.ClientRequest=s,d.IncomingMessage=f.IncomingMessage,d.Agent=function(){},d.Agent.defaultMaxSockets=4,d.globalAgent=new d.Agent,d.STATUS_CODES=r,d.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]},6688:(o,a,i)=>{var s;function f(){if(s!==void 0)return s;if(i.g.XMLHttpRequest){s=new i.g.XMLHttpRequest;try{s.open("GET",i.g.XDomainRequest?"/":"https://example.com")}catch{s=null}}else s=null;return s}function u(_){var d=f();if(!d)return!1;try{return d.responseType=_,d.responseType===_}catch{}return!1}function r(_){return typeof _=="function"}a.fetch=r(i.g.fetch)&&r(i.g.ReadableStream),a.writableStream=r(i.g.WritableStream),a.abortController=r(i.g.AbortController),a.arraybuffer=a.fetch||u("arraybuffer"),a.msstream=!a.fetch&&u("ms-stream"),a.mozchunkedarraybuffer=!a.fetch&&u("moz-chunked-arraybuffer"),a.overrideMimeType=a.fetch||!!f()&&r(f().overrideMimeType),s=null},5537:(o,a,i)=>{var s=i(8287).Buffer,f=i(6688),u=i(6698),r=i(6917),_=i(8399),d=r.IncomingMessage,b=r.readyStates,T=o.exports=function(g){var p,A=this;_.Writable.call(A),A._opts=g,A._body=[],A._headers={},g.auth&&A.setHeader("Authorization","Basic "+s.from(g.auth).toString("base64")),Object.keys(g.headers).forEach(function(E){A.setHeader(E,g.headers[E])});var L=!0;if(g.mode==="disable-fetch"||"requestTimeout"in g&&!f.abortController)L=!1,p=!0;else if(g.mode==="prefer-streaming")p=!1;else if(g.mode==="allow-wrong-content-type")p=!f.overrideMimeType;else{if(g.mode&&g.mode!=="default"&&g.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");p=!0}A._mode=function(E,N){return f.fetch&&N?"fetch":f.mozchunkedarraybuffer?"moz-chunked-arraybuffer":f.msstream?"ms-stream":f.arraybuffer&&E?"arraybuffer":"text"}(p,L),A._fetchTimer=null,A._socketTimeout=null,A._socketTimer=null,A.on("finish",function(){A._onFinish()})};u(T,_.Writable),T.prototype.setHeader=function(g,p){var A=g.toLowerCase();w.indexOf(A)===-1&&(this._headers[A]={name:g,value:p})},T.prototype.getHeader=function(g){var p=this._headers[g.toLowerCase()];return p?p.value:null},T.prototype.removeHeader=function(g){delete this._headers[g.toLowerCase()]},T.prototype._onFinish=function(){var g=this;if(!g._destroyed){var p=g._opts;"timeout"in p&&p.timeout!==0&&g.setTimeout(p.timeout);var A=g._headers,L=null;p.method!=="GET"&&p.method!=="HEAD"&&(L=new Blob(g._body,{type:(A["content-type"]||{}).value||""}));var E=[];if(Object.keys(A).forEach(function(j){var V=A[j].name,Y=A[j].value;Array.isArray(Y)?Y.forEach(function(me){E.push([V,me])}):E.push([V,Y])}),g._mode==="fetch"){var N=null;if(f.abortController){var F=new AbortController;N=F.signal,g._fetchAbortController=F,"requestTimeout"in p&&p.requestTimeout!==0&&(g._fetchTimer=i.g.setTimeout(function(){g.emit("requestTimeout"),g._fetchAbortController&&g._fetchAbortController.abort()},p.requestTimeout))}i.g.fetch(g._opts.url,{method:g._opts.method,headers:E,body:L||void 0,mode:"cors",credentials:p.withCredentials?"include":"same-origin",signal:N}).then(function(j){g._fetchResponse=j,g._resetTimers(!1),g._connect()},function(j){g._resetTimers(!0),g._destroyed||g.emit("error",j)})}else{var R=g._xhr=new i.g.XMLHttpRequest;try{R.open(g._opts.method,g._opts.url,!0)}catch(j){return void process.nextTick(function(){g.emit("error",j)})}"responseType"in R&&(R.responseType=g._mode),"withCredentials"in R&&(R.withCredentials=!!p.withCredentials),g._mode==="text"&&"overrideMimeType"in R&&R.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in p&&(R.timeout=p.requestTimeout,R.ontimeout=function(){g.emit("requestTimeout")}),E.forEach(function(j){R.setRequestHeader(j[0],j[1])}),g._response=null,R.onreadystatechange=function(){switch(R.readyState){case b.LOADING:case b.DONE:g._onXHRProgress()}},g._mode==="moz-chunked-arraybuffer"&&(R.onprogress=function(){g._onXHRProgress()}),R.onerror=function(){g._destroyed||(g._resetTimers(!0),g.emit("error",new Error("XHR error")))};try{R.send(L)}catch(j){return void process.nextTick(function(){g.emit("error",j)})}}}},T.prototype._onXHRProgress=function(){var g=this;g._resetTimers(!1),function(p){try{var A=p.status;return A!==null&&A!==0}catch{return!1}}(g._xhr)&&!g._destroyed&&(g._response||g._connect(),g._response._onXHRProgress(g._resetTimers.bind(g)))},T.prototype._connect=function(){var g=this;g._destroyed||(g._response=new d(g._xhr,g._fetchResponse,g._mode,g._resetTimers.bind(g)),g._response.on("error",function(p){g.emit("error",p)}),g.emit("response",g._response))},T.prototype._write=function(g,p,A){this._body.push(g),A()},T.prototype._resetTimers=function(g){var p=this;i.g.clearTimeout(p._socketTimer),p._socketTimer=null,g?(i.g.clearTimeout(p._fetchTimer),p._fetchTimer=null):p._socketTimeout&&(p._socketTimer=i.g.setTimeout(function(){p.emit("timeout")},p._socketTimeout))},T.prototype.abort=T.prototype.destroy=function(g){var p=this;p._destroyed=!0,p._resetTimers(!0),p._response&&(p._response._destroyed=!0),p._xhr?p._xhr.abort():p._fetchAbortController&&p._fetchAbortController.abort(),g&&p.emit("error",g)},T.prototype.end=function(g,p,A){typeof g=="function"&&(A=g,g=void 0),_.Writable.prototype.end.call(this,g,p,A)},T.prototype.setTimeout=function(g,p){var A=this;p&&A.once("timeout",p),A._socketTimeout=g,A._resetTimers(!1)},T.prototype.flushHeaders=function(){},T.prototype.setNoDelay=function(){},T.prototype.setSocketKeepAlive=function(){};var w=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]},6917:(o,a,i)=>{var s=i(8287).Buffer,f=i(6688),u=i(6698),r=i(8399),_=a.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},d=a.IncomingMessage=function(b,T,w,g){var p=this;if(r.Readable.call(p),p._mode=w,p.headers={},p.rawHeaders=[],p.trailers={},p.rawTrailers=[],p.on("end",function(){process.nextTick(function(){p.emit("close")})}),w==="fetch"){if(p._fetchResponse=T,p.url=T.url,p.statusCode=T.status,p.statusMessage=T.statusText,T.headers.forEach(function(F,R){p.headers[R.toLowerCase()]=F,p.rawHeaders.push(R,F)}),f.writableStream){var A=new WritableStream({write:function(F){return g(!1),new Promise(function(R,j){p._destroyed?j():p.push(s.from(F))?R():p._resumeFetch=R})},close:function(){g(!0),p._destroyed||p.push(null)},abort:function(F){g(!0),p._destroyed||p.emit("error",F)}});try{return void T.body.pipeTo(A).catch(function(F){g(!0),p._destroyed||p.emit("error",F)})}catch{}}var L=T.body.getReader();(function F(){L.read().then(function(R){p._destroyed||(g(R.done),R.done?p.push(null):(p.push(s.from(R.value)),F()))}).catch(function(R){g(!0),p._destroyed||p.emit("error",R)})})()}else if(p._xhr=b,p._pos=0,p.url=b.responseURL,p.statusCode=b.status,p.statusMessage=b.statusText,b.getAllResponseHeaders().split(/\r?\n/).forEach(function(F){var R=F.match(/^([^:]+):\s*(.*)/);if(R){var j=R[1].toLowerCase();j==="set-cookie"?(p.headers[j]===void 0&&(p.headers[j]=[]),p.headers[j].push(R[2])):p.headers[j]!==void 0?p.headers[j]+=", "+R[2]:p.headers[j]=R[2],p.rawHeaders.push(R[1],R[2])}}),p._charset="x-user-defined",!f.overrideMimeType){var E=p.rawHeaders["mime-type"];if(E){var N=E.match(/;\s*charset=([^;])(;|$)/);N&&(p._charset=N[1].toLowerCase())}p._charset||(p._charset="utf-8")}};u(d,r.Readable),d.prototype._read=function(){var b=this._resumeFetch;b&&(this._resumeFetch=null,b())},d.prototype._onXHRProgress=function(b){var T=this,w=T._xhr,g=null;switch(T._mode){case"text":if((g=w.responseText).length>T._pos){var p=g.substr(T._pos);if(T._charset==="x-user-defined"){for(var A=s.alloc(p.length),L=0;L<p.length;L++)A[L]=255&p.charCodeAt(L);T.push(A)}else T.push(p,T._charset);T._pos=g.length}break;case"arraybuffer":if(w.readyState!==_.DONE||!w.response)break;g=w.response,T.push(s.from(new Uint8Array(g)));break;case"moz-chunked-arraybuffer":if(g=w.response,w.readyState!==_.LOADING||!g)break;T.push(s.from(new Uint8Array(g)));break;case"ms-stream":if(g=w.response,w.readyState!==_.LOADING)break;var E=new i.g.MSStreamReader;E.onprogress=function(){E.result.byteLength>T._pos&&(T.push(s.from(new Uint8Array(E.result.slice(T._pos)))),T._pos=E.result.byteLength)},E.onload=function(){b(!0),T.push(null)},E.readAsArrayBuffer(g)}T._xhr.readyState===_.DONE&&T._mode!=="ms-stream"&&(b(!0),T.push(null))}},3141:(o,a,i)=>{"use strict";var s=i(2861).Buffer,f=s.isEncoding||function(A){switch((A=""+A)&&A.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function u(A){var L;switch(this.encoding=function(E){var N=function(F){if(!F)return"utf8";for(var R;;)switch(F){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return F;default:if(R)return;F=(""+F).toLowerCase(),R=!0}}(E);if(typeof N!="string"&&(s.isEncoding===f||!f(E)))throw new Error("Unknown encoding: "+E);return N||E}(A),this.encoding){case"utf16le":this.text=d,this.end=b,L=4;break;case"utf8":this.fillLast=_,L=4;break;case"base64":this.text=T,this.end=w,L=3;break;default:return this.write=g,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=s.allocUnsafe(L)}function r(A){return A<=127?0:A>>5==6?2:A>>4==14?3:A>>3==30?4:A>>6==2?-1:-2}function _(A){var L=this.lastTotal-this.lastNeed,E=function(N,F,R){if((192&F[0])!=128)return N.lastNeed=0,"�";if(N.lastNeed>1&&F.length>1){if((192&F[1])!=128)return N.lastNeed=1,"�";if(N.lastNeed>2&&F.length>2&&(192&F[2])!=128)return N.lastNeed=2,"�"}}(this,A);return E!==void 0?E:this.lastNeed<=A.length?(A.copy(this.lastChar,L,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(A.copy(this.lastChar,L,0,A.length),void(this.lastNeed-=A.length))}function d(A,L){if((A.length-L)%2==0){var E=A.toString("utf16le",L);if(E){var N=E.charCodeAt(E.length-1);if(N>=55296&&N<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1],E.slice(0,-1)}return E}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",L,A.length-1)}function b(A){var L=A&&A.length?this.write(A):"";if(this.lastNeed){var E=this.lastTotal-this.lastNeed;return L+this.lastChar.toString("utf16le",0,E)}return L}function T(A,L){var E=(A.length-L)%3;return E===0?A.toString("base64",L):(this.lastNeed=3-E,this.lastTotal=3,E===1?this.lastChar[0]=A[A.length-1]:(this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1]),A.toString("base64",L,A.length-E))}function w(A){var L=A&&A.length?this.write(A):"";return this.lastNeed?L+this.lastChar.toString("base64",0,3-this.lastNeed):L}function g(A){return A.toString(this.encoding)}function p(A){return A&&A.length?this.write(A):""}a.I=u,u.prototype.write=function(A){if(A.length===0)return"";var L,E;if(this.lastNeed){if((L=this.fillLast(A))===void 0)return"";E=this.lastNeed,this.lastNeed=0}else E=0;return E<A.length?L?L+this.text(A,E):this.text(A,E):L||""},u.prototype.end=function(A){var L=A&&A.length?this.write(A):"";return this.lastNeed?L+"�":L},u.prototype.text=function(A,L){var E=function(F,R,j){var V=R.length-1;if(V<j)return 0;var Y=r(R[V]);return Y>=0?(Y>0&&(F.lastNeed=Y-1),Y):--V<j||Y===-2?0:(Y=r(R[V]),Y>=0?(Y>0&&(F.lastNeed=Y-2),Y):--V<j||Y===-2?0:(Y=r(R[V]),Y>=0?(Y>0&&(Y===2?Y=0:F.lastNeed=Y-3),Y):0))}(this,A,L);if(!this.lastNeed)return A.toString("utf8",L);this.lastTotal=E;var N=A.length-(E-this.lastNeed);return A.copy(this.lastChar,0,N),A.toString("utf8",L,N)},u.prototype.fillLast=function(A){if(this.lastNeed<=A.length)return A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,A.length),this.lastNeed-=A.length}},1293:(o,a,i)=>{var s=i(5546),f=i(2708);o.exports={parse:function(u){var r=s.parse(u.toString());return f.compile(r)}}},2708:o=>{"use strict";o.exports={compile:function(a){var i=[],s=[],f="",u=Object.create(null),r=u;return function(E){for(var N,F=0;F<E.length;F++)switch((N=E[F]).type){case"Assign":d(N);break;case"ObjectPath":g(N);break;case"ArrayPath":p(N)}return u}(a);function _(E,N,F){var R=new Error(E);throw R.line=N,R.column=F,R}function d(E){var N,F=E.key,R=E.value,j=E.line,V=E.column;N=f?f+"."+F:F,r[F]!==void 0&&_("Cannot redefine existing key '"+N+"'.",j,V),r[F]=T(R),b(N)||(i.push(N),s.push(N))}function b(E){return i.indexOf(E)!==-1}function T(E){return E.type==="Array"?function(N){for(var F=null,R=0;R<N.length;R++){var j=N[R];F===null?F=j.type:j.type!==F&&_("Cannot add value of type "+j.type+" to array of type "+F+".",j.line,j.column)}return N.map(T)}(E.value):E.type==="InlineTable"?w(E.value):E.value}function w(E){for(var N=Object.create(null),F=0;F<E.length;F++){var R=E[F];R.value.type==="InlineTable"?N[R.key]=w(R.value.value):R.type==="InlineTableValue"&&(N[R.key]=T(R.value))}return N}function g(E){var N=E.value,F=N.map(L).join("."),R=E.line,j=E.column;b(F)&&_("Cannot redefine existing key '"+N+"'.",R,j),i.push(F),r=A(u,N,Object.create(null),R,j),f=N}function p(E){var N=E.value,F=N.map(L).join("."),R=E.line,j=E.column;if(b(F)||i.push(F),(i=i.filter(function(Y){return Y.indexOf(F)!==0})).push(F),r=A(u,N,[],R,j),f=F,r instanceof Array){var V=Object.create(null);r.push(V),r=V}else _("Cannot redefine existing key '"+N+"'.",R,j)}function A(E,N,F,R,j){for(var V=[],Y="",me=(N.join("."),E),le=0;le<N.length;le++){var C=N[le];V.push(C),Y=V.join("."),me[C]===void 0?le===N.length-1?me[C]=F:me[C]=Object.create(null):le!==N.length-1&&s.indexOf(Y)>-1&&_("Cannot redefine existing key '"+Y+"'.",R,j),(me=me[C])instanceof Array&&me.length&&le<N.length-1&&(me=me[me.length-1])}return me}function L(E){return E.indexOf(".")>-1?'"'+E+'"':E}}}},5546:o=>{o.exports=function(){function a(i,s,f,u,r,_){this.message=i,this.expected=s,this.found=f,this.offset=u,this.line=r,this.column=_,this.name="SyntaxError"}return function(i,s){function f(){this.constructor=i}f.prototype=s.prototype,i.prototype=new f}(a,Error),{SyntaxError:a,parse:function(i){var s,f=arguments.length>1?arguments[1]:{},u={},r={start:Zt},_=Zt,d=function(){return uu},b=u,T="#",w={type:"literal",value:"#",description:'"#"'},g=void 0,p={type:"any",description:"any character"},A="[",L={type:"literal",value:"[",description:'"["'},E="]",N={type:"literal",value:"]",description:'"]"'},F=function(Ae){Bo(En("ObjectPath",Ae,Se,Ue))},R=function(Ae){Bo(En("ArrayPath",Ae,Se,Ue))},j=function(Ae,rt){return Ae.concat(rt)},V=function(Ae){return[Ae]},Y=function(Ae){return Ae},me=".",le={type:"literal",value:".",description:'"."'},C="=",q={type:"literal",value:"=",description:'"="'},X=function(Ae,rt){Bo(En("Assign",rt,Se,Ue,Ae))},ae=function(Ae){return Ae.join("")},I=function(Ae){return Ae.value},S='"""',m={type:"literal",value:'"""',description:'"\\"\\"\\""'},P=null,l=function(Ae){return En("String",Ae.join(""),Se,Ue)},x='"',W={type:"literal",value:'"',description:'"\\""'},K="'''",re={type:"literal",value:"'''",description:`"'''"`},oe="'",Ee={type:"literal",value:"'",description:`"'"`},Fe=function(Ae){return Ae},Oe=function(Ae){return Ae},$="\\",de={type:"literal",value:"\\",description:'"\\\\"'},we=function(){return""},Qe="e",ze={type:"literal",value:"e",description:'"e"'},We="E",et={type:"literal",value:"E",description:'"E"'},Be=function(Ae,rt){return En("Float",parseFloat(Ae+"e"+rt),Se,Ue)},Re=function(Ae){return En("Float",parseFloat(Ae),Se,Ue)},$e="+",ve={type:"literal",value:"+",description:'"+"'},ue=function(Ae){return Ae.join("")},c="-",y={type:"literal",value:"-",description:'"-"'},v=function(Ae){return"-"+Ae.join("")},B=function(Ae){return En("Integer",parseInt(Ae,10),Se,Ue)},O="true",h={type:"literal",value:"true",description:'"true"'},k=function(){return En("Boolean",!0,Se,Ue)},U="false",M={type:"literal",value:"false",description:'"false"'},J=function(){return En("Boolean",!1,Se,Ue)},pe=function(){return En("Array",[],Se,Ue)},Ne=function(Ae){return En("Array",Ae?[Ae]:[],Se,Ue)},tt=function(Ae){return En("Array",Ae,Se,Ue)},bt=function(Ae,rt){return En("Array",Ae.concat(rt),Se,Ue)},Ot=function(Ae){return Ae},Ft=",",Yt={type:"literal",value:",",description:'","'},yr="{",je={type:"literal",value:"{",description:'"{"'},De="}",Xe={type:"literal",value:"}",description:'"}"'},ie=function(Ae){return En("InlineTable",Ae,Se,Ue)},Pe=function(Ae,rt){return En("InlineTableValue",rt,Se,Ue,Ae)},ct=function(Ae){return"."+Ae},dt=function(Ae){return Ae.join("")},xt=":",st={type:"literal",value:":",description:'":"'},$t=function(Ae){return Ae.join("")},_t="T",Ct={type:"literal",value:"T",description:'"T"'},it="Z",Q={type:"literal",value:"Z",description:'"Z"'},ce=function(Ae,rt){return En("Date",new Date(Ae+"T"+rt+"Z"),Se,Ue)},be=function(Ae,rt){return En("Date",new Date(Ae+"T"+rt),Se,Ue)},D=/^[ \t]/,xe={type:"class",value:"[ \\t]",description:"[ \\t]"},ot=`
43
- `,at={type:"literal",value:`
44
- `,description:'"\\n"'},yt="\r",Tt={type:"literal",value:"\r",description:'"\\r"'},Kt=/^[0-9a-f]/i,Et={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},Rt=/^[0-9]/,St={type:"class",value:"[0-9]",description:"[0-9]"},Ht="_",Lt={type:"literal",value:"_",description:'"_"'},qt=function(){return""},It=/^[A-Za-z0-9_\-]/,rr={type:"class",value:"[A-Za-z0-9_\\-]",description:"[A-Za-z0-9_\\-]"},ye=function(Ae){return Ae.join("")},Me='\\"',H={type:"literal",value:'\\"',description:'"\\\\\\""'},G=function(){return'"'},ne="\\\\",se={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},he=function(){return"\\"},Le="\\b",Ie={type:"literal",value:"\\b",description:'"\\\\b"'},Te=function(){return"\b"},Ce="\\t",Ge={type:"literal",value:"\\t",description:'"\\\\t"'},Je=function(){return" "},ft="\\n",gt={type:"literal",value:"\\n",description:'"\\\\n"'},Nt=function(){return`
45
- `},Vt="\\f",Gt={type:"literal",value:"\\f",description:'"\\\\f"'},Ye=function(){return"\f"},ir="\\r",or={type:"literal",value:"\\r",description:'"\\\\r"'},sr=function(){return"\r"},pr="\\U",Er={type:"literal",value:"\\U",description:'"\\\\U"'},hr=function(Ae){return function(rt,lt,nt){var ut=parseInt("0x"+rt);if(!(!isFinite(ut)||Math.floor(ut)!=ut||ut<0||ut>1114111||ut>55295&&ut<57344))return function(){var Pt,At,cr=16384,lr=[],xr=-1,kr=arguments.length;if(!kr)return"";for(var gr="";++xr<kr;){var tr=Number(arguments[xr]);tr<=65535?lr.push(tr):(Pt=55296+((tr-=65536)>>10),At=tr%1024+56320,lr.push(Pt,At)),(xr+1==kr||lr.length>cr)&&(gr+=String.fromCharCode.apply(null,lr),lr.length=0)}return gr}(ut);(function(Pt,At,cr){var lr=new Error(Pt);throw lr.line=At,lr.column=cr,lr})("Invalid Unicode escape code: "+rt,lt,nt)}(Ae.join(""))},br="\\u",ur={type:"literal",value:"\\u",description:'"\\\\u"'},ee=0,er=0,wr=0,Pr={line:1,column:1,seenCR:!1},jr=0,Lr=[],Mt=0,fe={};if("startRule"in f){if(!(f.startRule in r))throw new Error(`Can't start parsing from rule "`+f.startRule+'".');_=r[f.startRule]}function Se(){return mt(er).line}function Ue(){return mt(er).column}function mt(Ae){return wr!==Ae&&(wr>Ae&&(wr=0,Pr={line:1,column:1,seenCR:!1}),function(rt,lt,nt){var ut,Pt;for(ut=lt;ut<nt;ut++)(Pt=i.charAt(ut))===`
46
- `?(rt.seenCR||rt.line++,rt.column=1,rt.seenCR=!1):Pt==="\r"||Pt==="\u2028"||Pt==="\u2029"?(rt.line++,rt.column=1,rt.seenCR=!0):(rt.column++,rt.seenCR=!1)}(Pr,wr,Ae),wr=Ae),Pr}function qe(Ae){ee<jr||(ee>jr&&(jr=ee,Lr=[]),Lr.push(Ae))}function Ut(Ae,rt,lt){var nt=mt(lt),ut=lt<i.length?i.charAt(lt):null;return rt!==null&&function(Pt){var At=1;for(Pt.sort(function(cr,lr){return cr.description<lr.description?-1:cr.description>lr.description?1:0});At<Pt.length;)Pt[At-1]===Pt[At]?Pt.splice(At,1):At++}(rt),new a(Ae!==null?Ae:function(Pt,At){var cr,lr=new Array(Pt.length);for(cr=0;cr<Pt.length;cr++)lr[cr]=Pt[cr].description;return"Expected "+(Pt.length>1?lr.slice(0,-1).join(", ")+" or "+lr[Pt.length-1]:lr[0])+" but "+(At?'"'+function(xr){function kr(gr){return gr.charCodeAt(0).toString(16).toUpperCase()}return xr.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(gr){return"\\x0"+kr(gr)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(gr){return"\\x"+kr(gr)}).replace(/[\u0180-\u0FFF]/g,function(gr){return"\\u0"+kr(gr)}).replace(/[\u1080-\uFFFF]/g,function(gr){return"\\u"+kr(gr)})}(At)+'"':"end of input")+" found."}(rt,ut),rt,ut,lt,nt.line,nt.column)}function Zt(){var Ae,rt,lt,nt=49*ee+0,ut=fe[nt];if(ut)return ee=ut.nextPos,ut.result;for(Ae=ee,rt=[],lt=dr();lt!==u;)rt.push(lt),lt=dr();return rt!==u&&(er=Ae,rt=d()),Ae=rt,fe[nt]={nextPos:ee,result:Ae},Ae}function dr(){var Ae,rt,lt,nt,ut,Pt,At,cr=49*ee+1,lr=fe[cr];if(lr)return ee=lr.nextPos,lr.result;for(Ae=ee,rt=[],lt=Sr();lt!==u;)rt.push(lt),lt=Sr();if(rt!==u)if(lt=function(){var xr,kr=49*ee+2,gr=fe[kr];return gr?(ee=gr.nextPos,gr.result):(xr=fr(),xr===u&&(xr=function(){var tr,Zr,$r,Br,on,Dr,dn=49*ee+4,In=fe[dn];if(In)return ee=In.nextPos,In.result;if(tr=ee,i.charCodeAt(ee)===91?(Zr=A,ee++):(Zr=u,Mt===0&&qe(L)),Zr!==u){for($r=[],Br=Sr();Br!==u;)$r.push(Br),Br=Sr();if($r!==u)if((Br=Vr())!==u){for(on=[],Dr=Sr();Dr!==u;)on.push(Dr),Dr=Sr();on!==u?(i.charCodeAt(ee)===93?(Dr=E,ee++):(Dr=u,Mt===0&&qe(N)),Dr!==u?(er=tr,tr=Zr=F(Br)):(ee=tr,tr=b)):(ee=tr,tr=b)}else ee=tr,tr=b;else ee=tr,tr=b}else ee=tr,tr=b;return fe[dn]={nextPos:ee,result:tr},tr}(),xr===u&&(xr=function(){var tr,Zr,$r,Br,on,Dr,dn,In,Nn=49*ee+5,Hn=fe[Nn];if(Hn)return ee=Hn.nextPos,Hn.result;if(tr=ee,i.charCodeAt(ee)===91?(Zr=A,ee++):(Zr=u,Mt===0&&qe(L)),Zr!==u)if(i.charCodeAt(ee)===91?($r=A,ee++):($r=u,Mt===0&&qe(L)),$r!==u){for(Br=[],on=Sr();on!==u;)Br.push(on),on=Sr();if(Br!==u)if((on=Vr())!==u){for(Dr=[],dn=Sr();dn!==u;)Dr.push(dn),dn=Sr();Dr!==u?(i.charCodeAt(ee)===93?(dn=E,ee++):(dn=u,Mt===0&&qe(N)),dn!==u?(i.charCodeAt(ee)===93?(In=E,ee++):(In=u,Mt===0&&qe(N)),In!==u?(er=tr,tr=Zr=R(on)):(ee=tr,tr=b)):(ee=tr,tr=b)):(ee=tr,tr=b)}else ee=tr,tr=b;else ee=tr,tr=b}else ee=tr,tr=b;else ee=tr,tr=b;return fe[Nn]={nextPos:ee,result:tr},tr}(),xr===u&&(xr=function(){var tr,Zr,$r,Br,on,Dr,dn=49*ee+9,In=fe[dn];if(In)return ee=In.nextPos,In.result;if(tr=ee,Zr=Ko(),Zr!==u){for($r=[],Br=Sr();Br!==u;)$r.push(Br),Br=Sr();if($r!==u)if(i.charCodeAt(ee)===61?(Br=C,ee++):(Br=u,Mt===0&&qe(q)),Br!==u){for(on=[],Dr=Sr();Dr!==u;)on.push(Dr),Dr=Sr();on!==u&&(Dr=fo())!==u?(er=tr,tr=Zr=X(Zr,Dr)):(ee=tr,tr=b)}else ee=tr,tr=b;else ee=tr,tr=b}else ee=tr,tr=b;if(tr===u)if(tr=ee,(Zr=Ka())!==u){for($r=[],Br=Sr();Br!==u;)$r.push(Br),Br=Sr();if($r!==u)if(i.charCodeAt(ee)===61?(Br=C,ee++):(Br=u,Mt===0&&qe(q)),Br!==u){for(on=[],Dr=Sr();Dr!==u;)on.push(Dr),Dr=Sr();on!==u&&(Dr=fo())!==u?(er=tr,tr=Zr=X(Zr,Dr)):(ee=tr,tr=b)}else ee=tr,tr=b;else ee=tr,tr=b}else ee=tr,tr=b;return fe[dn]={nextPos:ee,result:tr},tr}()))),fe[kr]={nextPos:ee,result:xr},xr)}(),lt!==u){for(nt=[],ut=Sr();ut!==u;)nt.push(ut),ut=Sr();if(nt!==u){for(ut=[],Pt=fr();Pt!==u;)ut.push(Pt),Pt=fr();if(ut!==u){if(Pt=[],(At=Rn())!==u)for(;At!==u;)Pt.push(At),At=Rn();else Pt=b;Pt===u&&(Pt=ra()),Pt!==u?Ae=rt=[rt,lt,nt,ut,Pt]:(ee=Ae,Ae=b)}else ee=Ae,Ae=b}else ee=Ae,Ae=b}else ee=Ae,Ae=b;else ee=Ae,Ae=b;if(Ae===u){if(Ae=ee,rt=[],(lt=Sr())!==u)for(;lt!==u;)rt.push(lt),lt=Sr();else rt=b;if(rt!==u){if(lt=[],(nt=Rn())!==u)for(;nt!==u;)lt.push(nt),nt=Rn();else lt=b;lt===u&&(lt=ra()),lt!==u?Ae=rt=[rt,lt]:(ee=Ae,Ae=b)}else ee=Ae,Ae=b;Ae===u&&(Ae=Rn())}return fe[cr]={nextPos:ee,result:Ae},Ae}function fr(){var Ae,rt,lt,nt,ut,Pt,At=49*ee+3,cr=fe[At];if(cr)return ee=cr.nextPos,cr.result;if(Ae=ee,i.charCodeAt(ee)===35?(rt=T,ee++):(rt=u,Mt===0&&qe(w)),rt!==u){for(lt=[],nt=ee,ut=ee,Mt++,(Pt=Rn())===u&&(Pt=ra()),Mt--,Pt===u?ut=g:(ee=ut,ut=b),ut!==u?(i.length>ee?(Pt=i.charAt(ee),ee++):(Pt=u,Mt===0&&qe(p)),Pt!==u?nt=ut=[ut,Pt]:(ee=nt,nt=b)):(ee=nt,nt=b);nt!==u;)lt.push(nt),nt=ee,ut=ee,Mt++,(Pt=Rn())===u&&(Pt=ra()),Mt--,Pt===u?ut=g:(ee=ut,ut=b),ut!==u?(i.length>ee?(Pt=i.charAt(ee),ee++):(Pt=u,Mt===0&&qe(p)),Pt!==u?nt=ut=[ut,Pt]:(ee=nt,nt=b)):(ee=nt,nt=b);lt!==u?Ae=rt=[rt,lt]:(ee=Ae,Ae=b)}else ee=Ae,Ae=b;return fe[At]={nextPos:ee,result:Ae},Ae}function Vr(){var Ae,rt,lt,nt=49*ee+6,ut=fe[nt];if(ut)return ee=ut.nextPos,ut.result;if(Ae=ee,rt=[],(lt=Nr())!==u)for(;lt!==u;)rt.push(lt),lt=Nr();else rt=b;return rt!==u&&(lt=Wr())!==u?(er=Ae,Ae=rt=j(rt,lt)):(ee=Ae,Ae=b),Ae===u&&(Ae=ee,(rt=Wr())!==u&&(er=Ae,rt=V(rt)),Ae=rt),fe[nt]={nextPos:ee,result:Ae},Ae}function Wr(){var Ae,rt,lt,nt,ut,Pt=49*ee+7,At=fe[Pt];if(At)return ee=At.nextPos,At.result;for(Ae=ee,rt=[],lt=Sr();lt!==u;)rt.push(lt),lt=Sr();if(rt!==u)if((lt=Ko())!==u){for(nt=[],ut=Sr();ut!==u;)nt.push(ut),ut=Sr();nt!==u?(er=Ae,Ae=rt=Y(lt)):(ee=Ae,Ae=b)}else ee=Ae,Ae=b;else ee=Ae,Ae=b;if(Ae===u){for(Ae=ee,rt=[],lt=Sr();lt!==u;)rt.push(lt),lt=Sr();if(rt!==u)if((lt=Ka())!==u){for(nt=[],ut=Sr();ut!==u;)nt.push(ut),ut=Sr();nt!==u?(er=Ae,Ae=rt=Y(lt)):(ee=Ae,Ae=b)}else ee=Ae,Ae=b;else ee=Ae,Ae=b}return fe[Pt]={nextPos:ee,result:Ae},Ae}function Nr(){var Ae,rt,lt,nt,ut,Pt,At,cr=49*ee+8,lr=fe[cr];if(lr)return ee=lr.nextPos,lr.result;for(Ae=ee,rt=[],lt=Sr();lt!==u;)rt.push(lt),lt=Sr();if(rt!==u)if((lt=Ko())!==u){for(nt=[],ut=Sr();ut!==u;)nt.push(ut),ut=Sr();if(nt!==u)if(i.charCodeAt(ee)===46?(ut=me,ee++):(ut=u,Mt===0&&qe(le)),ut!==u){for(Pt=[],At=Sr();At!==u;)Pt.push(At),At=Sr();Pt!==u?(er=Ae,Ae=rt=Y(lt)):(ee=Ae,Ae=b)}else ee=Ae,Ae=b;else ee=Ae,Ae=b}else ee=Ae,Ae=b;else ee=Ae,Ae=b;if(Ae===u){for(Ae=ee,rt=[],lt=Sr();lt!==u;)rt.push(lt),lt=Sr();if(rt!==u)if((lt=Ka())!==u){for(nt=[],ut=Sr();ut!==u;)nt.push(ut),ut=Sr();if(nt!==u)if(i.charCodeAt(ee)===46?(ut=me,ee++):(ut=u,Mt===0&&qe(le)),ut!==u){for(Pt=[],At=Sr();At!==u;)Pt.push(At),At=Sr();Pt!==u?(er=Ae,Ae=rt=Y(lt)):(ee=Ae,Ae=b)}else ee=Ae,Ae=b;else ee=Ae,Ae=b}else ee=Ae,Ae=b;else ee=Ae,Ae=b}return fe[cr]={nextPos:ee,result:Ae},Ae}function Ko(){var Ae,rt,lt,nt=49*ee+10,ut=fe[nt];if(ut)return ee=ut.nextPos,ut.result;if(Ae=ee,rt=[],(lt=Pi())!==u)for(;lt!==u;)rt.push(lt),lt=Pi();else rt=b;return rt!==u&&(er=Ae,rt=ae(rt)),Ae=rt,fe[nt]={nextPos:ee,result:Ae},Ae}function Ka(){var Ae,rt,lt=49*ee+11,nt=fe[lt];return nt?(ee=nt.nextPos,nt.result):(Ae=ee,(rt=Ha())!==u&&(er=Ae,rt=I(rt)),(Ae=rt)===u&&(Ae=ee,(rt=ou())!==u&&(er=Ae,rt=I(rt)),Ae=rt),fe[lt]={nextPos:ee,result:Ae},Ae)}function fo(){var Ae,rt=49*ee+12,lt=fe[rt];return lt?(ee=lt.nextPos,lt.result):(Ae=function(){var nt,ut=49*ee+13,Pt=fe[ut];return Pt?(ee=Pt.nextPos,Pt.result):(nt=function(){var At,cr,lr,xr,kr,gr=49*ee+14,tr=fe[gr];if(tr)return ee=tr.nextPos,tr.result;if(At=ee,i.substr(ee,3)===S?(cr=S,ee+=3):(cr=u,Mt===0&&qe(m)),cr!==u)if((lr=Rn())===u&&(lr=P),lr!==u){for(xr=[],kr=ki();kr!==u;)xr.push(kr),kr=ki();xr!==u?(i.substr(ee,3)===S?(kr=S,ee+=3):(kr=u,Mt===0&&qe(m)),kr!==u?(er=At,At=cr=l(xr)):(ee=At,At=b)):(ee=At,At=b)}else ee=At,At=b;else ee=At,At=b;return fe[gr]={nextPos:ee,result:At},At}(),nt===u&&(nt=Ha())===u&&(nt=function(){var At,cr,lr,xr,kr,gr=49*ee+16,tr=fe[gr];if(tr)return ee=tr.nextPos,tr.result;if(At=ee,i.substr(ee,3)===K?(cr=K,ee+=3):(cr=u,Mt===0&&qe(re)),cr!==u)if((lr=Rn())===u&&(lr=P),lr!==u){for(xr=[],kr=Zi();kr!==u;)xr.push(kr),kr=Zi();xr!==u?(i.substr(ee,3)===K?(kr=K,ee+=3):(kr=u,Mt===0&&qe(re)),kr!==u?(er=At,At=cr=l(xr)):(ee=At,At=b)):(ee=At,At=b)}else ee=At,At=b;else ee=At,At=b;return fe[gr]={nextPos:ee,result:At},At}(),nt===u&&(nt=ou())),fe[ut]={nextPos:ee,result:nt},nt)}(),Ae===u&&(Ae=function(){var nt,ut,Pt,At,cr,lr=49*ee+38,xr=fe[lr];return xr?(ee=xr.nextPos,xr.result):(nt=ee,(ut=ta())!==u?(i.charCodeAt(ee)===84?(Pt=_t,ee++):(Pt=u,Mt===0&&qe(Ct)),Pt!==u?(At=function(){var kr,gr,tr,Zr,$r,Br,on,Dr,dn,In,Nn,Hn=49*ee+36,zo=fe[Hn];return zo?(ee=zo.nextPos,zo.result):(kr=ee,gr=ee,tr=Jr(),tr!==u&&(Zr=Jr())!==u?(i.charCodeAt(ee)===58?($r=xt,ee++):($r=u,Mt===0&&qe(st)),$r!==u&&(Br=Jr())!==u&&(on=Jr())!==u?(i.charCodeAt(ee)===58?(Dr=xt,ee++):(Dr=u,Mt===0&&qe(st)),Dr!==u&&(dn=Jr())!==u&&(In=Jr())!==u?((Nn=Oi())===u&&(Nn=P),Nn!==u?gr=tr=[tr,Zr,$r,Br,on,Dr,dn,In,Nn]:(ee=gr,gr=b)):(ee=gr,gr=b)):(ee=gr,gr=b)):(ee=gr,gr=b),gr!==u&&(er=kr,gr=$t(gr)),kr=gr,fe[Hn]={nextPos:ee,result:kr},kr)}(),At!==u?(i.charCodeAt(ee)===90?(cr=it,ee++):(cr=u,Mt===0&&qe(Q)),cr!==u?(er=nt,nt=ut=ce(ut,At)):(ee=nt,nt=b)):(ee=nt,nt=b)):(ee=nt,nt=b)):(ee=nt,nt=b),nt===u&&(nt=ee,(ut=ta())!==u?(i.charCodeAt(ee)===84?(Pt=_t,ee++):(Pt=u,Mt===0&&qe(Ct)),Pt!==u?(At=function(){var kr,gr,tr,Zr,$r,Br,on,Dr,dn,In,Nn,Hn,zo,$a,xi,Qa,Ya,cu=49*ee+37,Ja=fe[cu];return Ja?(ee=Ja.nextPos,Ja.result):(kr=ee,gr=ee,tr=Jr(),tr!==u&&(Zr=Jr())!==u?(i.charCodeAt(ee)===58?($r=xt,ee++):($r=u,Mt===0&&qe(st)),$r!==u&&(Br=Jr())!==u&&(on=Jr())!==u?(i.charCodeAt(ee)===58?(Dr=xt,ee++):(Dr=u,Mt===0&&qe(st)),Dr!==u&&(dn=Jr())!==u&&(In=Jr())!==u?((Nn=Oi())===u&&(Nn=P),Nn!==u?(i.charCodeAt(ee)===45?(Hn=c,ee++):(Hn=u,Mt===0&&qe(y)),Hn===u&&(i.charCodeAt(ee)===43?(Hn=$e,ee++):(Hn=u,Mt===0&&qe(ve))),Hn!==u&&(zo=Jr())!==u&&($a=Jr())!==u?(i.charCodeAt(ee)===58?(xi=xt,ee++):(xi=u,Mt===0&&qe(st)),xi!==u&&(Qa=Jr())!==u&&(Ya=Jr())!==u?gr=tr=[tr,Zr,$r,Br,on,Dr,dn,In,Nn,Hn,zo,$a,xi,Qa,Ya]:(ee=gr,gr=b)):(ee=gr,gr=b)):(ee=gr,gr=b)):(ee=gr,gr=b)):(ee=gr,gr=b)):(ee=gr,gr=b),gr!==u&&(er=kr,gr=$t(gr)),kr=gr,fe[cu]={nextPos:ee,result:kr},kr)}(),At!==u?(er=nt,nt=ut=be(ut,At)):(ee=nt,nt=b)):(ee=nt,nt=b)):(ee=nt,nt=b)),fe[lr]={nextPos:ee,result:nt},nt)}(),Ae===u&&(Ae=function(){var nt,ut,Pt,At,cr=49*ee+23,lr=fe[cr];return lr?(ee=lr.nextPos,lr.result):(nt=ee,(ut=au())===u&&(ut=Co()),ut!==u?(i.charCodeAt(ee)===101?(Pt=Qe,ee++):(Pt=u,Mt===0&&qe(ze)),Pt===u&&(i.charCodeAt(ee)===69?(Pt=We,ee++):(Pt=u,Mt===0&&qe(et))),Pt!==u&&(At=Co())!==u?(er=nt,nt=ut=Be(ut,At)):(ee=nt,nt=b)):(ee=nt,nt=b),nt===u&&(nt=ee,(ut=au())!==u&&(er=nt,ut=Re(ut)),nt=ut),fe[cr]={nextPos:ee,result:nt},nt)}(),Ae===u&&(Ae=function(){var nt,ut,Pt=49*ee+25,At=fe[Pt];return At?(ee=At.nextPos,At.result):(nt=ee,(ut=Co())!==u&&(er=nt,ut=B(ut)),nt=ut,fe[Pt]={nextPos:ee,result:nt},nt)}(),Ae===u&&(Ae=function(){var nt,ut,Pt=49*ee+27,At=fe[Pt];return At?(ee=At.nextPos,At.result):(nt=ee,i.substr(ee,4)===O?(ut=O,ee+=4):(ut=u,Mt===0&&qe(h)),ut!==u&&(er=nt,ut=k()),nt=ut,nt===u&&(nt=ee,i.substr(ee,5)===U?(ut=U,ee+=5):(ut=u,Mt===0&&qe(M)),ut!==u&&(er=nt,ut=J()),nt=ut),fe[Pt]={nextPos:ee,result:nt},nt)}(),Ae===u&&(Ae=function(){var nt,ut,Pt,At,cr,lr=49*ee+28,xr=fe[lr];if(xr)return ee=xr.nextPos,xr.result;if(nt=ee,i.charCodeAt(ee)===91?(ut=A,ee++):(ut=u,Mt===0&&qe(L)),ut!==u){for(Pt=[],At=oo();At!==u;)Pt.push(At),At=oo();Pt!==u?(i.charCodeAt(ee)===93?(At=E,ee++):(At=u,Mt===0&&qe(N)),At!==u?(er=nt,nt=ut=pe()):(ee=nt,nt=b)):(ee=nt,nt=b)}else ee=nt,nt=b;if(nt===u&&(nt=ee,i.charCodeAt(ee)===91?(ut=A,ee++):(ut=u,Mt===0&&qe(L)),ut!==u?((Pt=Xa())===u&&(Pt=P),Pt!==u?(i.charCodeAt(ee)===93?(At=E,ee++):(At=u,Mt===0&&qe(N)),At!==u?(er=nt,nt=ut=Ne(Pt)):(ee=nt,nt=b)):(ee=nt,nt=b)):(ee=nt,nt=b),nt===u)){if(nt=ee,i.charCodeAt(ee)===91?(ut=A,ee++):(ut=u,Mt===0&&qe(L)),ut!==u){if(Pt=[],(At=ea())!==u)for(;At!==u;)Pt.push(At),At=ea();else Pt=b;Pt!==u?(i.charCodeAt(ee)===93?(At=E,ee++):(At=u,Mt===0&&qe(N)),At!==u?(er=nt,nt=ut=tt(Pt)):(ee=nt,nt=b)):(ee=nt,nt=b)}else ee=nt,nt=b;if(nt===u)if(nt=ee,i.charCodeAt(ee)===91?(ut=A,ee++):(ut=u,Mt===0&&qe(L)),ut!==u){if(Pt=[],(At=ea())!==u)for(;At!==u;)Pt.push(At),At=ea();else Pt=b;Pt!==u&&(At=Xa())!==u?(i.charCodeAt(ee)===93?(cr=E,ee++):(cr=u,Mt===0&&qe(N)),cr!==u?(er=nt,nt=ut=bt(Pt,At)):(ee=nt,nt=b)):(ee=nt,nt=b)}else ee=nt,nt=b}return fe[lr]={nextPos:ee,result:nt},nt}(),Ae===u&&(Ae=function(){var nt,ut,Pt,At,cr,lr,xr=49*ee+32,kr=fe[xr];if(kr)return ee=kr.nextPos,kr.result;if(nt=ee,i.charCodeAt(ee)===123?(ut=yr,ee++):(ut=u,Mt===0&&qe(je)),ut!==u){for(Pt=[],At=Sr();At!==u;)Pt.push(At),At=Sr();if(Pt!==u){for(At=[],cr=Ga();cr!==u;)At.push(cr),cr=Ga();if(At!==u){for(cr=[],lr=Sr();lr!==u;)cr.push(lr),lr=Sr();cr!==u?(i.charCodeAt(ee)===125?(lr=De,ee++):(lr=u,Mt===0&&qe(Xe)),lr!==u?(er=nt,nt=ut=ie(At)):(ee=nt,nt=b)):(ee=nt,nt=b)}else ee=nt,nt=b}else ee=nt,nt=b}else ee=nt,nt=b;return fe[xr]={nextPos:ee,result:nt},nt}())))))),fe[rt]={nextPos:ee,result:Ae},Ae)}function Ha(){var Ae,rt,lt,nt,ut=49*ee+15,Pt=fe[ut];if(Pt)return ee=Pt.nextPos,Pt.result;if(Ae=ee,i.charCodeAt(ee)===34?(rt=x,ee++):(rt=u,Mt===0&&qe(W)),rt!==u){for(lt=[],nt=iu();nt!==u;)lt.push(nt),nt=iu();lt!==u?(i.charCodeAt(ee)===34?(nt=x,ee++):(nt=u,Mt===0&&qe(W)),nt!==u?(er=Ae,Ae=rt=l(lt)):(ee=Ae,Ae=b)):(ee=Ae,Ae=b)}else ee=Ae,Ae=b;return fe[ut]={nextPos:ee,result:Ae},Ae}function ou(){var Ae,rt,lt,nt,ut=49*ee+17,Pt=fe[ut];if(Pt)return ee=Pt.nextPos,Pt.result;if(Ae=ee,i.charCodeAt(ee)===39?(rt=oe,ee++):(rt=u,Mt===0&&qe(Ee)),rt!==u){for(lt=[],nt=za();nt!==u;)lt.push(nt),nt=za();lt!==u?(i.charCodeAt(ee)===39?(nt=oe,ee++):(nt=u,Mt===0&&qe(Ee)),nt!==u?(er=Ae,Ae=rt=l(lt)):(ee=Ae,Ae=b)):(ee=Ae,Ae=b)}else ee=Ae,Ae=b;return fe[ut]={nextPos:ee,result:Ae},Ae}function iu(){var Ae,rt,lt,nt=49*ee+18,ut=fe[nt];return ut?(ee=ut.nextPos,ut.result):((Ae=su())===u&&(Ae=ee,rt=ee,Mt++,i.charCodeAt(ee)===34?(lt=x,ee++):(lt=u,Mt===0&&qe(W)),Mt--,lt===u?rt=g:(ee=rt,rt=b),rt!==u?(i.length>ee?(lt=i.charAt(ee),ee++):(lt=u,Mt===0&&qe(p)),lt!==u?(er=Ae,Ae=rt=Fe(lt)):(ee=Ae,Ae=b)):(ee=Ae,Ae=b)),fe[nt]={nextPos:ee,result:Ae},Ae)}function za(){var Ae,rt,lt,nt=49*ee+19,ut=fe[nt];return ut?(ee=ut.nextPos,ut.result):(Ae=ee,rt=ee,Mt++,i.charCodeAt(ee)===39?(lt=oe,ee++):(lt=u,Mt===0&&qe(Ee)),Mt--,lt===u?rt=g:(ee=rt,rt=b),rt!==u?(i.length>ee?(lt=i.charAt(ee),ee++):(lt=u,Mt===0&&qe(p)),lt!==u?(er=Ae,Ae=rt=Fe(lt)):(ee=Ae,Ae=b)):(ee=Ae,Ae=b),fe[nt]={nextPos:ee,result:Ae},Ae)}function ki(){var Ae,rt,lt,nt=49*ee+20,ut=fe[nt];return ut?(ee=ut.nextPos,ut.result):((Ae=su())===u&&(Ae=function(){var Pt,At,cr,lr,xr=49*ee+21,kr=fe[xr];if(kr)return ee=kr.nextPos,kr.result;if(Pt=ee,i.charCodeAt(ee)===92?(At=$,ee++):(At=u,Mt===0&&qe(de)),At!==u)if(Rn()!==u){for(cr=[],lr=Wa();lr!==u;)cr.push(lr),lr=Wa();cr!==u?(er=Pt,Pt=At=we()):(ee=Pt,Pt=b)}else ee=Pt,Pt=b;else ee=Pt,Pt=b;return fe[xr]={nextPos:ee,result:Pt},Pt}(),Ae===u&&(Ae=ee,rt=ee,Mt++,i.substr(ee,3)===S?(lt=S,ee+=3):(lt=u,Mt===0&&qe(m)),Mt--,lt===u?rt=g:(ee=rt,rt=b),rt!==u?(i.length>ee?(lt=i.charAt(ee),ee++):(lt=u,Mt===0&&qe(p)),lt!==u?(er=Ae,Ae=rt=Oe(lt)):(ee=Ae,Ae=b)):(ee=Ae,Ae=b))),fe[nt]={nextPos:ee,result:Ae},Ae)}function Zi(){var Ae,rt,lt,nt=49*ee+22,ut=fe[nt];return ut?(ee=ut.nextPos,ut.result):(Ae=ee,rt=ee,Mt++,i.substr(ee,3)===K?(lt=K,ee+=3):(lt=u,Mt===0&&qe(re)),Mt--,lt===u?rt=g:(ee=rt,rt=b),rt!==u?(i.length>ee?(lt=i.charAt(ee),ee++):(lt=u,Mt===0&&qe(p)),lt!==u?(er=Ae,Ae=rt=Fe(lt)):(ee=Ae,Ae=b)):(ee=Ae,Ae=b),fe[nt]={nextPos:ee,result:Ae},Ae)}function au(){var Ae,rt,lt,nt,ut,Pt,At=49*ee+24,cr=fe[At];return cr?(ee=cr.nextPos,cr.result):(Ae=ee,i.charCodeAt(ee)===43?(rt=$e,ee++):(rt=u,Mt===0&&qe(ve)),rt===u&&(rt=P),rt!==u?(lt=ee,(nt=Ho())!==u?(i.charCodeAt(ee)===46?(ut=me,ee++):(ut=u,Mt===0&&qe(le)),ut!==u&&(Pt=Ho())!==u?lt=nt=[nt,ut,Pt]:(ee=lt,lt=b)):(ee=lt,lt=b),lt!==u?(er=Ae,Ae=rt=ue(lt)):(ee=Ae,Ae=b)):(ee=Ae,Ae=b),Ae===u&&(Ae=ee,i.charCodeAt(ee)===45?(rt=c,ee++):(rt=u,Mt===0&&qe(y)),rt!==u?(lt=ee,(nt=Ho())!==u?(i.charCodeAt(ee)===46?(ut=me,ee++):(ut=u,Mt===0&&qe(le)),ut!==u&&(Pt=Ho())!==u?lt=nt=[nt,ut,Pt]:(ee=lt,lt=b)):(ee=lt,lt=b),lt!==u?(er=Ae,Ae=rt=v(lt)):(ee=Ae,Ae=b)):(ee=Ae,Ae=b)),fe[At]={nextPos:ee,result:Ae},Ae)}function Co(){var Ae,rt,lt,nt,ut,Pt=49*ee+26,At=fe[Pt];if(At)return ee=At.nextPos,At.result;if(Ae=ee,i.charCodeAt(ee)===43?(rt=$e,ee++):(rt=u,Mt===0&&qe(ve)),rt===u&&(rt=P),rt!==u){if(lt=[],(nt=Jr())!==u)for(;nt!==u;)lt.push(nt),nt=Jr();else lt=b;lt!==u?(nt=ee,Mt++,i.charCodeAt(ee)===46?(ut=me,ee++):(ut=u,Mt===0&&qe(le)),Mt--,ut===u?nt=g:(ee=nt,nt=b),nt!==u?(er=Ae,Ae=rt=ue(lt)):(ee=Ae,Ae=b)):(ee=Ae,Ae=b)}else ee=Ae,Ae=b;if(Ae===u)if(Ae=ee,i.charCodeAt(ee)===45?(rt=c,ee++):(rt=u,Mt===0&&qe(y)),rt!==u){if(lt=[],(nt=Jr())!==u)for(;nt!==u;)lt.push(nt),nt=Jr();else lt=b;lt!==u?(nt=ee,Mt++,i.charCodeAt(ee)===46?(ut=me,ee++):(ut=u,Mt===0&&qe(le)),Mt--,ut===u?nt=g:(ee=nt,nt=b),nt!==u?(er=Ae,Ae=rt=v(lt)):(ee=Ae,Ae=b)):(ee=Ae,Ae=b)}else ee=Ae,Ae=b;return fe[Pt]={nextPos:ee,result:Ae},Ae}function Xa(){var Ae,rt,lt,nt,ut,Pt=49*ee+29,At=fe[Pt];if(At)return ee=At.nextPos,At.result;for(Ae=ee,rt=[],lt=oo();lt!==u;)rt.push(lt),lt=oo();if(rt!==u)if((lt=fo())!==u){for(nt=[],ut=oo();ut!==u;)nt.push(ut),ut=oo();nt!==u?(er=Ae,Ae=rt=Ot(lt)):(ee=Ae,Ae=b)}else ee=Ae,Ae=b;else ee=Ae,Ae=b;return fe[Pt]={nextPos:ee,result:Ae},Ae}function ea(){var Ae,rt,lt,nt,ut,Pt,At,cr=49*ee+30,lr=fe[cr];if(lr)return ee=lr.nextPos,lr.result;for(Ae=ee,rt=[],lt=oo();lt!==u;)rt.push(lt),lt=oo();if(rt!==u)if((lt=fo())!==u){for(nt=[],ut=oo();ut!==u;)nt.push(ut),ut=oo();if(nt!==u)if(i.charCodeAt(ee)===44?(ut=Ft,ee++):(ut=u,Mt===0&&qe(Yt)),ut!==u){for(Pt=[],At=oo();At!==u;)Pt.push(At),At=oo();Pt!==u?(er=Ae,Ae=rt=Ot(lt)):(ee=Ae,Ae=b)}else ee=Ae,Ae=b;else ee=Ae,Ae=b}else ee=Ae,Ae=b;else ee=Ae,Ae=b;return fe[cr]={nextPos:ee,result:Ae},Ae}function oo(){var Ae,rt=49*ee+31,lt=fe[rt];return lt?(ee=lt.nextPos,lt.result):((Ae=Sr())===u&&(Ae=Rn())===u&&(Ae=fr()),fe[rt]={nextPos:ee,result:Ae},Ae)}function Ga(){var Ae,rt,lt,nt,ut,Pt,At,cr,lr,xr,kr,gr=49*ee+33,tr=fe[gr];if(tr)return ee=tr.nextPos,tr.result;for(Ae=ee,rt=[],lt=Sr();lt!==u;)rt.push(lt),lt=Sr();if(rt!==u)if((lt=Ko())!==u){for(nt=[],ut=Sr();ut!==u;)nt.push(ut),ut=Sr();if(nt!==u)if(i.charCodeAt(ee)===61?(ut=C,ee++):(ut=u,Mt===0&&qe(q)),ut!==u){for(Pt=[],At=Sr();At!==u;)Pt.push(At),At=Sr();if(Pt!==u)if((At=fo())!==u){for(cr=[],lr=Sr();lr!==u;)cr.push(lr),lr=Sr();if(cr!==u)if(i.charCodeAt(ee)===44?(lr=Ft,ee++):(lr=u,Mt===0&&qe(Yt)),lr!==u){for(xr=[],kr=Sr();kr!==u;)xr.push(kr),kr=Sr();xr!==u?(er=Ae,Ae=rt=Pe(lt,At)):(ee=Ae,Ae=b)}else ee=Ae,Ae=b;else ee=Ae,Ae=b}else ee=Ae,Ae=b;else ee=Ae,Ae=b}else ee=Ae,Ae=b;else ee=Ae,Ae=b}else ee=Ae,Ae=b;else ee=Ae,Ae=b;if(Ae===u){for(Ae=ee,rt=[],lt=Sr();lt!==u;)rt.push(lt),lt=Sr();if(rt!==u)if((lt=Ko())!==u){for(nt=[],ut=Sr();ut!==u;)nt.push(ut),ut=Sr();if(nt!==u)if(i.charCodeAt(ee)===61?(ut=C,ee++):(ut=u,Mt===0&&qe(q)),ut!==u){for(Pt=[],At=Sr();At!==u;)Pt.push(At),At=Sr();Pt!==u&&(At=fo())!==u?(er=Ae,Ae=rt=Pe(lt,At)):(ee=Ae,Ae=b)}else ee=Ae,Ae=b;else ee=Ae,Ae=b}else ee=Ae,Ae=b;else ee=Ae,Ae=b}return fe[gr]={nextPos:ee,result:Ae},Ae}function Oi(){var Ae,rt,lt,nt=49*ee+34,ut=fe[nt];return ut?(ee=ut.nextPos,ut.result):(Ae=ee,i.charCodeAt(ee)===46?(rt=me,ee++):(rt=u,Mt===0&&qe(le)),rt!==u&&(lt=Ho())!==u?(er=Ae,Ae=rt=ct(lt)):(ee=Ae,Ae=b),fe[nt]={nextPos:ee,result:Ae},Ae)}function ta(){var Ae,rt,lt,nt,ut,Pt,At,cr,lr,xr,kr,gr,tr=49*ee+35,Zr=fe[tr];return Zr?(ee=Zr.nextPos,Zr.result):(Ae=ee,rt=ee,(lt=Jr())!==u&&(nt=Jr())!==u&&(ut=Jr())!==u&&(Pt=Jr())!==u?(i.charCodeAt(ee)===45?(At=c,ee++):(At=u,Mt===0&&qe(y)),At!==u&&(cr=Jr())!==u&&(lr=Jr())!==u?(i.charCodeAt(ee)===45?(xr=c,ee++):(xr=u,Mt===0&&qe(y)),xr!==u&&(kr=Jr())!==u&&(gr=Jr())!==u?rt=lt=[lt,nt,ut,Pt,At,cr,lr,xr,kr,gr]:(ee=rt,rt=b)):(ee=rt,rt=b)):(ee=rt,rt=b),rt!==u&&(er=Ae,rt=dt(rt)),Ae=rt,fe[tr]={nextPos:ee,result:Ae},Ae)}function Sr(){var Ae,rt=49*ee+39,lt=fe[rt];return lt?(ee=lt.nextPos,lt.result):(D.test(i.charAt(ee))?(Ae=i.charAt(ee),ee++):(Ae=u,Mt===0&&qe(xe)),fe[rt]={nextPos:ee,result:Ae},Ae)}function Rn(){var Ae,rt,lt,nt=49*ee+40,ut=fe[nt];return ut?(ee=ut.nextPos,ut.result):(i.charCodeAt(ee)===10?(Ae=ot,ee++):(Ae=u,Mt===0&&qe(at)),Ae===u&&(Ae=ee,i.charCodeAt(ee)===13?(rt=yt,ee++):(rt=u,Mt===0&&qe(Tt)),rt!==u?(i.charCodeAt(ee)===10?(lt=ot,ee++):(lt=u,Mt===0&&qe(at)),lt!==u?Ae=rt=[rt,lt]:(ee=Ae,Ae=b)):(ee=Ae,Ae=b)),fe[nt]={nextPos:ee,result:Ae},Ae)}function Wa(){var Ae,rt=49*ee+41,lt=fe[rt];return lt?(ee=lt.nextPos,lt.result):((Ae=Rn())===u&&(Ae=Sr()),fe[rt]={nextPos:ee,result:Ae},Ae)}function ra(){var Ae,rt,lt=49*ee+42,nt=fe[lt];return nt?(ee=nt.nextPos,nt.result):(Ae=ee,Mt++,i.length>ee?(rt=i.charAt(ee),ee++):(rt=u,Mt===0&&qe(p)),Mt--,rt===u?Ae=g:(ee=Ae,Ae=b),fe[lt]={nextPos:ee,result:Ae},Ae)}function io(){var Ae,rt=49*ee+43,lt=fe[rt];return lt?(ee=lt.nextPos,lt.result):(Kt.test(i.charAt(ee))?(Ae=i.charAt(ee),ee++):(Ae=u,Mt===0&&qe(Et)),fe[rt]={nextPos:ee,result:Ae},Ae)}function Jr(){var Ae,rt,lt=49*ee+44,nt=fe[lt];return nt?(ee=nt.nextPos,nt.result):(Rt.test(i.charAt(ee))?(Ae=i.charAt(ee),ee++):(Ae=u,Mt===0&&qe(St)),Ae===u&&(Ae=ee,i.charCodeAt(ee)===95?(rt=Ht,ee++):(rt=u,Mt===0&&qe(Lt)),rt!==u&&(er=Ae,rt=qt()),Ae=rt),fe[lt]={nextPos:ee,result:Ae},Ae)}function Pi(){var Ae,rt=49*ee+45,lt=fe[rt];return lt?(ee=lt.nextPos,lt.result):(It.test(i.charAt(ee))?(Ae=i.charAt(ee),ee++):(Ae=u,Mt===0&&qe(rr)),fe[rt]={nextPos:ee,result:Ae},Ae)}function Ho(){var Ae,rt,lt,nt=49*ee+46,ut=fe[nt];if(ut)return ee=ut.nextPos,ut.result;if(Ae=ee,rt=[],(lt=Jr())!==u)for(;lt!==u;)rt.push(lt),lt=Jr();else rt=b;return rt!==u&&(er=Ae,rt=ye(rt)),Ae=rt,fe[nt]={nextPos:ee,result:Ae},Ae}function su(){var Ae,rt,lt=49*ee+47,nt=fe[lt];return nt?(ee=nt.nextPos,nt.result):(Ae=ee,i.substr(ee,2)===Me?(rt=Me,ee+=2):(rt=u,Mt===0&&qe(H)),rt!==u&&(er=Ae,rt=G()),(Ae=rt)===u&&(Ae=ee,i.substr(ee,2)===ne?(rt=ne,ee+=2):(rt=u,Mt===0&&qe(se)),rt!==u&&(er=Ae,rt=he()),(Ae=rt)===u&&(Ae=ee,i.substr(ee,2)===Le?(rt=Le,ee+=2):(rt=u,Mt===0&&qe(Ie)),rt!==u&&(er=Ae,rt=Te()),(Ae=rt)===u&&(Ae=ee,i.substr(ee,2)===Ce?(rt=Ce,ee+=2):(rt=u,Mt===0&&qe(Ge)),rt!==u&&(er=Ae,rt=Je()),(Ae=rt)===u&&(Ae=ee,i.substr(ee,2)===ft?(rt=ft,ee+=2):(rt=u,Mt===0&&qe(gt)),rt!==u&&(er=Ae,rt=Nt()),(Ae=rt)===u&&(Ae=ee,i.substr(ee,2)===Vt?(rt=Vt,ee+=2):(rt=u,Mt===0&&qe(Gt)),rt!==u&&(er=Ae,rt=Ye()),(Ae=rt)===u&&(Ae=ee,i.substr(ee,2)===ir?(rt=ir,ee+=2):(rt=u,Mt===0&&qe(or)),rt!==u&&(er=Ae,rt=sr()),(Ae=rt)===u&&(Ae=function(){var ut,Pt,At,cr,lr,xr,kr,gr,tr,Zr,$r,Br=49*ee+48,on=fe[Br];return on?(ee=on.nextPos,on.result):(ut=ee,i.substr(ee,2)===pr?(Pt=pr,ee+=2):(Pt=u,Mt===0&&qe(Er)),Pt!==u?(At=ee,(cr=io())!==u&&(lr=io())!==u&&(xr=io())!==u&&(kr=io())!==u&&(gr=io())!==u&&(tr=io())!==u&&(Zr=io())!==u&&($r=io())!==u?At=cr=[cr,lr,xr,kr,gr,tr,Zr,$r]:(ee=At,At=b),At!==u?(er=ut,ut=Pt=hr(At)):(ee=ut,ut=b)):(ee=ut,ut=b),ut===u&&(ut=ee,i.substr(ee,2)===br?(Pt=br,ee+=2):(Pt=u,Mt===0&&qe(ur)),Pt!==u?(At=ee,(cr=io())!==u&&(lr=io())!==u&&(xr=io())!==u&&(kr=io())!==u?At=cr=[cr,lr,xr,kr]:(ee=At,At=b),At!==u?(er=ut,ut=Pt=hr(At)):(ee=ut,ut=b)):(ee=ut,ut=b)),fe[Br]={nextPos:ee,result:ut},ut)}()))))))),fe[lt]={nextPos:ee,result:Ae},Ae)}var uu=[];function Bo(Ae){uu.push(Ae)}function En(Ae,rt,lt,nt,ut){var Pt={type:Ae,value:rt,line:lt(),column:nt()};return ut&&(Pt.key=ut),Pt}if((s=_())!==u&&ee===i.length)return s;throw s!==u&&ee<i.length&&qe({type:"end",description:"end of input"}),Ut(null,Lr,jr)}}}()},1430:function(o,a,i){var s,f;(function(u,r){"use strict";o.exports?o.exports=r():(f=typeof(s=r)=="function"?s.call(a,i,a,o):s)===void 0||(o.exports=f)})(0,function(u){"use strict";var r=u&&u.IPv6;return{best:function(_){var d,b,T=_.toLowerCase().split(":"),w=T.length,g=8;for(T[0]===""&&T[1]===""&&T[2]===""?(T.shift(),T.shift()):T[0]===""&&T[1]===""?T.shift():T[w-1]===""&&T[w-2]===""&&T.pop(),T[(w=T.length)-1].indexOf(".")!==-1&&(g=7),d=0;d<w&&T[d]!=="";d++);if(d<g)for(T.splice(d,1,"0000");T.length<g;)T.splice(d,0,"0000");for(var p=0;p<g;p++){b=T[p].split("");for(var A=0;A<3&&b[0]==="0"&&b.length>1;A++)b.splice(0,1);T[p]=b.join("")}var L=-1,E=0,N=0,F=-1,R=!1;for(p=0;p<g;p++)R?T[p]==="0"?N+=1:(R=!1,N>E&&(L=F,E=N)):T[p]==="0"&&(R=!0,F=p,N=1);N>E&&(L=F,E=N),E>1&&T.splice(L,E,""),w=T.length;var j="";for(T[0]===""&&(j=":"),p=0;p<w&&(j+=T[p],p!==w-1);p++)j+=":";return T[w-1]===""&&(j+=":"),j},noConflict:function(){return u.IPv6===this&&(u.IPv6=r),this}}})},4704:function(o,a,i){var s,f;(function(u,r){"use strict";o.exports?o.exports=r():(f=typeof(s=r)=="function"?s.call(a,i,a,o):s)===void 0||(o.exports=f)})(0,function(u){"use strict";var r=u&&u.SecondLevelDomains,_={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(d){var b=d.lastIndexOf(".");if(b<=0||b>=d.length-1)return!1;var T=d.lastIndexOf(".",b-1);if(T<=0||T>=b-1)return!1;var w=_.list[d.slice(b+1)];return!!w&&w.indexOf(" "+d.slice(T+1,b)+" ")>=0},is:function(d){var b=d.lastIndexOf(".");if(b<=0||b>=d.length-1||d.lastIndexOf(".",b-1)>=0)return!1;var T=_.list[d.slice(b+1)];return!!T&&T.indexOf(" "+d.slice(0,b)+" ")>=0},get:function(d){var b=d.lastIndexOf(".");if(b<=0||b>=d.length-1)return null;var T=d.lastIndexOf(".",b-1);if(T<=0||T>=b-1)return null;var w=_.list[d.slice(b+1)];return w?w.indexOf(" "+d.slice(T+1,b)+" ")<0?null:d.slice(T+1):null},noConflict:function(){return u.SecondLevelDomains===this&&(u.SecondLevelDomains=r),this}};return _})},4193:function(o,a,i){var s,f,u;(function(r,_){"use strict";o.exports?o.exports=_(i(9340),i(1430),i(4704)):(f=[i(9340),i(1430),i(4704)],(u=typeof(s=_)=="function"?s.apply(a,f):s)===void 0||(o.exports=u))})(0,function(r,_,d,b){"use strict";var T=b&&b.URI;function w(l,x){var W=arguments.length>=1;if(!(this instanceof w))return W?arguments.length>=2?new w(l,x):new w(l):new w;if(l===void 0){if(W)throw new TypeError("undefined is not a valid argument for URI");l=typeof location<"u"?location.href+"":""}if(l===null&&W)throw new TypeError("null is not a valid argument for URI");return this.href(l),x!==void 0?this.absoluteTo(x):this}w.version="1.19.11";var g=w.prototype,p=Object.prototype.hasOwnProperty;function A(l){return l.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function L(l){return l===void 0?"Undefined":String(Object.prototype.toString.call(l)).slice(8,-1)}function E(l){return L(l)==="Array"}function N(l,x){var W,K,re={};if(L(x)==="RegExp")re=null;else if(E(x))for(W=0,K=x.length;W<K;W++)re[x[W]]=!0;else re[x]=!0;for(W=0,K=l.length;W<K;W++)(re&&re[l[W]]!==void 0||!re&&x.test(l[W]))&&(l.splice(W,1),K--,W--);return l}function F(l,x){var W,K;if(E(x)){for(W=0,K=x.length;W<K;W++)if(!F(l,x[W]))return!1;return!0}var re=L(x);for(W=0,K=l.length;W<K;W++)if(re==="RegExp"){if(typeof l[W]=="string"&&l[W].match(x))return!0}else if(l[W]===x)return!0;return!1}function R(l,x){if(!E(l)||!E(x)||l.length!==x.length)return!1;l.sort(),x.sort();for(var W=0,K=l.length;W<K;W++)if(l[W]!==x[W])return!1;return!0}function j(l){return l.replace(/^\/+|\/+$/g,"")}function V(l){return escape(l)}function Y(l){return encodeURIComponent(l).replace(/[!'()*]/g,V).replace(/\*/g,"%2A")}w._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:w.preventInvalidHostname,duplicateQueryParameters:w.duplicateQueryParameters,escapeQuerySpace:w.escapeQuerySpace}},w.preventInvalidHostname=!1,w.duplicateQueryParameters=!1,w.escapeQuerySpace=!0,w.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,w.idn_expression=/[^a-z0-9\._-]/i,w.punycode_expression=/(xn--)/i,w.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,w.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,w.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))/gi,w.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\xab\xbb\u201c\u201d\u201e\u2018\u2019]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},w.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,w.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,w.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},w.hostProtocols=["http","https"],w.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,w.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},w.getDomAttribute=function(l){if(l&&l.nodeName){var x=l.nodeName.toLowerCase();if(x!=="input"||l.type==="image")return w.domAttributes[x]}},w.encode=Y,w.decode=decodeURIComponent,w.iso8859=function(){w.encode=escape,w.decode=unescape},w.unicode=function(){w.encode=Y,w.decode=decodeURIComponent},w.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},w.encodeQuery=function(l,x){var W=w.encode(l+"");return x===void 0&&(x=w.escapeQuerySpace),x?W.replace(/%20/g,"+"):W},w.decodeQuery=function(l,x){l+="",x===void 0&&(x=w.escapeQuerySpace);try{return w.decode(x?l.replace(/\+/g,"%20"):l)}catch{return l}};var me,le={encode:"encode",decode:"decode"},C=function(l,x){return function(W){try{return w[x](W+"").replace(w.characters[l][x].expression,function(K){return w.characters[l][x].map[K]})}catch{return W}}};for(me in le)w[me+"PathSegment"]=C("pathname",le[me]),w[me+"UrnPathSegment"]=C("urnpath",le[me]);var q=function(l,x,W){return function(K){var re;re=W?function(Oe){return w[x](w[W](Oe))}:w[x];for(var oe=(K+"").split(l),Ee=0,Fe=oe.length;Ee<Fe;Ee++)oe[Ee]=re(oe[Ee]);return oe.join(l)}};function X(l){return function(x,W){return x===void 0?this._parts[l]||"":(this._parts[l]=x||null,this.build(!W),this)}}function ae(l,x){return function(W,K){return W===void 0?this._parts[l]||"":(W!==null&&(W+="").charAt(0)===x&&(W=W.substring(1)),this._parts[l]=W,this.build(!K),this)}}w.decodePath=q("/","decodePathSegment"),w.decodeUrnPath=q(":","decodeUrnPathSegment"),w.recodePath=q("/","encodePathSegment","decode"),w.recodeUrnPath=q(":","encodeUrnPathSegment","decode"),w.encodeReserved=C("reserved","encode"),w.parse=function(l,x){var W;return x||(x={preventInvalidHostname:w.preventInvalidHostname}),(W=(l=(l=l.replace(w.leading_whitespace_expression,"")).replace(w.ascii_tab_whitespace,"")).indexOf("#"))>-1&&(x.fragment=l.substring(W+1)||null,l=l.substring(0,W)),(W=l.indexOf("?"))>-1&&(x.query=l.substring(W+1)||null,l=l.substring(0,W)),(l=(l=l.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)==="//"?(x.protocol=null,l=l.substring(2),l=w.parseAuthority(l,x)):(W=l.indexOf(":"))>-1&&(x.protocol=l.substring(0,W)||null,x.protocol&&!x.protocol.match(w.protocol_expression)?x.protocol=void 0:l.substring(W+1,W+3).replace(/\\/g,"/")==="//"?(l=l.substring(W+3),l=w.parseAuthority(l,x)):(l=l.substring(W+1),x.urn=!0)),x.path=l,x},w.parseHost=function(l,x){l||(l="");var W,K,re=(l=l.replace(/\\/g,"/")).indexOf("/");if(re===-1&&(re=l.length),l.charAt(0)==="[")W=l.indexOf("]"),x.hostname=l.substring(1,W)||null,x.port=l.substring(W+2,re)||null,x.port==="/"&&(x.port=null);else{var oe=l.indexOf(":"),Ee=l.indexOf("/"),Fe=l.indexOf(":",oe+1);Fe!==-1&&(Ee===-1||Fe<Ee)?(x.hostname=l.substring(0,re)||null,x.port=null):(K=l.substring(0,re).split(":"),x.hostname=K[0]||null,x.port=K[1]||null)}return x.hostname&&l.substring(re).charAt(0)!=="/"&&(re++,l="/"+l),x.preventInvalidHostname&&w.ensureValidHostname(x.hostname,x.protocol),x.port&&w.ensureValidPort(x.port),l.substring(re)||"/"},w.parseAuthority=function(l,x){return l=w.parseUserinfo(l,x),w.parseHost(l,x)},w.parseUserinfo=function(l,x){var W=l;l.indexOf("\\")!==-1&&(l=l.replace(/\\/g,"/"));var K,re=l.indexOf("/"),oe=l.lastIndexOf("@",re>-1?re:l.length-1);return oe>-1&&(re===-1||oe<re)?(K=l.substring(0,oe).split(":"),x.username=K[0]?w.decode(K[0]):null,K.shift(),x.password=K[0]?w.decode(K.join(":")):null,l=W.substring(oe+1)):(x.username=null,x.password=null),l},w.parseQuery=function(l,x){if(!l)return{};if(!(l=l.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var W,K,re,oe={},Ee=l.split("&"),Fe=Ee.length,Oe=0;Oe<Fe;Oe++)W=Ee[Oe].split("="),K=w.decodeQuery(W.shift(),x),re=W.length?w.decodeQuery(W.join("="),x):null,K!=="__proto__"&&(p.call(oe,K)?(typeof oe[K]!="string"&&oe[K]!==null||(oe[K]=[oe[K]]),oe[K].push(re)):oe[K]=re);return oe},w.build=function(l){var x="",W=!1;return l.protocol&&(x+=l.protocol+":"),l.urn||!x&&!l.hostname||(x+="//",W=!0),x+=w.buildAuthority(l)||"",typeof l.path=="string"&&(l.path.charAt(0)!=="/"&&W&&(x+="/"),x+=l.path),typeof l.query=="string"&&l.query&&(x+="?"+l.query),typeof l.fragment=="string"&&l.fragment&&(x+="#"+l.fragment),x},w.buildHost=function(l){var x="";return l.hostname?(w.ip6_expression.test(l.hostname)?x+="["+l.hostname+"]":x+=l.hostname,l.port&&(x+=":"+l.port),x):""},w.buildAuthority=function(l){return w.buildUserinfo(l)+w.buildHost(l)},w.buildUserinfo=function(l){var x="";return l.username&&(x+=w.encode(l.username)),l.password&&(x+=":"+w.encode(l.password)),x&&(x+="@"),x},w.buildQuery=function(l,x,W){var K,re,oe,Ee,Fe="";for(re in l)if(re!=="__proto__"&&p.call(l,re))if(E(l[re]))for(K={},oe=0,Ee=l[re].length;oe<Ee;oe++)l[re][oe]!==void 0&&K[l[re][oe]+""]===void 0&&(Fe+="&"+w.buildQueryParameter(re,l[re][oe],W),x!==!0&&(K[l[re][oe]+""]=!0));else l[re]!==void 0&&(Fe+="&"+w.buildQueryParameter(re,l[re],W));return Fe.substring(1)},w.buildQueryParameter=function(l,x,W){return w.encodeQuery(l,W)+(x!==null?"="+w.encodeQuery(x,W):"")},w.addQuery=function(l,x,W){if(typeof x=="object")for(var K in x)p.call(x,K)&&w.addQuery(l,K,x[K]);else{if(typeof x!="string")throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(l[x]===void 0)return void(l[x]=W);typeof l[x]=="string"&&(l[x]=[l[x]]),E(W)||(W=[W]),l[x]=(l[x]||[]).concat(W)}},w.setQuery=function(l,x,W){if(typeof x=="object")for(var K in x)p.call(x,K)&&w.setQuery(l,K,x[K]);else{if(typeof x!="string")throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");l[x]=W===void 0?null:W}},w.removeQuery=function(l,x,W){var K,re,oe;if(E(x))for(K=0,re=x.length;K<re;K++)l[x[K]]=void 0;else if(L(x)==="RegExp")for(oe in l)x.test(oe)&&(l[oe]=void 0);else if(typeof x=="object")for(oe in x)p.call(x,oe)&&w.removeQuery(l,oe,x[oe]);else{if(typeof x!="string")throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");W!==void 0?L(W)==="RegExp"?!E(l[x])&&W.test(l[x])?l[x]=void 0:l[x]=N(l[x],W):l[x]!==String(W)||E(W)&&W.length!==1?E(l[x])&&(l[x]=N(l[x],W)):l[x]=void 0:l[x]=void 0}},w.hasQuery=function(l,x,W,K){switch(L(x)){case"String":break;case"RegExp":for(var re in l)if(p.call(l,re)&&x.test(re)&&(W===void 0||w.hasQuery(l,re,W)))return!0;return!1;case"Object":for(var oe in x)if(p.call(x,oe)&&!w.hasQuery(l,oe,x[oe]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(L(W)){case"Undefined":return x in l;case"Boolean":return W===!!(E(l[x])?l[x].length:l[x]);case"Function":return!!W(l[x],x,l);case"Array":return!!E(l[x])&&(K?F:R)(l[x],W);case"RegExp":return E(l[x])?!!K&&F(l[x],W):!!(l[x]&&l[x].match(W));case"Number":W=String(W);case"String":return E(l[x])?!!K&&F(l[x],W):l[x]===W;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},w.joinPaths=function(){for(var l=[],x=[],W=0,K=0;K<arguments.length;K++){var re=new w(arguments[K]);l.push(re);for(var oe=re.segment(),Ee=0;Ee<oe.length;Ee++)typeof oe[Ee]=="string"&&x.push(oe[Ee]),oe[Ee]&&W++}if(!x.length||!W)return new w("");var Fe=new w("").segment(x);return l[0].path()!==""&&l[0].path().slice(0,1)!=="/"||Fe.path("/"+Fe.path()),Fe.normalize()},w.commonPath=function(l,x){var W,K=Math.min(l.length,x.length);for(W=0;W<K;W++)if(l.charAt(W)!==x.charAt(W)){W--;break}return W<1?l.charAt(0)===x.charAt(0)&&l.charAt(0)==="/"?"/":"":(l.charAt(W)==="/"&&x.charAt(W)==="/"||(W=l.substring(0,W).lastIndexOf("/")),l.substring(0,W+1))},w.withinString=function(l,x,W){W||(W={});var K=W.start||w.findUri.start,re=W.end||w.findUri.end,oe=W.trim||w.findUri.trim,Ee=W.parens||w.findUri.parens,Fe=/[a-z0-9-]=["']?$/i;for(K.lastIndex=0;;){var Oe=K.exec(l);if(!Oe)break;var $=Oe.index;if(W.ignoreHtml){var de=l.slice(Math.max($-3,0),$);if(de&&Fe.test(de))continue}for(var we=$+l.slice($).search(re),Qe=l.slice($,we),ze=-1;;){var We=Ee.exec(Qe);if(!We)break;var et=We.index+We[0].length;ze=Math.max(ze,et)}if(!((Qe=ze>-1?Qe.slice(0,ze)+Qe.slice(ze).replace(oe,""):Qe.replace(oe,"")).length<=Oe[0].length||W.ignore&&W.ignore.test(Qe))){var Be=x(Qe,$,we=$+Qe.length,l);Be!==void 0?(Be=String(Be),l=l.slice(0,$)+Be+l.slice(we),K.lastIndex=$+Be.length):K.lastIndex=we}}return K.lastIndex=0,l},w.ensureValidHostname=function(l,x){var W=!!l,K=!1;if(x&&(K=F(w.hostProtocols,x)),K&&!W)throw new TypeError("Hostname cannot be empty, if protocol is "+x);if(l&&l.match(w.invalid_hostname_characters)){if(!r)throw new TypeError('Hostname "'+l+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(r.toASCII(l).match(w.invalid_hostname_characters))throw new TypeError('Hostname "'+l+'" contains characters other than [A-Z0-9.-:_]')}},w.ensureValidPort=function(l){if(l){var x=Number(l);if(!(/^[0-9]+$/.test(x)&&x>0&&x<65536))throw new TypeError('Port "'+l+'" is not a valid port')}},w.noConflict=function(l){if(l){var x={URI:this.noConflict()};return b.URITemplate&&typeof b.URITemplate.noConflict=="function"&&(x.URITemplate=b.URITemplate.noConflict()),b.IPv6&&typeof b.IPv6.noConflict=="function"&&(x.IPv6=b.IPv6.noConflict()),b.SecondLevelDomains&&typeof b.SecondLevelDomains.noConflict=="function"&&(x.SecondLevelDomains=b.SecondLevelDomains.noConflict()),x}return b.URI===this&&(b.URI=T),this},g.build=function(l){return l===!0?this._deferred_build=!0:(l===void 0||this._deferred_build)&&(this._string=w.build(this._parts),this._deferred_build=!1),this},g.clone=function(){return new w(this)},g.valueOf=g.toString=function(){return this.build(!1)._string},g.protocol=X("protocol"),g.username=X("username"),g.password=X("password"),g.hostname=X("hostname"),g.port=X("port"),g.query=ae("query","?"),g.fragment=ae("fragment","#"),g.search=function(l,x){var W=this.query(l,x);return typeof W=="string"&&W.length?"?"+W:W},g.hash=function(l,x){var W=this.fragment(l,x);return typeof W=="string"&&W.length?"#"+W:W},g.pathname=function(l,x){if(l===void 0||l===!0){var W=this._parts.path||(this._parts.hostname?"/":"");return l?(this._parts.urn?w.decodeUrnPath:w.decodePath)(W):W}return this._parts.urn?this._parts.path=l?w.recodeUrnPath(l):"":this._parts.path=l?w.recodePath(l):"/",this.build(!x),this},g.path=g.pathname,g.href=function(l,x){var W;if(l===void 0)return this.toString();this._string="",this._parts=w._parts();var K=l instanceof w,re=typeof l=="object"&&(l.hostname||l.path||l.pathname);if(l.nodeName&&(l=l[w.getDomAttribute(l)]||"",re=!1),!K&&re&&l.pathname!==void 0&&(l=l.toString()),typeof l=="string"||l instanceof String)this._parts=w.parse(String(l),this._parts);else{if(!K&&!re)throw new TypeError("invalid input");var oe=K?l._parts:l;for(W in oe)W!=="query"&&p.call(this._parts,W)&&(this._parts[W]=oe[W]);oe.query&&this.query(oe.query,!1)}return this.build(!x),this},g.is=function(l){var x=!1,W=!1,K=!1,re=!1,oe=!1,Ee=!1,Fe=!1,Oe=!this._parts.urn;switch(this._parts.hostname&&(Oe=!1,W=w.ip4_expression.test(this._parts.hostname),K=w.ip6_expression.test(this._parts.hostname),oe=(re=!(x=W||K))&&d&&d.has(this._parts.hostname),Ee=re&&w.idn_expression.test(this._parts.hostname),Fe=re&&w.punycode_expression.test(this._parts.hostname)),l.toLowerCase()){case"relative":return Oe;case"absolute":return!Oe;case"domain":case"name":return re;case"sld":return oe;case"ip":return x;case"ip4":case"ipv4":case"inet4":return W;case"ip6":case"ipv6":case"inet6":return K;case"idn":return Ee;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return Fe}return null};var I=g.protocol,S=g.port,m=g.hostname;g.protocol=function(l,x){if(l&&!(l=l.replace(/:(\/\/)?$/,"")).match(w.protocol_expression))throw new TypeError('Protocol "'+l+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return I.call(this,l,x)},g.scheme=g.protocol,g.port=function(l,x){return this._parts.urn?l===void 0?"":this:(l!==void 0&&(l===0&&(l=null),l&&((l+="").charAt(0)===":"&&(l=l.substring(1)),w.ensureValidPort(l))),S.call(this,l,x))},g.hostname=function(l,x){if(this._parts.urn)return l===void 0?"":this;if(l!==void 0){var W={preventInvalidHostname:this._parts.preventInvalidHostname};if(w.parseHost(l,W)!=="/")throw new TypeError('Hostname "'+l+'" contains characters other than [A-Z0-9.-]');l=W.hostname,this._parts.preventInvalidHostname&&w.ensureValidHostname(l,this._parts.protocol)}return m.call(this,l,x)},g.origin=function(l,x){if(this._parts.urn)return l===void 0?"":this;if(l===void 0){var W=this.protocol();return this.authority()?(W?W+"://":"")+this.authority():""}var K=w(l);return this.protocol(K.protocol()).authority(K.authority()).build(!x),this},g.host=function(l,x){if(this._parts.urn)return l===void 0?"":this;if(l===void 0)return this._parts.hostname?w.buildHost(this._parts):"";if(w.parseHost(l,this._parts)!=="/")throw new TypeError('Hostname "'+l+'" contains characters other than [A-Z0-9.-]');return this.build(!x),this},g.authority=function(l,x){if(this._parts.urn)return l===void 0?"":this;if(l===void 0)return this._parts.hostname?w.buildAuthority(this._parts):"";if(w.parseAuthority(l,this._parts)!=="/")throw new TypeError('Hostname "'+l+'" contains characters other than [A-Z0-9.-]');return this.build(!x),this},g.userinfo=function(l,x){if(this._parts.urn)return l===void 0?"":this;if(l===void 0){var W=w.buildUserinfo(this._parts);return W&&W.substring(0,W.length-1)}return l[l.length-1]!=="@"&&(l+="@"),w.parseUserinfo(l,this._parts),this.build(!x),this},g.resource=function(l,x){var W;return l===void 0?this.path()+this.search()+this.hash():(W=w.parse(l),this._parts.path=W.path,this._parts.query=W.query,this._parts.fragment=W.fragment,this.build(!x),this)},g.subdomain=function(l,x){if(this._parts.urn)return l===void 0?"":this;if(l===void 0){if(!this._parts.hostname||this.is("IP"))return"";var W=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,W)||""}var K=this._parts.hostname.length-this.domain().length,re=this._parts.hostname.substring(0,K),oe=new RegExp("^"+A(re));if(l&&l.charAt(l.length-1)!=="."&&(l+="."),l.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return l&&w.ensureValidHostname(l,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(oe,l),this.build(!x),this},g.domain=function(l,x){if(this._parts.urn)return l===void 0?"":this;if(typeof l=="boolean"&&(x=l,l=void 0),l===void 0){if(!this._parts.hostname||this.is("IP"))return"";var W=this._parts.hostname.match(/\./g);if(W&&W.length<2)return this._parts.hostname;var K=this._parts.hostname.length-this.tld(x).length-1;return K=this._parts.hostname.lastIndexOf(".",K-1)+1,this._parts.hostname.substring(K)||""}if(!l)throw new TypeError("cannot set domain empty");if(l.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(w.ensureValidHostname(l,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=l;else{var re=new RegExp(A(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(re,l)}return this.build(!x),this},g.tld=function(l,x){if(this._parts.urn)return l===void 0?"":this;if(typeof l=="boolean"&&(x=l,l=void 0),l===void 0){if(!this._parts.hostname||this.is("IP"))return"";var W=this._parts.hostname.lastIndexOf("."),K=this._parts.hostname.substring(W+1);return x!==!0&&d&&d.list[K.toLowerCase()]&&d.get(this._parts.hostname)||K}var re;if(!l)throw new TypeError("cannot set TLD empty");if(l.match(/[^a-zA-Z0-9-]/)){if(!d||!d.is(l))throw new TypeError('TLD "'+l+'" contains characters other than [A-Z0-9]');re=new RegExp(A(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(re,l)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");re=new RegExp(A(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(re,l)}return this.build(!x),this},g.directory=function(l,x){if(this._parts.urn)return l===void 0?"":this;if(l===void 0||l===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var W=this._parts.path.length-this.filename().length-1,K=this._parts.path.substring(0,W)||(this._parts.hostname?"/":"");return l?w.decodePath(K):K}var re=this._parts.path.length-this.filename().length,oe=this._parts.path.substring(0,re),Ee=new RegExp("^"+A(oe));return this.is("relative")||(l||(l="/"),l.charAt(0)!=="/"&&(l="/"+l)),l&&l.charAt(l.length-1)!=="/"&&(l+="/"),l=w.recodePath(l),this._parts.path=this._parts.path.replace(Ee,l),this.build(!x),this},g.filename=function(l,x){if(this._parts.urn)return l===void 0?"":this;if(typeof l!="string"){if(!this._parts.path||this._parts.path==="/")return"";var W=this._parts.path.lastIndexOf("/"),K=this._parts.path.substring(W+1);return l?w.decodePathSegment(K):K}var re=!1;l.charAt(0)==="/"&&(l=l.substring(1)),l.match(/\.?\//)&&(re=!0);var oe=new RegExp(A(this.filename())+"$");return l=w.recodePath(l),this._parts.path=this._parts.path.replace(oe,l),re?this.normalizePath(x):this.build(!x),this},g.suffix=function(l,x){if(this._parts.urn)return l===void 0?"":this;if(l===void 0||l===!0){if(!this._parts.path||this._parts.path==="/")return"";var W,K,re=this.filename(),oe=re.lastIndexOf(".");return oe===-1?"":(W=re.substring(oe+1),K=/^[a-z0-9%]+$/i.test(W)?W:"",l?w.decodePathSegment(K):K)}l.charAt(0)==="."&&(l=l.substring(1));var Ee,Fe=this.suffix();if(Fe)Ee=l?new RegExp(A(Fe)+"$"):new RegExp(A("."+Fe)+"$");else{if(!l)return this;this._parts.path+="."+w.recodePath(l)}return Ee&&(l=w.recodePath(l),this._parts.path=this._parts.path.replace(Ee,l)),this.build(!x),this},g.segment=function(l,x,W){var K=this._parts.urn?":":"/",re=this.path(),oe=re.substring(0,1)==="/",Ee=re.split(K);if(l!==void 0&&typeof l!="number"&&(W=x,x=l,l=void 0),l!==void 0&&typeof l!="number")throw new Error('Bad segment "'+l+'", must be 0-based integer');if(oe&&Ee.shift(),l<0&&(l=Math.max(Ee.length+l,0)),x===void 0)return l===void 0?Ee:Ee[l];if(l===null||Ee[l]===void 0)if(E(x)){Ee=[];for(var Fe=0,Oe=x.length;Fe<Oe;Fe++)(x[Fe].length||Ee.length&&Ee[Ee.length-1].length)&&(Ee.length&&!Ee[Ee.length-1].length&&Ee.pop(),Ee.push(j(x[Fe])))}else(x||typeof x=="string")&&(x=j(x),Ee[Ee.length-1]===""?Ee[Ee.length-1]=x:Ee.push(x));else x?Ee[l]=j(x):Ee.splice(l,1);return oe&&Ee.unshift(""),this.path(Ee.join(K),W)},g.segmentCoded=function(l,x,W){var K,re,oe;if(typeof l!="number"&&(W=x,x=l,l=void 0),x===void 0){if(E(K=this.segment(l,x,W)))for(re=0,oe=K.length;re<oe;re++)K[re]=w.decode(K[re]);else K=K!==void 0?w.decode(K):void 0;return K}if(E(x))for(re=0,oe=x.length;re<oe;re++)x[re]=w.encode(x[re]);else x=typeof x=="string"||x instanceof String?w.encode(x):x;return this.segment(l,x,W)};var P=g.query;return g.query=function(l,x){if(l===!0)return w.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof l=="function"){var W=w.parseQuery(this._parts.query,this._parts.escapeQuerySpace),K=l.call(this,W);return this._parts.query=w.buildQuery(K||W,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!x),this}return l!==void 0&&typeof l!="string"?(this._parts.query=w.buildQuery(l,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!x),this):P.call(this,l,x)},g.setQuery=function(l,x,W){var K=w.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof l=="string"||l instanceof String)K[l]=x!==void 0?x:null;else{if(typeof l!="object")throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var re in l)p.call(l,re)&&(K[re]=l[re])}return this._parts.query=w.buildQuery(K,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof l!="string"&&(W=x),this.build(!W),this},g.addQuery=function(l,x,W){var K=w.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return w.addQuery(K,l,x===void 0?null:x),this._parts.query=w.buildQuery(K,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof l!="string"&&(W=x),this.build(!W),this},g.removeQuery=function(l,x,W){var K=w.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return w.removeQuery(K,l,x),this._parts.query=w.buildQuery(K,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof l!="string"&&(W=x),this.build(!W),this},g.hasQuery=function(l,x,W){var K=w.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return w.hasQuery(K,l,x,W)},g.setSearch=g.setQuery,g.addSearch=g.addQuery,g.removeSearch=g.removeQuery,g.hasSearch=g.hasQuery,g.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},g.normalizeProtocol=function(l){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!l)),this},g.normalizeHostname=function(l){return this._parts.hostname&&(this.is("IDN")&&r?this._parts.hostname=r.toASCII(this._parts.hostname):this.is("IPv6")&&_&&(this._parts.hostname=_.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!l)),this},g.normalizePort=function(l){return typeof this._parts.protocol=="string"&&this._parts.port===w.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!l)),this},g.normalizePath=function(l){var x,W=this._parts.path;if(!W)return this;if(this._parts.urn)return this._parts.path=w.recodeUrnPath(this._parts.path),this.build(!l),this;if(this._parts.path==="/")return this;var K,re,oe="";for((W=w.recodePath(W)).charAt(0)!=="/"&&(x=!0,W="/"+W),W.slice(-3)!=="/.."&&W.slice(-2)!=="/."||(W+="/"),W=W.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),x&&(oe=W.substring(1).match(/^(\.\.\/)+/)||"")&&(oe=oe[0]);(K=W.search(/\/\.\.(\/|$)/))!==-1;)K!==0?((re=W.substring(0,K).lastIndexOf("/"))===-1&&(re=K),W=W.substring(0,re)+W.substring(K+3)):W=W.substring(3);return x&&this.is("relative")&&(W=oe+W.substring(1)),this._parts.path=W,this.build(!l),this},g.normalizePathname=g.normalizePath,g.normalizeQuery=function(l){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(w.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!l)),this},g.normalizeFragment=function(l){return this._parts.fragment||(this._parts.fragment=null,this.build(!l)),this},g.normalizeSearch=g.normalizeQuery,g.normalizeHash=g.normalizeFragment,g.iso8859=function(){var l=w.encode,x=w.decode;w.encode=escape,w.decode=decodeURIComponent;try{this.normalize()}finally{w.encode=l,w.decode=x}return this},g.unicode=function(){var l=w.encode,x=w.decode;w.encode=Y,w.decode=unescape;try{this.normalize()}finally{w.encode=l,w.decode=x}return this},g.readable=function(){var l=this.clone();l.username("").password("").normalize();var x="";if(l._parts.protocol&&(x+=l._parts.protocol+"://"),l._parts.hostname&&(l.is("punycode")&&r?(x+=r.toUnicode(l._parts.hostname),l._parts.port&&(x+=":"+l._parts.port)):x+=l.host()),l._parts.hostname&&l._parts.path&&l._parts.path.charAt(0)!=="/"&&(x+="/"),x+=l.path(!0),l._parts.query){for(var W="",K=0,re=l._parts.query.split("&"),oe=re.length;K<oe;K++){var Ee=(re[K]||"").split("=");W+="&"+w.decodeQuery(Ee[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),Ee[1]!==void 0&&(W+="="+w.decodeQuery(Ee[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}x+="?"+W.substring(1)}return x+=w.decodeQuery(l.hash(),!0)},g.absoluteTo=function(l){var x,W,K,re=this.clone(),oe=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(l instanceof w||(l=new w(l)),re._parts.protocol||(re._parts.protocol=l._parts.protocol,this._parts.hostname))return re;for(W=0;K=oe[W];W++)re._parts[K]=l._parts[K];return re._parts.path?(re._parts.path.substring(-2)===".."&&(re._parts.path+="/"),re.path().charAt(0)!=="/"&&(x=(x=l.directory())||(l.path().indexOf("/")===0?"/":""),re._parts.path=(x?x+"/":"")+re._parts.path,re.normalizePath())):(re._parts.path=l._parts.path,re._parts.query||(re._parts.query=l._parts.query)),re.build(),re},g.relativeTo=function(l){var x,W,K,re,oe,Ee=this.clone().normalize();if(Ee._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(l=new w(l).normalize(),x=Ee._parts,W=l._parts,re=Ee.path(),oe=l.path(),re.charAt(0)!=="/")throw new Error("URI is already relative");if(oe.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(x.protocol===W.protocol&&(x.protocol=null),x.username!==W.username||x.password!==W.password||x.protocol!==null||x.username!==null||x.password!==null||x.hostname!==W.hostname||x.port!==W.port)return Ee.build();if(x.hostname=null,x.port=null,re===oe)return x.path="",Ee.build();if(!(K=w.commonPath(re,oe)))return Ee.build();var Fe=W.path.substring(K.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return x.path=Fe+x.path.substring(K.length)||"./",Ee.build()},g.equals=function(l){var x,W,K,re,oe,Ee=this.clone(),Fe=new w(l),Oe={};if(Ee.normalize(),Fe.normalize(),Ee.toString()===Fe.toString())return!0;if(K=Ee.query(),re=Fe.query(),Ee.query(""),Fe.query(""),Ee.toString()!==Fe.toString()||K.length!==re.length)return!1;for(oe in x=w.parseQuery(K,this._parts.escapeQuerySpace),W=w.parseQuery(re,this._parts.escapeQuerySpace),x)if(p.call(x,oe)){if(E(x[oe])){if(!R(x[oe],W[oe]))return!1}else if(x[oe]!==W[oe])return!1;Oe[oe]=!0}for(oe in W)if(p.call(W,oe)&&!Oe[oe])return!1;return!0},g.preventInvalidHostname=function(l){return this._parts.preventInvalidHostname=!!l,this},g.duplicateQueryParameters=function(l){return this._parts.duplicateQueryParameters=!!l,this},g.escapeQuerySpace=function(l){return this._parts.escapeQuerySpace=!!l,this},w})},9127:function(o,a,i){var s,f,u;(function(r,_){"use strict";o.exports?o.exports=_(i(4193)):(f=[i(4193)],(u=typeof(s=_)=="function"?s.apply(a,f):s)===void 0||(o.exports=u))})(0,function(r,_){"use strict";var d=_&&_.URITemplate,b=Object.prototype.hasOwnProperty;function T(A){return T._cache[A]?T._cache[A]:this instanceof T?(this.expression=A,T._cache[A]=this,this):new T(A)}function w(A){this.data=A,this.cache={}}var g=T.prototype,p={"":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encode"},"+":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},"#":{prefix:"#",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},".":{prefix:".",separator:".",named:!1,empty_name_separator:!1,encode:"encode"},"/":{prefix:"/",separator:"/",named:!1,empty_name_separator:!1,encode:"encode"},";":{prefix:";",separator:";",named:!0,empty_name_separator:!1,encode:"encode"},"?":{prefix:"?",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"},"&":{prefix:"&",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"}};return T._cache={},T.EXPRESSION_PATTERN=/\{([^a-zA-Z0-9%_]?)([^\}]+)(\}|$)/g,T.VARIABLE_PATTERN=/^([^*:.](?:\.?[^*:.])*)((\*)|:(\d+))?$/,T.VARIABLE_NAME_PATTERN=/[^a-zA-Z0-9%_.]/,T.LITERAL_PATTERN=/[<>{}"`^| \\]/,T.expand=function(A,L,E){var N,F,R,j=p[A.operator],V=j.named?"Named":"Unnamed",Y=A.variables,me=[];for(R=0;F=Y[R];R++){if((N=L.get(F.name)).type===0&&E&&E.strict)throw new Error('Missing expansion value for variable "'+F.name+'"');if(N.val.length){if(N.type>1&&F.maxlength)throw new Error('Invalid expression: Prefix modifier not applicable to variable "'+F.name+'"');me.push(T["expand"+V](N,j,F.explode,F.explode&&j.separator||",",F.maxlength,F.name))}else N.type&&me.push("")}return me.length?j.prefix+me.join(j.separator):""},T.expandNamed=function(A,L,E,N,F,R){var j,V,Y,me="",le=L.encode,C=L.empty_name_separator,q=!A[le].length,X=A.type===2?"":r[le](R);for(V=0,Y=A.val.length;V<Y;V++)F?(j=r[le](A.val[V][1].substring(0,F)),A.type===2&&(X=r[le](A.val[V][0].substring(0,F)))):q?(j=r[le](A.val[V][1]),A.type===2?(X=r[le](A.val[V][0]),A[le].push([X,j])):A[le].push([void 0,j])):(j=A[le][V][1],A.type===2&&(X=A[le][V][0])),me&&(me+=N),E?me+=X+(C||j?"=":"")+j:(V||(me+=r[le](R)+(C||j?"=":"")),A.type===2&&(me+=X+","),me+=j);return me},T.expandUnnamed=function(A,L,E,N,F){var R,j,V,Y="",me=L.encode,le=L.empty_name_separator,C=!A[me].length;for(j=0,V=A.val.length;j<V;j++)F?R=r[me](A.val[j][1].substring(0,F)):C?(R=r[me](A.val[j][1]),A[me].push([A.type===2?r[me](A.val[j][0]):void 0,R])):R=A[me][j][1],Y&&(Y+=N),A.type===2&&(Y+=F?r[me](A.val[j][0].substring(0,F)):A[me][j][0],Y+=E?le||R?"=":"":","),Y+=R;return Y},T.noConflict=function(){return _.URITemplate===T&&(_.URITemplate=d),T},g.expand=function(A,L){var E="";this.parts&&this.parts.length||this.parse(),A instanceof w||(A=new w(A));for(var N=0,F=this.parts.length;N<F;N++)E+=typeof this.parts[N]=="string"?this.parts[N]:T.expand(this.parts[N],A,L);return E},g.parse=function(){var A,L,E,N=this.expression,F=T.EXPRESSION_PATTERN,R=T.VARIABLE_PATTERN,j=T.VARIABLE_NAME_PATTERN,V=T.LITERAL_PATTERN,Y=[],me=0,le=function(X){if(X.match(V))throw new Error('Invalid Literal "'+X+'"');return X};for(F.lastIndex=0;;){if((L=F.exec(N))===null){Y.push(le(N.substring(me)));break}if(Y.push(le(N.substring(me,L.index))),me=L.index+L[0].length,!p[L[1]])throw new Error('Unknown Operator "'+L[1]+'" in "'+L[0]+'"');if(!L[3])throw new Error('Unclosed Expression "'+L[0]+'"');for(var C=0,q=(A=L[2].split(",")).length;C<q;C++){if((E=A[C].match(R))===null)throw new Error('Invalid Variable "'+A[C]+'" in "'+L[0]+'"');if(E[1].match(j))throw new Error('Invalid Variable Name "'+E[1]+'" in "'+L[0]+'"');A[C]={name:E[1],explode:!!E[3],maxlength:E[4]&&parseInt(E[4],10)}}if(!A.length)throw new Error('Expression Missing Variable(s) "'+L[0]+'"');Y.push({expression:L[0],operator:L[1],variables:A})}return Y.length||Y.push(le(N)),this.parts=Y,this},w.prototype.get=function(A){var L,E,N,F=this.data,R={type:0,val:[],encode:[],encodeReserved:[]};if(this.cache[A]!==void 0)return this.cache[A];if(this.cache[A]=R,(N=String(Object.prototype.toString.call(F))==="[object Function]"?F(A):String(Object.prototype.toString.call(F[A]))==="[object Function]"?F[A](A):F[A])==null)return R;if(String(Object.prototype.toString.call(N))==="[object Array]"){for(L=0,E=N.length;L<E;L++)N[L]!==void 0&&N[L]!==null&&R.val.push([void 0,String(N[L])]);R.val.length&&(R.type=3)}else if(String(Object.prototype.toString.call(N))==="[object Object]"){for(L in N)b.call(N,L)&&N[L]!==void 0&&N[L]!==null&&R.val.push([L,String(N[L])]);R.val.length&&(R.type=2)}else R.type=1,R.val.push([void 0,String(N)]);return R},r.expand=function(A,L){var E=new T(A).expand(L);return new r(E)},T})},9340:function(o,a,i){var s;o=i.nmd(o),function(f){a&&a.nodeType,o&&o.nodeType;var u=typeof i.g=="object"&&i.g;u.global!==u&&u.window!==u&&u.self;var r,_=2147483647,d=36,b=1,T=26,w=38,g=700,p=72,A=128,L="-",E=/^xn--/,N=/[^\x20-\x7E]/,F=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=d-b,V=Math.floor,Y=String.fromCharCode;function me(P){throw new RangeError(R[P])}function le(P,l){for(var x=P.length,W=[];x--;)W[x]=l(P[x]);return W}function C(P,l){var x=P.split("@"),W="";return x.length>1&&(W=x[0]+"@",P=x[1]),W+le((P=P.replace(F,".")).split("."),l).join(".")}function q(P){for(var l,x,W=[],K=0,re=P.length;K<re;)(l=P.charCodeAt(K++))>=55296&&l<=56319&&K<re?(64512&(x=P.charCodeAt(K++)))==56320?W.push(((1023&l)<<10)+(1023&x)+65536):(W.push(l),K--):W.push(l);return W}function X(P){return le(P,function(l){var x="";return l>65535&&(x+=Y((l-=65536)>>>10&1023|55296),l=56320|1023&l),x+=Y(l)}).join("")}function ae(P,l){return P+22+75*(P<26)-((l!=0)<<5)}function I(P,l,x){var W=0;for(P=x?V(P/g):P>>1,P+=V(P/l);P>j*T>>1;W+=d)P=V(P/j);return V(W+(j+1)*P/(P+w))}function S(P){var l,x,W,K,re,oe,Ee,Fe,Oe,$,de,we=[],Qe=P.length,ze=0,We=A,et=p;for((x=P.lastIndexOf(L))<0&&(x=0),W=0;W<x;++W)P.charCodeAt(W)>=128&&me("not-basic"),we.push(P.charCodeAt(W));for(K=x>0?x+1:0;K<Qe;){for(re=ze,oe=1,Ee=d;K>=Qe&&me("invalid-input"),((Fe=(de=P.charCodeAt(K++))-48<10?de-22:de-65<26?de-65:de-97<26?de-97:d)>=d||Fe>V((_-ze)/oe))&&me("overflow"),ze+=Fe*oe,!(Fe<(Oe=Ee<=et?b:Ee>=et+T?T:Ee-et));Ee+=d)oe>V(_/($=d-Oe))&&me("overflow"),oe*=$;et=I(ze-re,l=we.length+1,re==0),V(ze/l)>_-We&&me("overflow"),We+=V(ze/l),ze%=l,we.splice(ze++,0,We)}return X(we)}function m(P){var l,x,W,K,re,oe,Ee,Fe,Oe,$,de,we,Qe,ze,We,et=[];for(we=(P=q(P)).length,l=A,x=0,re=p,oe=0;oe<we;++oe)(de=P[oe])<128&&et.push(Y(de));for(W=K=et.length,K&&et.push(L);W<we;){for(Ee=_,oe=0;oe<we;++oe)(de=P[oe])>=l&&de<Ee&&(Ee=de);for(Ee-l>V((_-x)/(Qe=W+1))&&me("overflow"),x+=(Ee-l)*Qe,l=Ee,oe=0;oe<we;++oe)if((de=P[oe])<l&&++x>_&&me("overflow"),de==l){for(Fe=x,Oe=d;!(Fe<($=Oe<=re?b:Oe>=re+T?T:Oe-re));Oe+=d)We=Fe-$,ze=d-$,et.push(Y(ae($+We%ze,0))),Fe=V(We/ze);et.push(Y(ae(Fe,0))),re=I(x,Qe,W==K),x=0,++W}++x,++l}return et.join("")}r={version:"1.3.2",ucs2:{decode:q,encode:X},decode:S,encode:m,toASCII:function(P){return C(P,function(l){return N.test(l)?"xn--"+m(l):l})},toUnicode:function(P){return C(P,function(l){return E.test(l)?S(l.slice(4).toLowerCase()):l})}},(s=function(){return r}.call(a,i,a,o))===void 0||(o.exports=s)}()},1270:function(o,a,i){var s;o=i.nmd(o),function(f){a&&a.nodeType,o&&o.nodeType;var u=typeof i.g=="object"&&i.g;u.global!==u&&u.window!==u&&u.self;var r,_=2147483647,d=36,b=1,T=26,w=38,g=700,p=72,A=128,L="-",E=/^xn--/,N=/[^\x20-\x7E]/,F=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=d-b,V=Math.floor,Y=String.fromCharCode;function me(P){throw new RangeError(R[P])}function le(P,l){for(var x=P.length,W=[];x--;)W[x]=l(P[x]);return W}function C(P,l){var x=P.split("@"),W="";return x.length>1&&(W=x[0]+"@",P=x[1]),W+le((P=P.replace(F,".")).split("."),l).join(".")}function q(P){for(var l,x,W=[],K=0,re=P.length;K<re;)(l=P.charCodeAt(K++))>=55296&&l<=56319&&K<re?(64512&(x=P.charCodeAt(K++)))==56320?W.push(((1023&l)<<10)+(1023&x)+65536):(W.push(l),K--):W.push(l);return W}function X(P){return le(P,function(l){var x="";return l>65535&&(x+=Y((l-=65536)>>>10&1023|55296),l=56320|1023&l),x+=Y(l)}).join("")}function ae(P,l){return P+22+75*(P<26)-((l!=0)<<5)}function I(P,l,x){var W=0;for(P=x?V(P/g):P>>1,P+=V(P/l);P>j*T>>1;W+=d)P=V(P/j);return V(W+(j+1)*P/(P+w))}function S(P){var l,x,W,K,re,oe,Ee,Fe,Oe,$,de,we=[],Qe=P.length,ze=0,We=A,et=p;for((x=P.lastIndexOf(L))<0&&(x=0),W=0;W<x;++W)P.charCodeAt(W)>=128&&me("not-basic"),we.push(P.charCodeAt(W));for(K=x>0?x+1:0;K<Qe;){for(re=ze,oe=1,Ee=d;K>=Qe&&me("invalid-input"),((Fe=(de=P.charCodeAt(K++))-48<10?de-22:de-65<26?de-65:de-97<26?de-97:d)>=d||Fe>V((_-ze)/oe))&&me("overflow"),ze+=Fe*oe,!(Fe<(Oe=Ee<=et?b:Ee>=et+T?T:Ee-et));Ee+=d)oe>V(_/($=d-Oe))&&me("overflow"),oe*=$;et=I(ze-re,l=we.length+1,re==0),V(ze/l)>_-We&&me("overflow"),We+=V(ze/l),ze%=l,we.splice(ze++,0,We)}return X(we)}function m(P){var l,x,W,K,re,oe,Ee,Fe,Oe,$,de,we,Qe,ze,We,et=[];for(we=(P=q(P)).length,l=A,x=0,re=p,oe=0;oe<we;++oe)(de=P[oe])<128&&et.push(Y(de));for(W=K=et.length,K&&et.push(L);W<we;){for(Ee=_,oe=0;oe<we;++oe)(de=P[oe])>=l&&de<Ee&&(Ee=de);for(Ee-l>V((_-x)/(Qe=W+1))&&me("overflow"),x+=(Ee-l)*Qe,l=Ee,oe=0;oe<we;++oe)if((de=P[oe])<l&&++x>_&&me("overflow"),de==l){for(Fe=x,Oe=d;!(Fe<($=Oe<=re?b:Oe>=re+T?T:Oe-re));Oe+=d)We=Fe-$,ze=d-$,et.push(Y(ae($+We%ze,0))),Fe=V(We/ze);et.push(Y(ae(Fe,0))),re=I(x,Qe,W==K),x=0,++W}++x,++l}return et.join("")}r={version:"1.4.1",ucs2:{decode:q,encode:X},decode:S,encode:m,toASCII:function(P){return C(P,function(l){return N.test(l)?"xn--"+m(l):l})},toUnicode:function(P){return C(P,function(l){return E.test(l)?S(l.slice(4).toLowerCase()):l})}},(s=function(){return r}.call(a,i,a,o))===void 0||(o.exports=s)}()},8835:(o,a,i)=>{"use strict";var s=i(1270);function f(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var u=/^([a-z0-9.+-]+:)/i,r=/:[0-9]*$/,_=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,d=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r",`
47
- `," "]),b=["'"].concat(d),T=["%","/","?",";","#"].concat(b),w=["/","?","#"],g=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,A={javascript:!0,"javascript:":!0},L={javascript:!0,"javascript:":!0},E={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},N=i(5373);function F(R,j,V){if(R&&typeof R=="object"&&R instanceof f)return R;var Y=new f;return Y.parse(R,j,V),Y}f.prototype.parse=function(R,j,V){if(typeof R!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof R);var Y=R.indexOf("?"),me=Y!==-1&&Y<R.indexOf("#")?"?":"#",le=R.split(me);le[0]=le[0].replace(/\\/g,"/");var C=R=le.join(me);if(C=C.trim(),!V&&R.split("#").length===1){var q=_.exec(C);if(q)return this.path=C,this.href=C,this.pathname=q[1],q[2]?(this.search=q[2],this.query=j?N.parse(this.search.substr(1)):this.search.substr(1)):j&&(this.search="",this.query={}),this}var X=u.exec(C);if(X){var ae=(X=X[0]).toLowerCase();this.protocol=ae,C=C.substr(X.length)}if(V||X||C.match(/^\/\/[^@/]+@[^@/]+/)){var I=C.substr(0,2)==="//";!I||X&&L[X]||(C=C.substr(2),this.slashes=!0)}if(!L[X]&&(I||X&&!E[X])){for(var S,m,P=-1,l=0;l<w.length;l++)(x=C.indexOf(w[l]))!==-1&&(P===-1||x<P)&&(P=x);for((m=P===-1?C.lastIndexOf("@"):C.lastIndexOf("@",P))!==-1&&(S=C.slice(0,m),C=C.slice(m+1),this.auth=decodeURIComponent(S)),P=-1,l=0;l<T.length;l++){var x;(x=C.indexOf(T[l]))!==-1&&(P===-1||x<P)&&(P=x)}P===-1&&(P=C.length),this.host=C.slice(0,P),C=C.slice(P),this.parseHost(),this.hostname=this.hostname||"";var W=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!W)for(var K=this.hostname.split(/\./),re=(l=0,K.length);l<re;l++){var oe=K[l];if(oe&&!oe.match(g)){for(var Ee="",Fe=0,Oe=oe.length;Fe<Oe;Fe++)oe.charCodeAt(Fe)>127?Ee+="x":Ee+=oe[Fe];if(!Ee.match(g)){var $=K.slice(0,l),de=K.slice(l+1),we=oe.match(p);we&&($.push(we[1]),de.unshift(we[2])),de.length&&(C="/"+de.join(".")+C),this.hostname=$.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),W||(this.hostname=s.toASCII(this.hostname));var Qe=this.port?":"+this.port:"",ze=this.hostname||"";this.host=ze+Qe,this.href+=this.host,W&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),C[0]!=="/"&&(C="/"+C))}if(!A[ae])for(l=0,re=b.length;l<re;l++){var We=b[l];if(C.indexOf(We)!==-1){var et=encodeURIComponent(We);et===We&&(et=escape(We)),C=C.split(We).join(et)}}var Be=C.indexOf("#");Be!==-1&&(this.hash=C.substr(Be),C=C.slice(0,Be));var Re=C.indexOf("?");if(Re!==-1?(this.search=C.substr(Re),this.query=C.substr(Re+1),j&&(this.query=N.parse(this.query)),C=C.slice(0,Re)):j&&(this.search="",this.query={}),C&&(this.pathname=C),E[ae]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){Qe=this.pathname||"";var $e=this.search||"";this.path=Qe+$e}return this.href=this.format(),this},f.prototype.format=function(){var R=this.auth||"";R&&(R=(R=encodeURIComponent(R)).replace(/%3A/i,":"),R+="@");var j=this.protocol||"",V=this.pathname||"",Y=this.hash||"",me=!1,le="";this.host?me=R+this.host:this.hostname&&(me=R+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(me+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(le=N.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var C=this.search||le&&"?"+le||"";return j&&j.substr(-1)!==":"&&(j+=":"),this.slashes||(!j||E[j])&&me!==!1?(me="//"+(me||""),V&&V.charAt(0)!=="/"&&(V="/"+V)):me||(me=""),Y&&Y.charAt(0)!=="#"&&(Y="#"+Y),C&&C.charAt(0)!=="?"&&(C="?"+C),j+me+(V=V.replace(/[?#]/g,function(q){return encodeURIComponent(q)}))+(C=C.replace("#","%23"))+Y},f.prototype.resolve=function(R){return this.resolveObject(F(R,!1,!0)).format()},f.prototype.resolveObject=function(R){if(typeof R=="string"){var j=new f;j.parse(R,!1,!0),R=j}for(var V=new f,Y=Object.keys(this),me=0;me<Y.length;me++){var le=Y[me];V[le]=this[le]}if(V.hash=R.hash,R.href==="")return V.href=V.format(),V;if(R.slashes&&!R.protocol){for(var C=Object.keys(R),q=0;q<C.length;q++){var X=C[q];X!=="protocol"&&(V[X]=R[X])}return E[V.protocol]&&V.hostname&&!V.pathname&&(V.pathname="/",V.path=V.pathname),V.href=V.format(),V}if(R.protocol&&R.protocol!==V.protocol){if(!E[R.protocol]){for(var ae=Object.keys(R),I=0;I<ae.length;I++){var S=ae[I];V[S]=R[S]}return V.href=V.format(),V}if(V.protocol=R.protocol,R.host||L[R.protocol])V.pathname=R.pathname;else{for(var m=(R.pathname||"").split("/");m.length&&!(R.host=m.shift()););R.host||(R.host=""),R.hostname||(R.hostname=""),m[0]!==""&&m.unshift(""),m.length<2&&m.unshift(""),V.pathname=m.join("/")}if(V.search=R.search,V.query=R.query,V.host=R.host||"",V.auth=R.auth,V.hostname=R.hostname||R.host,V.port=R.port,V.pathname||V.search){var P=V.pathname||"",l=V.search||"";V.path=P+l}return V.slashes=V.slashes||R.slashes,V.href=V.format(),V}var x=V.pathname&&V.pathname.charAt(0)==="/",W=R.host||R.pathname&&R.pathname.charAt(0)==="/",K=W||x||V.host&&R.pathname,re=K,oe=V.pathname&&V.pathname.split("/")||[],Ee=(m=R.pathname&&R.pathname.split("/")||[],V.protocol&&!E[V.protocol]);if(Ee&&(V.hostname="",V.port=null,V.host&&(oe[0]===""?oe[0]=V.host:oe.unshift(V.host)),V.host="",R.protocol&&(R.hostname=null,R.port=null,R.host&&(m[0]===""?m[0]=R.host:m.unshift(R.host)),R.host=null),K=K&&(m[0]===""||oe[0]==="")),W)V.host=R.host||R.host===""?R.host:V.host,V.hostname=R.hostname||R.hostname===""?R.hostname:V.hostname,V.search=R.search,V.query=R.query,oe=m;else if(m.length)oe||(oe=[]),oe.pop(),oe=oe.concat(m),V.search=R.search,V.query=R.query;else if(R.search!=null)return Ee&&(V.host=oe.shift(),V.hostname=V.host,(we=!!(V.host&&V.host.indexOf("@")>0)&&V.host.split("@"))&&(V.auth=we.shift(),V.hostname=we.shift(),V.host=V.hostname)),V.search=R.search,V.query=R.query,V.pathname===null&&V.search===null||(V.path=(V.pathname?V.pathname:"")+(V.search?V.search:"")),V.href=V.format(),V;if(!oe.length)return V.pathname=null,V.search?V.path="/"+V.search:V.path=null,V.href=V.format(),V;for(var Fe=oe.slice(-1)[0],Oe=(V.host||R.host||oe.length>1)&&(Fe==="."||Fe==="..")||Fe==="",$=0,de=oe.length;de>=0;de--)(Fe=oe[de])==="."?oe.splice(de,1):Fe===".."?(oe.splice(de,1),$++):$&&(oe.splice(de,1),$--);if(!K&&!re)for(;$--;$)oe.unshift("..");!K||oe[0]===""||oe[0]&&oe[0].charAt(0)==="/"||oe.unshift(""),Oe&&oe.join("/").substr(-1)!=="/"&&oe.push("");var we,Qe=oe[0]===""||oe[0]&&oe[0].charAt(0)==="/";return Ee&&(V.hostname=Qe?"":oe.length?oe.shift():"",V.host=V.hostname,(we=!!(V.host&&V.host.indexOf("@")>0)&&V.host.split("@"))&&(V.auth=we.shift(),V.hostname=we.shift(),V.host=V.hostname)),(K=K||V.host&&oe.length)&&!Qe&&oe.unshift(""),oe.length>0?V.pathname=oe.join("/"):(V.pathname=null,V.path=null),V.pathname===null&&V.search===null||(V.path=(V.pathname?V.pathname:"")+(V.search?V.search:"")),V.auth=R.auth||V.auth,V.slashes=V.slashes||R.slashes,V.href=V.format(),V},f.prototype.parseHost=function(){var R=this.host,j=r.exec(R);j&&((j=j[0])!==":"&&(this.port=j.substr(1)),R=R.substr(0,R.length-j.length)),R&&(this.hostname=R)},a.parse=F,a.resolve=function(R,j){return F(R,!1,!0).resolve(j)},a.resolveObject=function(R,j){return R?F(R,!1,!0).resolveObject(j):j},a.format=function(R){return typeof R=="string"&&(R=F(R)),R instanceof f?R.format():f.prototype.format.call(R)},a.Url=f},4643:(o,a,i)=>{function s(f){try{if(!i.g.localStorage)return!1}catch{return!1}var u=i.g.localStorage[f];return u!=null&&String(u).toLowerCase()==="true"}o.exports=function(f,u){if(s("noDeprecation"))return f;var r=!1;return function(){if(!r){if(s("throwDeprecation"))throw new Error(u);s("traceDeprecation")?console.trace(u):console.warn(u),r=!0}return f.apply(this,arguments)}}},1135:o=>{o.exports=function(a){return a&&typeof a=="object"&&typeof a.copy=="function"&&typeof a.fill=="function"&&typeof a.readUInt8=="function"}},9032:(o,a,i)=>{"use strict";var s=i(7244),f=i(8184),u=i(5767),r=i(5680);function _(l){return l.call.bind(l)}var d=typeof BigInt<"u",b=typeof Symbol<"u",T=_(Object.prototype.toString),w=_(Number.prototype.valueOf),g=_(String.prototype.valueOf),p=_(Boolean.prototype.valueOf);if(d)var A=_(BigInt.prototype.valueOf);if(b)var L=_(Symbol.prototype.valueOf);function E(l,x){if(typeof l!="object")return!1;try{return x(l),!0}catch{return!1}}function N(l){return T(l)==="[object Map]"}function F(l){return T(l)==="[object Set]"}function R(l){return T(l)==="[object WeakMap]"}function j(l){return T(l)==="[object WeakSet]"}function V(l){return T(l)==="[object ArrayBuffer]"}function Y(l){return typeof ArrayBuffer<"u"&&(V.working?V(l):l instanceof ArrayBuffer)}function me(l){return T(l)==="[object DataView]"}function le(l){return typeof DataView<"u"&&(me.working?me(l):l instanceof DataView)}a.isArgumentsObject=s,a.isGeneratorFunction=f,a.isTypedArray=r,a.isPromise=function(l){return typeof Promise<"u"&&l instanceof Promise||l!==null&&typeof l=="object"&&typeof l.then=="function"&&typeof l.catch=="function"},a.isArrayBufferView=function(l){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(l):r(l)||le(l)},a.isUint8Array=function(l){return u(l)==="Uint8Array"},a.isUint8ClampedArray=function(l){return u(l)==="Uint8ClampedArray"},a.isUint16Array=function(l){return u(l)==="Uint16Array"},a.isUint32Array=function(l){return u(l)==="Uint32Array"},a.isInt8Array=function(l){return u(l)==="Int8Array"},a.isInt16Array=function(l){return u(l)==="Int16Array"},a.isInt32Array=function(l){return u(l)==="Int32Array"},a.isFloat32Array=function(l){return u(l)==="Float32Array"},a.isFloat64Array=function(l){return u(l)==="Float64Array"},a.isBigInt64Array=function(l){return u(l)==="BigInt64Array"},a.isBigUint64Array=function(l){return u(l)==="BigUint64Array"},N.working=typeof Map<"u"&&N(new Map),a.isMap=function(l){return typeof Map<"u"&&(N.working?N(l):l instanceof Map)},F.working=typeof Set<"u"&&F(new Set),a.isSet=function(l){return typeof Set<"u"&&(F.working?F(l):l instanceof Set)},R.working=typeof WeakMap<"u"&&R(new WeakMap),a.isWeakMap=function(l){return typeof WeakMap<"u"&&(R.working?R(l):l instanceof WeakMap)},j.working=typeof WeakSet<"u"&&j(new WeakSet),a.isWeakSet=function(l){return j(l)},V.working=typeof ArrayBuffer<"u"&&V(new ArrayBuffer),a.isArrayBuffer=Y,me.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&me(new DataView(new ArrayBuffer(1),0,1)),a.isDataView=le;var C=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function q(l){return T(l)==="[object SharedArrayBuffer]"}function X(l){return C!==void 0&&(q.working===void 0&&(q.working=q(new C)),q.working?q(l):l instanceof C)}function ae(l){return E(l,w)}function I(l){return E(l,g)}function S(l){return E(l,p)}function m(l){return d&&E(l,A)}function P(l){return b&&E(l,L)}a.isSharedArrayBuffer=X,a.isAsyncFunction=function(l){return T(l)==="[object AsyncFunction]"},a.isMapIterator=function(l){return T(l)==="[object Map Iterator]"},a.isSetIterator=function(l){return T(l)==="[object Set Iterator]"},a.isGeneratorObject=function(l){return T(l)==="[object Generator]"},a.isWebAssemblyCompiledModule=function(l){return T(l)==="[object WebAssembly.Module]"},a.isNumberObject=ae,a.isStringObject=I,a.isBooleanObject=S,a.isBigIntObject=m,a.isSymbolObject=P,a.isBoxedPrimitive=function(l){return ae(l)||I(l)||S(l)||m(l)||P(l)},a.isAnyArrayBuffer=function(l){return typeof Uint8Array<"u"&&(Y(l)||X(l))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(l){Object.defineProperty(a,l,{enumerable:!1,value:function(){throw new Error(l+" is not supported in userland")}})})},537:(o,a,i)=>{var s=Object.getOwnPropertyDescriptors||function(m){for(var P=Object.keys(m),l={},x=0;x<P.length;x++)l[P[x]]=Object.getOwnPropertyDescriptor(m,P[x]);return l},f=/%[sdj%]/g;a.format=function(m){if(!F(m)){for(var P=[],l=0;l<arguments.length;l++)P.push(d(arguments[l]));return P.join(" ")}l=1;for(var x=arguments,W=x.length,K=String(m).replace(f,function(oe){if(oe==="%%")return"%";if(l>=W)return oe;switch(oe){case"%s":return String(x[l++]);case"%d":return Number(x[l++]);case"%j":try{return JSON.stringify(x[l++])}catch{return"[Circular]"}default:return oe}}),re=x[l];l<W;re=x[++l])E(re)||!V(re)?K+=" "+re:K+=" "+d(re);return K},a.deprecate=function(m,P){if(typeof process<"u"&&process.noDeprecation===!0)return m;if(typeof process>"u")return function(){return a.deprecate(m,P).apply(this,arguments)};var l=!1;return function(){if(!l){if(process.throwDeprecation)throw new Error(P);process.traceDeprecation?console.trace(P):console.error(P),l=!0}return m.apply(this,arguments)}};var u={},r=/^$/;if(process.env.NODE_DEBUG){var _=process.env.NODE_DEBUG;_=_.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),r=new RegExp("^"+_+"$","i")}function d(m,P){var l={seen:[],stylize:T};return arguments.length>=3&&(l.depth=arguments[2]),arguments.length>=4&&(l.colors=arguments[3]),L(P)?l.showHidden=P:P&&a._extend(l,P),R(l.showHidden)&&(l.showHidden=!1),R(l.depth)&&(l.depth=2),R(l.colors)&&(l.colors=!1),R(l.customInspect)&&(l.customInspect=!0),l.colors&&(l.stylize=b),w(l,m,l.depth)}function b(m,P){var l=d.styles[P];return l?"\x1B["+d.colors[l][0]+"m"+m+"\x1B["+d.colors[l][1]+"m":m}function T(m,P){return m}function w(m,P,l){if(m.customInspect&&P&&le(P.inspect)&&P.inspect!==a.inspect&&(!P.constructor||P.constructor.prototype!==P)){var x=P.inspect(l,m);return F(x)||(x=w(m,x,l)),x}var W=function(de,we){if(R(we))return de.stylize("undefined","undefined");if(F(we)){var Qe="'"+JSON.stringify(we).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return de.stylize(Qe,"string")}if(N(we))return de.stylize(""+we,"number");if(L(we))return de.stylize(""+we,"boolean");if(E(we))return de.stylize("null","null")}(m,P);if(W)return W;var K=Object.keys(P),re=function(de){var we={};return de.forEach(function(Qe,ze){we[Qe]=!0}),we}(K);if(m.showHidden&&(K=Object.getOwnPropertyNames(P)),me(P)&&(K.indexOf("message")>=0||K.indexOf("description")>=0))return g(P);if(K.length===0){if(le(P)){var oe=P.name?": "+P.name:"";return m.stylize("[Function"+oe+"]","special")}if(j(P))return m.stylize(RegExp.prototype.toString.call(P),"regexp");if(Y(P))return m.stylize(Date.prototype.toString.call(P),"date");if(me(P))return g(P)}var Ee,Fe="",Oe=!1,$=["{","}"];return A(P)&&(Oe=!0,$=["[","]"]),le(P)&&(Fe=" [Function"+(P.name?": "+P.name:"")+"]"),j(P)&&(Fe=" "+RegExp.prototype.toString.call(P)),Y(P)&&(Fe=" "+Date.prototype.toUTCString.call(P)),me(P)&&(Fe=" "+g(P)),K.length!==0||Oe&&P.length!=0?l<0?j(P)?m.stylize(RegExp.prototype.toString.call(P),"regexp"):m.stylize("[Object]","special"):(m.seen.push(P),Ee=Oe?function(de,we,Qe,ze,We){for(var et=[],Be=0,Re=we.length;Be<Re;++Be)ae(we,String(Be))?et.push(p(de,we,Qe,ze,String(Be),!0)):et.push("");return We.forEach(function($e){$e.match(/^\d+$/)||et.push(p(de,we,Qe,ze,$e,!0))}),et}(m,P,l,re,K):K.map(function(de){return p(m,P,l,re,de,Oe)}),m.seen.pop(),function(de,we,Qe){var ze=de.reduce(function(We,et){return et.indexOf(`
48
- `)>=0,We+et.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ze>60?Qe[0]+(we===""?"":we+`
49
- `)+" "+de.join(`,
50
- `)+" "+Qe[1]:Qe[0]+we+" "+de.join(", ")+" "+Qe[1]}(Ee,Fe,$)):$[0]+Fe+$[1]}function g(m){return"["+Error.prototype.toString.call(m)+"]"}function p(m,P,l,x,W,K){var re,oe,Ee;if((Ee=Object.getOwnPropertyDescriptor(P,W)||{value:P[W]}).get?oe=Ee.set?m.stylize("[Getter/Setter]","special"):m.stylize("[Getter]","special"):Ee.set&&(oe=m.stylize("[Setter]","special")),ae(x,W)||(re="["+W+"]"),oe||(m.seen.indexOf(Ee.value)<0?(oe=E(l)?w(m,Ee.value,null):w(m,Ee.value,l-1)).indexOf(`
51
- `)>-1&&(oe=K?oe.split(`
52
- `).map(function(Fe){return" "+Fe}).join(`
53
- `).slice(2):`
54
- `+oe.split(`
55
- `).map(function(Fe){return" "+Fe}).join(`
56
- `)):oe=m.stylize("[Circular]","special")),R(re)){if(K&&W.match(/^\d+$/))return oe;(re=JSON.stringify(""+W)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(re=re.slice(1,-1),re=m.stylize(re,"name")):(re=re.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),re=m.stylize(re,"string"))}return re+": "+oe}function A(m){return Array.isArray(m)}function L(m){return typeof m=="boolean"}function E(m){return m===null}function N(m){return typeof m=="number"}function F(m){return typeof m=="string"}function R(m){return m===void 0}function j(m){return V(m)&&C(m)==="[object RegExp]"}function V(m){return typeof m=="object"&&m!==null}function Y(m){return V(m)&&C(m)==="[object Date]"}function me(m){return V(m)&&(C(m)==="[object Error]"||m instanceof Error)}function le(m){return typeof m=="function"}function C(m){return Object.prototype.toString.call(m)}function q(m){return m<10?"0"+m.toString(10):m.toString(10)}a.debuglog=function(m){if(m=m.toUpperCase(),!u[m])if(r.test(m)){var P=process.pid;u[m]=function(){var l=a.format.apply(a,arguments);console.error("%s %d: %s",m,P,l)}}else u[m]=function(){};return u[m]},a.inspect=d,d.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]},d.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},a.types=i(9032),a.isArray=A,a.isBoolean=L,a.isNull=E,a.isNullOrUndefined=function(m){return m==null},a.isNumber=N,a.isString=F,a.isSymbol=function(m){return typeof m=="symbol"},a.isUndefined=R,a.isRegExp=j,a.types.isRegExp=j,a.isObject=V,a.isDate=Y,a.types.isDate=Y,a.isError=me,a.types.isNativeError=me,a.isFunction=le,a.isPrimitive=function(m){return m===null||typeof m=="boolean"||typeof m=="number"||typeof m=="string"||typeof m=="symbol"||m===void 0},a.isBuffer=i(1135);var X=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ae(m,P){return Object.prototype.hasOwnProperty.call(m,P)}a.log=function(){var m,P;console.log("%s - %s",(m=new Date,P=[q(m.getHours()),q(m.getMinutes()),q(m.getSeconds())].join(":"),[m.getDate(),X[m.getMonth()],P].join(" ")),a.format.apply(a,arguments))},a.inherits=i(6698),a._extend=function(m,P){if(!P||!V(P))return m;for(var l=Object.keys(P),x=l.length;x--;)m[l[x]]=P[l[x]];return m};var I=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function S(m,P){if(!m){var l=new Error("Promise was rejected with a falsy value");l.reason=m,m=l}return P(m)}a.promisify=function(m){if(typeof m!="function")throw new TypeError('The "original" argument must be of type Function');if(I&&m[I]){var P;if(typeof(P=m[I])!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(P,I,{value:P,enumerable:!1,writable:!1,configurable:!0}),P}function P(){for(var l,x,W=new Promise(function(oe,Ee){l=oe,x=Ee}),K=[],re=0;re<arguments.length;re++)K.push(arguments[re]);K.push(function(oe,Ee){oe?x(oe):l(Ee)});try{m.apply(this,K)}catch(oe){x(oe)}return W}return Object.setPrototypeOf(P,Object.getPrototypeOf(m)),I&&Object.defineProperty(P,I,{value:P,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(P,s(m))},a.promisify.custom=I,a.callbackify=function(m){if(typeof m!="function")throw new TypeError('The "original" argument must be of type Function');function P(){for(var l=[],x=0;x<arguments.length;x++)l.push(arguments[x]);var W=l.pop();if(typeof W!="function")throw new TypeError("The last argument must be of type Function");var K=this,re=function(){return W.apply(K,arguments)};m.apply(this,l).then(function(oe){process.nextTick(re.bind(null,null,oe))},function(oe){process.nextTick(S.bind(null,oe,re))})}return Object.setPrototypeOf(P,Object.getPrototypeOf(m)),Object.defineProperties(P,s(m)),P}},5767:(o,a,i)=>{"use strict";var s=i(2682),f=i(9209),u=i(487),r=i(8075),_=i(5795),d=r("Object.prototype.toString"),b=i(9092)(),T=typeof globalThis>"u"?i.g:globalThis,w=f(),g=r("String.prototype.slice"),p=Object.getPrototypeOf,A=r("Array.prototype.indexOf",!0)||function(E,N){for(var F=0;F<E.length;F+=1)if(E[F]===N)return F;return-1},L={__proto__:null};s(w,b&&_&&p?function(E){var N=new T[E];if(Symbol.toStringTag in N){var F=p(N),R=_(F,Symbol.toStringTag);if(!R){var j=p(F);R=_(j,Symbol.toStringTag)}L["$"+E]=u(R.get)}}:function(E){var N=new T[E],F=N.slice||N.set;F&&(L["$"+E]=u(F))}),o.exports=function(E){if(!E||typeof E!="object")return!1;if(!b){var N=g(d(E),8,-1);return A(w,N)>-1?N:N==="Object"&&function(F){var R=!1;return s(L,function(j,V){if(!R)try{j(F),R=g(V,1)}catch{}}),R}(E)}return _?function(F){var R=!1;return s(L,function(j,V){if(!R)try{"$"+j(F)===V&&(R=g(V,1))}catch{}}),R}(E):null}},7510:o=>{o.exports=function(){for(var i={},s=0;s<arguments.length;s++){var f=arguments[s];for(var u in f)a.call(f,u)&&(i[u]=f[u])}return i};var a=Object.prototype.hasOwnProperty},2894:()=>{},2634:()=>{},5340:()=>{},9838:()=>{},9209:(o,a,i)=>{"use strict";var s=i(6578),f=typeof globalThis>"u"?i.g:globalThis;o.exports=function(){for(var u=[],r=0;r<s.length;r++)typeof f[s[r]]=="function"&&(u[u.length]=s[r]);return u}},6266:(o,a,i)=>{"use strict";i.d(a,{A:()=>rr});var s={};function f(ye,Me){return function(){return ye.apply(Me,arguments)}}i.r(s),i.d(s,{hasBrowserEnv:()=>O,hasStandardBrowserEnv:()=>h,hasStandardBrowserWebWorkerEnv:()=>U});let{toString:u}=Object.prototype,{getPrototypeOf:r}=Object,_=(d=Object.create(null),ye=>{let Me=u.call(ye);return d[Me]||(d[Me]=Me.slice(8,-1).toLowerCase())});var d;let b=ye=>(ye=ye.toLowerCase(),Me=>_(Me)===ye),T=ye=>Me=>typeof Me===ye,{isArray:w}=Array,g=T("undefined"),p=b("ArrayBuffer"),A=T("string"),L=T("function"),E=T("number"),N=ye=>ye!==null&&typeof ye=="object",F=ye=>{if(_(ye)!=="object")return!1;let Me=r(ye);return!(Me!==null&&Me!==Object.prototype&&Object.getPrototypeOf(Me)!==null||Symbol.toStringTag in ye||Symbol.iterator in ye)},R=b("Date"),j=b("File"),V=b("Blob"),Y=b("FileList"),me=b("URLSearchParams");function le(ye,Me,{allOwnKeys:H=!1}={}){if(ye==null)return;let G,ne;if(typeof ye!="object"&&(ye=[ye]),w(ye))for(G=0,ne=ye.length;G<ne;G++)Me.call(null,ye[G],G,ye);else{let se=H?Object.getOwnPropertyNames(ye):Object.keys(ye),he=se.length,Le;for(G=0;G<he;G++)Le=se[G],Me.call(null,ye[Le],Le,ye)}}function C(ye,Me){Me=Me.toLowerCase();let H=Object.keys(ye),G,ne=H.length;for(;ne-- >0;)if(G=H[ne],Me===G.toLowerCase())return G;return null}let q=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,X=ye=>!g(ye)&&ye!==q,ae=(I=typeof Uint8Array<"u"&&r(Uint8Array),ye=>I&&ye instanceof I);var I;let S=b("HTMLFormElement"),m=(({hasOwnProperty:ye})=>(Me,H)=>ye.call(Me,H))(Object.prototype),P=b("RegExp"),l=(ye,Me)=>{let H=Object.getOwnPropertyDescriptors(ye),G={};le(H,(ne,se)=>{let he;(he=Me(ne,se,ye))!==!1&&(G[se]=he||ne)}),Object.defineProperties(ye,G)},x="abcdefghijklmnopqrstuvwxyz",W="0123456789",K={DIGIT:W,ALPHA:x,ALPHA_DIGIT:x+x.toUpperCase()+W},re=b("AsyncFunction"),oe={isArray:w,isArrayBuffer:p,isBuffer:function(ye){return ye!==null&&!g(ye)&&ye.constructor!==null&&!g(ye.constructor)&&L(ye.constructor.isBuffer)&&ye.constructor.isBuffer(ye)},isFormData:ye=>{let Me;return ye&&(typeof FormData=="function"&&ye instanceof FormData||L(ye.append)&&((Me=_(ye))==="formdata"||Me==="object"&&L(ye.toString)&&ye.toString()==="[object FormData]"))},isArrayBufferView:function(ye){let Me;return Me=typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ye):ye&&ye.buffer&&p(ye.buffer),Me},isString:A,isNumber:E,isBoolean:ye=>ye===!0||ye===!1,isObject:N,isPlainObject:F,isUndefined:g,isDate:R,isFile:j,isBlob:V,isRegExp:P,isFunction:L,isStream:ye=>N(ye)&&L(ye.pipe),isURLSearchParams:me,isTypedArray:ae,isFileList:Y,forEach:le,merge:function ye(){let{caseless:Me}=X(this)&&this||{},H={},G=(ne,se)=>{let he=Me&&C(H,se)||se;F(H[he])&&F(ne)?H[he]=ye(H[he],ne):F(ne)?H[he]=ye({},ne):w(ne)?H[he]=ne.slice():H[he]=ne};for(let ne=0,se=arguments.length;ne<se;ne++)arguments[ne]&&le(arguments[ne],G);return H},extend:(ye,Me,H,{allOwnKeys:G}={})=>(le(Me,(ne,se)=>{H&&L(ne)?ye[se]=f(ne,H):ye[se]=ne},{allOwnKeys:G}),ye),trim:ye=>ye.trim?ye.trim():ye.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:ye=>(ye.charCodeAt(0)===65279&&(ye=ye.slice(1)),ye),inherits:(ye,Me,H,G)=>{ye.prototype=Object.create(Me.prototype,G),ye.prototype.constructor=ye,Object.defineProperty(ye,"super",{value:Me.prototype}),H&&Object.assign(ye.prototype,H)},toFlatObject:(ye,Me,H,G)=>{let ne,se,he,Le={};if(Me=Me||{},ye==null)return Me;do{for(ne=Object.getOwnPropertyNames(ye),se=ne.length;se-- >0;)he=ne[se],G&&!G(he,ye,Me)||Le[he]||(Me[he]=ye[he],Le[he]=!0);ye=H!==!1&&r(ye)}while(ye&&(!H||H(ye,Me))&&ye!==Object.prototype);return Me},kindOf:_,kindOfTest:b,endsWith:(ye,Me,H)=>{ye=String(ye),(H===void 0||H>ye.length)&&(H=ye.length),H-=Me.length;let G=ye.indexOf(Me,H);return G!==-1&&G===H},toArray:ye=>{if(!ye)return null;if(w(ye))return ye;let Me=ye.length;if(!E(Me))return null;let H=new Array(Me);for(;Me-- >0;)H[Me]=ye[Me];return H},forEachEntry:(ye,Me)=>{let H=(ye&&ye[Symbol.iterator]).call(ye),G;for(;(G=H.next())&&!G.done;){let ne=G.value;Me.call(ye,ne[0],ne[1])}},matchAll:(ye,Me)=>{let H,G=[];for(;(H=ye.exec(Me))!==null;)G.push(H);return G},isHTMLForm:S,hasOwnProperty:m,hasOwnProp:m,reduceDescriptors:l,freezeMethods:ye=>{l(ye,(Me,H)=>{if(L(ye)&&["arguments","caller","callee"].indexOf(H)!==-1)return!1;let G=ye[H];L(G)&&(Me.enumerable=!1,"writable"in Me?Me.writable=!1:Me.set||(Me.set=()=>{throw Error("Can not rewrite read-only method '"+H+"'")}))})},toObjectSet:(ye,Me)=>{let H={},G=ne=>{ne.forEach(se=>{H[se]=!0})};return w(ye)?G(ye):G(String(ye).split(Me)),H},toCamelCase:ye=>ye.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(Me,H,G){return H.toUpperCase()+G}),noop:()=>{},toFiniteNumber:(ye,Me)=>(ye=+ye,Number.isFinite(ye)?ye:Me),findKey:C,global:q,isContextDefined:X,ALPHABET:K,generateString:(ye=16,Me=K.ALPHA_DIGIT)=>{let H="",{length:G}=Me;for(;ye--;)H+=Me[Math.random()*G|0];return H},isSpecCompliantForm:function(ye){return!!(ye&&L(ye.append)&&ye[Symbol.toStringTag]==="FormData"&&ye[Symbol.iterator])},toJSONObject:ye=>{let Me=new Array(10),H=(G,ne)=>{if(N(G)){if(Me.indexOf(G)>=0)return;if(!("toJSON"in G)){Me[ne]=G;let se=w(G)?[]:{};return le(G,(he,Le)=>{let Ie=H(he,ne+1);!g(Ie)&&(se[Le]=Ie)}),Me[ne]=void 0,se}}return G};return H(ye,0)},isAsyncFn:re,isThenable:ye=>ye&&(N(ye)||L(ye))&&L(ye.then)&&L(ye.catch)};function Ee(ye,Me,H,G,ne){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=ye,this.name="AxiosError",Me&&(this.code=Me),H&&(this.config=H),G&&(this.request=G),ne&&(this.response=ne)}oe.inherits(Ee,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:oe.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});let Fe=Ee.prototype,Oe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(ye=>{Oe[ye]={value:ye}}),Object.defineProperties(Ee,Oe),Object.defineProperty(Fe,"isAxiosError",{value:!0}),Ee.from=(ye,Me,H,G,ne,se)=>{let he=Object.create(Fe);return oe.toFlatObject(ye,he,function(Le){return Le!==Error.prototype},Le=>Le!=="isAxiosError"),Ee.call(he,ye.message,Me,H,G,ne),he.cause=ye,he.name=ye.name,se&&Object.assign(he,se),he};let $=Ee;var de=i(8287).Buffer;function we(ye){return oe.isPlainObject(ye)||oe.isArray(ye)}function Qe(ye){return oe.endsWith(ye,"[]")?ye.slice(0,-2):ye}function ze(ye,Me,H){return ye?ye.concat(Me).map(function(G,ne){return G=Qe(G),!H&&ne?"["+G+"]":G}).join(H?".":""):Me}let We=oe.toFlatObject(oe,{},null,function(ye){return/^is[A-Z]/.test(ye)}),et=function(ye,Me,H){if(!oe.isObject(ye))throw new TypeError("target must be an object");Me=Me||new FormData;let G=(H=oe.toFlatObject(H,{metaTokens:!0,dots:!1,indexes:!1},!1,function(Je,ft){return!oe.isUndefined(ft[Je])})).metaTokens,ne=H.visitor||Te,se=H.dots,he=H.indexes,Le=(H.Blob||typeof Blob<"u"&&Blob)&&oe.isSpecCompliantForm(Me);if(!oe.isFunction(ne))throw new TypeError("visitor must be a function");function Ie(Je){if(Je===null)return"";if(oe.isDate(Je))return Je.toISOString();if(!Le&&oe.isBlob(Je))throw new $("Blob is not supported. Use a Buffer instead.");return oe.isArrayBuffer(Je)||oe.isTypedArray(Je)?Le&&typeof Blob=="function"?new Blob([Je]):de.from(Je):Je}function Te(Je,ft,gt){let Nt=Je;if(Je&&!gt&&typeof Je=="object"){if(oe.endsWith(ft,"{}"))ft=G?ft:ft.slice(0,-2),Je=JSON.stringify(Je);else if(oe.isArray(Je)&&function(Vt){return oe.isArray(Vt)&&!Vt.some(we)}(Je)||(oe.isFileList(Je)||oe.endsWith(ft,"[]"))&&(Nt=oe.toArray(Je)))return ft=Qe(ft),Nt.forEach(function(Vt,Gt){!oe.isUndefined(Vt)&&Vt!==null&&Me.append(he===!0?ze([ft],Gt,se):he===null?ft:ft+"[]",Ie(Vt))}),!1}return!!we(Je)||(Me.append(ze(gt,ft,se),Ie(Je)),!1)}let Ce=[],Ge=Object.assign(We,{defaultVisitor:Te,convertValue:Ie,isVisitable:we});if(!oe.isObject(ye))throw new TypeError("data must be an object");return function Je(ft,gt){if(!oe.isUndefined(ft)){if(Ce.indexOf(ft)!==-1)throw Error("Circular reference detected in "+gt.join("."));Ce.push(ft),oe.forEach(ft,function(Nt,Vt){(!(oe.isUndefined(Nt)||Nt===null)&&ne.call(Me,Nt,oe.isString(Vt)?Vt.trim():Vt,gt,Ge))===!0&&Je(Nt,gt?gt.concat(Vt):[Vt])}),Ce.pop()}}(ye),Me};function Be(ye){let Me={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(ye).replace(/[!'()~]|%20|%00/g,function(H){return Me[H]})}function Re(ye,Me){this._pairs=[],ye&&et(ye,this,Me)}let $e=Re.prototype;$e.append=function(ye,Me){this._pairs.push([ye,Me])},$e.toString=function(ye){let Me=ye?function(H){return ye.call(this,H,Be)}:Be;return this._pairs.map(function(H){return Me(H[0])+"="+Me(H[1])},"").join("&")};let ve=Re;function ue(ye){return encodeURIComponent(ye).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function c(ye,Me,H){if(!Me)return ye;let G=H&&H.encode||ue,ne=H&&H.serialize,se;if(se=ne?ne(Me,H):oe.isURLSearchParams(Me)?Me.toString():new ve(Me,H).toString(G),se){let he=ye.indexOf("#");he!==-1&&(ye=ye.slice(0,he)),ye+=(ye.indexOf("?")===-1?"?":"&")+se}return ye}let y=class{constructor(){this.handlers=[]}use(ye,Me,H){return this.handlers.push({fulfilled:ye,rejected:Me,synchronous:!!H&&H.synchronous,runWhen:H?H.runWhen:null}),this.handlers.length-1}eject(ye){this.handlers[ye]&&(this.handlers[ye]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(ye){oe.forEach(this.handlers,function(Me){Me!==null&&ye(Me)})}},v={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},B={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:ve,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},O=typeof window<"u"&&typeof document<"u",h=(k=typeof navigator<"u"&&navigator.product,O&&["ReactNative","NativeScript","NS"].indexOf(k)<0);var k;let U=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",M={...s,...B},J=function(ye){function Me(H,G,ne,se){let he=H[se++];if(he==="__proto__")return!0;let Le=Number.isFinite(+he),Ie=se>=H.length;return he=!he&&oe.isArray(ne)?ne.length:he,Ie?(oe.hasOwnProp(ne,he)?ne[he]=[ne[he],G]:ne[he]=G,!Le):(ne[he]&&oe.isObject(ne[he])||(ne[he]=[]),Me(H,G,ne[he],se)&&oe.isArray(ne[he])&&(ne[he]=function(Te){let Ce={},Ge=Object.keys(Te),Je,ft=Ge.length,gt;for(Je=0;Je<ft;Je++)gt=Ge[Je],Ce[gt]=Te[gt];return Ce}(ne[he])),!Le)}if(oe.isFormData(ye)&&oe.isFunction(ye.entries)){let H={};return oe.forEachEntry(ye,(G,ne)=>{Me(function(se){return oe.matchAll(/\w+|\[(\w*)]/g,se).map(he=>he[0]==="[]"?"":he[1]||he[0])}(G),ne,H,0)}),H}return null},pe={transitional:v,adapter:["xhr","http"],transformRequest:[function(ye,Me){let H=Me.getContentType()||"",G=H.indexOf("application/json")>-1,ne=oe.isObject(ye);if(ne&&oe.isHTMLForm(ye)&&(ye=new FormData(ye)),oe.isFormData(ye))return G?JSON.stringify(J(ye)):ye;if(oe.isArrayBuffer(ye)||oe.isBuffer(ye)||oe.isStream(ye)||oe.isFile(ye)||oe.isBlob(ye))return ye;if(oe.isArrayBufferView(ye))return ye.buffer;if(oe.isURLSearchParams(ye))return Me.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),ye.toString();let se;if(ne){if(H.indexOf("application/x-www-form-urlencoded")>-1)return function(he,Le){return et(he,new M.classes.URLSearchParams,Object.assign({visitor:function(Ie,Te,Ce,Ge){return M.isNode&&oe.isBuffer(Ie)?(this.append(Te,Ie.toString("base64")),!1):Ge.defaultVisitor.apply(this,arguments)}},Le))}(ye,this.formSerializer).toString();if((se=oe.isFileList(ye))||H.indexOf("multipart/form-data")>-1){let he=this.env&&this.env.FormData;return et(se?{"files[]":ye}:ye,he&&new he,this.formSerializer)}}return ne||G?(Me.setContentType("application/json",!1),function(he,Le,Ie){if(oe.isString(he))try{return(Le||JSON.parse)(he),oe.trim(he)}catch(Te){if(Te.name!=="SyntaxError")throw Te}return(Ie||JSON.stringify)(he)}(ye)):ye}],transformResponse:[function(ye){let Me=this.transitional||pe.transitional,H=Me&&Me.forcedJSONParsing,G=this.responseType==="json";if(ye&&oe.isString(ye)&&(H&&!this.responseType||G)){let ne=!(Me&&Me.silentJSONParsing)&&G;try{return JSON.parse(ye)}catch(se){if(ne)throw se.name==="SyntaxError"?$.from(se,$.ERR_BAD_RESPONSE,this,null,this.response):se}}return ye}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:M.classes.FormData,Blob:M.classes.Blob},validateStatus:function(ye){return ye>=200&&ye<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};oe.forEach(["delete","get","head","post","put","patch"],ye=>{pe.headers[ye]={}});let Ne=pe,tt=oe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),bt=Symbol("internals");function Ot(ye){return ye&&String(ye).trim().toLowerCase()}function Ft(ye){return ye===!1||ye==null?ye:oe.isArray(ye)?ye.map(Ft):String(ye)}function Yt(ye,Me,H,G,ne){return oe.isFunction(G)?G.call(this,Me,H):(ne&&(Me=H),oe.isString(Me)?oe.isString(G)?Me.indexOf(G)!==-1:oe.isRegExp(G)?G.test(Me):void 0:void 0)}class yr{constructor(Me){Me&&this.set(Me)}set(Me,H,G){let ne=this;function se(Le,Ie,Te){let Ce=Ot(Ie);if(!Ce)throw new Error("header name must be a non-empty string");let Ge=oe.findKey(ne,Ce);(!Ge||ne[Ge]===void 0||Te===!0||Te===void 0&&ne[Ge]!==!1)&&(ne[Ge||Ie]=Ft(Le))}let he=(Le,Ie)=>oe.forEach(Le,(Te,Ce)=>se(Te,Ce,Ie));return oe.isPlainObject(Me)||Me instanceof this.constructor?he(Me,H):oe.isString(Me)&&(Me=Me.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(Me.trim())?he((Le=>{let Ie={},Te,Ce,Ge;return Le&&Le.split(`
57
- `).forEach(function(Je){Ge=Je.indexOf(":"),Te=Je.substring(0,Ge).trim().toLowerCase(),Ce=Je.substring(Ge+1).trim(),!Te||Ie[Te]&&tt[Te]||(Te==="set-cookie"?Ie[Te]?Ie[Te].push(Ce):Ie[Te]=[Ce]:Ie[Te]=Ie[Te]?Ie[Te]+", "+Ce:Ce)}),Ie})(Me),H):Me!=null&&se(H,Me,G),this}get(Me,H){if(Me=Ot(Me)){let G=oe.findKey(this,Me);if(G){let ne=this[G];if(!H)return ne;if(H===!0)return function(se){let he=Object.create(null),Le=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,Ie;for(;Ie=Le.exec(se);)he[Ie[1]]=Ie[2];return he}(ne);if(oe.isFunction(H))return H.call(this,ne,G);if(oe.isRegExp(H))return H.exec(ne);throw new TypeError("parser must be boolean|regexp|function")}}}has(Me,H){if(Me=Ot(Me)){let G=oe.findKey(this,Me);return!(!G||this[G]===void 0||H&&!Yt(0,this[G],G,H))}return!1}delete(Me,H){let G=this,ne=!1;function se(he){if(he=Ot(he)){let Le=oe.findKey(G,he);!Le||H&&!Yt(0,G[Le],Le,H)||(delete G[Le],ne=!0)}}return oe.isArray(Me)?Me.forEach(se):se(Me),ne}clear(Me){let H=Object.keys(this),G=H.length,ne=!1;for(;G--;){let se=H[G];Me&&!Yt(0,this[se],se,Me,!0)||(delete this[se],ne=!0)}return ne}normalize(Me){let H=this,G={};return oe.forEach(this,(ne,se)=>{let he=oe.findKey(G,se);if(he)return H[he]=Ft(ne),void delete H[se];let Le=Me?function(Ie){return Ie.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(Te,Ce,Ge)=>Ce.toUpperCase()+Ge)}(se):String(se).trim();Le!==se&&delete H[se],H[Le]=Ft(ne),G[Le]=!0}),this}concat(...Me){return this.constructor.concat(this,...Me)}toJSON(Me){let H=Object.create(null);return oe.forEach(this,(G,ne)=>{G!=null&&G!==!1&&(H[ne]=Me&&oe.isArray(G)?G.join(", "):G)}),H}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([Me,H])=>Me+": "+H).join(`
58
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(Me){return Me instanceof this?Me:new this(Me)}static concat(Me,...H){let G=new this(Me);return H.forEach(ne=>G.set(ne)),G}static accessor(Me){let H=(this[bt]=this[bt]={accessors:{}}).accessors,G=this.prototype;function ne(se){let he=Ot(se);H[he]||(function(Le,Ie){let Te=oe.toCamelCase(" "+Ie);["get","set","has"].forEach(Ce=>{Object.defineProperty(Le,Ce+Te,{value:function(Ge,Je,ft){return this[Ce].call(this,Ie,Ge,Je,ft)},configurable:!0})})}(G,se),H[he]=!0)}return oe.isArray(Me)?Me.forEach(ne):ne(Me),this}}yr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),oe.reduceDescriptors(yr.prototype,({value:ye},Me)=>{let H=Me[0].toUpperCase()+Me.slice(1);return{get:()=>ye,set(G){this[H]=G}}}),oe.freezeMethods(yr);let je=yr;function De(ye,Me){let H=this||Ne,G=Me||H,ne=je.from(G.headers),se=G.data;return oe.forEach(ye,function(he){se=he.call(H,se,ne.normalize(),Me?Me.status:void 0)}),ne.normalize(),se}function Xe(ye){return!(!ye||!ye.__CANCEL__)}function ie(ye,Me,H){$.call(this,ye??"canceled",$.ERR_CANCELED,Me,H),this.name="CanceledError"}oe.inherits(ie,$,{__CANCEL__:!0});let Pe=ie,ct=M.hasStandardBrowserEnv?{write(ye,Me,H,G,ne,se){let he=[ye+"="+encodeURIComponent(Me)];oe.isNumber(H)&&he.push("expires="+new Date(H).toGMTString()),oe.isString(G)&&he.push("path="+G),oe.isString(ne)&&he.push("domain="+ne),se===!0&&he.push("secure"),document.cookie=he.join("; ")},read(ye){let Me=document.cookie.match(new RegExp("(^|;\\s*)("+ye+")=([^;]*)"));return Me?decodeURIComponent(Me[3]):null},remove(ye){this.write(ye,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function dt(ye,Me){return ye&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(Me)?function(H,G){return G?H.replace(/\/?\/$/,"")+"/"+G.replace(/^\/+/,""):H}(ye,Me):Me}let xt=M.hasStandardBrowserEnv?function(){let ye=/(msie|trident)/i.test(navigator.userAgent),Me=document.createElement("a"),H;function G(ne){let se=ne;return ye&&(Me.setAttribute("href",se),se=Me.href),Me.setAttribute("href",se),{href:Me.href,protocol:Me.protocol?Me.protocol.replace(/:$/,""):"",host:Me.host,search:Me.search?Me.search.replace(/^\?/,""):"",hash:Me.hash?Me.hash.replace(/^#/,""):"",hostname:Me.hostname,port:Me.port,pathname:Me.pathname.charAt(0)==="/"?Me.pathname:"/"+Me.pathname}}return H=G(window.location.href),function(ne){let se=oe.isString(ne)?G(ne):ne;return se.protocol===H.protocol&&se.host===H.host}}():function(){return!0},st=function(ye,Me){ye=ye||10;let H=new Array(ye),G=new Array(ye),ne,se=0,he=0;return Me=Me!==void 0?Me:1e3,function(Le){let Ie=Date.now(),Te=G[he];ne||(ne=Ie),H[se]=Le,G[se]=Ie;let Ce=he,Ge=0;for(;Ce!==se;)Ge+=H[Ce++],Ce%=ye;if(se=(se+1)%ye,se===he&&(he=(he+1)%ye),Ie-ne<Me)return;let Je=Te&&Ie-Te;return Je?Math.round(1e3*Ge/Je):void 0}};function $t(ye,Me){let H=0,G=st(50,250);return ne=>{let se=ne.loaded,he=ne.lengthComputable?ne.total:void 0,Le=se-H,Ie=G(Le);H=se;let Te={loaded:se,total:he,progress:he?se/he:void 0,bytes:Le,rate:Ie||void 0,estimated:Ie&&he&&se<=he?(he-se)/Ie:void 0,event:ne};Te[Me?"download":"upload"]=!0,ye(Te)}}let _t={http:null,xhr:typeof XMLHttpRequest<"u"&&function(ye){return new Promise(function(Me,H){let G=ye.data,ne=je.from(ye.headers).normalize(),se,he,{responseType:Le,withXSRFToken:Ie}=ye;function Te(){ye.cancelToken&&ye.cancelToken.unsubscribe(se),ye.signal&&ye.signal.removeEventListener("abort",se)}if(oe.isFormData(G)){if(M.hasStandardBrowserEnv||M.hasStandardBrowserWebWorkerEnv)ne.setContentType(!1);else if((he=ne.getContentType())!==!1){let[gt,...Nt]=he?he.split(";").map(Vt=>Vt.trim()).filter(Boolean):[];ne.setContentType([gt||"multipart/form-data",...Nt].join("; "))}}let Ce=new XMLHttpRequest;if(ye.auth){let gt=ye.auth.username||"",Nt=ye.auth.password?unescape(encodeURIComponent(ye.auth.password)):"";ne.set("Authorization","Basic "+btoa(gt+":"+Nt))}let Ge=dt(ye.baseURL,ye.url);function Je(){if(!Ce)return;let gt=je.from("getAllResponseHeaders"in Ce&&Ce.getAllResponseHeaders());(function(Nt,Vt,Gt){let Ye=Gt.config.validateStatus;Gt.status&&Ye&&!Ye(Gt.status)?Vt(new $("Request failed with status code "+Gt.status,[$.ERR_BAD_REQUEST,$.ERR_BAD_RESPONSE][Math.floor(Gt.status/100)-4],Gt.config,Gt.request,Gt)):Nt(Gt)})(function(Nt){Me(Nt),Te()},function(Nt){H(Nt),Te()},{data:Le&&Le!=="text"&&Le!=="json"?Ce.response:Ce.responseText,status:Ce.status,statusText:Ce.statusText,headers:gt,config:ye,request:Ce}),Ce=null}if(Ce.open(ye.method.toUpperCase(),c(Ge,ye.params,ye.paramsSerializer),!0),Ce.timeout=ye.timeout,"onloadend"in Ce?Ce.onloadend=Je:Ce.onreadystatechange=function(){Ce&&Ce.readyState===4&&(Ce.status!==0||Ce.responseURL&&Ce.responseURL.indexOf("file:")===0)&&setTimeout(Je)},Ce.onabort=function(){Ce&&(H(new $("Request aborted",$.ECONNABORTED,ye,Ce)),Ce=null)},Ce.onerror=function(){H(new $("Network Error",$.ERR_NETWORK,ye,Ce)),Ce=null},Ce.ontimeout=function(){let gt=ye.timeout?"timeout of "+ye.timeout+"ms exceeded":"timeout exceeded",Nt=ye.transitional||v;ye.timeoutErrorMessage&&(gt=ye.timeoutErrorMessage),H(new $(gt,Nt.clarifyTimeoutError?$.ETIMEDOUT:$.ECONNABORTED,ye,Ce)),Ce=null},M.hasStandardBrowserEnv&&(Ie&&oe.isFunction(Ie)&&(Ie=Ie(ye)),Ie||Ie!==!1&&xt(Ge))){let gt=ye.xsrfHeaderName&&ye.xsrfCookieName&&ct.read(ye.xsrfCookieName);gt&&ne.set(ye.xsrfHeaderName,gt)}G===void 0&&ne.setContentType(null),"setRequestHeader"in Ce&&oe.forEach(ne.toJSON(),function(gt,Nt){Ce.setRequestHeader(Nt,gt)}),oe.isUndefined(ye.withCredentials)||(Ce.withCredentials=!!ye.withCredentials),Le&&Le!=="json"&&(Ce.responseType=ye.responseType),typeof ye.onDownloadProgress=="function"&&Ce.addEventListener("progress",$t(ye.onDownloadProgress,!0)),typeof ye.onUploadProgress=="function"&&Ce.upload&&Ce.upload.addEventListener("progress",$t(ye.onUploadProgress)),(ye.cancelToken||ye.signal)&&(se=gt=>{Ce&&(H(!gt||gt.type?new Pe(null,ye,Ce):gt),Ce.abort(),Ce=null)},ye.cancelToken&&ye.cancelToken.subscribe(se),ye.signal&&(ye.signal.aborted?se():ye.signal.addEventListener("abort",se)));let ft=function(gt){let Nt=/^([-+\w]{1,25})(:?\/\/|:)/.exec(gt);return Nt&&Nt[1]||""}(Ge);ft&&M.protocols.indexOf(ft)===-1?H(new $("Unsupported protocol "+ft+":",$.ERR_BAD_REQUEST,ye)):Ce.send(G||null)})}};oe.forEach(_t,(ye,Me)=>{if(ye){try{Object.defineProperty(ye,"name",{value:Me})}catch{}Object.defineProperty(ye,"adapterName",{value:Me})}});let Ct=ye=>`- ${ye}`,it=ye=>oe.isFunction(ye)||ye===null||ye===!1,Q=ye=>{ye=oe.isArray(ye)?ye:[ye];let{length:Me}=ye,H,G,ne={};for(let se=0;se<Me;se++){let he;if(H=ye[se],G=H,!it(H)&&(G=_t[(he=String(H)).toLowerCase()],G===void 0))throw new $(`Unknown adapter '${he}'`);if(G)break;ne[he||"#"+se]=G}if(!G){let se=Object.entries(ne).map(([Le,Ie])=>`adapter ${Le} `+(Ie===!1?"is not supported by the environment":"is not available in the build")),he=Me?se.length>1?`since :
59
- `+se.map(Ct).join(`
60
- `):" "+Ct(se[0]):"as no adapter specified";throw new $("There is no suitable adapter to dispatch the request "+he,"ERR_NOT_SUPPORT")}return G};function ce(ye){if(ye.cancelToken&&ye.cancelToken.throwIfRequested(),ye.signal&&ye.signal.aborted)throw new Pe(null,ye)}function be(ye){return ce(ye),ye.headers=je.from(ye.headers),ye.data=De.call(ye,ye.transformRequest),["post","put","patch"].indexOf(ye.method)!==-1&&ye.headers.setContentType("application/x-www-form-urlencoded",!1),Q(ye.adapter||Ne.adapter)(ye).then(function(Me){return ce(ye),Me.data=De.call(ye,ye.transformResponse,Me),Me.headers=je.from(Me.headers),Me},function(Me){return Xe(Me)||(ce(ye),Me&&Me.response&&(Me.response.data=De.call(ye,ye.transformResponse,Me.response),Me.response.headers=je.from(Me.response.headers))),Promise.reject(Me)})}let D=ye=>ye instanceof je?{...ye}:ye;function xe(ye,Me){Me=Me||{};let H={};function G(Te,Ce,Ge){return oe.isPlainObject(Te)&&oe.isPlainObject(Ce)?oe.merge.call({caseless:Ge},Te,Ce):oe.isPlainObject(Ce)?oe.merge({},Ce):oe.isArray(Ce)?Ce.slice():Ce}function ne(Te,Ce,Ge){return oe.isUndefined(Ce)?oe.isUndefined(Te)?void 0:G(void 0,Te,Ge):G(Te,Ce,Ge)}function se(Te,Ce){if(!oe.isUndefined(Ce))return G(void 0,Ce)}function he(Te,Ce){return oe.isUndefined(Ce)?oe.isUndefined(Te)?void 0:G(void 0,Te):G(void 0,Ce)}function Le(Te,Ce,Ge){return Ge in Me?G(Te,Ce):Ge in ye?G(void 0,Te):void 0}let Ie={url:se,method:se,data:se,baseURL:he,transformRequest:he,transformResponse:he,paramsSerializer:he,timeout:he,timeoutMessage:he,withCredentials:he,withXSRFToken:he,adapter:he,responseType:he,xsrfCookieName:he,xsrfHeaderName:he,onUploadProgress:he,onDownloadProgress:he,decompress:he,maxContentLength:he,maxBodyLength:he,beforeRedirect:he,transport:he,httpAgent:he,httpsAgent:he,cancelToken:he,socketPath:he,responseEncoding:he,validateStatus:Le,headers:(Te,Ce)=>ne(D(Te),D(Ce),!0)};return oe.forEach(Object.keys(Object.assign({},ye,Me)),function(Te){let Ce=Ie[Te]||ne,Ge=Ce(ye[Te],Me[Te],Te);oe.isUndefined(Ge)&&Ce!==Le||(H[Te]=Ge)}),H}let ot="1.6.8",at={};["object","boolean","number","function","string","symbol"].forEach((ye,Me)=>{at[ye]=function(H){return typeof H===ye||"a"+(Me<1?"n ":" ")+ye}});let yt={};at.transitional=function(ye,Me,H){function G(ne,se){return"[Axios v1.6.8] Transitional option '"+ne+"'"+se+(H?". "+H:"")}return(ne,se,he)=>{if(ye===!1)throw new $(G(se," has been removed"+(Me?" in "+Me:"")),$.ERR_DEPRECATED);return Me&&!yt[se]&&(yt[se]=!0,console.warn(G(se," has been deprecated since v"+Me+" and will be removed in the near future"))),!ye||ye(ne,se,he)}};let Tt={assertOptions:function(ye,Me,H){if(typeof ye!="object")throw new $("options must be an object",$.ERR_BAD_OPTION_VALUE);let G=Object.keys(ye),ne=G.length;for(;ne-- >0;){let se=G[ne],he=Me[se];if(he){let Le=ye[se],Ie=Le===void 0||he(Le,se,ye);if(Ie!==!0)throw new $("option "+se+" must be "+Ie,$.ERR_BAD_OPTION_VALUE)}else if(H!==!0)throw new $("Unknown option "+se,$.ERR_BAD_OPTION)}},validators:at},Kt=Tt.validators;class Et{constructor(Me){this.defaults=Me,this.interceptors={request:new y,response:new y}}async request(Me,H){try{return await this._request(Me,H)}catch(G){if(G instanceof Error){let ne;Error.captureStackTrace?Error.captureStackTrace(ne={}):ne=new Error;let se=ne.stack?ne.stack.replace(/^.+\n/,""):"";G.stack?se&&!String(G.stack).endsWith(se.replace(/^.+\n.+\n/,""))&&(G.stack+=`
61
- `+se):G.stack=se}throw G}}_request(Me,H){typeof Me=="string"?(H=H||{}).url=Me:H=Me||{},H=xe(this.defaults,H);let{transitional:G,paramsSerializer:ne,headers:se}=H;G!==void 0&&Tt.assertOptions(G,{silentJSONParsing:Kt.transitional(Kt.boolean),forcedJSONParsing:Kt.transitional(Kt.boolean),clarifyTimeoutError:Kt.transitional(Kt.boolean)},!1),ne!=null&&(oe.isFunction(ne)?H.paramsSerializer={serialize:ne}:Tt.assertOptions(ne,{encode:Kt.function,serialize:Kt.function},!0)),H.method=(H.method||this.defaults.method||"get").toLowerCase();let he=se&&oe.merge(se.common,se[H.method]);se&&oe.forEach(["delete","get","head","post","put","patch","common"],gt=>{delete se[gt]}),H.headers=je.concat(he,se);let Le=[],Ie=!0;this.interceptors.request.forEach(function(gt){typeof gt.runWhen=="function"&&gt.runWhen(H)===!1||(Ie=Ie&&gt.synchronous,Le.unshift(gt.fulfilled,gt.rejected))});let Te=[],Ce;this.interceptors.response.forEach(function(gt){Te.push(gt.fulfilled,gt.rejected)});let Ge,Je=0;if(!Ie){let gt=[be.bind(this),void 0];for(gt.unshift.apply(gt,Le),gt.push.apply(gt,Te),Ge=gt.length,Ce=Promise.resolve(H);Je<Ge;)Ce=Ce.then(gt[Je++],gt[Je++]);return Ce}Ge=Le.length;let ft=H;for(Je=0;Je<Ge;){let gt=Le[Je++],Nt=Le[Je++];try{ft=gt(ft)}catch(Vt){Nt.call(this,Vt);break}}try{Ce=be.call(this,ft)}catch(gt){return Promise.reject(gt)}for(Je=0,Ge=Te.length;Je<Ge;)Ce=Ce.then(Te[Je++],Te[Je++]);return Ce}getUri(Me){return c(dt((Me=xe(this.defaults,Me)).baseURL,Me.url),Me.params,Me.paramsSerializer)}}oe.forEach(["delete","get","head","options"],function(ye){Et.prototype[ye]=function(Me,H){return this.request(xe(H||{},{method:ye,url:Me,data:(H||{}).data}))}}),oe.forEach(["post","put","patch"],function(ye){function Me(H){return function(G,ne,se){return this.request(xe(se||{},{method:ye,headers:H?{"Content-Type":"multipart/form-data"}:{},url:G,data:ne}))}}Et.prototype[ye]=Me(),Et.prototype[ye+"Form"]=Me(!0)});let Rt=Et;class St{constructor(Me){if(typeof Me!="function")throw new TypeError("executor must be a function.");let H;this.promise=new Promise(function(ne){H=ne});let G=this;this.promise.then(ne=>{if(!G._listeners)return;let se=G._listeners.length;for(;se-- >0;)G._listeners[se](ne);G._listeners=null}),this.promise.then=ne=>{let se,he=new Promise(Le=>{G.subscribe(Le),se=Le}).then(ne);return he.cancel=function(){G.unsubscribe(se)},he},Me(function(ne,se,he){G.reason||(G.reason=new Pe(ne,se,he),H(G.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(Me){this.reason?Me(this.reason):this._listeners?this._listeners.push(Me):this._listeners=[Me]}unsubscribe(Me){if(!this._listeners)return;let H=this._listeners.indexOf(Me);H!==-1&&this._listeners.splice(H,1)}static source(){let Me;return{token:new St(function(H){Me=H}),cancel:Me}}}let Ht=St,Lt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Lt).forEach(([ye,Me])=>{Lt[Me]=ye});let qt=Lt,It=function ye(Me){let H=new Rt(Me),G=f(Rt.prototype.request,H);return oe.extend(G,Rt.prototype,H,{allOwnKeys:!0}),oe.extend(G,H,null,{allOwnKeys:!0}),G.create=function(ne){return ye(xe(Me,ne))},G}(Ne);It.Axios=Rt,It.CanceledError=Pe,It.CancelToken=Ht,It.isCancel=Xe,It.VERSION=ot,It.toFormData=et,It.AxiosError=$,It.Cancel=It.CanceledError,It.all=function(ye){return Promise.all(ye)},It.spread=function(ye){return function(Me){return ye.apply(null,Me)}},It.isAxiosError=function(ye){return oe.isObject(ye)&&ye.isAxiosError===!0},It.mergeConfig=xe,It.AxiosHeaders=je,It.formToJSON=ye=>J(oe.isHTMLForm(ye)?new FormData(ye):ye),It.getAdapter=Q,It.HttpStatusCode=qt,It.default=It;let rr=It},8330:o=>{"use strict";o.exports={rE:"12.0.0-rc.3"}}},t={};function n(o){var a=t[o];if(a!==void 0)return a.exports;var i=t[o]={id:o,loaded:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.n=o=>{var a=o&&o.__esModule?()=>o.default:()=>o;return n.d(a,{a}),a},n.d=(o,a)=>{for(var i in a)n.o(a,i)&&!n.o(o,i)&&Object.defineProperty(o,i,{enumerable:!0,get:a[i]})},n.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),n.hmd=o=>((o=Object.create(o)).children||(o.children=[]),Object.defineProperty(o,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+o.id)}}),o),n.o=(o,a)=>Object.prototype.hasOwnProperty.call(o,a),n.r=o=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},n.nmd=o=>(o.paths=[],o.children||(o.children=[]),o),n(1924)})())});var b0=Jt(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});function e6(e){var t=4,n=e.length,o=n%t;if(!o)return e;var a=n,i=t-o,s=n+i,f=Buffer.alloc(s);for(f.write(e);i--;)f.write("=",a++);return f.toString()}Ph.default=e6});var S0=Jt(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});var t6=b0();function w0(e,t){return t===void 0&&(t="utf8"),Buffer.isBuffer(e)?xh(e.toString("base64")):xh(Buffer.from(e,t).toString("base64"))}function r6(e,t){return t===void 0&&(t="utf8"),Buffer.from(Rh(e),"base64").toString(t)}function Rh(e){return e=e.toString(),t6.default(e).replace(/\-/g,"+").replace(/_/g,"/")}function xh(e){return e.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function n6(e){return Buffer.from(Rh(e),"base64")}var Ma=w0;Ma.encode=w0;Ma.decode=r6;Ma.toBase64=Rh;Ma.fromBase64=xh;Ma.toBuffer=n6;Ih.default=Ma});var A0=Jt((P4,dl)=>{dl.exports=S0().default;dl.exports.default=dl.exports});var Ao={};$h(Ao,{Client:()=>Ua,Errors:()=>zO,contract:()=>XO,networks:()=>HO,rpc:()=>GO});var m0=po(ts(),1),pl=po(Js(),1);On(Ao,po(fl(),1));var XO=po(Js(),1),GO=po(ul(),1);typeof window<"u"&&(window.Buffer=window.Buffer||m0.Buffer);var HO={testnet:{networkPassphrase:"Test SDF Network ; September 2015",contractId:"CDSGG7BSWYWQMTY5KTZVDTC34ZESMZ75ZGSTTVHS4NIKCF4PM3GDJ4G3"}},zO={1:{message:""},2:{message:""},3:{message:""},4:{message:""},5:{message:""},6:{message:""},7:{message:""},8:{message:""},9:{message:""},10:{message:""}},Ua=class extends pl.Client{options;constructor(t){super(new pl.Spec(["AAAABAAAAAAAAAAAAAAABUVycm9yAAAAAAAACgAAAAAAAAAJTm90SW5pdGVkAAAAAAAAAQAAAAAAAAAITm90Rm91bmQAAAACAAAAAAAAAAxOb3RQZXJtaXR0ZWQAAAADAAAAAAAAAA1BbHJlYWR5SW5pdGVkAAAAAAAABAAAAAAAAAAOSnNvblBhcnNlRXJyb3IAAAAAAAUAAAAAAAAADkludmFsaWRDb250ZXh0AAAAAAAGAAAAAAAAACBDbGllbnREYXRhSnNvbkNoYWxsZW5nZUluY29ycmVjdAAAAAcAAAAAAAAAF1NlY3AyNTZyMVB1YmxpY0tleVBhcnNlAAAAAAgAAAAAAAAAF1NlY3AyNTZyMVNpZ25hdHVyZVBhcnNlAAAAAAkAAAAAAAAAFVNlY3AyNTZyMVZlcmlmeUZhaWxlZAAAAAAAAAo=","AAAAAAAAAAAAAAAKZXh0ZW5kX3R0bAAAAAAAAAAAAAA=","AAAAAAAAAAAAAAAEaW5pdAAAAAMAAAAAAAAAAmlkAAAAAAAOAAAAAAAAAAJwawAAAAAD7gAAAEEAAAAAAAAAB2ZhY3RvcnkAAAAAEwAAAAEAAAPpAAAD7QAAAAAAAAAD","AAAAAAAAAAAAAAAGcmVzdWRvAAAAAAABAAAAAAAAAAJpZAAAAAAADgAAAAEAAAPpAAAD7QAAAAAAAAAD","AAAAAAAAAAAAAAAGcm1fc2lnAAAAAAABAAAAAAAAAAJpZAAAAAAADgAAAAEAAAPpAAAD7QAAAAAAAAAD","AAAAAAAAAAAAAAAHYWRkX3NpZwAAAAACAAAAAAAAAAJpZAAAAAAADgAAAAAAAAACcGsAAAAAA+4AAABBAAAAAQAAA+kAAAPtAAAAAAAAAAM=","AAAAAQAAAAAAAAAAAAAACVNpZ25hdHVyZQAAAAAAAAQAAAAAAAAAEmF1dGhlbnRpY2F0b3JfZGF0YQAAAAAADgAAAAAAAAAQY2xpZW50X2RhdGFfanNvbgAAAA4AAAAAAAAAAmlkAAAAAAAOAAAAAAAAAAlzaWduYXR1cmUAAAAAAAPuAAAAQA==","AAAAAAAAAAAAAAAMX19jaGVja19hdXRoAAAAAwAAAAAAAAARc2lnbmF0dXJlX3BheWxvYWQAAAAAAAPuAAAAIAAAAAAAAAAJc2lnbmF0dXJlAAAAAAAH0AAAAAlTaWduYXR1cmUAAAAAAAAAAAAADWF1dGhfY29udGV4dHMAAAAAAAPqAAAH0AAAAAdDb250ZXh0AAAAAAEAAAPpAAAD7QAAAAAAAAAD"]),t),this.options=t}fromJSON={extend_ttl:this.txFromJSON,init:this.txFromJSON,resudo:this.txFromJSON,rm_sig:this.txFromJSON,add_sig:this.txFromJSON}};var _o={};$h(_o,{Client:()=>Zs,Errors:()=>WO,contract:()=>$O,networks:()=>kh,rpc:()=>QO});var g0=po(ts(),1),hl=po(Js(),1);On(_o,po(fl(),1));var $O=po(Js(),1),QO=po(ul(),1);typeof window<"u"&&(window.Buffer=window.Buffer||g0.Buffer);var kh={testnet:{networkPassphrase:"Test SDF Network ; September 2015",contractId:"CDSGG7BSWYWQMTY5KTZVDTC34ZESMZ75ZGSTTVHS4NIKCF4PM3GDJ4G3"}},WO={1:{message:""},2:{message:""},3:{message:""},4:{message:""},5:{message:""}},Zs=class extends hl.Client{options;constructor(t){super(new hl.Spec(["AAAABAAAAAAAAAAAAAAABUVycm9yAAAAAAAABQAAAAAAAAAJTm90SW5pdGVkAAAAAAAAAQAAAAAAAAAITm90Rm91bmQAAAACAAAAAAAAAAxOb3RQZXJtaXR0ZWQAAAADAAAAAAAAAA1BbHJlYWR5SW5pdGVkAAAAAAAABAAAAAAAAAANQWxyZWFkeU1hcHBlZAAAAAAAAAU=","AAAAAAAAAAAAAAAKZXh0ZW5kX3R0bAAAAAAAAAAAAAA=","AAAAAAAAAAAAAAAEaW5pdAAAAAEAAAAAAAAACXdhc21faGFzaAAAAAAAA+4AAAAgAAAAAQAAA+kAAAPtAAAAAAAAAAM=","AAAAAAAAAAAAAAAGZGVwbG95AAAAAAACAAAAAAAAAAJpZAAAAAAADgAAAAAAAAACcGsAAAAAA+4AAABBAAAAAQAAA+kAAAATAAAAAw==","AAAAAAAAAAAAAAAHYWRkX3NpZwAAAAACAAAAAAAAAAJpZAAAAAAADgAAAAAAAAAIY29udHJhY3QAAAATAAAAAQAAA+kAAAPtAAAAAAAAAAM=","AAAAAAAAAAAAAAAGcm1fc2lnAAAAAAACAAAAAAAAAAJpZAAAAAAADgAAAAAAAAAIY29udHJhY3QAAAATAAAAAQAAA+kAAAPtAAAAAAAAAAM="]),t),this.options=t}fromJSON={extend_ttl:this.txFromJSON,init:this.txFromJSON,deploy:this.txFromJSON,add_sig:this.txFromJSON,rm_sig:this.txFromJSON}};var Cr=po(fl(),1);function Oh(e,t=!1,n){let o=e.match(/^(0x)?([\da-fA-F]+)$/);if(o==null)throw new RangeError("input must be a hexadecimal string, e.g. '0x124fe3a' or '0214f1b2'");let a=o[2];if(n!==void 0){if(n<a.length/2)throw new RangeError(`expected byte length ${n} < input hex byte length ${Math.ceil(a.length/2)}`);a=a.padStart(2*n,"0")}return t?"0x"+a:a}function v0(e,t=!1){if(e<0)throw RangeError("a should be a non-negative integer. Negative values are not supported");return ZO(JO(e),t)}function eu(e){let t=8n;ArrayBuffer.isView(e)?t=BigInt(8*e.BYTES_PER_ELEMENT):e=new Uint8Array(e);let n=0n;for(let o of e.values())n=(n<<t)+BigInt(o);return n}function JO(e,t=!1,n){if(e<0)throw RangeError("a should be a non-negative integer. Negative values are not supported");return Oh(e.toString(16),t,n)}function ZO(e,t=!1){let n=Oh(e);return n=Oh(e,!1,Math.ceil(n.length/2)),Uint8Array.from(n.match(/[\da-fA-F]{2}/g).map(o=>parseInt(o,16))).buffer}var lo=po(A0(),1);function Vo(e){let t=new Uint8Array(e),n="";for(let a of t)n+=String.fromCharCode(a);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function yl(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n=(4-t.length%4)%4,o=t.padEnd(t.length+n,"="),a=atob(o),i=new ArrayBuffer(a.length),s=new Uint8Array(i);for(let f=0;f<a.length;f++)s[f]=a.charCodeAt(f);return i}function jh(){return window?.PublicKeyCredential!==void 0&&typeof window.PublicKeyCredential=="function"}function _0(e){let{id:t}=e;return{...e,id:yl(t),transports:e.transports}}function E0(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var Vn=class extends Error{constructor({message:t,code:n,cause:o,name:a}){super(t,{cause:o}),this.name=a??o.name,this.code=n}};function o6({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Vn({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(n.authenticatorSelection?.requireResidentKey===!0)return new Vn({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(n.authenticatorSelection?.userVerification==="required")return new Vn({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Vn({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Vn({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return n.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Vn({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Vn({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){let o=window.location.hostname;if(E0(o)){if(n.rp.id!==o)return new Vn({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Vn({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new Vn({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Vn({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}var Bh=class{createNewAbortSignal(){if(this.controller){let n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}let t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){let t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}},T0=new Bh,i6=["cross-platform","platform"];function k0(e){if(e&&!(i6.indexOf(e)<0))return e}async function O0(e){if(!jh())throw new Error("WebAuthn is not supported in this browser");let n={publicKey:{...e,challenge:yl(e.challenge),user:{...e.user,id:yl(e.user.id)},excludeCredentials:e.excludeCredentials?.map(_0)}};n.signal=T0.createNewAbortSignal();let o;try{o=await navigator.credentials.create(n)}catch(b){throw o6({error:b,options:n})}if(!o)throw new Error("Registration was not completed");let{id:a,rawId:i,response:s,type:f}=o,u;typeof s.getTransports=="function"&&(u=s.getTransports());let r;if(typeof s.getPublicKeyAlgorithm=="function")try{r=s.getPublicKeyAlgorithm()}catch(b){Ch("getPublicKeyAlgorithm()",b)}let _;if(typeof s.getPublicKey=="function")try{let b=s.getPublicKey();b!==null&&(_=Vo(b))}catch(b){Ch("getPublicKey()",b)}let d;if(typeof s.getAuthenticatorData=="function")try{d=Vo(s.getAuthenticatorData())}catch(b){Ch("getAuthenticatorData()",b)}return{id:a,rawId:Vo(i),response:{attestationObject:Vo(s.attestationObject),clientDataJSON:Vo(s.clientDataJSON),transports:u,publicKeyAlgorithm:r,publicKey:_,authenticatorData:d},type:f,clientExtensionResults:o.getClientExtensionResults(),authenticatorAttachment:k0(o.authenticatorAttachment)}}function Ch(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
62
- `,t)}function a6(){if(!jh())return new Promise(t=>t(!1));let e=window.PublicKeyCredential;return e.isConditionalMediationAvailable===void 0?new Promise(t=>t(!1)):e.isConditionalMediationAvailable()}function s6({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Vn({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Vn({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){let o=window.location.hostname;if(E0(o)){if(n.rpId!==o)return new Vn({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Vn({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Vn({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return e}async function Lh(e,t=!1){if(!jh())throw new Error("WebAuthn is not supported in this browser");let n;e.allowCredentials?.length!==0&&(n=e.allowCredentials?.map(_0));let o={...e,challenge:yl(e.challenge),allowCredentials:n},a={};if(t){if(!await a6())throw Error("Browser does not support WebAuthn autofill");if(document.querySelectorAll("input[autocomplete$='webauthn']").length<1)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');a.mediation="conditional",o.allowCredentials=[]}a.publicKey=o,a.signal=T0.createNewAbortSignal();let i;try{i=await navigator.credentials.get(a)}catch(d){throw s6({error:d,options:a})}if(!i)throw new Error("Authentication was not completed");let{id:s,rawId:f,response:u,type:r}=i,_;return u.userHandle&&(_=Vo(u.userHandle)),{id:s,rawId:Vo(f),response:{authenticatorData:Vo(u.authenticatorData),clientDataJSON:Vo(u.clientDataJSON),signature:Vo(u.signature),userHandle:_},type:r,clientExtensionResults:i.getClientExtensionResults(),authenticatorAttachment:k0(i.authenticatorAttachment)}}var Nh;try{Nh=new TextDecoder}catch{}var Tr,Ji,Qt=0;var B0=[],u6=105,c6=57342,l6=57343,P0=57337;var x0=6,Fa={},Uh=B0,Mh=0,Gr={},vn,vl,bl=0,ru=0,Ln,Eo,xn=[],Fh=[],co,no,tu,R0={useRecords:!1,mapsAsObjects:!0},nu=!1,j0=2;try{new Function("")}catch{j0=1/0}var Dh=class e{constructor(t){if(t&&((t.keyMap||t._keyMap)&&!t.useRecords&&(t.useRecords=!1,t.mapsAsObjects=!0),t.useRecords===!1&&t.mapsAsObjects===void 0&&(t.mapsAsObjects=!0),t.getStructures&&(t.getShared=t.getStructures),t.getShared&&!t.structures&&((t.structures=[]).uninitialized=!0),t.keyMap)){this.mapKey=new Map;for(let[n,o]of Object.entries(t.keyMap))this.mapKey.set(o,n)}Object.assign(this,t)}decodeKey(t){return this.keyMap&&this.mapKey.get(t)||t}encodeKey(t){return this.keyMap&&this.keyMap.hasOwnProperty(t)?this.keyMap[t]:t}encodeKeys(t){if(!this._keyMap)return t;let n=new Map;for(let[o,a]of Object.entries(t))n.set(this._keyMap.hasOwnProperty(o)?this._keyMap[o]:o,a);return n}decodeKeys(t){if(!this._keyMap||t.constructor.name!="Map")return t;if(!this._mapKey){this._mapKey=new Map;for(let[o,a]of Object.entries(this._keyMap))this._mapKey.set(a,o)}let n={};return t.forEach((o,a)=>n[To(this._mapKey.has(a)?this._mapKey.get(a):a)]=o),n}mapDecode(t,n){let o=this.decode(t);if(this._keyMap)switch(o.constructor.name){case"Array":return o.map(a=>this.decodeKeys(a))}return o}decode(t,n){if(Tr)return M0(()=>(Hh(),this?this.decode(t,n):e.prototype.decode.call(R0,t,n)));Ji=n>-1?n:t.length,Qt=0,Mh=0,ru=0,vl=null,Uh=B0,Ln=null,Tr=t;try{no=t.dataView||(t.dataView=new DataView(t.buffer,t.byteOffset,t.byteLength))}catch(o){throw Tr=null,t instanceof Uint8Array?o:new Error("Source must be a Uint8Array or Buffer but was a "+(t&&typeof t=="object"?t.constructor.name:typeof t))}if(this instanceof e){if(Gr=this,co=this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),this.structures)return vn=this.structures,ml();(!vn||vn.length>0)&&(vn=[])}else Gr=R0,(!vn||vn.length>0)&&(vn=[]),co=null;return ml()}decodeMultiple(t,n){let o,a=0;try{let i=t.length;nu=!0;let s=this?this.decode(t,i):Xh.decode(t,i);if(n){if(n(s)===!1)return;for(;Qt<i;)if(a=Qt,n(ml())===!1)return}else{for(o=[s];Qt<i;)a=Qt,o.push(ml());return o}}catch(i){throw i.lastPosition=a,i.values=o,i}finally{nu=!1,Hh()}}};function ml(){try{let e=Yr();if(Ln){if(Qt>=Ln.postBundlePosition){let t=new Error("Unexpected bundle position");throw t.incomplete=!0,t}Qt=Ln.postBundlePosition,Ln=null}if(Qt==Ji)vn=null,Tr=null,Eo&&(Eo=null);else if(Qt>Ji){let t=new Error("Unexpected end of CBOR data");throw t.incomplete=!0,t}else if(!nu)throw new Error("Data read, but end of buffer not reached");return e}catch(e){throw Hh(),(e instanceof RangeError||e.message.startsWith("Unexpected end of buffer"))&&(e.incomplete=!0),e}}function Yr(){let e=Tr[Qt++],t=e>>5;if(e=e&31,e>23)switch(e){case 24:e=Tr[Qt++];break;case 25:if(t==7)return d6();e=no.getUint16(Qt),Qt+=2;break;case 26:if(t==7){let n=no.getFloat32(Qt);if(Gr.useFloat32>2){let o=F0[(Tr[Qt]&127)<<1|Tr[Qt+1]>>7];return Qt+=4,(o*n+(n>0?.5:-.5)>>0)/o}return Qt+=4,n}e=no.getUint32(Qt),Qt+=4;break;case 27:if(t==7){let n=no.getFloat64(Qt);return Qt+=8,n}if(t>1){if(no.getUint32(Qt)>0)throw new Error("JavaScript does not support arrays, maps, or strings with length over 4294967295");e=no.getUint32(Qt+4)}else Gr.int64AsNumber?(e=no.getUint32(Qt)*4294967296,e+=no.getUint32(Qt+4)):e=no.getBigUint64(Qt);Qt+=8;break;case 31:switch(t){case 2:case 3:throw new Error("Indefinite length not supported for byte or text strings");case 4:let n=[],o,a=0;for(;(o=Yr())!=Fa;)n[a++]=o;return t==4?n:t==3?n.join(""):Buffer.concat(n);case 5:let i;if(Gr.mapsAsObjects){let s={};if(Gr.keyMap)for(;(i=Yr())!=Fa;)s[To(Gr.decodeKey(i))]=Yr();else for(;(i=Yr())!=Fa;)s[To(i)]=Yr();return s}else{tu&&(Gr.mapsAsObjects=!0,tu=!1);let s=new Map;if(Gr.keyMap)for(;(i=Yr())!=Fa;)s.set(Gr.decodeKey(i),Yr());else for(;(i=Yr())!=Fa;)s.set(i,Yr());return s}case 7:return Fa;default:throw new Error("Invalid major type for indefinite length "+t)}default:throw new Error("Unknown token "+e)}switch(t){case 0:return e;case 1:return~e;case 2:return h6(e);case 3:if(ru>=Qt)return vl.slice(Qt-bl,(Qt+=e)-bl);if(ru==0&&Ji<140&&e<32){let a=e<16?L0(e):p6(e);if(a!=null)return a}return f6(e);case 4:let n=new Array(e);for(let a=0;a<e;a++)n[a]=Yr();return n;case 5:if(Gr.mapsAsObjects){let a={};if(Gr.keyMap)for(let i=0;i<e;i++)a[To(Gr.decodeKey(Yr()))]=Yr();else for(let i=0;i<e;i++)a[To(Yr())]=Yr();return a}else{tu&&(Gr.mapsAsObjects=!0,tu=!1);let a=new Map;if(Gr.keyMap)for(let i=0;i<e;i++)a.set(Gr.decodeKey(Yr()),Yr());else for(let i=0;i<e;i++)a.set(Yr(),Yr());return a}case 6:if(e>=P0){let a=vn[e&8191];if(a)return a.read||(a.read=qh(a)),a.read();if(e<65536){if(e==l6){let i=qa(),s=Yr(),f=Yr();Kh(s,f);let u={};if(Gr.keyMap)for(let r=2;r<i;r++){let _=Gr.decodeKey(f[r-2]);u[To(_)]=Yr()}else for(let r=2;r<i;r++){let _=f[r-2];u[To(_)]=Yr()}return u}else if(e==c6){let i=qa(),s=Yr();for(let f=2;f<i;f++)Kh(s++,Yr());return Yr()}else if(e==P0)return w6();if(Gr.getShared&&(zh(),a=vn[e&8191],a))return a.read||(a.read=qh(a)),a.read()}}let o=xn[e];if(o)return o.handlesRead?o(Yr):o(Yr());{let a=Yr();for(let i=0;i<Fh.length;i++){let s=Fh[i](e,a);if(s!==void 0)return s}return new Va(a,e)}case 7:switch(e){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;case 31:default:let a=(co||Yi())[e];if(a!==void 0)return a;throw new Error("Unknown token "+e)}default:if(isNaN(e)){let a=new Error("Unexpected end of CBOR data");throw a.incomplete=!0,a}throw new Error("Unknown CBOR token "+e)}}var I0=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function qh(e){function t(){let n=Tr[Qt++];if(n=n&31,n>23)switch(n){case 24:n=Tr[Qt++];break;case 25:n=no.getUint16(Qt),Qt+=2;break;case 26:n=no.getUint32(Qt),Qt+=4;break;default:throw new Error("Expected array header, but got "+Tr[Qt-1])}let o=this.compiledReader;for(;o;){if(o.propertyCount===n)return o(Yr);o=o.next}if(this.slowReads++>=j0){let i=this.length==n?this:this.slice(0,n);return o=Gr.keyMap?new Function("r","return {"+i.map(s=>Gr.decodeKey(s)).map(s=>I0.test(s)?To(s)+":r()":"["+JSON.stringify(s)+"]:r()").join(",")+"}"):new Function("r","return {"+i.map(s=>I0.test(s)?To(s)+":r()":"["+JSON.stringify(s)+"]:r()").join(",")+"}"),this.compiledReader&&(o.next=this.compiledReader),o.propertyCount=n,this.compiledReader=o,o(Yr)}let a={};if(Gr.keyMap)for(let i=0;i<n;i++)a[To(Gr.decodeKey(this[i]))]=Yr();else for(let i=0;i<n;i++)a[To(this[i])]=Yr();return a}return e.slowReads=0,t}function To(e){if(typeof e=="string")return e==="__proto__"?"__proto_":e;if(typeof e=="number"||typeof e=="boolean"||typeof e=="bigint")return e.toString();if(e==null)return e+"";throw new Error("Invalid property name type "+typeof e)}var f6=Vh;function Vh(e){let t;if(e<16&&(t=L0(e)))return t;if(e>64&&Nh)return Nh.decode(Tr.subarray(Qt,Qt+=e));let n=Qt+e,o=[];for(t="";Qt<n;){let a=Tr[Qt++];if(!(a&128))o.push(a);else if((a&224)===192){let i=Tr[Qt++]&63;o.push((a&31)<<6|i)}else if((a&240)===224){let i=Tr[Qt++]&63,s=Tr[Qt++]&63;o.push((a&31)<<12|i<<6|s)}else if((a&248)===240){let i=Tr[Qt++]&63,s=Tr[Qt++]&63,f=Tr[Qt++]&63,u=(a&7)<<18|i<<12|s<<6|f;u>65535&&(u-=65536,o.push(u>>>10&1023|55296),u=56320|u&1023),o.push(u)}else o.push(a);o.length>=4096&&(t+=Kn.apply(String,o),o.length=0)}return o.length>0&&(t+=Kn.apply(String,o)),t}var Kn=String.fromCharCode;function p6(e){let t=Qt,n=new Array(e);for(let o=0;o<e;o++){let a=Tr[Qt++];if((a&128)>0){Qt=t;return}n[o]=a}return Kn.apply(String,n)}function L0(e){if(e<4)if(e<2){if(e===0)return"";{let t=Tr[Qt++];if((t&128)>1){Qt-=1;return}return Kn(t)}}else{let t=Tr[Qt++],n=Tr[Qt++];if((t&128)>0||(n&128)>0){Qt-=2;return}if(e<3)return Kn(t,n);let o=Tr[Qt++];if((o&128)>0){Qt-=3;return}return Kn(t,n,o)}else{let t=Tr[Qt++],n=Tr[Qt++],o=Tr[Qt++],a=Tr[Qt++];if((t&128)>0||(n&128)>0||(o&128)>0||(a&128)>0){Qt-=4;return}if(e<6){if(e===4)return Kn(t,n,o,a);{let i=Tr[Qt++];if((i&128)>0){Qt-=5;return}return Kn(t,n,o,a,i)}}else if(e<8){let i=Tr[Qt++],s=Tr[Qt++];if((i&128)>0||(s&128)>0){Qt-=6;return}if(e<7)return Kn(t,n,o,a,i,s);let f=Tr[Qt++];if((f&128)>0){Qt-=7;return}return Kn(t,n,o,a,i,s,f)}else{let i=Tr[Qt++],s=Tr[Qt++],f=Tr[Qt++],u=Tr[Qt++];if((i&128)>0||(s&128)>0||(f&128)>0||(u&128)>0){Qt-=8;return}if(e<10){if(e===8)return Kn(t,n,o,a,i,s,f,u);{let r=Tr[Qt++];if((r&128)>0){Qt-=9;return}return Kn(t,n,o,a,i,s,f,u,r)}}else if(e<12){let r=Tr[Qt++],_=Tr[Qt++];if((r&128)>0||(_&128)>0){Qt-=10;return}if(e<11)return Kn(t,n,o,a,i,s,f,u,r,_);let d=Tr[Qt++];if((d&128)>0){Qt-=11;return}return Kn(t,n,o,a,i,s,f,u,r,_,d)}else{let r=Tr[Qt++],_=Tr[Qt++],d=Tr[Qt++],b=Tr[Qt++];if((r&128)>0||(_&128)>0||(d&128)>0||(b&128)>0){Qt-=12;return}if(e<14){if(e===12)return Kn(t,n,o,a,i,s,f,u,r,_,d,b);{let T=Tr[Qt++];if((T&128)>0){Qt-=13;return}return Kn(t,n,o,a,i,s,f,u,r,_,d,b,T)}}else{let T=Tr[Qt++],w=Tr[Qt++];if((T&128)>0||(w&128)>0){Qt-=14;return}if(e<15)return Kn(t,n,o,a,i,s,f,u,r,_,d,b,T,w);let g=Tr[Qt++];if((g&128)>0){Qt-=15;return}return Kn(t,n,o,a,i,s,f,u,r,_,d,b,T,w,g)}}}}}function h6(e){return Gr.copyBuffers?Uint8Array.prototype.slice.call(Tr,Qt,Qt+=e):Tr.subarray(Qt,Qt+=e)}var N0=new Float32Array(1),gl=new Uint8Array(N0.buffer,0,4);function d6(){let e=Tr[Qt++],t=Tr[Qt++],n=(e&127)>>2;if(n===31)return t||e&3?NaN:e&128?-1/0:1/0;if(n===0){let o=((e&3)<<8|t)/16777216;return e&128?-o:o}return gl[3]=e&128|(n>>1)+56,gl[2]=(e&7)<<5|t>>3,gl[1]=t<<5,gl[0]=0,N0[0]}var R4=new Array(4096);var Va=class{constructor(t,n){this.value=t,this.tag=n}};xn[0]=e=>new Date(e);xn[1]=e=>new Date(Math.round(e*1e3));xn[2]=e=>{let t=BigInt(0);for(let n=0,o=e.byteLength;n<o;n++)t=BigInt(e[n])+t<<BigInt(8);return t};xn[3]=e=>BigInt(-1)-xn[2](e);xn[4]=e=>+(e[1]+"e"+e[0]);xn[5]=e=>e[1]*Math.exp(e[0]*Math.log(2));var Kh=(e,t)=>{e=e-57344;let n=vn[e];n&&n.isShared&&((vn.restoreStructures||(vn.restoreStructures=[]))[e]=n),vn[e]=t,t.read=qh(t)};xn[u6]=e=>{let t=e.length,n=e[1];Kh(e[0],n);let o={};for(let a=2;a<t;a++){let i=n[a-2];o[To(i)]=e[a]}return o};xn[14]=e=>Ln?Ln[0].slice(Ln.position0,Ln.position0+=e):new Va(e,14);xn[15]=e=>Ln?Ln[1].slice(Ln.position1,Ln.position1+=e):new Va(e,15);var y6={Error,RegExp};xn[27]=e=>(y6[e[0]]||Error)(e[1],e[2]);var U0=e=>{if(Tr[Qt++]!=132){let n=new Error("Packed values structure must be followed by a 4 element array");throw Tr.length<Qt&&(n.incomplete=!0),n}let t=e();if(!t||!t.length){let n=new Error("Packed values structure must be followed by a 4 element array");throw n.incomplete=!0,n}return co=co?t.concat(co.slice(t.length)):t,co.prefixes=e(),co.suffixes=e(),e()};U0.handlesRead=!0;xn[51]=U0;xn[x0]=e=>{if(!co)if(Gr.getShared)zh();else return new Va(e,x0);if(typeof e=="number")return co[16+(e>=0?2*e:-2*e-1)];let t=new Error("No support for non-integer packed references yet");throw e===void 0&&(t.incomplete=!0),t};xn[28]=e=>{Eo||(Eo=new Map,Eo.id=0);let t=Eo.id++,n=Qt,o=Tr[Qt],a;o>>5==4?a=[]:a={};let i={target:a};Eo.set(t,i);let s=e();return i.used?(Object.getPrototypeOf(a)!==Object.getPrototypeOf(s)&&(Qt=n,a=s,Eo.set(t,{target:a}),s=e()),Object.assign(a,s)):(i.target=s,s)};xn[28].handlesRead=!0;xn[29]=e=>{let t=Eo.get(e);return t.used=!0,t.target};xn[258]=e=>new Set(e);(xn[259]=e=>(Gr.mapsAsObjects&&(Gr.mapsAsObjects=!1,tu=!0),e())).handlesRead=!0;function Da(e,t){return typeof e=="string"?e+t:e instanceof Array?e.concat(t):Object.assign({},e,t)}function Yi(){if(!co)if(Gr.getShared)zh();else throw new Error("No packed values available");return co}var m6=1399353956;Fh.push((e,t)=>{if(e>=225&&e<=255)return Da(Yi().prefixes[e-224],t);if(e>=28704&&e<=32767)return Da(Yi().prefixes[e-28672],t);if(e>=1879052288&&e<=2147483647)return Da(Yi().prefixes[e-1879048192],t);if(e>=216&&e<=223)return Da(t,Yi().suffixes[e-216]);if(e>=27647&&e<=28671)return Da(t,Yi().suffixes[e-27639]);if(e>=1811940352&&e<=1879048191)return Da(t,Yi().suffixes[e-1811939328]);if(e==m6)return{packedValues:co,structures:vn.slice(0),version:t};if(e==55799)return t});var g6=new Uint8Array(new Uint16Array([1]).buffer)[0]==1,C0=[Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,typeof BigUint64Array>"u"?{name:"BigUint64Array"}:BigUint64Array,Int8Array,Int16Array,Int32Array,typeof BigInt64Array>"u"?{name:"BigInt64Array"}:BigInt64Array,Float32Array,Float64Array],v6=[64,68,69,70,71,72,77,78,79,85,86];for(let e=0;e<C0.length;e++)b6(C0[e],v6[e]);function b6(e,t){let n="get"+e.name.slice(0,-5),o;typeof e=="function"?o=e.BYTES_PER_ELEMENT:e=null;for(let a=0;a<2;a++){if(!a&&o==1)continue;let i=o==2?1:o==4?2:o==8?3:0;xn[a?t:t-4]=o==1||a==g6?s=>{if(!e)throw new Error("Could not find typed array for code "+t);return!Gr.copyBuffers&&(o===1||o===2&&!(s.byteOffset&1)||o===4&&!(s.byteOffset&3)||o===8&&!(s.byteOffset&7))?new e(s.buffer,s.byteOffset,s.byteLength>>i):new e(Uint8Array.prototype.slice.call(s,0).buffer)}:s=>{if(!e)throw new Error("Could not find typed array for code "+t);let f=new DataView(s.buffer,s.byteOffset,s.byteLength),u=s.length>>i,r=new e(u),_=f[n];for(let d=0;d<u;d++)r[d]=_.call(f,d<<i,a);return r}}}function w6(){let e=qa(),t=Qt+Yr();for(let o=2;o<e;o++){let a=qa();Qt+=a}let n=Qt;return Qt=t,Ln=[Vh(qa()),Vh(qa())],Ln.position0=0,Ln.position1=0,Ln.postBundlePosition=Qt,Qt=n,Yr()}function qa(){let e=Tr[Qt++]&31;if(e>23)switch(e){case 24:e=Tr[Qt++];break;case 25:e=no.getUint16(Qt),Qt+=2;break;case 26:e=no.getUint32(Qt),Qt+=4;break}return e}function zh(){if(Gr.getShared){let e=M0(()=>(Tr=null,Gr.getShared()))||{},t=e.structures||[];Gr.sharedVersion=e.version,co=Gr.sharedValues=e.packedValues,vn===!0?Gr.structures=vn=t:vn.splice.apply(vn,[0,t.length].concat(t))}}function M0(e){let t=Ji,n=Qt,o=Mh,a=bl,i=ru,s=vl,f=Uh,u=Eo,r=Ln,_=new Uint8Array(Tr.slice(0,Ji)),d=vn,b=Gr,T=nu,w=e();return Ji=t,Qt=n,Mh=o,bl=a,ru=i,vl=s,Uh=f,Eo=u,Ln=r,Tr=_,nu=T,vn=d,Gr=b,no=new DataView(Tr.buffer,Tr.byteOffset,Tr.byteLength),w}function Hh(){Tr=null,Eo=null,vn=null}var F0=new Array(147);for(let e=0;e<256;e++)F0[e]=+("1e"+Math.floor(45.15-e*.30103));var Xh=new Dh({useRecords:!1}),Gh=Xh.decode,I4=Xh.decodeMultiple;var Ti=po(ts(),1),D0=class{id;sudo;wallet;factory;sequencePublicKey;networkPassphrase;horizonUrl;horizon;rpcUrl;rpc;feeBumpUrl;feeBumpJwt;factoryContractId=kh.testnet.contractId;constructor(t){let{sequencePublicKey:n,networkPassphrase:o,horizonUrl:a,rpcUrl:i,feeBumpUrl:s,feeBumpJwt:f,factoryContractId:u}=t;this.sequencePublicKey=n,this.networkPassphrase=o,this.horizonUrl=a,this.horizon=new Cr.Horizon.Server(a),this.rpcUrl=i,this.rpc=new Cr.SorobanRpc.Server(i),this.feeBumpUrl=s,this.feeBumpJwt=f,u&&(this.factoryContractId=u),this.factory=new Zs({publicKey:n,contractId:this.factoryContractId,networkPassphrase:o,rpcUrl:i})}async createWallet(t,n){let{keyId:o,publicKey:a}=await this.createKey(t,n),{result:i,built:s}=await this.factory.deploy({id:o,pk:a}),f=i.unwrap();return this.wallet=new Ua({publicKey:this.sequencePublicKey,contractId:f,networkPassphrase:this.networkPassphrase,rpcUrl:this.rpcUrl}),{contractId:f,xdr:s.toXDR()}}async createKey(t,n){let o=await O0({challenge:(0,lo.default)("sorobanisbest"),rp:{name:t},user:{id:(0,lo.default)(n),name:n,displayName:n},authenticatorSelection:{requireResidentKey:!1,residentKey:"preferred",userVerification:"discouraged"},pubKeyCredParams:[{alg:-7,type:"public-key"}],attestation:"none"});return this.id||(this.id=o.id,this.sudo||(this.sudo=o.id)),this.getKey(o)}async connectWallet(){let t=await Lh({challenge:(0,lo.default)("sorobanisbest"),userVerification:"discouraged"});this.id||(this.id=t.id);let{keyId:n,publicKey:o}=await this.getKey(t),a=Cr.StrKey.encodeContract((0,Cr.hash)(Cr.xdr.HashIdPreimage.envelopeTypeContractId(new Cr.xdr.HashIdPreimageContractId({networkId:(0,Cr.hash)(Ti.Buffer.from(this.networkPassphrase,"utf-8")),contractIdPreimage:Cr.xdr.ContractIdPreimage.contractIdPreimageFromAddress(new Cr.xdr.ContractIdPreimageFromAddress({address:Cr.Address.fromString(this.factoryContractId).toScAddress(),salt:(0,Cr.hash)(n)}))})).toXDR()));try{await this.rpc.getContractData(a,Cr.xdr.ScVal.scvLedgerKeyContractInstance())}catch{let{val:i}=await this.rpc.getContractData(this.factoryContractId,Cr.xdr.ScVal.scvBytes(n));a=(0,Cr.scValToNative)(i.contractData().val())}return this.wallet=new Ua({publicKey:this.sequencePublicKey,contractId:a,networkPassphrase:this.networkPassphrase,rpcUrl:this.rpcUrl}),await this.getData(),a}async sign(t,n){let{id:o,ttl:a=60}=n||{};t=Cr.TransactionBuilder.cloneFrom(new Cr.Transaction(typeof t=="string"?t:t.toXDR(),this.networkPassphrase),{fee:"0"}).build();let s=t.operations[0].auth[0],f=await this.rpc.getLatestLedger().then(({sequence:w})=>w),u=(0,Cr.hash)(Cr.xdr.HashIdPreimage.envelopeTypeSorobanAuthorization(new Cr.xdr.HashIdPreimageSorobanAuthorization({networkId:(0,Cr.hash)(Ti.Buffer.from(this.networkPassphrase,"utf-8")),nonce:s.credentials().address().nonce(),signatureExpirationLedger:f+a,invocation:s.rootInvocation()})).toXDR()),r=await Lh(o==="any"||o==="sudo"&&!this.sudo?{challenge:(0,lo.default)(u),userVerification:"discouraged"}:{challenge:(0,lo.default)(u),allowCredentials:[{id:o==="sudo"?this.sudo:o instanceof Uint8Array?(0,lo.default)(o):o||this.id,type:"public-key"}],userVerification:"discouraged"});o==="sudo"&&(this.sudo=r.id),this.id=r.id;let _=lo.default.toBuffer(r.response.signature),d=this.convertEcdsaSignatureAsnToCompact(_),b=s.credentials().address();b.signatureExpirationLedger(f+a),b.signature(Cr.xdr.ScVal.scvMap([new Cr.xdr.ScMapEntry({key:Cr.xdr.ScVal.scvSymbol("authenticator_data"),val:Cr.xdr.ScVal.scvBytes(lo.default.toBuffer(r.response.authenticatorData))}),new Cr.xdr.ScMapEntry({key:Cr.xdr.ScVal.scvSymbol("client_data_json"),val:Cr.xdr.ScVal.scvBytes(lo.default.toBuffer(r.response.clientDataJSON))}),new Cr.xdr.ScMapEntry({key:Cr.xdr.ScVal.scvSymbol("id"),val:Cr.xdr.ScVal.scvBytes(lo.default.toBuffer(r.id))}),new Cr.xdr.ScMapEntry({key:Cr.xdr.ScVal.scvSymbol("signature"),val:Cr.xdr.ScVal.scvBytes(d)})]));let T=await this.rpc.simulateTransaction(t);if(Cr.SorobanRpc.Api.isSimulationError(T)||Cr.SorobanRpc.Api.isSimulationRestore(T))throw T;return Cr.SorobanRpc.assembleTransaction(t,T).build().toXDR()}async send(t,n=1e4){let o=new FormData;o.set("xdr",t.toXDR()),o.set("fee",n.toString());let a=await fetch(this.feeBumpUrl,{method:"POST",headers:{authorization:`Bearer ${this.feeBumpJwt}`},body:o}).then(async i=>{if(i.ok)return i.text();throw await i.json()});return this.horizon.submitTransaction(new Cr.FeeBumpTransaction(a,this.networkPassphrase))}async getData(){let t=new Map,{val:n}=await this.rpc.getContractData(this.wallet.options.contractId,Cr.xdr.ScVal.scvLedgerKeyContractInstance());return n.contractData().val().instance().storage()?.forEach(o=>{t.set((0,Cr.scValToNative)(o.key()),(0,Cr.scValToNative)(o.val()))}),this.sudo=(0,lo.default)(t.get("sudo_sig")),t}async getKey(t){let n;if(S6(t)){let{publicKeyObject:o}=this.getPublicKeyObject(t.response.attestationObject);n=Ti.Buffer.from([4,...o.get("-2"),...o.get("-3")])}return{keyId:lo.default.toBuffer(t.id),publicKey:n}}getPublicKeyObject(t){let{authData:n}=Gh(lo.default.toBuffer(t)),o=new Uint8Array(n),a=new DataView(o.buffer,0,o.length),i=0,s=n.slice(i,i+32);i+=32;let f=a.getUint8(i);i+=1;let u=a.getUint32(i,!1);if(i+=4,f&64){let r=n.slice(i,i+16);i+=16;let _=a.getUint16(i,!1);i+=2;let d=n.slice(i,i+_);i+=_;let b=n.slice(i,i+77);i+=77;let T=n.slice(i),w=new Map(Object.entries(Gh(b)));return{rpIdHash:s,flags:f,signCount:u,aaguid:r,credIdLength:_,credentialId:d,credentialPublicKey:b,theRest:T,publicKeyObject:w}}throw new Error("Attested credential data not present in the flags.")}convertEcdsaSignatureAsnToCompact(t){let n=Ti.Buffer.from("ffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551","hex"),o=0;if(t[o]!=48)throw"signature is not a sequence";if(o+=1,o+=1,t[o]!=2)throw"first element in sequence is not an integer";o+=1;let a=t[o];if(o+=1,a>=33){if(a!=33||t[o]!=0)throw"can only handle larger than 32 byte R's that are len 33 and lead with zero";o+=1}let i=t.slice(o,o+32);if(o+=32,t[o]!=2)throw"second element in sequence is not an integer";o+=1;let s=t[o];if(o+=1,s>=33){if(s!=33||t[o]!=0)throw"can only handle larger than 32 byte R's that are len 33 and lead with zero";o+=1}let f=t.slice(o,o+32);o+=32;let u;return eu(f)>(eu(n)-BigInt(1))/BigInt(2)?u=Ti.Buffer.from([...i,...Ti.Buffer.from(v0(eu(n)-eu(f),!0))]):u=Ti.Buffer.from([...i,...f]),u}};function S6(e){return e?.response?.attestationObject}export{D0 as PasskeyAccount};
63
- /*! Bundled license information:
64
-
65
- ieee754/index.js:
66
- (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
67
-
68
- buffer/index.js:
69
- (*!
70
- * The buffer module from node.js, for the browser.
71
- *
72
- * @author Feross Aboukhadijeh <https://feross.org>
73
- * @license MIT
74
- *)
75
-
76
- @stellar/js-xdr/dist/xdr.js:
77
- (*! For license information please see xdr.js.LICENSE.txt *)
78
-
79
- safe-buffer/index.js:
80
- (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
81
-
82
- @stellar/stellar-base/lib/auth.js:
83
- (*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE *)
84
-
85
- urijs/src/punycode.js:
86
- (*! https://mths.be/punycode v1.4.0 by @mathias *)
87
-
88
- urijs/src/IPv6.js:
89
- (*!
90
- * URI.js - Mutating URLs
91
- * IPv6 Support
92
- *
93
- * Version: 1.19.11
94
- *
95
- * Author: Rodney Rehm
96
- * Web: http://medialize.github.io/URI.js/
97
- *
98
- * Licensed under
99
- * MIT License http://www.opensource.org/licenses/mit-license
100
- *
101
- *)
102
-
103
- urijs/src/SecondLevelDomains.js:
104
- (*!
105
- * URI.js - Mutating URLs
106
- * Second Level Domain (SLD) Support
107
- *
108
- * Version: 1.19.11
109
- *
110
- * Author: Rodney Rehm
111
- * Web: http://medialize.github.io/URI.js/
112
- *
113
- * Licensed under
114
- * MIT License http://www.opensource.org/licenses/mit-license
115
- *
116
- *)
117
-
118
- urijs/src/URI.js:
119
- (*!
120
- * URI.js - Mutating URLs
121
- *
122
- * Version: 1.19.11
123
- *
124
- * Author: Rodney Rehm
125
- * Web: http://medialize.github.io/URI.js/
126
- *
127
- * Licensed under
128
- * MIT License http://www.opensource.org/licenses/mit-license
129
- *
130
- *)
131
-
132
- @stellar/stellar-sdk/dist/stellar-sdk.min.js:
133
- (*! For license information please see stellar-sdk.min.js.LICENSE.txt *)
134
- */
135
- //# sourceMappingURL=index.js.map